diff options
author | Caolán McNamara <caolanm@redhat.com> | 2010-11-16 16:16:52 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2010-11-16 16:16:52 +0000 |
commit | a439ad77ff3bbeecd750e007d180c8f43c349f66 (patch) | |
tree | babeb1742134a60b505ff94694a34f4124967716 | |
parent | e9f2af555241da3cd6979660de5d21a077089d16 (diff) |
get this to build again
-rw-r--r-- | starmath/inc/dialog.hxx | 8 | ||||
-rw-r--r-- | starmath/inc/toolbox.hxx | 3 | ||||
-rw-r--r-- | starmath/source/dialog.cxx | 25 | ||||
-rw-r--r-- | starmath/source/smres.src | 103 | ||||
-rw-r--r-- | starmath/source/toolbox.cxx | 22 |
5 files changed, 10 insertions, 151 deletions
diff --git a/starmath/inc/dialog.hxx b/starmath/inc/dialog.hxx index 6f6b2723bb03..64cb550d787b 100644 --- a/starmath/inc/dialog.hxx +++ b/starmath/inc/dialog.hxx @@ -202,11 +202,9 @@ class SmCategoryDesc : public Resource XubString Name; XubString *Strings[4]; Bitmap *Graphics[4]; /* regular bitmaps */ - Bitmap *GraphicsH[4]; /* high contrast bitmaps */ USHORT Minimum[4]; USHORT Maximum[4]; USHORT Value[4]; - bool bIsHighContrast; public: SmCategoryDesc(const ResId &rResId, USHORT nCategoryIdx); @@ -219,10 +217,9 @@ public: USHORT GetValue(USHORT Index) const { return Value[Index]; } void SetValue(USHORT Index, USHORT nVal) { Value[Index] = nVal;} - void SetHighContrast( bool bVal ) { bIsHighContrast = bVal; } const Bitmap * GetGraphic(USHORT Index) const { - return bIsHighContrast ? GraphicsH[Index] : Graphics[Index]; + return Graphics[Index]; } }; @@ -258,8 +255,6 @@ class SmDistanceDialog : public ModalDialog void SetHelpId(MetricField &rField, ULONG nHelpId); void SetCategory(USHORT Category); - void ApplyImages(); - public: SmDistanceDialog(Window *pParent, bool bFreeRes = true); ~SmDistanceDialog(); @@ -437,7 +432,6 @@ class SmSymDefineDialog : public ModalDialog PushButton aDeleteBtn; FixedImage aRightArrow; Image aRigthArrow_Im; - Image aRigthArrow_Im_HC; // hi-contrast version SmSymbolManager aSymbolMgrCopy, &rSymbolMgr; diff --git a/starmath/inc/toolbox.hxx b/starmath/inc/toolbox.hxx index aa2831ddc2b0..516a265731a4 100644 --- a/starmath/inc/toolbox.hxx +++ b/starmath/inc/toolbox.hxx @@ -48,7 +48,6 @@ protected: ToolBox *pToolBoxCmd; ToolBox *vToolBoxCategories[NUM_TBX_CATEGORIES]; ImageList *aImageLists [NUM_TBX_CATEGORIES + 1]; /* regular */ - ImageList *aImageListsH[NUM_TBX_CATEGORIES + 1]; /* high contrast */ USHORT nActiveCategoryRID; virtual BOOL Close(); @@ -60,7 +59,7 @@ protected: DECL_LINK( CmdSelectHdl, ToolBox* ); SmViewShell * GetView(); - const ImageList * GetImageList( USHORT nResId, bool bHighContrast ); + const ImageList * GetImageList( USHORT nResId ); public: SmToolBoxWindow(SfxBindings *pBindings, diff --git a/starmath/source/dialog.cxx b/starmath/source/dialog.cxx index 22f66fe78798..ddddc7fb1664 100644 --- a/starmath/source/dialog.cxx +++ b/starmath/source/dialog.cxx @@ -654,8 +654,7 @@ static const FieldMinMax pMinMaxData[10][4] = }; SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) : - Resource(rResId), - bIsHighContrast(false) + Resource(rResId) { if (IsAvailableRes(ResId(1,*rResId.GetResMgr()).SetRT(RSC_STRING))) { @@ -670,13 +669,11 @@ SmCategoryDesc::SmCategoryDesc(const ResId& rResId, USHORT nCategoryIdx) : { Strings [i] = new XubString(ResId(nI2,*rResId.GetResMgr())); Graphics [i] = new Bitmap(ResId(10*nI2,*rResId.GetResMgr())); - GraphicsH[i] = new Bitmap(ResId(10*nI2+1,*rResId.GetResMgr())); } else { Strings [i] = 0; Graphics [i] = 0; - GraphicsH[i] = 0; } } @@ -698,7 +695,6 @@ SmCategoryDesc::~SmCategoryDesc() { delete Strings [i]; delete Graphics [i]; - delete GraphicsH[i]; } } @@ -937,8 +933,6 @@ SmDistanceDialog::SmDistanceDialog(Window *pParent, bool bFreeRes) if (bFreeRes) FreeResource(); - ApplyImages(); - // preview like controls should have a 2D look aBitmap.SetBorderStyle( WINDOW_BORDER_MONO ); @@ -960,22 +954,8 @@ SmDistanceDialog::~SmDistanceDialog() DELETEZ(Categories[i]); } -void SmDistanceDialog::ApplyImages() -{ - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - for (int i = 0; i < NOCATEGORIES; ++i) - { - SmCategoryDesc *pCat = Categories[i]; - if (pCat) - pCat->SetHighContrast( bHighContrast ); - } -} - void SmDistanceDialog::DataChanged( const DataChangedEvent &rEvt ) { - if ( (rEvt.GetType() == DATACHANGED_SETTINGS) && (rEvt.GetFlags() & SETTINGS_STYLE) ) - ApplyImages(); - ModalDialog::DataChanged( rEvt ); } @@ -2059,7 +2039,6 @@ SmSymDefineDialog::SmSymDefineDialog(Window * pParent, aDeleteBtn (this, SmResId(3)), aRightArrow (this, SmResId(1)), aRigthArrow_Im (SmResId(1)), - aRigthArrow_Im_HC (SmResId(2)), // hi-contrast version rSymbolMgr (rMgr), pSubsetMap (NULL), pFontList (NULL) @@ -2136,7 +2115,7 @@ void SmSymDefineDialog::InitColor_Impl() aSymbolDisplay .SetBackground( aWall ); aSymbolDisplay .SetTextColor( aTxtColor ); - const Image &rArrowRight = bHighContrast ? aRigthArrow_Im_HC : aRigthArrow_Im; + const Image &rArrowRight = aRigthArrow_Im; aRightArrow.SetImage( rArrowRight ); } diff --git a/starmath/source/smres.src b/starmath/source/smres.src index da8ef0106e07..3e0dea4fa380 100644 --- a/starmath/source/smres.src +++ b/starmath/source/smres.src @@ -33,8 +33,6 @@ #include "toolbox.hrc" #define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; } -#define IMAGE_STDBTN_COLOR_HC IMAGE_STDBTN_COLOR - #define MN_SUB_TOOLBAR 32 #define WORKARROUND_1 1 #define WORKARROUND_3 3 @@ -567,10 +565,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist11.bmp" ; }; - Bitmap 21 - { - File = "dist11_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Line spacing"; @@ -579,10 +573,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist12.bmp" ; }; - Bitmap 31 - { - File = "dist12_h.bmp" ; - }; String 4 { Text [ en-US ] = "~Root spacing"; @@ -591,10 +581,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist13.bmp" ; }; - Bitmap 41 - { - File = "dist13_h.bmp" ; - }; }; Resource 2 { @@ -610,10 +596,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist21.bmp" ; }; - Bitmap 21 - { - File = "dist21_h.bmp" ; - }; String 3 { Text [ en-US ] = "S~ubscript"; @@ -622,10 +604,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist22.bmp" ; }; - Bitmap 31 - { - File = "dist22_h.bmp" ; - }; }; Resource 3 { @@ -641,10 +619,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist31.bmp" ; }; - Bitmap 21 - { - File = "dist31_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Denominator"; @@ -653,10 +627,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist32.bmp" ; }; - Bitmap 31 - { - File = "dist32_h.bmp" ; - }; }; Resource 4 { @@ -672,10 +642,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist41.bmp" ; }; - Bitmap 21 - { - File = "dist41_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Weight"; @@ -684,10 +650,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist42.bmp" ; }; - Bitmap 31 - { - File = "dist42_h.bmp" ; - }; }; Resource 5 { @@ -703,10 +665,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist51.bmp" ; }; - Bitmap 21 - { - File = "dist51_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Lower limit"; @@ -715,10 +673,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist52.bmp" ; }; - Bitmap 31 - { - File = "dist52_h.bmp" ; - }; }; Resource 6 { @@ -734,10 +688,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist61.bmp" ; }; - Bitmap 21 - { - File = "dist61_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Spacing"; @@ -746,10 +696,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist62.bmp" ; }; - Bitmap 31 - { - File = "dist62_h.bmp" ; - }; String 5 { Text [ en-US ] = "~Excess size"; @@ -758,10 +704,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist61.bmp" ; }; - Bitmap 51 - { - File = "dist61_h.bmp" ; - }; }; Resource 7 { @@ -777,10 +719,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist71.bmp" ; }; - Bitmap 21 - { - File = "dist71_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Column spacing"; @@ -789,10 +727,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist72.bmp" ; }; - Bitmap 31 - { - File = "dist72_h.bmp" ; - }; }; Resource 8 { @@ -808,10 +742,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist81.bmp" ; }; - Bitmap 21 - { - File = "dist81_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Minimum spacing"; @@ -820,10 +750,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist82.bmp" ; }; - Bitmap 31 - { - File = "dist82_h.bmp" ; - }; }; Resource 9 { @@ -839,10 +765,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist91.bmp" ; }; - Bitmap 21 - { - File = "dist91_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Spacing"; @@ -851,10 +773,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist92.bmp" ; }; - Bitmap 31 - { - File = "dist92_h.bmp" ; - }; }; Resource 10 { @@ -870,10 +788,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist101.bmp" ; }; - Bitmap 21 - { - File = "dist101_h.bmp" ; - }; String 3 { Text [ en-US ] = "~Right"; @@ -882,10 +796,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist102.bmp" ; }; - Bitmap 31 - { - File = "dist102_h.bmp" ; - }; String 4 { Text [ en-US ] = "~Top"; @@ -894,10 +804,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist103.bmp" ; }; - Bitmap 41 - { - File = "dist103_h.bmp" ; - }; String 5 { Text [ en-US ] = "~Bottom"; @@ -906,10 +812,6 @@ ModalDialog RID_DISTANCEDIALOG { File = "dist104.bmp" ; }; - Bitmap 51 - { - File = "dist104_h.bmp" ; - }; }; }; @@ -1277,11 +1179,6 @@ ModalDialog RID_SYMDEFINEDIALOG ImageBitmap = Bitmap { File = "ar_right.bmp" ; }; MaskColor = IMAGE_STDBTN_COLOR ; }; - Image 2 - { - ImageBitmap = Bitmap { File = "ar_right_h.bmp" ; }; - MaskColor = IMAGE_STDBTN_COLOR ; - }; FixedImage BMP_ARROW_RIGHT { Pos = MAP_APPFONT ( 252 , 142 ) ; diff --git a/starmath/source/toolbox.cxx b/starmath/source/toolbox.cxx index e9588bb4bc66..214fd74c92f2 100644 --- a/starmath/source/toolbox.cxx +++ b/starmath/source/toolbox.cxx @@ -46,7 +46,7 @@ //////////////////////////////////////////////////////////// -static USHORT GetImageListRID( USHORT nCategoryRID, bool bHighContrast ) +static USHORT GetImageListRID( USHORT nCategoryRID ) { USHORT nRes = 0xFFFF; switch (nCategoryRID) @@ -63,8 +63,6 @@ static USHORT GetImageListRID( USHORT nCategoryRID, bool bHighContrast ) default : DBG_ERROR( "unkown category" ); } - if (nRes != 0xFFFF && bHighContrast) - ++nRes; //! the resource ID for the high contrast image list is just +1 compared to the regular ones return nRes; } @@ -145,10 +143,7 @@ SmToolBoxWindow::SmToolBoxWindow(SfxBindings *pTmpBindings, pToolBoxCmd = vToolBoxCategories[0]; for (i = 0; i <= NUM_TBX_CATEGORIES; ++i) - { aImageLists [i] = 0; - aImageListsH[i] = 0; - } FreeResource(); @@ -165,10 +160,7 @@ SmToolBoxWindow::~SmToolBoxWindow() delete pBox; } for (i = 0; i < NUM_TBX_CATEGORIES + 1; ++i) - { delete aImageLists[i]; - delete aImageListsH[i]; - } } @@ -179,7 +171,7 @@ SmViewShell * SmToolBoxWindow::GetView() } -const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, bool bHighContrast ) +const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId ) { // creates the image list via its resource id and stores that // list for later use in the respective array. @@ -194,7 +186,7 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, bool bHighContra if (nIndex >= 0) { - ImageList **pImgList = bHighContrast ? aImageListsH : aImageLists; + ImageList **pImgList = aImageLists; if (!pImgList[ nIndex ]) pImgList[ nIndex ] = new ImageList( SmResId(nResId) ); pIL = pImgList[ nIndex ]; @@ -207,18 +199,16 @@ const ImageList * SmToolBoxWindow::GetImageList( USHORT nResId, bool bHighContra void SmToolBoxWindow::ApplyImageLists( USHORT nCategoryRID ) { - bool bHighContrast = GetSettings().GetStyleSettings().GetHighContrastMode(); - // set image list for toolbox 'catalog' - const ImageList *pImageList = GetImageList( RID_IL_CATALOG, bHighContrast ); + const ImageList *pImageList = GetImageList( RID_IL_CATALOG ); OSL_ENSURE( pImageList, "image list missing" ); if (pImageList) aToolBoxCat.SetImageList( *pImageList ); // set image list for active (visible) category of 'catalog' sal_Int16 nIdx = GetToolBoxCategoriesIndex( nCategoryRID ); - USHORT nResId = GetImageListRID( nCategoryRID, bHighContrast ); - pImageList = GetImageList( nResId, bHighContrast ); + USHORT nResId = GetImageListRID( nCategoryRID ); + pImageList = GetImageList( nResId ); OSL_ENSURE( pImageList && nIdx >= 0, "image list or index missing" ); if (pImageList && nIdx >= 0) vToolBoxCategories[ nIdx ]->SetImageList( *pImageList ); |