Kaydet (Commit) d235f643 authored tarafından Noel Grandin's avatar Noel Grandin

convert OutDevViewType to scoped enum

Change-Id: Id980f09c198ca976c88b11030f5db9d6f010add1
Reviewed-on: https://gerrit.libreoffice.org/32274Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
Tested-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 584c745e
......@@ -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)
......
......@@ -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 );
......
......@@ -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.
......
......@@ -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());
......
......@@ -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 )
{
......
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment