diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/docvor.hxx | 5 | ||||
-rw-r--r-- | sfx2/inc/imgmgr.hxx | 12 | ||||
-rw-r--r-- | sfx2/inc/sfx2/mnuitem.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/module.hxx | 1 | ||||
-rw-r--r-- | sfx2/inc/sfx2/new.hxx | 7 | ||||
-rw-r--r-- | sfx2/inc/sfx2/objsh.hxx | 24 | ||||
-rw-r--r-- | sfx2/inc/sfx2/styfitem.hxx | 2 | ||||
-rw-r--r-- | sfx2/inc/sfx2/tbxctrl.hxx | 5 | ||||
-rw-r--r-- | sfx2/source/appl/imagemgr.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/appl/module.cxx | 33 | ||||
-rw-r--r-- | sfx2/source/dialog/styfitem.cxx | 6 | ||||
-rw-r--r-- | sfx2/source/dialog/templdlg.cxx | 22 | ||||
-rw-r--r-- | sfx2/source/doc/docvor.cxx | 11 | ||||
-rw-r--r-- | sfx2/source/doc/new.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/doc/objcont.cxx | 20 | ||||
-rw-r--r-- | sfx2/source/doc/sfxbasemodel.cxx | 2 | ||||
-rw-r--r-- | sfx2/source/inc/virtmenu.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/menu/mnumgr.cxx | 3 | ||||
-rw-r--r-- | sfx2/source/menu/virtmenu.cxx | 13 | ||||
-rw-r--r-- | sfx2/source/toolbox/imgmgr.cxx | 44 |
20 files changed, 78 insertions, 154 deletions
diff --git a/sfx2/inc/docvor.hxx b/sfx2/inc/docvor.hxx index 417371673123..fb4d4e753501 100644 --- a/sfx2/inc/docvor.hxx +++ b/sfx2/inc/docvor.hxx @@ -57,11 +57,6 @@ friend class SfxOrganizeDlg_Impl; Image aOpenedDocBmp; Image aClosedDocBmp; - Image aOpenedFolderBmpHC; - Image aClosedFolderBmpHC; - Image aOpenedDocBmpHC; - Image aClosedDocBmpHC; - SfxOrganizeMgr* pMgr; SfxOrganizeDlg_Impl* pDlg; diff --git a/sfx2/inc/imgmgr.hxx b/sfx2/inc/imgmgr.hxx index df9d0f4b2c60..506f29d3ad58 100644 --- a/sfx2/inc/imgmgr.hxx +++ b/sfx2/inc/imgmgr.hxx @@ -54,13 +54,13 @@ public: // get images from resources void SetImages( ToolBox& rToolBox ); - void SetImages( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge ); - void SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge ); + void SetImages( ToolBox& rToolBox, BOOL bLarge ); + void SetImagesForceSize( ToolBox& rToolBox, BOOL bLarge ); - Image GetImage( USHORT nId, BOOL bLarge, BOOL bHiContrast ) const; - Image GetImage( USHORT nId, BOOL bHiContrast ) const; - Image SeekImage( USHORT nId, BOOL bLarge, BOOL bHiContrast ) const; - Image SeekImage( USHORT nId, BOOL bHiContrast ) const; + Image GetImage( USHORT nId, BOOL bLarge ) const; + Image GetImage( USHORT nId) const; + Image SeekImage( USHORT nId, BOOL bLarge ) const; + Image SeekImage( USHORT nId ) const; }; #endif diff --git a/sfx2/inc/sfx2/mnuitem.hxx b/sfx2/inc/sfx2/mnuitem.hxx index 1f731421a6cb..1a846228cbff 100644 --- a/sfx2/inc/sfx2/mnuitem.hxx +++ b/sfx2/inc/sfx2/mnuitem.hxx @@ -162,7 +162,7 @@ class SfxAppMenuControl_Impl : public SfxMenuControl BOOL m_bShowMenuImages; protected: - DECL_LINK( Activate, Menu * ); // Needed to support high contrast images + DECL_LINK( Activate, Menu * ); public: SFX_DECL_MENU_CONTROL(); diff --git a/sfx2/inc/sfx2/module.hxx b/sfx2/inc/sfx2/module.hxx index a90375bfb5be..0ae9c471e493 100644 --- a/sfx2/inc/sfx2/module.hxx +++ b/sfx2/inc/sfx2/module.hxx @@ -105,7 +105,6 @@ public: SAL_DLLPRIVATE SfxMenuCtrlFactArr_Impl* GetMenuCtrlFactories_Impl() const; SAL_DLLPRIVATE SfxChildWinFactArr_Impl* GetChildWinFactories_Impl() const; SAL_DLLPRIVATE ImageList* GetImageList_Impl( BOOL bBig ); - SAL_DLLPRIVATE ImageList* GetImageList_Impl( BOOL bBig, BOOL bHiContrast ); }; #endif diff --git a/sfx2/inc/sfx2/new.hxx b/sfx2/inc/sfx2/new.hxx index d38306f282bf..a566703508c6 100644 --- a/sfx2/inc/sfx2/new.hxx +++ b/sfx2/inc/sfx2/new.hxx @@ -63,13 +63,6 @@ protected: virtual void Paint( const Rectangle& rRect ); virtual void DataChanged( const DataChangedEvent& rDCEvt ); - /** state whether a system setting for high contrast should be evaluated - and taken into account for this window. - - The default implementation uses the accessibility option IsForDrawings - */ - virtual bool UseHighContrastSetting() const; - public: SfxPreviewWin( Window* pParent, const ResId& rResId, diff --git a/sfx2/inc/sfx2/objsh.hxx b/sfx2/inc/sfx2/objsh.hxx index 259f73ee360b..41c57b45452e 100644 --- a/sfx2/inc/sfx2/objsh.hxx +++ b/sfx2/inc/sfx2/objsh.hxx @@ -552,17 +552,22 @@ public: virtual void SetOrganizerSearchMask( SfxStyleSheetBasePool* ) const; + virtual sal_uInt16 GetContentCount( sal_uInt16 nIdx1 = INDEX_IGNORE ); - sal_uInt16 GetContentCount(sal_uInt16 nIdx); - bool CanHaveChilds( sal_uInt16 nIdx1, sal_uInt16 nIdx2 ); - void GetContent( String &, + virtual sal_Bool CanHaveChilds( + sal_uInt16 nIdx1, + sal_uInt16 nIdx2 = INDEX_IGNORE + ); + + virtual void GetContent( String &, Bitmap &rClosedBitmap, Bitmap &rOpenedBitmap, - bool &bCanDelete, + sal_Bool &bCanDelete, sal_uInt16 nPos, - sal_uInt16 nIdx1 ); + sal_uInt16 nIdx1 + ); - void TriggerHelpPI(sal_uInt16 nIdx1, sal_uInt16 nIdx2); + virtual void TriggerHelpPI( sal_uInt16 nIdx1, sal_uInt16 nIdx2 ); virtual Bitmap GetStyleFamilyBitmap(SfxStyleFamily eFamily); @@ -592,10 +597,6 @@ public: // F"ur Docs, die zum Formatieren die Viewgr"o\se // ben"otigen virtual SfxObjectShell* GetObjectShell(); - //void SetBaseURL( const String& rURL ); - //const String& GetBaseURL() const; - //const String& GetBaseURLForSaving() const; - //void SetEmptyBaseURL(); virtual SfxFrame* GetSmartSelf( SfxFrame* pSelf, SfxMedium& rMedium ); @@ -639,7 +640,6 @@ public: ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage > GetStorage(); -//REMOVE void SetFileName( const ::rtl::OUString& ); SvGlobalName GetClassName() const; // comphelper::IEmbeddedHelper @@ -700,7 +700,7 @@ public: // ================================= - SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHighContrast ) const; + SAL_DLLPRIVATE ::boost::shared_ptr<GDIMetaFile> CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const; SAL_DLLPRIVATE sal_Bool IsOwnStorageFormat_Impl(const SfxMedium &) const; diff --git a/sfx2/inc/sfx2/styfitem.hxx b/sfx2/inc/sfx2/styfitem.hxx index 60a1ca1c675a..8903c34b1eee 100644 --- a/sfx2/inc/sfx2/styfitem.hxx +++ b/sfx2/inc/sfx2/styfitem.hxx @@ -105,7 +105,7 @@ public: @return <TRUE/> if an image list for the requested mode could be found in the given resource. */ - sal_Bool updateImages( const ResId& _rId, const BmpColorMode _eMode ); + sal_Bool updateImages( const ResId& _rId ); }; #endif diff --git a/sfx2/inc/sfx2/tbxctrl.hxx b/sfx2/inc/sfx2/tbxctrl.hxx index fd17f9563253..c7e704410337 100644 --- a/sfx2/inc/sfx2/tbxctrl.hxx +++ b/sfx2/inc/sfx2/tbxctrl.hxx @@ -56,7 +56,6 @@ class SfxUnoControllerItem; svt::ToolboxController* SAL_CALL SfxToolBoxControllerFactory( const ::com::sun::star::uno::Reference< ::com::sun::star::frame::XFrame >& rFrame, ToolBox* pToolbox, unsigned short nID, const ::rtl::OUString& aCommandURL ); -//typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( USHORT nId, ToolBox &rTbx, SfxBindings & ); typedef SfxToolBoxControl* (*SfxToolBoxControlCtor)( USHORT nSlotId, USHORT nId, ToolBox& rBox ); struct SfxTbxCtrlFactory @@ -367,7 +366,7 @@ protected: virtual void Select( BOOL ); virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); virtual SfxPopupWindow* CreatePopupWindow(); - DECL_LINK( Activate, Menu * ); // Needed to support high contrast images + DECL_LINK( Activate, Menu * ); private: String aLastURL; BOOL bBigImages; @@ -423,7 +422,7 @@ protected: using SfxToolBoxControl::Select; virtual void Select( BOOL ); virtual void StateChanged( USHORT nSID, SfxItemState eState, const SfxPoolItem* pState ); - DECL_LINK( Activate, Menu * ); // Needed to support high contrast images + DECL_LINK( Activate, Menu * ); public: SFX_DECL_TOOLBOX_CONTROL(); SfxAddonsToolBoxControl_Impl( USHORT nSlotId, USHORT nId, ToolBox& rBox ); diff --git a/sfx2/source/appl/imagemgr.cxx b/sfx2/source/appl/imagemgr.cxx index a67415517223..569c14c8154e 100644 --- a/sfx2/source/appl/imagemgr.cxx +++ b/sfx2/source/appl/imagemgr.cxx @@ -68,7 +68,11 @@ 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 ) +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() ) diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx index cf8bf4bbcfd3..3235aa3e5bf3 100644 --- a/sfx2/source/appl/module.cxx +++ b/sfx2/source/appl/module.cxx @@ -66,12 +66,10 @@ public: SfxChildWinFactArr_Impl* pFactArr; ImageList* pImgListSmall; ImageList* pImgListBig; - ImageList* pImgListHiSmall; - ImageList* pImgListHiBig; SfxModule_Impl(); ~SfxModule_Impl(); - ImageList* GetImageList( ResMgr*, BOOL, BOOL bHiContrast = FALSE ); + ImageList* GetImageList( ResMgr* pResMgr, BOOL bBig ); }; SfxModule_Impl::SfxModule_Impl() @@ -88,14 +86,11 @@ SfxModule_Impl::~SfxModule_Impl() delete pFactArr; delete pImgListSmall; delete pImgListBig; - delete pImgListHiSmall; - delete pImgListHiBig; } -ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig, BOOL bHiContrast ) +ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig ) { - ImageList*& rpList = bBig ? ( bHiContrast ? pImgListHiBig : pImgListBig ) : - ( bHiContrast ? pImgListHiSmall : pImgListSmall ); + ImageList*& rpList = bBig ? pImgListBig : pImgListSmall; if ( !rpList ) { ResId aResId( bBig ? ( RID_DEFAULTIMAGELIST_LC ) : ( RID_DEFAULTIMAGELIST_SC ), *pResMgr ); @@ -128,16 +123,7 @@ ResMgr* SfxModule::GetResMgr() } //==================================================================== -/* -SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP, - SfxObjectFactory* pFactoryP ) - : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L) -{ - Construct_Impl(); - if ( pFactoryP ) - pFactoryP->SetModule_Impl( this ); -} -*/ + SfxModule::SfxModule( ResMgr* pMgrP, BOOL bDummyP, SfxObjectFactory* pFactoryP, ... ) : pResMgr( pMgrP ), bDummy( bDummyP ), pImpl(0L) @@ -168,8 +154,6 @@ void SfxModule::Construct_Impl() pImpl->pFactArr=0; pImpl->pImgListSmall=0; pImpl->pImgListBig=0; - pImpl->pImgListHiSmall=0; - pImpl->pImgListHiBig=0; SetPool( &pApp->GetPool() ); } @@ -217,7 +201,6 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact) if (!pImpl->pFactArr) pImpl->pFactArr = new SfxChildWinFactArr_Impl; -//#ifdef DBG_UTIL for (USHORT nFactory=0; nFactory<pImpl->pFactArr->Count(); ++nFactory) { if (pFact->nId == (*pImpl->pFactArr)[nFactory]->nId) @@ -227,7 +210,6 @@ void SfxModule::RegisterChildWindow(SfxChildWinFactory *pFact) return; } } -//#endif pImpl->pFactArr->C40_INSERT( SfxChildWinFactory, pFact, pImpl->pFactArr->Count() ); @@ -352,12 +334,7 @@ SfxChildWinFactArr_Impl* SfxModule::GetChildWinFactories_Impl() const ImageList* SfxModule::GetImageList_Impl( BOOL bBig ) { - return pImpl->GetImageList( pResMgr, bBig, FALSE ); -} - -ImageList* SfxModule::GetImageList_Impl( BOOL bBig, BOOL bHiContrast ) -{ - return pImpl->GetImageList( pResMgr, bBig, bHiContrast ); + return pImpl->GetImageList( pResMgr, bBig ); } SfxTabPage* SfxModule::CreateTabPage( USHORT, Window*, const SfxItemSet& ) diff --git a/sfx2/source/dialog/styfitem.cxx b/sfx2/source/dialog/styfitem.cxx index fe625af90670..7c3bdbd08c2d 100644 --- a/sfx2/source/dialog/styfitem.cxx +++ b/sfx2/source/dialog/styfitem.cxx @@ -128,7 +128,7 @@ SfxStyleFamilies::SfxStyleFamilies( const ResId& rResId ) : FreeResource(); - updateImages( rResId, BMP_COLOR_NORMAL ); + updateImages( rResId ); } // ----------------------------------------------------------------------- @@ -149,7 +149,7 @@ SfxStyleFamilies::~SfxStyleFamilies() // ----------------------------------------------------------------------- -sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _eMode ) +sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId ) { sal_Bool bSuccess = sal_False; @@ -157,7 +157,7 @@ sal_Bool SfxStyleFamilies::updateImages( const ResId& _rId, const BmpColorMode _ ::svt::OLocalResourceAccess aLocalRes( _rId ); // check if the image list is present - ResId aImageListId( (sal_uInt16)_eMode + 1, *_rId.GetResMgr() ); + ResId aImageListId( (sal_uInt16) 1, *_rId.GetResMgr() ); aImageListId.SetRT( RSC_IMAGELIST ); if ( aLocalRes.IsAvailableRes( aImageListId ) ) diff --git a/sfx2/source/dialog/templdlg.cxx b/sfx2/source/dialog/templdlg.cxx index f62daaec8ec0..1b5851a3d24c 100644 --- a/sfx2/source/dialog/templdlg.cxx +++ b/sfx2/source/dialog/templdlg.cxx @@ -2375,8 +2375,7 @@ void SfxTemplateDialog_Impl::updateFamilyImages() return; // let the families collection update the images - sal_Bool bIsHighContrast = m_pFloat->GetSettings().GetStyleSettings().GetHighContrastMode(); - pStyleFamilies->updateImages( *m_pStyleFamiliesId, bIsHighContrast ? BMP_COLOR_HIGHCONTRAST : BMP_COLOR_NORMAL ); + pStyleFamilies->updateImages( *m_pStyleFamiliesId ); // and set the new images on our toolbox USHORT nLoop = pStyleFamilies->Count(); @@ -2421,14 +2420,6 @@ void SfxCommonTemplateDialog_Impl::InvalidateBindings() SfxTemplateDialog_Impl::~SfxTemplateDialog_Impl() { -/* - SfxImageManager* pImgMgr = pBindings->GetImageManager(); - if ( pImgMgr ) - { - pImgMgr->ReleaseToolBox( &m_aActionTbL ); - pImgMgr->ReleaseToolBox( &m_aActionTbR ); - } -*/ } //------------------------------------------------------------------------- @@ -2448,10 +2439,6 @@ void SfxTemplateDialog_Impl::Resize() FloatingWindow *pF = m_pFloat->GetFloatingWindow(); if ( pF ) { -// if(pF->IsZoomedIn() && m_bZoomIn==FALSE) -// pF->SetText(String(SfxResId( DLG_STYLE_DESIGNER ))); -// if(!pF->IsZoomedIn() && m_bZoomIn==TRUE && GetFamilyItem_Impl()) -// UpdateStyles_Impl(UPDATE_FAMILY); //Bereich wieder in Titel schreiben m_bZoomIn = pF->IsRollUp(); if ( m_bZoomIn ) return; @@ -2841,13 +2828,6 @@ void SfxTemplateCatalog_Impl::EnableItem( USHORT nMesId, BOOL bCheck ) aOkBtn.Enable( bCheck ); if ( nMesId > SFX_STYLE_FAMILY_PSEUDO || nMesId < SFX_STYLE_FAMILY_CHAR ) return; - -/* for(USHORT i=0;i<aFamIds.Count&&aFamIds[i]!=nMesId;i++); - if(i!=aFamIds.Count()) - aFamList.SelectEntry(aFamIds[i]); - else - DBG_ERROR("Entry nicht gefunden");*/ - } //------------------------------------------------------------------------- diff --git a/sfx2/source/doc/docvor.cxx b/sfx2/source/doc/docvor.cxx index 6af92930d155..00b3894edaca 100644 --- a/sfx2/source/doc/docvor.cxx +++ b/sfx2/source/doc/docvor.cxx @@ -1193,9 +1193,9 @@ void SfxOrganizeListBox_Impl::RequestingChilds( SvLBoxEntry* pEntry ) const bool bCanHaveChilds = aRef->CanHaveChilds(aPath[nDocLevel+1], aPath[nDocLevel+2]); - for(USHORT i = 0; i < nCount; ++i) + for(sal_uInt16 i = 0; i < nCount; ++i) { - bool bDeletable; + sal_Bool bDeletable; aRef->GetContent( aText, aClosedBmp, aOpenedBmp, bDeletable, i, aPath[nDocLevel+1]); @@ -1483,17 +1483,16 @@ const Image &SfxOrganizeListBox_Impl::GetOpenedBmp(USHORT nLevel) const */ { - BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode(); const Image* pRet = NULL; switch( nLevel ) { case 0: - pRet = bHC ? &aOpenedFolderBmpHC : &aOpenedFolderBmp; break; + pRet = &aOpenedFolderBmp; break; case 1: - pRet = bHC ? &aOpenedDocBmpHC : &aOpenedDocBmp; break; + pRet = &aOpenedDocBmp; break; default: - pRet = bHC ? &aClosedFolderBmpHC : &aClosedFolderBmp; break; + pRet = &aClosedFolderBmp; break; } return *pRet; diff --git a/sfx2/source/doc/new.cxx b/sfx2/source/doc/new.cxx index b03efa255725..a066a8db1203 100644 --- a/sfx2/source/doc/new.cxx +++ b/sfx2/source/doc/new.cxx @@ -174,8 +174,7 @@ SfxPreviewWin::SfxPreviewWin( SetHelpId( HID_PREVIEW_FRAME ); // adjust contrast mode initially - bool bUseContrast = UseHighContrastSetting(); - SetDrawMode( bUseContrast ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( OUTPUT_DRAWMODE_COLOR ); // #107818# This preview window is for document previews. Therefore // right-to-left mode should be off @@ -216,18 +215,10 @@ void SfxPreviewWin::DataChanged( const DataChangedEvent& rDCEvt ) if( (rDCEvt.GetType() == DATACHANGED_SETTINGS) && (rDCEvt.GetFlags() & SETTINGS_STYLE) ) { - // adjust contrast mode - bool bUseContrast = UseHighContrastSetting(); - SetDrawMode( bUseContrast ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR ); + SetDrawMode( OUTPUT_DRAWMODE_COLOR ); } } -bool SfxPreviewWin::UseHighContrastSetting() const -{ - return GetSettings().GetStyleSettings().GetHighContrastMode(); -} - - class SfxNewFileDialog_Impl { FixedText aRegionFt; diff --git a/sfx2/source/doc/objcont.cxx b/sfx2/source/doc/objcont.cxx index 8bd0c107c02c..dc0428659f9d 100644 --- a/sfx2/source/doc/objcont.cxx +++ b/sfx2/source/doc/objcont.cxx @@ -119,16 +119,14 @@ bool operator> (const util::DateTime& i_rLeft, const util::DateTime& i_rRight) return sal_False; } - ::boost::shared_ptr<GDIMetaFile> SfxObjectShell::GetPreviewMetaFile( sal_Bool bFullContent ) const { - return CreatePreviewMetaFile_Impl( bFullContent, sal_False ); + return CreatePreviewMetaFile_Impl( bFullContent ); } - ::boost::shared_ptr<GDIMetaFile> -SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHighContrast ) const +SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent ) const { // Nur wenn gerade nicht gedruckt wird, darf DoDraw aufgerufen // werden, sonst wird u.U. der Printer abgeschossen ! @@ -143,10 +141,6 @@ SfxObjectShell::CreatePreviewMetaFile_Impl( sal_Bool bFullContent, sal_Bool bHig VirtualDevice aDevice; aDevice.EnableOutput( FALSE ); - // adjust the output device if HC-metafile is requested - if ( bHighContrast ) - aDevice.SetDrawMode( aDevice.GetDrawMode() | DRAWMODE_SETTINGSLINE | DRAWMODE_SETTINGSFILL | DRAWMODE_SETTINGSTEXT | DRAWMODE_SETTINGSGRADIENT ); - MapMode aMode( ((SfxObjectShell*)this)->GetMapUnit() ); aDevice.SetMapMode( aMode ); pFile->SetPrefMapMode( aMode ); @@ -361,7 +355,7 @@ void SfxObjectShell::TriggerHelpPI(USHORT nIdx1, USHORT nIdx2) } } -bool SfxObjectShell::CanHaveChilds(sal_uInt16 nIdx1, sal_uInt16 nIdx2) +sal_Bool SfxObjectShell::CanHaveChilds(sal_uInt16 nIdx1, sal_uInt16 nIdx2) { switch(nIdx1) { @@ -378,8 +372,12 @@ bool SfxObjectShell::CanHaveChilds(sal_uInt16 nIdx1, sal_uInt16 nIdx2) //-------------------------------------------------------------------- void SfxObjectShell::GetContent(String &rText, - Bitmap &rClosedBitmap, Bitmap &rOpenedBitmap, - bool &bCanDel, sal_uInt16 i, sal_uInt16 nIdx) + Bitmap &rClosedBitmap, + Bitmap &rOpenedBitmap, + sal_Bool &bCanDel, + sal_uInt16 i, + sal_uInt16 nIdx +) { bCanDel=true; diff --git a/sfx2/source/doc/sfxbasemodel.cxx b/sfx2/source/doc/sfxbasemodel.cxx index 0b5a106664a2..951ef98cddbb 100644 --- a/sfx2/source/doc/sfxbasemodel.cxx +++ b/sfx2/source/doc/sfxbasemodel.cxx @@ -1996,7 +1996,7 @@ uno::Any SAL_CALL SfxBaseModel::getTransferData( const DATAFLAVOR& aFlavor ) if ( aFlavor.DataType == getCppuType( (const Sequence< sal_Int8 >*) 0 ) ) { ::boost::shared_ptr<GDIMetaFile> pMetaFile = - m_pData->m_pObjectShell->CreatePreviewMetaFile_Impl( sal_True, sal_True ); + m_pData->m_pObjectShell->CreatePreviewMetaFile_Impl( sal_True ); if ( pMetaFile ) { diff --git a/sfx2/source/inc/virtmenu.hxx b/sfx2/source/inc/virtmenu.hxx index b1810d13d556..2d3dd55be573 100644 --- a/sfx2/source/inc/virtmenu.hxx +++ b/sfx2/source/inc/virtmenu.hxx @@ -124,7 +124,6 @@ public: void SetResMgr(ResMgr* pMgr) {pResMgr = pMgr; } ResMgr* GetResMgr() { return pResMgr; } void SetHelpIds( ResMgr* ); - BOOL IsHiContrastMode() const; void UpdateImages(); DECL_LINK( Select, Menu * ); diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx index 601ec9fd4395..a61b12143424 100644 --- a/sfx2/source/menu/mnumgr.cxx +++ b/sfx2/source/menu/mnumgr.cxx @@ -228,11 +228,10 @@ PopupMenu* InsertThesaurusSubmenu_Impl( SfxBindings* pBindings, Menu* pSVMenu ) if (nNumSynonyms > 0) { SvtLinguConfig aCfg; - const bool bHC = Application::GetSettings().GetStyleSettings().GetHighContrastMode(); Image aImage; String sThesImplName( aHelper.GetThesImplName( aLocale ) ); - ::rtl::OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName, bHC ) ); + ::rtl::OUString aSynonymsImageUrl( aCfg.GetSynonymsContextImage( sThesImplName ) ); if (sThesImplName.Len() > 0 && aSynonymsImageUrl.getLength() > 0) aImage = Image( lcl_GetImageFromPngUrl( aSynonymsImageUrl ) ); diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx index 415cde10efdf..f13591687838 100644 --- a/sfx2/source/menu/virtmenu.cxx +++ b/sfx2/source/menu/virtmenu.cxx @@ -134,7 +134,8 @@ 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 bBigImage +) { Image aImage; @@ -194,7 +195,7 @@ SfxVirtualMenu::SfxVirtualMenu( USHORT nOwnId, SfxVirtualMenu* pOwnParent, Menu& rMenu, BOOL bWithHelp, SfxBindings &rBindings, BOOL bOLEServer, BOOL bRes, BOOL bIsAddonMenu ): pItems(0), - pImageControl(0), + pImageControl(0), pBindings(&rBindings), pResMgr(0), pAutoDeactivate(0), @@ -320,14 +321,6 @@ SfxVirtualMenu::~SfxVirtualMenu() DBG_ASSERT( !nLocks, "destroying active menu" ); } //-------------------------------------------------------------------- - -BOOL SfxVirtualMenu::IsHiContrastMode() const -{ - const StyleSettings& rSettings = Application::GetSettings().GetStyleSettings(); - return rSettings.GetHighContrastMode(); -} - -//-------------------------------------------------------------------- // internal: creates the virtual menu from the pSVMenu void SfxVirtualMenu::CreateFromSVMenu() diff --git a/sfx2/source/toolbox/imgmgr.cxx b/sfx2/source/toolbox/imgmgr.cxx index 6fbae6a6b99e..efad5bdf43fd 100644 --- a/sfx2/source/toolbox/imgmgr.cxx +++ b/sfx2/source/toolbox/imgmgr.cxx @@ -66,8 +66,8 @@ public: ImageList* m_pImageList[IMAGELIST_COUNT]; SfxModule* m_pModule; - ImageList* GetImageList( BOOL bBig, BOOL bHiContrast ); - Image GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ); + ImageList* GetImageList( BOOL bBig ); + Image GetImage( USHORT nId, BOOL bBig ); void SetSymbolsSize_Impl( sal_Int16 ); DECL_LINK( OptionsChanged_Impl, void* ); @@ -169,7 +169,7 @@ SfxImageManager_Impl::~SfxImageManager_Impl() //------------------------------------------------------------------------- -ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast ) +ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig ) { sal_Int32 nIndex = impl_convertBools( bBig ); if ( !m_pImageList[nIndex] ) @@ -177,7 +177,7 @@ ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast ) if ( !m_pModule ) m_pImageList[nIndex] = ::GetImageList( bBig ); else - m_pImageList[nIndex] = m_pModule->GetImageList_Impl( bBig, bHiContrast ); + m_pImageList[nIndex] = m_pModule->GetImageList_Impl( bBig ); } return m_pImageList[nIndex]; @@ -185,9 +185,9 @@ ImageList* SfxImageManager_Impl::GetImageList( BOOL bBig, BOOL bHiContrast ) //------------------------------------------------------------------------- -Image SfxImageManager_Impl::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) +Image SfxImageManager_Impl::GetImage( USHORT nId, BOOL bBig ) { - ImageList* pImageList = GetImageList( bBig, bHiContrast ); + ImageList* pImageList = GetImageList( bBig ); if ( pImageList ) return pImageList->GetImage( nId ); return Image(); @@ -210,14 +210,13 @@ void SfxImageManager_Impl::SetSymbolsSize_Impl( sal_Int16 nNewSymbolsSize ) if ( pInf->nFlags & SFX_TOOLBOX_CHANGESYMBOLSET ) { ToolBox *pBox = pInf->pToolBox; - BOOL bHiContrast = pBox->GetSettings().GetStyleSettings().GetHighContrastMode(); USHORT nCount = pBox->GetItemCount(); for ( USHORT nPos=0; nPos<nCount; nPos++ ) { USHORT nId = pBox->GetItemId( nPos ); if ( pBox->GetItemType(nPos) == TOOLBOXITEM_BUTTON ) { - pBox->SetItemImage( nId, GetImage( nId, bLarge, bHiContrast ) ); + pBox->SetItemImage( nId, GetImage( nId, bLarge ) ); SfxStateCache *pCache = SfxViewFrame::Current()->GetBindings().GetStateCache( nId ); if ( pCache ) pCache->SetCachedState(); @@ -296,9 +295,9 @@ SfxImageManager* SfxImageManager::GetImageManager( SfxModule* pModule ) //------------------------------------------------------------------------- -Image SfxImageManager::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const +Image SfxImageManager::GetImage( USHORT nId, BOOL bBig ) const { - ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast ); + ImageList* pImageList = pImp->GetImageList( bBig ); if ( pImageList && pImageList->HasImageAtPos( nId ) ) return pImageList->GetImage( nId ); return Image(); @@ -306,23 +305,23 @@ Image SfxImageManager::GetImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const //------------------------------------------------------------------------- -Image SfxImageManager::GetImage( USHORT nId, BOOL bHiContrast ) const +Image SfxImageManager::GetImage( USHORT nId ) const { BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge(); - return GetImage( nId, bLarge, bHiContrast ); + return GetImage( nId, bLarge ); } //------------------------------------------------------------------------- -Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) const +Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig ) const { sal_Bool bGlobal = ( pImp->m_pModule == 0 ); - ImageList* pImageList = pImp->GetImageList( bBig, bHiContrast ); + ImageList* pImageList = pImp->GetImageList( bBig ); if ( pImageList && pImageList->HasImageAtPos( nId ) ) return pImageList->GetImage( nId ); else if ( !bGlobal ) { - pImageList = ::GetImageManager( 0 )->GetImageList( bBig, bHiContrast ); + pImageList = ::GetImageManager( 0 )->GetImageList( bBig ); if ( pImageList ) return pImageList->GetImage( nId ); } @@ -331,10 +330,10 @@ Image SfxImageManager::SeekImage( USHORT nId, BOOL bBig, BOOL bHiContrast ) cons //------------------------------------------------------------------------- -Image SfxImageManager::SeekImage( USHORT nId, BOOL bHiContrast ) const +Image SfxImageManager::SeekImage( USHORT nId ) const { BOOL bLarge = SvtMiscOptions().AreCurrentSymbolsLarge(); - return SeekImage( nId, bLarge, bHiContrast ); + return SeekImage( nId, bLarge ); } //------------------------------------------------------------------------- @@ -368,16 +367,16 @@ void SfxImageManager::ReleaseToolBox( ToolBox *pBox ) //------------------------------------------------------------------------- -void SfxImageManager::SetImages( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge ) +void SfxImageManager::SetImages( ToolBox& rToolBox, BOOL bLarge ) { - SetImagesForceSize( rToolBox, bLarge, bHiContrast ); + SetImagesForceSize( rToolBox, bLarge ); } //------------------------------------------------------------------------- -void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, BOOL bLarge ) +void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bLarge ) { - ImageList* pImageList = pImp->GetImageList( bLarge, bHiContrast ); + ImageList* pImageList = pImp->GetImageList( bLarge ); USHORT nCount = rToolBox.GetItemCount(); for (USHORT n=0; n<nCount; n++) @@ -405,8 +404,7 @@ void SfxImageManager::SetImagesForceSize( ToolBox& rToolBox, BOOL bHiContrast, B void SfxImageManager::SetImages( ToolBox& rToolBox ) { BOOL bLarge = ( pImp->m_nSymbolsSize == SFX_SYMBOLS_SIZE_LARGE ); - BOOL bHiContrast = rToolBox.GetSettings().GetStyleSettings().GetHighContrastMode(); - SetImagesForceSize( rToolBox, bHiContrast, bLarge ); + SetImagesForceSize( rToolBox, bLarge ); } /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |