summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOcke Janssen <Ocke.Janssen@sun.com>2009-10-27 11:09:54 +0100
committerOcke Janssen <Ocke.Janssen@sun.com>2009-10-27 11:09:54 +0100
commit19df9bd72bcff59613fd984d427ba12cddcd21cf (patch)
treefb99ba4fc190ea1b8ed6eb376a1d884e0fa779c9
parentcc0711e19efbd1e43a067d498f8a62c8961b52e2 (diff)
#i105481# add new namespaces from xmloff
-rw-r--r--reportdesign/source/filter/xml/xmlExport.cxx16
-rw-r--r--reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx3
2 files changed, 16 insertions, 3 deletions
diff --git a/reportdesign/source/filter/xml/xmlExport.cxx b/reportdesign/source/filter/xml/xmlExport.cxx
index 31ac92345a2f..b0012e731c81 100644
--- a/reportdesign/source/filter/xml/xmlExport.cxx
+++ b/reportdesign/source/filter/xml/xmlExport.cxx
@@ -293,6 +293,16 @@ ORptExport::ORptExport(const Reference< XMultiServiceFactory >& _rxMSF,sal_uInt1
{
_GetNamespaceMap().Add( GetXMLToken(XML_NP_STYLE), GetXMLToken(XML_N_STYLE), XML_NAMESPACE_STYLE );
}
+ // RDFa: needed for content and header/footer styles
+ if( (getExportFlags() & (EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ {
+ _GetNamespaceMap().Add( GetXMLToken(XML_NP_XHTML),GetXMLToken(XML_N_XHTML), XML_NAMESPACE_XHTML );
+ }
+ // GRDDL: to convert RDFa and meta.xml to RDF
+ if( (getExportFlags() & (EXPORT_META|EXPORT_STYLES|EXPORT_AUTOSTYLES|EXPORT_MASTERSTYLES|EXPORT_CONTENT) ) != 0 )
+ {
+ _GetNamespaceMap().Add( GetXMLToken(XML_NP_GRDDL),GetXMLToken(XML_N_GRDDL), XML_NAMESPACE_GRDDL );
+ }
_GetNamespaceMap().Add( GetXMLToken(XML_NP_TABLE), GetXMLToken(XML_N_TABLE), XML_NAMESPACE_TABLE );
_GetNamespaceMap().Add( GetXMLToken(XML_NP_NUMBER), GetXMLToken(XML_N_NUMBER), XML_NAMESPACE_NUMBER );
@@ -948,9 +958,9 @@ void ORptExport::exportContainer(const Reference< XSection>& _xSection)
AddAttribute(XML_NAMESPACE_FORM, XML_IMAGE_DATA,sTargetLocation);
}
bExportData = sal_True;
- ::rtl::OUStringBuffer sValue;
- const SvXMLEnumMapEntry* aXML_ImageScaleEnumMap = OXMLHelper::GetImageScaleOptions();
- if ( SvXMLUnitConverter::convertEnum( sValue, xImage->getScaleMode(),aXML_ImageScaleEnumMap ) )
+ ::rtl::OUStringBuffer sValue;
+ const SvXMLEnumMapEntry* aXML_ImageScaleEnumMap = OXMLHelper::GetImageScaleOptions();
+ if ( SvXMLUnitConverter::convertEnum( sValue, xImage->getScaleMode(),aXML_ImageScaleEnumMap ) )
AddAttribute(XML_NAMESPACE_REPORT, XML_SCALE, sValue.makeStringAndClear() );
}
else if ( xReportDefinition.is() )
diff --git a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
index ea1095258261..4cf7c9c5abc9 100644
--- a/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
+++ b/reportdesign/source/filter/xml/xmlImportDocumentHandler.cxx
@@ -122,6 +122,9 @@ void SAL_CALL ImportDocumentHandler::startDocument() throw (uno::RuntimeExceptio
void SAL_CALL ImportDocumentHandler::endDocument() throw (uno::RuntimeException, xml::sax::SAXException)
{
m_xDelegatee->endDocument();
+ uno::Reference< chart2::data::XDataReceiver > xReceiver(m_xModel,uno::UNO_QUERY_THROW);
+ if ( xReceiver.is() )
+ xReceiver->attachDataProvider(m_xDatabaseDataProvider.get());
}
void SAL_CALL ImportDocumentHandler::startElement(const ::rtl::OUString & _sName, const uno::Reference< xml::sax::XAttributeList > & _xAttrList) throw (uno::RuntimeException, xml::sax::SAXException)