[Libreoffice-commits] core.git: include/vcl sc/source sd/source sw/source toolkit/source vcl/source
Noel Grandin
noel.grandin at collabora.co.uk
Wed Dec 21 11:43:40 UTC 2016
include/vcl/outdev.hxx | 4 ++--
sc/source/ui/view/preview.cxx | 2 +-
sd/source/ui/slideshow/showwin.cxx | 2 +-
sw/source/uibase/uiview/pview.cxx | 2 +-
toolkit/source/awt/vclxwindow.cxx | 2 +-
vcl/source/outdev/outdev.cxx | 2 +-
6 files changed, 7 insertions(+), 7 deletions(-)
New commits:
commit d235f643680084fd54e0b2dc95605e8781ac6b88
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Wed Dec 21 11:06:35 2016 +0200
convert OutDevViewType to scoped enum
Change-Id: Id980f09c198ca976c88b11030f5db9d6f010add1
Reviewed-on: https://gerrit.libreoffice.org/32274
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0766de4..0baaaf3 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -295,7 +295,7 @@ namespace o3tl
enum OutDevType { OUTDEV_DONTKNOW, OUTDEV_WINDOW, OUTDEV_PRINTER, OUTDEV_VIRDEV };
-enum OutDevViewType { OUTDEV_VIEWTYPE_DONTKNOW, OUTDEV_VIEWTYPE_PRINTPREVIEW, OUTDEV_VIEWTYPE_SLIDESHOW };
+enum class OutDevViewType { DontKnow, PrintPreview, SlideShow };
// OutputDevice
@@ -626,7 +626,7 @@ public:
/**
If this OutputDevice is used for displaying a Print Preview
- the OutDevViewType should be set to 'OUTDEV_VIEWTYPE_PRINTPREVIEW'.
+ the OutDevViewType should be set to 'OutDevViewType::PrintPreview'.
A View can then make painting decisions dependent on this OutDevViewType.
E.g. text colors need to be handled differently, dependent on whether it's a PrintPreview or not. (see #106611# for more)
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index 63afadf..a171889 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -127,7 +127,7 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
nHeaderHeight ( 0 ),
nFooterHeight ( 0 )
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
+ SetOutDevViewType( OutDevViewType::PrintPreview );
SetBackground();
SetHelpId( HID_SC_WIN_PREVIEW );
diff --git a/sd/source/ui/slideshow/showwin.cxx b/sd/source/ui/slideshow/showwin.cxx
index 6eee98d..d4e2d4c 100644
--- a/sd/source/ui/slideshow/showwin.cxx
+++ b/sd/source/ui/slideshow/showwin.cxx
@@ -52,7 +52,7 @@ ShowWindow::ShowWindow( const ::rtl::Reference< SlideshowImpl >& xController, vc
, mnFirstMouseMove(0)
, mxController( xController )
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_SLIDESHOW );
+ SetOutDevViewType( OutDevViewType::SlideShow );
// Do never mirror the preview window. This explicitly includes right
// to left writing environments.
diff --git a/sw/source/uibase/uiview/pview.cxx b/sw/source/uibase/uiview/pview.cxx
index 1e334ab..843f926 100644
--- a/sw/source/uibase/uiview/pview.cxx
+++ b/sw/source/uibase/uiview/pview.cxx
@@ -193,7 +193,7 @@ SwPagePreviewWin::SwPagePreviewWin( vcl::Window *pParent, SwPagePreview& rPView
, maPaintedPreviewDocRect(Rectangle(0,0,0,0))
, mpPgPreviewLayout(nullptr)
{
- SetOutDevViewType( OUTDEV_VIEWTYPE_PRINTPREVIEW );
+ SetOutDevViewType( OutDevViewType::PrintPreview );
SetHelpId(HID_PAGEPREVIEW);
SetFillColor( GetBackground().GetColor() );
SetLineColor( GetBackground().GetColor());
diff --git a/toolkit/source/awt/vclxwindow.cxx b/toolkit/source/awt/vclxwindow.cxx
index ef9f9e5..00852e0 100644
--- a/toolkit/source/awt/vclxwindow.cxx
+++ b/toolkit/source/awt/vclxwindow.cxx
@@ -2309,7 +2309,7 @@ void VCLXWindow::draw( sal_Int32 nX, sal_Int32 nY ) throw(css::uno::RuntimeExcep
vcl::PDFExtOutDevData* pPDFExport = dynamic_cast<vcl::PDFExtOutDevData*>(pDev->GetExtOutDevData());
bool bDrawSimple = ( pDev->GetOutDevType() == OUTDEV_PRINTER )
- || ( pDev->GetOutDevViewType() == OUTDEV_VIEWTYPE_PRINTPREVIEW )
+ || ( pDev->GetOutDevViewType() == OutDevViewType::PrintPreview )
|| ( pPDFExport != nullptr );
if ( bDrawSimple )
{
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index ccf2e92..d1a3e8e 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -84,7 +84,7 @@ OutputDevice::OutputDevice() :
mnTextLayoutMode = ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::TextOriginLeft;
meOutDevType = OUTDEV_DONTKNOW;
- meOutDevViewType = OUTDEV_VIEWTYPE_DONTKNOW;
+ meOutDevViewType = OutDevViewType::DontKnow;
mbMap = false;
mbClipRegion = false;
mbBackground = false;
More information about the Libreoffice-commits
mailing list