summaryrefslogtreecommitdiff
path: root/i18nutil
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-07-10 11:04:50 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-19 01:04:00 +0000
commit6b7354ae66db40246a09e00aa876443057655a43 (patch)
treee7eb5d71ecd2a6ec8110945a946549500dae7a8a /i18nutil
parent5120b3f30614f6e4988c512577da1d70be8d25b1 (diff)
for testing allow disabling configmgr for time critical paths
Change-Id: I08021f18d53e1748927f8847649994f95252bbc2 Reviewed-on: https://gerrit.libreoffice.org/17844 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'i18nutil')
-rw-r--r--i18nutil/Library_i18nutil.mk1
-rw-r--r--i18nutil/source/utility/paper.cxx4
2 files changed, 5 insertions, 0 deletions
diff --git a/i18nutil/Library_i18nutil.mk b/i18nutil/Library_i18nutil.mk
index 1c5837c30e16..4dcfbdda64da 100644
--- a/i18nutil/Library_i18nutil.mk
+++ b/i18nutil/Library_i18nutil.mk
@@ -36,6 +36,7 @@ $(eval $(call gb_Library_add_defs,i18nutil,\
))
$(eval $(call gb_Library_use_libraries,i18nutil,\
+ utl \
i18nlangtag \
comphelper \
cppu \
diff --git a/i18nutil/source/utility/paper.cxx b/i18nutil/source/utility/paper.cxx
index 73993bffddf6..c61bac6ab0ec 100644
--- a/i18nutil/source/utility/paper.cxx
+++ b/i18nutil/source/utility/paper.cxx
@@ -30,6 +30,7 @@
#include <utility>
#include <cstdlib>
+#include <unotools/configmgr.hxx>
#ifdef UNX
#include <stdio.h>
@@ -207,6 +208,9 @@ long PaperInfo::sloppyFitPageDimension(long nDimension)
PaperInfo PaperInfo::getSystemDefaultPaper()
{
+ if (utl::ConfigManager::IsAvoidConfig())
+ return PaperInfo(PAPER_A4);
+
OUString aLocaleStr = officecfg::Setup::L10N::ooSetupSystemLocale::get();
#ifdef UNX