diff options
Diffstat (limited to 'vcl/unx/generic/printergfx/psputil.cxx')
-rw-r--r-- | vcl/unx/generic/printergfx/psputil.cxx | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/vcl/unx/generic/printergfx/psputil.cxx b/vcl/unx/generic/printergfx/psputil.cxx index 9a5de44960e6..e0f82d3fff6a 100644 --- a/vcl/unx/generic/printergfx/psputil.cxx +++ b/vcl/unx/generic/printergfx/psputil.cxx @@ -28,13 +28,11 @@ // MARKER(update_precomp.py): autogen include statement, do not remove #include "precompiled_vcl.hxx" - #include <string.h> - +#include <tools/debug.hxx> +#include <rtl/instance.hxx> #include "psputil.hxx" -#include "tools/debug.hxx" - namespace psp { /* @@ -254,15 +252,17 @@ ConverterFactory::Convert (const sal_Unicode *pText, int nTextLen, return nSize; } -ConverterFactory* -GetConverterFactory () +namespace { - static ConverterFactory* pCvt = NULL; - - if (pCvt == NULL) - pCvt = new ConverterFactory; + class theConverterFactory + : public rtl::Static<ConverterFactory, theConverterFactory> + { + }; +} - return pCvt; +ConverterFactory& GetConverterFactory() +{ + return theConverterFactory::get(); } |