From b5f80146f4f2d780b1d03249e6f5d7d2d27c6d37 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 17 Feb 2010 13:32:10 +0100 Subject: renaissance1: #i107215# Modified painting and layouting of page objects. --- sd/source/ui/tools/PreviewRenderer.cxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 770ca7fabf6c..4a166b74e1a1 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -418,8 +418,8 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell) } mpView->SetPreviewRenderer( sal_True ); mpView->SetBordVisible(FALSE); - mpView->SetPageBorderVisible(FALSE); - mpView->SetPageVisible(TRUE); + mpView->SetPageBorderVisible(TRUE); + mpView->SetPageVisible(FALSE); } -- cgit From f5d2c01dda56f7544a88e5b85156bae2c71e2a89 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Thu, 18 Feb 2010 15:20:15 +0100 Subject: renaissance1: #i107215# Improved selection handling. --- sd/source/ui/tools/PreviewRenderer.cxx | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 4a166b74e1a1..6b9e41f45371 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -46,6 +46,9 @@ #include #include +using namespace ::com::sun::star; +using namespace ::com::sun::star::uno; + namespace sd { @@ -301,7 +304,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage) try { - mpView->CompleteRedraw (mpPreviewDevice.get(), aRegion); + mpView->CompleteRedraw(mpPreviewDevice.get(), aRegion); } catch (const ::com::sun::star::uno::Exception&) { @@ -416,10 +419,8 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell) { mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), NULL)); } - mpView->SetPreviewRenderer( sal_True ); - mpView->SetBordVisible(FALSE); - mpView->SetPageBorderVisible(TRUE); - mpView->SetPageVisible(FALSE); + mpView->SetPreviewRenderer(true); + mpView->SetPagePaintingAllowed(false); } -- cgit From 2318e08d02cd3570f0b89a85ebd7fbac8b233ca4 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Fri, 19 Feb 2010 11:59:56 +0100 Subject: renaissance1: #i107215# Integrated preview border into shadow bitmap. --- sd/source/ui/tools/PreviewRenderer.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 6b9e41f45371..bf4196667ef3 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -420,7 +420,16 @@ void PreviewRenderer::ProvideView (DrawDocShell* pDocShell) mpView.reset (new DrawView (pDocShell, mpPreviewDevice.get(), NULL)); } mpView->SetPreviewRenderer(true); +#if 1 + mpView->SetPageVisible(false); + mpView->SetPageBorderVisible(true); + mpView->SetBordVisible(false); +#else + // This works in the slide sorter but prevents the master page + // background being painted in the list of current master pages in the + // task manager. mpView->SetPagePaintingAllowed(false); +#endif } -- cgit From c87f10322a175f7d45ee20db236b69befa64d277 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 3 Mar 2010 13:21:37 +0100 Subject: renaissance1: #i107215# Obeying application background color. --- sd/source/ui/tools/PreviewRenderer.cxx | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index bf4196667ef3..7e1c2a7f9f63 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -71,7 +71,10 @@ PreviewRenderer::PreviewRenderer ( mpPreviewDevice->SetBackground(pTemplate->GetBackground()); } else - mpPreviewDevice->SetBackground(Wallpaper(COL_WHITE)); + { + mpPreviewDevice->SetBackground(Wallpaper( + Application::GetSettings().GetStyleSettings().GetWindowColor())); + } } @@ -159,8 +162,8 @@ Image PreviewRenderer::RenderSubstitution ( mpPreviewDevice->SetOutputSizePixel(rPreviewPixelSize); // Adjust contrast mode. - bool bUseContrast = Application::GetSettings().GetStyleSettings(). - GetHighContrastMode(); + const bool bUseContrast ( + Application::GetSettings().GetStyleSettings().GetHighContrastMode()); mpPreviewDevice->SetDrawMode (bUseContrast ? ViewShell::OUTPUT_DRAWMODE_CONTRAST : ViewShell::OUTPUT_DRAWMODE_COLOR); @@ -169,7 +172,7 @@ Image PreviewRenderer::RenderSubstitution ( // visible. MapMode aMapMode (mpPreviewDevice->GetMapMode()); aMapMode.SetMapUnit(MAP_100TH_MM); - double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0); + const double nFinalScale (25.0 * rPreviewPixelSize.Width() / 28000.0); aMapMode.SetScaleX(nFinalScale); aMapMode.SetScaleY(nFinalScale); const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0); @@ -178,7 +181,7 @@ Image PreviewRenderer::RenderSubstitution ( mpPreviewDevice->SetMapMode (aMapMode); // Clear the background. - Rectangle aPaintRectangle ( + const Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); mpPreviewDevice->EnableMapMode(FALSE); @@ -192,7 +195,7 @@ Image PreviewRenderer::RenderSubstitution ( PaintSubstitutionText (rSubstitutionText); PaintFrame(); - Size aSize (mpPreviewDevice->GetOutputSizePixel()); + const Size aSize (mpPreviewDevice->GetOutputSizePixel()); aPreview = mpPreviewDevice->GetBitmap ( mpPreviewDevice->PixelToLogic(Point(0,0)), mpPreviewDevice->PixelToLogic(aSize)); @@ -266,6 +269,8 @@ bool PreviewRenderer::Initialize ( rOutliner.SetDefaultLanguage(pDocument->GetLanguage(EE_CHAR_LANGUAGE)); mpView->SetApplicationBackgroundColor( Color(aColorConfig.GetColorValue(svtools::APPBACKGROUND).nColor)); + mpPreviewDevice->SetBackground(Wallpaper(aPageBackgroundColor)); + mpPreviewDevice->Erase(); bSuccess = true; } -- cgit From 8c23aba539c0f5764ec543e4cfa6bac2fc20e7ae Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Mon, 15 Mar 2010 13:50:38 +0100 Subject: renaissance1: #i107215# Preview generation takes better care of last row and column of pixels. --- sd/source/ui/tools/PreviewRenderer.cxx | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 7e1c2a7f9f63..65f904ed373c 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -381,23 +381,26 @@ void PreviewRenderer::SetupOutputSize ( // First set the map mode to some arbitrary scale that is numerically // stable. MapMode aMapMode (mpPreviewDevice->GetMapMode()); - aMapMode.SetMapUnit(MAP_100TH_MM); - double nInitialScale = 1; - aMapMode.SetScaleX (Fraction(nInitialScale)); - aMapMode.SetScaleY (Fraction(nInitialScale)); - aMapMode.SetOrigin (Point(0,0)); + aMapMode.SetMapUnit(MAP_PIXEL); // Adapt it to the desired width. 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) - / aOutputSize.Width()); - aMapMode.SetScaleX (nFinalScale); - aMapMode.SetScaleY (nFinalScale); - aMapMode.SetOrigin (mpPreviewDevice->PixelToLogic( - Point(nFrameWidth,nFrameWidth),aMapMode)); - + if (aPageModelSize.Width()>0 || aPageModelSize.Height()>0) + { + const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0); + aMapMode.SetScaleX( + Fraction(rFramePixelSize.Width()-2*nFrameWidth-1, aPageModelSize.Width())); + aMapMode.SetScaleY( + Fraction(rFramePixelSize.Height()-2*nFrameWidth-1, aPageModelSize.Height())); + aMapMode.SetOrigin(mpPreviewDevice->PixelToLogic(Point(nFrameWidth,nFrameWidth),aMapMode)); + } + else + { + // We should never get here. + OSL_ASSERT(false); + aMapMode.SetScaleX(1.0); + aMapMode.SetScaleY(1.0); + } mpPreviewDevice->SetMapMode (aMapMode); mpPreviewDevice->SetOutputSizePixel(rFramePixelSize); } -- cgit From 4da1188ef466399a1bf910de924cc58cb28df2fc Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Wed, 2 Jun 2010 11:01:47 +0200 Subject: renaissance1: #i107215# Do not show PresObjs in previews. --- sd/source/ui/tools/PreviewRenderer.cxx | 115 +++++++++++++++++++++++++++++---- 1 file changed, 101 insertions(+), 14 deletions(-) (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 53c1c431a891..8ece3971eb61 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -42,6 +42,8 @@ #include #include #include +#include +#include using namespace ::com::sun::star; using namespace ::com::sun::star::uno; @@ -52,6 +54,26 @@ namespace sd { const int PreviewRenderer::snSubstitutionTextSize = 11; const int PreviewRenderer::snFrameWidth = 1; +namespace { + /** This incarnation of the ViewObjectContactRedirector filters away all + PageObj objects, unconditionally. + */ + class ViewRedirector : public ::sdr::contact::ViewObjectContactRedirector + { + public: + ViewRedirector (void); + virtual ~ViewRedirector (void); + virtual drawinglayer::primitive2d::Primitive2DSequence createRedirectedPrimitive2DSequence( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo); + }; +} + + + + +//===== PreviewRenderer ======================================================= + PreviewRenderer::PreviewRenderer ( OutputDevice* pTemplate, const bool bHasFrame) @@ -90,7 +112,8 @@ Image PreviewRenderer::RenderPage ( const SdPage* pPage, const sal_Int32 nWidth, const String& rSubstitutionText, - const bool bObeyHighContrastMode) + const bool bObeyHighContrastMode, + const bool bDisplayPresentationObjects) { if (pPage != NULL) { @@ -100,7 +123,12 @@ Image PreviewRenderer::RenderPage ( const sal_Int32 nFrameWidth (mbHasFrame ? snFrameWidth : 0); const sal_Int32 nHeight (sal::static_int_cast( (nWidth - 2*nFrameWidth) / nAspectRatio + 2*nFrameWidth + 0.5)); - return RenderPage (pPage, Size(nWidth,nHeight), rSubstitutionText, bObeyHighContrastMode); + return RenderPage ( + pPage, + Size(nWidth,nHeight), + rSubstitutionText, + bObeyHighContrastMode, + bDisplayPresentationObjects); } else return Image(); @@ -113,7 +141,8 @@ Image PreviewRenderer::RenderPage ( const SdPage* pPage, Size aPixelSize, const String& rSubstitutionText, - const bool bObeyHighContrastMode) + const bool bObeyHighContrastMode, + const bool bDisplayPresentationObjects) { Image aPreview; @@ -121,10 +150,10 @@ Image PreviewRenderer::RenderPage ( { try { - if (Initialize (pPage, aPixelSize, bObeyHighContrastMode)) + if (Initialize(pPage, aPixelSize, bObeyHighContrastMode)) { - PaintPage (pPage); - PaintSubstitutionText (rSubstitutionText); + PaintPage(pPage, bDisplayPresentationObjects); + PaintSubstitutionText(rSubstitutionText); PaintFrame(); Size aSize (mpPreviewDevice->GetOutputSizePixel()); @@ -165,7 +194,7 @@ Image PreviewRenderer::RenderSubstitution ( ? ViewShell::OUTPUT_DRAWMODE_CONTRAST : ViewShell::OUTPUT_DRAWMODE_COLOR); - // Set a map mode makes a typical substitution text completely + // Set a map mode that makes a typical substitution text completely // visible. MapMode aMapMode (mpPreviewDevice->GetMapMode()); aMapMode.SetMapUnit(MAP_100TH_MM); @@ -287,7 +316,9 @@ void PreviewRenderer::Cleanup (void) -void PreviewRenderer::PaintPage (const SdPage* pPage) +void PreviewRenderer::PaintPage ( + const SdPage* pPage, + const bool bDisplayPresentationObjects) { // Paint the page. Rectangle aPaintRectangle (Point(0,0), pPage->GetSize()); @@ -295,18 +326,22 @@ void PreviewRenderer::PaintPage (const SdPage* pPage) // Turn off online spelling and redlining. SdrOutliner* pOutliner = NULL; - ULONG nOriginalControlWord = 0; + ULONG nSavedControlWord (0); if (mpDocShellOfView!=NULL && mpDocShellOfView->GetDoc()!=NULL) { pOutliner = &mpDocShellOfView->GetDoc()->GetDrawOutliner(); - nOriginalControlWord = pOutliner->GetControlWord(); - pOutliner->SetControlWord( - (nOriginalControlWord & ~EE_CNTRL_ONLINESPELLING)); + nSavedControlWord = pOutliner->GetControlWord(); + pOutliner->SetControlWord((nSavedControlWord & ~EE_CNTRL_ONLINESPELLING)); } + // Use a special redirector to prevent PresObj shapes from being painted. + boost::scoped_ptr pRedirector; + if ( ! bDisplayPresentationObjects) + pRedirector.reset(new ViewRedirector()); + try { - mpView->CompleteRedraw(mpPreviewDevice.get(), aRegion); + mpView->CompleteRedraw(mpPreviewDevice.get(), aRegion, pRedirector.get()); } catch (const ::com::sun::star::uno::Exception&) { @@ -315,7 +350,7 @@ void PreviewRenderer::PaintPage (const SdPage* pPage) // Restore the previous online spelling and redlining states. if (pOutliner != NULL) - pOutliner->SetControlWord(nOriginalControlWord); + pOutliner->SetControlWord(nSavedControlWord); } @@ -516,4 +551,56 @@ void PreviewRenderer::Notify(SfxBroadcaster&, const SfxHint& rHint) + +//===== ViewRedirector ======================================================== + +namespace { + +ViewRedirector::ViewRedirector (void) +{ +} + + + + +ViewRedirector::~ViewRedirector (void) +{ +} + + + + +drawinglayer::primitive2d::Primitive2DSequence ViewRedirector::createRedirectedPrimitive2DSequence( + const sdr::contact::ViewObjectContact& rOriginal, + const sdr::contact::DisplayInfo& rDisplayInfo) +{ + SdrObject* pObject = rOriginal.GetViewContact().TryToGetSdrObject(); + + if (pObject==NULL || pObject->GetPage() == NULL) + { + // not a SdrObject visualisation (maybe e.g. page) or no page + return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence( + rOriginal, + rDisplayInfo); + } + + const bool bDoCreateGeometry (pObject->GetPage()->checkVisibility( rOriginal, rDisplayInfo, true)); + + if ( ! bDoCreateGeometry + && (pObject->GetObjInventor() != SdrInventor || pObject->GetObjIdentifier() != OBJ_PAGE)) + { + return drawinglayer::primitive2d::Primitive2DSequence(); + } + + if (pObject->IsEmptyPresObj()) + return drawinglayer::primitive2d::Primitive2DSequence(); + + return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence( + rOriginal, + rDisplayInfo); +} + +} // end of anonymous namespace + + } // end of namespace ::sd -- cgit From 436416a6320037855846fce127a0cfa77ac45270 Mon Sep 17 00:00:00 2001 From: Andre Fischer Date: Thu, 8 Jul 2010 12:27:24 +0200 Subject: renaissance1: resolved merge conflicts, cleanup. --- sd/source/ui/tools/AsynchronousCall.cxx | 0 sd/source/ui/tools/ConfigurationAccess.cxx | 0 sd/source/ui/tools/EventMultiplexer.cxx | 0 sd/source/ui/tools/IconCache.cxx | 0 sd/source/ui/tools/IdleDetection.cxx | 0 sd/source/ui/tools/PreviewRenderer.cxx | 1 + sd/source/ui/tools/PropertySet.cxx | 0 sd/source/ui/tools/SdGlobalResourceContainer.cxx | 0 sd/source/ui/tools/SlotStateListener.cxx | 0 sd/source/ui/tools/TimerBasedTaskExecution.cxx | 0 sd/source/ui/tools/makefile.mk | 0 11 files changed, 1 insertion(+) mode change 100644 => 100755 sd/source/ui/tools/AsynchronousCall.cxx mode change 100644 => 100755 sd/source/ui/tools/ConfigurationAccess.cxx mode change 100644 => 100755 sd/source/ui/tools/EventMultiplexer.cxx mode change 100644 => 100755 sd/source/ui/tools/IconCache.cxx mode change 100644 => 100755 sd/source/ui/tools/IdleDetection.cxx mode change 100644 => 100755 sd/source/ui/tools/PropertySet.cxx mode change 100644 => 100755 sd/source/ui/tools/SdGlobalResourceContainer.cxx mode change 100644 => 100755 sd/source/ui/tools/SlotStateListener.cxx mode change 100644 => 100755 sd/source/ui/tools/TimerBasedTaskExecution.cxx mode change 100644 => 100755 sd/source/ui/tools/makefile.mk (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/AsynchronousCall.cxx b/sd/source/ui/tools/AsynchronousCall.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/ConfigurationAccess.cxx b/sd/source/ui/tools/ConfigurationAccess.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/EventMultiplexer.cxx b/sd/source/ui/tools/EventMultiplexer.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/IdleDetection.cxx b/sd/source/ui/tools/IdleDetection.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 4b53dd8e1f1d..3b6e8339c22d 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -42,6 +42,7 @@ #include #include #include +#include #include #include diff --git a/sd/source/ui/tools/PropertySet.cxx b/sd/source/ui/tools/PropertySet.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/SdGlobalResourceContainer.cxx b/sd/source/ui/tools/SdGlobalResourceContainer.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/SlotStateListener.cxx b/sd/source/ui/tools/SlotStateListener.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/TimerBasedTaskExecution.cxx b/sd/source/ui/tools/TimerBasedTaskExecution.cxx old mode 100644 new mode 100755 diff --git a/sd/source/ui/tools/makefile.mk b/sd/source/ui/tools/makefile.mk old mode 100644 new mode 100755 -- cgit From 3d6bed44c8ca414f60c03223482b9f7b94d56c14 Mon Sep 17 00:00:00 2001 From: Carsten Driesner Date: Mon, 17 Jan 2011 11:41:00 +0100 Subject: removetooltypes01: #i112600# Remove tools types from sd --- sd/source/ui/tools/IconCache.cxx | 8 ++++---- sd/source/ui/tools/PreviewRenderer.cxx | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) mode change 100644 => 100755 sd/source/ui/tools/IconCache.cxx (limited to 'sd/source/ui/tools') diff --git a/sd/source/ui/tools/IconCache.cxx b/sd/source/ui/tools/IconCache.cxx old mode 100644 new mode 100755 index 12e7b6b52e95..de4d53b73495 --- a/sd/source/ui/tools/IconCache.cxx +++ b/sd/source/ui/tools/IconCache.cxx @@ -50,17 +50,17 @@ private: */ static IconCache* mpInstance; - typedef ::std::hash_map ImageContainer; + typedef ::std::hash_map ImageContainer; ImageContainer maContainer; - Image GetIcon (USHORT nResourceId); + Image GetIcon (sal_uInt16 nResourceId); }; IconCache* IconCache::Implementation::mpInstance = NULL; -Image IconCache::Implementation::GetIcon (USHORT nResourceId) +Image IconCache::Implementation::GetIcon (sal_uInt16 nResourceId) { Image aResult; ImageContainer::iterator iImage; @@ -109,7 +109,7 @@ IconCache& IconCache::Instance (void) -Image IconCache::GetIcon (USHORT nResourceId) +Image IconCache::GetIcon (sal_uInt16 nResourceId) { return mpImpl->GetIcon (nResourceId); } diff --git a/sd/source/ui/tools/PreviewRenderer.cxx b/sd/source/ui/tools/PreviewRenderer.cxx index 3b6e8339c22d..d4f6d056fc90 100644 --- a/sd/source/ui/tools/PreviewRenderer.cxx +++ b/sd/source/ui/tools/PreviewRenderer.cxx @@ -211,12 +211,12 @@ Image PreviewRenderer::RenderSubstitution ( const Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); - mpPreviewDevice->EnableMapMode(FALSE); + mpPreviewDevice->EnableMapMode(sal_False); mpPreviewDevice->SetLineColor(); svtools::ColorConfig aColorConfig; mpPreviewDevice->SetFillColor(aColorConfig.GetColorValue(svtools::DOCCOLOR).nColor); mpPreviewDevice->DrawRect (aPaintRectangle); - mpPreviewDevice->EnableMapMode(TRUE); + mpPreviewDevice->EnableMapMode(sal_True); // Paint substitution text and a frame around it. PaintSubstitutionText (rSubstitutionText); @@ -327,7 +327,7 @@ void PreviewRenderer::PaintPage ( // Turn off online spelling and redlining. SdrOutliner* pOutliner = NULL; - ULONG nSavedControlWord (0); + sal_uLong nSavedControlWord (0); if (mpDocShellOfView!=NULL && mpDocShellOfView->GetDoc()!=NULL) { pOutliner = &mpDocShellOfView->GetDoc()->GetDrawOutliner(); @@ -373,7 +373,7 @@ void PreviewRenderer::PaintSubstitutionText (const String& rSubstitutionText) Point(0,0), mpPreviewDevice->PixelToLogic( mpPreviewDevice->GetOutputSizePixel())); - USHORT nTextStyle = + sal_uInt16 nTextStyle = TEXT_DRAW_CENTER | TEXT_DRAW_VCENTER | TEXT_DRAW_MULTILINE @@ -396,11 +396,11 @@ void PreviewRenderer::PaintFrame (void) Rectangle aPaintRectangle ( Point(0,0), mpPreviewDevice->GetOutputSizePixel()); - mpPreviewDevice->EnableMapMode(FALSE); + mpPreviewDevice->EnableMapMode(sal_False); mpPreviewDevice->SetLineColor(maFrameColor); mpPreviewDevice->SetFillColor(); mpPreviewDevice->DrawRect(aPaintRectangle); - mpPreviewDevice->EnableMapMode(TRUE); + mpPreviewDevice->EnableMapMode(sal_True); } } -- cgit