summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorJan-Marek Glogowski <glogow@fbihome.de>2018-10-23 11:00:31 +0000
committerJan-Marek Glogowski <glogow@fbihome.de>2018-10-23 23:28:23 +0200
commit7a46940d0a8782ed40b7e8182d883b02eb69bc40 (patch)
treedcbf8cdf0322820311637fcb670ad3e73fcc40b9 /vcl
parent9415f3e10274cc4087a72d425a223309d39ede27 (diff)
Constify OutputDevice::meOutDevType
Change-Id: Idfa57c545704626a8b8b7405cd32c49666a04746 Reviewed-on: https://gerrit.libreoffice.org/62255 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/print.cxx9
-rw-r--r--vcl/source/gdi/virdev.cxx16
-rw-r--r--vcl/source/outdev/outdev.cxx4
-rw-r--r--vcl/source/window/window.cxx14
4 files changed, 21 insertions, 22 deletions
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 36edd1bbcdde..2c9a58dec73d 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -461,7 +461,6 @@ OUString Printer::GetDefaultPrinterName()
void Printer::ImplInitData()
{
mbDevOutput = false;
- meOutDevType = OUTDEV_PRINTER;
mbDefPrinter = false;
mnError = ERRCODE_NONE;
mnPageQueueSize = 0;
@@ -854,6 +853,7 @@ long Printer::GetGradientStepCount( long nMinRect )
}
Printer::Printer()
+ : OutputDevice(OUTDEV_PRINTER)
{
ImplInitData();
SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( GetDefaultPrinterName(), nullptr );
@@ -867,8 +867,9 @@ Printer::Printer()
ImplInitDisplay();
}
-Printer::Printer( const JobSetup& rJobSetup ) :
- maJobSetup( rJobSetup )
+Printer::Printer( const JobSetup& rJobSetup )
+ : OutputDevice(OUTDEV_PRINTER)
+ , maJobSetup(rJobSetup)
{
ImplInitData();
const ImplJobSetup& rConstData = rJobSetup.ImplGetConstData();
@@ -888,6 +889,7 @@ Printer::Printer( const JobSetup& rJobSetup ) :
}
Printer::Printer( const QueueInfo& rQueueInfo )
+ : OutputDevice(OUTDEV_PRINTER)
{
ImplInitData();
SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rQueueInfo.GetPrinterName(),
@@ -899,6 +901,7 @@ Printer::Printer( const QueueInfo& rQueueInfo )
}
Printer::Printer( const OUString& rPrinterName )
+ : OutputDevice(OUTDEV_PRINTER)
{
ImplInitData();
SalPrinterQueueInfo* pInfo = ImplGetQueueInfo( rPrinterName, nullptr );
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index e0dc6ee1c201..425b2d153a4e 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -112,6 +112,9 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
{
SAL_INFO( "vcl.virdev", "ImplInitVirDev(" << nDX << "," << nDY << "," << static_cast<int>(eFormat) << ")" );
+ meRefDevMode = RefDevMode::NONE;
+ mbForceZeroExtleadBug = false;
+
bool bErase = nDX > 0 && nDY > 0;
if ( nDX < 1 )
@@ -166,7 +169,6 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
else if ( pOutDev->GetOutDevType() == OUTDEV_VIRDEV )
mbScreenComp = static_cast<const VirtualDevice*>(pOutDev)->mbScreenComp;
- meOutDevType = OUTDEV_VIRDEV;
mbDevOutput = true;
mxFontCollection = pSVData->maGDIData.mxScreenFontList;
mxFontCache = pSVData->maGDIData.mxScreenFontCache;
@@ -199,8 +201,7 @@ void VirtualDevice::ImplInitVirDev( const OutputDevice* pOutDev,
}
VirtualDevice::VirtualDevice(DeviceFormat eFormat)
-: meRefDevMode( RefDevMode::NONE ),
- mbForceZeroExtleadBug( false )
+ : OutputDevice(OUTDEV_VIRDEV)
{
SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" );
@@ -208,8 +209,7 @@ VirtualDevice::VirtualDevice(DeviceFormat eFormat)
}
VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat)
- : meRefDevMode( RefDevMode::NONE ),
- mbForceZeroExtleadBug( false )
+ : OutputDevice(OUTDEV_VIRDEV)
{
SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" );
@@ -217,8 +217,7 @@ VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat)
}
VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat, DeviceFormat eAlphaFormat)
- : meRefDevMode( RefDevMode::NONE )
- , mbForceZeroExtleadBug( false )
+ : OutputDevice(OUTDEV_VIRDEV)
{
SAL_INFO( "vcl.virdev",
"VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << ", " << static_cast<int>(eAlphaFormat) << " )" );
@@ -231,8 +230,7 @@ VirtualDevice::VirtualDevice(const OutputDevice& rCompDev, DeviceFormat eFormat,
VirtualDevice::VirtualDevice(const SystemGraphicsData *pData, const Size &rSize,
DeviceFormat eFormat)
-: meRefDevMode( RefDevMode::NONE ),
- mbForceZeroExtleadBug( false )
+ : OutputDevice(OUTDEV_VIRDEV)
{
SAL_INFO( "vcl.virdev", "VirtualDevice::VirtualDevice( " << static_cast<int>(eFormat) << " )" );
diff --git a/vcl/source/outdev/outdev.cxx b/vcl/source/outdev/outdev.cxx
index ad56b6d36357..2be0140182c6 100644
--- a/vcl/source/outdev/outdev.cxx
+++ b/vcl/source/outdev/outdev.cxx
@@ -46,7 +46,8 @@ namespace {
// Begin initializer and accessor public functions
-OutputDevice::OutputDevice() :
+OutputDevice::OutputDevice(OutDevType eOutDevType) :
+ meOutDevType(eOutDevType),
maRegion(true),
maFillColor( COL_WHITE ),
maTextLineColor( COL_TRANSPARENT ),
@@ -85,7 +86,6 @@ OutputDevice::OutputDevice() :
if( AllSettings::GetLayoutRTL() ) //#i84553# tip BiDi preference to RTL
mnTextLayoutMode = ComplexTextLayoutFlags::BiDiRtl | ComplexTextLayoutFlags::TextOriginLeft;
- meOutDevType = OUTDEV_DONTKNOW;
meOutDevViewType = OutDevViewType::DontKnow;
mbMap = false;
mbClipRegion = false;
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 247a465f23b7..fc56c4d09d29 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -86,20 +86,18 @@ using namespace ::com::sun::star::datatransfer::dnd;
namespace vcl {
-Window::Window( WindowType nType ) :
- mpWindowImpl(new WindowImpl( nType ))
+Window::Window( WindowType nType )
+ : OutputDevice(OUTDEV_WINDOW)
+ , mpWindowImpl(new WindowImpl( nType ))
{
- meOutDevType = OUTDEV_WINDOW;
-
// true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
mbEnableRTL = AllSettings::GetLayoutRTL();
}
-Window::Window( vcl::Window* pParent, WinBits nStyle ) :
- mpWindowImpl(new WindowImpl( WindowType::WINDOW ))
+Window::Window( vcl::Window* pParent, WinBits nStyle )
+ : OutputDevice(OUTDEV_WINDOW)
+ , mpWindowImpl(new WindowImpl( WindowType::WINDOW ))
{
- meOutDevType = OUTDEV_WINDOW;
-
// true: this outdev will be mirrored if RTL window layout (UI mirroring) is globally active
mbEnableRTL = AllSettings::GetLayoutRTL();