summaryrefslogtreecommitdiff
path: root/drawinglayer
diff options
context:
space:
mode:
authorTomaž Vajngerl <tomaz.vajngerl@collabora.co.uk>2020-10-18 21:59:15 +0200
committerTomaž Vajngerl <quikee@gmail.com>2020-11-23 08:30:33 +0100
commite4ee7fed48c540a857c49d2e32384981c9275083 (patch)
tree210e7e78d69c5602e51207f5c214158702d056bf /drawinglayer
parent9f7999c6281293d01f143e899056d72496868345 (diff)
simplify namespaces and clean-up for TextLayouterDevice
Move anonymous namespace into drawinglayer::primitive2d and convert static function into anonymous functions. Change-Id: Id8ff161a5ec69154f053fadd1178265fa2675139 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106383 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'drawinglayer')
-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())