oox/source/drawingml/chart/seriesconverter.cxx |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 310a787e1b03ba6d9c99996dfbd380296a8da825
Author:     Noel Grandin <noel.gran...@collabora.co.uk>
AuthorDate: Thu Jul 14 11:23:51 2022 +0200
Commit:     Noel Grandin <noel.gran...@collabora.co.uk>
CommitDate: Thu Jul 14 13:18:26 2022 +0200

    tdf#149985 pptx crash on a one-slide presentation (with a chart)
    
    regression from
        commit 04073c5fedd33654f242fecb7e39afb07cf0e273
        Date:   Tue Jun 21 13:17:09 2022 +0200
        replace oox::OptValue with std::optional
    
    Change-Id: I830713495ca04771433018f1091faadf0f6bd71e
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137051
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk>

diff --git a/oox/source/drawingml/chart/seriesconverter.cxx 
b/oox/source/drawingml/chart/seriesconverter.cxx
index 1e00618ae411..2676b70c9ad0 100644
--- a/oox/source/drawingml/chart/seriesconverter.cxx
+++ b/oox/source/drawingml/chart/seriesconverter.cxx
@@ -361,7 +361,7 @@ void DataLabelConverter::convertFromModel( const Reference< 
XDataSeries >& rxDat
                         if (eType == 
DataPointCustomLabelFieldType::DataPointCustomLabelFieldType_CELLRANGE && 
oaCellRange.has_value())
                         {
                             xCustomLabel->setCellRange( oaCellRange.value() );
-                            xCustomLabel->setString( oaLabelText.value() );
+                            xCustomLabel->setString( oaLabelText.value_or("") 
);
                             xCustomLabel->setDataLabelsRange( true );
                         }
                         else

Reply via email to