diff options
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/appl/imagemgr.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/newhelp.cxx | 4 | ||||
-rw-r--r-- | sfx2/source/dialog/taskpane.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/doc/docvor.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/virtmenu.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/menu/mnuitem.cxx | 8 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 45 | ||||
-rw-r--r-- | sfx2/source/toolbox/tbxitem.cxx | 13 |
8 files changed, 25 insertions, 57 deletions
diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index 85810cd95a17..a67415517223 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -68,7 +68,7 @@ typedef std::hash_map< ::rtl::OUString, ::std::equal_to< ::rtl::OUString > > ModuleIdToImagegMgr; -Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig, BOOL bHiContrast ) +Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, const ::rtl::OUString& aURL, BOOL bBig ) { // TODO/LATeR: shouldn't this become a method at SfxViewFrame?! That would save the UnoTunnel if ( !rFrame.is() ) @@ -128,8 +128,6 @@ Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::sta ::com::sun::star::ui::ImageType::SIZE_DEFAULT ); if ( bBig ) nImageType |= ::com::sun::star::ui::ImageType::SIZE_LARGE; - if ( bHiContrast ) - nImageType |= ::com::sun::star::ui::ImageType::COLOR_HIGHCONTRAST; if ( xDocImgMgr.is() ) { @@ -211,7 +209,7 @@ Image SAL_CALL GetImage( const ::com::sun::star::uno::Reference< ::com::sun::sta if ( !!aImage ) return aImage; else if ( nProtocol != INET_PROT_UNO && nProtocol != INET_PROT_SLOT ) - return SvFileInformationManager::GetImageNoDefault( aObj, bBig, bHiContrast ); + return SvFileInformationManager::GetImageNoDefault( aObj, bBig ); } } catch ( Exception& ) diff --git a/sfx2/source/appl/newhelp.cxx b/sfx2/source/appl/newhelp.cxx index 2f7c02c8b2ec..a35f35549ac5 100644 --- a/sfx2/source/appl/newhelp.cxx +++ b/sfx2/source/appl/newhelp.cxx @@ -1307,7 +1307,7 @@ void BookmarksBox_Impl::DoAction( USHORT nAction ) RemoveEntry( nPos ); rtl::OUString aImageURL = IMAGE_URL; aImageURL += INetURLObject( *pURL ).GetHost(); - nPos = InsertEntry( aDlg.GetTitle(), SvFileInformationManager::GetImage( aImageURL ) ); + nPos = InsertEntry( aDlg.GetTitle(), SvFileInformationManager::GetImage( aImageURL, false ) ); SetEntryData( nPos, (void*)(ULONG)( new String( *pURL ) ) ); SelectEntryPos( nPos ); delete pURL; @@ -1480,7 +1480,7 @@ void BookmarksTabPage_Impl::AddBookmarks( const String& rTitle, const String& rU { rtl::OUString aImageURL = IMAGE_URL; aImageURL += INetURLObject( rURL ).GetHost(); - USHORT nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL ) ); + USHORT nPos = aBookmarksBox.InsertEntry( rTitle, SvFileInformationManager::GetImage( aImageURL, false ) ); aBookmarksBox.SetEntryData( nPos, (void*)(ULONG)( new String( rURL ) ) ); } diff --git a/sfx2/source/dialog/taskpane.cxx b/sfx2/source/dialog/taskpane.cxx index d1847cdccd0e..d1de5e0aec68 100644 --- a/sfx2/source/dialog/taskpane.cxx +++ b/sfx2/source/dialog/taskpane.cxx @@ -185,8 +185,7 @@ namespace sfx2 aCommandName.append( sImageURL.copy( nCommandImagePrefixLen ) ); const ::rtl::OUString sCommandName( aCommandName.makeStringAndClear() ); - const BOOL bHiContrast( Application::GetSettings().GetStyleSettings().GetHighContrastMode() ); - const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE, bHiContrast ) ); + const Image aPanelImage( GetImage( i_rDocFrame, sCommandName, FALSE ) ); return aPanelImage.GetXGraphic(); } diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 9f2c0eb2be98..6af92930d155 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -2111,7 +2111,7 @@ IMPL_LINK( SfxOrganizeDlg_Impl, MenuActivate_Impl, Menu *, pMenu ) String aTitle = SvFileInformationManager::GetDescription( INetURLObject(aObjFacURL) ); pSubMenu->InsertItem( nItemId, aTitle, - SvFileInformationManager::GetImage(INetURLObject(aObjFacURL)) ); + SvFileInformationManager::GetImage(INetURLObject(aObjFacURL), false) ); pSubMenu->SetItemCommand( nItemId++, aObjFacURL ); DBG_ASSERT( nItemId <= ID_RESET_DEFAULT_TEMPLATE_END, "menu item id overflow" ); } diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index 22ac6450318b..b1810d13d556 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -64,7 +64,6 @@ private: BOOL bHelpInitialized : 1; BOOL bIsActive : 1; BOOL bControllersUnBound : 1; - BOOL bWasHighContrast : 1; BOOL bIsAddonPopupMenu : 1; private: diff --git a/sfx2/source/menu/mnuitem.cxx b/sfx2/source/menu/mnuitem.cxx index 4b104bd54de0..a9026f49775f 100644 --- a/sfx2/source/menu/mnuitem.cxx +++ b/sfx2/source/menu/mnuitem.cxx @@ -443,7 +443,6 @@ SfxAppMenuControl_Impl::SfxAppMenuControl_Impl( // Determine the current background color setting for menus const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); - m_bWasHiContrastMode = rSettings.GetHighContrastMode(); m_bShowMenuImages = rSettings.GetUseImagesInMenus(); Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory()); @@ -469,15 +468,12 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); - BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || - ( bIsHiContrastMode != m_bWasHiContrastMode ) || ( bShowMenuImages != m_bShowMenuImages )) { m_nSymbolsStyle = nSymbolsStyle; - m_bWasHiContrastMode = bIsHiContrastMode; m_bShowMenuImages = bShowMenuImages; USHORT nCount = pActMenu->GetItemCount(); @@ -499,7 +495,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) if ( aImageId.getLength() > 0 ) { Reference< ::com::sun::star::frame::XFrame > xFrame; - Image aImage = GetImage( xFrame, aImageId, FALSE, bIsHiContrastMode ); + Image aImage = GetImage( xFrame, aImageId, FALSE ); if ( !!aImage ) { bImageSet = sal_True; @@ -511,7 +507,7 @@ IMPL_LINK( SfxAppMenuControl_Impl, Activate, Menu *, pActMenu ) if ( !bImageSet && aCmd.Len() ) { Image aImage = SvFileInformationManager::GetImage( - INetURLObject(aCmd), FALSE, bIsHiContrastMode ); + INetURLObject(aCmd), FALSE ); if ( !!aImage ) pActMenu->SetItemImage( nItemId, aImage ); } diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index ab000109dc24..415cde10efdf 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -134,21 +134,20 @@ void SfxMenuImageControl_Impl::Update() static Image RetrieveAddOnImage( Reference< com::sun::star::frame::XFrame >& rFrame, const rtl::OUString& aImageId, const rtl::OUString& aURL, - BOOL bBigImage, - BOOL bHiContrast ) + BOOL bBigImage ) { Image aImage; if ( aImageId.getLength() > 0 ) { - aImage = GetImage( rFrame, aImageId, bBigImage, bHiContrast ); + aImage = GetImage( rFrame, aImageId, bBigImage ); if ( !!aImage ) return aImage; } - aImage = GetImage( rFrame, aURL, bBigImage, bHiContrast ); + aImage = GetImage( rFrame, aURL, bBigImage ); if ( !aImage ) - aImage = framework::AddonsOptions().GetImageFromURL( aURL, bBigImage, bHiContrast ); + aImage = framework::AddonsOptions().GetImageFromURL( aURL, bBigImage ); return aImage; } @@ -201,7 +200,6 @@ SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId, pAutoDeactivate(0), nLocks(0), bHelpInitialized( bWithHelp ), - bWasHighContrast( FALSE ), bIsAddonPopupMenu( bIsAddonMenu ) { DBG_MEMTEST(); @@ -237,7 +235,6 @@ SfxVirtualMenu::SfxVirtualMenu( Menu *pStarViewMenu, BOOL bWithHelp, pAutoDeactivate(0), nLocks(0), bHelpInitialized( bWithHelp ), - bWasHighContrast( FALSE ), bIsAddonPopupMenu( bIsAddonMenu ) { DBG_MEMTEST(); @@ -393,9 +390,6 @@ void SfxVirtualMenu::CreateFromSVMenu() pBindings->ENTERREGISTRATIONS(); ++nLocks; pImageControl = new SfxMenuImageControl_Impl( SID_IMAGE_ORIENTATION, *pBindings, this ); - // Update high contrast state - bWasHighContrast = IsHiContrastMode(); - USHORT nSVPos = 0; for ( USHORT nPos=0; nPos<nCount; ++nPos, ++nSVPos ) { @@ -436,7 +430,7 @@ void SfxVirtualMenu::CreateFromSVMenu() { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId )); - Image aImage = GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast ); + Image aImage = GetImage( xFrame, aSlotURL, FALSE ); pSVMenu->SetItemImage( nSlotId, aImage ); } } @@ -542,13 +536,13 @@ void SfxVirtualMenu::CreateFromSVMenu() if ( pMenuAttributes ) aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes - aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bWasHighContrast ); + aImage = RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE ); } else { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId )); - aImage = GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast ); + aImage = GetImage( xFrame, aSlotURL, FALSE ); } if ( !!aImage ) @@ -603,7 +597,6 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG ) USHORT nItemCount = pSVMenu->GetItemCount(); SfxViewFrame *pViewFrame = pBindings->GetDispatcher()->GetFrame(); BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); - BOOL bIsHiContrastMode = IsHiContrastMode(); Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() ); if ( !bIsAddonPopupMenu ) @@ -626,13 +619,13 @@ IMPL_LINK( SfxVirtualMenu, SettingsChanged, void*, EMPTYARG ) if ( pMenuAttributes ) aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes - pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bIsHiContrastMode )); + pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE )); } else { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId )); - pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast )); + pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE )); } } else if( nType == MENUITEM_STRINGIMAGE && !bIcons ) @@ -673,7 +666,6 @@ void SfxVirtualMenu::UpdateImages() if ( bIcons ) { - BOOL bIsHiContrastMode = IsHiContrastMode(); USHORT nItemCount = pSVMenu->GetItemCount(); SfxViewFrame * pViewFrame = pBindings->GetDispatcher()->GetFrame(); Reference<com::sun::star::frame::XFrame> xFrame( pViewFrame->GetFrame().GetFrameInterface() ); @@ -695,13 +687,13 @@ void SfxVirtualMenu::UpdateImages() if ( pMenuAttributes ) aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes - pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE, bIsHiContrastMode )); + pSVMenu->SetItemImage( nSlotId, RetrieveAddOnImage( xFrame, aImageId, aCmd, FALSE )); } else { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( nSlotId )); - pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast )); + pSVMenu->SetItemImage( nSlotId, GetImage( xFrame, aSlotURL, FALSE )); } } } @@ -723,7 +715,6 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu ) BOOL bIcons = Application::GetSettings().GetStyleSettings().GetUseImagesInMenus(); if ( bIcons ) { - BOOL bIsHiContrastMode = IsHiContrastMode(); USHORT nItemCount = pMenu->GetItemCount(); Reference<com::sun::star::frame::XFrame> aXFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() ); @@ -741,7 +732,7 @@ void SfxVirtualMenu::UpdateImages( Menu* pMenu ) if ( pMenuAttributes ) aImageId = pMenuAttributes->aImageId; // Retrieve image id from menu attributes - pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), FALSE, bIsHiContrastMode )); + pMenu->SetItemImage( nSlotId, RetrieveAddOnImage( aXFrame, aImageId, pMenu->GetItemCommand( nSlotId ), FALSE )); } if ( pPopup ) @@ -919,7 +910,7 @@ void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu ) { rtl::OUString aSlotURL( RTL_CONSTASCII_USTRINGPARAM( "slot:" )); aSlotURL += rtl::OUString::valueOf( sal_Int32( SID_ADDONS )); - pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, FALSE, bWasHighContrast )); + pMenu->SetItemImage( SID_ADDONS, GetImage( xFrame, aSlotURL, FALSE )); } } else @@ -1066,16 +1057,6 @@ IMPL_LINK( SfxVirtualMenu, Activate, Menu *, pMenu ) if ( pAutoDeactivate ) // QAP-Hack pAutoDeactivate->Start(); - if ( IsHiContrastMode() != bWasHighContrast ) - { - // Refresh images as our background color changed and remember it!! - bWasHighContrast = IsHiContrastMode(); - if ( bIsAddonPopupMenu ) - UpdateImages( pSVMenu ); - else - UpdateImages(); - } - // erledigt return TRUE; } diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx index c613c5186892..fffbbc200c4b 100644 --- a/sfx2/source/toolbox/tbxitem.cxx +++ b/sfx2/source/toolbox/tbxitem.cxx @@ -1522,7 +1522,6 @@ SfxAppToolBoxControl_Impl::SfxAppToolBoxControl_Impl( USHORT nSlotId, USHORT nId // Determine the current background color of the menus const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); m_nSymbolsStyle = rSettings.GetSymbolsStyle(); - m_bWasHiContrastMode = rSettings.GetHighContrastMode(); m_bShowMenuImages = rSettings.GetUseImagesInMenus(); SetImage( String() ); @@ -1647,11 +1646,10 @@ void SfxAppToolBoxControl_Impl::SetImage( const String &rURL ) aURL = sFallback; BOOL bBig = SvtMiscOptions().AreCurrentSymbolsLarge(); - BOOL bHC = GetToolBox().GetSettings().GetStyleSettings().GetHighContrastMode(); - Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig, bHC ); + Image aImage = SvFileInformationManager::GetImageNoDefault( INetURLObject( aURL ), bBig ); if ( !aImage ) aImage = !!aMenuImage ? aMenuImage : - SvFileInformationManager::GetImage( INetURLObject( aURL ), bBig, bHC ); + SvFileInformationManager::GetImage( INetURLObject( aURL ), bBig ); Size aBigSize( GetToolBox().GetDefaultImageSize() ); if ( bBig && aImage.GetSizePixel() != aBigSize ) { @@ -1798,15 +1796,12 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu ) { const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); ULONG nSymbolsStyle = rSettings.GetSymbolsStyle(); - BOOL bIsHiContrastMode = rSettings.GetHighContrastMode(); BOOL bShowMenuImages = rSettings.GetUseImagesInMenus(); if (( nSymbolsStyle != m_nSymbolsStyle ) || - ( bIsHiContrastMode != m_bWasHiContrastMode ) || ( bShowMenuImages != m_bShowMenuImages )) { m_nSymbolsStyle = nSymbolsStyle; - m_bWasHiContrastMode = bIsHiContrastMode; m_bShowMenuImages = bShowMenuImages; USHORT nCount = pActMenu->GetItemCount(); @@ -1828,7 +1823,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu ) if ( aImageId.getLength() > 0 ) { Reference< ::com::sun::star::frame::XFrame > xFrame; - Image aImage = GetImage( xFrame, aImageId, FALSE, bIsHiContrastMode ); + Image aImage = GetImage( xFrame, aImageId, FALSE ); if ( !!aImage ) { bImageSet = sal_True; @@ -1840,7 +1835,7 @@ IMPL_LINK( SfxAppToolBoxControl_Impl, Activate, Menu *, pActMenu ) if ( !bImageSet && aCmd.Len() ) { Image aImage = SvFileInformationManager::GetImage( - INetURLObject(aCmd), FALSE, bIsHiContrastMode ); + INetURLObject(aCmd), FALSE ); if ( !!aImage ) pActMenu->SetItemImage( nId, aImage ); } |