[Libreoffice-commits] .: sc/inc sc/source

Caolán McNamara caolan at kemper.freedesktop.org
Tue Nov 16 02:22:49 PST 2010


 sc/inc/global.hxx                |    6 ++----
 sc/inc/sc.hrc                    |   11 ++++++-----
 sc/source/core/data/global.cxx   |    8 +++-----
 sc/source/ui/inc/content.hxx     |    1 -
 sc/source/ui/inc/navipi.hxx      |    1 -
 sc/source/ui/inc/tptable.hxx     |    2 --
 sc/source/ui/navipi/content.cxx  |    1 -
 sc/source/ui/navipi/navipi.cxx   |   13 ++++---------
 sc/source/ui/navipi/navipi.hrc   |    3 ---
 sc/source/ui/pagedlg/pagedlg.hrc |    3 ---
 sc/source/ui/pagedlg/tptable.cxx |    7 +------
 sc/source/ui/unoobj/targuno.cxx  |    3 +--
 sc/source/ui/view/olinewin.cxx   |    2 +-
 13 files changed, 18 insertions(+), 43 deletions(-)

New commits:
commit 95a8cc9bccd583300f1b74b3868f283ec4675374
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Nov 16 10:22:33 2010 +0000

    remove logically redundant highcontrast code

diff --git a/sc/inc/global.hxx b/sc/inc/global.hxx
index 839c0c6..47128a8 100644
--- a/sc/inc/global.hxx
+++ b/sc/inc/global.hxx
@@ -549,7 +549,6 @@ class ScGlobal
     static SvxBrushItem*	pProtectedBrushItem;
 
     static ImageList*       pOutlineBitmaps;
-    static ImageList*       pOutlineBitmapsHC;
 
     static ScFunctionList*	pStarCalcFunctionList;
     static ScFunctionMgr*	pStarCalcFunctionMgr;
@@ -633,9 +632,8 @@ public:
     SC_DLLPUBLIC    static const String&	GetEmptyString();
     static const String& 	GetScDocString();
 
-    /** Returns the specified image list with outline symbols.
-        @param bHC  false = standard symbols; true = high contrast symbols. */
-    static ImageList*       GetOutlineSymbols( bool bHC );
+    /** Returns the specified image list with outline symbols. */
+    static ImageList*       GetOutlineSymbols();
 
     static bool             HasStarCalcFunctionList();
     static ScFunctionList*	GetStarCalcFunctionList();
diff --git a/sc/inc/sc.hrc b/sc/inc/sc.hrc
index c614e5e..ba21590 100644
--- a/sc/inc/sc.hrc
+++ b/sc/inc/sc.hrc
@@ -1178,8 +1178,9 @@
 #define RID_GRAPHIC_OBJECTBAR	(SC_RESOURCE_START+54)
 // free
 // free
-#define RID_IMAGELIST_H_NAVCONT	(SC_RESOURCE_START+57)
-#define RID_OUTLINEBITMAPS_H    (SC_RESOURCE_START+58)
+// free
+// free
+// free
 #define RID_MEDIA_OBJECTBAR		(SC_RESOURCE_START+60)
 #define RID_POPUP_MEDIA			(SC_RESOURCE_START+61)
 #define RID_FUNCTION_CATEGORIES	(SC_RESOURCE_START+62)
@@ -1442,9 +1443,9 @@
 #define RID_IMG_DROP_URL		(BMP_START + 2)
 #define RID_IMG_DROP_LINK		(BMP_START + 3)
 #define RID_IMG_DROP_COPY		(BMP_START + 4)
-#define RID_IMG_H_DROP_URL		(BMP_START + 5)
-#define RID_IMG_H_DROP_LINK		(BMP_START + 6)
-#define RID_IMG_H_DROP_COPY		(BMP_START + 7)
+// free
+// free
+// free
 #define RID_IMG_SELECT_CURRENT   (BMP_START + 8)
 #define RID_IMG_UNSELECT_CURRENT (BMP_START + 9)
 
