summaryrefslogtreecommitdiff
path: root/sd/source/ui/tools/PreviewRenderer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/tools/PreviewRenderer.cxx')
-rw-r--r--sd/source/ui/tools/PreviewRenderer.cxx42
1 files changed, 21 insertions, 21 deletions
diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx
index fe895f519f64..305b426a21de 100644
--- a/sd/source/ui/tools/PreviewRenderer.cxx
+++ b/sd/source/ui/tools/PreviewRenderer.cxx
@@ -2,7 +2,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -83,7 +83,7 @@ PreviewRenderer::~PreviewRenderer (void)
Image PreviewRenderer::RenderPage (
- const SdPage* pPage,
+ const SdPage* pPage,
const sal_Int32 nWidth,
const String& rSubstitutionText,
const bool bObeyHighContrastMode)
@@ -106,7 +106,7 @@ Image PreviewRenderer::RenderPage (
Image PreviewRenderer::RenderPage (
- const SdPage* pPage,
+ const SdPage* pPage,
Size aPixelSize,
const String& rSubstitutionText,
const bool bObeyHighContrastMode)
@@ -122,7 +122,7 @@ Image PreviewRenderer::RenderPage (
PaintPage (pPage);
PaintSubstitutionText (rSubstitutionText);
PaintFrame();
-
+
Size aSize (mpPreviewDevice->GetOutputSizePixel());
aPreview = mpPreviewDevice->GetBitmap (
mpPreviewDevice->PixelToLogic(Point(0,0)),
@@ -157,8 +157,8 @@ Image PreviewRenderer::RenderSubstitution (
// Adjust contrast mode.
bool bUseContrast = Application::GetSettings().GetStyleSettings().
GetHighContrastMode();
- mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
+ mpPreviewDevice->SetDrawMode (bUseContrast
+ ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
// Set a map mode makes a typical substitution text completely
@@ -172,7 +172,7 @@ Image PreviewRenderer::RenderSubstitution (
aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(
Point(nFrameWidth,nFrameWidth),aMapMode));
mpPreviewDevice->SetMapMode (aMapMode);
-
+
// Clear the background.
Rectangle aPaintRectangle (
Point(0,0),
@@ -187,7 +187,7 @@ Image PreviewRenderer::RenderSubstitution (
// Paint substitution text and a frame around it.
PaintSubstitutionText (rSubstitutionText);
PaintFrame();
-
+
Size aSize (mpPreviewDevice->GetOutputSizePixel());
aPreview = mpPreviewDevice->GetBitmap (
mpPreviewDevice->PixelToLogic(Point(0,0)),
@@ -221,7 +221,7 @@ bool PreviewRenderer::Initialize (
SetupOutputSize(*pPage, rPixelSize);
- SdDrawDocument* pDocument
+ SdDrawDocument* pDocument
= static_cast<SdDrawDocument*>(pPage->GetModel());
DrawDocShell* pDocShell = pDocument->GetDocSh();
@@ -233,8 +233,8 @@ bool PreviewRenderer::Initialize (
// Adjust contrast mode.
bool bUseContrast (bObeyHighContrastMode
&& Application::GetSettings().GetStyleSettings().GetHighContrastMode());
- mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
+ mpPreviewDevice->SetDrawMode (bUseContrast
+ ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
mpPreviewDevice->SetSettings(Application::GetSettings());
@@ -297,7 +297,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage)
pOutliner->SetControlWord(
(nOriginalControlWord & ~EE_CNTRL_ONLINESPELLING));
}
-
+
try
{
mpView->CompleteRedraw (mpPreviewDevice.get(), aRegion);
@@ -328,13 +328,13 @@ void PreviewRenderer::PaintSubstitutionText (const String& rSubstitutionText)
// Paint the substitution text.
Rectangle aTextBox (
- Point(0,0),
+ Point(0,0),
mpPreviewDevice->PixelToLogic(
mpPreviewDevice->GetOutputSizePixel()));
- USHORT nTextStyle =
+ USHORT nTextStyle =
TEXT_DRAW_CENTER
| TEXT_DRAW_VCENTER
- | TEXT_DRAW_MULTILINE
+ | TEXT_DRAW_MULTILINE
| TEXT_DRAW_WORDBREAK;
mpPreviewDevice->DrawText (aTextBox, rSubstitutionText, nTextStyle);
@@ -366,7 +366,7 @@ void PreviewRenderer::PaintFrame (void)
void PreviewRenderer::SetupOutputSize (
- const SdPage& rPage,
+ const SdPage& rPage,
const Size& rFramePixelSize)
{
// First set the map mode to some arbitrary scale that is numerically
@@ -382,7 +382,7 @@ void PreviewRenderer::SetupOutputSize (
const Size aPageModelSize (rPage.GetSize());
const Size aOutputSize = mpPreviewDevice->LogicToPixel(rPage.GetSize(), aMapMode);
const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0);
- const double nFinalScale (nInitialScale * (rFramePixelSize.Width()-2*nFrameWidth)
+ const double nFinalScale (nInitialScale * (rFramePixelSize.Width()-2*nFrameWidth)
/ aOutputSize.Width());
aMapMode.SetScaleX (nFinalScale);
aMapMode.SetScaleY (nFinalScale);
@@ -435,8 +435,8 @@ Image PreviewRenderer::ScaleBitmap (
// Adjust contrast mode.
bool bUseContrast = Application::GetSettings().GetStyleSettings().
GetHighContrastMode();
- mpPreviewDevice->SetDrawMode (bUseContrast
- ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
+ mpPreviewDevice->SetDrawMode (bUseContrast
+ ? ViewShell::OUTPUT_DRAWMODE_CONTRAST
: ViewShell::OUTPUT_DRAWMODE_COLOR);
// Set output size.
@@ -444,7 +444,7 @@ Image PreviewRenderer::ScaleBitmap (
if (aSize.Width() <= 0)
break;
Size aFrameSize (
- nWidth,
+ nWidth,
(long)((nWidth*1.0 * aSize.Height()) / aSize.Width() + 0.5));
Size aPreviewSize (aFrameSize.Width()-2,aFrameSize.Height()-2);
MapMode aMapMode (mpPreviewDevice->GetMapMode());
@@ -464,7 +464,7 @@ Image PreviewRenderer::ScaleBitmap (
BitmapEx aScaledBitmap (rBitmapEx.GetBitmap());
aScaledBitmap.Scale (aPreviewSize, BMP_SCALE_INTERPOLATE);
mpPreviewDevice->DrawBitmap (
- Point(1,1),
+ Point(1,1),
aPreviewSize,
aScaledBitmap.GetBitmap());