oox/source/drawingml/chart/axisconverter.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 6a1e0590c0aac7460cd8fb823f065621c33b2729
Author:     Julien Nabet <serval2...@yahoo.fr>
AuthorDate: Sat Feb 15 17:05:58 2020 +0100
Commit:     Julien Nabet <serval2...@yahoo.fr>
CommitDate: Wed Feb 19 09:46:34 2020 +0100

    Related tdf#130681: convert number format if model not deleted
    
    Opening docx from 
https://bugs.documentfoundation.org/attachment.cgi?id=157891
    I noticed this log:
    
warn:legacy.osl:151346:151346:oox/source/drawingml/chart/objectformatter.cxx:1113:
 ObjectFormatter::convertNumberFormat - cannot create number format ''
    bt:
    0  0x00007fffdb9129f1 in 
oox::drawingml::chart::ObjectFormatter::convertNumberFormat(oox::PropertySet&, 
oox::drawingml::chart::NumberFormat const&, bool, bool)
        (this=0x55555cb5ef10, rPropSet=..., rNumberFormat=..., bAxis=true, 
bShowPercent=false) at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/objectformatter.cxx:1098
    1  0x00007fffdb8ede01 in 
oox::drawingml::chart::AxisConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::chart2::XCoordinateSystem>
 const&, oox::RefVector<oox::drawingml::chart::TypeGroupConverter>&, 
oox::drawingml::chart::AxisModel const*, int, int) (this=0x7ffffffedb70, 
rxCoordSystem=
        uno::Reference to (chart::PolarCoordinateSystem2d *) 0x55555cb5b590, 
rTypeGroups=..., pCrossingAxis=0x55555d413560, nAxesSetIdx=0, nAxisIdx=1)
        at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/axisconverter.cxx:344
    2  0x00007fffdb92b96e in oox::drawingml::chart::(anonymous 
namespace)::AxesSetConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::chart2::XDiagram>
 const&, oox::drawingml::chart::View3DModel&, sal_Int32, bool) 
(this=0x7ffffffedd90, rxDiagram=uno::Reference to (chart::Diagram *) 
0x55555d905d38, rView3DModel=..., nAxesSetIdx=0, 
bSupportsVaryColorsByPoint=true)
        at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/plotareaconverter.cxx:167
    3  0x00007fffdb92d32d in 
oox::drawingml::chart::PlotAreaConverter::convertFromModel(oox::drawingml::chart::View3DModel&)
 (this=0x7ffffffedfb0, rView3DModel=...)
        at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/plotareaconverter.cxx:425
    4  0x00007fffdb8fb4b8 in 
oox::drawingml::chart::ChartSpaceConverter::convertFromModel(com::sun::star::uno::Reference<com::sun::star::drawing::XShapes>
 const&, com::sun::star::awt::Point const&)
        (this=0x7ffffffee090, rxExternalPage=empty uno::Reference, 
rChartPos=...) at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/chartspaceconverter.cxx:163
    5  0x00007fffdb8f3af4 in 
oox::drawingml::chart::ChartConverter::convertFromModel(oox::core::XmlFilterBase&,
 oox::drawingml::chart::ChartSpaceModel&, 
com::sun::star::uno::Reference<com::sun::star::chart2::XChartDocument> const&, 
com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&, 
com::sun::star::awt::Point const&, com::sun::star::awt::Size const&) 
(this=0x55555dc08800, rFilter=
        ..., rChartModel=..., rxChartDoc=uno::Reference to (chart::ChartModel 
*) 0x55555d4cc190, rxExternalPage=empty uno::Reference, rChartPos=..., 
rChartSize=...)
        at 
/home/julien/lo/libreoffice/oox/source/drawingml/chart/chartconverter.cxx:101
    6  0x00007fffdba48a22 in 
oox::drawingml::Shape::finalizeXShape(oox::core::XmlFilterBase&, 
com::sun::star::uno::Reference<com::sun::star::drawing::XShapes> const&) 
(this=0x55555dbdc450, rFilter=..., rxShapes=
        uno::Reference to (SwXDrawPage *) 0x55555dbbbfe0) at 
/home/julien/lo/libreoffice/oox/source/drawingml/shape.cxx:1717
    
    Change-Id: I9196532025eb0b3ff2b73cac2c5bac3726fe0761
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88761
    Tested-by: Jenkins
    Reviewed-by: Julien Nabet <serval2...@yahoo.fr>

diff --git a/oox/source/drawingml/chart/axisconverter.cxx 
b/oox/source/drawingml/chart/axisconverter.cxx
index 1b836d01124b..b79620081a70 100644
--- a/oox/source/drawingml/chart/axisconverter.cxx
+++ b/oox/source/drawingml/chart/axisconverter.cxx
@@ -339,8 +339,7 @@ void AxisConverter::convertFromModel(
         xAxis->setScaleData( aScaleData );
 
         // number format ------------------------------------------------------
-
-        if( (aScaleData.AxisType == cssc2::AxisType::REALNUMBER) || 
(aScaleData.AxisType == cssc2::AxisType::PERCENT) )
+        if( !mrModel.mbDeleted && ((aScaleData.AxisType == 
cssc2::AxisType::REALNUMBER) || (aScaleData.AxisType == 
cssc2::AxisType::PERCENT)) )
             getFormatter().convertNumberFormat(aAxisProp, 
mrModel.maNumberFormat, true);
 
         // position of crossing axis ------------------------------------------
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to