diff --git a/sc/source/core/data/global.cxx b/sc/source/core/data/global.cxx
index 5540d9b..5ff0a14 100644
--- a/sc/source/core/data/global.cxx
+++ b/sc/source/core/data/global.cxx
@@ -125,7 +125,6 @@ SvxBrushItem*	ScGlobal::pEmbeddedBrushItem = NULL;
 SvxBrushItem*	ScGlobal::pProtectedBrushItem = NULL;
 
 ImageList*      ScGlobal::pOutlineBitmaps = NULL;
-ImageList*      ScGlobal::pOutlineBitmapsHC = NULL;
 
 ScFunctionList* ScGlobal::pStarCalcFunctionList = NULL;
 ScFunctionMgr*	ScGlobal::pStarCalcFunctionMgr	= NULL;
@@ -523,11 +522,11 @@ const String& ScGlobal::GetEmptyString()
     return *pEmptyString;
 }
 
-ImageList* ScGlobal::GetOutlineSymbols( bool bHC )
+ImageList* ScGlobal::GetOutlineSymbols()
 {
-    ImageList*& rpImageList = bHC ? pOutlineBitmapsHC : pOutlineBitmaps;
+    ImageList*& rpImageList = pOutlineBitmaps;
     if( !rpImageList )
-        rpImageList = new ImageList( ScResId( bHC ? RID_OUTLINEBITMAPS_H : RID_OUTLINEBITMAPS ) );
+        rpImageList = new ImageList( ScResId( RID_OUTLINEBITMAPS ) );
     return rpImageList;
 }
 
@@ -659,7 +658,6 @@ void ScGlobal::Clear()
     DELETEZ(pEmbeddedBrushItem);
     DELETEZ(pProtectedBrushItem);
     DELETEZ(pOutlineBitmaps);
-    DELETEZ(pOutlineBitmapsHC);
 //	DELETEZ(pAnchorBitmap);
 //	DELETEZ(pGrayAnchorBitmap);
     DELETEZ(pEnglishFormatter);
diff --git a/sc/source/ui/inc/content.hxx b/sc/source/ui/inc/content.hxx
index 15ef650..2c74943 100644
--- a/sc/source/ui/inc/content.hxx
+++ b/sc/source/ui/inc/content.hxx
@@ -61,7 +61,6 @@ class ScContentTree : public SvTreeListBox
 {
     ScNavigatorDlg*		pParentWindow;
     ImageList			aEntryImages;
-    ImageList			aHCEntryImages;
     SvLBoxEntry*		pRootNodes[SC_CONTENT_COUNT];
     USHORT				nRootType;			// als Root eingestellt
     String				aManualDoc;			// im Navigator umgeschaltet (Title)
diff --git a/sc/source/ui/inc/navipi.hxx b/sc/source/ui/inc/navipi.hxx
index 4eaad27..d21607f 100644
--- a/sc/source/ui/inc/navipi.hxx
+++ b/sc/source/ui/inc/navipi.hxx
@@ -244,7 +244,6 @@ private:
     SfxBindings&		rBindings;		// must be first member
 
     ImageList			aCmdImageList;	// must be before aTbxCmd
-    ImageList           aCmdImageListH;
     FixedInfo			aFtCol;
     ColumnEdit			aEdCol;
     FixedInfo			aFtRow;
diff --git a/sc/source/ui/inc/tptable.hxx b/sc/source/ui/inc/tptable.hxx
index d891050..8f092ec 100644
--- a/sc/source/ui/inc/tptable.hxx
+++ b/sc/source/ui/inc/tptable.hxx
@@ -78,8 +78,6 @@ private:
     FixedImage      aBmpPageDir;
     Image           aImgLeftRight;
     Image           aImgTopDown;
-    Image           aImgLeftRightHC;
-    Image           aImgTopDownHC;
     CheckBox		aBtnPageNo;
     NumericField	aEdPageNo;
 
diff --git a/sc/source/ui/navipi/content.cxx b/sc/source/ui/navipi/content.cxx
index 41e5f78..d77a50c 100644
--- a/sc/source/ui/navipi/content.cxx
+++ b/sc/source/ui/navipi/content.cxx
@@ -128,7 +128,6 @@ ScDocShell* ScContentTree::GetManualOrCurrent()
 ScContentTree::ScContentTree( Window* pParent, const ResId& rResId ) :
     SvTreeListBox	( pParent, rResId ),
     aEntryImages	( ScResId( RID_IMAGELIST_NAVCONT ) ),
-    aHCEntryImages	( ScResId( RID_IMAGELIST_H_NAVCONT ) ),
     nRootType		( SC_CONTENT_ROOT ),
     bHiddenDoc		( FALSE ),
     pHiddenDocument	( NULL )
diff --git a/sc/source/ui/navipi/navipi.cxx b/sc/source/ui/navipi/navipi.cxx
index 06b0ece..355e602 100644
--- a/sc/source/ui/navipi/navipi.cxx
+++ b/sc/source/ui/navipi/navipi.cxx
@@ -515,23 +515,19 @@ void CommandToolBox::UpdateButtons()
         CheckItem( IID_CHANGEROOT, bRootSet );
     }
 
