diff options
author | Niklas Nebel <nn@openoffice.org> | 2002-04-24 13:45:47 +0000 |
---|---|---|
committer | Niklas Nebel <nn@openoffice.org> | 2002-04-24 13:45:47 +0000 |
commit | ab4a4d2eb6846874c4b61378000049e443838373 (patch) | |
tree | 2f11a7f4055bc917107c96d92884001eb0044d75 | |
parent | 3f4560e094917c21f8798563992967de30b372cb (diff) |
#98824# handle option to use system colors in page preview
-rw-r--r-- | sc/source/ui/view/preview.cxx | 11 | ||||
-rw-r--r-- | sc/source/ui/view/printfun.cxx | 16 |
2 files changed, 17 insertions, 10 deletions
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx index 8474bb66c410..b6635b97fa62 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.10 $ + * $Revision: 1.11 $ * - * last change: $Author: nn $ $Date: 2002-04-18 17:06:21 $ + * last change: $Author: nn $ $Date: 2002-04-24 14:45:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -75,6 +75,7 @@ #include <svx/sizeitem.hxx> #include <sfx2/bindings.hxx> #include <sfx2/dispatch.hxx> +#include <svtools/accessibilityoptions.hxx> #include <svtools/itemset.hxx> #include <tools/multisel.hxx> #include <vcl/waitobj.hxx> @@ -345,6 +346,8 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) BOOL bDoPrint = ( pFillLocation == NULL ); BOOL bValidPage = ( nPageNo < nTotalPages ); + ScModule* pScMod = SC_MOD(); + if ( bDoPrint && ( aOffset.X() < 0 || aOffset.Y() < 0 ) && bValidPage ) { SetMapMode( aMMMode ); @@ -361,7 +364,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) Size aPageSize; if ( bValidPage ) { - ScPrintOptions aOptions = SC_MOD()->GetPrintOptions(); + ScPrintOptions aOptions = pScMod->GetPrintOptions(); ScPrintFunc* pPrintFunc; if (bStateValid) @@ -373,7 +376,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation ) pPrintFunc->SetManualZoom(nZoom); pPrintFunc->SetDateTime(aDate,aTime); pPrintFunc->SetClearFlag(TRUE); - pPrintFunc->SetUseStyleColor(TRUE); //! configurable + pPrintFunc->SetUseStyleColor( pScMod->GetAccessOptions().GetIsForPagePreviews() ); pPrintFunc->SetDrawView( pDrawView ); diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx index 0359c6efb738..c89943dffdd7 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.15 $ + * $Revision: 1.16 $ * - * last change: $Author: nn $ $Date: 2002-04-24 07:57:40 $ + * last change: $Author: nn $ $Date: 2002-04-24 14:45:47 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1909,11 +1909,13 @@ long ScPrintFunc::PrintNotes( long nPageNo, long nNoteStart, BOOL bDoPrint, ScPr { //! mit PrintPage zusammenfassen !!! - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + Color aBackgroundColor( COL_WHITE ); + if ( bUseStyleColor ) + aBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); - pDev->SetFillColor(rStyleSettings.GetWindowColor()); + pDev->SetFillColor(aBackgroundColor); pDev->DrawRect(Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); @@ -1970,11 +1972,13 @@ void ScPrintFunc::PrintPage( long nPageNo, USHORT nX1, USHORT nY1, USHORT nX2, U { // muss genau zum Zeichnen des Rahmens in preview.cxx passen !!! - const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings(); + Color aBackgroundColor( COL_WHITE ); + if ( bUseStyleColor ) + aBackgroundColor = Application::GetSettings().GetStyleSettings().GetWindowColor(); pDev->SetMapMode(aOffsetMode); pDev->SetLineColor(); - pDev->SetFillColor(rStyleSettings.GetWindowColor()); + pDev->SetFillColor(aBackgroundColor); pDev->DrawRect(Rectangle(Point(), Size((long)(aPageSize.Width() * nScaleX * 100 / nZoom), (long)(aPageSize.Height() * nScaleY * 100 / nZoom)))); |