oox/source/drawingml/chart/chartcontextbase.cxx |    4 +++-
 oox/source/drawingml/chart/seriescontext.cxx    |    2 ++
 2 files changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 301e27cbebf7d6e4c9b82290d7cd555c43f0c999
Author:     Justin Luth <justin.l...@collabora.com>
AuthorDate: Thu Jan 25 10:30:33 2024 -0500
Commit:     Miklos Vajna <vmik...@collabora.com>
CommitDate: Mon Jan 29 15:47:31 2024 +0100

    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 <jl...@mail.com>
    Reviewed-by: Justin Luth <jl...@mail.com>

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;
         }
     }

Reply via email to