-    BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
-
     USHORT nImageId = 0;
     switch ( rDlg.nDropMode )
     {
-        case SC_DROPMODE_URL:	nImageId = bHC ? RID_IMG_H_DROP_URL  : RID_IMG_DROP_URL;  break;
-        case SC_DROPMODE_LINK:	nImageId = bHC ? RID_IMG_H_DROP_LINK : RID_IMG_DROP_LINK; break;
-        case SC_DROPMODE_COPY:	nImageId = bHC ? RID_IMG_H_DROP_COPY : RID_IMG_DROP_COPY; break;
+        case SC_DROPMODE_URL:	nImageId = RID_IMG_DROP_URL;  break;
+        case SC_DROPMODE_LINK:	nImageId = RID_IMG_DROP_LINK; break;
+        case SC_DROPMODE_COPY:	nImageId = RID_IMG_DROP_COPY; break;
     }
     SetItemImage( IID_DROPMODE, Image(ScResId(nImageId)) );
 }
 
 void CommandToolBox::InitImageList()
 {
-    BOOL bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
-
-    ImageList& rImgLst = bHC ? rDlg.aCmdImageListH : rDlg.aCmdImageList;
+    ImageList& rImgLst = rDlg.aCmdImageList;
 
     USHORT nCount = GetItemCount();
     for (USHORT i = 0; i < nCount; i++)
@@ -660,7 +656,6 @@ ScNavigatorDlg::ScNavigatorDlg( SfxBindings* pB, SfxChildWindowContext* pCW, Win
         Window( pParent, ScResId(RID_SCDLG_NAVIGATOR) ),
         rBindings	( *pB ),								// is used in CommandToolBox ctor
         aCmdImageList( ScResId( IL_CMD ) ),
-        aCmdImageListH( ScResId( ILH_CMD ) ),
         aFtCol		( this, ScResId( FT_COL ) ),
         aEdCol		( this, ScResId( ED_COL ) ),
         aFtRow		( this, ScResId( FT_ROW ) ),
diff --git a/sc/source/ui/navipi/navipi.hrc b/sc/source/ui/navipi/navipi.hrc
index 2ae1121..9376847 100644
--- a/sc/source/ui/navipi/navipi.hrc
+++ b/sc/source/ui/navipi/navipi.hrc
@@ -45,9 +45,6 @@
 #define STR_QHLP_SCEN_LISTBOX	15
 #define STR_QHLP_SCEN_COMMENT	16
 #define IL_CMD                  17
-#define ILH_CMD                 18
-
-
 
 #define IID_AREAS		1
 #define IID_DBAREAS		2
diff --git a/sc/source/ui/pagedlg/pagedlg.hrc b/sc/source/ui/pagedlg/pagedlg.hrc
index 6a995b1..866c786 100644
--- a/sc/source/ui/pagedlg/pagedlg.hrc
+++ b/sc/source/ui/pagedlg/pagedlg.hrc
@@ -71,9 +71,6 @@
 #define FT_SCALEPAGEHEIGHT  53
 #define FT_SCALEPAGENUM     54
 
-#define IMG_LEFTRIGHT_H     41
-#define IMG_TOPDOWN_H       42
-
 // List box entries "Scaling mode"
 #define SC_TPTABLE_SCALE_PERCENT    0
 #define SC_TPTABLE_SCALE_TO         1
diff --git a/sc/source/ui/pagedlg/tptable.cxx b/sc/source/ui/pagedlg/tptable.cxx
index 2590601..a3807f3 100644
--- a/sc/source/ui/pagedlg/tptable.cxx
+++ b/sc/source/ui/pagedlg/tptable.cxx
@@ -128,8 +128,6 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
         aBmpPageDir 		( this, ScResId( BMP_PAGEDIR ) ),
         aImgLeftRight		( ScResId( IMG_LEFTRIGHT ) ),
         aImgTopDown 		( ScResId( IMG_TOPDOWN ) ),
-        aImgLeftRightHC     ( ScResId( IMG_LEFTRIGHT_H ) ),
-        aImgTopDownHC       ( ScResId( IMG_TOPDOWN_H ) ),
         aBtnPageNo			( this, ScResId( BTN_PAGENO ) ),
         aEdPageNo			( this, ScResId( ED_PAGENO ) ),
         aFlPrint            ( this, ScResId( FL_PRINT ) ),
@@ -169,11 +167,8 @@ ScTablePage::ScTablePage( Window* pParent, const SfxItemSet& rCoreAttrs ) :
 
 void ScTablePage::ShowImage()
 {
-    bool bHC = GetSettings().GetStyleSettings().GetHighContrastMode();
     bool bLeftRight = aBtnLeftRight.IsChecked();
-    aBmpPageDir.SetImage( bHC ?
-        (bLeftRight ? aImgLeftRightHC : aImgTopDownHC) :
-        (bLeftRight ? aImgLeftRight : aImgTopDown) );
+    aBmpPageDir.SetImage( (bLeftRight ? aImgLeftRight : aImgTopDown) );
 }
 
 // -----------------------------------------------------------------------
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index 41da7cc..69c3c0a 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -243,8 +243,7 @@ void ScLinkTargetTypeObj::SetLinkTargetBitmap( uno::Any& rRet, sal_uInt16 nType
     }
     if (nImgId)
     {
-        BOOL bHighContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
-        ImageList aEntryImages( ScResId( bHighContrast ? RID_IMAGELIST_H_NAVCONT : RID_IMAGELIST_NAVCONT ) );
+        ImageList aEntryImages( ScResId( RID_IMAGELIST_NAVCONT ) );
         const Image& rImage = aEntryImages.GetImage( nImgId );
         rRet <<= uno::Reference< awt::XBitmap > (VCLUnoHelper::CreateBitmap( rImage.GetBitmapEx() ));
     }
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index c0baa7a..998b4aa 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -165,7 +165,7 @@ void ScOutlineWindow::InitSettings()
     const StyleSettings& rStyleSettings = GetSettings().GetStyleSettings();
     SetBackground( rStyleSettings.GetFaceColor() );
     maLineColor = rStyleSettings.GetButtonTextColor();
-    mpSymbols = ScGlobal::GetOutlineSymbols( rStyleSettings.GetHighContrastMode() );
+    mpSymbols = ScGlobal::GetOutlineSymbols();
     Invalidate();
 }
 


More information about the Libreoffice-commits mailing list