diff options
author | Luboš Luňák <l.lunak@suse.cz> | 2013-02-27 15:52:18 +0100 |
---|---|---|
committer | Luboš Luňák <l.lunak@suse.cz> | 2013-02-27 20:01:57 +0100 |
commit | 1bb6cd6e56ea0932868cba0ec9fe9736a5b8066e (patch) | |
tree | 482d49288788b87317a6542af9dfcf4f94c81676 /vcl | |
parent | 2341da1f207228c274b4449f4bfc2207c9535d31 (diff) |
make OutputDevice::ImplGetGraphics() return the SalGraphics*
Currently it returns int, meaning to be actually a bool returning
whether the call was successful. The pointer can work the same way,
but moreover allows access to SalGraphics* also from outside
of the class (otherwise I don't see much point in the method
being public).
To be used by code for embedded fonts handling for getting a list
of fonts etc.
Change-Id: I64f2acd61c1ce2f6c2e1e4aeac3f2af97c3198de
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/inc/vcl/outdev.hxx | 2 | ||||
-rw-r--r-- | vcl/source/gdi/outdev.cxx | 7 |
2 files changed, 4 insertions, 5 deletions
diff --git a/vcl/inc/vcl/outdev.hxx b/vcl/inc/vcl/outdev.hxx index 1fb5f2546880..a4c398177d03 100644 --- a/vcl/inc/vcl/outdev.hxx +++ b/vcl/inc/vcl/outdev.hxx @@ -361,7 +361,7 @@ private: public: SAL_DLLPRIVATE sal_Int32 ImplGetDPIX() const { return mnDPIX; } SAL_DLLPRIVATE sal_Int32 ImplGetDPIY() const { return mnDPIY; } - SAL_DLLPRIVATE int ImplGetGraphics() const; + SAL_DLLPRIVATE SalGraphics* ImplGetGraphics() const; SAL_DLLPRIVATE void ImplReleaseGraphics( sal_Bool bRelease = sal_True ); SAL_DLLPRIVATE sal_Bool ImplHasMirroredGraphics(); SAL_DLLPRIVATE void ImplReMirror( Point &rPoint ) const; diff --git a/vcl/source/gdi/outdev.cxx b/vcl/source/gdi/outdev.cxx index 231c238bcdae..cb014ec4bfa8 100644 --- a/vcl/source/gdi/outdev.cxx +++ b/vcl/source/gdi/outdev.cxx @@ -564,12 +564,12 @@ void OutputDevice::ImplReMirror( Region &rRegion ) const // ----------------------------------------------------------------------- -int OutputDevice::ImplGetGraphics() const +SalGraphics* OutputDevice::ImplGetGraphics() const { DBG_TESTSOLARMUTEX(); if ( mpGraphics ) - return sal_True; + return mpGraphics; mbInitLineColor = sal_True; mbInitFillColor = sal_True; @@ -709,10 +709,9 @@ int OutputDevice::ImplGetGraphics() const { mpGraphics->SetXORMode( (ROP_INVERT == meRasterOp) || (ROP_XOR == meRasterOp), ROP_INVERT == meRasterOp ); mpGraphics->setAntiAliasB2DDraw(mnAntialiasing & ANTIALIASING_ENABLE_B2DDRAW); - return sal_True; } - return sal_False; + return mpGraphics; } // ----------------------------------------------------------------------- |