summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2016-12-21 11:06:35 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2016-12-21 11:42:53 +0000
commitd235f643680084fd54e0b2dc95605e8781ac6b88 (patch)
treedb45fa4b6086e6420b085400fd1b1fed4f00284a
parent584c745ea484e1f8047278fc83b41b30a90f884d (diff)
convert OutDevViewType to scoped enum
Change-Id: Id980f09c198ca976c88b11030f5db9d6f010add1 Reviewed-on: https://gerrit.libreoffice.org/32274 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
-rw-r--r--include/vcl/outdev.hxx4
-rw-r--r--sc/source/ui/view/preview.cxx2
-rw-r--r--sd/source/ui/slideshow/showwin.cxx2
-rw-r--r--sw/source/uibase/uiview/pview.cxx2
-rw-r--r--toolkit/source/awt/vclxwindow.cxx2
-rw-r--r--vcl/source/outdev/outdev.cxx2
6 files changed, 7 insertions, 7 deletions
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 0766de48f705..0baaaf332481 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 63afadfc9e5c..a17188932b46 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 6eee98d38096..d4e2d4ccb1c4 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 1e334ab5b564..843f926062ea 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 ef9f9e57c9a1..00852e085968 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 ccf2e929d771..d1a3e8e97912 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;