Kaydet (Commit) e20fe337 authored tarafından Caolán McNamara's avatar Caolán McNamara

some defaults for when config is unavailable

Change-Id: I0fd7cedbf9957707d56f99b5801dacf3a8868f02
Reviewed-on: https://gerrit.libreoffice.org/42337Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 15966e07
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#include <officecfg/Office/Common.hxx> #include <officecfg/Office/Common.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/window.hxx> #include <vcl/window.hxx>
#include <editsh.hxx> #include <editsh.hxx>
...@@ -46,7 +46,7 @@ SwEditShell::SwEditShell( SwDoc& rDoc, vcl::Window *pWindow, const SwViewOption ...@@ -46,7 +46,7 @@ SwEditShell::SwEditShell( SwDoc& rDoc, vcl::Window *pWindow, const SwViewOption
, m_bNbspRunNext(false) , m_bNbspRunNext(false)
, m_bIsValidatingParagraphSignature(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); GetDoc()->GetIDocumentUndoRedo().DoUndo(true);
} }
......
...@@ -75,6 +75,7 @@ ...@@ -75,6 +75,7 @@
#include <view.hxx> #include <view.hxx>
#include <PostItMgr.hxx> #include <PostItMgr.hxx>
#include <unotools/configmgr.hxx>
#include <vcl/dibtools.hxx> #include <vcl/dibtools.hxx>
#include <vcl/virdev.hxx> #include <vcl/virdev.hxx>
#include <vcl/svapp.hxx> #include <vcl/svapp.hxx>
...@@ -2437,7 +2438,9 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap() ...@@ -2437,7 +2438,9 @@ SwAccessibleMap* SwViewShell::GetAccessibleMap()
void SwViewShell::ApplyAccessiblityOptions(SvtAccessibilityOptions const & rAccessibilityOptions) 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->SetAlwaysAutoColor(false);
mpAccOptions->SetStopAnimatedGraphics(false); mpAccOptions->SetStopAnimatedGraphics(false);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <vcl/inputctx.hxx> #include <vcl/inputctx.hxx>
#include <basic/sbxobj.hxx> #include <basic/sbxobj.hxx>
#include <svl/eitem.hxx> #include <svl/eitem.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/lingucfg.hxx> #include <unotools/lingucfg.hxx>
#include <unotools/useroptions.hxx> #include <unotools/useroptions.hxx>
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
...@@ -903,7 +904,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh ) ...@@ -903,7 +904,7 @@ SwView::SwView( SfxViewFrame *_pFrame, SfxViewShell* pOldSh )
SAL_WARN_IF( SAL_WARN_IF(
officecfg::Office::Common::Undo::Steps::get() <= 0, officecfg::Office::Common::Undo::Steps::get() <= 0,
"sw.ui", "/org.openoffice.Office.Common/Undo/Steps <= 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(); m_pWrtShell->DoUndo();
} }
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include <vcl/settings.hxx> #include <vcl/settings.hxx>
#include <unotools/fontcfg.hxx> #include <unotools/fontcfg.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/confignode.hxx> #include <unotools/confignode.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
...@@ -236,7 +237,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl ) ...@@ -236,7 +237,7 @@ void Window::ImplUpdateGlobalSettings( AllSettings& rSettings, bool bCallHdl )
// auto detect HC mode; if the system already set it to "yes" // auto detect HC mode; if the system already set it to "yes"
// (see above) then accept that // (see above) then accept that
if( !rSettings.GetStyleSettings().GetHighContrastMode() ) if (!rSettings.GetStyleSettings().GetHighContrastMode() && !utl::ConfigManager::IsAvoidConfig())
{ {
bool bAutoHCMode = true; bool bAutoHCMode = true;
utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext( utl::OConfigurationNode aNode = utl::OConfigurationTreeRoot::tryCreateWithComponentContext(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment