summaryrefslogtreecommitdiff
path: root/sw/source/filter/ww8/ww8toolbar.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2015-08-24 14:21:44 +0100
committerCaolán McNamara <caolanm@redhat.com>2015-08-24 14:32:29 +0100
commit48a047f2f4e7b4b3bed33a99d37fd48025381646 (patch)
tree932149c7ef3e3750423d0e7c5f73988834b6715f /sw/source/filter/ww8/ww8toolbar.cxx
parentc0c9075163f06c0b5c2ad9cf428f1cfacf9fe1fb (diff)
allow avoiding config for CustomToolBarImportHelper
Change-Id: Iff0dd632f8c6b187d3515f542cc9fe2ca59088e5
Diffstat (limited to 'sw/source/filter/ww8/ww8toolbar.cxx')
-rw-r--r--sw/source/filter/ww8/ww8toolbar.cxx14
1 files changed, 10 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8toolbar.cxx b/sw/source/filter/ww8/ww8toolbar.cxx
index 6460cc6c2525..f9e61226d403 100644
--- a/sw/source/filter/ww8/ww8toolbar.cxx
+++ b/sw/source/filter/ww8/ww8toolbar.cxx
@@ -21,6 +21,7 @@
#include <com/sun/star/ui/ItemType.hpp>
#include <fstream>
#include <comphelper/processfactory.hxx>
+#include <unotools/configmgr.hxx>
#include <vcl/graph.hxx>
#include <map>
#include <sal/log.hxx>
@@ -227,15 +228,20 @@ bool SwCTBWrapper::ImportCustomToolBar( SfxObjectShell& rDocSh )
{
try
{
- uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
- CustomToolBarImportHelper helper( rDocSh, xAppCfgSupp->getUIConfigurationManager( "com.sun.star.text.TextDocument" ) );
+ css::uno::Reference<css::ui::XUIConfigurationManager> xCfgMgr;
+ if (!utl::ConfigManager::IsAvoidConfig())
+ {
+ uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
+ uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xAppCfgSupp( ui::theModuleUIConfigurationManagerSupplier::get(xContext) );
+ xCfgMgr = xAppCfgSupp->getUIConfigurationManager("com.sun.star.text.TextDocument");
+ }
+ CustomToolBarImportHelper helper(rDocSh, xCfgMgr);
helper.setMSOCommandMap( new MSOWordCommandConvertor() );
if ( !(*it).ImportCustomToolBar( *this, helper ) )
return false;
}
- catch(...)
+ catch (...)
{
continue;
}