summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2021-08-03 22:59:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2021-08-04 08:17:47 +0200
commitfba874c162bcb78f2979f4da57ccd4c384c71d72 (patch)
tree8c4f53859858696d87cb41f9215225d53c942610
parent4115ad1035cb13e06ed00791415a4258767b8808 (diff)
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@redhat.com>
-rw-r--r--vcl/source/window/builder.cxx6
1 files changed, 3 insertions, 3 deletions
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);