summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2011-05-16 22:33:05 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-05-20 15:23:39 +0100
commit06a3ac41e345de900cbe9d2b6e7772a78e2d7393 (patch)
treed62ce03e73e9116d149ccd9423b286beff5f67e3
parent63a8d58ef8fa7c59e6aff755e6546e725b513f39 (diff)
adjust for non leaky singleton
-rw-r--r--vcl/source/app/settings.cxx2
-rw-r--r--vcl/source/gdi/font.cxx6
-rw-r--r--vcl/source/gdi/outdev3.cxx14
-rw-r--r--vcl/source/window/window.cxx2
4 files changed, 12 insertions, 12 deletions
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index a84b8c52d89a..9c7e76a392ae 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -544,7 +544,7 @@ void ImplStyleData::SetStandardStyles()
Font aStdFont( FAMILY_SWISS, Size( 0, 8 ) );
aStdFont.SetCharSet( gsl_getSystemTextEncoding() );
aStdFont.SetWeight( WEIGHT_NORMAL );
- aStdFont.SetName( utl::DefaultFontConfiguration::get()->getUserInterfaceFont(com::sun::star::lang::Locale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString(), rtl::OUString() ) ) );
+ aStdFont.SetName( utl::DefaultFontConfiguration::get().getUserInterfaceFont(com::sun::star::lang::Locale( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), rtl::OUString(), rtl::OUString() ) ) );
maAppFont = aStdFont;
maHelpFont = aStdFont;
maMenuFont = aStdFont;
diff --git a/vcl/source/gdi/font.cxx b/vcl/source/gdi/font.cxx
index 2a10563441fa..03708f865c96 100644
--- a/vcl/source/gdi/font.cxx
+++ b/vcl/source/gdi/font.cxx
@@ -168,7 +168,7 @@ void Impl_Font::AskConfig()
mbConfigLookup = true;
// prepare the FontSubst configuration lookup
- const utl::FontSubstConfiguration* pFontSubst = utl::FontSubstConfiguration::get();
+ const utl::FontSubstConfiguration& rFontSubst = utl::FontSubstConfiguration::get();
String aShortName;
String aFamilyName;
@@ -181,11 +181,11 @@ void Impl_Font::AskConfig()
aShortName, aFamilyName, eWeight, eWidthType, nType );
// lookup the font name in the configuration
- const utl::FontNameAttr* pFontAttr = pFontSubst->getSubstInfo( aMapName );
+ const utl::FontNameAttr* pFontAttr = rFontSubst.getSubstInfo( aMapName );
// if the direct lookup failed try again with an alias name
if ( !pFontAttr && (aShortName != aMapName) )
- pFontAttr = pFontSubst->getSubstInfo( aShortName );
+ pFontAttr = rFontSubst.getSubstInfo( aShortName );
if( pFontAttr )
{
diff --git a/vcl/source/gdi/outdev3.cxx b/vcl/source/gdi/outdev3.cxx
index d5f0d292fc89..8f579d59790b 100644
--- a/vcl/source/gdi/outdev3.cxx
+++ b/vcl/source/gdi/outdev3.cxx
@@ -512,7 +512,7 @@ Font OutputDevice::GetDefaultFont( sal_uInt16 nType, LanguageType eLang,
MsLangId::convertLanguageToLocale( eLang, aLocale );
}
- utl::DefaultFontConfiguration& rDefaults = *utl::DefaultFontConfiguration::get();
+ utl::DefaultFontConfiguration& rDefaults = utl::DefaultFontConfiguration::get();
String aSearch = rDefaults.getUserInterfaceFont( aLocale ); // ensure a fallback
String aDefault = rDefaults.getDefaultFont( aLocale, nType );
if( aDefault.Len() )
@@ -1665,7 +1665,7 @@ void ImplDevFontList::InitMatchData() const
mbMatchData = true;
// calculate MatchData for all entries
- const FontSubstConfiguration& rFontSubst = *FontSubstConfiguration::get();
+ const FontSubstConfiguration& rFontSubst = FontSubstConfiguration::get();
DevFontList::const_iterator it = maDevFontList.begin();
for(; it != maDevFontList.end(); ++it )
@@ -1681,7 +1681,7 @@ void ImplDevFontList::InitMatchData() const
ImplDevFontListData* ImplDevFontList::ImplFindByLocale( com::sun::star::lang::Locale& rLocale ) const
{
// get the default font for a specified locale
- const DefaultFontConfiguration& rDefaults = *DefaultFontConfiguration::get();
+ const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get();
const String aDefault = rDefaults.getUserInterfaceFont( rLocale );
ImplDevFontListData* pFontData = ImplFindByTokenNames( aDefault );
if( pFontData )
@@ -2057,7 +2057,7 @@ ImplDevFontListData* ImplDevFontList::FindDefaultFont() const
{
// try to find one of the default fonts of the
// UNICODE, SANSSERIF, SERIF or FIXED default font lists
- const DefaultFontConfiguration& rDefaults = *DefaultFontConfiguration::get();
+ const DefaultFontConfiguration& rDefaults = DefaultFontConfiguration::get();
com::sun::star::lang::Locale aLocale( OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), OUString(), OUString() );
String aFontname = rDefaults.getDefaultFont( aLocale, DEFAULTFONT_SANS_UNICODE );
ImplDevFontListData* pFoundData = ImplFindByTokenNames( aFontname );
@@ -2591,7 +2591,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
{
// get fallback info using FontSubstConfiguration and
// the target name, it's shortened name and family name in that order
- const FontSubstConfiguration& rFontSubst = *FontSubstConfiguration::get();
+ const FontSubstConfiguration& rFontSubst = FontSubstConfiguration::get();
pFontAttr = rFontSubst.getSubstInfo( aSearchName );
if ( !pFontAttr && (aSearchShortName != aSearchName) )
pFontAttr = rFontSubst.getSubstInfo( aSearchShortName );
@@ -2611,7 +2611,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
if( rFSD.IsSymbolFont() )
{
com::sun::star::lang::Locale aDefaultLocale( OUString( RTL_CONSTASCII_USTRINGPARAM("en") ), OUString(), OUString() );
- aSearchName = DefaultFontConfiguration::get()->getDefaultFont( aDefaultLocale, DEFAULTFONT_SYMBOL );
+ aSearchName = DefaultFontConfiguration::get().getDefaultFont( aDefaultLocale, DEFAULTFONT_SYMBOL );
ImplDevFontListData* pFoundData = ImplFindByTokenNames( aSearchName );
if( pFoundData )
return pFoundData;
@@ -2647,7 +2647,7 @@ ImplDevFontListData* ImplDevFontList::ImplFindByFont( ImplFontSelectData& rFSD,
// get fallback info using FontSubstConfiguration and
// the target name, it's shortened name and family name in that order
- const FontSubstConfiguration& rFontSubst = *FontSubstConfiguration::get();
+ const FontSubstConfiguration& rFontSubst = FontSubstConfiguration::get();
const FontNameAttr* pTempFontAttr = rFontSubst.getSubstInfo( aSearchName );
if ( !pTempFontAttr && (aTempShortName != aSearchName) )
pTempFontAttr = rFontSubst.getSubstInfo( aTempShortName );
diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx
index 8702ca3c8b01..c392c6dfe587 100644
--- a/vcl/source/window/window.cxx
+++ b/vcl/source/window/window.cxx
@@ -321,7 +321,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, sal_Bool bCallHdl
if ( !bUseSystemFont )
{
ImplInitFontList();
- String aConfigFont = utl::DefaultFontConfiguration::get()->getUserInterfaceFont( rSettings.GetUILocale() );
+ String aConfigFont = utl::DefaultFontConfiguration::get().getUserInterfaceFont( rSettings.GetUILocale() );
xub_StrLen nIndex = 0;
while( nIndex != STRING_NOTFOUND )
{