summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorJustin Luth <justin.luth@collabora.com>2024-01-25 10:30:33 -0500
committerMiklos Vajna <vmiklos@collabora.com>2024-01-29 15:47:31 +0100
commit301e27cbebf7d6e4c9b82290d7cd555c43f0c999 (patch)
tree02fcac23cca0df78e76a734f50601e218bc7f9a8 /oox
parent6955e89903b5ec4328cab15f8a17663ad8ba3e9a (diff)
tdf#146756 pie chart2: import extLst manualLayout W and H
The width of text labels in pie charts is currently determined completely arbitrarily. If the file specifies X and Y coordinates along with W and H sizing, then perhaps it is appropriate to use this? We currently import but ignore X/Y, so lets also make W/H available so we at least have a chance to ignore those too. Change-Id: I5caa48cf899e4e290eb2e8e78f731b6c5bcdd017 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/162589 Tested-by: Justin Luth <jluth@mail.com> Reviewed-by: Justin Luth <jluth@mail.com>
Diffstat (limited to 'oox')
-rw-r--r--oox/source/drawingml/chart/chartcontextbase.cxx4
-rw-r--r--oox/source/drawingml/chart/seriescontext.cxx2
2 files changed, 5 insertions, 1 deletions
diff --git a/oox/source/drawingml/chart/chartcontextbase.cxx b/oox/source/drawingml/chart/chartcontextbase.cxx
index 5423c52b3d35..283c8e03ad55 100644
--- a/oox/source/drawingml/chart/chartcontextbase.cxx
+++ b/oox/source/drawingml/chart/chartcontextbase.cxx
@@ -58,10 +58,12 @@ ContextHandlerRef LayoutContext::onCreateContext( sal_Int32 nElement, const Attr
switch( getCurrentElement() )
{
case C_TOKEN( layout ):
+ case C15_TOKEN(layout):
switch( nElement )
{
case C_TOKEN( manualLayout ):
- mrModel.mbAutoLayout = false;
+ if (getCurrentElement() == C_TOKEN(layout))
+ mrModel.mbAutoLayout = false;
return this;
}
break;
diff --git a/oox/source/drawingml/chart/seriescontext.cxx b/oox/source/drawingml/chart/seriescontext.cxx
index 5afc32c1497d..bfbc28304ab3 100644
--- a/oox/source/drawingml/chart/seriescontext.cxx
+++ b/oox/source/drawingml/chart/seriescontext.cxx
@@ -129,6 +129,8 @@ ContextHandlerRef DataLabelContext::onCreateContext( sal_Int32 nElement, const A
mrModel.mobShowDataLabelsRange = rAttribs.getBool( XML_val );
return nullptr;
}
+ else if (nElement == C15_TOKEN(layout))
+ return new LayoutContext(*this, mrModel.mxLayout.getOrCreate());
break;
}
}