chart2/qa/extras/chart2export2.cxx         |    1 +
 oox/source/drawingml/chart/axiscontext.cxx |    1 +
 oox/source/export/chartexport.cxx          |   14 ++++++++++++--
 3 files changed, 14 insertions(+), 2 deletions(-)

New commits:
commit 8194131de744767679f022bb6bbcdfc39f3d68b9
Author:     Kurt Nordback <[email protected]>
AuthorDate: Mon Feb 2 12:03:11 2026 -0700
Commit:     Tomaž Vajngerl <[email protected]>
CommitDate: Mon Mar 9 05:05:11 2026 +0100

    tdf#165742 Step 5.6: Support tickLabels in chartex
    
    Provide import and export of cx:tickLabels, plus a basic round-trip test.
    Unlike in the chart namespace, chartex tick labels don't seem to specify
    a tick location, so assume that the appropriate value is nextTo. This
    change doesn't support the associated extLst, which possibly provides
    location information.
    
    Change-Id: I0a79cacf1675b4159e7f821d4008e3ef0beaad55
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198572
    Reviewed-by: Tomaž Vajngerl <[email protected]>
    Tested-by: Jenkins

diff --git a/chart2/qa/extras/chart2export2.cxx 
b/chart2/qa/extras/chart2export2.cxx
index 32766ba9b161..a1960c60f861 100644
--- a/chart2/qa/extras/chart2export2.cxx
+++ b/chart2/qa/extras/chart2export2.cxx
@@ -285,6 +285,7 @@ CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testChartexAxes)
 
     // Should be two axes
     assertXPath(pXmlDoc, "/cx:chartSpace/cx:chart/cx:plotArea/cx:axis", 2);
+    assertXPath(pXmlDoc, 
"/cx:chartSpace/cx:chart/cx:plotArea/cx:axis/cx:tickLabels", 2);
 }
 
 CPPUNIT_TEST_FIXTURE(Chart2ExportTest2, testAxisTitleRotationXLSX)
diff --git a/oox/source/drawingml/chart/axiscontext.cxx 
b/oox/source/drawingml/chart/axiscontext.cxx
index cbab186f1ed9..f34a41d926f4 100644
--- a/oox/source/drawingml/chart/axiscontext.cxx
+++ b/oox/source/drawingml/chart/axiscontext.cxx
@@ -347,6 +347,7 @@ ContextHandlerRef CxAxisContext::onCreateContext( sal_Int32 
nElement, const Attr
             mrModel.mnMinorTickMark = rAttribs.getToken( XML_type, XML_cross );
             return nullptr;
         case CX_TOKEN(tickLabels) :
+            mrModel.mnTickLabelPos = XML_nextTo;    // Is this the right 
default?
             // TODO (contents is only an extLst)
             return nullptr;
         case CX_TOKEN(numFmt):
diff --git a/oox/source/export/chartexport.cxx 
b/oox/source/export/chartexport.cxx
index 07256b213437..7e2a3e114b6c 100644
--- a/oox/source/export/chartexport.cxx
+++ b/oox/source/export/chartexport.cxx
@@ -4954,8 +4954,18 @@ void ChartExport::exportOneAxis_chartex(
                 getTickMarkLocStr(nValue));
     }
 
-    // ==== tickLabels consists of nothing but an extLst so I don't know how to
-    // handle it
+    // ==== tickLabels
+    bool bDisplayLabel = false;
+    if (GetProperty( xAxisProp, u"DisplayLabels"_ustr ) )
+    {
+        mAny >>= bDisplayLabel;
+
+        if( bDisplayLabel )
+        {
+            pFS->singleElement(FSNS(XML_cx, XML_tickLabels));
+        }
+    }
+    // There's also an extLst but not sure what to do with it
 
     // ==== numFmt
     bool bLinkedNumFmt = true;

Reply via email to