From 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c Mon Sep 17 00:00:00 2001 From: Balazs Varga Date: Fri, 29 Mar 2024 23:00:50 +0100 Subject: Related: tdf#39052 - chart ooxml: export formatted chart titles texts properly to ooxml. Also adding "FormattedStrings" property for title objects to simplify the working of character formattings in editable chart shapes. TODO: odf import/export Change-Id: Ie27b4dee72c24fa6a2a4e2a7db8da7fa50eb8937 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165583 Tested-by: Jenkins Tested-by: Gabor Kelemen Reviewed-by: Balazs Varga --- xmloff/source/chart/SchXMLAxisContext.cxx | 1 + xmloff/source/chart/SchXMLChartContext.cxx | 2 ++ xmloff/source/chart/SchXMLExport.cxx | 3 +++ 3 files changed, 6 insertions(+) (limited to 'xmloff') diff --git a/xmloff/source/chart/SchXMLAxisContext.cxx b/xmloff/source/chart/SchXMLAxisContext.cxx index 39d93cb26662..b54808790845 100644 --- a/xmloff/source/chart/SchXMLAxisContext.cxx +++ b/xmloff/source/chart/SchXMLAxisContext.cxx @@ -564,6 +564,7 @@ void SchXMLAxisContext::SetAxisTitle() { try { + // TODO: ODF import for formatted chart titles xTitleProp->setPropertyValue("String", uno::Any(m_aCurrentAxis.aTitle) ); } catch( beans::UnknownPropertyException & ) diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 9d5522feaceb..6072a1a09622 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -736,6 +736,7 @@ void SchXMLChartContext::endFastElement(sal_Int32 ) { try { + // TODO: ODF import for formatted chart titles xTitleProp->setPropertyValue("String", uno::Any(maMainTitle) ); } catch(const beans::UnknownPropertyException&) @@ -751,6 +752,7 @@ void SchXMLChartContext::endFastElement(sal_Int32 ) { try { + // TODO: ODF import for formatted chart titles xTitleProp->setPropertyValue("String", uno::Any(maSubTitle) ); } catch(const beans::UnknownPropertyException&) diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx index 79238a5b34be..56cdca7bdefa 100644 --- a/xmloff/source/chart/SchXMLExport.cxx +++ b/xmloff/source/chart/SchXMLExport.cxx @@ -1344,6 +1344,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); if( xPropSet.is()) { + // TODO: ODF export for formatted chart titles Any aAny( xPropSet->getPropertyValue( "String" )); OUString aText; aAny >>= aText; @@ -1385,6 +1386,7 @@ void SchXMLExportHelper_Impl::parseDocument( Reference< chart::XChartDocument > Reference< beans::XPropertySet > xPropSet( xShape, uno::UNO_QUERY ); if( xPropSet.is()) { + // TODO: ODF import for formatted chart titles Any aAny( xPropSet->getPropertyValue( "String" )); OUString aText; aAny >>= aText; @@ -2264,6 +2266,7 @@ void SchXMLExportHelper_Impl::exportAxisTitle( const Reference< beans::XProperty std::vector aPropertyStates = mxExpPropMapper->Filter(mrExport, rTitleProps); if( bExportContent ) { + // TODO: ODF import for formatted chart titles OUString aText; Any aAny( rTitleProps->getPropertyValue( "String" )); aAny >>= aText; -- cgit