diff options
Diffstat (limited to 'vcl/source')
-rw-r--r-- | vcl/source/app/salvtables.cxx | 6 | ||||
-rw-r--r-- | vcl/source/gdi/print.cxx | 8 | ||||
-rw-r--r-- | vcl/source/treelist/svimpbox.cxx | 2 | ||||
-rw-r--r-- | vcl/source/window/menu.cxx | 10 |
4 files changed, 19 insertions, 7 deletions
diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 95beb907f6..50ecd194bd 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1068,6 +1068,12 @@ void SalInstanceToolbar::set_menu_item_active(const OUString& rIdent, bool bActi { if (bActive) { + MenuFlags nMenuFlags = pPopup->GetMenuFlags(); + if (officecfg::Office::Common::View::Menu::DontHideDisabledEntry::get()) + nMenuFlags &= ~MenuFlags::HideDisabledEntries; + else + nMenuFlags |= MenuFlags::HideDisabledEntries; + pPopup->SetMenuFlags(nMenuFlags); tools::Rectangle aRect = m_xToolBox->GetItemRect(nItemId); pPopup->Execute(m_xToolBox, aRect, PopupMenuFlags::ExecuteDown); } diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx index eff94a9211..401d38118c 100644 --- a/vcl/source/gdi/print.cxx +++ b/vcl/source/gdi/print.cxx @@ -1479,6 +1479,14 @@ OUString Printer::GetPaperBinName( sal_uInt16 nPaperBin ) const return OUString(); } +sal_uInt16 Printer::GetPaperBinBySourceIndex(sal_uInt16 nPaperSource) const +{ + if ( IsDisplayPrinter() ) + return 0; + + return mpInfoPrinter->GetPaperBinBySourceIndex( &maJobSetup.ImplGetConstData(), nPaperSource ); +} + void Printer::SetCopyCount( sal_uInt16 nCopy, bool bCollate ) { mnCopyCount = nCopy; diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 0deea8f698..66c697e8af 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -387,6 +387,7 @@ void SvImpLBox::PageDown( sal_uInt16 nDelta ) ShowCursor( false ); m_nFlags &= ~LBoxFlags::Filling; + m_pView->PaintImmediately(); m_pStartEntry = pNext; if( nRealDelta >= m_nVisibleCount ) @@ -424,6 +425,7 @@ void SvImpLBox::PageUp( sal_uInt16 nDelta ) m_nFlags &= ~LBoxFlags::Filling; ShowCursor( false ); + m_pView->PaintImmediately(); m_pStartEntry = pPrev; if( nRealDelta >= m_nVisibleCount ) { diff --git a/vcl/source/window/menu.cxx b/vcl/source/window/menu.cxx index 82d630742a..a0a03be455 100644 --- a/vcl/source/window/menu.cxx +++ b/vcl/source/window/menu.cxx @@ -2863,9 +2863,12 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& pParentWin, tools::Rectang if (bRealExecute) nPopupModeFlags |= FloatWinPopupFlags::NewLevel; + // MenuFlags get clobbered in the Activate function. Restore them after calling. + MenuFlags nMenuFlagsSaved = GetMenuFlags(); bInCallback = true; // set it here, if Activate overridden Activate(); bInCallback = false; + SetMenuFlags(nMenuFlagsSaved); if (pParentWin->isDisposed()) return false; @@ -2884,13 +2887,6 @@ bool PopupMenu::PrepareRun(const VclPtr<vcl::Window>& pParentWin, tools::Rectang else nMenuFlags &= ~MenuFlags::HideDisabledEntries; } - else - { - if (officecfg::Office::Common::View::Menu::DontHideDisabledEntry::get()) - nMenuFlags &= ~MenuFlags::HideDisabledEntries; - else - nMenuFlags |= MenuFlags::HideDisabledEntries; - } sal_uInt16 nVisibleEntries = ImplGetVisibleItemCount(); if ( !nVisibleEntries ) |