summaryrefslogtreecommitdiff
path: root/vcl
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-16 15:06:23 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-17 07:28:49 +0200
commit8b4719c29fc9bd7e198ad6ced301e1ff7a350f16 (patch)
treed3ec594b343f56c76056418d835d3bc7b696a9ab /vcl
parentf51cd77bcecc5134e0e04c398bfb7b34eb65d68d (diff)
Rename OUStringLiteral1 to OUStringChar
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/control/combobox.cxx4
-rw-r--r--vcl/source/control/edit.cxx2
-rw-r--r--vcl/source/control/quickselectionengine.cxx2
-rw-r--r--vcl/source/font/OpenTypeFeatureDefinitonList.cxx2
-rw-r--r--vcl/source/gdi/pdfwriter_impl.cxx2
-rw-r--r--vcl/source/outdev/text.cxx4
-rw-r--r--vcl/source/treelist/inetimg.cxx10
-rw-r--r--vcl/source/uitest/logger.cxx4
-rw-r--r--vcl/source/window/mnemonic.cxx4
-rw-r--r--vcl/unx/generic/window/salframe.cxx2
-rw-r--r--vcl/win/window/salframe.cxx2
11 files changed, 19 insertions, 19 deletions
diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx
index aee7037e60fe..9cdba187953c 100644
--- a/vcl/source/control/combobox.cxx
+++ b/vcl/source/control/combobox.cxx
@@ -393,11 +393,11 @@ IMPL_LINK_NOARG(ComboBox::Impl, ImplSelectHdl, LinkParamNone*, void)
if ( !aSelInText.count( nP ) )
{
if (!aText.isEmpty() && (aText[aText.getLength()-1] != m_cMultiSep))
- aText += OUStringLiteral1(m_cMultiSep);
+ aText += OUStringChar(m_cMultiSep);
if ( !aText.isEmpty() )
aText += " "; // slightly loosen
aText += m_pImplLB->GetEntryList()->GetEntryText( nP );
- aText += OUStringLiteral1(m_cMultiSep);
+ aText += OUStringChar(m_cMultiSep);
}
}
aText = comphelper::string::stripEnd( aText, m_cMultiSep );
diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx
index 1620532ffba3..ab3314510496 100644
--- a/vcl/source/control/edit.cxx
+++ b/vcl/source/control/edit.cxx
@@ -2279,7 +2279,7 @@ OUString TextFilter::filter(const OUString &rText)
OUString sTemp(rText);
for (sal_Int32 i = 0; i < sForbiddenChars.getLength(); ++i)
{
- sTemp = sTemp.replaceAll(OUStringLiteral1(sForbiddenChars[i]), "");
+ sTemp = sTemp.replaceAll(OUStringChar(sForbiddenChars[i]), "");
}
return sTemp;
}
diff --git a/vcl/source/control/quickselectionengine.cxx b/vcl/source/control/quickselectionengine.cxx
index 3773a3afd039..aff324a4eb65 100644
--- a/vcl/source/control/quickselectionengine.cxx
+++ b/vcl/source/control/quickselectionengine.cxx
@@ -119,7 +119,7 @@ namespace vcl
if ( ( c >= 32 ) && ( c != 127 ) && !_keyEvent.GetKeyCode().IsMod2() )
{
- m_pData->sCurrentSearchString += OUStringLiteral1(c);
+ m_pData->sCurrentSearchString += OUStringChar(c);
SAL_INFO( "vcl", "QuickSelectionEngine::HandleKeyEvent: searching for " << m_pData->sCurrentSearchString );
if ( m_pData->sCurrentSearchString.getLength() == 1 )
diff --git a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx b/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
index c68ad6cd68b2..9a7b2993a7c1 100644
--- a/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
+++ b/vcl/source/font/OpenTypeFeatureDefinitonList.cxx
@@ -145,7 +145,7 @@ OUString getNumericLowerPart(sal_uInt32 nFeatureCode)
if (rtl::isAsciiDigit(static_cast<unsigned char>(cChar1))
&& rtl::isAsciiDigit(static_cast<unsigned char>(cChar2)))
{
- return OUStringLiteral1(cChar1) + OUStringLiteral1(cChar2);
+ return OUStringChar(cChar1) + OUStringChar(cChar2);
}
return OUString();
}
diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index b2c885086ead..d937244532fc 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -5227,7 +5227,7 @@ static void escapeStringXML( const OUString& rStr, OUString &rValue)
rValue += "&quot;";
break;
default:
- rValue += OUStringLiteral1( *pUni );
+ rValue += OUStringChar( *pUni );
break;
}
}
diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx
index 63a68966c819..3c69069929a8 100644
--- a/vcl/source/outdev/text.cxx
+++ b/vcl/source/outdev/text.cxx
@@ -835,7 +835,7 @@ void OutputDevice::DrawText( const Point& rStartPt, const OUString& rStr,
{
pVector->push_back( *it );
if( pDisplayText )
- *pDisplayText += OUStringLiteral1(rStr[ nIndex ]);
+ *pDisplayText += OUStringChar(rStr[ nIndex ]);
bInserted = true;
}
}
@@ -1959,7 +1959,7 @@ OUString OutputDevice::ImplGetEllipsisString( const OutputDevice& rTargetDevice,
}
if ( aStr.isEmpty() && (nStyle & DrawTextFlags::Clip) )
- aStr += OUStringLiteral1(rOrigStr[ 0 ]);
+ aStr += OUStringChar(rOrigStr[ 0 ]);
}
else if ( nStyle & DrawTextFlags::PathEllipsis )
{
diff --git a/vcl/source/treelist/inetimg.cxx b/vcl/source/treelist/inetimg.cxx
index fe549a94ce3a..9c7329e3065c 100644
--- a/vcl/source/treelist/inetimg.cxx
+++ b/vcl/source/treelist/inetimg.cxx
@@ -32,12 +32,12 @@ void INetImage::Write( SvStream& rOStm, SotClipboardFormatId nFormat ) const
case SotClipboardFormatId::INET_IMAGE:
{
OUString sString(
- aImageURL + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetURL
- + OUStringLiteral1(TOKEN_SEPARATOR) + aTargetFrame
- + OUStringLiteral1(TOKEN_SEPARATOR) /* + aAlternateText */
- + OUStringLiteral1(TOKEN_SEPARATOR)
+ aImageURL + OUStringChar(TOKEN_SEPARATOR) + aTargetURL
+ + OUStringChar(TOKEN_SEPARATOR) + aTargetFrame
+ + OUStringChar(TOKEN_SEPARATOR) /* + aAlternateText */
+ + OUStringChar(TOKEN_SEPARATOR)
+ OUString::number(aSizePixel.Width())
- + OUStringLiteral1(TOKEN_SEPARATOR)
+ + OUStringChar(TOKEN_SEPARATOR)
+ OUString::number(aSizePixel.Height()));
OString sOut(OUStringToOString(sString,
diff --git a/vcl/source/uitest/logger.cxx b/vcl/source/uitest/logger.cxx
index 2ab6026de4af..858dd0353d14 100644
--- a/vcl/source/uitest/logger.cxx
+++ b/vcl/source/uitest/logger.cxx
@@ -225,13 +225,13 @@ void UITestLogger::logKeyInput(VclPtr<vcl::Window> const& xUIElement, const KeyE
aKeyCode += "ALT+";
if (aFound.isEmpty())
- aKeyCode += OUStringLiteral1(nChar) + "\"}";
+ aKeyCode += OUStringChar(nChar) + "\"}";
else
aKeyCode += aFound + "\"}";
}
else
{
- aKeyCode = "{\"TEXT\": \"" + OUStringLiteral1(nChar) + "\"}";
+ aKeyCode = "{\"TEXT\": \"" + OUStringChar(nChar) + "\"}";
}
std::unique_ptr<UIObject> pUIObject = xUIElement->GetUITestFactory()(xUIElement.get());
diff --git a/vcl/source/window/mnemonic.cxx b/vcl/source/window/mnemonic.cxx
index bbe12299abc5..6108621918e6 100644
--- a/vcl/source/window/mnemonic.cxx
+++ b/vcl/source/window/mnemonic.cxx
@@ -262,8 +262,8 @@ OUString MnemonicGenerator::CreateMnemonic( const OUString& _rKey )
if ( maMnemonics[nMnemonicIndex] )
{
maMnemonics[nMnemonicIndex] = 0;
- OUString aStr = OUStringLiteral("(") + OUStringLiteral1(m_cMnemonic) +
- OUStringLiteral1(sal_Unicode(rtl::toAsciiUpperCase(c))) +
+ OUString aStr = OUStringLiteral("(") + OUStringChar(m_cMnemonic) +
+ OUStringChar(sal_Unicode(rtl::toAsciiUpperCase(c))) +
")";
nIndex = rKey.getLength();
if( nIndex >= 2 )
diff --git a/vcl/unx/generic/window/salframe.cxx b/vcl/unx/generic/window/salframe.cxx
index 87b795513367..83dfaf35e434 100644
--- a/vcl/unx/generic/window/salframe.cxx
+++ b/vcl/unx/generic/window/salframe.cxx
@@ -2881,7 +2881,7 @@ bool X11SalFrame::appendUnicodeSequence( sal_Unicode c )
(c >= 'a' && c <= 'f') ||
(c >= 'A' && c <= 'F') )
{
- rSeq += OUStringLiteral1(c);
+ rSeq += OUStringChar(c);
std::vector<ExtTextInputAttr> attribs( rSeq.getLength(), ExtTextInputAttr::Underline );
SalExtTextInputEvent aEv;
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 4546031b20b3..73028b8a48ec 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -4379,7 +4379,7 @@ static LRESULT ImplMenuChar( HWND, WPARAM wParam, LPARAM lParam )
{
LRESULT nRet = MNC_IGNORE;
HMENU hMenu = reinterpret_cast<HMENU>(lParam);
- OUString aMnemonic( "&" + OUStringLiteral1(static_cast<sal_Unicode>(LOWORD(wParam))) );
+ OUString aMnemonic( "&" + OUStringChar(static_cast<sal_Unicode>(LOWORD(wParam))) );
aMnemonic = aMnemonic.toAsciiLowerCase(); // we only have ascii mnemonics
// search the mnemonic in the current menu