diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-02-07 09:06:25 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-02-07 09:06:25 +0100 |
commit | b87201e158d598a85fb7f351baa552fc38afe158 (patch) | |
tree | 4403c92de4e303aecff00ec75b048d6e200ad179 | |
parent | 72c1b6141d590fb4479925ed8bc88b79357c2bfc (diff) |
Some configmgr usage clean up
-rw-r--r-- | xmloff/source/core/DocumentSettingsContext.cxx | 23 | ||||
-rw-r--r-- | xmloff/source/core/xmlexp.cxx | 20 |
2 files changed, 9 insertions, 34 deletions
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx index c8b78d577ebe..9c962ce4296b 100644 --- a/xmloff/source/core/DocumentSettingsContext.cxx +++ b/xmloff/source/core/DocumentSettingsContext.cxx @@ -26,7 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" +#include <officecfg/Office/Common.hxx> #include <sax/tools/converter.hxx> #include <com/sun/star/util/XStringSubstitution.hpp> @@ -43,21 +45,15 @@ #include <com/sun/star/container/XIndexContainer.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/formula/SymbolDescriptor.hpp> -#include <comphelper/processfactory.hxx> #include <com/sun/star/util/DateTime.hpp> #include <com/sun/star/document/XViewDataSupplier.hpp> #include <com/sun/star/document/PrinterIndependentLayout.hpp> -#include <comphelper/configurationhelper.hxx> #include <rtl/ustrbuf.hxx> #include <xmlenums.hxx> using namespace com::sun::star; using namespace ::xmloff::token; -#define C2U(cChar) ::rtl::OUString::createFromAscii(cChar) - -//------------------------------------------------------------------ - class XMLMyList { std::list<beans::PropertyValue> aProps; @@ -449,23 +445,10 @@ void XMLDocumentSettingsContext::EndElement() } } - sal_Bool bLoadDocPrinter( sal_True ); - - try - { - ::comphelper::ConfigurationHelper::readDirectKey( - ::comphelper::getProcessServiceFactory(), - C2U("org.openoffice.Office.Common/"), C2U("Save/Document"), C2U("LoadPrinter"), - ::comphelper::ConfigurationHelper::E_READONLY ) >>= bLoadDocPrinter; - } - catch( const uno::Exception& ) - { - } - uno::Sequence<beans::PropertyValue> aSeqConfigProps; if ( m_pData->aConfigProps >>= aSeqConfigProps ) { - if ( !bLoadDocPrinter ) + if (!officecfg::Office::Common::Save::Document::LoadPrinter::get()) { sal_Int32 i = aSeqConfigProps.getLength() - 1; int nFound = 0; diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx index 6db7911171f7..e92545c8dd91 100644 --- a/xmloff/source/core/xmlexp.cxx +++ b/xmloff/source/core/xmlexp.cxx @@ -26,10 +26,9 @@ * ************************************************************************/ +#include "sal/config.h" -#ifdef PRECOMPILED -#include "filt_pch.hxx" -#endif +#include <officecfg/Office/Common.hxx> #include <xmloff/unointerfacetouniqueidentifiermapper.hxx> #include <osl/mutex.hxx> #include <tools/debug.hxx> @@ -43,7 +42,6 @@ #include <com/sun/star/uri/UriReferenceFactory.hpp> #include <com/sun/star/util/MeasureUnit.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/configurationhelper.hxx> #include <xmloff/attrlist.hxx> #include <xmloff/nmspmap.hxx> #include <xmloff/xmluconv.hxx> @@ -130,8 +128,6 @@ const sal_Char s_grddl_xsl[] = "http://FIXME"; #define XML_USEPRETTYPRINTING "UsePrettyPrinting" -#define C2U(cChar) OUString( RTL_CONSTASCII_USTRINGPARAM(cChar) ) - struct XMLServiceMapEntry_Impl { const sal_Char *sModelService; @@ -438,14 +434,10 @@ void SvXMLExport::_InitCtor() // cl: but only if we do export to current oasis format, old openoffice format *must* always be compatible if( (getExportFlags() & EXPORT_OASIS) != 0 ) { - sal_Bool bTemp = sal_True; - if ( ::comphelper::ConfigurationHelper::readDirectKey( - getServiceFactory(), - C2U("org.openoffice.Office.Common/"), C2U("Save/Document"), C2U("SaveBackwardCompatibleODF"), - ::comphelper::ConfigurationHelper::E_READONLY ) >>= bTemp ) - { - mpImpl->mbSaveBackwardCompatibleODF = bTemp; - } + mpImpl->mbSaveBackwardCompatibleODF = + officecfg::Office::Common::Save::Document:: + SaveBackwardCompatibleODF::get( + mpImpl->mxComponentContext); } } |