summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--drawinglayer/source/primitive2d/textlayoutdevice.cxx18
1 files changed, 8 insertions, 10 deletions
diff --git a/drawinglayer/source/primitive2d/textlayoutdevice.cxx b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
index c842517b3e72..933476b2045a 100644
--- a/drawinglayer/source/primitive2d/textlayoutdevice.cxx
+++ b/drawinglayer/source/primitive2d/textlayoutdevice.cxx
@@ -36,12 +36,14 @@
#include <i18nlangtag/languagetag.hxx>
#include <vcl/svapp.hxx>
-// VDev RevDevice provider
-
+namespace drawinglayer::primitive2d
+{
namespace
{
class ImpTimedRefDev;
+// VDev RevDevice provider
+
//the scoped_timed_RefDev owns an ImpTimeRefDev and releases it on dtor
//or disposing of the default XComponentContext which causes the underlying
//OutputDevice to get released
@@ -130,14 +132,8 @@ void ImpTimedRefDev::releaseVirtualDevice()
Start();
}
}
-} // end of anonymous namespace
-
-// access to one global ImpTimedRefDev incarnation in namespace drawinglayer::primitive
-namespace drawinglayer::primitive2d
-{
-// static methods here
-static VirtualDevice& acquireGlobalVirtualDevice()
+VirtualDevice& acquireGlobalVirtualDevice()
{
scoped_timed_RefDev& rStdRefDevice = the_scoped_timed_RefDev::get();
@@ -147,7 +143,7 @@ static VirtualDevice& acquireGlobalVirtualDevice()
return rStdRefDevice->acquireVirtualDevice();
}
-static void releaseGlobalVirtualDevice()
+void releaseGlobalVirtualDevice()
{
scoped_timed_RefDev& rStdRefDevice = the_scoped_timed_RefDev::get();
@@ -156,6 +152,8 @@ static void releaseGlobalVirtualDevice()
rStdRefDevice->releaseVirtualDevice();
}
+} // end of anonymous namespace
+
TextLayouterDevice::TextLayouterDevice()
: maSolarGuard()
, mrDevice(acquireGlobalVirtualDevice())