[Libreoffice-commits] core.git: 2 commits - include/vcl vcl/source
Chris Sherlock
chris.sherlock79 at gmail.com
Thu Apr 24 09:10:49 PDT 2014
include/vcl/outdev.hxx | 17 ++++++++++++-----
include/vcl/print.hxx | 7 ++++---
include/vcl/virdev.hxx | 7 ++++---
include/vcl/window.hxx | 5 +++--
vcl/source/gdi/print.cxx | 32 ++++++++++++++++----------------
vcl/source/gdi/virdev.cxx | 8 ++++----
vcl/source/window/window.cxx | 12 ++++++------
7 files changed, 49 insertions(+), 39 deletions(-)
New commits:
commit 8db04e71502686cb525d06dbd342119aac515824
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Fri Apr 25 01:29:54 2014 +1000
VCL: Rename ImplReleaseGraphics to ReleaseGraphics, change to protected
Change-Id: Iff4198fdd51db787461b897f2d9d8b7640dbf772
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 07590f3..dbed1f0 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -421,7 +421,7 @@ protected:
@param bRelease Determines whether to release the fonts of the
physically released graphics device.
*/
- virtual void ImplReleaseGraphics( bool bRelease = true ) = 0;
+ virtual void ReleaseGraphics( bool bRelease = true ) = 0;
public:
/** Initialize the graphics device's data structures.
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index a51122e..605c21a 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -230,7 +230,6 @@ private:
bool mbIsQueuePrinter;
Link maErrorHdl;
- void ImplReleaseFonts() SAL_OVERRIDE;
SAL_DLLPRIVATE void ImplInitData();
SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
SAL_DLLPRIVATE void ImplInitDisplay( const Window* pWindow );
@@ -255,7 +254,8 @@ public:
protected:
virtual bool AcquireGraphics() const SAL_OVERRIDE;
- virtual void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+ virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+ virtual void ImplReleaseFonts() SAL_OVERRIDE;
virtual long GetGradientStepCount( long nMinRect ) SAL_OVERRIDE;
virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 1627270..87205c7 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -63,7 +63,7 @@ private:
protected:
virtual bool AcquireGraphics() const SAL_OVERRIDE;
- virtual void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+ virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
public:
/** Create a virtual device of size 1x1
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index d8d8855..39f9357 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -375,8 +375,6 @@ private:
friend Window* ImplFindWindow( const SalFrame* pFrame, Point& rSalFramePos );
public:
SAL_DLLPRIVATE void ImplInit( Window* pParent, WinBits nStyle, SystemParentData* pSystemParentData );
- bool AcquireGraphics() const SAL_OVERRIDE;
- void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
SAL_DLLPRIVATE WinBits ImplInitRes( const ResId& rResId );
SAL_DLLPRIVATE WindowResHeader ImplLoadResHeader( const ResId& rResId );
SAL_DLLPRIVATE void ImplLoadRes( const ResId& rResId );
@@ -566,6 +564,9 @@ protected:
void CallEventListeners( sal_uLong nEvent, void* pData = NULL );
void FireVclEvent( VclSimpleEvent* pEvent );
+ virtual bool AcquireGraphics() const SAL_OVERRIDE;
+ virtual void ReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+
// FIXME: this is a hack to workaround missing layout functionality
SAL_DLLPRIVATE void ImplAdjustNWFSizes();
diff --git a/vcl/source/gdi/print.cxx b/vcl/source/gdi/print.cxx
index 47190ff..cc8b345 100644
--- a/vcl/source/gdi/print.cxx
+++ b/vcl/source/gdi/print.cxx
@@ -600,7 +600,7 @@ bool Printer::AcquireGraphics() const
{
if ( !pSVData->maGDIData.mpLastVirGraphics )
break;
- pSVData->maGDIData.mpLastVirGraphics->ImplReleaseGraphics();
+ pSVData->maGDIData.mpLastVirGraphics->ReleaseGraphics();
mpGraphics = pVirDev->mpVirDev->AcquireGraphics();
}
// update global LRU list of virtual device graphics
@@ -622,7 +622,7 @@ bool Printer::AcquireGraphics() const
{
if ( !pSVData->maGDIData.mpLastPrnGraphics )
break;
- pSVData->maGDIData.mpLastPrnGraphics->ImplReleaseGraphics();
+ pSVData->maGDIData.mpLastPrnGraphics->ReleaseGraphics();
mpGraphics = mpInfoPrinter->AcquireGraphics();
}
// update global LRU list of printer graphics
@@ -677,7 +677,7 @@ void Printer::ImplReleaseFonts()
}
}
-void Printer::ImplReleaseGraphics( bool bRelease )
+void Printer::ReleaseGraphics( bool bRelease )
{
DBG_TESTSOLARMUTEX();
@@ -1020,7 +1020,7 @@ Printer::~Printer()
delete mpPrinterOptions;
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpInfoPrinter )
ImplGetSVData()->mpDefInst->DestroyInfoPrinter( mpInfoPrinter );
if ( mpDisplayDev )
@@ -1107,7 +1107,7 @@ bool Printer::SetJobSetup( const JobSetup& rSetup )
JobSetup aJobSetup = rSetup;
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpInfoPrinter->SetPrinterData( aJobSetup.ImplGetData() ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
@@ -1137,7 +1137,7 @@ bool Printer::Setup( Window* pWindow )
return false;
pFrame = pWindow->ImplGetFrame();
- ImplReleaseGraphics();
+ ReleaseGraphics();
ImplSVData* pSVData = ImplGetSVData();
pSVData->maAppData.mnModalMode++;
nImplSysDialog++;
@@ -1176,7 +1176,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
// Destroy old printer
if ( !IsDisplayPrinter() )
{
- ImplReleaseGraphics();
+ ReleaseGraphics();
pSVData->mpDefInst->DestroyInfoPrinter( mpInfoPrinter );
if ( mpFontEntry )
{
@@ -1212,7 +1212,7 @@ bool Printer::SetPrinterProps( const Printer* pPrinter )
// Destroy old printer?
if ( GetName() != pPrinter->GetName() )
{
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpDisplayDev )
{
delete mpDisplayDev;
@@ -1281,7 +1281,7 @@ bool Printer::SetOrientation( Orientation eOrientation )
return true;
}
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_ORIENTATION, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
@@ -1322,7 +1322,7 @@ bool Printer::SetPaperBin( sal_uInt16 nPaperBin )
return true;
}
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERBIN, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
@@ -1457,7 +1457,7 @@ bool Printer::SetPaper( Paper ePaper )
return true;
}
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( ePaper == PAPER_USER )
ImplFindPaperFormatForUserSize( aJobSetup, false );
if ( mpInfoPrinter->SetData( SAL_JOBSET_PAPERSIZE|SAL_JOBSET_ORIENTATION, pSetupData ) )
@@ -1519,7 +1519,7 @@ bool Printer::SetPaperSizeUser( const Size& rSize, bool bMatchNearest )
return true;
}
- ImplReleaseGraphics();
+ ReleaseGraphics();
ImplFindPaperFormatForUserSize( aJobSetup, bMatchNearest );
// Changing the paper size can also change the orientation!
@@ -1616,7 +1616,7 @@ bool Printer::SetDuplexMode( DuplexMode eDuplex )
return true;
}
- ImplReleaseGraphics();
+ ReleaseGraphics();
if ( mpInfoPrinter->SetData( SAL_JOBSET_DUPLEXMODE, pSetupData ) )
{
ImplUpdateJobSetupPaper( aJobSetup );
@@ -1705,7 +1705,7 @@ bool Printer::EndJob()
if ( mpPrinter )
{
- ImplReleaseGraphics();
+ ReleaseGraphics();
mnCurPage = 0;
@@ -1735,7 +1735,7 @@ void Printer::ImplStartPage()
SalGraphics* pGraphics = mpPrinter->StartPage( maJobSetup.ImplGetConstData(), mbNewJobSetup );
if ( pGraphics )
{
- ImplReleaseGraphics();
+ ReleaseGraphics();
mpJobGraphics = pGraphics;
}
mbDevOutput = true;
@@ -1760,7 +1760,7 @@ void Printer::ImplEndPage()
if ( mpPrinter )
{
mpPrinter->EndPage();
- ImplReleaseGraphics();
+ ReleaseGraphics();
mbDevOutput = false;
mpJobGraphics = NULL;
diff --git a/vcl/source/gdi/virdev.cxx b/vcl/source/gdi/virdev.cxx
index 616c68b..6378785 100644
--- a/vcl/source/gdi/virdev.cxx
+++ b/vcl/source/gdi/virdev.cxx
@@ -57,7 +57,7 @@ bool VirtualDevice::AcquireGraphics() const
{
if ( !pSVData->maGDIData.mpLastVirGraphics )
break;
- pSVData->maGDIData.mpLastVirGraphics->ImplReleaseGraphics();
+ pSVData->maGDIData.mpLastVirGraphics->ReleaseGraphics();
mpGraphics = mpVirDev->AcquireGraphics();
}
// update global LRU list of virtual device graphics
@@ -81,7 +81,7 @@ bool VirtualDevice::AcquireGraphics() const
return mpGraphics ? true : false;
}
-void VirtualDevice::ImplReleaseGraphics( bool bRelease )
+void VirtualDevice::ReleaseGraphics( bool bRelease )
{
DBG_TESTSOLARMUTEX();
@@ -251,7 +251,7 @@ VirtualDevice::~VirtualDevice()
ImplSVData* pSVData = ImplGetSVData();
- ImplReleaseGraphics();
+ ReleaseGraphics();
delete mpVirDev;
@@ -347,7 +347,7 @@ bool VirtualDevice::InnerImplSetOutputSizePixel( const Size& rNewSize, bool bEra
pGraphics->CopyBits( aPosAry, mpGraphics, this, this );
pNewVirDev->ReleaseGraphics( pGraphics );
- ImplReleaseGraphics();
+ ReleaseGraphics();
delete mpVirDev;
mpVirDev = pNewVirDev;
mnOutWidth = rNewSize.Width();
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 0de07b0..cf53f2a 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -371,7 +371,7 @@ bool Window::AcquireGraphics() const
{
// steal the wingraphics from the other outdev
mpGraphics = pReleaseOutDev->mpGraphics;
- pReleaseOutDev->ImplReleaseGraphics( false );
+ pReleaseOutDev->ReleaseGraphics( false );
}
else
{
@@ -380,7 +380,7 @@ bool Window::AcquireGraphics() const
{
if ( !pSVData->maGDIData.mpLastWinGraphics )
break;
- pSVData->maGDIData.mpLastWinGraphics->ImplReleaseGraphics();
+ pSVData->maGDIData.mpLastWinGraphics->ReleaseGraphics();
mpGraphics = mpWindowImpl->mpFrame->AcquireGraphics();
}
}
@@ -446,7 +446,7 @@ void Window::ClipToPaintRegion(Rectangle& rDstRect)
rDstRect.Intersection(LogicToPixel(aPaintRgn.GetBoundRect()));
}
-void Window::ImplReleaseGraphics( bool bRelease )
+void Window::ReleaseGraphics( bool bRelease )
{
DBG_TESTSOLARMUTEX();
@@ -1270,7 +1270,7 @@ void Window::ImplRemoveWindow( bool bRemoveFrameData )
{
// release the graphic
OutputDevice *pOutDev = GetOutDev();
- pOutDev->ImplReleaseGraphics();
+ pOutDev->ReleaseGraphics();
}
}
@@ -3192,7 +3192,7 @@ void Window::ImplUpdateWindowPtr( Window* pWindow )
{
// release graphic
OutputDevice *pOutDev = GetOutDev();
- pOutDev->ImplReleaseGraphics();
+ pOutDev->ReleaseGraphics();
}
mpWindowImpl->mpFrameData = pWindow->mpWindowImpl->mpFrameData;
@@ -4651,7 +4651,7 @@ Window::~Window()
// release SalGraphics
OutputDevice *pOutDev = GetOutDev();
- pOutDev->ImplReleaseGraphics();
+ pOutDev->ReleaseGraphics();
// notify ImplDelData subscribers of this window about the window deletion
ImplDelData* pDelData = mpWindowImpl->mpFirstDel;
commit 35dd2809c1e08bfe0e5d9b19a330a11609085155
Author: Chris Sherlock <chris.sherlock79 at gmail.com>
Date: Fri Apr 25 00:53:01 2014 +1000
OutputDevice::AcquireGraphics should be protected, not public
Change-Id: I1aacc4a908798fda24de6b6f09b58dcf5d392e70
diff --git a/include/vcl/outdev.hxx b/include/vcl/outdev.hxx
index 71f8022..07590f3 100644
--- a/include/vcl/outdev.hxx
+++ b/include/vcl/outdev.hxx
@@ -22,22 +22,27 @@
#include <tools/gen.hxx>
#include <tools/solar.h>
-#include <vcl/dllapi.h>
#include <tools/rc.hxx>
#include <tools/color.hxx>
+#include <tools/poly.hxx>
+
+#include <vcl/dllapi.h>
#include <vcl/font.hxx>
#include <vcl/region.hxx>
#include <vcl/mapmod.hxx>
#include <vcl/wall.hxx>
#include <vcl/metaact.hxx>
#include <vcl/salnativewidgets.hxx>
-#include <tools/poly.hxx>
+
#include <basegfx/vector/b2enums.hxx>
-#include <com/sun/star/uno/Reference.h>
-#include <unotools/fontdefs.hxx>
#include <basegfx/polygon/b2dpolypolygon.hxx>
+
+#include <unotools/fontdefs.hxx>
+
#include <boost/scoped_ptr.hpp>
+
#include <com/sun/star/drawing/LineCap.hpp>
+#include <com/sun/star/uno/Reference.h>
#include <vector>
@@ -388,6 +393,7 @@ public:
SAL_DLLPRIVATE SalGraphics const *GetGraphics() const;
SAL_DLLPRIVATE SalGraphics* GetGraphics();
+protected:
/** Acquire a graphics device that the output device uses to draw on.
There is an LRU of OutputDevices that is used to get the graphics. The
@@ -417,6 +423,7 @@ public:
*/
virtual void ImplReleaseGraphics( bool bRelease = true ) = 0;
+public:
/** Initialize the graphics device's data structures.
*/
SAL_DLLPRIVATE void ImplInitOutDevData();
diff --git a/include/vcl/print.hxx b/include/vcl/print.hxx
index 58651d5..a51122e 100644
--- a/include/vcl/print.hxx
+++ b/include/vcl/print.hxx
@@ -230,8 +230,6 @@ private:
bool mbIsQueuePrinter;
Link maErrorHdl;
- bool AcquireGraphics() const SAL_OVERRIDE;
- void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
void ImplReleaseFonts() SAL_OVERRIDE;
SAL_DLLPRIVATE void ImplInitData();
SAL_DLLPRIVATE void ImplInit( SalPrinterQueueInfo* pInfo );
@@ -256,6 +254,9 @@ public:
SAL_DLLPRIVATE void ImplEndPage();
protected:
+ virtual bool AcquireGraphics() const SAL_OVERRIDE;
+ virtual void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+
virtual long GetGradientStepCount( long nMinRect ) SAL_OVERRIDE;
virtual bool UsePolyPolygonForComplexGradient() SAL_OVERRIDE;
diff --git a/include/vcl/virdev.hxx b/include/vcl/virdev.hxx
index 6b1af90..1627270 100644
--- a/include/vcl/virdev.hxx
+++ b/include/vcl/virdev.hxx
@@ -60,9 +60,10 @@ private:
#define REFDEV_FORCE_ZERO_EXTLEAD 0x80
SAL_DLLPRIVATE bool ForceZeroExtleadBug() const
{ return ((meRefDevMode & REFDEV_FORCE_ZERO_EXTLEAD) != 0); }
-public:
- bool AcquireGraphics() const SAL_OVERRIDE;
- void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
+
+protected:
+ virtual bool AcquireGraphics() const SAL_OVERRIDE;
+ virtual void ImplReleaseGraphics( bool bRelease = true ) SAL_OVERRIDE;
public:
/** Create a virtual device of size 1x1
More information about the Libreoffice-commits
mailing list