summaryrefslogtreecommitdiff
path: root/starmath/source/node.cxx
diff options
context:
space:
mode:
authorThomas Lange <tl@openoffice.org>2002-12-12 14:40:33 +0000
committerThomas Lange <tl@openoffice.org>2002-12-12 14:40:33 +0000
commitaa6d96a6251b0a59d1777d291b3fa134e13bdb98 (patch)
treee57350b8703de96667f5e1a8e210b00860440fc1 /starmath/source/node.cxx
parent4b1719c95ed0256cc504e562a78619f0550d8f58 (diff)
#105984# use ColorConfig and FONTCOLOR in Math
Diffstat (limited to 'starmath/source/node.cxx')
-rw-r--r--starmath/source/node.cxx20
1 files changed, 9 insertions, 11 deletions
diff --git a/starmath/source/node.cxx b/starmath/source/node.cxx
index 29013a7eb817..517ceb61d7e1 100644
--- a/starmath/source/node.cxx
+++ b/starmath/source/node.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: node.cxx,v $
*
- * $Revision: 1.25 $
+ * $Revision: 1.26 $
*
- * last change: $Author: tl $ $Date: 2002-11-06 12:38:53 $
+ * last change: $Author: tl $ $Date: 2002-12-12 15:40:33 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -176,15 +176,13 @@ Color SmTmpDevice::Impl_GetColor( const Color& rColor )
if (OUTDEV_WINDOW == rOutDev.GetOutDevType())
aBgCol = ((Window &) rOutDev).GetDisplayBackground().GetColor();
- nNewCol = COL_BLACK;
- if (aBgCol.IsDark())
- {
- SmViewShell *pViewSh = SmGetActiveView();
- const StyleSettings& rS = pViewSh ?
- pViewSh->GetGraphicWindow().GetSettings().GetStyleSettings() :
- Application::GetSettings().GetStyleSettings();
- nNewCol = rS.GetWindowTextColor().GetColor();
- }
+ nNewCol = SM_MOD1()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor;
+
+ Color aTmpColor( nNewCol );
+ if (aBgCol.IsDark() && aTmpColor.IsDark())
+ nNewCol = COL_WHITE;
+ else if (aBgCol.IsBright() && aTmpColor.IsBright())
+ nNewCol = COL_BLACK;
}
}
return Color( nNewCol );