svx/source/gallery2/galini.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit 961439e8e6f7a5a179bcdd092254dd1f32a1c7c5 Author: Christian Lohmaier <[email protected]> AuthorDate: Fri Oct 17 13:43:55 2025 +0200 Commit: Christian Lohmaier <[email protected]> CommitDate: Sun Oct 19 21:14:37 2025 +0200 tdf#167704 fix gallery themes not using translations regression from d81808ec15064e7655503253dddb8ebdc58b1b29 it is not substr(startPos, endPos) but substr(startPos, length) so the code ended up with the whole remainder of the key: 'langCode]' instead of just 'langCode' and that broke the lookup. Change-Id: I33eddf566e2d453dff14c123fc6c8cda97382b2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/192573 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <[email protected]> diff --git a/svx/source/gallery2/galini.cxx b/svx/source/gallery2/galini.cxx index c204f609ec6f..e29c9322e0d1 100644 --- a/svx/source/gallery2/galini.cxx +++ b/svx/source/gallery2/galini.cxx @@ -64,7 +64,7 @@ OUString GalleryFileStorageEntry::ReadStrFromIni(std::string_view aKeyName) cons if (n == std::string_view::npos || n < 1) continue; - std::string_view aLocale = o3tl::trim(aKey.substr(n + 1, aKey.find(']', n + 2))); + std::string_view aLocale = o3tl::trim(aKey.substr(n + 1, aKey.find(']', n + 2) - n - 1)); aKey = o3tl::trim(aKey.substr(0, n)); SAL_INFO("svx", "ini file has '" << aKey << "' [ '" << aLocale << "' ] = '" << aValue << "'");
