diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-07-10 11:04:50 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-08-19 01:04:00 +0000 |
commit | 6b7354ae66db40246a09e00aa876443057655a43 (patch) | |
tree | e7eb5d71ecd2a6ec8110945a946549500dae7a8a /sw | |
parent | 5120b3f30614f6e4988c512577da1d70be8d25b1 (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 'sw')
-rw-r--r-- | sw/source/core/bastyp/init.cxx | 16 | ||||
-rw-r--r-- | sw/source/core/doc/DocumentSettingManager.cxx | 44 | ||||
-rw-r--r-- | sw/source/core/doc/docdesc.cxx | 3 | ||||
-rw-r--r-- | sw/source/core/doc/number.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/draw/drawdoc.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 3 | ||||
-rw-r--r-- | sw/source/uibase/app/docshdrw.cxx | 4 |
7 files changed, 58 insertions, 19 deletions
diff --git a/sw/source/core/bastyp/init.cxx b/sw/source/core/bastyp/init.cxx index 1d3962a105db..9e7858712f0c 100644 --- a/sw/source/core/bastyp/init.cxx +++ b/sw/source/core/bastyp/init.cxx @@ -123,6 +123,7 @@ #include <tools/globname.hxx> #include <tox.hxx> #include <unotools/charclass.hxx> +#include <unotools/configmgr.hxx> #include <unotools/collatorwrapper.hxx> #include <unotools/syslocale.hxx> #include <unotools/transliterationwrapper.hxx> @@ -740,9 +741,16 @@ void _InitCore() pGlobalOLEExcludeList = new std::vector<SvGlobalName*>; - const SvxSwAutoFormatFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); - SwDoc::mpACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, + if (!utl::ConfigManager::IsAvoidConfig()) + { + const SvxSwAutoFormatFlags& rAFlags = SvxAutoCorrCfg::Get().GetAutoCorrect()->GetSwFlags(); + SwDoc::mpACmpltWords = new SwAutoCompleteWord( rAFlags.nAutoCmpltListLen, rAFlags.nAutoCmpltWordLen ); + } + else + { + SwDoc::mpACmpltWords = new SwAutoCompleteWord( 0, 0 ); + } } void _FinitCore() @@ -855,7 +863,9 @@ void SwCalendarWrapper::LoadDefaultCalendar( sal_uInt16 eLang ) LanguageType GetAppLanguage() { - return Application::GetSettings().GetLanguageTag().getLanguageType(); + if (!utl::ConfigManager::IsAvoidConfig()) + return Application::GetSettings().GetLanguageTag().getLanguageType(); + return LANGUAGE_ENGLISH_US; } const LanguageTag& GetAppLanguageTag() diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx index 6970d1f8044e..e9cb58a73f0a 100644 --- a/sw/source/core/doc/DocumentSettingManager.cxx +++ b/sw/source/core/doc/DocumentSettingManager.cxx @@ -26,6 +26,7 @@ #include <editeng/forbiddencharacterstable.hxx> #include <svx/svdmodel.hxx> #include <unotools/compatibility.hxx> +#include <unotools/configmgr.hxx> #include <drawdoc.hxx> #include <swmodule.hxx> #include <linkenum.hxx> @@ -92,19 +93,36 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc) // Note: Any non-hidden compatibility flag should obtain its default // by asking SvtCompatibilityOptions, see below. - const SvtCompatibilityOptions aOptions; - mbParaSpaceMax = aOptions.IsAddSpacing(); - mbParaSpaceMaxAtPages = aOptions.IsAddSpacingAtPages(); - mbTabCompat = !aOptions.IsUseOurTabStops(); - mbUseVirtualDevice = !aOptions.IsUsePrtDevice(); - mbAddExternalLeading = !aOptions.IsNoExtLeading(); - mbOldLineSpacing = aOptions.IsUseLineSpacing(); - mbAddParaSpacingToTableCells = aOptions.IsAddTableSpacing(); - mbUseFormerObjectPos = aOptions.IsUseObjectPositioning(); - mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); - mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); - - mbDoNotJustifyLinesWithManualBreak = !aOptions.IsExpandWordSpace(); + if (!utl::ConfigManager::IsAvoidConfig()) + { + const SvtCompatibilityOptions aOptions; + mbParaSpaceMax = aOptions.IsAddSpacing(); + mbParaSpaceMaxAtPages = aOptions.IsAddSpacingAtPages(); + mbTabCompat = !aOptions.IsUseOurTabStops(); + mbUseVirtualDevice = !aOptions.IsUsePrtDevice(); + mbAddExternalLeading = !aOptions.IsNoExtLeading(); + mbOldLineSpacing = aOptions.IsUseLineSpacing(); + mbAddParaSpacingToTableCells = aOptions.IsAddTableSpacing(); + mbUseFormerObjectPos = aOptions.IsUseObjectPositioning(); + mbUseFormerTextWrapping = aOptions.IsUseOurTextWrapping(); + mbConsiderWrapOnObjPos = aOptions.IsConsiderWrappingStyle(); + + mbDoNotJustifyLinesWithManualBreak = !aOptions.IsExpandWordSpace(); + } + else + { + mbParaSpaceMax = false; + mbParaSpaceMaxAtPages = false; + mbTabCompat = true; + mbUseVirtualDevice = true; + mbAddExternalLeading = true; + mbOldLineSpacing = false; + mbAddParaSpacingToTableCells = false; + mbUseFormerObjectPos = false; + mbUseFormerTextWrapping = false; + mbConsiderWrapOnObjPos = false; + mbDoNotJustifyLinesWithManualBreak = true; + } // COMPATIBILITY FLAGS END diff --git a/sw/source/core/doc/docdesc.cxx b/sw/source/core/doc/docdesc.cxx index 240d2ea3d518..8663fda3b57b 100644 --- a/sw/source/core/doc/docdesc.cxx +++ b/sw/source/core/doc/docdesc.cxx @@ -56,6 +56,7 @@ #include <SwUndoPageDesc.hxx> #include <pagedeschint.hxx> #include <tgrditem.hxx> +#include <unotools/configmgr.hxx> #include <unotools/syslocale.hxx> #include <boost/scoped_ptr.hpp> @@ -92,7 +93,7 @@ static void lcl_DefaultPageFormat( sal_uInt16 nPoolFormatId, nMinRight = nMinTop = nMinBottom = GetMetricVal( CM_1 ); nMinLeft = nMinRight * 2; } - else if( MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() ) + else if (!utl::ConfigManager::IsAvoidConfig() && MEASURE_METRIC == SvtSysLocale().GetLocaleData().getMeasurementSystemEnum() ) { nMinTop = nMinBottom = nMinLeft = nMinRight = 1134; // 2 centimetres } diff --git a/sw/source/core/doc/number.cxx b/sw/source/core/doc/number.cxx index be310a1f54d5..3fd8614989c1 100644 --- a/sw/source/core/doc/number.cxx +++ b/sw/source/core/doc/number.cxx @@ -37,6 +37,7 @@ #include <SwStyleNameMapper.hxx> // Needed to load default bullet list configuration +#include <unotools/configmgr.hxx> #include <unotools/configitem.hxx> #include <numrule.hxx> @@ -1412,6 +1413,9 @@ namespace numfunc SvxNumberFormat::SvxNumPositionAndSpaceMode GetDefaultPositionAndSpaceMode() { + if (utl::ConfigManager::IsAvoidConfig()) + return SvxNumberFormat::LABEL_ALIGNMENT; + SvxNumberFormat::SvxNumPositionAndSpaceMode ePosAndSpaceMode; SvtSaveOptions aSaveOptions; switch ( aSaveOptions.GetODFDefaultVersion() ) diff --git a/sw/source/core/draw/drawdoc.cxx b/sw/source/core/draw/drawdoc.cxx index 10130c2dfb0b..3f8bd09a1df6 100644 --- a/sw/source/core/draw/drawdoc.cxx +++ b/sw/source/core/draw/drawdoc.cxx @@ -19,6 +19,7 @@ #include <svx/svxids.hrc> #include <tools/stream.hxx> +#include <unotools/configmgr.hxx> #include <unotools/pathoptions.hxx> #include <sot/storage.hxx> #include <svl/intitem.hxx> @@ -45,6 +46,8 @@ using namespace com::sun::star; const OUString GetPalettePath() { + if (utl::ConfigManager::IsAvoidConfig()) + return OUString(); SvtPathOptions aPathOpt; return aPathOpt.GetPalettePath(); } diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index de7796e09613..8037523dfa9c 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -29,6 +29,7 @@ #include <hintids.hxx> #include <tools/urlobj.hxx> #include <unotools/tempfile.hxx> +#include <unotools/configmgr.hxx> #include <vcl/wrkwin.hxx> #include <vcl/msgbox.hxx> #include <svl/lckbitem.hxx> @@ -1213,6 +1214,8 @@ void SwDocShell::FillClass( SvGlobalName * pClassName, void SwDocShell::SetModified( bool bSet ) { + if (utl::ConfigManager::IsAvoidConfig()) + return; SfxObjectShell::SetModified( bSet ); if( IsEnableSetModified()) { diff --git a/sw/source/uibase/app/docshdrw.cxx b/sw/source/uibase/app/docshdrw.cxx index 00e7c2d079cb..62621400dfcf 100644 --- a/sw/source/uibase/app/docshdrw.cxx +++ b/sw/source/uibase/app/docshdrw.cxx @@ -24,7 +24,7 @@ #include <svx/svdmodel.hxx> #include <svx/svdoutl.hxx> #include <svx/xtable.hxx> - +#include <unotools/configmgr.hxx> #include <docsh.hxx> #include <doc.hxx> #include <drawdoc.hxx> @@ -68,7 +68,7 @@ void InitDrawModelAndDocShell(SwDocShell* pSwDocShell, SwDrawModel* pSwDrawDocum { pSwDocShell->PutItem(SvxColorListItem(xColorList, SID_COLOR_TABLE)); } - else + else if (!utl::ConfigManager::IsAvoidConfig()) { // there wasn't one, get the standard and set to the // docshell and then to the drawdocument |