summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-03-31 10:39:50 +0200
committerStephan Bergmann <sbergman@redhat.com>2015-03-31 12:33:02 +0200
commit735616a6ddfe34c2ba4694c659c71a834f6935a1 (patch)
treeecfbeeec7ea55fafe4f2771f4ecc5db5eec1da14 /sw
parent50a0ddb99d53f86b571acc0373f0d2b4ec6d611a (diff)
Use simplified configuration access
Change-Id: I330c34aa6995817b4c2114e78f16b1aa8141e913
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/app/docsh2.cxx28
1 files changed, 3 insertions, 25 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index c36bd1c900ac..c97402734f00 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -115,9 +115,7 @@
#include <com/sun/star/script/vba/VBAEventId.hpp>
#include <editeng/acorrcfg.hxx>
#include <SwStyleNameMapper.hxx>
-#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/configuration/theDefaultProvider.hpp>
+#include <officecfg/Office/Common.hxx>
#include <sfx2/fcontnr.hxx>
@@ -133,9 +131,6 @@ using namespace ::com::sun::star::lang;
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star;
using namespace ::sfx2;
-using com::sun::star::container::XNameAccess;
-using com::sun::star::beans::PropertyValue;
-using namespace com::sun::star::configuration;
// create DocInfo (virtual)
SfxDocumentInfoDialog* SwDocShell::CreateDocumentInfoDialog(
@@ -841,25 +836,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
mpWrtShell->StartAllAction();
mpDoc->getIDocumentFieldsAccess().UpdateFlds( NULL, false );
mpDoc->getIDocumentLinksAdministration().EmbedAllLinks();
- OUString aConfigRoot = "org.openoffice.Office.Common/ExternalMailer";
-
- PropertyValue aProperty;
- aProperty.Name = "nodepath";
- aProperty.Value = makeAny( aConfigRoot );
-
- Sequence< Any > aArgumentList( 1 );
- aArgumentList[0] = makeAny( aProperty );
- uno::Reference< uno::XComponentContext > xContext = ::comphelper::getProcessComponentContext();
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > m_xConfigurationProvider;
- m_xConfigurationProvider = theDefaultProvider::get(xContext);
- Reference< XNameAccess > xNameAccess =
- Reference< XNameAccess > (m_xConfigurationProvider->createInstanceWithArguments(
- OUString("com.sun.star.configuration.ConfigurationAccess"),
- aArgumentList ),
- UNO_QUERY );
- bool bRemoveInvisible;
- xNameAccess->getByName("Hidden") >>= bRemoveInvisible;
- if(bRemoveInvisible)
+
+ if(officecfg::Office::Common::ExternalMailer::Hidden::get())
mpDoc->RemoveInvisibleContent();
if(mpWrtShell)
mpWrtShell->EndAllAction();