summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--editeng/qa/lookuptree/lookuptree_test.cxx26
-rw-r--r--editeng/qa/unit/core-test.cxx396
-rw-r--r--editeng/source/accessibility/AccessibleContextBase.cxx10
-rw-r--r--editeng/source/accessibility/AccessibleEditableTextPara.cxx80
-rw-r--r--editeng/source/accessibility/AccessibleImageBullet.cxx20
-rw-r--r--editeng/source/accessibility/AccessibleStaticTextBase.cxx6
-rw-r--r--editeng/source/editeng/editdbg.cxx2
-rw-r--r--editeng/source/editeng/editdoc.cxx8
-rw-r--r--editeng/source/editeng/editview.cxx40
-rw-r--r--editeng/source/editeng/eehtml.cxx2
-rw-r--r--editeng/source/editeng/eertfpar.cxx2
-rw-r--r--editeng/source/editeng/impedit.cxx4
-rw-r--r--editeng/source/editeng/impedit2.cxx2
-rw-r--r--editeng/source/editeng/impedit3.cxx4
-rw-r--r--editeng/source/editeng/impedit4.cxx2
-rw-r--r--editeng/source/items/flditem.cxx2
-rw-r--r--editeng/source/items/legacyitem.cxx2
-rw-r--r--editeng/source/items/numitem.cxx14
-rw-r--r--editeng/source/items/svxfont.cxx8
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectExport.cxx4
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx4
-rw-r--r--editeng/source/misc/acorrcfg.cxx6
-rw-r--r--editeng/source/misc/svxacorr.cxx18
-rw-r--r--editeng/source/misc/swafopt.cxx2
-rw-r--r--editeng/source/misc/unolingu.cxx6
-rw-r--r--editeng/source/outliner/outliner.cxx4
-rw-r--r--editeng/source/uno/UnoForbiddenCharsTable.cxx6
-rw-r--r--editeng/source/uno/unofield.cxx38
-rw-r--r--editeng/source/uno/unonrule.cxx12
-rw-r--r--editeng/source/uno/unopracc.cxx2
-rw-r--r--editeng/source/uno/unotext.cxx28
-rw-r--r--editeng/source/uno/unotext2.cxx4
-rw-r--r--editeng/source/xml/xmltxtexp.cxx2
-rw-r--r--editeng/source/xml/xmltxtimp.cxx2
34 files changed, 384 insertions, 384 deletions
diff --git a/editeng/qa/lookuptree/lookuptree_test.cxx b/editeng/qa/lookuptree/lookuptree_test.cxx
index 486c871ca09f..bdad1418ca21 100644
--- a/editeng/qa/lookuptree/lookuptree_test.cxx
+++ b/editeng/qa/lookuptree/lookuptree_test.cxx
@@ -58,13 +58,13 @@ void LookupTreeTest::testTrie()
trie.insert( u"abcdefghijklmnopqrstuvwxyz" );
trie.findSuggestions( u"a", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(2), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("abc"), suggestions[0] );
- CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[1] );
+ CPPUNIT_ASSERT_EQUAL( u"abc"_ustr, suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"abcdefghijklmnopqrstuvwxyz"_ustr, suggestions[1] );
suggestions.clear();
trie.findSuggestions( u"abc", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(1), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"abcdefghijklmnopqrstuvwxyz"_ustr, suggestions[0] );
suggestions.clear();
trie.findSuggestions( u"abe", suggestions);
@@ -74,41 +74,41 @@ void LookupTreeTest::testTrie()
trie.insert( u"abe" );
trie.findSuggestions( u"", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(3), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("abc"), suggestions[0] );
- CPPUNIT_ASSERT_EQUAL( OUString("abcdefghijklmnopqrstuvwxyz"), suggestions[1] );
- CPPUNIT_ASSERT_EQUAL( OUString("abe"), suggestions[2] );
+ CPPUNIT_ASSERT_EQUAL( u"abc"_ustr, suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"abcdefghijklmnopqrstuvwxyz"_ustr, suggestions[1] );
+ CPPUNIT_ASSERT_EQUAL( u"abe"_ustr, suggestions[2] );
suggestions.clear();
trie.insert( u"H31l0" );
trie.findSuggestions( u"H", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(1), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"H31l0"_ustr, suggestions[0] );
suggestions.clear();
trie.insert( u"H1" );
trie.findSuggestions( u"H", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(2), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
- CPPUNIT_ASSERT_EQUAL( OUString("H1"), suggestions[1] );
+ CPPUNIT_ASSERT_EQUAL( u"H31l0"_ustr, suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"H1"_ustr, suggestions[1] );
suggestions.clear();
trie.findSuggestions( u"H3", suggestions);
CPPUNIT_ASSERT_EQUAL( size_t(1), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"H31l0"_ustr, suggestions[0] );
suggestions.clear();
trie.insert( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ) );
trie.findSuggestions( u"H", suggestions );
CPPUNIT_ASSERT_EQUAL( size_t(3), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
- CPPUNIT_ASSERT_EQUAL( OUString("H1"), suggestions[1] );
+ CPPUNIT_ASSERT_EQUAL( u"H31l0"_ustr, suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"H1"_ustr, suggestions[1] );
CPPUNIT_ASSERT_EQUAL( OStringToOUString( "H\xC3\xA4llo", RTL_TEXTENCODING_UTF8 ), suggestions[2] );
suggestions.clear();
trie.findSuggestions( u"H3", suggestions );
CPPUNIT_ASSERT_EQUAL( size_t(1), suggestions.size() );
- CPPUNIT_ASSERT_EQUAL( OUString("H31l0"), suggestions[0] );
+ CPPUNIT_ASSERT_EQUAL( u"H31l0"_ustr, suggestions[0] );
suggestions.clear();
trie.findSuggestions( OStringToOUString("H\xC3\xA4", RTL_TEXTENCODING_UTF8), suggestions );
diff --git a/editeng/qa/unit/core-test.cxx b/editeng/qa/unit/core-test.cxx
index 14ce66ef55a3..b69f58df9e8f 100644
--- a/editeng/qa/unit/core-test.cxx
+++ b/editeng/qa/unit/core-test.cxx
@@ -178,7 +178,7 @@ void Test::testLineSpacing()
CPPUNIT_ASSERT_EQUAL(OUString(), rDoc.GetParaAsString(sal_Int32(0)));
// Set initial text
- OUString aText = "This is multi-line paragraph";
+ OUString aText = u"This is multi-line paragraph"_ustr;
sal_Int32 aTextLen = aText.getLength();
aEditEngine.SetText(aText);
@@ -199,7 +199,7 @@ void Test::testLineSpacing()
// Set font
SvxFontItem aFont(EE_CHAR_FONTINFO);
- aFont.SetFamilyName("Liberation Sans");
+ aFont.SetFamilyName(u"Liberation Sans"_ustr);
pSet->Put(aFont);
SvxFontHeightItem aFontSize(240, 100, EE_CHAR_FONTHEIGHT);
pSet->Put(aFontSize);
@@ -243,7 +243,7 @@ void Test::testConstruction()
{
EditEngine aEngine(mpItemPool.get());
- aEngine.SetText("I am Edit Engine.");
+ aEngine.SetText(u"I am Edit Engine."_ustr);
}
bool includes(const uno::Sequence<OUString>& rSeq, std::u16string_view rVal)
@@ -460,65 +460,65 @@ void Test::testAutocorrect()
SvxAutoCorrect aAutoCorrect((OUString()), (OUString()));
{
- OUString sInput("TEst-TEst");
+ OUString sInput(u"TEst-TEst"_ustr);
sal_Unicode const cNextChar(' ');
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", OUString("Test-Test "), aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", u"Test-Test "_ustr, aFoo.getResult());
}
{
- OUString sInput("TEst/TEst");
+ OUString sInput(u"TEst/TEst"_ustr);
sal_Unicode const cNextChar(' ');
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", OUString("Test/Test "), aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", u"Test/Test "_ustr, aFoo.getResult());
}
{
// test auto-bolding with '*'
- OUString sInput("*foo");
+ OUString sInput(u"*foo"_ustr);
sal_Unicode const cNextChar('*');
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
- CPPUNIT_ASSERT_EQUAL(OUString("foo"), aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL(u"foo"_ustr, aFoo.getResult());
}
{
- OUString sInput("Test. test");
+ OUString sInput(u"Test. test"_ustr);
sal_Unicode const cNextChar(' ');
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", OUString("Test. Test "), aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", u"Test. Test "_ustr, aFoo.getResult());
}
// don't autocapitalize after a field mark
{
- OUString sInput("Test. \x01 test");
+ OUString sInput(u"Test. \x01 test"_ustr);
sal_Unicode const cNextChar(' ');
bool bNbspRunNext = false;
TestAutoCorrDoc aFoo(sInput, LANGUAGE_ENGLISH_US);
aAutoCorrect.DoAutoCorrect(aFoo, sInput, sInput.getLength(), cNextChar, true, bNbspRunNext);
- CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", OUString("Test. \x01 test "), aFoo.getResult());
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("autocorrect", u"Test. \x01 test "_ustr, aFoo.getResult());
}
// consider field contents as text for auto quotes
{
- OUString sInput("T\x01");
+ OUString sInput(u"T\x01"_ustr);
sal_Unicode const cNextChar('"');
static constexpr OUStringLiteral sExpected = u"T\x01\u201d";
bool bNbspRunNext = false;
@@ -585,18 +585,18 @@ void Test::testHyperlinkCopyPaste()
// Get corresponding Field Item for inserting URLs in text
// URL 1
- OUString aURL1 = "mailto:///user@example.com";
- OUString aRepres1 = "user@example.com";
+ OUString aURL1 = u"mailto:///user@example.com"_ustr;
+ OUString aRepres1 = u"user@example.com"_ustr;
SvxURLField aURLField1( aURL1, aRepres1, SvxURLFormat::Repr );
SvxFieldItem aField1( aURLField1, EE_FEATURE_FIELD );
// URL 2
- OUString aURL2 = "mailto:///example@domain.com";
- OUString aRepres2 = "example@domain.com";
+ OUString aURL2 = u"mailto:///example@domain.com"_ustr;
+ OUString aRepres2 = u"example@domain.com"_ustr;
SvxURLField aURLField2( aURL2, aRepres2, SvxURLFormat::Repr );
SvxFieldItem aField2( aURLField2, EE_FEATURE_FIELD );
// Insert initial text
- OUString aParaText = "sampletextfortestingfeaturefields";
+ OUString aParaText = u"sampletextfortestingfeaturefields"_ustr;
// Positions Ref .............*13....*20..........
sal_Int32 aTextLen = aParaText.getLength();
aEditEngine.SetText( aParaText );
@@ -623,7 +623,7 @@ void Test::testHyperlinkCopyPaste()
// Assert URL Fields and text before copy
// Check text
CPPUNIT_ASSERT_EQUAL( aTextLen + aRepres1.getLength() + aRepres2.getLength(), rDoc.GetTextLen() );
- CPPUNIT_ASSERT_EQUAL( OUString("sampletextforuser@example.comtestingexample@domain.comfeaturefields"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"sampletextforuser@example.comtestingexample@domain.comfeaturefields"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
// Check Field 1
EFieldInfo aURLFieldInfo1 = aEditEngine.GetFieldInfo( sal_Int32(0), sal_uInt16(0) );
@@ -658,7 +658,7 @@ void Test::testHyperlinkCopyPaste()
CPPUNIT_ASSERT_EQUAL( aTextLen + 10 + aRepres1.getLength()*2 + aRepres2.getLength(), rDoc.GetTextLen() );
// Check the updated text contents
- CPPUNIT_ASSERT_EQUAL( OUString("sampletextforuser@example.comtestingexample@domain.comfeaturefieldsforuser@example.comtesting"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"sampletextforuser@example.comtestingexample@domain.comfeaturefieldsforuser@example.comtesting"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
// Check the Fields and their values
@@ -703,7 +703,7 @@ void Test::testCopyPaste()
CPPUNIT_ASSERT_EQUAL( OUString(), rDoc.GetParaAsString(sal_Int32(0)) );
// Set initial text
- OUString aText = "This is custom initial text";
+ OUString aText = u"This is custom initial text"_ustr;
sal_Int32 aTextLen = aText.getLength();
aEditEngine.SetText( aText );
@@ -783,7 +783,7 @@ void Test::testHTMLPaste()
// - Expected: test
// - Actual :
// i.e. RTF and plain text paste worked, but not HTML.
- CPPUNIT_ASSERT_EQUAL(OUString("test"), rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
+ CPPUNIT_ASSERT_EQUAL(u"test"_ustr, rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
}
void Test::testHTMLFragmentPaste()
@@ -802,7 +802,7 @@ void Test::testHTMLFragmentPaste()
// - Expected: abc
// - Actual :
// i.e. a HTML fragment without a proper header was ignored on paste.
- CPPUNIT_ASSERT_EQUAL(OUString("abc"), rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
+ CPPUNIT_ASSERT_EQUAL(u"abc"_ustr, rDoc.GetParaAsString(static_cast<sal_Int32>(0)));
}
void Test::testMultiParaSelCopyPaste()
@@ -818,15 +818,15 @@ void Test::testMultiParaSelCopyPaste()
CPPUNIT_ASSERT_EQUAL( OUString(), rDoc.GetParaAsString(sal_Int32(0)) );
// Insert initial text
- OUString aFirstPara = "This is first paragraph";
+ OUString aFirstPara = u"This is first paragraph"_ustr;
// Selection Ref ........8..............
- OUString aSecondPara = "This is second paragraph";
+ OUString aSecondPara = u"This is second paragraph"_ustr;
// Selection Ref .............14.........
- OUString aThirdPara = "This is third paragraph";
+ OUString aThirdPara = u"This is third paragraph"_ustr;
OUString aText = aFirstPara + "\n" + aSecondPara + "\n" + aThirdPara;
sal_Int32 aTextLen = aFirstPara.getLength() + aSecondPara.getLength() + aThirdPara.getLength();
aEditEngine.SetText( aText );
- OUString aCopyText = "first paragraphThis is second";
+ OUString aCopyText = u"first paragraphThis is second"_ustr;
sal_Int32 aCopyTextLen = aCopyText.getLength();
// Assert changes
@@ -847,7 +847,7 @@ void Test::testMultiParaSelCopyPaste()
CPPUNIT_ASSERT_EQUAL( aFirstPara, rDoc.GetParaAsString(sal_Int32(0)) );
CPPUNIT_ASSERT_EQUAL( aSecondPara, rDoc.GetParaAsString(sal_Int32(1)) );
CPPUNIT_ASSERT_EQUAL( aThirdParaAfterCopyPaste, rDoc.GetParaAsString(sal_Int32(2)) );
- CPPUNIT_ASSERT_EQUAL( OUString("This is second"), rDoc.GetParaAsString(sal_Int32(3)) );
+ CPPUNIT_ASSERT_EQUAL( u"This is second"_ustr, rDoc.GetParaAsString(sal_Int32(3)) );
}
void Test::testTabsCopyPaste()
@@ -866,7 +866,7 @@ void Test::testTabsCopyPaste()
SfxVoidItem aTab( EE_FEATURE_TAB );
// Insert initial text
- OUString aParaText = "sampletextfortestingtab";
+ OUString aParaText = u"sampletextfortestingtab"_ustr;
// Positions Ref ......*6...............*23
sal_Int32 aTextLen = aParaText.getLength();
aEditEngine.SetText( aParaText );
@@ -882,7 +882,7 @@ void Test::testTabsCopyPaste()
// Assert changes
CPPUNIT_ASSERT_EQUAL( aTextLen + 1, rDoc.GetTextLen() );
- CPPUNIT_ASSERT_EQUAL( OUString("sample\ttextfortestingtab"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"sample\ttextfortestingtab"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
// Insert tab 2 at desired position
EditSelection aSel2( EditPaM(pNode, 23+1), EditPaM(pNode, 23+1) );
@@ -890,7 +890,7 @@ void Test::testTabsCopyPaste()
// Assert changes
CPPUNIT_ASSERT_EQUAL( aTextLen + 2, rDoc.GetTextLen() );
- CPPUNIT_ASSERT_EQUAL( OUString("sample\ttextfortestingtab\t"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"sample\ttextfortestingtab\t"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
// Copy text using legacy format
uno::Reference< datatransfer::XTransferable > xData = aEditEngine.CreateTransferable( ESelection(0,6,0,aTextLen+2) );
@@ -900,7 +900,7 @@ void Test::testTabsCopyPaste()
// Assert changes
CPPUNIT_ASSERT_EQUAL( aTextLen + aTextLen - 6 + 4, rDoc.GetTextLen() );
- CPPUNIT_ASSERT_EQUAL( OUString("sample\ttextfortestingtab\t\ttextfortestingtab\t"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"sample\ttextfortestingtab\t\ttextfortestingtab\t"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
}
class UrlEditEngine : public EditEngine
@@ -910,7 +910,7 @@ public:
virtual OUString CalcFieldValue( const SvxFieldItem&, sal_Int32, sal_Int32, std::optional<Color>&, std::optional<Color>&, std::optional<FontLineStyle>& ) override
{
- return "jim@bob.com"; // a sophisticated view of value:
+ return u"jim@bob.com"_ustr; // a sophisticated view of value:
}
};
@@ -921,21 +921,21 @@ void Test::testHyperlinkSearch()
UrlEditEngine aEngine(mpItemPool.get());
EditDoc &rDoc = aEngine.GetEditDoc();
- OUString aSampleText = "Please write email to . if you find a fish(not a dog).";
+ OUString aSampleText = u"Please write email to . if you find a fish(not a dog)."_ustr;
aEngine.SetText(aSampleText);
CPPUNIT_ASSERT_EQUAL_MESSAGE("set text", aSampleText, rDoc.GetParaAsString(sal_Int32(0)));
ContentNode *pNode = rDoc.GetObject(0);
EditSelection aSel(EditPaM(pNode, 22), EditPaM(pNode, 22));
- SvxURLField aURLField("mailto:///jim@bob.com", "jim@bob.com",
+ SvxURLField aURLField(u"mailto:///jim@bob.com"_ustr, u"jim@bob.com"_ustr,
SvxURLFormat::Repr);
SvxFieldItem aField(aURLField, EE_FEATURE_FIELD);
aEngine.InsertField(aSel, aField);
OUString aContent = pNode->GetExpandedText();
- CPPUNIT_ASSERT_EQUAL_MESSAGE("get text", OUString("Please write email to jim@bob.com. if you find a fish(not a dog)."),
+ CPPUNIT_ASSERT_EQUAL_MESSAGE("get text", u"Please write email to jim@bob.com. if you find a fish(not a dog)."_ustr,
aContent);
CPPUNIT_ASSERT_EQUAL_MESSAGE("wrong length", aContent.getLength(), rDoc.GetTextLen());
@@ -976,9 +976,9 @@ void Test::testHyperlinkSearch()
SvxSearchItem aItem(1); //SID_SEARCH_ITEM);
aItem.SetBackward(false);
aItem.SetSelection(false);
- aItem.SetSearchString("fish");
+ aItem.SetSearchString(u"fish"_ustr);
CPPUNIT_ASSERT_MESSAGE("no fish", aEngine.HasText(aItem));
- aItem.SetSearchString("dog");
+ aItem.SetSearchString(u"dog"_ustr);
CPPUNIT_ASSERT_MESSAGE("no dog", aEngine.HasText(aItem));
}
@@ -1018,7 +1018,7 @@ void Test::testBoldItalicCopyPaste()
SvxPostureItem aItalic( ITALIC_NORMAL, EE_CHAR_ITALIC );
// Insert initial text
- OUString aParaText = "boldeditengineitalic";
+ OUString aParaText = u"boldeditengineitalic"_ustr;
// Positions Ref ..*2....*8...*13.*17
// Bold Ref ..[ BOLD ]......
// Italic Ref ........[ ITALIC ]..
@@ -1198,7 +1198,7 @@ void Test::testUnderlineCopyPaste()
SvxUnderlineItem aULine( LINESTYLE_SINGLE, EE_CHAR_UNDERLINE );
// Insert initial text
- OUString aParaText = "sampletextforunderline";
+ OUString aParaText = u"sampletextforunderline"_ustr;
// Positions Ref ......*6.........*17..
// Underline Ref ......[UNDERLINE ]....
sal_Int32 aTextLen = aParaText.getLength();
@@ -1287,9 +1287,9 @@ void Test::testMultiParaCopyPaste()
CPPUNIT_ASSERT_EQUAL( OUString(), rDoc.GetParaAsString(sal_Int32(0)) );
// Insert initial text
- OUString aFirstPara = "This is first paragraph";
- OUString aSecondPara = "This is second paragraph";
- OUString aThirdPara = "This is third paragraph";
+ OUString aFirstPara = u"This is first paragraph"_ustr;
+ OUString aSecondPara = u"This is second paragraph"_ustr;
+ OUString aThirdPara = u"This is third paragraph"_ustr;
OUString aText = aFirstPara + "\n" + aSecondPara + "\n" + aThirdPara;
sal_Int32 aTextLen = aFirstPara.getLength() + aSecondPara.getLength() + aThirdPara.getLength();
aEditEngine.SetText( aText );
@@ -1334,21 +1334,21 @@ void Test::testParaBoldItalicCopyPaste()
SvxPostureItem aItalic( ITALIC_NORMAL, EE_CHAR_ITALIC );
// Insert initial text
- OUString aFirstPara = "This is first paragraph";
+ OUString aFirstPara = u"This is first paragraph"_ustr;
// Positions Ref .....*5.*8....*14*17...
// Bold Ref .....[ BOLD ].....
// Italic Ref ..............[ ITA
// Copy Ref ........[ Copy Sel
- OUString aSecondPara = "This is second paragraph";
+ OUString aSecondPara = u"This is second paragraph"_ustr;
// Positions Ref .....*5.*8...*13..*18...
// Bold Ref .....[ BOLD ].....
// Italic Ref LIC ]...............
// Copy Ref ection ]..........
- OUString aThirdPara = "This is third paragraph";
+ OUString aThirdPara = u"This is third paragraph"_ustr;
OUString aText = aFirstPara + "\n" + aSecondPara + "\n" + aThirdPara;
sal_Int32 aTextLen = aFirstPara.getLength() + aSecondPara.getLength() + aThirdPara.getLength();
aEditEngine.SetText( aText );
- OUString aCopyText = "first paragraphThis is second";
+ OUString aCopyText = u"first paragraphThis is second"_ustr;
sal_Int32 aCopyTextLen = aCopyText.getLength();
// Assert changes - text insertion
@@ -1485,7 +1485,7 @@ void Test::testParaBoldItalicCopyPaste()
CPPUNIT_ASSERT_EQUAL( aFirstPara, rDoc.GetParaAsString(sal_Int32(0)) );
CPPUNIT_ASSERT_EQUAL( aSecondPara, rDoc.GetParaAsString(sal_Int32(1)) );
CPPUNIT_ASSERT_EQUAL( aThirdParaAfterCopyPaste, rDoc.GetParaAsString(sal_Int32(2)) );
- CPPUNIT_ASSERT_EQUAL( OUString("This is second"), rDoc.GetParaAsString(sal_Int32(3)) );
+ CPPUNIT_ASSERT_EQUAL( u"This is second"_ustr, rDoc.GetParaAsString(sal_Int32(3)) );
// Check updated text for appropriate Bold/Italics
std::unique_ptr<EditTextObject> pEditText3( aEditEngine.CreateTextObject() );
@@ -1600,15 +1600,15 @@ void Test::testParaStartCopyPaste()
CPPUNIT_ASSERT_EQUAL( OUString(), rDoc.GetParaAsString(sal_Int32(0)) );
// Insert initial text
- OUString aFirstPara = "This is first paragraph";
+ OUString aFirstPara = u"This is first paragraph"_ustr;
// Selection Ref ........8..............
- OUString aSecondPara = "This is second paragraph";
+ OUString aSecondPara = u"This is second paragraph"_ustr;
// Selection Ref .............14.........
- OUString aThirdPara = "This is third paragraph";
+ OUString aThirdPara = u"This is third paragraph"_ustr;
OUString aText = aFirstPara + "\n" + aSecondPara + "\n" + aThirdPara;
sal_Int32 aTextLen = aFirstPara.getLength() + aSecondPara.getLength() + aThirdPara.getLength();
aEditEngine.SetText( aText );
- OUString aCopyText = "first paragraphThis is second";
+ OUString aCopyText = u"first paragraphThis is second"_ustr;
sal_Int32 aCopyTextLen = aCopyText.getLength();
// Assert changes
@@ -1626,7 +1626,7 @@ void Test::testParaStartCopyPaste()
// Assert changes
OUString aSecondParaAfterCopyPaste = "This is second" + aFirstPara;
CPPUNIT_ASSERT_EQUAL( aTextLen + aCopyTextLen, rDoc.GetTextLen() );
- CPPUNIT_ASSERT_EQUAL( OUString("first paragraph"), rDoc.GetParaAsString(sal_Int32(0)) );
+ CPPUNIT_ASSERT_EQUAL( u"first paragraph"_ustr, rDoc.GetParaAsString(sal_Int32(0)) );
CPPUNIT_ASSERT_EQUAL( aSecondParaAfterCopyPaste, rDoc.GetParaAsString(sal_Int32(1)) );
CPPUNIT_ASSERT_EQUAL( aSecondPara, rDoc.GetParaAsString(sal_Int32(2)) );
CPPUNIT_ASSERT_EQUAL( aThirdPara, rDoc.GetParaAsString(sal_Int32(3)) );
@@ -1641,7 +1641,7 @@ void Test::testSectionAttributes()
SvxPostureItem aItalic(ITALIC_NORMAL, EE_CHAR_ITALIC);
{
- aEngine.SetText("aaabbbccc");
+ aEngine.SetText(u"aaabbbccc"_ustr);
pSet->Put(aBold);
CPPUNIT_ASSERT_EQUAL_MESSAGE("There should be exactly one item.", static_cast<sal_uInt16>(1), pSet->Count());
aEngine.QuickSetAttribs(*pSet, ESelection(0,0,0,6)); // 'aaabbb' - end point is not inclusive.
@@ -1685,7 +1685,7 @@ void Test::testSectionAttributes()
// Set text consisting of 5 paragraphs with the 2nd and 4th paragraphs
// being empty.
aEngine.Clear();
- aEngine.SetText("one\n\ntwo\n\nthree");
+ aEngine.SetText(u"one\n\ntwo\n\nthree"_ustr);
sal_Int32 nParaCount = aEngine.GetParagraphCount();
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), nParaCount);
@@ -1737,7 +1737,7 @@ void Test::testSectionAttributes()
{
aEngine.Clear();
- aEngine.SetText("one\ntwo");
+ aEngine.SetText(u"one\ntwo"_ustr);
CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(2), aEngine.GetParagraphCount());
// embolden 2nd paragraph
@@ -1786,18 +1786,18 @@ void Test::testLargeParaCopyPaste()
CPPUNIT_ASSERT_EQUAL( OUString(), rDoc.GetParaAsString(sal_Int32(0)) );
// Insert initial text
- OUString aFirstPara = "This is first paragraph";
- OUString aSecondPara = "This is second paragraph";
- OUString aThirdPara = "This is third paragraph";
- OUString aFourthPara = "This is fourth paragraph";
- OUString aFifthPara = "This is fifth paragraph";
- OUString aSixthPara = "This is sixth paragraph";
+ OUString aFirstPara = u"This is first paragraph"_ustr;
+ OUString aSecondPara = u"This is second paragraph"_ustr;
+ OUString aThirdPara = u"This is third paragraph"_ustr;
+ OUString aFourthPara = u"This is fourth paragraph"_ustr;
+ OUString aFifthPara = u"This is fifth paragraph"_ustr;
+ OUString aSixthPara = u"This is sixth paragraph"_ustr;
//Positions Ref: ........*8.............
- OUString aSeventhPara = "This is seventh paragraph";
- OUString aEighthPara = "This is eighth paragraph";
+ OUString aSeventhPara = u"This is seventh paragraph"_ustr;
+ OUString aEighthPara = u"This is eighth paragraph"_ustr;
//Positions Ref: .............*13
- OUString aNinthPara = "This is ninth paragraph";
- OUString aTenthPara = "This is tenth paragraph";
+ OUString aNinthPara = u"This is ninth paragraph"_ustr;
+ OUString aTenthPara = u"This is tenth paragraph"_ustr;
OUString aText = aFirstPara + "\n" + aSecondPara + "\n" + aThirdPara + "\n" +
aFourthPara + "\n" + aFifthPara + "\n" + aSixthPara + "\n" + aSeventhPara + "\n" +
aEighthPara + "\n" + aNinthPara + "\n" + aTenthPara;
@@ -1805,7 +1805,7 @@ void Test::testLargeParaCopyPaste()
aFourthPara.getLength() + aFifthPara.getLength() + aSixthPara.getLength() +
aSeventhPara.getLength() + aEighthPara.getLength() + aNinthPara.getLength() + aTenthPara.getLength();
aEditEngine.SetText( aText );
- OUString aCopyText = "sixth paragraphThis is seventh paragraphThis is eighth";
+ OUString aCopyText = u"sixth paragraphThis is seventh paragraphThis is eighth"_ustr;
sal_Int32 aCopyTextLen = aCopyText.getLength();
// Assert changes
@@ -1836,7 +1836,7 @@ void Test::testLargeParaCopyPaste()
CPPUNIT_ASSERT_EQUAL( aThirdPara, rDoc.GetParaAsString(sal_Int32(2)) );
CPPUNIT_ASSERT_EQUAL( aFourthParaAfterCopyPaste, rDoc.GetParaAsString(sal_Int32(3)) );
CPPUNIT_ASSERT_EQUAL( aSeventhPara, rDoc.GetParaAsString(sal_Int32(4)) );
- CPPUNIT_ASSERT_EQUAL( OUString("This is eighth"), rDoc.GetParaAsString(sal_Int32(5)) );
+ CPPUNIT_ASSERT_EQUAL( u"This is eighth"_ustr, rDoc.GetParaAsString(sal_Int32(5)) );
CPPUNIT_ASSERT_EQUAL( aFifthPara, rDoc.GetParaAsString(sal_Int32(6)) );
CPPUNIT_ASSERT_EQUAL( aSixthPara, rDoc.GetParaAsString(sal_Int32(7)) );
CPPUNIT_ASSERT_EQUAL( aSeventhPara, rDoc.GetParaAsString(sal_Int32(8)) );
@@ -1858,10 +1858,10 @@ void Test::testTransliterate()
// Create EditEngine's instance
EditEngine editEng( mpItemPool.get() );
- OUString sText("one (two) three");
+ OUString sText(u"one (two) three"_ustr);
editEng.SetText(sText);
editEng.TransliterateText(ESelection(0, 0, 0, sText.getLength()), TransliterationFlags::TITLE_CASE);
- CPPUNIT_ASSERT_EQUAL(OUString("One (Two) Three"), editEng.GetText());
+ CPPUNIT_ASSERT_EQUAL(u"One (Two) Three"_ustr, editEng.GetText());
using TF = TransliterationFlags;
constexpr OUString sText2 = u"Mary Jones met joe Smith. Time Passed."_ustr;
@@ -1875,88 +1875,88 @@ void Test::testTransliterate()
* cursor is on a word boundary. */
/* No selection tests. Cursor between the ' ' and 'm' before 'met' - except in SENTENCE_CASE where the complete sentence is selected.*/
- CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary jones met joe smith. Time Passed."), lcl_translitTest(editEng, sText2, eSentenSel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary jones met joe smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, eSentenSel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones Met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones MET joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* No selection tests. Cursor between the 't' and the ' ' after 'met'. */
selStart = 14;
selEnd = 14;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones Met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones MET joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* No selection tests. Cursor between the 'h' and the '.' after 'Smith'. */
selStart = 24;
selEnd = 24;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* No selection tests. Cursor between the 'm' and 'e' in 'met'. */
selStart = 12;
selEnd = 12;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString(""), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u""_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones Met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones MET joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when there is a selection that does not cross a word boundary: "met" */
selStart = 11;
selEnd = 14;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString("met"), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MET joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"met"_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones Met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones MET joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when there is a selection that does not begin at a word boundary: "et" */
selStart = 12;
selEnd = 14;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString("et"), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mEt joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones mET joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"et"_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones mEt joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones mET joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when there is a selection that ends in the middle of a word */
selStart = 11;
selEnd = 13;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString("me"), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones Met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones MEt joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"me"_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones Met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones MEt joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when there is a selection that crosses a word boundary: "nes met joe Sm" */
selStart = 7;
selEnd = 21;
esel = ESelection(0, selStart, 0, selEnd);
- CPPUNIT_ASSERT_EQUAL(OUString("nes met joe Sm"), editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes met joe smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNes Met Joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary JoNES MET JOE SMith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"nes met joe Sm"_ustr, editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"Mary JoNes met joe smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary JoNes Met Joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary JoNES MET JOE SMith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when there is a selection that crosses a sentence boundary: "joe Smith. Time Passed." */
selStart = 15;
selEnd = 38;
esel = ESelection(0, selStart, 0, selEnd);
editEng.SetText(sText2);
- CPPUNIT_ASSERT_EQUAL(OUString("joe Smith. Time Passed."), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"joe Smith. Time Passed."_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met Joe smith. Time passed."), lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met Joe Smith. Time Passed."), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met JOE SMITH. TIME PASSED."), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Mary Jones met joe smith. time passed."), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met Joe smith. Time passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met Joe Smith. Time Passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met JOE SMITH. TIME PASSED."_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Mary Jones met joe smith. time passed."_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test behavior when sentence ends with a capital that is not selected: "CURRENT IS EQUAL TO 10 A" */
selStart = 0;
@@ -1964,21 +1964,21 @@ void Test::testTransliterate()
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText3(u"CURRENT IS EQUAL TO 10 A"_ustr);
editEng.SetText(sText3);
- CPPUNIT_ASSERT_EQUAL(OUString("CURRENT IS EQUAL TO"), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"CURRENT IS EQUAL TO"_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("Current is equal to 10 A"), lcl_translitTest(editEng, sText3, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("Current Is Equal To 10 A"), lcl_translitTest(editEng, sText3, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("CURRENT IS EQUAL TO 10 A"), lcl_translitTest(editEng, sText3, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("current is equal to 10 A"), lcl_translitTest(editEng, sText3, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"Current is equal to 10 A"_ustr, lcl_translitTest(editEng, sText3, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"Current Is Equal To 10 A"_ustr, lcl_translitTest(editEng, sText3, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"CURRENT IS EQUAL TO 10 A"_ustr, lcl_translitTest(editEng, sText3, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"current is equal to 10 A"_ustr, lcl_translitTest(editEng, sText3, esel, TF::UPPERCASE_LOWERCASE));
}
void Test::testTdf147196()
{
EditEngine editEng( mpItemPool.get() );
- editEng.SetText("2.2 Publication of information - CAA\nSection 4.2 of a CA\'s Certificate Policy and/or Certification Practice Statement SHALL state the CA\'s policy or practice on processing CAA Records for Fully Qualified Domain Names; that policy shall be consistent with these Requirements. \n\nIt shall clearly specify the set of Issuer Domain Names that the CA recognises in CAA \"issue\" or \"issuewild\" records as permitting it to issue. The CA SHALL log all actions taken, if any, consistent with its processing practice.");
+ editEng.SetText(u"2.2 Publication of information - CAA\nSection 4.2 of a CA\'s Certificate Policy and/or Certification Practice Statement SHALL state the CA\'s policy or practice on processing CAA Records for Fully Qualified Domain Names; that policy shall be consistent with these Requirements. \n\nIt shall clearly specify the set of Issuer Domain Names that the CA recognises in CAA \"issue\" or \"issuewild\" records as permitting it to issue. The CA SHALL log all actions taken, if any, consistent with its processing practice."_ustr);
editEng.TransliterateText(ESelection(0, 0, 3, 232), TransliterationFlags::TITLE_CASE);
- CPPUNIT_ASSERT_EQUAL(OUString("2.2 Publication Of Information - Caa\nSection 4.2 Of A Ca\'s Certificate Policy And/Or Certification Practice Statement Shall State The Ca\'s Policy Or Practice On Processing Caa Records For Fully Qualified Domain Names; That Policy Shall Be Consistent With These Requirements. \n\nIt Shall Clearly Specify The Set Of Issuer Domain Names That The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" Records As Permitting It To Issue. The Ca Shall Log All Actions Taken, If Any, Consistent With Its Processing Practice."), editEng.GetText());
+ CPPUNIT_ASSERT_EQUAL(u"2.2 Publication Of Information - Caa\nSection 4.2 Of A Ca\'s Certificate Policy And/Or Certification Practice Statement Shall State The Ca\'s Policy Or Practice On Processing Caa Records For Fully Qualified Domain Names; That Policy Shall Be Consistent With These Requirements. \n\nIt Shall Clearly Specify The Set Of Issuer Domain Names That The Ca Recognises In Caa \"Issue\" Or \"Issuewild\" Records As Permitting It To Issue. The Ca Shall Log All Actions Taken, If Any, Consistent With Its Processing Practice."_ustr, editEng.GetText());
}
void Test::testTdf148148()
@@ -1992,24 +1992,24 @@ void Test::testTdf148148()
ESelection esel(0, selStart, 0, selEnd);
constexpr OUString sText1(u" text"_ustr);
editEng.SetText(sText1);
- CPPUNIT_ASSERT_EQUAL(OUString(" "), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(editEng, sText1, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(editEng, sText1, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(editEng, sText1, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" text"), lcl_translitTest(editEng, sText1, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" text"_ustr, lcl_translitTest(editEng, sText1, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" text"_ustr, lcl_translitTest(editEng, sText1, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" text"_ustr, lcl_translitTest(editEng, sText1, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" text"_ustr, lcl_translitTest(editEng, sText1, esel, TF::UPPERCASE_LOWERCASE));
selStart = 4;
selEnd = 8;
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText2(u"text "_ustr);
editEng.SetText(sText2);
- CPPUNIT_ASSERT_EQUAL(OUString(" "), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("text "), lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"text "_ustr, lcl_translitTest(editEng, sText2, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"text "_ustr, lcl_translitTest(editEng, sText2, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"text "_ustr, lcl_translitTest(editEng, sText2, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"text "_ustr, lcl_translitTest(editEng, sText2, esel, TF::UPPERCASE_LOWERCASE));
/* Test what happens when node contains only non-word text but selection does not contain any text */
selStart = 0;
@@ -2017,24 +2017,24 @@ void Test::testTdf148148()
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText3(u" -1"_ustr);
editEng.SetText(sText3);
- CPPUNIT_ASSERT_EQUAL(OUString(" "), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText3, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText3, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText3, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText3, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText3, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText3, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText3, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText3, esel, TF::UPPERCASE_LOWERCASE));
selStart = 2;
selEnd = 6;
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText4(u"-1 "_ustr);
editEng.SetText(sText4);
- CPPUNIT_ASSERT_EQUAL(OUString(" "), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u" "_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText4, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText4, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText4, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText4, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText4, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText4, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText4, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText4, esel, TF::UPPERCASE_LOWERCASE));
/* Test what happens when node and selection contains only non-word text */
selStart = 0;
@@ -2042,24 +2042,24 @@ void Test::testTdf148148()
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText5(u" -1"_ustr);
editEng.SetText(sText3);
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText5, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText5, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText5, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString(" -1"), lcl_translitTest(editEng, sText5, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText5, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText5, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText5, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u" -1"_ustr, lcl_translitTest(editEng, sText5, esel, TF::UPPERCASE_LOWERCASE));
selStart = 0;
selEnd = 5;
esel = ESelection(0, selStart, 0, selEnd);
constexpr OUString sText6(u"-1 "_ustr);
editEng.SetText(sText4);
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), editEng.GetText(esel));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, editEng.GetText(esel));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText6, esel, TF::SENTENCE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText6, esel, TF::TITLE_CASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText6, esel, TF::LOWERCASE_UPPERCASE));
- CPPUNIT_ASSERT_EQUAL(OUString("-1 "), lcl_translitTest(editEng, sText6, esel, TF::UPPERCASE_LOWERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText6, esel, TF::SENTENCE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText6, esel, TF::TITLE_CASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText6, esel, TF::LOWERCASE_UPPERCASE));
+ CPPUNIT_ASSERT_EQUAL(u"-1 "_ustr, lcl_translitTest(editEng, sText6, esel, TF::UPPERCASE_LOWERCASE));
}
@@ -2069,7 +2069,7 @@ void Test::testSingleLine()
EditEngine aEditEngine( mpItemPool.get() );
aEditEngine.SetSingleLine(true);
- aEditEngine.SetText("Bolivian\nSanta Cruz de la Sierra");
+ aEditEngine.SetText(u"Bolivian\nSanta Cruz de la Sierra"_ustr);
aEditEngine.QuickFormatDoc(true);
CPPUNIT_ASSERT_EQUAL(true, aEditEngine.IsFormatted());
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aEditEngine.GetParagraphCount());
@@ -2080,88 +2080,88 @@ void Test::testMoveParagraph()
{
EditEngine aEditEngine(mpItemPool.get());
aEditEngine.SetPaperSize(Size(5000, 5000));
- aEditEngine.SetText("Paragraph 1\nParagraph 2\nParagraph 3\nParagraph 4\nParagraph 5");
+ aEditEngine.SetText(u"Paragraph 1\nParagraph 2\nParagraph 3\nParagraph 4\nParagraph 5"_ustr);
CPPUNIT_ASSERT_EQUAL(true, aEditEngine.IsFormatted());
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(1, 1), 4); // Move paragraph 2 (index 1) -> to before index 4
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(3, 3), 1); // Move paragraph 2 (index 3) -> to before index 1
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(1, 2), 4); // Move paragraph 2, 3 -> to before index 4
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(2, 3), 1); // Move paragraph 2, 3 -> to before index 2
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(2, 4), 0); // Move paragraph 3, 4, 5 -> to before index 0
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(0, 2), 5); // Move paragraph 3, 4, 5 -> to before index 0
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(0, 0), 8); // Move paragraph 1 -> to before index 8 but 8 is out of bounds
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(4));
aEditEngine.MoveParagraphs(Range(4, 4), 0); // Move paragraph 1 -> to before index 0
CPPUNIT_ASSERT_EQUAL(sal_Int32(5), aEditEngine.GetParagraphCount());
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 1"), aEditEngine.GetText(0));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 2"), aEditEngine.GetText(1));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 3"), aEditEngine.GetText(2));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 4"), aEditEngine.GetText(3));
- CPPUNIT_ASSERT_EQUAL(OUString("Paragraph 5"), aEditEngine.GetText(4));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 1"_ustr, aEditEngine.GetText(0));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 2"_ustr, aEditEngine.GetText(1));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 3"_ustr, aEditEngine.GetText(2));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 4"_ustr, aEditEngine.GetText(3));
+ CPPUNIT_ASSERT_EQUAL(u"Paragraph 5"_ustr, aEditEngine.GetText(4));
}
void Test::testCreateLines()
@@ -2171,7 +2171,7 @@ void Test::testCreateLines()
EditEngine aEditEngine(mpItemPool.get());
aEditEngine.SetRefDevice(pVirtualDevice.get());
aEditEngine.SetPaperSize(Size(500, 500));
- aEditEngine.SetText("ABC\nABC DEF ABC DEFGH");
+ aEditEngine.SetText(u"ABC\nABC DEF ABC DEFGH"_ustr);
CPPUNIT_ASSERT_EQUAL(true, aEditEngine.IsFormatted());
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), aEditEngine.GetParagraphCount());
@@ -2246,12 +2246,12 @@ void Test::testTdf154248MultilineFieldWrapping()
// Create EditEngine's instance
EditEngine& aEditEngine = const_cast<EditEngine&>(aOutliner.GetEditEngine());
aEditEngine.SetPaperSize(Size(2000, 2000));
- aEditEngine.SetText("ABC DEF ABC DEFGH");
+ aEditEngine.SetText(u"ABC DEF ABC DEFGH"_ustr);
// Positions Ref ....*4............
// Get Field Item for inserting URLs in text
- SvxURLField aURLField("http://not.a.real.link",
- "Really long hyperlink text that won't fit in 1 line, no matter what.",
+ SvxURLField aURLField(u"http://not.a.real.link"_ustr,
+ u"Really long hyperlink text that won't fit in 1 line, no matter what."_ustr,
SvxURLFormat::Repr);
SvxFieldItem aField(aURLField, EE_FEATURE_FIELD);
diff --git a/editeng/source/accessibility/AccessibleContextBase.cxx b/editeng/source/accessibility/AccessibleContextBase.cxx
index df52b70e78a4..be0010d01ecb 100644
--- a/editeng/source/accessibility/AccessibleContextBase.cxx
+++ b/editeng/source/accessibility/AccessibleContextBase.cxx
@@ -362,7 +362,7 @@ void SAL_CALL AccessibleContextBase::removeAccessibleEventListener (
// XServiceInfo
OUString SAL_CALL AccessibleContextBase::getImplementationName()
{
- return "AccessibleContextBase";
+ return u"AccessibleContextBase"_ustr;
}
sal_Bool SAL_CALL AccessibleContextBase::supportsService (const OUString& sServiceName)
@@ -374,8 +374,8 @@ uno::Sequence< OUString > SAL_CALL
AccessibleContextBase::getSupportedServiceNames()
{
return {
- "com.sun.star.accessibility.Accessible",
- "com.sun.star.accessibility.AccessibleContext"};
+ u"com.sun.star.accessibility.Accessible"_ustr,
+ u"com.sun.star.accessibility.AccessibleContext"_ustr};
}
@@ -452,7 +452,7 @@ void AccessibleContextBase::SetAccessibleName (
OUString AccessibleContextBase::CreateAccessibleName()
{
- return "Empty Name";
+ return u"Empty Name"_ustr;
}
@@ -490,7 +490,7 @@ void AccessibleContextBase::ThrowIfDisposed()
{
if (rBHelper.bDisposed || rBHelper.bInDispose)
{
- throw lang::DisposedException ("object has been already disposed",
+ throw lang::DisposedException (u"object has been already disposed"_ustr,
getXWeak());
}
}
diff --git a/editeng/source/accessibility/AccessibleEditableTextPara.cxx b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
index 2f727cb7669d..1ab756832ad7 100644
--- a/editeng/source/accessibility/AccessibleEditableTextPara.cxx
+++ b/editeng/source/accessibility/AccessibleEditableTextPara.cxx
@@ -350,14 +350,14 @@ namespace accessibility
void AccessibleEditableTextPara::CheckIndex( sal_Int32 nIndex )
{
if( nIndex < 0 || nIndex >= getCharacterCount() )
- throw lang::IndexOutOfBoundsException("AccessibleEditableTextPara: character index out of bounds",
+ throw lang::IndexOutOfBoundsException(u"AccessibleEditableTextPara: character index out of bounds"_ustr,
getXWeak() );
}
void AccessibleEditableTextPara::CheckPosition( sal_Int32 nIndex )
{
if( nIndex < 0 || nIndex > getCharacterCount() )
- throw lang::IndexOutOfBoundsException("AccessibleEditableTextPara: character position out of bounds",
+ throw lang::IndexOutOfBoundsException(u"AccessibleEditableTextPara: character position out of bounds"_ustr,
getXWeak() );
}
@@ -423,7 +423,7 @@ namespace accessibility
SvxEditSourceAdapter& AccessibleEditableTextPara::GetEditSource() const
{
if( !mpEditSource )
- throw uno::RuntimeException("No edit source, object is defunct",
+ throw uno::RuntimeException(u"No edit source, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
return *mpEditSource;
}
@@ -434,11 +434,11 @@ namespace accessibility
SvxAccessibleTextAdapter* pTextForwarder = rEditSource.GetTextForwarderAdapter();
if( !pTextForwarder )
- throw uno::RuntimeException("Unable to fetch text forwarder, object is defunct",
+ throw uno::RuntimeException(u"Unable to fetch text forwarder, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
if( !pTextForwarder->IsValid() )
- throw uno::RuntimeException("Text forwarder is invalid, object is defunct",
+ throw uno::RuntimeException(u"Text forwarder is invalid, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
return *pTextForwarder;
}
@@ -450,12 +450,12 @@ namespace accessibility
if( !pViewForwarder )
{
- throw uno::RuntimeException("Unable to fetch view forwarder, object is defunct",
+ throw uno::RuntimeException(u"Unable to fetch view forwarder, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
}
if( !pViewForwarder->IsValid() )
- throw uno::RuntimeException("View forwarder is invalid, object is defunct",
+ throw uno::RuntimeException(u"View forwarder is invalid, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
return *pViewForwarder;
}
@@ -468,10 +468,10 @@ namespace accessibility
if( !pTextEditViewForwarder )
{
if( bCreate )
- throw uno::RuntimeException("Unable to fetch view forwarder, object is defunct",
+ throw uno::RuntimeException(u"Unable to fetch view forwarder, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
else
- throw uno::RuntimeException("No view forwarder, object not in edit mode",
+ throw uno::RuntimeException(u"No view forwarder, object not in edit mode"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
}
@@ -480,10 +480,10 @@ namespace accessibility
else
{
if( bCreate )
- throw uno::RuntimeException("View forwarder is invalid, object is defunct",
+ throw uno::RuntimeException(u"View forwarder is invalid, object is defunct"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
else
- throw uno::RuntimeException("View forwarder is invalid, object not in edit mode",
+ throw uno::RuntimeException(u"View forwarder is invalid, object not in edit mode"_ustr,
const_cast< AccessibleEditableTextPara* > (this)->getXWeak() );
}
}
@@ -632,11 +632,11 @@ namespace accessibility
SolarMutexGuard aGuard;
if( !HaveChildren() )
- throw lang::IndexOutOfBoundsException("No children available",
+ throw lang::IndexOutOfBoundsException(u"No children available"_ustr,
getXWeak() );
if( i != 0 )
- throw lang::IndexOutOfBoundsException("Invalid child index",
+ throw lang::IndexOutOfBoundsException(u"Invalid child index"_ustr,
getXWeak() );
auto aChild( maImageBullet.get() );
@@ -766,28 +766,28 @@ namespace accessibility
static uno::Sequence< OUString > const & getAttributeNames()
{
static const uno::Sequence<OUString> aNames{
- "CharColor",
- "CharContoured",
- "CharEmphasis",
- "CharEscapement",
- "CharFontName",
- "CharHeight",
- "CharPosture",
- "CharShadowed",
- "CharStrikeout",
- "CharCaseMap",
- "CharUnderline",
- "CharUnderlineColor",
- "CharWeight",
- "NumberingLevel",
- "NumberingRules",
- "ParaAdjust",
- "ParaBottomMargin",
- "ParaFirstLineIndent",
- "ParaLeftMargin",
- "ParaLineSpacing",
- "ParaRightMargin",
- "ParaTabStops"};
+ u"CharColor"_ustr,
+ u"CharContoured"_ustr,
+ u"CharEmphasis"_ustr,
+ u"CharEscapement"_ustr,
+ u"CharFontName"_ustr,
+ u"CharHeight"_ustr,
+ u"CharPosture"_ustr,
+ u"CharShadowed"_ustr,
+ u"CharStrikeout"_ustr,
+ u"CharCaseMap"_ustr,
+ u"CharUnderline"_ustr,
+ u"CharUnderlineColor"_ustr,
+ u"CharWeight"_ustr,
+ u"NumberingLevel"_ustr,
+ u"NumberingRules"_ustr,
+ u"ParaAdjust"_ustr,
+ u"ParaBottomMargin"_ustr,
+ u"ParaFirstLineIndent"_ustr,
+ u"ParaLeftMargin"_ustr,
+ u"ParaLineSpacing"_ustr,
+ u"ParaRightMargin"_ustr,
+ u"ParaTabStops"_ustr};
return aNames;
}
@@ -1068,7 +1068,7 @@ namespace accessibility
}
}
- throw uno::RuntimeException("Cannot access parent",
+ throw uno::RuntimeException(u"Cannot access parent"_ustr,
uno::Reference< uno::XInterface >
( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
}
@@ -2351,7 +2351,7 @@ namespace accessibility
xPropSet->SetSelection( MakeSelection( 0, GetTextLen() ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
if (!xPropSetInfo.is())
- throw uno::RuntimeException("Cannot query XPropertySetInfo",
+ throw uno::RuntimeException(u"Cannot query XPropertySetInfo"_ustr,
uno::Reference< uno::XInterface >
( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
@@ -2437,7 +2437,7 @@ namespace accessibility
xPropSet->SetSelection( MakeSelection( nIndex ) );
uno::Reference< beans::XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
if (!xPropSetInfo.is())
- throw uno::RuntimeException("Cannot query XPropertySetInfo",
+ throw uno::RuntimeException(u"Cannot query XPropertySetInfo"_ustr,
uno::Reference< uno::XInterface >
( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
@@ -2654,7 +2654,7 @@ namespace accessibility
OUString SAL_CALL AccessibleEditableTextPara::getImplementationName()
{
- return "AccessibleEditableTextPara";
+ return u"AccessibleEditableTextPara"_ustr;
}
sal_Bool SAL_CALL AccessibleEditableTextPara::supportsService (const OUString& sServiceName)
@@ -2666,7 +2666,7 @@ namespace accessibility
uno::Sequence< OUString> SAL_CALL AccessibleEditableTextPara::getSupportedServiceNames()
{
// #105185# Using correct service now
- return { OUString("com.sun.star.text.AccessibleParagraphView") };
+ return { u"com.sun.star.text.AccessibleParagraphView"_ustr };
}
} // end of namespace accessibility
diff --git a/editeng/source/accessibility/AccessibleImageBullet.cxx b/editeng/source/accessibility/AccessibleImageBullet.cxx
index c3a051cf01fd..5d07e71be0f9 100644
--- a/editeng/source/accessibility/AccessibleImageBullet.cxx
+++ b/editeng/source/accessibility/AccessibleImageBullet.cxx
@@ -105,7 +105,7 @@ namespace accessibility
uno::Reference< XAccessible > SAL_CALL AccessibleImageBullet::getAccessibleChild( sal_Int64 )
{
- throw lang::IndexOutOfBoundsException("No children available",
+ throw lang::IndexOutOfBoundsException(u"No children available"_ustr,
getXWeak() );
}
@@ -288,7 +288,7 @@ namespace accessibility
}
}
- throw uno::RuntimeException("Cannot access parent",
+ throw uno::RuntimeException(u"Cannot access parent"_ustr,
uno::Reference< uno::XInterface >
( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
}
@@ -306,7 +306,7 @@ namespace accessibility
void SAL_CALL AccessibleImageBullet::grabFocus( )
{
- throw uno::RuntimeException("Not focusable",
+ throw uno::RuntimeException(u"Not focusable"_ustr,
uno::Reference< uno::XInterface >
( static_cast< XAccessible* > (this) ) ); // disambiguate hierarchy
}
@@ -335,7 +335,7 @@ namespace accessibility
OUString SAL_CALL AccessibleImageBullet::getImplementationName()
{
- return "AccessibleImageBullet";
+ return u"AccessibleImageBullet"_ustr;
}
sal_Bool SAL_CALL AccessibleImageBullet::supportsService (const OUString& sServiceName)
@@ -346,7 +346,7 @@ namespace accessibility
uno::Sequence< OUString > SAL_CALL AccessibleImageBullet::getSupportedServiceNames()
{
- return { "com.sun.star.accessibility.AccessibleContext" };
+ return { u"com.sun.star.accessibility.AccessibleContext"_ustr };
}
void AccessibleImageBullet::SetIndexInParent( sal_Int32 nIndex )
@@ -467,7 +467,7 @@ namespace accessibility
{
if( !mpEditSource )
- throw uno::RuntimeException("No edit source, object is defunct",
+ throw uno::RuntimeException(u"No edit source, object is defunct"_ustr,
cppu::getXWeak
( const_cast< AccessibleImageBullet* > (this) ) ); // disambiguate hierarchy
return *mpEditSource;
@@ -480,12 +480,12 @@ namespace accessibility
SvxTextForwarder* pTextForwarder = rEditSource.GetTextForwarder();
if( !pTextForwarder )
- throw uno::RuntimeException("Unable to fetch text forwarder, object is defunct",
+ throw uno::RuntimeException(u"Unable to fetch text forwarder, object is defunct"_ustr,
cppu::getXWeak
( const_cast< AccessibleImageBullet* > (this) ) ); // disambiguate hierarchy
if( !pTextForwarder->IsValid() )
- throw uno::RuntimeException("Text forwarder is invalid, object is defunct",
+ throw uno::RuntimeException(u"Text forwarder is invalid, object is defunct"_ustr,
cppu::getXWeak
( const_cast< AccessibleImageBullet* > (this) ) ); // disambiguate hierarchy
return *pTextForwarder;
@@ -499,13 +499,13 @@ namespace accessibility
if( !pViewForwarder )
{
- throw uno::RuntimeException("Unable to fetch view forwarder, object is defunct",
+ throw uno::RuntimeException(u"Unable to fetch view forwarder, object is defunct"_ustr,
cppu::getXWeak
( const_cast< AccessibleImageBullet* > (this) ) ); // disambiguate hierarchy
}
if( !pViewForwarder->IsValid() )
- throw uno::RuntimeException("View forwarder is invalid, object is defunct",
+ throw uno::RuntimeException(u"View forwarder is invalid, object is defunct"_ustr,
cppu::getXWeak
( const_cast< AccessibleImageBullet* > (this) ) ); // disambiguate hierarchy
return *pViewForwarder;
diff --git a/editeng/source/accessibility/AccessibleStaticTextBase.cxx b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
index f7fd934dfc90..262c52781e0d 100644
--- a/editeng/source/accessibility/AccessibleStaticTextBase.cxx
+++ b/editeng/source/accessibility/AccessibleStaticTextBase.cxx
@@ -215,7 +215,7 @@ namespace accessibility
{
if( !mxTextParagraph.is() )
- throw lang::DisposedException ("object has been already disposed", mpThis );
+ throw lang::DisposedException (u"object has been already disposed"_ustr, mpThis );
// TODO: Have a different method on AccessibleEditableTextPara
// that does not care about state changes
@@ -272,7 +272,7 @@ namespace accessibility
{
if( nFlatIndex < 0 )
- throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds",
+ throw lang::IndexOutOfBoundsException(u"AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds"_ustr,
mpThis);
// gratuitously accepting larger indices here, AccessibleEditableTextPara will throw eventually
@@ -304,7 +304,7 @@ namespace accessibility
}
// not found? Out of bounds
- throw lang::IndexOutOfBoundsException("AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds",
+ throw lang::IndexOutOfBoundsException(u"AccessibleStaticTextBase_Impl::Index2Internal: character index out of bounds"_ustr,
mpThis);
}
diff --git a/editeng/source/editeng/editdbg.cxx b/editeng/source/editeng/editdbg.cxx
index e9d74e779212..c49b988b2b6a 100644
--- a/editeng/source/editeng/editdbg.cxx
+++ b/editeng/source/editeng/editdbg.cxx
@@ -496,7 +496,7 @@ void EditEngine::DumpData(const EditEngine* pEE, bool bInfoBox)
{
std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr,
VclMessageType::Info, VclButtonsType::Ok,
- "Dumped editenginedump.log!" ));
+ u"Dumped editenginedump.log!"_ustr ));
xInfoBox->run();
}
}
diff --git a/editeng/source/editeng/editdoc.cxx b/editeng/source/editeng/editdoc.cxx
index e482eea38652..2a69d5d712b5 100644
--- a/editeng/source/editeng/editdoc.cxx
+++ b/editeng/source/editeng/editdoc.cxx
@@ -891,10 +891,10 @@ sal_Int32 EditDoc::Count() const
OUString EditDoc::GetSepStr( LineEnd eEnd )
{
if ( eEnd == LINEEND_CR )
- return "\015"; // 0x0d
+ return u"\015"_ustr; // 0x0d
if ( eEnd == LINEEND_LF )
- return "\012"; // 0x0a
- return "\015\012"; // 0x0d, 0x0a
+ return u"\012"_ustr; // 0x0a
+ return u"\015\012"_ustr; // 0x0d, 0x0a
}
OUString EditDoc::GetText( LineEnd eEnd ) const
@@ -1478,7 +1478,7 @@ void EditDoc::dumpAsXml(xmlTextWriterPtr pWriter) const
}
EditEngineItemPool::EditEngineItemPool()
-: SfxItemPool("EditEngineItemPool")
+: SfxItemPool(u"EditEngineItemPool"_ustr)
{
registerItemInfoPackage(getItemInfoPackageEditEngine());
}
diff --git a/editeng/source/editeng/editview.cxx b/editeng/source/editeng/editview.cxx
index 81fbd2d10b39..88de93b10060 100644
--- a/editeng/source/editeng/editview.cxx
+++ b/editeng/source/editeng/editview.cxx
@@ -655,7 +655,7 @@ ErrCode EditView::Read( SvStream& rInput, EETextFormat eFormat, SvKeyValueIterat
EditSelection aOldSel( getImpl().GetEditSelection() );
getImpl().DrawSelectionXOR();
getImpEditEngine().UndoActionStart( EDITUNDO_READ );
- EditPaM aEndPaM = getImpEditEngine().Read( rInput, "", eFormat, aOldSel, pHTTPHeaderAttrs );
+ EditPaM aEndPaM = getImpEditEngine().Read( rInput, u""_ustr, eFormat, aOldSel, pHTTPHeaderAttrs );
getImpEditEngine().UndoActionEnd();
EditSelection aNewSel( aEndPaM, aEndPaM );
@@ -964,10 +964,10 @@ static void LOKSendSpellPopupMenu(const weld::Menu& rMenu, LanguageType nGuessLa
OUString aTmpWord( SvtLanguageTable::GetLanguageString( nGuessLangWord ) );
OUString aTmpPara( SvtLanguageTable::GetLanguageString( nGuessLangPara ) );
- aItemTree.put("text", rMenu.get_label("ignore").toUtf8().getStr());
+ aItemTree.put("text", rMenu.get_label(u"ignore"_ustr).toUtf8().getStr());
aItemTree.put("type", "command");
aItemTree.put("command", ".uno:SpellCheckIgnoreAll?Type:string=Spelling");
- aItemTree.put("enabled", rMenu.get_sensitive("ignore"));
+ aItemTree.put("enabled", rMenu.get_sensitive(u"ignore"_ustr));
aMenu.push_back(std::make_pair("", aItemTree));
aItemTree.clear();
@@ -975,19 +975,19 @@ static void LOKSendSpellPopupMenu(const weld::Menu& rMenu, LanguageType nGuessLa
aMenu.push_back(std::make_pair("", aItemTree));
aItemTree.clear();
- aItemTree.put("text", rMenu.get_label("wordlanguage").toUtf8().getStr());
+ aItemTree.put("text", rMenu.get_label(u"wordlanguage"_ustr).toUtf8().getStr());
aItemTree.put("type", "command");
OUString sCommandString = ".uno:LanguageStatus?Language:string=Current_" + aTmpWord;
aItemTree.put("command", sCommandString.toUtf8().getStr());
- aItemTree.put("enabled", rMenu.get_sensitive("wordlanguage"));
+ aItemTree.put("enabled", rMenu.get_sensitive(u"wordlanguage"_ustr));
aMenu.push_back(std::make_pair("", aItemTree));
aItemTree.clear();
- aItemTree.put("text", rMenu.get_label("paralanguage").toUtf8().getStr());
+ aItemTree.put("text", rMenu.get_label(u"paralanguage"_ustr).toUtf8().getStr());
aItemTree.put("type", "command");
sCommandString = ".uno:LanguageStatus?Language:string=Paragraph_" + aTmpPara;
aItemTree.put("command", sCommandString.toUtf8().getStr());
- aItemTree.put("enabled", rMenu.get_sensitive("paralanguage"));
+ aItemTree.put("enabled", rMenu.get_sensitive(u"paralanguage"_ustr));
aMenu.push_back(std::make_pair("", aItemTree));
aItemTree.clear();
@@ -1018,10 +1018,10 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
aTempRect = rDevice.LogicToPixel(aTempRect);
weld::Widget* pPopupParent = getImpl().GetPopupParent(aTempRect);
- std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, "editeng/ui/spellmenu.ui"));
- std::unique_ptr<weld::Menu> xPopupMenu(xBuilder->weld_menu("editviewspellmenu"));
- std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu("insertmenu")); // add word to user-dictionaries
- std::unique_ptr<weld::Menu> xAutoMenu(xBuilder->weld_menu("automenu"));
+ std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(pPopupParent, u"editeng/ui/spellmenu.ui"_ustr));
+ std::unique_ptr<weld::Menu> xPopupMenu(xBuilder->weld_menu(u"editviewspellmenu"_ustr));
+ std::unique_ptr<weld::Menu> xInsertMenu(xBuilder->weld_menu(u"insertmenu"_ustr)); // add word to user-dictionaries
+ std::unique_ptr<weld::Menu> xAutoMenu(xBuilder->weld_menu(u"automenu"_ustr));
EditPaM aPaM2( aPaM );
aPaM2.SetIndex( aPaM2.GetIndex()+1 );
@@ -1074,15 +1074,15 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
if (nGuessLangPara == LANGUAGE_NONE)
nGuessLangPara = nGuessLangWord;
- xPopupMenu->append_separator("separator1");
+ xPopupMenu->append_separator(u"separator1"_ustr);
OUString aTmpWord( SvtLanguageTable::GetLanguageString( nGuessLangWord ) );
OUString aTmpPara( SvtLanguageTable::GetLanguageString( nGuessLangPara ) );
OUString aWordStr( EditResId( RID_STR_WORD ) );
aWordStr = aWordStr.replaceFirst( "%x", aTmpWord );
OUString aParaStr( EditResId( RID_STR_PARAGRAPH ) );
aParaStr = aParaStr.replaceFirst( "%x", aTmpPara );
- xPopupMenu->append("wordlanguage", aWordStr);
- xPopupMenu->append("paralanguage", aParaStr);
+ xPopupMenu->append(u"wordlanguage"_ustr, aWordStr);
+ xPopupMenu->append(u"paralanguage"_ustr, aParaStr);
}
// Replace suggestions...
@@ -1100,12 +1100,12 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
xPopupMenu->insert(nW, sId, aAlternate, nullptr, nullptr, nullptr, TRISTATE_INDET);
xAutoMenu->append(sId, aAlternate);
}
- xPopupMenu->insert_separator(nWords, "separator2");
+ xPopupMenu->insert_separator(nWords, u"separator2"_ustr);
}
else
{
xAutoMenu.reset();
- xPopupMenu->remove("autocorrect");
+ xPopupMenu->remove(u"autocorrect"_ustr);
}
SvtLinguConfig aCfg;
@@ -1169,11 +1169,11 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
}
if (xInsertMenu->n_children() != 1)
- xPopupMenu->remove("add");
+ xPopupMenu->remove(u"add"_ustr);
if (xInsertMenu->n_children() < 2)
{
xInsertMenu.reset();
- xPopupMenu->remove("insert");
+ xPopupMenu->remove(u"insert"_ustr);
}
//tdf#106123 store and restore the EditPaM around the menu Execute
@@ -1185,8 +1185,8 @@ bool EditView::ExecuteSpellPopup(const Point& rPosPixel, const Link<SpellCallbac
if (comphelper::LibreOfficeKit::isActive())
{
- xPopupMenu->remove("autocorrect");
- xPopupMenu->remove("autocorrectdlg");
+ xPopupMenu->remove(u"autocorrect"_ustr);
+ xPopupMenu->remove(u"autocorrectdlg"_ustr);
LOKSendSpellPopupMenu(*xPopupMenu, nGuessLangWord, nGuessLangPara, nWords);
return true;
diff --git a/editeng/source/editeng/eehtml.cxx b/editeng/source/editeng/eehtml.cxx
index b3ed28395506..1b73960d129f 100644
--- a/editeng/source/editeng/eehtml.cxx
+++ b/editeng/source/editeng/eehtml.cxx
@@ -160,7 +160,7 @@ void EditHTMLParser::NextToken( HtmlTokenId nToken )
{
if ( bInPara )
{
- ImpInsertText( " " );
+ ImpInsertText( u" "_ustr );
}
}
break;
diff --git a/editeng/source/editeng/eertfpar.cxx b/editeng/source/editeng/eertfpar.cxx
index 024e10a5fad7..9aeea98f6201 100644
--- a/editeng/source/editeng/eertfpar.cxx
+++ b/editeng/source/editeng/eertfpar.cxx
@@ -557,7 +557,7 @@ void EditRTFParser::ReadField()
}
if ( !aFldInst.isEmpty() )
{
- OUString aHyperLinkMarker( "HYPERLINK " );
+ OUString aHyperLinkMarker( u"HYPERLINK "_ustr );
if ( aFldInst.startsWithIgnoreAsciiCase( aHyperLinkMarker ) )
{
aFldInst = aFldInst.copy( aHyperLinkMarker.getLength() );
diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index 94d707cf902e..27ff1831fb62 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -348,7 +348,7 @@ void ImpEditView::lokSelectionCallback(const std::optional<tools::PolyPolygon> &
aItems.emplace_back("rectangles", sRectangle);
aItems.emplace_back("startHandleVisible", OString::boolean(bStartHandleVisible));
aItems.emplace_back("endHandleVisible", OString::boolean(bEndHandleVisible));
- pNotifier->notifyWindow(pParent->GetLOKWindowId(), "text_selection", aItems);
+ pNotifier->notifyWindow(pParent->GetLOKWindowId(), u"text_selection"_ustr, aItems);
}
else if (mpViewShell)
{
@@ -2094,7 +2094,7 @@ void ImpEditView::DeselectAll()
const vcl::ILibreOfficeKitNotifier* pNotifier = pParent->GetLOKNotifier();
std::vector<vcl::LOKPayloadItem> aItems;
aItems.emplace_back("rectangles", "");
- pNotifier->notifyWindow(pParent->GetLOKWindowId(), "text_selection", aItems);
+ pNotifier->notifyWindow(pParent->GetLOKWindowId(), u"text_selection"_ustr, aItems);
}
}
}
diff --git a/editeng/source/editeng/impedit2.cxx b/editeng/source/editeng/impedit2.cxx
index 9568e800ee4e..1f5a97053ba7 100644
--- a/editeng/source/editeng/impedit2.cxx
+++ b/editeng/source/editeng/impedit2.cxx
@@ -102,7 +102,7 @@ ImpEditEngine::ImpEditEngine( EditEngine* pEE, SfxItemPool* pItemPool ) :
mpStylePool(nullptr),
mpTextObjectPool(nullptr),
mpUndoManager(nullptr),
- maWordDelimiters(" .,;:-`'?!_=\"{}()[]"),
+ maWordDelimiters(u" .,;:-`'?!_=\"{}()[]"_ustr),
maBackgroundColor(COL_AUTO),
mbRoundToNearestPt(false),
mnAsianCompressionMode(CharCompressType::NONE),
diff --git a/editeng/source/editeng/impedit3.cxx b/editeng/source/editeng/impedit3.cxx
index 288afb5a33bd..ffd47d95f56a 100644
--- a/editeng/source/editeng/impedit3.cxx
+++ b/editeng/source/editeng/impedit3.cxx
@@ -3609,7 +3609,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po
if ( 0x200B == cChar || 0x2060 == cChar )
{
tools::Long nHalfBlankWidth = aTmpFont.QuickGetTextSize( &rOutDev,
- " ", 0, 1, nullptr ).Width() / 2;
+ u" "_ustr, 0, 1, nullptr ).Width() / 2;
const tools::Long nAdvanceX = ( nTmpIdx == nTmpEnd ?
rTextPortion.GetSize().Width() :
@@ -3988,7 +3988,7 @@ void ImpEditEngine::Paint( OutputDevice& rOutDev, tools::Rectangle aClipRect, Po
auto pUrlField = dynamic_cast<const SvxURLField*>(pFieldData);
if (pUrlField)
if (pPDFExtOutDevData->GetIsExportTaggedPDF())
- pPDFExtOutDevData->WrapBeginStructureElement(vcl::PDFWriter::Link, "Link");
+ pPDFExtOutDevData->WrapBeginStructureElement(vcl::PDFWriter::Link, u"Link"_ustr);
}
}
}
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index 432bb29138ea..17318e5d65a4 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -2714,7 +2714,7 @@ EditSelection ImpEditEngine::TransliterateText( const EditSelection& rSelection,
{
aSel = SelectWord( aSel, css::i18n::WordType::ANYWORD_IGNOREWHITESPACES, true, true );
if (!aSel.HasRange() && aSel.Min().GetIndex() > 0 &&
- OUString(".!?").indexOf(aSel.Min().GetNode()->GetChar(aSel.Min().GetIndex() - 1)) > -1 )
+ u".!?"_ustr.indexOf(aSel.Min().GetNode()->GetChar(aSel.Min().GetIndex() - 1)) > -1 )
{
aSel = SelectSentence(aSel);
}
diff --git a/editeng/source/items/flditem.cxx b/editeng/source/items/flditem.cxx
index b501d40ba968..9371ccad4aa9 100644
--- a/editeng/source/items/flditem.cxx
+++ b/editeng/source/items/flditem.cxx
@@ -653,7 +653,7 @@ OUString SvxExtTimeField::GetFormatted( tools::Time const & aTime, SvxTimeFormat
case SvxTimeFormat::HH12_MM_SS_00:
{
// no builtin format available, try to insert or reuse
- OUString aFormatCode( "HH:MM:SS.00 AM/PM" );
+ OUString aFormatCode( u"HH:MM:SS.00 AM/PM"_ustr );
sal_Int32 nCheckPos;
SvNumFormatType nType;
rFormatter.PutandConvertEntry( aFormatCode, nCheckPos, nType,
diff --git a/editeng/source/items/legacyitem.cxx b/editeng/source/items/legacyitem.cxx
index 96742f46fcae..2369b31871cb 100644
--- a/editeng/source/items/legacyitem.cxx
+++ b/editeng/source/items/legacyitem.cxx
@@ -113,7 +113,7 @@ namespace legacy
RTL_TEXTENCODING_SYMBOL :
GetSOStoreTextEncoding(rItem.GetCharSet()));
- const OUString aStoreFamilyName(bToBats ? "StarBats" : rItem.GetFamilyName());
+ const OUString aStoreFamilyName(bToBats ? u"StarBats"_ustr : rItem.GetFamilyName());
rStrm.WriteUniOrByteString(aStoreFamilyName, rStrm.GetStreamCharSet());
rStrm.WriteUniOrByteString(rItem.GetStyleName(), rStrm.GetStreamCharSet());
diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 2a1e540c3cb7..b81172f9e5a2 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -108,7 +108,7 @@ SvxNumberType::~SvxNumberType()
OUString SvxNumberType::GetNumStr( sal_Int32 nNo ) const
{
LanguageTag aLang = comphelper::IsFuzzing() ?
- LanguageTag("en-US") :
+ LanguageTag(u"en-US"_ustr) :
Application::GetSettings().GetLanguageTag();
return GetNumStr( nNo, aLang.getLocale() );
}
@@ -305,7 +305,7 @@ void SvxNumberFormat::Store(SvStream &rStream, FontToSubsFontConverter pConverte
// are present, so Brush save is forced
if(!pGraphicBrush->GetGraphicLink().isEmpty() && pGraphicBrush->GetGraphic())
{
- pGraphicBrush->SetGraphicLink("");
+ pGraphicBrush->SetGraphicLink(u""_ustr);
}
legacy::SvxBrush::Store(*pGraphicBrush, rStream, BRUSH_GRAPHIC_VERSION);
@@ -449,7 +449,7 @@ void SvxNumberFormat::SetGraphic( const OUString& rName )
if( pGraphicBrush && pGraphicBrush->GetGraphicLink() == rName )
return ;
- pGraphicBrush.reset( new SvxBrushItem( rName, "", GPOS_AREA, 0 ) );
+ pGraphicBrush.reset( new SvxBrushItem( rName, u""_ustr, GPOS_AREA, 0 ) );
if( eVertOrient == text::VertOrientation::NONE )
eVertOrient = text::VertOrientation::TOP;
@@ -502,11 +502,11 @@ OUString SvxNumberFormat::GetLabelFollowedByAsString() const
switch (meLabelFollowedBy)
{
case LISTTAB:
- return "\t";
+ return u"\t"_ustr;
case SPACE:
- return " ";
+ return u" "_ustr;
case NEWLINE:
- return "\n";
+ return u"\n"_ustr;
case NOTHING:
// intentionally left blank.
return OUString();
@@ -1047,7 +1047,7 @@ void SvxNumRule::UnLinkGraphics()
if (pGraphic)
{
SvxBrushItem aTempItem(*pBrush);
- aTempItem.SetGraphicLink("");
+ aTempItem.SetGraphicLink(u""_ustr);
aTempItem.SetGraphic(*pGraphic);
sal_Int16 eOrient = aFmt.GetVertOrient();
aFmt.SetGraphicBrush( &aTempItem, &aFmt.GetGraphicSize(), &eOrient );
diff --git a/editeng/source/items/svxfont.cxx b/editeng/source/items/svxfont.cxx
index db229190a403..253c78f8dea4 100644
--- a/editeng/source/items/svxfont.cxx
+++ b/editeng/source/items/svxfont.cxx
@@ -429,14 +429,14 @@ Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut, const OUString &rTxt,
Size SvxFont::GetPhysTxtSize( const OutputDevice *pOut )
{
if ( !IsCaseMap() && !IsFixKerning() )
- return Size( pOut->GetTextWidth( "" ), pOut->GetTextHeight() );
+ return Size( pOut->GetTextWidth( u""_ustr ), pOut->GetTextHeight() );
Size aTxtSize;
aTxtSize.setHeight( pOut->GetTextHeight() );
if ( !IsCaseMap() )
- aTxtSize.setWidth( pOut->GetTextWidth( "" ) );
+ aTxtSize.setWidth( pOut->GetTextWidth( u""_ustr ) );
else
- aTxtSize.setWidth( pOut->GetTextWidth( CalcCaseMap( "" ) ) );
+ aTxtSize.setWidth( pOut->GetTextWidth( CalcCaseMap( u""_ustr ) ) );
return aTxtSize;
}
@@ -812,7 +812,7 @@ void SvxDoDrawCapital::DoSpace( const bool bDraw )
pFont->SetWordLineMode( false );
pFont->SetTransparent( true );
pFont->SetPhysFont(*pOut);
- pOut->DrawStretchText( aSpacePos, nDiff, " ", 0, 2 );
+ pOut->DrawStretchText( aSpacePos, nDiff, u" "_ustr, 0, 2 );
pFont->SetWordLineMode( bWordWise );
pFont->SetTransparent( bTrans );
pFont->SetPhysFont(*pOut);
diff --git a/editeng/source/misc/SvXMLAutoCorrectExport.cxx b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
index 8faf4341163a..f3da7e11c215 100644
--- a/editeng/source/misc/SvXMLAutoCorrectExport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectExport.cxx
@@ -34,7 +34,7 @@ SvXMLAutoCorrectExport::SvXMLAutoCorrectExport(
const SvxAutocorrWordList * pNewAutocorr_List,
const OUString &rFileName,
css::uno::Reference< css::xml::sax::XDocumentHandler> const &rHandler)
-: SvXMLExport( xContext, "", rFileName, util::MeasureUnit::CM, rHandler ),
+: SvXMLExport( xContext, u""_ustr, rFileName, util::MeasureUnit::CM, rHandler ),
pAutocorr_List( pNewAutocorr_List )
{
GetNamespaceMap_().Add( GetXMLToken ( XML_NP_BLOCK_LIST),
@@ -75,7 +75,7 @@ SvXMLExceptionListExport::SvXMLExceptionListExport(
const SvStringsISortDtor &rNewList,
const OUString &rFileName,
css::uno::Reference< css::xml::sax::XDocumentHandler> const &rHandler)
-: SvXMLExport( xContext, "", rFileName, util::MeasureUnit::CM, rHandler ),
+: SvXMLExport( xContext, u""_ustr, rFileName, util::MeasureUnit::CM, rHandler ),
rList( rNewList )
{
GetNamespaceMap_().Add( GetXMLToken ( XML_NP_BLOCK_LIST ),
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
index baeef8861289..1822f002967d 100644
--- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
@@ -30,7 +30,7 @@ SvXMLAutoCorrectImport::SvXMLAutoCorrectImport(
SvxAutocorrWordList *pNewAutocorr_List,
SvxAutoCorrect &rNewAutoCorrect,
css::uno::Reference < css::embed::XStorage > xNewStorage)
-: SvXMLImport( xContext, "" ),
+: SvXMLImport( xContext, u""_ustr ),
pAutocorr_List (pNewAutocorr_List),
rAutoCorrect ( rNewAutoCorrect ),
xStorage (std::move( xNewStorage ))
@@ -105,7 +105,7 @@ SvXMLWordContext::~SvXMLWordContext()
SvXMLExceptionListImport::SvXMLExceptionListImport(
const uno::Reference< uno::XComponentContext > & xContext,
SvStringsISortDtor & rNewList )
-: SvXMLImport( xContext, "" ),
+: SvXMLImport( xContext, u""_ustr ),
rList (rNewList)
{
}
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 0c1ac014c923..f1f1825c523a 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -52,7 +52,7 @@ static void scanAutoCorrectDirForLanguageTags( const OUString& rURL )
{
// Title is file name here.
uno::Reference<sdbc::XResultSet> xResultSet = aContent.createCursor(
- {"Title"}, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY);
+ {u"Title"_ustr}, ::ucbhelper::INCLUDE_DOCUMENTS_ONLY);
uno::Reference<sdbc::XRow> xRow( xResultSet, UNO_QUERY);
if (xResultSet.is() && xRow.is())
{
@@ -311,7 +311,7 @@ void SvxBaseAutoCorrCfg::Load(bool bInit)
}
SvxBaseAutoCorrCfg::SvxBaseAutoCorrCfg(SvxAutoCorrCfg& rPar) :
- utl::ConfigItem("Office.Common/AutoCorrect"),
+ utl::ConfigItem(u"Office.Common/AutoCorrect"_ustr),
rParent(rPar)
{
}
@@ -580,7 +580,7 @@ void SvxSwAutoCorrCfg::Load(bool bInit)
}
SvxSwAutoCorrCfg::SvxSwAutoCorrCfg(SvxAutoCorrCfg& rPar) :
- utl::ConfigItem("Office.Writer/AutoFunction"),
+ utl::ConfigItem(u"Office.Writer/AutoFunction"_ustr),
rParent(rPar)
{
}
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index 401dc9d8ff17..12c63fc5f272 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -679,7 +679,7 @@ sal_Int32 SvxAutoCorrect::FnAddNonBrkSpace(
if ( rCC.getLanguageTag().getLanguage() == "fr" )
{
bool bFrCA = (rCC.getLanguageTag().getCountry() == "CA");
- OUString allChars = ":;?!%";
+ OUString allChars = u":;?!%"_ustr;
OUString chars( allChars );
if ( bFrCA )
chars = ":";
@@ -1284,7 +1284,7 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, sal_Int32 nInsPos,
// i' -> I' in English (last step for the Undo)
if( eType == ACQuotes::CapitalizeIAm )
- rDoc.Replace( nInsPos-1, "I" );
+ rDoc.Replace( nInsPos-1, u"I"_ustr );
}
OUString SvxAutoCorrect::GetQuote( SvxAutoCorrDoc const & rDoc, sal_Int32 nInsPos,
@@ -1371,7 +1371,7 @@ void SvxAutoCorrect::DoAutoCorrect( SvxAutoCorrDoc& rDoc, const OUString& rTxt,
primary(eLang) == primary(LANGUAGE_FRENCH) &&
( ( ( nInsPos == 2 || ( nInsPos > 2 && IsWordDelim( rTxt[ nInsPos-3 ] ) ) ) &&
// abbreviated form of ce, de, je, la, le, ne, me, te, se or si
- OUString("cdjlnmtsCDJLNMTS").indexOf( rTxt[ nInsPos-2 ] ) > -1 ) ||
+ u"cdjlnmtsCDJLNMTS"_ustr.indexOf( rTxt[ nInsPos-2 ] ) > -1 ) ||
( ( nInsPos == 3 || (nInsPos > 3 && IsWordDelim( rTxt[ nInsPos-4 ] ) ) ) &&
// abbreviated form of que
( rTxt[ nInsPos-2 ] == 'u' || rTxt[ nInsPos-2 ] == 'U' ) &&
@@ -2317,7 +2317,7 @@ void SvxAutoCorrectLanguageLists::LoadXMLExceptList_Imp(
uno::Reference< xml::sax::XFastParser > xParser = xml::sax::FastParser::create( xContext );
uno::Reference<xml::sax::XFastTokenHandler> xTokenHandler = new SvXMLAutoCorrectTokenHandler;
xParser->setFastDocumentHandler( xFilter );
- xParser->registerNamespace( "http://openoffice.org/2001/block-list", SvXMLAutoCorrectToken::NAMESPACE );
+ xParser->registerNamespace( u"http://openoffice.org/2001/block-list"_ustr, SvXMLAutoCorrectToken::NAMESPACE );
xParser->setTokenHandler( xTokenHandler );
// parse
@@ -2370,7 +2370,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
{
xStrm->SetSize( 0 );
xStrm->SetBufferSize( 8192 );
- xStrm->SetProperty( "MediaType", Any(OUString( "text/xml" )) );
+ xStrm->SetProperty( u"MediaType"_ustr, Any(u"text/xml"_ustr) );
uno::Reference< uno::XComponentContext > xContext =
@@ -2428,7 +2428,7 @@ SvxAutocorrWordList* SvxAutoCorrectLanguageLists::LoadAutocorrWordList()
// connect parser and filter
xParser->setFastDocumentHandler( xFilter );
- xParser->registerNamespace( "http://openoffice.org/2001/block-list", SvXMLAutoCorrectToken::NAMESPACE );
+ xParser->registerNamespace( u"http://openoffice.org/2001/block-list"_ustr, SvXMLAutoCorrectToken::NAMESPACE );
xParser->setTokenHandler(xTokenHandler);
// parse
@@ -2647,7 +2647,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
aInfo.NewTitle = aDest.GetLastName();
aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DecodeMechanism::ToIUri );
aInfo.MoveData = false;
- aNewContent.executeCommand( "transfer", Any(aInfo));
+ aNewContent.executeCommand( u"transfer"_ustr, Any(aInfo));
}
catch (...)
{
@@ -2689,7 +2689,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
try
{
::ucbhelper::Content aContent ( aDest.GetMainURL( INetURLObject::DecodeMechanism::ToIUri ), uno::Reference < XCommandEnvironment >(), comphelper::getProcessComponentContext() );
- aContent.executeCommand ( "delete", Any ( true ) );
+ aContent.executeCommand ( u"delete"_ustr, Any ( true ) );
}
catch (...)
{
@@ -2711,7 +2711,7 @@ bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SotStorage& rStg )
{
refList->SetSize( 0 );
refList->SetBufferSize( 8192 );
- refList->SetProperty( "MediaType", Any(OUString( "text/xml" )) );
+ refList->SetProperty( u"MediaType"_ustr, Any(u"text/xml"_ustr) );
uno::Reference< uno::XComponentContext > xContext =
comphelper::getProcessComponentContext();
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index 25f3b1b466cc..f37af302d144 100644
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -22,7 +22,7 @@
#include <vcl/keycodes.hxx>
SvxSwAutoFormatFlags::SvxSwAutoFormatFlags()
- : aBulletFont( "OpenSymbol", Size( 0, 14 ) )
+ : aBulletFont( u"OpenSymbol"_ustr, Size( 0, 14 ) )
{
bAutoCorrect =
bCapitalStartSentence =
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index e252dc3233e6..4cf67b9e2f20 100644
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -102,7 +102,7 @@ void ThesDummy_Impl::GetCfgLocales()
return;
SvtLinguConfig aCfg;
- Sequence < OUString > aNodeNames( aCfg.GetNodeNames( "ServiceManager/ThesaurusList" ) );
+ Sequence < OUString > aNodeNames( aCfg.GetNodeNames( u"ServiceManager/ThesaurusList"_ustr ) );
const OUString *pNodeNames = aNodeNames.getConstArray();
sal_Int32 nLen = aNodeNames.getLength();
pLocaleSeq.reset( new Sequence< lang::Locale >( nLen ) );
@@ -596,7 +596,7 @@ uno::Reference< XDictionary > LinguMgr::GetIgnoreAll()
if (xTmpDicList.is())
{
const LanguageTag tag = comphelper::LibreOfficeKit::isActive()
- ? LanguageTag("en-US")
+ ? LanguageTag(u"en-US"_ustr)
: SvtSysLocale().GetUILanguageTag();
std::locale loc(Translate::Create("svt", tag));
xIgnoreAll = xTmpDicList->getDictionaryByName(
@@ -617,7 +617,7 @@ uno::Reference< XDictionary > LinguMgr::GetChangeAll()
if (_xDicList.is())
{
xChangeAll = _xDicList->createDictionary(
- "ChangeAllList",
+ u"ChangeAllList"_ustr,
LanguageTag::convertToLocale( LANGUAGE_NONE ),
DictionaryType_NEGATIVE, OUString() );
}
diff --git a/editeng/source/outliner/outliner.cxx b/editeng/source/outliner/outliner.cxx
index 4a71d5b35b77..2eb127a7f430 100644
--- a/editeng/source/outliner/outliner.cxx
+++ b/editeng/source/outliner/outliner.cxx
@@ -502,8 +502,8 @@ bool Outliner::ImpConvertEdtToOut( sal_Int32 nPara )
SfxStyleSheet* pStyle= pEditEngine->GetStyleSheet( nPara );
if( pStyle )
{
- OUString aHeading_US( "heading" );
- OUString aNumber_US( "Numbering" );
+ OUString aHeading_US( u"heading"_ustr );
+ OUString aNumber_US( u"Numbering"_ustr );
aName = pStyle->GetName();
sal_Int32 nSearch;
if ( ( nSearch = aName.indexOf( aHeading_US ) ) != -1 )
diff --git a/editeng/source/uno/UnoForbiddenCharsTable.cxx b/editeng/source/uno/UnoForbiddenCharsTable.cxx
index 5e77a9252fe0..dd9ccda2dfb8 100644
--- a/editeng/source/uno/UnoForbiddenCharsTable.cxx
+++ b/editeng/source/uno/UnoForbiddenCharsTable.cxx
@@ -51,7 +51,7 @@ ForbiddenCharacters SvxUnoForbiddenCharsTable::getForbiddenCharacters( const lan
SolarMutexGuard aGuard;
if (!mxForbiddenChars)
- throw RuntimeException("No Forbidden Characters present");
+ throw RuntimeException(u"No Forbidden Characters present"_ustr);
const LanguageType eLang = LanguageTag::convertToLanguageType( rLocale );
const ForbiddenCharacters* pForbidden = mxForbiddenChars->GetForbiddenCharacters( eLang, false );
@@ -79,7 +79,7 @@ void SvxUnoForbiddenCharsTable::setForbiddenCharacters(const lang::Locale& rLoca
SolarMutexGuard aGuard;
if (!mxForbiddenChars)
- throw RuntimeException("No Forbidden Characters present");
+ throw RuntimeException(u"No Forbidden Characters present"_ustr);
const LanguageType eLang = LanguageTag::convertToLanguageType( rLocale );
mxForbiddenChars->SetForbiddenCharacters( eLang, rForbiddenCharacters );
@@ -92,7 +92,7 @@ void SvxUnoForbiddenCharsTable::removeForbiddenCharacters( const lang::Locale& r
SolarMutexGuard aGuard;
if (!mxForbiddenChars)
- throw RuntimeException("No Forbidden Characters present");
+ throw RuntimeException(u"No Forbidden Characters present"_ustr);
const LanguageType eLang = LanguageTag::convertToLanguageType( rLocale );
mxForbiddenChars->ClearForbiddenCharacters( eLang );
diff --git a/editeng/source/uno/unofield.cxx b/editeng/source/uno/unofield.cxx
index 6f2e84a9577d..ed8a0de01468 100644
--- a/editeng/source/uno/unofield.cxx
+++ b/editeng/source/uno/unofield.cxx
@@ -483,7 +483,7 @@ std::unique_ptr<SvxFieldData> SvxUnoTextField::CreateFieldData() const noexcept
}
// #92009# pass fixed attribute to constructor
- pData.reset( new SvxAuthorField( aFirstName, aLastName, "",
+ pData.reset( new SvxAuthorField( aFirstName, aLastName, u""_ustr,
mpImpl->mbBoolean1 ? SvxAuthorType::Fix : SvxAuthorType::Var ) );
if( !mpImpl->mbBoolean2 )
@@ -588,39 +588,39 @@ OUString SAL_CALL SvxUnoTextField::getPresentation( sal_Bool bShowCommand )
switch (mnServiceId)
{
case text::textfield::Type::DATE:
- return "Date";
+ return u"Date"_ustr;
case text::textfield::Type::URL:
- return "URL";
+ return u"URL"_ustr;
case text::textfield::Type::PAGE:
- return "Page";
+ return u"Page"_ustr;
case text::textfield::Type::PAGES:
- return "Pages";
+ return u"Pages"_ustr;
case text::textfield::Type::TIME:
- return "Time";
+ return u"Time"_ustr;
case text::textfield::Type::DOCINFO_TITLE:
- return "File";
+ return u"File"_ustr;
case text::textfield::Type::TABLE:
- return "Table";
+ return u"Table"_ustr;
case text::textfield::Type::EXTENDED_TIME:
- return "ExtTime";
+ return u"ExtTime"_ustr;
case text::textfield::Type::EXTENDED_FILE:
- return "ExtFile";
+ return u"ExtFile"_ustr;
case text::textfield::Type::AUTHOR:
- return "Author";
+ return u"Author"_ustr;
case text::textfield::Type::MEASURE:
- return "Measure";
+ return u"Measure"_ustr;
case text::textfield::Type::PRESENTATION_HEADER:
- return "Header";
+ return u"Header"_ustr;
case text::textfield::Type::PRESENTATION_FOOTER:
- return "Footer";
+ return u"Footer"_ustr;
case text::textfield::Type::PRESENTATION_DATE_TIME:
- return "DateTime";
+ return u"DateTime"_ustr;
case text::textfield::Type::PAGE_NAME:
- return "PageName";
+ return u"PageName"_ustr;
case text::textfield::Type::DOCINFO_CUSTOM:
- return "Custom";
+ return u"Custom"_ustr;
default:
- return "Unknown";
+ return u"Unknown"_ustr;
}
}
else
@@ -788,7 +788,7 @@ void SvxUnoTextField::disposing()
// lang::XServiceInfo
OUString SAL_CALL SvxUnoTextField::getImplementationName()
{
- return "SvxUnoTextField";
+ return u"SvxUnoTextField"_ustr;
}
uno::Sequence< OUString > SAL_CALL SvxUnoTextField::getSupportedServiceNames()
diff --git a/editeng/source/uno/unonrule.cxx b/editeng/source/uno/unonrule.cxx
index 8a5518567053..75f2599c59a7 100644
--- a/editeng/source/uno/unonrule.cxx
+++ b/editeng/source/uno/unonrule.cxx
@@ -155,7 +155,7 @@ Reference< XCloneable > SAL_CALL SvxUnoNumberingRules::createClone( )
OUString SAL_CALL SvxUnoNumberingRules::getImplementationName( )
{
- return "SvxUnoNumberingRules";
+ return u"SvxUnoNumberingRules"_ustr;
}
sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& ServiceName )
@@ -165,7 +165,7 @@ sal_Bool SAL_CALL SvxUnoNumberingRules::supportsService( const OUString& Service
Sequence< OUString > SAL_CALL SvxUnoNumberingRules::getSupportedServiceNames( )
{
- return { "com.sun.star.text.NumberingRules" };
+ return { u"com.sun.star.text.NumberingRules"_ustr };
}
Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal_Int32 nIndex) const
@@ -204,7 +204,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
sal_UCS4 nCode = rFmt.GetBulletChar();
OUString aStr( &nCode, 1 );
aVal <<= aStr;
- pArray[nIdx++] = beans::PropertyValue("BulletChar", -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = beans::PropertyValue(u"BulletChar"_ustr, -1, aVal, beans::PropertyState_DIRECT_VALUE);
}
if( rFmt.GetBulletFont() )
@@ -225,7 +225,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
uno::Reference<awt::XBitmap> xBitmap(pGraphic->GetXGraphic(), uno::UNO_QUERY);
aVal <<= xBitmap;
- pArray[nIdx++] = beans::PropertyValue("GraphicBitmap", -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = beans::PropertyValue(u"GraphicBitmap"_ustr, -1, aVal, beans::PropertyState_DIRECT_VALUE);
}
}
@@ -233,7 +233,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
const Size aSize( rFmt.GetGraphicSize() );
const awt::Size aUnoSize( aSize.Width(), aSize.Height() );
aVal <<= aUnoSize;
- pArray[nIdx++] = beans::PropertyValue("GraphicSize", -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = beans::PropertyValue(u"GraphicSize"_ustr, -1, aVal, beans::PropertyState_DIRECT_VALUE);
}
aVal <<= static_cast<sal_Int16>(rFmt.GetStart());
@@ -245,7 +245,7 @@ Sequence<beans::PropertyValue> SvxUnoNumberingRules::getNumberingRuleByIndex(sal
aVal <<= rFmt.GetFirstLineOffset();
pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_FIRST_LINE_OFFSET, -1, aVal, beans::PropertyState_DIRECT_VALUE);
- pArray[nIdx++] = beans::PropertyValue("SymbolTextDistance", -1, aVal, beans::PropertyState_DIRECT_VALUE);
+ pArray[nIdx++] = beans::PropertyValue(u"SymbolTextDistance"_ustr, -1, aVal, beans::PropertyState_DIRECT_VALUE);
aVal <<= rFmt.GetBulletColor();
pArray[nIdx++] = beans::PropertyValue(UNO_NAME_NRULE_BULLET_COLOR, -1, aVal, beans::PropertyState_DIRECT_VALUE);
diff --git a/editeng/source/uno/unopracc.cxx b/editeng/source/uno/unopracc.cxx
index c36fc152e24b..5b0493ca68a1 100644
--- a/editeng/source/uno/unopracc.cxx
+++ b/editeng/source/uno/unopracc.cxx
@@ -81,7 +81,7 @@ uno::Sequence< sal_Int8 > SAL_CALL SvxAccessibleTextPropertySet::getImplementati
// XServiceInfo
OUString SAL_CALL SAL_CALL SvxAccessibleTextPropertySet::getImplementationName()
{
- return "SvxAccessibleTextPropertySet";
+ return u"SvxAccessibleTextPropertySet"_ustr;
}
sal_Bool SAL_CALL SvxAccessibleTextPropertySet::supportsService (const OUString& sServiceName)
diff --git a/editeng/source/uno/unotext.cxx b/editeng/source/uno/unotext.cxx
index f4ad4096d875..5ee01340f880 100644
--- a/editeng/source/uno/unotext.cxx
+++ b/editeng/source/uno/unotext.cxx
@@ -314,7 +314,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getStart()
SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() );
if(pText == nullptr)
- throw uno::RuntimeException("Failed to retrieve a valid text base object from the Uno Tunnel");
+ throw uno::RuntimeException(u"Failed to retrieve a valid text base object from the Uno Tunnel"_ustr);
rtl::Reference<SvxUnoTextRange> pRange = new SvxUnoTextRange( *pText );
xRange = pRange;
@@ -342,7 +342,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxUnoTextRangeBase::getEnd()
SvxUnoTextBase* pText = comphelper::getFromUnoTunnel<SvxUnoTextBase>( getText() );
if(pText == nullptr)
- throw uno::RuntimeException("Failed to retrieve a valid text base object from the Uno Tunnel");
+ throw uno::RuntimeException(u"Failed to retrieve a valid text base object from the Uno Tunnel"_ustr);
rtl::Reference<SvxUnoTextRange> pNew = new SvxUnoTextRange( *pText );
xRet = pNew;
@@ -668,11 +668,11 @@ void SvxUnoTextRangeBase::getPropertyValue( const SfxItemPropertyMapEntry* pMap,
case WID_PORTIONTYPE:
if ( rSet.GetItemState( EE_FEATURE_FIELD, false ) == SfxItemState::SET )
{
- rAny <<= OUString("TextField");
+ rAny <<= u"TextField"_ustr;
}
else
{
- rAny <<= OUString("Text");
+ rAny <<= u"Text"_ustr;
}
break;
@@ -704,12 +704,12 @@ bool SvxUnoTextRangeBase::GetPropertyValueHelper( SfxItemSet const & rSet, cons
{
SfxItemState eState = rSet.GetItemState( EE_PARA_NUMBULLET );
if( eState != SfxItemState::SET && eState != SfxItemState::DEFAULT)
- throw uno::RuntimeException("Invalid item state for paragraph numbering/bullet. Expected SET or DEFAULT.");
+ throw uno::RuntimeException(u"Invalid item state for paragraph numbering/bullet. Expected SET or DEFAULT."_ustr);
const SvxNumBulletItem* pBulletItem = rSet.GetItem( EE_PARA_NUMBULLET );
if( pBulletItem == nullptr )
- throw uno::RuntimeException("Unable to retrieve paragraph numbering/bullet item.");
+ throw uno::RuntimeException(u"Unable to retrieve paragraph numbering/bullet item."_ustr);
aAny <<= SvxCreateNumRule( pBulletItem->GetNumRule() );
}
@@ -777,7 +777,7 @@ void SAL_CALL SvxUnoTextRangeBase::setPropertyValues( const uno::Sequence< OUStr
void SvxUnoTextRangeBase::_setPropertyValues( const uno::Sequence< OUString >& aPropertyNames, const uno::Sequence< uno::Any >& aValues, sal_Int32 nPara )
{
if (aPropertyNames.getLength() != aValues.getLength())
- throw lang::IllegalArgumentException("lengths do not match",
+ throw lang::IllegalArgumentException(u"lengths do not match"_ustr,
static_cast<css::beans::XPropertySet*>(this), -1);
SolarMutexGuard aGuard;
@@ -1536,9 +1536,9 @@ uno::Sequence< OUString > SAL_CALL SvxUnoTextRangeBase::getSupportedServiceNames
uno::Sequence< OUString > SvxUnoTextRangeBase::getSupportedServiceNames_Static()
{
- return { "com.sun.star.style.CharacterProperties",
- "com.sun.star.style.CharacterPropertiesComplex",
- "com.sun.star.style.CharacterPropertiesAsian" };
+ return { u"com.sun.star.style.CharacterProperties"_ustr,
+ u"com.sun.star.style.CharacterPropertiesComplex"_ustr,
+ u"com.sun.star.style.CharacterPropertiesAsian"_ustr };
}
// XTextRangeCompare
@@ -1667,7 +1667,7 @@ uno::Reference< text::XText > SAL_CALL SvxUnoTextRange::getText()
// lang::XServiceInfo
OUString SAL_CALL SvxUnoTextRange::getImplementationName()
{
- return "SvxUnoTextRange";
+ return u"SvxUnoTextRange"_ustr;
}
@@ -1835,7 +1835,7 @@ void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text
{
case text::ControlCharacter::PARAGRAPH_BREAK:
{
- insertString( xRange, "\x0D", bAbsorb );
+ insertString( xRange, u"\x0D"_ustr, bAbsorb );
return;
}
@@ -1848,7 +1848,7 @@ void SAL_CALL SvxUnoTextBase::insertControlCharacter( const uno::Reference< text
if( bAbsorb )
{
- pForwarder->QuickInsertText( "", aRange );
+ pForwarder->QuickInsertText( u""_ustr, aRange );
aRange.nEndPos = aRange.nStartPos;
aRange.nEndPara = aRange.nStartPara;
@@ -2233,7 +2233,7 @@ void SvxUnoTextBase::copyText(
// lang::XServiceInfo
OUString SAL_CALL SvxUnoTextBase::getImplementationName()
{
- return "SvxUnoTextBase";
+ return u"SvxUnoTextBase"_ustr;
}
uno::Sequence< OUString > SAL_CALL SvxUnoTextBase::getSupportedServiceNames( )
diff --git a/editeng/source/uno/unotext2.cxx b/editeng/source/uno/unotext2.cxx
index 54714027b388..d56981cc5ece 100644
--- a/editeng/source/uno/unotext2.cxx
+++ b/editeng/source/uno/unotext2.cxx
@@ -350,7 +350,7 @@ void SAL_CALL SvxUnoTextContent::setPropertyToDefault( const OUString& PropertyN
OUString SAL_CALL SvxUnoTextContent::getImplementationName()
{
- return "SvxUnoTextContent";
+ return u"SvxUnoTextContent"_ustr;
}
uno::Sequence< OUString > SAL_CALL SvxUnoTextContent::getSupportedServiceNames()
@@ -607,7 +607,7 @@ void SAL_CALL SvxUnoTextCursor::setString( const OUString& aString )
// lang::XServiceInfo
OUString SAL_CALL SvxUnoTextCursor::getImplementationName()
{
- return "SvxUnoTextCursor";
+ return u"SvxUnoTextCursor"_ustr;
}
sal_Bool SAL_CALL SvxUnoTextCursor::supportsService( const OUString& ServiceName )
diff --git a/editeng/source/xml/xmltxtexp.cxx b/editeng/source/xml/xmltxtexp.cxx
index 0ebb3819b350..13a836bd7625 100644
--- a/editeng/source/xml/xmltxtexp.cxx
+++ b/editeng/source/xml/xmltxtexp.cxx
@@ -264,7 +264,7 @@ SvxXMLTextExportComponent::SvxXMLTextExportComponent(
EditEngine* pEditEngine,
const ESelection& rSel,
const css::uno::Reference< css::xml::sax::XDocumentHandler > & xHandler)
-: SvXMLExport( xContext, "", /*rFileName*/"", xHandler, static_cast<frame::XModel*>(new SvxSimpleUnoModel()), FieldUnit::CM,
+: SvXMLExport( xContext, u""_ustr, /*rFileName*/u""_ustr, xHandler, static_cast<frame::XModel*>(new SvxSimpleUnoModel()), FieldUnit::CM,
SvXMLExportFlags::OASIS | SvXMLExportFlags::AUTOSTYLES | SvXMLExportFlags::CONTENT )
{
SvxEditEngineSource aEditSource( pEditEngine );
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 9d91124100a0..d3626e7de8e3 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -120,7 +120,7 @@ SvXMLImportContext *SvxXMLXTextImportComponent::CreateFastContext(
SvxXMLXTextImportComponent::SvxXMLXTextImportComponent(
const css::uno::Reference< css::uno::XComponentContext >& xContext,
uno::Reference< XText > xText )
-: SvXMLImport(xContext, ""),
+: SvXMLImport(xContext, u""_ustr),
mxText(std::move( xText ))
{
GetTextImport()->SetCursor( mxText->createTextCursor() );