summaryrefslogtreecommitdiff
path: root/vcl/source/font
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-19 15:27:07 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-19 20:28:35 +0100
commitf0e90c712b701b2d3b4f4725dfbed8c5ea924b0f (patch)
treef6de2296f69e8ea7ef9f2d51b79bd254b8dc042a /vcl/source/font
parentb27417623835b1c82475783979a1fb9656b5155e (diff)
for testing allow disabling configmgr for time critical paths
Change-Id: I83396e7c90d3b182f353a77c9bdf06fd17af92a1
Diffstat (limited to 'vcl/source/font')
-rw-r--r--vcl/source/font/PhysicalFontCollection.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/vcl/source/font/PhysicalFontCollection.cxx b/vcl/source/font/PhysicalFontCollection.cxx
index dc4c18517816..8ff985b8b1d0 100644
--- a/vcl/source/font/PhysicalFontCollection.cxx
+++ b/vcl/source/font/PhysicalFontCollection.cxx
@@ -23,6 +23,7 @@
#include <vector>
#include <i18nlangtag/mslangid.hxx>
+#include <unotools/configmgr.hxx>
#include <tools/debug.hxx>
#include <config_graphite.h>
@@ -459,6 +460,9 @@ void PhysicalFontCollection::InitMatchData() const
return;
mbMatchData = true;
+ if (utl::ConfigManager::IsAvoidConfig())
+ return;
+
// calculate MatchData for all entries
const utl::FontSubstConfiguration& rFontSubst = utl::FontSubstConfiguration::get();
@@ -1175,7 +1179,7 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
// use font fallback
const utl::FontNameAttr* pFontAttr = NULL;
- if( !aSearchName.isEmpty() )
+ if (!aSearchName.isEmpty() && !utl::ConfigManager::IsAvoidConfig())
{
// get fallback info using FontSubstConfiguration and
// the target name, it's shortened name and family name in that order
@@ -1199,7 +1203,10 @@ PhysicalFontFamily* PhysicalFontCollection::ImplFindByFont( FontSelectPattern& r
if( rFSD.IsSymbolFont() )
{
LanguageTag aDefaultLanguageTag( OUString( "en"));
- aSearchName = utl::DefaultFontConfiguration::get().getDefaultFont( aDefaultLanguageTag, DefaultFontType::SYMBOL );
+ if (utl::ConfigManager::IsAvoidConfig())
+ aSearchName = "OpenSymbol";
+ else
+ aSearchName = utl::DefaultFontConfiguration::get().getDefaultFont( aDefaultLanguageTag, DefaultFontType::SYMBOL );
PhysicalFontFamily* pFoundData = ImplFindByTokenNames( aSearchName );
if( pFoundData )
return pFoundData;