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.heinisch@yahoo.de>
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index ff2c451..d278b58 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 efc3e53..f69311d 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: