diff options
author | Rüdiger Timm <rt@openoffice.org> | 2006-04-28 13:57:50 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2006-04-28 13:57:50 +0000 |
commit | 59537281b376dde3509e8b2b335c46cc9283e451 (patch) | |
tree | ee3e04b0c842a73165fb1816213f55e33716c866 /xmloff | |
parent | b82502b3b53715873f12cfb3cf996a19e546de5c (diff) |
INTEGRATION: CWS impress93 (1.23.116); FILE MERGED
2006/04/20 12:32:13 cl 1.23.116.1: #i63305# substitute pathes for config files
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/core/SettingsExportHelper.cxx | 53 |
1 files changed, 38 insertions, 15 deletions
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx index c50b8242236e..4dcdd3c3598e 100644 --- a/xmloff/source/core/SettingsExportHelper.cxx +++ b/xmloff/source/core/SettingsExportHelper.cxx @@ -4,9 +4,9 @@ * * $RCSfile: SettingsExportHelper.cxx,v $ * - * $Revision: 1.23 $ + * $Revision: 1.24 $ * - * last change: $Author: rt $ $Date: 2005-09-09 13:32:45 $ + * last change: $Author: rt $ $Date: 2006-04-28 14:57:50 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -99,7 +99,14 @@ using namespace ::com::sun::star; using namespace ::xmloff::token; XMLSettingsExportHelper::XMLSettingsExportHelper(SvXMLExport& rTempExport) - : rExport(rTempExport) +: rExport(rTempExport) +, msPrinterIndependentLayout( RTL_CONSTASCII_USTRINGPARAM( "PrinterIndependentLayout" ) ) +, msColorTableURL( RTL_CONSTASCII_USTRINGPARAM( "ColorTableURL" ) ) +, msLineEndTableURL( RTL_CONSTASCII_USTRINGPARAM( "LineEndTableURL" ) ) +, msDashTableURL( RTL_CONSTASCII_USTRINGPARAM( "DashTableURL" ) ) +, msHatchTableURL( RTL_CONSTASCII_USTRINGPARAM( "HatchTableURL" ) ) +, msGradientTableURL( RTL_CONSTASCII_USTRINGPARAM( "GradientTableURL" ) ) +, msBitmapTableURL( RTL_CONSTASCII_USTRINGPARAM( "BitmapTableURL" ) ) { } @@ -107,17 +114,11 @@ XMLSettingsExportHelper::~XMLSettingsExportHelper() { } - -/** function to allow changing the API and XML representation; - implementation below */ -void lcl_manipulateSetting( uno::Any&, const rtl::OUString& ); - - void XMLSettingsExportHelper::CallTypeFunction(const uno::Any& rAny, const rtl::OUString& rName) const { uno::Any aAny( rAny ); - lcl_manipulateSetting( aAny, rName ); + ManipulateSetting( aAny, rName ); uno::TypeClass eClass = aAny.getValueTypeClass(); switch (eClass) @@ -551,12 +552,9 @@ void XMLSettingsExportHelper::exportSettings( * from their XML settings representation. This is your chance to do * so! */ -void lcl_manipulateSetting( - uno::Any& rAny, - const rtl::OUString& rName ) +void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const rtl::OUString& rName ) const { - if( rName.equalsAsciiL( - RTL_CONSTASCII_STRINGPARAM( "PrinterIndependentLayout" ) ) ) + if( rName == msPrinterIndependentLayout ) { sal_Int16 nTmp; if( rAny >>= nTmp ) @@ -569,4 +567,29 @@ void lcl_manipulateSetting( rAny <<= rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("high-resolution")); } } + else if( (rName == msColorTableURL) || (rName == msLineEndTableURL) || (rName == msHatchTableURL) || + (rName == msDashTableURL) || (rName == msGradientTableURL) || (rName == msBitmapTableURL ) ) + { + if( !mxStringSubsitution.is() ) + { + if( rExport.getServiceFactory().is() ) try + { + const_cast< XMLSettingsExportHelper* >(this)->mxStringSubsitution = + uno::Reference< util::XStringSubstitution >::query( + rExport.getServiceFactory()-> + createInstance(::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.util.PathSubstitution" ) ) ) ); + } + catch( uno::Exception& ) + { + } + } + + if( mxStringSubsitution.is() ) + { + ::rtl::OUString aURL; + rAny >>= aURL; + aURL = mxStringSubsitution->reSubstituteVariables( aURL ); + rAny <<= aURL; + } + } } |