diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-15 17:23:20 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-15 21:56:53 +0200 |
commit | e20fe337d76f3a81b1acead279b63bb9beea03eb (patch) | |
tree | 4f311aa4ab1b112d054fe90602b626bf742db65c | |
parent | 15966e0721af1d16243a032ec2832a66a069de93 (diff) |
some defaults for when config is unavailable
Change-Id: I0fd7cedbf9957707d56f99b5801dacf3a8868f02
Reviewed-on: https://gerrit.libreoffice.org/42337
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
-rw-r--r-- | sw/source/core/edit/edws.cxx | 4 | ||||
-rw-r--r-- | sw/source/core/view/viewsh.cxx | 5 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view.cxx | 3 | ||||
-rw-r--r-- | vcl/source/window/settings.cxx | 3 |
4 files changed, 10 insertions, 5 deletions
diff --git a/sw/source/core/edit/edws.cxx b/sw/source/core/edit/edws.cxx index 13a7452f10cf..5c5c0f658e85 100644 --- a/sw/source/core/edit/edws.cxx +++ b/sw/source/core/edit/edws.cxx @@ -18,7 +18,7 @@ */ #include <officecfg/Office/Common.hxx> - +#include <unotools/configmgr.hxx> #include <vcl/window.hxx> #include <editsh.hxx> @@ -46,7 +46,7 @@ SwEditShell::SwEditShell( SwDoc& rDoc, vcl::Window *pWindow, const SwViewOption , m_bNbspRunNext(false) , m_bIsValidatingParagraphSignature(false) { - if (0 < officecfg::Office::Common::Undo::Steps::get()) + if (!utl::ConfigManager::IsAvoidConfig() && 0 < officecfg::Office::Common::Undo::Steps::get()) { GetDoc()->GetIDocumentUndoRedo().DoUndo(true); } diff --git a/sw/source/core/view/viewsh.cxx b/sw/source/core/view/viewsh.cxx index 24f506a185fb..af10689e027f 100644 --- a/sw/source/core/view/viewsh.cxx +++ b/sw/source/core/view/viewsh.cxx @@ -75,6 +75,7 @@ #include <view.hxx> #include <PostItMgr.hxx> +#include <unotools/configmgr.hxx> #include <vcl/dibtools.hxx> #include <vcl/virdev.hxx> #include <vcl/svapp.hxx> @@ -2437,7 +2438,9 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap() void SwViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions const & rAccessibilityOptions) { - if(mpOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews()) + if (utl::ConfigManager::IsAvoidConfig()) + return; + if (mpOpt->IsPagePreview() && !rAccessibilityOptions.GetIsForPagePreviews()) { mpAccOptions->SetAlwaysAutoColor(false); mpAccOptions->SetStopAnimatedGraphics(false); diff --git a/sw/source/uibase/uiview/view.cxx b/sw/source/uibase/uiview/view.cxx index ae868121263c..419720809e98 100644 --- a/sw/source/uibase/uiview/view.cxx +++ b/sw/source/uibase/uiview/view.cxx @@ -29,6 +29,7 @@ #include <vcl/inputctx.hxx> #include <basic/sbxobj.hxx> #include <svl/eitem.hxx> +#include <unotools/configmgr.hxx> #include <unotools/lingucfg.hxx> #include <unotools/useroptions.hxx> #include <sfx2/app.hxx> @@ -903,7 +904,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) SAL_WARN_IF( officecfg::Office::Common::Undo::Steps::get() <= 0, "sw.ui", "/org.openoffice.Office.Common/Undo/Steps <= 0"); - if (0 < officecfg::Office::Common::Undo::Steps::get()) + if (!utl::ConfigManager::IsAvoidConfig() && 0 < officecfg::Office::Common::Undo::Steps::get()) { m_pWrtShell->DoUndo(); } diff --git a/vcl/source/window/settings.cxx b/vcl/source/window/settings.cxx index 759f1ff12da1..bb18f957a72a 100644 --- a/vcl/source/window/settings.cxx +++ b/vcl/source/window/settings.cxx @@ -26,6 +26,7 @@ #include <vcl/settings.hxx> #include <unotools/fontcfg.hxx> +#include <unotools/configmgr.hxx> #include <unotools/confignode.hxx> #include <comphelper/processfactory.hxx> @@ -236,7 +237,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) // auto detect HC mode; if the system already set it to "yes" // (see above) then accept that - if( !rSettings.GetStyleSettings().GetHighContrastMode() ) + if (!rSettings.GetStyleSettings().GetHighContrastMode() && !utl::ConfigManager::IsAvoidConfig()) { bool bAutoHCMode = true; utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( |