Kaydet (Commit) b87201e1 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Some configmgr usage clean up

üst 72c1b614
......@@ -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;
......
......@@ -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);
}
}
......
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