vcl/source/window/builder.cxx | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-)
New commits: commit 013b3895225fbd92c14ecd3c28bd7e1ac9ed62df Author: Michael Weghorn <m.wegh...@posteo.de> AuthorDate: Mon Aug 12 13:28:29 2024 +0200 Commit: Michael Weghorn <m.wegh...@posteo.de> CommitDate: Tue Aug 13 07:25:45 2024 +0200 tdf#130857 VclBuilder: Reuse existing helper method Reuse the existing helper method `BuilderBase::finalizeValue` introduced in previous commit Change-Id: I76a41dbe9c830de02cb38b17d3587d49f64d0ff8 Author: Michael Weghorn <m.wegh...@posteo.de> Date: Mon Aug 12 13:24:46 2024 +0200 tdf#130857 VclBuilder: Extract helper to finalize value in `VclBuilder::collectProperty` instead of duplicating the logic there. Change-Id: Id04b27e880647150f8fb9aad321e3d216f92844c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171789 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.wegh...@posteo.de> diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 003dd81a6fea..d25eb5efc954 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -4016,18 +4016,8 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap) if (!sProperty.isEmpty()) { OString sValue(name.begin, name.length); - OUString sFinalValue; - if (bTranslated) - { - sFinalValue - = Translate::get(TranslateId{ sContext.getStr(), sValue.getStr() }, getResLocale()); - } - else - sFinalValue = OUString::fromUtf8(sValue); - + const OUString sFinalValue = finalizeValue(sContext, sValue, bTranslated); sProperty = sProperty.replace('_', '-'); - if (ResHookProc pStringReplace = Translate::GetReadStringHook()) - sFinalValue = (*pStringReplace)(sFinalValue); rMap[sProperty] = sFinalValue; } }