summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorKurt Zenker <kz@openoffice.org>2004-06-10 16:19:58 +0000
committerKurt Zenker <kz@openoffice.org>2004-06-10 16:19:58 +0000
commit626850e220b9649be967f3bee97cdf97fb2ff2c6 (patch)
tree6395db6665fdc281d96291fc3621ef351dde6b4b /sfx2
parentbc9cd01051f1df8249e2c0463afbf064d7ba2470 (diff)
INTEGRATION: CWS so8ea1acc01 (1.9.28); FILE MERGED
2004/05/14 06:10:10 mt 1.9.28.2: RESYNC: (1.9-1.10); FILE MERGED 2004/05/13 15:57:45 mt 1.9.28.1: #i21242# Black and White convertion for B&W HC mode
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/appl/module.cxx23
1 files changed, 21 insertions, 2 deletions
diff --git a/sfx2/source/appl/module.cxx b/sfx2/source/appl/module.cxx
index 495daef737d5..798ad99ff851 100644
--- a/sfx2/source/appl/module.cxx
+++ b/sfx2/source/appl/module.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: module.cxx,v $
*
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
- * last change: $Author: svesik $ $Date: 2004-04-21 13:04:26 $
+ * last change: $Author: kz $ $Date: 2004-06-10 17:19:58 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -126,6 +126,14 @@ SfxModule_Impl::~SfxModule_Impl()
ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig, BOOL bHiContrast )
{
+ // #i21242# MT: For B&W we need the HC Image and must transform.
+ // bHiContrast is TRUE for all dark backgrounds, but we need HC Images for HC White also,
+ // so we can't rely on bHighContrast.
+
+ BOOL bBlackAndWhite = Application::GetSettings().GetStyleSettings().IsHighContrastBlackAndWhite();
+ if ( bBlackAndWhite )
+ bHiContrast = TRUE;
+
ImageList*& rpList = bBig ? ( bHiContrast ? pImgListHiBig: pImgListBig ) :
( bHiContrast ? pImgListHiSmall : pImgListSmall );
if ( !rpList )
@@ -140,6 +148,17 @@ ImageList* SfxModule_Impl::GetImageList( ResMgr* pResMgr, BOOL bBig, BOOL bHiCon
rpList = new ImageList( aResId );
else
rpList = new ImageList();
+
+ if ( bBlackAndWhite )
+ {
+ // First invert the Image, because it's designed for black background, structures are bright
+ rpList->Invert();
+ // Now make monochrome...
+ ImageColorTransform eTrans = IMAGECOLORTRANSFORM_MONOCHROME_WHITE;
+ if ( Application::GetSettings().GetStyleSettings().GetFaceColor().GetColor() == COL_WHITE )
+ eTrans = IMAGECOLORTRANSFORM_MONOCHROME_BLACK;
+ *rpList = rpList->GetColorTransformedImageList( eTrans );
+ }
}
return rpList;