summaryrefslogtreecommitdiff
path: root/vcl/source
diff options
context:
space:
mode:
authorMichael Weghorn <m.weghorn@posteo.de>2024-08-12 11:33:16 +0200
committerMichael Weghorn <m.weghorn@posteo.de>2024-08-13 07:16:49 +0200
commit6c50f685c527f3fa67d7cd9b4842d7e9735e42a1 (patch)
tree48f99e24eae886bee7ff916b081f8fb1223ff5bc /vcl/source
parentbfca3583e0df069b9e18ec1d7ca988276cc91f3f (diff)
tdf#130857 Drop VclBuilder::m_pStringReplace
Just use a local variable and call the `Translate::GetReadStringHook` getter directly in the currently 2 places using it. (Those will be further consolidated to use a helper method in upcoming commits.) Change-Id: I787a4794e6fd727e19bad12d5f61df66f41964c9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171763 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
Diffstat (limited to 'vcl/source')
-rw-r--r--vcl/source/window/builder.cxx9
1 files changed, 4 insertions, 5 deletions
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index c5c480eceaae..0b5b6979f80f 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -459,7 +459,6 @@ VclBuilder::VclBuilder(vcl::Window* pParent, const OUString& sUIDir, const OUStr
: new NotebookBarAddonsItem{})
, m_sID(std::move(sID))
, m_sHelpRoot(sUIFile)
- , m_pStringReplace(Translate::GetReadStringHook())
, m_pParent(pParent)
, m_bToplevelParentFound(false)
, m_pParserState(new ParserState)
@@ -3195,8 +3194,8 @@ std::vector<ComboBoxTextItem> VclBuilder::handleItems(xmlreader::XmlReader &read
else
sFinalValue = OUString::fromUtf8(sValue);
- if (m_pStringReplace)
- sFinalValue = (*m_pStringReplace)(sFinalValue);
+ if (ResHookProc pStringReplace = Translate::GetReadStringHook())
+ sFinalValue = (*pStringReplace)(sFinalValue);
aItems.emplace_back(sFinalValue, sId);
}
@@ -4004,8 +4003,8 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap)
if (!sProperty.isEmpty())
{
sProperty = sProperty.replace('_', '-');
- if (m_pStringReplace)
- sFinalValue = (*m_pStringReplace)(sFinalValue);
+ if (ResHookProc pStringReplace = Translate::GetReadStringHook())
+ sFinalValue = (*pStringReplace)(sFinalValue);
rMap[sProperty] = sFinalValue;
}
}