diff options
author | Björn Milcke <bm@openoffice.org> | 2001-05-11 17:17:56 +0000 |
---|---|---|
committer | Björn Milcke <bm@openoffice.org> | 2001-05-11 17:17:56 +0000 |
commit | 15dd7fe4c4ec2f96e2f32762f396cc69897159bc (patch) | |
tree | 26072762a1195a3611efbaa8d33fe6a12c9aba20 /xmloff/source/chart/PropertyMaps.cxx | |
parent | 303a6bc1a444862b4972603c0d21dcfaf1348f15 (diff) |
resolve graphics
Diffstat (limited to 'xmloff/source/chart/PropertyMaps.cxx')
-rw-r--r-- | xmloff/source/chart/PropertyMaps.cxx | 40 |
1 files changed, 31 insertions, 9 deletions
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx index 997b69b42e0d..0ce9d45622e6 100644 --- a/xmloff/source/chart/PropertyMaps.cxx +++ b/xmloff/source/chart/PropertyMaps.cxx @@ -2,9 +2,9 @@ * * $RCSfile: PropertyMaps.cxx,v $ * - * $Revision: 1.19 $ + * $Revision: 1.20 $ * - * last change: $Author: bm $ $Date: 2001-05-10 12:41:11 $ + * last change: $Author: bm $ $Date: 2001-05-11 18:17:55 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -90,6 +90,9 @@ #ifndef _XMLOFF_NAMEDBOOLPROPERTYHANDLER_HXX #include "NamedBoolPropertyHdl.hxx" #endif +#ifndef _XMLOFF_XMLEXP_HXX +#include "xmlexp.hxx" +#endif #ifndef _XMLERRORINDICATORPROPERTYHDL_HXX_ #include "XMLErrorIndicatorPropertyHdl.hxx" @@ -177,7 +180,11 @@ const XMLPropertyHandler* XMLChartPropHdlFactory::GetPropertyHandler( sal_Int32 // here we have a constant rather than an enum pHdl = new XMLConstantsPropertyHandler( aXMLChartSolidTypeEnumMap, sXML_cuboid ); break; - } + case XML_SCH_TYPE_DATAROWSOURCE: + pHdl = new XMLEnumPropertyHdl( aXMLChartDataRowSourceTypeEnumMap, + ::getCppuType((const chart::ChartDataRowSource*)0) ); + break; + } if( pHdl ) PutHdlCache( nType, pHdl ); } @@ -198,11 +205,13 @@ XMLChartPropertySetMapper::~XMLChartPropertySetMapper() // ---------------------------------------- -XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper ) : +XMLChartExportPropertyMapper::XMLChartExportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, + SvXMLExport& rExport) : SvXMLExportPropertyMapper( rMapper ), msCDATA( rtl::OUString::createFromAscii( sXML_CDATA )), msTrue( rtl::OUString::createFromAscii( sXML_true )), - msFalse( rtl::OUString::createFromAscii( sXML_false )) + msFalse( rtl::OUString::createFromAscii( sXML_false )), + mrExport( rExport ) { } @@ -228,9 +237,9 @@ void XMLChartExportPropertyMapper::ContextFilter( { case XML_SCH_CONTEXT_USER_SYMBOL: { - sal_Int32 nIndex = chart::ChartSymbolType::AUTO; + sal_Int32 nIndex = chart::ChartSymbolType::NONE; property->maValue >>= nIndex; - if( nIndex == chart::ChartSymbolType::AUTO ) + if( nIndex == chart::ChartSymbolType::NONE ) property->mnIndex = -1; } break; @@ -256,6 +265,13 @@ void XMLChartExportPropertyMapper::ContextFilter( bCheckAuto = sal_True; aAutoPropName = ::rtl::OUString::createFromAscii( "AutoOrigin" ); break; + case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME: + { + ::rtl::OUString aURLStr; + property->maValue >>= aURLStr; + property->maValue <<= mrExport.AddEmbeddedGraphicObject( aURLStr ); + } + break; } if( bCheckAuto ) @@ -393,8 +409,10 @@ void XMLChartExportPropertyMapper::handleSpecialItem( // ---------------------------------------- -XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper ) : - SvXMLImportPropertyMapper( rMapper ) +XMLChartImportPropertyMapper::XMLChartImportPropertyMapper( const UniReference< XMLPropertySetMapper >& rMapper, + const SvXMLImport& rImport ) : + SvXMLImportPropertyMapper( rMapper ), + mrImport( SAL_CONST_CAST( SvXMLImport&, rImport )) { // chain shape mapper for drawing properties @@ -414,6 +432,7 @@ sal_Bool XMLChartImportPropertyMapper::handleSpecialItem( const SvXMLUnitConverter& rUnitConverter, const SvXMLNamespaceMap& rNamespaceMap ) const { + static const ::rtl::OUString sPackageProtocol( RTL_CONSTASCII_USTRINGPARAM( "vnd.sun.star.Package:" ) ); sal_Int32 nContextId = maPropMapper->GetEntryContextId( rProperty.mnIndex ); sal_Bool bRet = (nContextId != 0); @@ -508,6 +527,9 @@ sal_Bool XMLChartImportPropertyMapper::handleSpecialItem( rProperty.maValue <<= aSize; } break; + case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME: + rProperty.maValue <<= mrImport.ResolveGraphicObjectURL( rValue, sal_False ); + break; default: bRet = sal_False; break; |