summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2025-01-22 16:39:25 +0100
committerGabor Kelemen <gabor.kelemen.extern@allotropia.de>2025-01-30 15:44:54 +0100
commite72919a30132cabeb3e3fda2f9ce16688e9f40eb (patch)
treed4a08bad2692db01dd01639c6ea29b837203a182 /xmloff
parent39c50d9aedc1721ec5ffaa4568b668171e0342bf (diff)
tdf#151278 tdf#164724 tdf#164728 tdf#164729 switch off charts number format from source
Labels get their number format usually from source. When copy/pasted the chart has no connection to a source format anymore. The related LinkNumberFormatToSource flag is therefore reset. The label (data series) number format used is now also saved. Change-Id: I640083ec0036f116dec94cc982317e1e7992328b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/180600 Tested-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Reviewed-by: Gabor Kelemen <gabor.kelemen.extern@allotropia.de> Tested-by: Jenkins
Diffstat (limited to 'xmloff')
-rw-r--r--xmloff/source/chart/SchXMLExport.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmloff/source/chart/SchXMLExport.cxx b/xmloff/source/chart/SchXMLExport.cxx
index 91b203bc2d42..198f6a14c4e3 100644
--- a/xmloff/source/chart/SchXMLExport.cxx
+++ b/xmloff/source/chart/SchXMLExport.cxx
@@ -2433,7 +2433,7 @@ void SchXMLExportHelper_Impl::exportAxis(
lcl_exportNumberFormat( u"NumberFormat"_ustr, rAxisProps, mrExport );
aPropertyStates = mxExpPropMapper->Filter(mrExport, rAxisProps);
- if (!maSrcShellID.isEmpty() && !maDestShellID.isEmpty() && maSrcShellID != maDestShellID)
+ if (!maDestShellID.isEmpty() && (!maSrcShellID.isEmpty() || maSrcShellID != maDestShellID))
{
// Disable link to source number format property when pasting to
// a different doc shell. These shell ID's should be both empty
@@ -2850,6 +2850,13 @@ void SchXMLExportHelper_Impl::exportSeries(
if( mxExpPropMapper.is())
aPropertyStates = mxExpPropMapper->Filter(mrExport, xPropSet);
+ if (!maDestShellID.isEmpty() && (!maSrcShellID.isEmpty() || maSrcShellID != maDestShellID))
+ {
+ // Disable link to source number format property when pasting to
+ // a different doc shell. These shell ID's should be both empty
+ // during real ODF export.
+ disableLinkedNumberFormat(aPropertyStates, mxExpPropMapper->getPropertySetMapper());
+ }
}
if( bExportContent )