[Libreoffice-commits] core.git: vcl/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Aug 4 06:18:23 UTC 2021
vcl/source/window/builder.cxx | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
New commits:
commit fba874c162bcb78f2979f4da57ccd4c384c71d72
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Tue Aug 3 22:59:01 2021 +0200
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Aug 4 08:17:47 2021 +0200
Fix ambiguous calls in C++20
...which added a
> template<class It, class End>
> constexpr basic_string_view(It begin, End end);
ctor, causing
> vcl/source/window/builder.cxx:2966:35: error: call to 'get' is ambiguous
> sFinalValue = Translate::get({sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
> ^~~~~~~~~~~~~~
> include/unotools/resmgr.hxx:67:33: note: candidate function
> UNOTOOLS_DLLPUBLIC OUString get(std::string_view aId, const std::locale &loc);
> ^
> include/unotools/resmgr.hxx:69:33: note: candidate function
> UNOTOOLS_DLLPUBLIC OUString get(TranslateId sContextAndId, const std::locale &loc);
> ^
etc.
Change-Id: I638be4a3d310179ee73866c4a70b20c49925ede6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119957
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx
index 723c28ca640d..0feb6e1689bf 100644
--- a/vcl/source/window/builder.cxx
+++ b/vcl/source/window/builder.cxx
@@ -2963,7 +2963,7 @@ void VclBuilder::handleRow(xmlreader::XmlReader &reader, const OString &rID)
OUString sFinalValue;
if (bTranslated)
{
- sFinalValue = Translate::get({sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
+ sFinalValue = Translate::get(TranslateId{sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
}
else
sFinalValue = OUString::fromUtf8(sValue);
@@ -3126,7 +3126,7 @@ std::vector<ComboBoxTextItem> VclBuilder::handleItems(xmlreader::XmlReader &read
OUString sFinalValue;
if (bTranslated)
{
- sFinalValue = Translate::get({sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
+ sFinalValue = Translate::get(TranslateId{sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
}
else
sFinalValue = OUString::fromUtf8(sValue);
@@ -3939,7 +3939,7 @@ void VclBuilder::collectProperty(xmlreader::XmlReader &reader, stringmap &rMap)
OUString sFinalValue;
if (bTranslated)
{
- sFinalValue = Translate::get({sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
+ sFinalValue = Translate::get(TranslateId{sContext.getStr(), sValue.getStr()}, m_pParserState->m_aResLocale);
}
else
sFinalValue = OUString::fromUtf8(sValue);
More information about the Libreoffice-commits
mailing list