chart2/source/controller/main/ElementSelector.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit 8f23544311f6593ad46c503524be2508fd784c71
Author:     Caolán McNamara <caol...@redhat.com>
AuthorDate: Thu Nov 17 15:51:58 2022 +0000
Commit:     Michael Stahl <michael.st...@allotropia.de>
CommitDate: Mon Nov 21 11:22:40 2022 +0100

    Resolves: tdf#152087 strip any newlines from the entry
    
    Change-Id: I965ecd89c7edaf1a02d3f94df23f09c9e9490d54
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142914
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.st...@allotropia.de>

diff --git a/chart2/source/controller/main/ElementSelector.cxx 
b/chart2/source/controller/main/ElementSelector.cxx
index 34bba3173a85..d538108ae8e9 100644
--- a/chart2/source/controller/main/ElementSelector.cxx
+++ b/chart2/source/controller/main/ElementSelector.cxx
@@ -158,7 +158,8 @@ void SelectorListBox::UpdateChartElementsListAndSelection()
         sal_uInt16 nN=0;
         for (auto const& entry : m_aEntries)
         {
-            m_xWidget->append_text(entry.UIName);
+            // tdf#152087 strip any newlines from the entry
+            m_xWidget->append_text(entry.UIName.replaceAll("\n", " "));
             if ( !bSelectionFound && aSelectedOID == entry.OID )
             {
                 nEntryPosToSelect = nN;

Reply via email to