summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--vcl/inc/font/OpenTypeFeatureDefinitionList.hxx6
-rw-r--r--vcl/inc/osx/a11yfocustracker.hxx6
-rw-r--r--vcl/osx/a11yfactory.mm2
-rw-r--r--vcl/osx/a11yfocuslistener.cxx2
-rw-r--r--vcl/osx/a11yfocustracker.cxx6
-rw-r--r--vcl/osx/a11ylistener.cxx2
-rw-r--r--vcl/source/font/FeatureCollector.cxx5
-rw-r--r--vcl/source/font/OpenTypeFeatureDefinitionList.cxx6
-rw-r--r--vcl/source/treelist/treelistbox.cxx1
-rw-r--r--vcl/source/window/split.cxx33
-rw-r--r--vcl/unx/generic/glyphs/freetype_glyphcache.cxx2
11 files changed, 34 insertions, 37 deletions
diff --git a/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
index bf4e51c75c39..52dbcfb5b9f0 100644
--- a/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
+++ b/vcl/inc/font/OpenTypeFeatureDefinitionList.hxx
@@ -11,7 +11,6 @@
#include <vcl/dllapi.h>
#include <vcl/font/Feature.hxx>
-#include <rtl/instance.hxx>
#include <vector>
#include <unordered_map>
@@ -35,10 +34,7 @@ public:
bool isRequired(sal_uInt32 nFeatureCode);
};
-class VCL_DLLPUBLIC OpenTypeFeatureDefinitionList
- : public rtl::Static<OpenTypeFeatureDefinitionListPrivate, OpenTypeFeatureDefinitionList>
-{
-};
+VCL_DLLPUBLIC OpenTypeFeatureDefinitionListPrivate& OpenTypeFeatureDefinitionList();
} // namespace vcl::font
diff --git a/vcl/inc/osx/a11yfocustracker.hxx b/vcl/inc/osx/a11yfocustracker.hxx
index 5a979c26c86b..aafa9944de70 100644
--- a/vcl/inc/osx/a11yfocustracker.hxx
+++ b/vcl/inc/osx/a11yfocustracker.hxx
@@ -23,8 +23,6 @@
#include "keyboardfocuslistener.hxx"
-#include <rtl/instance.hxx>
-
#include <tools/link.hxx>
#include <vcl/vclevent.hxx>
#include <set>
@@ -93,9 +91,7 @@ private:
const rtl::Reference< DocumentFocusListener > m_xDocumentFocusListener;
};
-struct TheAquaA11yFocusTracker:
- rtl::Static<AquaA11yFocusTracker, TheAquaA11yFocusTracker>
-{};
+AquaA11yFocusTracker& TheAquaA11yFocusTracker();
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/a11yfactory.mm b/vcl/osx/a11yfactory.mm
index 797a7492d391..560d3f97357a 100644
--- a/vcl/osx/a11yfactory.mm
+++ b/vcl/osx/a11yfactory.mm
@@ -59,7 +59,7 @@ static bool enabled = false;
mdAllWrapper = [ [ [ NSMutableDictionary alloc ] init ] retain ];
// initialize keyboard focus tracker
rtl::Reference< AquaA11yFocusListener > listener( AquaA11yFocusListener::get() );
- TheAquaA11yFocusTracker::get().setFocusListener(listener);
+ TheAquaA11yFocusTracker().setFocusListener(listener);
enabled = true;
}
return mdAllWrapper;
diff --git a/vcl/osx/a11yfocuslistener.cxx b/vcl/osx/a11yfocuslistener.cxx
index 68eb45a31f20..bae851647e6b 100644
--- a/vcl/osx/a11yfocuslistener.cxx
+++ b/vcl/osx/a11yfocuslistener.cxx
@@ -42,7 +42,7 @@ AquaA11yFocusListener::AquaA11yFocusListener() : m_focusedObject(nil)
id AquaA11yFocusListener::getFocusedUIElement()
{
if ( nil == m_focusedObject ) {
- Reference< XAccessible > xAccessible( TheAquaA11yFocusTracker::get().getFocusedObject() );
+ Reference< XAccessible > xAccessible( TheAquaA11yFocusTracker().getFocusedObject() );
try {
if( xAccessible.is() ) {
Reference< XAccessibleContext > xContext(xAccessible->getAccessibleContext());
diff --git a/vcl/osx/a11yfocustracker.cxx b/vcl/osx/a11yfocustracker.cxx
index 000a4f04fd59..9aa3ae9fb733 100644
--- a/vcl/osx/a11yfocustracker.cxx
+++ b/vcl/osx/a11yfocustracker.cxx
@@ -35,6 +35,12 @@
using namespace ::com::sun::star::accessibility;
using namespace ::com::sun::star::uno;
+AquaA11yFocusTracker& TheAquaA11yFocusTracker()
+{
+ static AquaA11yFocusTracker SINGLETON;
+ return SINGLETON;
+}
+
static vcl::Window *
getWindow(const ::VclSimpleEvent *pEvent)
{
diff --git a/vcl/osx/a11ylistener.cxx b/vcl/osx/a11ylistener.cxx
index b8220c07d933..b34d047b3b7b 100644
--- a/vcl/osx/a11ylistener.cxx
+++ b/vcl/osx/a11ylistener.cxx
@@ -80,7 +80,7 @@ AquaA11yEventListener::notifyEvent( const AccessibleEventObject& aEvent )
if( m_role != AccessibleRole::LIST ) {
Reference< XAccessible > xAccessible;
if( aEvent.NewValue >>= xAccessible )
- TheAquaA11yFocusTracker::get().setFocusedObject( xAccessible );
+ TheAquaA11yFocusTracker().setFocusedObject( xAccessible );
}
break;
diff --git a/vcl/source/font/FeatureCollector.cxx b/vcl/source/font/FeatureCollector.cxx
index 6448860f9998..6cb1b14c52cd 100644
--- a/vcl/source/font/FeatureCollector.cxx
+++ b/vcl/source/font/FeatureCollector.cxx
@@ -95,15 +95,14 @@ void FeatureCollector::collectForLanguage(hb_tag_t aTableTag, sal_uInt32 nScript
for (hb_tag_t aFeatureTag : aFeatureTags)
{
- if (OpenTypeFeatureDefinitionList::get().isRequired(aFeatureTag))
+ if (OpenTypeFeatureDefinitionList().isRequired(aFeatureTag))
continue;
m_rFontFeatures.emplace_back();
vcl::font::Feature& rFeature = m_rFontFeatures.back();
rFeature.m_aID = { aFeatureTag, aScriptTag, aLanguageTag };
- FeatureDefinition aDefinition
- = OpenTypeFeatureDefinitionList::get().getDefinition(aFeatureTag);
+ FeatureDefinition aDefinition = OpenTypeFeatureDefinitionList().getDefinition(aFeatureTag);
if (aDefinition)
{
rFeature.m_aDefinition = aDefinition;
diff --git a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
index 9c3a0ca6af49..185668ba7f2f 100644
--- a/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
+++ b/vcl/source/font/OpenTypeFeatureDefinitionList.cxx
@@ -17,6 +17,12 @@
namespace vcl::font
{
+OpenTypeFeatureDefinitionListPrivate& OpenTypeFeatureDefinitionList()
+{
+ static OpenTypeFeatureDefinitionListPrivate SINGLETON;
+ return SINGLETON;
+};
+
OpenTypeFeatureDefinitionListPrivate::OpenTypeFeatureDefinitionListPrivate() { init(); }
void OpenTypeFeatureDefinitionListPrivate::init()
diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx
index 8782547f4c92..d1658582c5af 100644
--- a/vcl/source/treelist/treelistbox.cxx
+++ b/vcl/source/treelist/treelistbox.cxx
@@ -34,7 +34,6 @@
#include <vcl/uitest/uiobject.hxx>
#include <sot/formats.hxx>
#include <unotools/accessiblestatesethelper.hxx>
-#include <rtl/instance.hxx>
#include <comphelper/string.hxx>
#include <sal/log.hxx>
#include <tools/debug.hxx>
diff --git a/vcl/source/window/split.cxx b/vcl/source/window/split.cxx
index 7c4a31dde9c8..df631b270bbf 100644
--- a/vcl/source/window/split.cxx
+++ b/vcl/source/window/split.cxx
@@ -27,25 +27,22 @@
#include <vcl/lineinfo.hxx>
#include <vcl/settings.hxx>
#include <vcl/ptrstyle.hxx>
-
-#include <rtl/instance.hxx>
+#include <vcl/lazydelete.hxx>
#include <window.h>
namespace
{
- struct ImplBlackWall
- : public rtl::StaticWithInit<Wallpaper, ImplBlackWall> {
- Wallpaper operator () () {
- return Wallpaper(COL_BLACK);
- }
- };
- struct ImplWhiteWall
- : public rtl::StaticWithInit<Wallpaper, ImplWhiteWall> {
- Wallpaper operator () () {
- return Wallpaper(COL_LIGHTGRAY);
- }
- };
+ Wallpaper& ImplBlackWall()
+ {
+ static vcl::DeleteOnDeinit< Wallpaper > SINGLETON(COL_BLACK);
+ return *SINGLETON.get();
+ }
+ Wallpaper& ImplWhiteWall()
+ {
+ static vcl::DeleteOnDeinit< Wallpaper > SINGLETON(COL_LIGHTGRAY);
+ return *SINGLETON.get();
+ }
}
// Should only be called from an ImplInit method for initialization or
@@ -81,9 +78,9 @@ void Splitter::ImplInit( vcl::Window* pParent, WinBits nWinStyle )
ImplInitHorVer(nWinStyle & WB_HSCROLL);
if( GetSettings().GetStyleSettings().GetFaceColor().IsDark() )
- SetBackground( ImplWhiteWall::get() );
+ SetBackground( ImplWhiteWall() );
else
- SetBackground( ImplBlackWall::get() );
+ SetBackground( ImplBlackWall() );
TaskPaneList *pTList = GetSystemWindow()->GetTaskPaneList();
pTList->AddWindow( this );
@@ -662,9 +659,9 @@ void Splitter::DataChanged( const DataChangedEvent& rDCEvt )
if( oldFaceColor.IsDark() != newFaceColor.IsDark() )
{
if( newFaceColor.IsDark() )
- SetBackground( ImplWhiteWall::get() );
+ SetBackground( ImplWhiteWall() );
else
- SetBackground( ImplBlackWall::get() );
+ SetBackground( ImplBlackWall() );
}
}
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 7a31f981a371..5754e2e6448c 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -48,8 +48,6 @@
#include FT_SYNTHESIS_H
#include FT_TRUETYPE_TABLES_H
-#include <rtl/instance.hxx>
-
#include <vector>
// TODO: move file mapping stuff to OSL