diff options
author | Niklas Nebel <nn@openoffice.org> | 2002-12-10 16:25:00 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2002-12-10 16:25:00 +0000 |
commit | 92b5d9c8f647c8b2d31a25fd356382a56155921f (patch) | |
tree | d69ffb4ecf56188f281430e87572da293d5835eb /sc/source/ui | |
parent | 4e1a6668ea36e4d1114385f75732e1629d5662d5 (diff) |
#105984# use text color from configuration instead of StyleSettings
Diffstat (limited to 'sc/source/ui')
-rw-r--r-- | sc/source/ui/view/output.cxx | 16 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 18 | ||||
-rw-r--r-- | sc/source/ui/view/preview.cxx | 6 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 10 |
4 files changed, 28 insertions, 22 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index 558b7fb87062..bf64d653dfc7 100644 --- a/sc/source/ui/view/output.cxx +++ b/sc/source/ui/view/output.cxx @@ -2,9 +2,9 @@ * * $RCSfile: output.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: nn $ $Date: 2002-12-04 18:55:37 $ + * last change: $Author: nn $ $Date: 2002-12-10 17:24:58 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -929,7 +929,7 @@ void ScOutputData::DrawShadow() BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) - aAutoTextColor = rStyleSettings.GetWindowTextColor(); + aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); long nPosY = nScrY; for (USHORT nArrY=1; nArrY+1<nArrCount; nArrY++) @@ -1031,7 +1031,7 @@ void ScOutputData::DrawExtraShadow(BOOL bLeft, BOOL bTop, BOOL bRight, BOOL bBot BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) - aAutoTextColor = rStyleSettings.GetWindowTextColor(); + aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); long nPosY = nScrY - pRowInfo[0].nHeight; for (USHORT nArrY=0; nArrY<nArrCount; nArrY++) @@ -1350,7 +1350,7 @@ void ScOutputData::DrawFrame() BOOL bCellContrast = bUseStyleColor && rStyleSettings.GetHighContrastMode(); Color aAutoTextColor; if ( bCellContrast ) - aAutoTextColor = rStyleSettings.GetWindowTextColor(); + aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); pDev->SetLineColor(); pDev->SetFillColor( aOldCol ); @@ -1895,7 +1895,7 @@ void ScOutputData::DrawRotatedFrame() const Color* pForceColor = NULL; if ( bCellContrast ) { - aAutoTextColor = rStyleSettings.GetWindowTextColor(); + aAutoTextColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); pForceColor = &aAutoTextColor; } @@ -2613,7 +2613,7 @@ void ScOutputData::DrawNoteMarks() const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); if ( bUseStyleColor && rStyleSettings.GetHighContrastMode() ) - pDev->SetFillColor( rStyleSettings.GetWindowTextColor() ); + pDev->SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); else pDev->SetFillColor(COL_LIGHTRED); @@ -2714,7 +2714,7 @@ void ScOutputData::DrawClipMarks() // use DrawMode to change the arrow's outline color pDev->SetDrawMode( nOldDrawMode | DRAWMODE_SETTINGSLINE ); // use text color also for the fill color - aArrowFillCol = rStyleSettings.GetWindowTextColor(); + aArrowFillCol.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); } Rectangle aCellRect; diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 1ebfc03f7470..cba64cb1ef11 100644 --- a/sc/source/ui/view/output2.cxx +++ b/sc/source/ui/view/output2.cxx @@ -2,9 +2,9 @@ * * $RCSfile: output2.cxx,v $ * - * $Revision: 1.33 $ + * $Revision: 1.34 $ * - * last change: $Author: nn $ $Date: 2002-12-04 18:55:37 $ + * last change: $Author: nn $ $Date: 2002-12-10 17:24:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -142,6 +142,7 @@ class ScDrawStringsVars BOOL bCellContrast; Color aBackConfigColor; // used for ScPatternAttr::GetFont calls + Color aTextConfigColor; public: ScDrawStringsVars(ScOutputData* pData, BOOL bPTL); @@ -203,7 +204,10 @@ ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, BOOL bPTL) : // #105733# SvtAccessibilityOptions::GetIsForBorders is no longer used (always assumed TRUE) bCellContrast = pOutput->bUseStyleColor && Application::GetSettings().GetStyleSettings().GetHighContrastMode(); - aBackConfigColor.SetColor( pScMod->GetColorConfig().GetColorValue(svx::DOCCOLOR).nColor ); + + const svx::ColorConfig& rColorConfig = pScMod->GetColorConfig(); + aBackConfigColor.SetColor( rColorConfig.GetColorValue(svx::DOCCOLOR).nColor ); + aTextConfigColor.SetColor( rColorConfig.GetColorValue(svx::FONTCOLOR).nColor ); } ScDrawStringsVars::~ScDrawStringsVars() @@ -236,9 +240,11 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* eColorMode = SC_AUTOCOL_PRINT; if ( bPixelToLogic ) - pPattern->GetFont( aFont, eColorMode, pFmtDevice, NULL, pCondSet, nScript, &aBackConfigColor ); + pPattern->GetFont( aFont, eColorMode, pFmtDevice, NULL, pCondSet, nScript, + &aBackConfigColor, &aTextConfigColor ); else - pPattern->GetFont( aFont, eColorMode, pFmtDevice, &pOutput->aZoomY, pCondSet, nScript, &aBackConfigColor ); + pPattern->GetFont( aFont, eColorMode, pFmtDevice, &pOutput->aZoomY, pCondSet, nScript, + &aBackConfigColor, &aTextConfigColor ); aFont.SetAlign(ALIGN_BASELINE); // Orientierung @@ -1085,7 +1091,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) Color aFontColor = ((const SvxColorItem&)pInfo->pPatternAttr-> GetItem( ATTR_FONT_COLOR )).GetValue(); if ( ( aFontColor == COL_AUTO || bForceAutoColor ) && bUseStyleColor ) - aFontColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); + aFontColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); pDev->DrawPixel( aPos, aFontColor ); bEmpty = TRUE; } diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index fb93e5ab9a30..c6d51e4443d2 100644 --- a/sc/source/ui/view/preview.cxx +++ b/sc/source/ui/view/preview.cxx @@ -2,9 +2,9 @@ * * $RCSfile: preview.cxx,v $ * - * $Revision: 1.18 $ + * $Revision: 1.19 $ * - * last change: $Author: sab $ $Date: 2002-09-24 09:29:43 $ + * last change: $Author: nn $ $Date: 2002-12-10 17:24:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -442,7 +442,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) if ( bValidPage ) { - Color aBorderColor( Application::GetSettings().GetStyleSettings().GetWindowTextColor() ); + Color aBorderColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); // draw border diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index fd1d57848896..bbbd3bd16d43 100644 --- a/sc/source/ui/view/printfun.cxx +++ b/sc/source/ui/view/printfun.cxx @@ -2,9 +2,9 @@ * * $RCSfile: printfun.cxx,v $ * - * $Revision: 1.26 $ + * $Revision: 1.27 $ * - * last change: $Author: nn $ $Date: 2002-12-04 18:55:38 $ + * last change: $Author: nn $ $Date: 2002-12-10 17:25:00 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1264,7 +1264,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH, if ( pShadow && pShadow->GetLocation() != SVX_SHADOW_NONE ) { if ( bCellContrast ) - pDev->SetFillColor(Application::GetSettings().GetStyleSettings().GetWindowTextColor()); + pDev->SetFillColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); else pDev->SetFillColor(pShadow->GetColor()); pDev->SetLineColor(); @@ -1557,7 +1557,7 @@ void ScPrintFunc::PrintArea( USHORT nX1, USHORT nY1, USHORT nX2, USHORT nY2, Color aGridColor( COL_BLACK ); if ( bUseStyleColor ) - aGridColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); + aGridColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); aOutputData.SetGridColor( aGridColor ); if ( !pPrinter && !bIsRender ) // when rendering (PDF), don't use printer @@ -2207,7 +2207,7 @@ void ScPrintFunc::PrintPage( long nPageNo, USHORT nX1, USHORT nY1, USHORT nX2, U Color aGridColor( COL_BLACK ); if ( bUseStyleColor ) - aGridColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); + aGridColor.SetColor( SC_MOD()->GetColorConfig().GetColorValue(svx::FONTCOLOR).nColor ); if (aTableParam.bHeaders) { |