summaryrefslogtreecommitdiff
path: root/xmloff/source/chart/SchXMLTools.hxx
diff options
context:
space:
mode:
authorBalazs Varga <balazs.varga.extern@allotropia.de>2024-04-15 13:39:03 +0200
committerBalazs Varga <balazs.varga.extern@allotropia.de>2024-04-18 18:07:57 +0200
commitd7214aba95bbdcbd40e87ef50fc66f2e2ec4f5ff (patch)
treea4a7b62270149e841b8510cb3e810de43ae9b8c5 /xmloff/source/chart/SchXMLTools.hxx
parent176406a07edc29f59a67464c7812358f46421f4d (diff)
tdf#160517 - chart odf: import/export formatted chart titles
(main, sub, axis titles) texts properly to/from odf format. Fix odf export of formatted chart titles. The exported data structure will look like: <chart:title svg:x="3.304cm" svg:y="0.285cm" chart:style-name="ch2"> <text:p> <text:span text:style-name="T1">This</text:span> <text:span text:style-name="T2"> is</text:span> . . . <text:span text:style-name="T3">3</text:span> <text:span text:style-name="T2"> a </text:span> </text:p> </chart:title> Fix import of formatted chart titles. Put the properties and related texts into the chart2::XFormattedString2 uno objects. Follow-up commit of: 55e9a27afd2d6a13cf76b39641bf121c3ec4b45c Related: tdf#39052 - chart ooxml: export formatted chart titles 4f994cec388377cc5c2bddb804bd92eb4cd7dc8d tdf#39052 - Chart: make characters formatable in editable chart textshapes -- TODO: chart data point / dataseries labels are handled differently since those are not editable objects, but that is a completily different issue. -- Change-Id: I1842f2c69c132bdf578bb2d354f451cc9d49c63c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166122 Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> Tested-by: Jenkins Reviewed-by: Balazs Varga <balazs.varga.extern@allotropia.de>
Diffstat (limited to 'xmloff/source/chart/SchXMLTools.hxx')
-rw-r--r--xmloff/source/chart/SchXMLTools.hxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/xmloff/source/chart/SchXMLTools.hxx b/xmloff/source/chart/SchXMLTools.hxx
index 994308a19bc3..364c894c5634 100644
--- a/xmloff/source/chart/SchXMLTools.hxx
+++ b/xmloff/source/chart/SchXMLTools.hxx
@@ -38,6 +38,7 @@ namespace com::sun::star {
class XMLPropStyleContext;
class SvXMLStylesContext;
class SvXMLExport;
+class SvXMLImport;
namespace SchXMLTools
{
@@ -98,6 +99,9 @@ namespace SchXMLTools
css::uno::Any getPropertyFromContext( std::u16string_view rPropertyName, const XMLPropStyleContext * pPropStyleContext, const SvXMLStylesContext* pStylesCtxt );
void exportText( SvXMLExport& rExport, const OUString& rText, bool bConvertTabsLFs );
+ void exportFormattedText( SvXMLExport& rExport, const css::uno::Reference< css::beans::XPropertySet >& xTitleProps );
+ void importFormattedText( SvXMLImport& rImport, const std::vector<std::pair<OUString, OUString>>& rTitle,
+ const css::uno::Reference< css::beans::XPropertySet >& xTitleProp);
void exportRangeToSomewhere( SvXMLExport& rExport, const OUString& rValue );