diff options
author | Niklas Nebel <nn@openoffice.org> | 2002-04-24 13:44:26 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2002-04-24 13:44:26 +0000 |
commit | 3f4560e094917c21f8798563992967de30b372cb (patch) | |
tree | 92cbb3933fd289fb65a3dedf5b90777326348b3f | |
parent | ffa101426a198ffc29d167dff807e302177e8927 (diff) |
#98824# handle option to always use automatic font color
-rw-r--r-- | sc/source/ui/view/output.cxx | 10 | ||||
-rw-r--r-- | sc/source/ui/view/output2.cxx | 12 |
2 files changed, 15 insertions, 7 deletions
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx index cfc394f48a61..fc728ccd2a67 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.5 $ + * $Revision: 1.6 $ * - * last change: $Author: nn $ $Date: 2002-03-11 14:13:21 $ + * last change: $Author: nn $ $Date: 2002-04-24 14:44:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -76,6 +76,7 @@ #include <so3/ipobj.hxx> #include <vcl/poly.hxx> #include <vcl/svapp.hxx> +#include <svtools/accessibilityoptions.hxx> #include <math.h> @@ -212,6 +213,7 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType, bPagebreakMode( FALSE ), bSolidBackground( FALSE ), bUseStyleColor( FALSE ), + bForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ), bSyntaxMode( FALSE ), pValueColor( NULL ), pTextColor( NULL ), @@ -2587,7 +2589,9 @@ long lcl_FindInList( const List& rPosList, const ScTripel &rPos ) void ScOutputData::PrintNoteMarks( const List& rPosList ) { Font aFont; - ScAutoFontColorMode eColorMode = bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; + ScAutoFontColorMode eColorMode = bUseStyleColor ? + ( bForceAutoColor ? SC_AUTOCOL_FORCE : SC_AUTOCOL_DISPLAY ) : + SC_AUTOCOL_PRINT; ((const ScPatternAttr&)pDoc->GetPool()->GetDefaultItem(ATTR_PATTERN)).GetFont(aFont, eColorMode); aFont.SetSize( Size( 0, (long) ( 120 * nPPTY ) ) ); // 6 pt pDev->SetFont( aFont ); diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx index 050e43b98b0c..dc797fdd15c0 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.22 $ + * $Revision: 1.23 $ * - * last change: $Author: nn $ $Date: 2002-04-05 19:17:19 $ + * last change: $Author: nn $ $Date: 2002-04-24 14:44:26 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -212,7 +212,9 @@ void ScDrawStringsVars::SetPattern( const ScPatternAttr* pNew, const SfxItemSet* // Font - ScAutoFontColorMode eColorMode = pOutput->bUseStyleColor ? SC_AUTOCOL_DISPLAY : SC_AUTOCOL_PRINT; + ScAutoFontColorMode eColorMode = pOutput->bUseStyleColor ? + ( pOutput->bForceAutoColor ? SC_AUTOCOL_FORCE : SC_AUTOCOL_DISPLAY ) : + SC_AUTOCOL_PRINT; if ( bPixelToLogic ) pPattern->GetFont( aFont, eColorMode, pFmtDevice, NULL, pCondSet, nScript ); else @@ -1020,7 +1022,7 @@ void ScOutputData::DrawStrings( BOOL bPixelToLogic ) Point aPos(nPosX,nPosY); Color aFontColor = ((const SvxColorItem&)pInfo->pPatternAttr-> GetItem( ATTR_FONT_COLOR )).GetValue(); - if ( aFontColor == COL_AUTO && bUseStyleColor ) + if ( ( aFontColor == COL_AUTO || bForceAutoColor ) && bUseStyleColor ) aFontColor = Application::GetSettings().GetStyleSettings().GetWindowTextColor(); pDev->DrawPixel( aPos, aFontColor ); bEmpty = TRUE; @@ -1685,6 +1687,7 @@ void ScOutputData::DrawEdit(BOOL bPixelToLogic) pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); pEngine->SetAsianCompressionMode( pDoc->GetAsianCompression() ); pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() ); + //! EditEngine needs methods to handle bUseStyleColor, bForceAutoColor } else lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) @@ -2512,6 +2515,7 @@ void ScOutputData::DrawRotated(BOOL bPixelToLogic) pEngine->SetForbiddenCharsTable( pDoc->GetForbiddenCharacters() ); pEngine->SetAsianCompressionMode( pDoc->GetAsianCompression() ); pEngine->SetKernAsianPunctuation( pDoc->GetAsianKerning() ); + //! EditEngine needs methods to handle bUseStyleColor, bForceAutoColor } else lcl_ClearEdit( *pEngine ); // also calls SetUpdateMode(FALSE) |