summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-10-19 13:24:01 +0200
committerStephan Bergmann <sbergman@redhat.com>2019-10-19 15:36:52 +0200
commitac2c1fb821b45f2382a5104b4d98dc08061ae938 (patch)
treebcc57c5cf1a9853fffd9792205cbe05aa07a1863 /sw
parent4444d5dbe7dba90ccfb0a9eeed36be0abfdd1854 (diff)
Replace some uses of OUStringChar with string literals
Change-Id: I763f9a3f57efcd47643ca4651e2454e95c6921c9 Reviewed-on: https://gerrit.libreoffice.org/81127 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sw')
-rw-r--r--sw/qa/extras/uiwriter/uiwriter.cxx2
-rw-r--r--sw/source/core/crsr/crstrvl.cxx2
-rw-r--r--sw/source/core/edit/editsh.cxx2
-rw-r--r--sw/source/core/fields/reffld.cxx2
-rw-r--r--sw/source/ui/vba/vbalisthelper.cxx40
-rw-r--r--sw/source/uibase/docvw/edtwin2.cxx2
6 files changed, 25 insertions, 25 deletions
diff --git a/sw/qa/extras/uiwriter/uiwriter.cxx b/sw/qa/extras/uiwriter/uiwriter.cxx
index 2b1b04f8ae80..afbe37ce21aa 100644
--- a/sw/qa/extras/uiwriter/uiwriter.cxx
+++ b/sw/qa/extras/uiwriter/uiwriter.cxx
@@ -6945,7 +6945,7 @@ void SwUiWriterTest::testTdf108423()
pWrtShell->AutoCorrect(corr, cChar);
// The word "i" should be capitalized due to autocorrect, followed by a typographical apostrophe
sal_uLong nIndex = pWrtShell->GetCursor()->GetNode().GetIndex();
- OUString sIApostrophe(u"I" + OUStringChar(0x2019));
+ OUString sIApostrophe(u"I\u2019");
CPPUNIT_ASSERT_EQUAL(sIApostrophe, static_cast<SwTextNode*>(pDoc->GetNodes()[nIndex])->GetText());
pWrtShell->Insert(" i");
pWrtShell->AutoCorrect(corr, cChar);
diff --git a/sw/source/core/crsr/crstrvl.cxx b/sw/source/core/crsr/crstrvl.cxx
index 374d0d940c7f..9153b8b34e85 100644
--- a/sw/source/core/crsr/crstrvl.cxx
+++ b/sw/source/core/crsr/crstrvl.cxx
@@ -2452,7 +2452,7 @@ bool SwCursorShell::SelectNxtPrvHyperlink( bool bNext )
rAttr.GetStart(),
*rAttr.GetEnd() - rAttr.GetStart() ) );
- sText = sText.replaceAll(OUStringChar(0x0a), "");
+ sText = sText.replaceAll("\x0a", "");
sText = comphelper::string::strip(sText, ' ');
if( !sText.isEmpty() )
diff --git a/sw/source/core/edit/editsh.cxx b/sw/source/core/edit/editsh.cxx
index cc19ed2b2e5b..8f84ce42ed75 100644
--- a/sw/source/core/edit/editsh.cxx
+++ b/sw/source/core/edit/editsh.cxx
@@ -714,7 +714,7 @@ void SwEditShell::GetINetAttrs( SwGetINetAttrs& rArr )
OUString sText( pTextNd->GetExpandText(GetLayout(),
rAttr.GetStart(), *rAttr.GetEnd() - rAttr.GetStart()) );
- sText = sText.replaceAll(OUStringChar(0x0a), "");
+ sText = sText.replaceAll("\x0a", "");
sText = comphelper::string::strip(sText, ' ');
if( !sText.isEmpty() )
diff --git a/sw/source/core/fields/reffld.cxx b/sw/source/core/fields/reffld.cxx
index e2262dff3a1e..c4825a9343df 100644
--- a/sw/source/core/fields/reffld.cxx
+++ b/sw/source/core/fields/reffld.cxx
@@ -439,7 +439,7 @@ static void FilterText(OUString & rText, LanguageType const eLang,
// remove all special characters (replace them with blanks)
if (!rText.isEmpty())
{
- rText = rText.replaceAll(OUStringChar(0xad), "");
+ rText = rText.replaceAll(u"\u00ad", "");
OUStringBuffer aBuf(rText);
const sal_Int32 l = aBuf.getLength();
for (sal_Int32 i = 0; i < l; ++i)
diff --git a/sw/source/ui/vba/vbalisthelper.cxx b/sw/source/ui/vba/vbalisthelper.cxx
index 7f83374990d1..4c8712c9a3a0 100644
--- a/sw/source/ui/vba/vbalisthelper.cxx
+++ b/sw/source/ui/vba/vbalisthelper.cxx
@@ -39,14 +39,14 @@ static const char UNO_NAME_CHAR_STYLE_NAME[] = "CharStyleName";
static const char UNO_NAME_NUMBERING_TYPE[] = "NumberingType";
static const char UNO_NAME_BULLET_CHAR[] = "BulletChar";
-static const sal_Int16 CHAR_CLOSED_DOT = 8226;
-static const sal_Int16 CHAR_EMPTY_DOT = 111;
-static const sal_Int16 CHAR_SQUARE = 9632;
-static const sal_Int16 CHAR_STAR_SYMBOL = 10026;
-static const sal_Int16 CHAR_FOUR_DIAMONDS = 10070;
-static const sal_Int16 CHAR_DIAMOND = 10022;
-static const sal_Int16 CHAR_ARROW = 10146;
-static const sal_Int16 CHAR_CHECK_MARK = 10003;
+static const sal_Unicode CHAR_CLOSED_DOT[] = u"\u2022";
+static const char CHAR_EMPTY_DOT[] = "o";
+static const sal_Unicode CHAR_SQUARE[] = u"\u2540";
+static const sal_Unicode CHAR_STAR_SYMBOL[] = u"\u272A";
+static const sal_Unicode CHAR_FOUR_DIAMONDS[] = u"\u2756";
+static const sal_Unicode CHAR_DIAMOND[] = u"\u2726";
+static const sal_Unicode CHAR_ARROW[] = u"\u27A2";
+static const sal_Unicode CHAR_CHECK_MARK[] = u"\u2713";
SwVbaListHelper::SwVbaListHelper( const css::uno::Reference< css::text::XTextDocument >& xTextDoc, sal_Int32 nGalleryType, sal_Int32 nTemplateType ) : mxTextDocument( xTextDoc ), mnGalleryType( nGalleryType ), mnTemplateType( nTemplateType )
{
@@ -144,37 +144,37 @@ void SwVbaListHelper::CreateBulletListTemplate()
{
case 1:
{
- aBulletChar = OUString( sal_Unicode( CHAR_CLOSED_DOT ) );
+ aBulletChar = CHAR_CLOSED_DOT;
break;
}
case 2:
{
- aBulletChar = OUStringChar(CHAR_EMPTY_DOT);
+ aBulletChar = CHAR_EMPTY_DOT;
break;
}
case 3:
{
- aBulletChar = OUString( sal_Unicode( CHAR_SQUARE ) );
+ aBulletChar = CHAR_SQUARE;
break;
}
case 4:
{
- aBulletChar = OUString( sal_Unicode( CHAR_STAR_SYMBOL ) );
+ aBulletChar = CHAR_STAR_SYMBOL;
break;
}
case 5:
{
- aBulletChar = OUString( sal_Unicode( CHAR_FOUR_DIAMONDS ) );
+ aBulletChar = CHAR_FOUR_DIAMONDS;
break;
}
case 6:
{
- aBulletChar = OUString( sal_Unicode( CHAR_ARROW ) );
+ aBulletChar = CHAR_ARROW;
break;
}
case 7:
{
- aBulletChar = OUString( sal_Unicode( CHAR_CHECK_MARK ) );
+ aBulletChar = CHAR_CHECK_MARK;
break;
}
default:
@@ -411,31 +411,31 @@ void SwVbaListHelper::CreateOutlineNumberForType3()
{
case 0:
{
- aBulletChar = OUString( sal_Unicode( CHAR_FOUR_DIAMONDS ) );
+ aBulletChar = CHAR_FOUR_DIAMONDS;
break;
}
case 1:
case 5:
{
- aBulletChar = OUString( sal_Unicode( CHAR_ARROW ) );
+ aBulletChar = CHAR_ARROW;
break;
}
case 2:
case 6:
{
- aBulletChar = OUString( sal_Unicode( CHAR_SQUARE ) );
+ aBulletChar = CHAR_SQUARE;
break;
}
case 3:
case 7:
{
- aBulletChar = OUString( sal_Unicode( CHAR_CLOSED_DOT ) );
+ aBulletChar = CHAR_CLOSED_DOT;
break;
}
case 4:
case 8:
{
- aBulletChar = OUString( sal_Unicode( CHAR_DIAMOND ) );
+ aBulletChar = CHAR_DIAMOND;
break;
}
}
diff --git a/sw/source/uibase/docvw/edtwin2.cxx b/sw/source/uibase/docvw/edtwin2.cxx
index a319308290af..cf9082253f5b 100644
--- a/sw/source/uibase/docvw/edtwin2.cxx
+++ b/sw/source/uibase/docvw/edtwin2.cxx
@@ -205,7 +205,7 @@ void SwEditWin::RequestHelp(const HelpEvent &rEvt)
if( !sText.isEmpty() )
{
- OUStringBuffer sTmp(sText.replaceAll(OUStringChar(0xad), ""));
+ OUStringBuffer sTmp(sText.replaceAll(u"\u00ad", ""));
for (sal_Int32 i = 0; i < sTmp.getLength(); ++i)
{
if (sTmp[i] < 0x20)