summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/app/docsh2.cxx27
1 files changed, 26 insertions, 1 deletions
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index f264775577ba..c36bd1c900ac 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -115,6 +115,9 @@
#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 <sfx2/fcontnr.hxx>
@@ -130,6 +133,9 @@ 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(
@@ -835,7 +841,26 @@ void SwDocShell::Execute(SfxRequest& rReq)
mpWrtShell->StartAllAction();
mpDoc->getIDocumentFieldsAccess().UpdateFlds( NULL, false );
mpDoc->getIDocumentLinksAdministration().EmbedAllLinks();
- mpDoc->RemoveInvisibleContent();
+ 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)
+ mpDoc->RemoveInvisibleContent();
if(mpWrtShell)
mpWrtShell->EndAllAction();
}