editeng/source/misc/svxacorr.cxx       |    2 ++
 sw/source/core/swg/SwXMLTextBlocks.cxx |    2 ++
 2 files changed, 4 insertions(+)

New commits:
commit a03a9236b01437b573cb68112959b9403418e11b
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Thu Jan 11 13:09:51 2024 +0100
Commit:     Andreas Heinisch <andreas.heini...@yahoo.de>
CommitDate: Thu Jan 11 19:25:50 2024 +0100

    tdf#156769 - Escape the question mark in the storage name
    
    Otherwise, an auto-text using the question mark for its shortcut
    cannot be inserted.
    
    Change-Id: I369e3d0f2ff82cea2d053896964a5c2c23b8d6f6
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/161921
    Tested-by: Jenkins
    Reviewed-by: Andreas Heinisch <andreas.heini...@yahoo.de>

diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ff2c4518aadd..d278b582e833 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -1976,6 +1976,8 @@ static void GeneratePackageName ( std::u16string_view 
rShort, OUString& rPackage
             case ':':
             case '.':
             case '\':
+            // tdf#156769 - escape the question mark in the storage name
+            case '?':
                 aBuf[nPos] = '_';
                 break;
             default:
diff --git a/sw/source/core/swg/SwXMLTextBlocks.cxx 
b/sw/source/core/swg/SwXMLTextBlocks.cxx
index efc3e530b0f2..f69311dfdb5f 100644
--- a/sw/source/core/swg/SwXMLTextBlocks.cxx
+++ b/sw/source/core/swg/SwXMLTextBlocks.cxx
@@ -527,6 +527,8 @@ OUString SwXMLTextBlocks::GeneratePackageName ( 
std::u16string_view rShort )
             case ':':
             case '.':
             case '\':
+            // tdf#156769 - escape the question mark in the storage name for 
auto-texts
+            case '?':
                 aBuf[nPos] = '_';
                 break;
             default:

Reply via email to