loplugin:ostr in starmath

Change-Id: Ied15eb71ae3ae2d80ba839a6c99ea3cf620ca52f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167598
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins
This commit is contained in:
Noel Grandin 2024-05-13 15:16:59 +02:00
parent 1d83ac544d
commit b56ca52cef
36 changed files with 1060 additions and 1045 deletions

View File

@ -1055,7 +1055,7 @@ class SmPlaceNode final : public SmMathSymbolNode
public: public:
explicit SmPlaceNode(const SmToken &rNodeToken) explicit SmPlaceNode(const SmToken &rNodeToken)
: SmMathSymbolNode(SmNodeType::Place, rNodeToken) { } : SmMathSymbolNode(SmNodeType::Place, rNodeToken) { }
SmPlaceNode() : SmMathSymbolNode(SmNodeType::Place, SmToken(TPLACE, MS_PLACE, "<?>")) { }; SmPlaceNode() : SmMathSymbolNode(SmNodeType::Place, SmToken(TPLACE, MS_PLACE, u"<?>"_ustr)) { };
/** /**
* Prepare preliminary settings about font and text * Prepare preliminary settings about font and text

View File

@ -70,7 +70,7 @@ void Test::tearDown()
void Test::testCopyPaste() void Test::testCopyPaste()
{ {
auto xTree = SmParser5().Parse("a * b + c"); auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get()); SmCursor aCursor(xTree.get(), xDocShRef.get());
@ -88,13 +88,13 @@ void Test::testCopyPaste()
aCursor.Paste(); aCursor.Paste();
#ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason
CPPUNIT_ASSERT_EQUAL(OUString("{ { a * b } + { c * b } }"), xDocShRef->GetText()); CPPUNIT_ASSERT_EQUAL(u"{ { a * b } + { c * b } }"_ustr, xDocShRef->GetText());
#endif #endif
} }
void Test::testCopySelectPaste() void Test::testCopySelectPaste()
{ {
auto xTree = SmParser5().Parse("a * b + c"); auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get()); SmCursor aCursor(xTree.get(), xDocShRef.get());
@ -116,13 +116,13 @@ void Test::testCopySelectPaste()
aCursor.Paste(); aCursor.Paste();
#ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason
CPPUNIT_ASSERT_EQUAL(OUString("{ { b + { c * b } } + c }"), xDocShRef->GetText()); CPPUNIT_ASSERT_EQUAL(u"{ { b + { c * b } } + c }"_ustr, xDocShRef->GetText());
#endif #endif
} }
void Test::testCutPaste() void Test::testCutPaste()
{ {
auto xTree = SmParser5().Parse("a * b + c"); auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get()); SmCursor aCursor(xTree.get(), xDocShRef.get());
@ -140,13 +140,13 @@ void Test::testCutPaste()
aCursor.Paste(); aCursor.Paste();
#ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason
CPPUNIT_ASSERT_EQUAL(OUString("{ a + { c * b } }"), xDocShRef->GetText()); CPPUNIT_ASSERT_EQUAL(u"{ a + { c * b } }"_ustr, xDocShRef->GetText());
#endif #endif
} }
void Test::testCutSelectPaste() void Test::testCutSelectPaste()
{ {
auto xTree = SmParser5().Parse("a * b + c"); auto xTree = SmParser5().Parse(u"a * b + c"_ustr);
xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); xTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(xTree.get(), xDocShRef.get()); SmCursor aCursor(xTree.get(), xDocShRef.get());
@ -168,7 +168,7 @@ void Test::testCutSelectPaste()
aCursor.Paste(); aCursor.Paste();
#ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason #ifndef _WIN32 // FIXME: on Windows clipboard does not work in tests for some reason
CPPUNIT_ASSERT_EQUAL(OUString("{ b + { c * {} } }"), xDocShRef->GetText()); CPPUNIT_ASSERT_EQUAL(u"{ b + { c * {} } }"_ustr, xDocShRef->GetText());
#endif #endif
} }

View File

@ -23,7 +23,7 @@ class Test : public UnoApiTest
{ {
public: public:
Test() Test()
: UnoApiTest("starmath/qa/cppunit/data/") : UnoApiTest(u"starmath/qa/cppunit/data/"_ustr)
{ {
} }

View File

@ -68,10 +68,10 @@ void NodeTest::testTdf47813()
{ {
SmParser5 aParser; SmParser5 aParser;
#define MATRIX "matrix {-2#33##4#-5##6,0#7}" #define MATRIX "matrix {-2#33##4#-5##6,0#7}"
auto pNodeA = aParser.Parse(MATRIX); auto pNodeA = aParser.Parse(u"" MATRIX ""_ustr);
auto pNodeC = aParser.Parse("alignc " MATRIX); auto pNodeC = aParser.Parse(u"alignc " MATRIX ""_ustr);
auto pNodeL = aParser.Parse("alignl " MATRIX); auto pNodeL = aParser.Parse(u"alignl " MATRIX ""_ustr);
auto pNodeR = aParser.Parse("alignr " MATRIX); auto pNodeR = aParser.Parse(u"alignr " MATRIX ""_ustr);
#undef MATRIX #undef MATRIX
ScopedVclPtrInstance<VirtualDevice> pOutputDevice; ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
SmFormat aFmt; SmFormat aFmt;
@ -115,26 +115,26 @@ void NodeTest::testTdf52225()
{ {
SmFormat aFormat = mxDocShell->GetFormat(); SmFormat aFormat = mxDocShell->GetFormat();
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), aFormat.GetGreekCharStyle()); // default format = 2 CPPUNIT_ASSERT_EQUAL(sal_Int16(2), aFormat.GetGreekCharStyle()); // default format = 2
CHECK_GREEK_SYMBOL("%ALPHA", u'\x0391', false); CHECK_GREEK_SYMBOL(u"%ALPHA"_ustr, u'\x0391', false);
CHECK_GREEK_SYMBOL("%iALPHA", u'\x0391', true); CHECK_GREEK_SYMBOL(u"%iALPHA"_ustr, u'\x0391', true);
CHECK_GREEK_SYMBOL("%alpha", u'\x03b1', true); CHECK_GREEK_SYMBOL(u"%alpha"_ustr, u'\x03b1', true);
CHECK_GREEK_SYMBOL("%ialpha", u'\x03b1', true); CHECK_GREEK_SYMBOL(u"%ialpha"_ustr, u'\x03b1', true);
// mode 1 // mode 1
aFormat.SetGreekCharStyle(1); aFormat.SetGreekCharStyle(1);
mxDocShell->SetFormat(aFormat); mxDocShell->SetFormat(aFormat);
CHECK_GREEK_SYMBOL("%BETA", u'\x0392', true); CHECK_GREEK_SYMBOL(u"%BETA"_ustr, u'\x0392', true);
CHECK_GREEK_SYMBOL("%iBETA", u'\x0392', true); CHECK_GREEK_SYMBOL(u"%iBETA"_ustr, u'\x0392', true);
CHECK_GREEK_SYMBOL("%beta", u'\x03b2', true); CHECK_GREEK_SYMBOL(u"%beta"_ustr, u'\x03b2', true);
CHECK_GREEK_SYMBOL("%ibeta", u'\x03b2', true); CHECK_GREEK_SYMBOL(u"%ibeta"_ustr, u'\x03b2', true);
// mode 0 // mode 0
aFormat.SetGreekCharStyle(0); aFormat.SetGreekCharStyle(0);
mxDocShell->SetFormat(aFormat); mxDocShell->SetFormat(aFormat);
CHECK_GREEK_SYMBOL("%GAMMA", u'\x0393', false); CHECK_GREEK_SYMBOL(u"%GAMMA"_ustr, u'\x0393', false);
CHECK_GREEK_SYMBOL("%iGAMMA", u'\x0393', true); CHECK_GREEK_SYMBOL(u"%iGAMMA"_ustr, u'\x0393', true);
CHECK_GREEK_SYMBOL("%gamma", u'\x03b3', false); CHECK_GREEK_SYMBOL(u"%gamma"_ustr, u'\x03b3', false);
CHECK_GREEK_SYMBOL("%igamma", u'\x03b3', true); CHECK_GREEK_SYMBOL(u"%igamma"_ustr, u'\x03b3', true);
#undef CHECK_GREEK_SYMBOL #undef CHECK_GREEK_SYMBOL
} }

View File

@ -524,7 +524,7 @@ void Test::testBinomInBinHor()
// tack +d on the end, which will put the binom into an SmBinHorNode // tack +d on the end, which will put the binom into an SmBinHorNode
aCursor.InsertElement(PlusElement); aCursor.InsertElement(PlusElement);
aCursor.InsertText("d"); aCursor.InsertText(u"d"_ustr);
sExpected += "{ { binom a { b + c } } + d }"; sExpected += "{ { binom a { b + c } } + d }";
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText()); CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
@ -552,7 +552,7 @@ void Test::testBinVerInUnary()
// set up a fraction // set up a fraction
aCursor.InsertFraction(); aCursor.InsertFraction();
aCursor.Move(pOutputDevice, MoveDown); aCursor.Move(pOutputDevice, MoveDown);
aCursor.InsertText("2"); aCursor.InsertText(u"2"_ustr);
sExpected += "- { 1 over 2 }"; sExpected += "- { 1 over 2 }";
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected, CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected,
@ -569,25 +569,25 @@ void Test::testBinHorInSubSup()
ScopedVclPtrInstance<VirtualDevice> pOutputDevice; ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
// Insert an RSup expression with a BinHor for the exponent // Insert an RSup expression with a BinHor for the exponent
aCursor.InsertText("a"); aCursor.InsertText(u"a"_ustr);
aCursor.InsertSubSup(RSUP); aCursor.InsertSubSup(RSUP);
aCursor.InsertText("b"); aCursor.InsertText(u"b"_ustr);
aCursor.InsertElement(PlusElement); aCursor.InsertElement(PlusElement);
aCursor.InsertText("c"); aCursor.InsertText(u"c"_ustr);
// Move to the end and add d to the expression // Move to the end and add d to the expression
aCursor.Move(pOutputDevice, MoveRight); aCursor.Move(pOutputDevice, MoveRight);
aCursor.InsertElement(PlusElement); aCursor.InsertElement(PlusElement);
aCursor.InsertText("d"); aCursor.InsertText(u"d"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", OUString("{ a ^ { b + c } + d }"), CPPUNIT_ASSERT_EQUAL_MESSAGE("BinHor in SubSup", u"{ a ^ { b + c } + d }"_ustr,
xDocShRef->GetText()); xDocShRef->GetText());
} }
void Test::testUnaryInMixedNumberAsNumerator() void Test::testUnaryInMixedNumberAsNumerator()
{ {
// set up a unary operator // set up a unary operator
auto pTree = SmParser5().Parse("- 1"); auto pTree = SmParser5().Parse(u"- 1"_ustr);
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0); pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
SmCursor aCursor(pTree.get(), xDocShRef.get()); SmCursor aCursor(pTree.get(), xDocShRef.get());
@ -604,13 +604,13 @@ void Test::testUnaryInMixedNumberAsNumerator()
// Set up a fraction // Set up a fraction
aCursor.InsertFraction(); aCursor.InsertFraction();
aCursor.Move(pOutputDevice, MoveDown); aCursor.Move(pOutputDevice, MoveDown);
aCursor.InsertText("2"); aCursor.InsertText(u"2"_ustr);
// Move left and turn this into a mixed number // Move left and turn this into a mixed number
// (bad form, but this could happen right?) // (bad form, but this could happen right?)
aCursor.Move(pOutputDevice, MoveLeft); aCursor.Move(pOutputDevice, MoveLeft);
aCursor.Move(pOutputDevice, MoveLeft); aCursor.Move(pOutputDevice, MoveLeft);
aCursor.InsertText("2"); aCursor.InsertText(u"2"_ustr);
// move forward (more than) enough places to be at the end // move forward (more than) enough places to be at the end
for (size_t i = 0; i < 8; ++i) for (size_t i = 0; i < 8; ++i)
@ -618,10 +618,10 @@ void Test::testUnaryInMixedNumberAsNumerator()
// add 4 to the end // add 4 to the end
aCursor.InsertElement(PlusElement); aCursor.InsertElement(PlusElement);
aCursor.InsertText("4"); aCursor.InsertText(u"4"_ustr);
CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator", CPPUNIT_ASSERT_EQUAL_MESSAGE("Unary in mixed number as Numerator",
OUString("{ 2 { { - 1 over 2 } + 4 } }"), xDocShRef->GetText()); u"{ 2 { { - 1 over 2 } + 4 } }"_ustr, xDocShRef->GetText());
} }
void Test::testMiscEquivalent() void Test::testMiscEquivalent()

View File

@ -63,7 +63,7 @@ void ParseTest::tearDown()
*/ */
void ParseTest::testMinus() void ParseTest::testMinus()
{ {
auto pNode = SmParser5().Parse("-1.2"); auto pNode = SmParser5().Parse(u"-1.2"_ustr);
CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes()); CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes());
const SmNode *pNode0 = pNode->GetSubNode(0); const SmNode *pNode0 = pNode->GetSubNode(0);
CPPUNIT_ASSERT(pNode0); CPPUNIT_ASSERT(pNode0);
@ -79,14 +79,14 @@ void ParseTest::testMinus()
// GetText() vs GetToken().aText // GetText() vs GetToken().aText
CPPUNIT_ASSERT_EQUAL(OUString(MS_MINUS), CPPUNIT_ASSERT_EQUAL(OUString(MS_MINUS),
static_cast<const SmMathSymbolNode *>(pNode000)->GetText()); static_cast<const SmMathSymbolNode *>(pNode000)->GetText());
CPPUNIT_ASSERT_EQUAL(OUString("-"), CPPUNIT_ASSERT_EQUAL(u"-"_ustr,
static_cast<const SmMathSymbolNode *>(pNode000)->GetToken().aText); static_cast<const SmMathSymbolNode *>(pNode000)->GetToken().aText);
const SmNode *pNode001 = pNode00->GetSubNode(1); const SmNode *pNode001 = pNode00->GetSubNode(1);
CPPUNIT_ASSERT(pNode001); CPPUNIT_ASSERT(pNode001);
CPPUNIT_ASSERT_EQUAL(SmNodeType::Text, pNode001->GetType()); CPPUNIT_ASSERT_EQUAL(SmNodeType::Text, pNode001->GetType());
// GetText() vs GetToken().aText // GetText() vs GetToken().aText
CPPUNIT_ASSERT(static_cast<const SmTextNode *>(pNode001)->GetText().isEmpty()); CPPUNIT_ASSERT(static_cast<const SmTextNode *>(pNode001)->GetText().isEmpty());
CPPUNIT_ASSERT_EQUAL(OUString("1.2"), CPPUNIT_ASSERT_EQUAL(u"1.2"_ustr,
static_cast<const SmTextNode *>(pNode001)->GetToken().aText); static_cast<const SmTextNode *>(pNode001)->GetToken().aText);
} }
@ -96,7 +96,7 @@ void ParseTest::testMinus()
*/ */
void ParseTest::testNospace() void ParseTest::testNospace()
{ {
auto pNode = SmParser5().Parse("nospace{ nitalic d {F(x) G(x)} }"); auto pNode = SmParser5().Parse(u"nospace{ nitalic d {F(x) G(x)} }"_ustr);
CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes()); CPPUNIT_ASSERT_EQUAL(size_t(1), pNode->GetNumSubNodes());
const SmNode *pNode0 = pNode->GetSubNode(0); const SmNode *pNode0 = pNode->GetSubNode(0);
CPPUNIT_ASSERT(pNode0); CPPUNIT_ASSERT(pNode0);
@ -110,7 +110,7 @@ void ParseTest::testNospace()
const SmNode *pNode000 = pNode00->GetSubNode(0); const SmNode *pNode000 = pNode00->GetSubNode(0);
CPPUNIT_ASSERT(pNode000); CPPUNIT_ASSERT(pNode000);
CPPUNIT_ASSERT_EQUAL(SmNodeType::Font, pNode000->GetType()); CPPUNIT_ASSERT_EQUAL(SmNodeType::Font, pNode000->GetType());
CPPUNIT_ASSERT_EQUAL(OUString("nitalic"), CPPUNIT_ASSERT_EQUAL(u"nitalic"_ustr,
static_cast<const SmFontNode *>(pNode000)->GetToken().aText); static_cast<const SmFontNode *>(pNode000)->GetToken().aText);
const SmNode *pNode001 = pNode00->GetSubNode(1); const SmNode *pNode001 = pNode00->GetSubNode(1);
CPPUNIT_ASSERT(pNode001); CPPUNIT_ASSERT(pNode001);

View File

@ -148,7 +148,7 @@ void Test::testSmTmpDeviceRestoreFont()
{ {
ScopedVclPtrInstance<Printer> pPrinter; ScopedVclPtrInstance<Printer> pPrinter;
OUString aFontName("Linux Libertine G"); OUString aFontName(u"Linux Libertine G"_ustr);
CPPUNIT_ASSERT(pPrinter->IsFontAvailable(aFontName)); CPPUNIT_ASSERT(pPrinter->IsFontAvailable(aFontName));
vcl::Font aOriginalFont = pPrinter->GetFont(); vcl::Font aOriginalFont = pPrinter->GetFont();
@ -178,7 +178,7 @@ void Test::editMarker()
{ {
SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow(); SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow();
{ {
OUString sMarkedText("<?> under <?> under <?>"); OUString sMarkedText(u"<?> under <?> under <?>"_ustr);
rEditWindow.SetText(sMarkedText); rEditWindow.SetText(sMarkedText);
rEditWindow.Flush(); rEditWindow.Flush();
OUString sFinalText = rEditWindow.GetText(); OUString sFinalText = rEditWindow.GetText();
@ -190,12 +190,12 @@ void Test::editMarker()
rEditWindow.SelNextMark(); rEditWindow.SelNextMark();
rEditWindow.Delete(); rEditWindow.Delete();
rEditWindow.InsertText("a"); rEditWindow.InsertText(u"a"_ustr);
rEditWindow.SelNextMark(); rEditWindow.SelNextMark();
rEditWindow.SelNextMark(); rEditWindow.SelNextMark();
rEditWindow.Delete(); rEditWindow.Delete();
rEditWindow.InsertText("c"); rEditWindow.InsertText(u"c"_ustr);
// should be safe i.e. do nothing // should be safe i.e. do nothing
rEditWindow.SelNextMark(); rEditWindow.SelNextMark();
@ -207,7 +207,7 @@ void Test::editMarker()
rEditWindow.SelPrevMark(); rEditWindow.SelPrevMark();
rEditWindow.Delete(); rEditWindow.Delete();
rEditWindow.InsertText("b"); rEditWindow.InsertText(u"b"_ustr);
// tdf#106116: should be safe i.e. do nothing // tdf#106116: should be safe i.e. do nothing
rEditWindow.SelPrevMark(); rEditWindow.SelPrevMark();
@ -219,7 +219,7 @@ void Test::editMarker()
rEditWindow.Flush(); rEditWindow.Flush();
OUString sFinalText = rEditWindow.GetText(); OUString sFinalText = rEditWindow.GetText();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be a under b under c", OUString("a under b under c"), sFinalText); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be a under b under c", u"a under b under c"_ustr, sFinalText);
} }
{ {
@ -230,7 +230,7 @@ void Test::editMarker()
void Test::editFailure() void Test::editFailure()
{ {
m_xDocShRef->SetText("color a b over {a/}"); m_xDocShRef->SetText(u"color a b over {a/}"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
@ -263,7 +263,7 @@ void Test::editFailure()
void Test::ParseErrorUnexpectedToken() void Test::ParseErrorUnexpectedToken()
{ {
m_xDocShRef->SetText("\\foo"); m_xDocShRef->SetText(u"\\foo"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::UnexpectedToken expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::UnexpectedToken expected",
@ -272,7 +272,7 @@ void Test::ParseErrorUnexpectedToken()
void Test::ParseErrorPoundExpected() void Test::ParseErrorPoundExpected()
{ {
m_xDocShRef->SetText("matrix {1#2##a##b#c}"); m_xDocShRef->SetText(u"matrix {1#2##a##b#c}"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::PoundExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::PoundExpected expected",
@ -281,7 +281,7 @@ void Test::ParseErrorPoundExpected()
void Test::ParseErrorColorExpected() void Test::ParseErrorColorExpected()
{ {
m_xDocShRef->SetText("color 42 x"); m_xDocShRef->SetText(u"color 42 x"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ColorExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ColorExpected expected",
@ -290,7 +290,7 @@ void Test::ParseErrorColorExpected()
void Test::ParseErrorLgroupExpected() void Test::ParseErrorLgroupExpected()
{ {
m_xDocShRef->SetText("stack 42"); m_xDocShRef->SetText(u"stack 42"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LgroupExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LgroupExpected expected",
@ -299,7 +299,7 @@ void Test::ParseErrorLgroupExpected()
void Test::ParseErrorRgroupExpected() void Test::ParseErrorRgroupExpected()
{ {
m_xDocShRef->SetText("stack {a#b#c)"); m_xDocShRef->SetText(u"stack {a#b#c)"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RgroupExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RgroupExpected expected",
@ -308,7 +308,7 @@ void Test::ParseErrorRgroupExpected()
void Test::ParseErrorLbraceExpected() void Test::ParseErrorLbraceExpected()
{ {
m_xDocShRef->SetText("left 42"); m_xDocShRef->SetText(u"left 42"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LbraceExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LbraceExpected expected",
@ -317,7 +317,7 @@ void Test::ParseErrorLbraceExpected()
void Test::ParseErrorRbraceExpected() void Test::ParseErrorRbraceExpected()
{ {
m_xDocShRef->SetText("left ( foo right x"); m_xDocShRef->SetText(u"left ( foo right x"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RbraceExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RbraceExpected expected",
@ -326,7 +326,7 @@ void Test::ParseErrorRbraceExpected()
void Test::ParseErrorParentMismatch() void Test::ParseErrorParentMismatch()
{ {
m_xDocShRef->SetText("lbrace foo rceil"); m_xDocShRef->SetText(u"lbrace foo rceil"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ParentMismatch expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ParentMismatch expected",
@ -335,7 +335,7 @@ void Test::ParseErrorParentMismatch()
void Test::ParseErrorRightExpected() void Test::ParseErrorRightExpected()
{ {
m_xDocShRef->SetText("left ( x mline y )"); m_xDocShRef->SetText(u"left ( x mline y )"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RightExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RightExpected expected",
@ -344,7 +344,7 @@ void Test::ParseErrorRightExpected()
void Test::ParseErrorFontExpected() void Test::ParseErrorFontExpected()
{ {
m_xDocShRef->SetText("font small bar"); m_xDocShRef->SetText(u"font small bar"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::FontExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::FontExpected expected",
@ -353,7 +353,7 @@ void Test::ParseErrorFontExpected()
void Test::ParseErrorSizeExpected() void Test::ParseErrorSizeExpected()
{ {
m_xDocShRef->SetText("size small baz"); m_xDocShRef->SetText(u"size small baz"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::SizeExpected expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::SizeExpected expected",
@ -362,7 +362,7 @@ void Test::ParseErrorSizeExpected()
void Test::ParseErrorDoubleAlign() void Test::ParseErrorDoubleAlign()
{ {
m_xDocShRef->SetText("alignl alignc x"); m_xDocShRef->SetText(u"alignl alignc x"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleAlign expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleAlign expected",
@ -371,7 +371,7 @@ void Test::ParseErrorDoubleAlign()
void Test::ParseErrorDoubleSubsupscript() void Test::ParseErrorDoubleSubsupscript()
{ {
m_xDocShRef->SetText("x_y_z"); m_xDocShRef->SetText(u"x_y_z"_ustr);
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError(); const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
CPPUNIT_ASSERT(pErrorDesc); CPPUNIT_ASSERT(pErrorDesc);
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleSubsupscript expected", CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleSubsupscript expected",
@ -382,7 +382,7 @@ void Test::editUndoRedo()
{ {
EditEngine &rEditEngine = m_xDocShRef->GetEditEngine(); EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
OUString sStringOne("a under b"); OUString sStringOne(u"a under b"_ustr);
{ {
rEditEngine.SetText(0, sStringOne); rEditEngine.SetText(0, sStringOne);
m_xDocShRef->UpdateText(); m_xDocShRef->UpdateText();
@ -391,7 +391,7 @@ void Test::editUndoRedo()
} }
{ {
OUString sStringTwo("a over b"); OUString sStringTwo(u"a over b"_ustr);
rEditEngine.SetText(0, sStringTwo); rEditEngine.SetText(0, sStringTwo);
m_xDocShRef->UpdateText(); m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText(); OUString sFinalText = m_xDocShRef->GetText();
@ -437,11 +437,11 @@ void Test::replacePlaceholder()
SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow(); SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow();
// Test the placeholder replacement. In this case, testing 'a + b', it // Test the placeholder replacement. In this case, testing 'a + b', it
// should return '+a + b' when selecting '+<?>' in ElementsDock // should return '+a + b' when selecting '+<?>' in ElementsDock
rEditWindow.SetText("a + b"); rEditWindow.SetText(u"a + b"_ustr);
rEditWindow.SelectAll(); rEditWindow.SelectAll();
rEditWindow.InsertText("+<?>"); rEditWindow.InsertText(u"+<?>"_ustr);
OUString sFinalText = rEditWindow.GetText(); OUString sFinalText = rEditWindow.GetText();
CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be '+a + b'", OUString("+a + b"), sFinalText); CPPUNIT_ASSERT_EQUAL_MESSAGE("Should be '+a + b'", u"+a + b"_ustr, sFinalText);
} }
void Test::viewZoom() void Test::viewZoom()
@ -451,7 +451,7 @@ void Test::viewZoom()
EditEngine &rEditEngine = m_xDocShRef->GetEditEngine(); EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
{ {
OUString sStringOne("a under b"); OUString sStringOne(u"a under b"_ustr);
rEditEngine.SetText(0, sStringOne); rEditEngine.SetText(0, sStringOne);
m_xDocShRef->UpdateText(); m_xDocShRef->UpdateText();
OUString sFinalText = m_xDocShRef->GetText(); OUString sFinalText = m_xDocShRef->GetText();

View File

@ -24,7 +24,7 @@ class MathMLExportTest : public UnoApiXmlTest
{ {
public: public:
MathMLExportTest() MathMLExportTest()
: UnoApiXmlTest("starmath/qa/extras/data/") : UnoApiXmlTest(u"starmath/qa/extras/data/"_ustr)
{ {
} }
@ -55,27 +55,27 @@ void MathMLExportTest::registerNamespaces(xmlXPathContextPtr& pXmlXPathCtx)
void MathMLExportTest::testBlank() void MathMLExportTest::testBlank()
{ {
mxComponent = loadFromDesktop("private:factory/smath"); mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText("x`y~~z"); pDocShell->SetText(u"x`y~~z"_ustr);
save("MathML XML (Math)"); save(u"MathML XML (Math)"_ustr);
xmlDocUniquePtr pDoc = parseXml(maTempFile); xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc); CPPUNIT_ASSERT(pDoc);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[1]"_ostr, "width"_ostr, "0.5em"); assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[1]"_ostr, "width"_ostr, u"0.5em"_ustr);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[2]"_ostr, "width"_ostr, "4em"); assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mspace[2]"_ostr, "width"_ostr, u"4em"_ustr);
} }
void MathMLExportTest::testTdf97049() void MathMLExportTest::testTdf97049()
{ {
mxComponent = loadFromDesktop("private:factory/smath"); mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText("intd {{1 over x} dx}"); pDocShell->SetText(u"intd {{1 over x} dx}"_ustr);
save("MathML XML (Math)"); save(u"MathML XML (Math)"_ustr);
xmlDocUniquePtr pDoc = parseXml(maTempFile); xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc); CPPUNIT_ASSERT(pDoc);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]"_ostr, "stretchy"_ostr, "true"); assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]"_ostr, "stretchy"_ostr, u"true"_ustr);
auto aContent = getXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]"_ostr); auto aContent = getXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:mo[1]"_ostr);
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aContent.getLength()); CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aContent.getLength());
CPPUNIT_ASSERT_EQUAL(u'\x222B', aContent[0]); CPPUNIT_ASSERT_EQUAL(u'\x222B', aContent[0]);
@ -83,35 +83,37 @@ void MathMLExportTest::testTdf97049()
void MathMLExportTest::checkMathVariant(SmDocShell& rDocShell, bool bCapital, bool bSmall) void MathMLExportTest::checkMathVariant(SmDocShell& rDocShell, bool bCapital, bool bSmall)
{ {
rDocShell.SetText("%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} " rDocShell.SetText(u"%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} "
"%gamma %igamma {ital %gamma} {nitalic %igamma}"); "%gamma %igamma {ital %gamma} {nitalic %igamma}"_ustr);
save("MathML XML (Math)"); save(u"MathML XML (Math)"_ustr);
xmlDocUniquePtr pDoc = parseXml(maTempFile); xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc); CPPUNIT_ASSERT(pDoc);
if (bCapital) if (bCapital)
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[1]"_ostr, "mathvariant"_ostr); assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[1]"_ostr, "mathvariant"_ostr);
else else
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mi[1]"_ostr, "mathvariant"_ostr, "normal"); assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mi[1]"_ostr, "mathvariant"_ostr,
u"normal"_ustr);
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[1]/m:mi[1]"_ostr, assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[1]/m:mi[1]"_ostr,
"mathvariant"_ostr); "mathvariant"_ostr);
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[2]"_ostr, "mathvariant"_ostr); assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[2]"_ostr, "mathvariant"_ostr);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[2]/m:mi[1]"_ostr, "mathvariant"_ostr, assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[2]/m:mi[1]"_ostr, "mathvariant"_ostr,
"normal"); u"normal"_ustr);
if (bSmall) if (bSmall)
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[3]"_ostr, "mathvariant"_ostr); assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[3]"_ostr, "mathvariant"_ostr);
else else
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mi[3]"_ostr, "mathvariant"_ostr, "normal"); assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mi[3]"_ostr, "mathvariant"_ostr,
u"normal"_ustr);
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[3]/m:mi[1]"_ostr, assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[3]/m:mi[1]"_ostr,
"mathvariant"_ostr); "mathvariant"_ostr);
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[4]"_ostr, "mathvariant"_ostr); assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[4]"_ostr, "mathvariant"_ostr);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[4]/m:mi[1]"_ostr, "mathvariant"_ostr, assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:mstyle[4]/m:mi[1]"_ostr, "mathvariant"_ostr,
"normal"); u"normal"_ustr);
rDocShell.SetText(""); rDocShell.SetText(u""_ustr);
} }
void MathMLExportTest::testTdf101022() void MathMLExportTest::testTdf101022()
{ {
mxComponent = loadFromDesktop("private:factory/smath"); mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
@ -126,27 +128,27 @@ void MathMLExportTest::testTdf101022()
void MathMLExportTest::testMaj() void MathMLExportTest::testMaj()
{ {
mxComponent = loadFromDesktop("private:factory/smath"); mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText( pDocShell->SetText(
u"maj to { \u0661 } from { \U0001EE0A = \u0660 } { \u0661 over \U0001EE0A }"_ustr); u"maj to { \u0661 } from { \U0001EE0A = \u0660 } { \u0661 over \U0001EE0A }"_ustr);
save("MathML XML (Math)"); save(u"MathML XML (Math)"_ustr);
xmlDocUniquePtr pDoc = parseXml(maTempFile); xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc); CPPUNIT_ASSERT(pDoc);
assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo"_ostr, "stretchy"_ostr, assertXPath(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo"_ostr, "stretchy"_ostr,
"false"); u"false"_ustr);
assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo"_ostr, assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mo"_ostr,
u"\U0001EEF0"_ustr); u"\U0001EEF0"_ustr);
} }
void MathMLExportTest::testHadd() void MathMLExportTest::testHadd()
{ {
mxComponent = loadFromDesktop("private:factory/smath"); mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr); pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr);
save("MathML XML (Math)"); save(u"MathML XML (Math)"_ustr);
xmlDocUniquePtr pDoc = parseXml(maTempFile); xmlDocUniquePtr pDoc = parseXml(maTempFile);
CPPUNIT_ASSERT(pDoc); CPPUNIT_ASSERT(pDoc);
assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi"_ostr, assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi"_ostr,

View File

@ -21,7 +21,7 @@ class Test : public UnoApiTest
{ {
public: public:
Test() Test()
: UnoApiTest("starmath/qa/extras/data/") : UnoApiTest(u"starmath/qa/extras/data/"_ustr)
{ {
} }
@ -61,7 +61,7 @@ void Test::testColor()
loadFromFile(u"color.mml"); loadFromFile(u"color.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL(OUString("{ color black b" CPPUNIT_ASSERT_EQUAL(u"{ color black b"
" color white w" " color white w"
" color red r" " color red r"
" color green g" " color green g"
@ -80,7 +80,7 @@ void Test::testColor()
" color crimson c" " color crimson c"
" color dvip apricot" " color dvip apricot"
" a color yellow y" " a color yellow y"
" color rgb 220 20 61 x }"), " color rgb 220 20 61 x }"_ustr,
pDocShell->GetText()); pDocShell->GetText());
} }
@ -89,7 +89,7 @@ void Test::testSimple()
loadFromFile(u"simple.mml"); loadFromFile(u"simple.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", u"left ( { a + b } right ) ^ 2"_ustr,
pDocShell->GetText()); pDocShell->GetText());
} }
@ -98,7 +98,7 @@ void Test::testNsPrefixMath()
loadFromFile(u"ns-prefix-math.mml"); loadFromFile(u"ns-prefix-math.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"), CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", u"left ( { a + b } right ) ^ 2"_ustr,
pDocShell->GetText()); pDocShell->GetText());
} }
@ -107,7 +107,7 @@ void Test::testMaction()
loadFromFile(u"maction.mml"); loadFromFile(u"maction.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix{ 1 ## 2 ## 3 }"), CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", u"matrix{ 1 ## 2 ## 3 }"_ustr,
pDocShell->GetText()); pDocShell->GetText());
} }
@ -116,7 +116,7 @@ void Test::testMspace()
loadFromFile(u"mspace.mml"); loadFromFile(u"mspace.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL(OUString("{ a b ~ c ~~``` d }"), pDocShell->GetText()); CPPUNIT_ASSERT_EQUAL(u"{ a b ~ c ~~``` d }"_ustr, pDocShell->GetText());
} }
void Test::testtdf99556() void Test::testtdf99556()
@ -124,7 +124,7 @@ void Test::testtdf99556()
loadFromFile(u"tdf99556-1.mml"); loadFromFile(u"tdf99556-1.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { }"), pDocShell->GetText()); CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", u"sqrt { }"_ustr, pDocShell->GetText());
} }
void Test::testTdf103430() void Test::testTdf103430()
@ -132,9 +132,8 @@ void Test::testTdf103430()
loadFromFile(u"tdf103430.mml"); loadFromFile(u"tdf103430.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(u"{ frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
OUString("{ frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip " "apricot nitalic d font sans bold italic color red x } } }"_ustr,
"apricot nitalic d font sans bold italic color red x } } }"),
pDocShell->GetText()); pDocShell->GetText());
} }
@ -143,9 +142,8 @@ void Test::testTdf103500()
loadFromFile(u"tdf103500.mml"); loadFromFile(u"tdf103500.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL( CPPUNIT_ASSERT_EQUAL(u"{ { int csup b csub a { { frac { 1 } { x } } ` nitalic d x } } = { "
OUString("{ { int csup b csub a { { frac { 1 } { x } } ` nitalic d x } } = { " "intd csup b csub a { { frac { 1 } { y } } ` nitalic d y } } }"_ustr,
"intd csup b csub a { { frac { 1 } { y } } ` nitalic d y } } }"),
pDocShell->GetText()); pDocShell->GetText());
} }
@ -155,7 +153,7 @@ void Test::testTdf137008()
loadFromFile(u"tdf137008.mml"); loadFromFile(u"tdf137008.mml");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL(OUString("matrix{ { } # ## # }"), pDocShell->GetText()); CPPUNIT_ASSERT_EQUAL(u"matrix{ { } # ## # }"_ustr, pDocShell->GetText());
} }
void Test::testTdf151842() void Test::testTdf151842()
@ -164,7 +162,7 @@ void Test::testTdf151842()
loadFromFile(u"tdf151842.odf"); loadFromFile(u"tdf151842.odf");
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get()); SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell()); SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
CPPUNIT_ASSERT_EQUAL(OUString("test"), pDocShell->GetText()); CPPUNIT_ASSERT_EQUAL(u"test"_ustr, pDocShell->GetText());
SmFormat aFormat = pDocShell->GetFormat(); SmFormat aFormat = pDocShell->GetFormat();
// Without the fix in place, this test would have failed with // Without the fix in place, this test would have failed with

View File

@ -41,10 +41,12 @@ std::unique_ptr<PanelLayout> SmElementsPanel::Create(weld::Widget& rParent,
} }
SmElementsPanel::SmElementsPanel(weld::Widget& rParent, const SfxBindings& rBindings) SmElementsPanel::SmElementsPanel(weld::Widget& rParent, const SfxBindings& rBindings)
: PanelLayout(&rParent, "MathElementsPanel", "modules/smath/ui/sidebarelements_math.ui") : PanelLayout(&rParent, u"MathElementsPanel"_ustr,
u"modules/smath/ui/sidebarelements_math.ui"_ustr)
, mrBindings(rBindings) , mrBindings(rBindings)
, mxCategoryList(m_xBuilder->weld_combo_box("categorylist")) , mxCategoryList(m_xBuilder->weld_combo_box(u"categorylist"_ustr))
, mxElementsControl(std::make_unique<SmElementsControl>(m_xBuilder->weld_icon_view("elements"))) , mxElementsControl(
std::make_unique<SmElementsControl>(m_xBuilder->weld_icon_view(u"elements"_ustr)))
{ {
for (const auto& rCategoryId : SmElementsControl::categories()) for (const auto& rCategoryId : SmElementsControl::categories())
mxCategoryList->append_text(SmResId(rCategoryId)); mxCategoryList->append_text(SmResId(rCategoryId));

View File

@ -62,10 +62,12 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
try try
{ {
const comphelper::NamedValueCollection aArguments(Arguments); const comphelper::NamedValueCollection aArguments(Arguments);
auto xFrame(aArguments.getOrDefault("Frame", css::uno::Reference<css::frame::XFrame>())); auto xFrame(
auto xParentWindow( aArguments.getOrDefault(u"Frame"_ustr, css::uno::Reference<css::frame::XFrame>()));
aArguments.getOrDefault("ParentWindow", css::uno::Reference<css::awt::XWindow>())); auto xParentWindow(aArguments.getOrDefault(u"ParentWindow"_ustr,
const sal_uInt64 nBindingsValue(aArguments.getOrDefault("SfxBindings", sal_uInt64(0))); css::uno::Reference<css::awt::XWindow>()));
const sal_uInt64 nBindingsValue(
aArguments.getOrDefault(u"SfxBindings"_ustr, sal_uInt64(0)));
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue); SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
weld::Widget* pParent(nullptr); weld::Widget* pParent(nullptr);
@ -73,11 +75,13 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
pParent = pTunnel->getWidget(); pParent = pTunnel->getWidget();
if (!pParent) if (!pParent)
throw css::uno::RuntimeException("SmPanelFactory::createUIElement: no ParentWindow"); throw css::uno::RuntimeException(
u"SmPanelFactory::createUIElement: no ParentWindow"_ustr);
if (!xFrame) if (!xFrame)
throw css::uno::RuntimeException("SmPanelFactory::createUIElement: no Frame"); throw css::uno::RuntimeException(u"SmPanelFactory::createUIElement: no Frame"_ustr);
if (!pBindings) if (!pBindings)
throw css::uno::RuntimeException("SmPanelFactory::createUIElement: no SfxBindings"); throw css::uno::RuntimeException(
u"SmPanelFactory::createUIElement: no SfxBindings"_ustr);
std::unique_ptr<PanelLayout> pPanel; std::unique_ptr<PanelLayout> pPanel;
css::ui::LayoutSize aLayoutSize{ -1, -1, -1 }; css::ui::LayoutSize aLayoutSize{ -1, -1, -1 };
@ -102,8 +106,8 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
catch (const css::uno::Exception&) catch (const css::uno::Exception&)
{ {
css::uno::Any anyEx = cppu::getCaughtException(); css::uno::Any anyEx = cppu::getCaughtException();
throw css::lang::WrappedTargetRuntimeException("SmPanelFactory::createUIElement exception", throw css::lang::WrappedTargetRuntimeException(
nullptr, anyEx); u"SmPanelFactory::createUIElement exception"_ustr, nullptr, anyEx);
} }
return {}; return {};
@ -111,7 +115,7 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
OUString SmPanelFactory::getImplementationName() OUString SmPanelFactory::getImplementationName()
{ {
return "org.libreoffice.comp.Math.sidebar.SmPanelFactory"; return u"org.libreoffice.comp.Math.sidebar.SmPanelFactory"_ustr;
} }
sal_Bool SmPanelFactory::supportsService(OUString const& ServiceName) sal_Bool SmPanelFactory::supportsService(OUString const& ServiceName)
@ -121,7 +125,7 @@ sal_Bool SmPanelFactory::supportsService(OUString const& ServiceName)
css::uno::Sequence<OUString> SmPanelFactory::getSupportedServiceNames() css::uno::Sequence<OUString> SmPanelFactory::getSupportedServiceNames()
{ {
return { "com.sun.star.ui.UIElementFactory" }; return { u"com.sun.star.ui.UIElementFactory"_ustr };
} }
} // end of unnamed namespace } // end of unnamed namespace

View File

@ -41,12 +41,13 @@ SmPropertiesPanel::Create(weld::Widget& rParent,
SmPropertiesPanel::SmPropertiesPanel(weld::Widget& rParent, SmPropertiesPanel::SmPropertiesPanel(weld::Widget& rParent,
const css::uno::Reference<css::frame::XFrame>& xFrame) const css::uno::Reference<css::frame::XFrame>& xFrame)
: PanelLayout(&rParent, "MathPropertiesPanel", "modules/smath/ui/sidebarproperties_math.ui") : PanelLayout(&rParent, u"MathPropertiesPanel"_ustr,
u"modules/smath/ui/sidebarproperties_math.ui"_ustr)
, mxFrame(xFrame) , mxFrame(xFrame)
, mpFormatFontsButton(m_xBuilder->weld_button("btnFormatFonts")) , mpFormatFontsButton(m_xBuilder->weld_button(u"btnFormatFonts"_ustr))
, mpFormatFontSizeButton(m_xBuilder->weld_button("btnFormatFontSize")) , mpFormatFontSizeButton(m_xBuilder->weld_button(u"btnFormatFontSize"_ustr))
, mpFormatSpacingButton(m_xBuilder->weld_button("btnFormatSpacing")) , mpFormatSpacingButton(m_xBuilder->weld_button(u"btnFormatSpacing"_ustr))
, mpFormatAlignmentButton(m_xBuilder->weld_button("btnFormatAlignment")) , mpFormatAlignmentButton(m_xBuilder->weld_button(u"btnFormatAlignment"_ustr))
, maButtonCommands{ { mpFormatFontsButton.get(), ".uno:ChangeFont" }, , maButtonCommands{ { mpFormatFontsButton.get(), ".uno:ChangeFont" },
{ mpFormatFontSizeButton.get(), ".uno:ChangeFontSize" }, { mpFormatFontSizeButton.get(), ".uno:ChangeFontSize" },
{ mpFormatSpacingButton.get(), ".uno:ChangeDistance" }, { mpFormatSpacingButton.get(), ".uno:ChangeDistance" },
@ -56,12 +57,13 @@ SmPropertiesPanel::SmPropertiesPanel(weld::Widget& rParent,
auto xConfs auto xConfs
= css::frame::theUICommandDescription::get(comphelper::getProcessComponentContext()); = css::frame::theUICommandDescription::get(comphelper::getProcessComponentContext());
if (css::uno::Reference<css::container::XNameAccess> xConf{ if (css::uno::Reference<css::container::XNameAccess> xConf{
xConfs->getByName("com.sun.star.formula.FormulaProperties"), css::uno::UNO_QUERY }) xConfs->getByName(u"com.sun.star.formula.FormulaProperties"_ustr),
css::uno::UNO_QUERY })
{ {
for (const auto & [ button, command ] : maButtonCommands) for (const auto & [ button, command ] : maButtonCommands)
{ {
comphelper::SequenceAsHashMap props(xConf->getByName(command)); comphelper::SequenceAsHashMap props(xConf->getByName(command));
button->set_label(props.getUnpackedValueOrDefault("Name", button->get_label())); button->set_label(props.getUnpackedValueOrDefault(u"Name"_ustr, button->get_label()));
} }
} }

View File

@ -723,7 +723,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::scrollSubstringTo( sal_Int32, sal_Int32,
OUString SAL_CALL SmGraphicAccessible::getImplementationName() OUString SAL_CALL SmGraphicAccessible::getImplementationName()
{ {
return "SmGraphicAccessible"; return u"SmGraphicAccessible"_ustr;
} }
sal_Bool SAL_CALL SmGraphicAccessible::supportsService( sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
@ -735,10 +735,10 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames() Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
{ {
return { return {
"css::accessibility::Accessible", u"css::accessibility::Accessible"_ustr,
"css::accessibility::AccessibleComponent", u"css::accessibility::AccessibleComponent"_ustr,
"css::accessibility::AccessibleContext", u"css::accessibility::AccessibleContext"_ustr,
"css::accessibility::AccessibleText" u"css::accessibility::AccessibleText"_ustr
}; };
} }

View File

@ -48,41 +48,41 @@ constexpr OUString FONT_FORMAT_LIST = u"FontFormatList"_ustr;
static Sequence< OUString > lcl_GetFontPropertyNames() static Sequence< OUString > lcl_GetFontPropertyNames()
{ {
return Sequence< OUString > { return Sequence< OUString > {
"Name", u"Name"_ustr,
"CharSet", u"CharSet"_ustr,
"Family", u"Family"_ustr,
"Pitch", u"Pitch"_ustr,
"Weight", u"Weight"_ustr,
"Italic" u"Italic"_ustr
}; };
} }
static Sequence< OUString > lcl_GetSymbolPropertyNames() static Sequence< OUString > lcl_GetSymbolPropertyNames()
{ {
return Sequence< OUString > { return Sequence< OUString > {
"Char", u"Char"_ustr,
"Set", u"Set"_ustr,
"Predefined", u"Predefined"_ustr,
"FontFormatId" u"FontFormatId"_ustr
}; };
} }
static Sequence<OUString> lcl_GetOtherPropertyNames() static Sequence<OUString> lcl_GetOtherPropertyNames()
{ {
return Sequence<OUString>{ "LoadSave/IsSaveOnlyUsedSymbols", return Sequence<OUString>{ u"LoadSave/IsSaveOnlyUsedSymbols"_ustr,
"Misc/AutoCloseBrackets", u"Misc/AutoCloseBrackets"_ustr,
"Misc/DefaultSmSyntaxVersion", u"Misc/DefaultSmSyntaxVersion"_ustr,
"Misc/IgnoreSpacesRight", u"Misc/IgnoreSpacesRight"_ustr,
"Misc/InlineEditEnable", u"Misc/InlineEditEnable"_ustr,
"Misc/SmEditWindowZoomFactor", u"Misc/SmEditWindowZoomFactor"_ustr,
"Print/FormulaText", u"Print/FormulaText"_ustr,
"Print/Frame", u"Print/Frame"_ustr,
"Print/Size", u"Print/Size"_ustr,
"Print/Title", u"Print/Title"_ustr,
"Print/ZoomFactor", u"Print/ZoomFactor"_ustr,
"View/AutoRedraw", u"View/AutoRedraw"_ustr,
"View/FormulaCursor", u"View/FormulaCursor"_ustr,
"View/ToolboxVisible" }; u"View/ToolboxVisible"_ustr };
} }
static Sequence< OUString > lcl_GetFormatPropertyNames() static Sequence< OUString > lcl_GetFormatPropertyNames()
@ -90,48 +90,48 @@ static Sequence< OUString > lcl_GetFormatPropertyNames()
//! Beware of order according to *_BEGIN *_END defines in format.hxx ! //! Beware of order according to *_BEGIN *_END defines in format.hxx !
//! see respective load/save routines here //! see respective load/save routines here
return Sequence< OUString > { return Sequence< OUString > {
"StandardFormat/Textmode", u"StandardFormat/Textmode"_ustr,
"StandardFormat/RightToLeft", u"StandardFormat/RightToLeft"_ustr,
"StandardFormat/GreekCharStyle", u"StandardFormat/GreekCharStyle"_ustr,
"StandardFormat/ScaleNormalBracket", u"StandardFormat/ScaleNormalBracket"_ustr,
"StandardFormat/HorizontalAlignment", u"StandardFormat/HorizontalAlignment"_ustr,
"StandardFormat/BaseSize", u"StandardFormat/BaseSize"_ustr,
"StandardFormat/TextSize", u"StandardFormat/TextSize"_ustr,
"StandardFormat/IndexSize", u"StandardFormat/IndexSize"_ustr,
"StandardFormat/FunctionSize", u"StandardFormat/FunctionSize"_ustr,
"StandardFormat/OperatorSize", u"StandardFormat/OperatorSize"_ustr,
"StandardFormat/LimitsSize", u"StandardFormat/LimitsSize"_ustr,
"StandardFormat/Distance/Horizontal", u"StandardFormat/Distance/Horizontal"_ustr,
"StandardFormat/Distance/Vertical", u"StandardFormat/Distance/Vertical"_ustr,
"StandardFormat/Distance/Root", u"StandardFormat/Distance/Root"_ustr,
"StandardFormat/Distance/SuperScript", u"StandardFormat/Distance/SuperScript"_ustr,
"StandardFormat/Distance/SubScript", u"StandardFormat/Distance/SubScript"_ustr,
"StandardFormat/Distance/Numerator", u"StandardFormat/Distance/Numerator"_ustr,
"StandardFormat/Distance/Denominator", u"StandardFormat/Distance/Denominator"_ustr,
"StandardFormat/Distance/Fraction", u"StandardFormat/Distance/Fraction"_ustr,
"StandardFormat/Distance/StrokeWidth", u"StandardFormat/Distance/StrokeWidth"_ustr,
"StandardFormat/Distance/UpperLimit", u"StandardFormat/Distance/UpperLimit"_ustr,
"StandardFormat/Distance/LowerLimit", u"StandardFormat/Distance/LowerLimit"_ustr,
"StandardFormat/Distance/BracketSize", u"StandardFormat/Distance/BracketSize"_ustr,
"StandardFormat/Distance/BracketSpace", u"StandardFormat/Distance/BracketSpace"_ustr,
"StandardFormat/Distance/MatrixRow", u"StandardFormat/Distance/MatrixRow"_ustr,
"StandardFormat/Distance/MatrixColumn", u"StandardFormat/Distance/MatrixColumn"_ustr,
"StandardFormat/Distance/OrnamentSize", u"StandardFormat/Distance/OrnamentSize"_ustr,
"StandardFormat/Distance/OrnamentSpace", u"StandardFormat/Distance/OrnamentSpace"_ustr,
"StandardFormat/Distance/OperatorSize", u"StandardFormat/Distance/OperatorSize"_ustr,
"StandardFormat/Distance/OperatorSpace", u"StandardFormat/Distance/OperatorSpace"_ustr,
"StandardFormat/Distance/LeftSpace", u"StandardFormat/Distance/LeftSpace"_ustr,
"StandardFormat/Distance/RightSpace", u"StandardFormat/Distance/RightSpace"_ustr,
"StandardFormat/Distance/TopSpace", u"StandardFormat/Distance/TopSpace"_ustr,
"StandardFormat/Distance/BottomSpace", u"StandardFormat/Distance/BottomSpace"_ustr,
"StandardFormat/Distance/NormalBracketSize", u"StandardFormat/Distance/NormalBracketSize"_ustr,
"StandardFormat/VariableFont", u"StandardFormat/VariableFont"_ustr,
"StandardFormat/FunctionFont", u"StandardFormat/FunctionFont"_ustr,
"StandardFormat/NumberFont", u"StandardFormat/NumberFont"_ustr,
"StandardFormat/TextFont", u"StandardFormat/TextFont"_ustr,
"StandardFormat/SerifFont", u"StandardFormat/SerifFont"_ustr,
"StandardFormat/SansFont", u"StandardFormat/SansFont"_ustr,
"StandardFormat/FixedFont" u"StandardFormat/FixedFont"_ustr
}; };
} }
@ -359,7 +359,7 @@ OUString SmFontFormatList::GetNewFontFormatId() const
SmMathConfig::SmMathConfig() : SmMathConfig::SmMathConfig() :
ConfigItem("Office.Math") ConfigItem(u"Office.Math"_ustr)
, bIsOtherModified(false) , bIsOtherModified(false)
, bIsFormatModified(false) , bIsFormatModified(false)
{ {
@ -392,7 +392,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames(); Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
sal_Int32 nProps = aNames.getLength(); sal_Int32 nProps = aNames.getLength();
OUString aDelim( "/" ); OUString aDelim( u"/"_ustr );
for (auto& rName : asNonConstRange(aNames)) for (auto& rName : asNonConstRange(aNames))
rName = rBaseNode + aDelim + rSymbolName + aDelim + rName; rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
@ -532,7 +532,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
PropertyValue *pValues = aValues.getArray(); PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues; PropertyValue *pVal = pValues;
OUString aDelim( "/" ); OUString aDelim( u"/"_ustr );
for (const SmSym& rSymbol : rNewSymbols) for (const SmSym& rSymbol : rNewSymbols)
{ {
OUString aNodeNameDelim = SYMBOL_LIST + OUString aNodeNameDelim = SYMBOL_LIST +
@ -612,7 +612,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
Sequence< OUString > aNames = lcl_GetFontPropertyNames(); Sequence< OUString > aNames = lcl_GetFontPropertyNames();
sal_Int32 nProps = aNames.getLength(); sal_Int32 nProps = aNames.getLength();
OUString aDelim( "/" ); OUString aDelim( u"/"_ustr );
for (auto& rName : asNonConstRange(aNames)) for (auto& rName : asNonConstRange(aNames))
rName = rBaseNode + aDelim + rSymbolName + aDelim + rName; rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
@ -678,7 +678,7 @@ void SmMathConfig::SaveFontFormatList()
PropertyValue *pValues = aValues.getArray(); PropertyValue *pValues = aValues.getArray();
PropertyValue *pVal = pValues; PropertyValue *pVal = pValues;
OUString aDelim( "/" ); OUString aDelim( u"/"_ustr );
for (size_t i = 0; i < nCount; ++i) for (size_t i = 0; i < nCount; ++i)
{ {
OUString aFntFmtId(rFntFmtList.GetFontFormatId(i)); OUString aFntFmtId(rFntFmtList.GetFontFormatId(i));

View File

@ -643,7 +643,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
pSelectedNodesList.reset(); pSelectedNodesList.reset();
//Create SmBraceNode //Create SmBraceNode
SmToken aTok(TLEFT, '\0', "left", TG::NONE, 5); SmToken aTok(TLEFT, '\0', u"left"_ustr, TG::NONE, 5);
SmBraceNode *pBrace = new SmBraceNode(aTok); SmBraceNode *pBrace = new SmBraceNode(aTok);
pBrace->SetScaleMode(SmScaleMode::Height); pBrace->SetScaleMode(SmScaleMode::Height);
std::unique_ptr<SmNode> pLeft( CreateBracket(eBracketType, true) ), std::unique_ptr<SmNode> pLeft( CreateBracket(eBracketType, true) ),
@ -669,25 +669,25 @@ SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, bool bIsLeft) {
if(bIsLeft){ if(bIsLeft){
switch(eBracketType){ switch(eBracketType){
case SmBracketType::Round: case SmBracketType::Round:
aTok = SmToken(TLPARENT, MS_LPARENT, "(", TG::LBrace, 5); aTok = SmToken(TLPARENT, MS_LPARENT, u"("_ustr, TG::LBrace, 5);
break; break;
case SmBracketType::Square: case SmBracketType::Square:
aTok = SmToken(TLBRACKET, MS_LBRACKET, "[", TG::LBrace, 5); aTok = SmToken(TLBRACKET, MS_LBRACKET, u"["_ustr, TG::LBrace, 5);
break; break;
case SmBracketType::Curly: case SmBracketType::Curly:
aTok = SmToken(TLBRACE, MS_LBRACE, "lbrace", TG::LBrace, 5); aTok = SmToken(TLBRACE, MS_LBRACE, u"lbrace"_ustr, TG::LBrace, 5);
break; break;
} }
} else { } else {
switch(eBracketType) { switch(eBracketType) {
case SmBracketType::Round: case SmBracketType::Round:
aTok = SmToken(TRPARENT, MS_RPARENT, ")", TG::RBrace, 5); aTok = SmToken(TRPARENT, MS_RPARENT, u")"_ustr, TG::RBrace, 5);
break; break;
case SmBracketType::Square: case SmBracketType::Square:
aTok = SmToken(TRBRACKET, MS_RBRACKET, "]", TG::RBrace, 5); aTok = SmToken(TRBRACKET, MS_RBRACKET, u"]"_ustr, TG::RBrace, 5);
break; break;
case SmBracketType::Curly: case SmBracketType::Curly:
aTok = SmToken(TRBRACE, MS_RBRACE, "rbrace", TG::RBrace, 5); aTok = SmToken(TRBRACE, MS_RBRACE, u"rbrace"_ustr, TG::RBrace, 5);
break; break;
} }
} }
@ -770,7 +770,7 @@ bool SmCursor::InsertRow() {
pNewLineList.reset(); pNewLineList.reset();
//Wrap pNewLine in SmLineNode if needed //Wrap pNewLine in SmLineNode if needed
if(pLineParent->GetType() == SmNodeType::Line) { if(pLineParent->GetType() == SmNodeType::Line) {
std::unique_ptr<SmLineNode> pNewLineNode(new SmLineNode(SmToken(TNEWLINE, '\0', "newline"))); std::unique_ptr<SmLineNode> pNewLineNode(new SmLineNode(SmToken(TNEWLINE, '\0', u"newline"_ustr)));
pNewLineNode->SetSubNodes(std::move(pNewLine), nullptr); pNewLineNode->SetSubNodes(std::move(pNewLine), nullptr);
pNewLine = std::move(pNewLineNode); pNewLine = std::move(pNewLineNode);
} }
@ -858,7 +858,7 @@ void SmCursor::InsertFraction() {
pSelectedNodesList.reset(); pSelectedNodesList.reset();
//Create new fraction //Create new fraction
SmBinVerNode *pFrac = new SmBinVerNode(SmToken(TOVER, '\0', "over", TG::Product, 0)); SmBinVerNode *pFrac = new SmBinVerNode(SmToken(TOVER, '\0', u"over"_ustr, TG::Product, 0));
std::unique_ptr<SmNode> pRect(new SmRectangleNode(SmToken())); std::unique_ptr<SmNode> pRect(new SmRectangleNode(SmToken()));
pFrac->SetSubNodes(std::move(pNum), std::move(pRect), std::move(pDenom)); pFrac->SetSubNodes(std::move(pNum), std::move(pRect), std::move(pDenom));
@ -917,7 +917,7 @@ void SmCursor::InsertElement(SmFormulaElement element){
}break; }break;
case FactorialElement: case FactorialElement:
{ {
SmToken token(TFACT, MS_FACT, "fact", TG::UnOper, 5); SmToken token(TFACT, MS_FACT, u"fact"_ustr, TG::UnOper, 5);
pNewNode = new SmMathSymbolNode(token); pNewNode = new SmMathSymbolNode(token);
}break; }break;
case PlusElement: case PlusElement:
@ -1269,7 +1269,7 @@ void SmCursor::FinishEdit(std::unique_ptr<SmNodeList> pLineList,
nParentIndex == 0 && nParentIndex == 0 &&
entries > 1) { entries > 1) {
//Wrap pLine in scalable round brackets //Wrap pLine in scalable round brackets
SmToken aTok(TLEFT, '\0', "left", TG::NONE, 5); SmToken aTok(TLEFT, '\0', u"left"_ustr, TG::NONE, 5);
std::unique_ptr<SmBraceNode> pBrace(new SmBraceNode(aTok)); std::unique_ptr<SmBraceNode> pBrace(new SmBraceNode(aTok));
pBrace->SetScaleMode(SmScaleMode::Height); pBrace->SetScaleMode(SmScaleMode::Height);
std::unique_ptr<SmNode> pLeft( CreateBracket(SmBracketType::Round, true) ), std::unique_ptr<SmNode> pLeft( CreateBracket(SmBracketType::Round, true) ),

View File

@ -178,28 +178,28 @@ IMPL_LINK_NOARG(SmPrintOptionsTabPage, SizeButtonClickHdl, weld::Toggleable&, vo
} }
SmPrintOptionsTabPage::SmPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rOptions) SmPrintOptionsTabPage::SmPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rOptions)
: SfxTabPage(pPage, pController, "modules/smath/ui/smathsettings.ui", "SmathSettings", &rOptions) : SfxTabPage(pPage, pController, u"modules/smath/ui/smathsettings.ui"_ustr, u"SmathSettings"_ustr, &rOptions)
, m_xTitle(m_xBuilder->weld_check_button("title")) , m_xTitle(m_xBuilder->weld_check_button(u"title"_ustr))
, m_xTitleImg(m_xBuilder->weld_widget("locktitle")) , m_xTitleImg(m_xBuilder->weld_widget(u"locktitle"_ustr))
, m_xText(m_xBuilder->weld_check_button("text")) , m_xText(m_xBuilder->weld_check_button(u"text"_ustr))
, m_xTextImg(m_xBuilder->weld_widget("locktext")) , m_xTextImg(m_xBuilder->weld_widget(u"locktext"_ustr))
, m_xFrame(m_xBuilder->weld_check_button("frame")) , m_xFrame(m_xBuilder->weld_check_button(u"frame"_ustr))
, m_xFrameImg(m_xBuilder->weld_widget("lockframe")) , m_xFrameImg(m_xBuilder->weld_widget(u"lockframe"_ustr))
, m_xSizeNormal(m_xBuilder->weld_radio_button("sizenormal")) , m_xSizeNormal(m_xBuilder->weld_radio_button(u"sizenormal"_ustr))
, m_xSizeScaled(m_xBuilder->weld_radio_button("sizescaled")) , m_xSizeScaled(m_xBuilder->weld_radio_button(u"sizescaled"_ustr))
, m_xSizeZoomed(m_xBuilder->weld_radio_button("sizezoomed")) , m_xSizeZoomed(m_xBuilder->weld_radio_button(u"sizezoomed"_ustr))
, m_xLockPrintImg(m_xBuilder->weld_widget("lockprintformat")) , m_xLockPrintImg(m_xBuilder->weld_widget(u"lockprintformat"_ustr))
, m_xZoom(m_xBuilder->weld_metric_spin_button("zoom", FieldUnit::PERCENT)) , m_xZoom(m_xBuilder->weld_metric_spin_button(u"zoom"_ustr, FieldUnit::PERCENT))
, m_xEnableInlineEdit(m_xBuilder->weld_check_button("enableinlineedit")) , m_xEnableInlineEdit(m_xBuilder->weld_check_button(u"enableinlineedit"_ustr))
, m_xEnableInlineEditImg(m_xBuilder->weld_widget("lockenableinlineedit")) , m_xEnableInlineEditImg(m_xBuilder->weld_widget(u"lockenableinlineedit"_ustr))
, m_xNoRightSpaces(m_xBuilder->weld_check_button("norightspaces")) , m_xNoRightSpaces(m_xBuilder->weld_check_button(u"norightspaces"_ustr))
, m_xNoRightSpacesImg(m_xBuilder->weld_widget("locknorightspaces")) , m_xNoRightSpacesImg(m_xBuilder->weld_widget(u"locknorightspaces"_ustr))
, m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button("saveonlyusedsymbols")) , m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button(u"saveonlyusedsymbols"_ustr))
, m_xSaveOnlyUsedSymbolsImg(m_xBuilder->weld_widget("locksaveonlyusedsymbols")) , m_xSaveOnlyUsedSymbolsImg(m_xBuilder->weld_widget(u"locksaveonlyusedsymbols"_ustr))
, m_xAutoCloseBrackets(m_xBuilder->weld_check_button("autoclosebrackets")) , m_xAutoCloseBrackets(m_xBuilder->weld_check_button(u"autoclosebrackets"_ustr))
, m_xAutoCloseBracketsImg(m_xBuilder->weld_widget("lockautoclosebrackets")) , m_xAutoCloseBracketsImg(m_xBuilder->weld_widget(u"lockautoclosebrackets"_ustr))
, m_xSmZoom(m_xBuilder->weld_metric_spin_button("smzoom", FieldUnit::PERCENT)) , m_xSmZoom(m_xBuilder->weld_metric_spin_button(u"smzoom"_ustr, FieldUnit::PERCENT))
, m_xSmZoomImg(m_xBuilder->weld_widget("locksmzoom")) , m_xSmZoomImg(m_xBuilder->weld_widget(u"locksmzoom"_ustr))
{ {
m_xSizeNormal->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl)); m_xSizeNormal->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
m_xSizeScaled->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl)); m_xSizeScaled->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
@ -218,7 +218,7 @@ SmPrintOptionsTabPage::~SmPrintOptionsTabPage()
OUString SmPrintOptionsTabPage::GetAllStrings() OUString SmPrintOptionsTabPage::GetAllStrings()
{ {
OUString sAllStrings; OUString sAllStrings;
OUString labels[] = { "label4", "label5", "label1", "label6" }; OUString labels[] = { u"label4"_ustr, u"label5"_ustr, u"label1"_ustr, u"label6"_ustr };
for (const auto& label : labels) for (const auto& label : labels)
{ {
@ -227,7 +227,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
} }
OUString checkButton[] OUString checkButton[]
= { "title", "text", "frame", "norightspaces", "saveonlyusedsymbols", "autoclosebrackets" }; = { u"title"_ustr, u"text"_ustr, u"frame"_ustr, u"norightspaces"_ustr, u"saveonlyusedsymbols"_ustr, u"autoclosebrackets"_ustr };
for (const auto& check : checkButton) for (const auto& check : checkButton)
{ {
@ -235,7 +235,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
sAllStrings += pString->get_label() + " "; sAllStrings += pString->get_label() + " ";
} }
OUString radioButton[] = { "sizenormal", "sizescaled", "sizezoomed" }; OUString radioButton[] = { u"sizenormal"_ustr, u"sizescaled"_ustr, u"sizezoomed"_ustr };
for (const auto& radio : radioButton) for (const auto& radio : radioButton)
{ {
@ -406,12 +406,12 @@ void SmFontDialog::SetFont(const vcl::Font &rFont)
} }
SmFontDialog::SmFontDialog(weld::Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes) SmFontDialog::SmFontDialog(weld::Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes)
: GenericDialogController(pParent, "modules/smath/ui/fontdialog.ui", "FontDialog") : GenericDialogController(pParent, u"modules/smath/ui/fontdialog.ui"_ustr, u"FontDialog"_ustr)
, m_xFontBox(m_xBuilder->weld_entry_tree_view("fontgrid", "font", "fonts")) , m_xFontBox(m_xBuilder->weld_entry_tree_view(u"fontgrid"_ustr, u"font"_ustr, u"fonts"_ustr))
, m_xAttrFrame(m_xBuilder->weld_widget("attrframe")) , m_xAttrFrame(m_xBuilder->weld_widget(u"attrframe"_ustr))
, m_xBoldCheckBox(m_xBuilder->weld_check_button("bold")) , m_xBoldCheckBox(m_xBuilder->weld_check_button(u"bold"_ustr))
, m_xItalicCheckBox(m_xBuilder->weld_check_button("italic")) , m_xItalicCheckBox(m_xBuilder->weld_check_button(u"italic"_ustr))
, m_xShowFont(new weld::CustomWeld(*m_xBuilder, "preview", m_aShowFont)) , m_xShowFont(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aShowFont))
{ {
m_xFontBox->set_height_request_by_rows(8); m_xFontBox->set_height_request_by_rows(8);
@ -458,8 +458,8 @@ class SaveDefaultsQuery : public weld::MessageDialogController
{ {
public: public:
explicit SaveDefaultsQuery(weld::Widget* pParent) explicit SaveDefaultsQuery(weld::Widget* pParent)
: MessageDialogController(pParent, "modules/smath/ui/savedefaultsdialog.ui", : MessageDialogController(pParent, u"modules/smath/ui/savedefaultsdialog.ui"_ustr,
"SaveDefaultsDialog") u"SaveDefaultsDialog"_ustr)
{ {
} }
}; };
@ -479,14 +479,14 @@ IMPL_LINK_NOARG( SmFontSizeDialog, DefaultButtonClickHdl, weld::Button&, void )
} }
SmFontSizeDialog::SmFontSizeDialog(weld::Window* pParent) SmFontSizeDialog::SmFontSizeDialog(weld::Window* pParent)
: GenericDialogController(pParent, "modules/smath/ui/fontsizedialog.ui", "FontSizeDialog") : GenericDialogController(pParent, u"modules/smath/ui/fontsizedialog.ui"_ustr, u"FontSizeDialog"_ustr)
, m_xBaseSize(m_xBuilder->weld_metric_spin_button("spinB_baseSize", FieldUnit::POINT)) , m_xBaseSize(m_xBuilder->weld_metric_spin_button(u"spinB_baseSize"_ustr, FieldUnit::POINT))
, m_xTextSize(m_xBuilder->weld_metric_spin_button("spinB_text", FieldUnit::PERCENT)) , m_xTextSize(m_xBuilder->weld_metric_spin_button(u"spinB_text"_ustr, FieldUnit::PERCENT))
, m_xIndexSize(m_xBuilder->weld_metric_spin_button("spinB_index", FieldUnit::PERCENT)) , m_xIndexSize(m_xBuilder->weld_metric_spin_button(u"spinB_index"_ustr, FieldUnit::PERCENT))
, m_xFunctionSize(m_xBuilder->weld_metric_spin_button("spinB_function", FieldUnit::PERCENT)) , m_xFunctionSize(m_xBuilder->weld_metric_spin_button(u"spinB_function"_ustr, FieldUnit::PERCENT))
, m_xOperatorSize(m_xBuilder->weld_metric_spin_button("spinB_operator", FieldUnit::PERCENT)) , m_xOperatorSize(m_xBuilder->weld_metric_spin_button(u"spinB_operator"_ustr, FieldUnit::PERCENT))
, m_xBorderSize(m_xBuilder->weld_metric_spin_button("spinB_limit", FieldUnit::PERCENT)) , m_xBorderSize(m_xBuilder->weld_metric_spin_button(u"spinB_limit"_ustr, FieldUnit::PERCENT))
, m_xDefaultButton(m_xBuilder->weld_button("default")) , m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
{ {
m_xDefaultButton->connect_clicked(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl)); m_xDefaultButton->connect_clicked(LINK(this, SmFontSizeDialog, DefaultButtonClickHdl));
} }
@ -582,18 +582,18 @@ IMPL_LINK_NOARG(SmFontTypeDialog, DefaultButtonClickHdl, weld::Button&, void)
} }
SmFontTypeDialog::SmFontTypeDialog(weld::Window* pParent, OutputDevice *pFntListDevice) SmFontTypeDialog::SmFontTypeDialog(weld::Window* pParent, OutputDevice *pFntListDevice)
: GenericDialogController(pParent, "modules/smath/ui/fonttypedialog.ui", "FontsDialog") : GenericDialogController(pParent, u"modules/smath/ui/fonttypedialog.ui"_ustr, u"FontsDialog"_ustr)
, pFontListDev(pFntListDevice) , pFontListDev(pFntListDevice)
, m_xMathFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("mathCB"))) , m_xMathFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"mathCB"_ustr)))
, m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("variableCB"))) , m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"variableCB"_ustr)))
, m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("functionCB"))) , m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"functionCB"_ustr)))
, m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("numberCB"))) , m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"numberCB"_ustr)))
, m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("textCB"))) , m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"textCB"_ustr)))
, m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("serifCB"))) , m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"serifCB"_ustr)))
, m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("sansCB"))) , m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"sansCB"_ustr)))
, m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("fixedCB"))) , m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"fixedCB"_ustr)))
, m_xMenuButton(m_xBuilder->weld_menu_button("modify")) , m_xMenuButton(m_xBuilder->weld_menu_button(u"modify"_ustr))
, m_xDefaultButton(m_xBuilder->weld_button("default")) , m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
{ {
m_xDefaultButton->connect_clicked(LINK(this, SmFontTypeDialog, DefaultButtonClickHdl)); m_xDefaultButton->connect_clicked(LINK(this, SmFontTypeDialog, DefaultButtonClickHdl));
m_xMenuButton->connect_selected(LINK(this, SmFontTypeDialog, MenuSelectHdl)); m_xMenuButton->connect_selected(LINK(this, SmFontTypeDialog, MenuSelectHdl));
@ -889,20 +889,20 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
} }
SmDistanceDialog::SmDistanceDialog(weld::Window *pParent) SmDistanceDialog::SmDistanceDialog(weld::Window *pParent)
: GenericDialogController(pParent, "modules/smath/ui/spacingdialog.ui", "SpacingDialog") : GenericDialogController(pParent, u"modules/smath/ui/spacingdialog.ui"_ustr, u"SpacingDialog"_ustr)
, m_xFrame(m_xBuilder->weld_frame("template")) , m_xFrame(m_xBuilder->weld_frame(u"template"_ustr))
, m_xFixedText1(m_xBuilder->weld_label("label1")) , m_xFixedText1(m_xBuilder->weld_label(u"label1"_ustr))
, m_xMetricField1(m_xBuilder->weld_metric_spin_button("spinbutton1", FieldUnit::CM)) , m_xMetricField1(m_xBuilder->weld_metric_spin_button(u"spinbutton1"_ustr, FieldUnit::CM))
, m_xFixedText2(m_xBuilder->weld_label("label2")) , m_xFixedText2(m_xBuilder->weld_label(u"label2"_ustr))
, m_xMetricField2(m_xBuilder->weld_metric_spin_button("spinbutton2", FieldUnit::CM)) , m_xMetricField2(m_xBuilder->weld_metric_spin_button(u"spinbutton2"_ustr, FieldUnit::CM))
, m_xFixedText3(m_xBuilder->weld_label("label3")) , m_xFixedText3(m_xBuilder->weld_label(u"label3"_ustr))
, m_xMetricField3(m_xBuilder->weld_metric_spin_button("spinbutton3", FieldUnit::CM)) , m_xMetricField3(m_xBuilder->weld_metric_spin_button(u"spinbutton3"_ustr, FieldUnit::CM))
, m_xCheckBox1(m_xBuilder->weld_check_button("checkbutton")) , m_xCheckBox1(m_xBuilder->weld_check_button(u"checkbutton"_ustr))
, m_xFixedText4(m_xBuilder->weld_label("label4")) , m_xFixedText4(m_xBuilder->weld_label(u"label4"_ustr))
, m_xMetricField4(m_xBuilder->weld_metric_spin_button("spinbutton4", FieldUnit::CM)) , m_xMetricField4(m_xBuilder->weld_metric_spin_button(u"spinbutton4"_ustr, FieldUnit::CM))
, m_xMenuButton(m_xBuilder->weld_menu_button("category")) , m_xMenuButton(m_xBuilder->weld_menu_button(u"category"_ustr))
, m_xDefaultButton(m_xBuilder->weld_button("default")) , m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
, m_xBitmap(m_xBuilder->weld_widget("image")) , m_xBitmap(m_xBuilder->weld_widget(u"image"_ustr))
, m_pCurrentImage(m_xBitmap.get()) , m_pCurrentImage(m_xBitmap.get())
{ {
for (sal_uInt16 i = 0; i < NOCATEGORIES; ++i) for (sal_uInt16 i = 0; i < NOCATEGORIES; ++i)
@ -1011,11 +1011,11 @@ IMPL_LINK_NOARG( SmAlignDialog, DefaultButtonClickHdl, weld::Button&, void )
} }
SmAlignDialog::SmAlignDialog(weld::Window* pParent) SmAlignDialog::SmAlignDialog(weld::Window* pParent)
: GenericDialogController(pParent, "modules/smath/ui/alignmentdialog.ui", "AlignmentDialog") : GenericDialogController(pParent, u"modules/smath/ui/alignmentdialog.ui"_ustr, u"AlignmentDialog"_ustr)
, m_xLeft(m_xBuilder->weld_radio_button("left")) , m_xLeft(m_xBuilder->weld_radio_button(u"left"_ustr))
, m_xCenter(m_xBuilder->weld_radio_button("center")) , m_xCenter(m_xBuilder->weld_radio_button(u"center"_ustr))
, m_xRight(m_xBuilder->weld_radio_button("right")) , m_xRight(m_xBuilder->weld_radio_button(u"right"_ustr))
, m_xDefaultButton(m_xBuilder->weld_button("default")) , m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
{ {
m_xDefaultButton->connect_clicked(LINK(this, SmAlignDialog, DefaultButtonClickHdl)); m_xDefaultButton->connect_clicked(LINK(this, SmAlignDialog, DefaultButtonClickHdl));
} }
@ -1413,18 +1413,18 @@ IMPL_LINK_NOARG(SmSymbolDialog, GetClickHdl, weld::Button&, void)
SmSymbolDialog::SmSymbolDialog(weld::Window *pParent, OutputDevice *pFntListDevice, SmSymbolDialog::SmSymbolDialog(weld::Window *pParent, OutputDevice *pFntListDevice,
SmSymbolManager &rMgr, SmViewShell &rViewShell) SmSymbolManager &rMgr, SmViewShell &rViewShell)
: GenericDialogController(pParent, "modules/smath/ui/catalogdialog.ui", "CatalogDialog") : GenericDialogController(pParent, u"modules/smath/ui/catalogdialog.ui"_ustr, u"CatalogDialog"_ustr)
, rViewSh(rViewShell) , rViewSh(rViewShell)
, rSymbolMgr(rMgr) , rSymbolMgr(rMgr)
, pFontListDev(pFntListDevice) , pFontListDev(pFntListDevice)
, m_aSymbolDisplay(rViewShell) , m_aSymbolDisplay(rViewShell)
, m_xSymbolSets(m_xBuilder->weld_combo_box("symbolset")) , m_xSymbolSets(m_xBuilder->weld_combo_box(u"symbolset"_ustr))
, m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window("scrolledwindow", true), rViewShell)) , m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true), rViewShell))
, m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, "symbolsetdisplay", *m_xSymbolSetDisplay)) , m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, u"symbolsetdisplay"_ustr, *m_xSymbolSetDisplay))
, m_xSymbolName(m_xBuilder->weld_label("symbolname")) , m_xSymbolName(m_xBuilder->weld_label(u"symbolname"_ustr))
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "preview", m_aSymbolDisplay)) , m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aSymbolDisplay))
, m_xGetBtn(m_xBuilder->weld_button("ok")) , m_xGetBtn(m_xBuilder->weld_button(u"ok"_ustr))
, m_xEditBtn(m_xBuilder->weld_button("edit")) , m_xEditBtn(m_xBuilder->weld_button(u"edit"_ustr))
{ {
m_xSymbolSets->make_sorted(); m_xSymbolSets->make_sorted();
@ -1715,7 +1715,7 @@ IMPL_LINK_NOARG(SmSymDefineDialog, CharHighlightHdl, SvxShowCharSet*, void)
// display Unicode position as symbol name while iterating over characters // display Unicode position as symbol name while iterating over characters
const OUString aHex(OUString::number(cChar, 16).toAsciiUpperCase()); const OUString aHex(OUString::number(cChar, 16).toAsciiUpperCase());
const OUString aPattern( (aHex.getLength() > 4) ? OUString("Ux000000") : OUString("Ux0000") ); const OUString aPattern( (aHex.getLength() > 4) ? u"Ux000000"_ustr : u"Ux0000"_ustr );
OUString aUnicodePos = aPattern.subView( 0, aPattern.getLength() - aHex.getLength() ) + OUString aUnicodePos = aPattern.subView( 0, aPattern.getLength() - aHex.getLength() ) +
aHex; aHex;
m_xSymbols->set_entry_text(aUnicodePos); m_xSymbols->set_entry_text(aUnicodePos);
@ -1844,28 +1844,28 @@ void SmSymDefineDialog::UpdateButtons()
} }
SmSymDefineDialog::SmSymDefineDialog(weld::Window* pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr) SmSymDefineDialog::SmSymDefineDialog(weld::Window* pParent, OutputDevice *pFntListDevice, SmSymbolManager &rMgr)
: GenericDialogController(pParent, "modules/smath/ui/symdefinedialog.ui", "EditSymbols") : GenericDialogController(pParent, u"modules/smath/ui/symdefinedialog.ui"_ustr, u"EditSymbols"_ustr)
, m_xVirDev(VclPtr<VirtualDevice>::Create()) , m_xVirDev(VclPtr<VirtualDevice>::Create())
, m_rSymbolMgr(rMgr) , m_rSymbolMgr(rMgr)
, m_xFontList(new FontList(pFntListDevice)) , m_xFontList(new FontList(pFntListDevice))
, m_xOldSymbols(m_xBuilder->weld_combo_box("oldSymbols")) , m_xOldSymbols(m_xBuilder->weld_combo_box(u"oldSymbols"_ustr))
, m_xOldSymbolSets(m_xBuilder->weld_combo_box("oldSymbolSets")) , m_xOldSymbolSets(m_xBuilder->weld_combo_box(u"oldSymbolSets"_ustr))
, m_xSymbols(m_xBuilder->weld_combo_box("symbols")) , m_xSymbols(m_xBuilder->weld_combo_box(u"symbols"_ustr))
, m_xSymbolSets(m_xBuilder->weld_combo_box("symbolSets")) , m_xSymbolSets(m_xBuilder->weld_combo_box(u"symbolSets"_ustr))
, m_xFonts(m_xBuilder->weld_combo_box("fonts")) , m_xFonts(m_xBuilder->weld_combo_box(u"fonts"_ustr))
, m_xFontsSubsetLB(m_xBuilder->weld_combo_box("fontsSubsetLB")) , m_xFontsSubsetLB(m_xBuilder->weld_combo_box(u"fontsSubsetLB"_ustr))
, m_xStyles(m_xBuilder->weld_combo_box("styles")) , m_xStyles(m_xBuilder->weld_combo_box(u"styles"_ustr))
, m_xOldSymbolName(m_xBuilder->weld_label("oldSymbolName")) , m_xOldSymbolName(m_xBuilder->weld_label(u"oldSymbolName"_ustr))
, m_xOldSymbolSetName(m_xBuilder->weld_label("oldSymbolSetName")) , m_xOldSymbolSetName(m_xBuilder->weld_label(u"oldSymbolSetName"_ustr))
, m_xSymbolName(m_xBuilder->weld_label("symbolName")) , m_xSymbolName(m_xBuilder->weld_label(u"symbolName"_ustr))
, m_xSymbolSetName(m_xBuilder->weld_label("symbolSetName")) , m_xSymbolSetName(m_xBuilder->weld_label(u"symbolSetName"_ustr))
, m_xAddBtn(m_xBuilder->weld_button("add")) , m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr))
, m_xChangeBtn(m_xBuilder->weld_button("modify")) , m_xChangeBtn(m_xBuilder->weld_button(u"modify"_ustr))
, m_xDeleteBtn(m_xBuilder->weld_button("delete")) , m_xDeleteBtn(m_xBuilder->weld_button(u"delete"_ustr))
, m_xOldSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "oldSymbolDisplay", m_aOldSymbolDisplay)) , m_xOldSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"oldSymbolDisplay"_ustr, m_aOldSymbolDisplay))
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "symbolDisplay", m_aSymbolDisplay)) , m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"symbolDisplay"_ustr, m_aSymbolDisplay))
, m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev)) , m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window(u"showscroll"_ustr, true), m_xVirDev))
, m_xCharsetDisplayArea(new weld::CustomWeld(*m_xBuilder, "charsetDisplay", *m_xCharsetDisplay)) , m_xCharsetDisplayArea(new weld::CustomWeld(*m_xBuilder, u"charsetDisplay"_ustr, *m_xCharsetDisplay))
{ {
// auto completion is troublesome since that symbols character also gets automatically selected in the // auto completion is troublesome since that symbols character also gets automatically selected in the
// display and if the user previously selected a character to define/redefine that one this is bad // display and if the user previously selected a character to define/redefine that one this is bad

View File

@ -97,7 +97,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SmDocShell, SfxObjectShell)
void SmDocShell::InitInterface_Impl() void SmDocShell::InitInterface_Impl()
{ {
GetStaticInterface()->RegisterPopupMenu("view"); GetStaticInterface()->RegisterPopupMenu(u"view"_ustr);
} }
void SmDocShell::SetSmSyntaxVersion(sal_Int16 nSmSyntaxVersion) void SmDocShell::SetSmSyntaxVersion(sal_Int16 nSmSyntaxVersion)
@ -106,7 +106,7 @@ void SmDocShell::SetSmSyntaxVersion(sal_Int16 nSmSyntaxVersion)
maParser.reset(starmathdatabase::GetVersionSmParser(mnSmSyntaxVersion)); maParser.reset(starmathdatabase::GetVersionSmParser(mnSmSyntaxVersion));
} }
SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), "smath" ) SFX_IMPL_OBJECTFACTORY(SmDocShell, SvGlobalName(SO3_SM_CLASSID), u"smath"_ustr )
void SmDocShell::Notify(SfxBroadcaster&, const SfxHint& rHint) void SmDocShell::Notify(SfxBroadcaster&, const SfxHint& rHint)
{ {
@ -639,7 +639,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
if ( SotStorage::IsStorageFile( pStream ) ) if ( SotStorage::IsStorageFile( pStream ) )
{ {
rtl::Reference<SotStorage> aStorage = new SotStorage(pStream, false); rtl::Reference<SotStorage> aStorage = new SotStorage(pStream, false);
if ( aStorage->IsStream("Equation Native") ) if ( aStorage->IsStream(u"Equation Native"_ustr) )
{ {
// is this a MathType Storage? // is this a MathType Storage?
OUStringBuffer aBuffer; OUStringBuffer aBuffer;
@ -684,7 +684,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
if( SfxObjectShell::Load( rMedium )) if( SfxObjectShell::Load( rMedium ))
{ {
uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage(); uno::Reference < embed::XStorage > xStorage = GetMedium()->GetStorage();
if (xStorage->hasByName("content.xml") && xStorage->isStreamElement("content.xml")) if (xStorage->hasByName(u"content.xml"_ustr) && xStorage->isStreamElement(u"content.xml"_ustr))
{ {
// is this a fabulous math package ? // is this a fabulous math package ?
rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(GetModel().get())); rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(GetModel().get()));

View File

@ -134,7 +134,7 @@ void SmEditTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
SmEditWindow::SmEditWindow(SmCmdBoxWindow &rMyCmdBoxWin, weld::Builder& rBuilder) SmEditWindow::SmEditWindow(SmCmdBoxWindow &rMyCmdBoxWin, weld::Builder& rBuilder)
: rCmdBox(rMyCmdBoxWin) : rCmdBox(rMyCmdBoxWin)
, mxScrolledWindow(rBuilder.weld_scrolled_window("scrolledwindow", true)) , mxScrolledWindow(rBuilder.weld_scrolled_window(u"scrolledwindow"_ustr, true))
{ {
mxScrolledWindow->connect_vadjustment_changed(LINK(this, SmEditWindow, ScrollHdl)); mxScrolledWindow->connect_vadjustment_changed(LINK(this, SmEditWindow, ScrollHdl));
@ -201,7 +201,7 @@ void SmEditTextWindow::StyleUpdated()
pDoc->UpdateEditEngineDefaultFonts(); pDoc->UpdateEditEngineDefaultFonts();
pEditEngine->SetBackgroundColor(rStyleSettings.GetFieldColor()); pEditEngine->SetBackgroundColor(rStyleSettings.GetFieldColor());
pEditEngine->SetDefTab(sal_uInt16(GetTextWidth("XXXX"))); pEditEngine->SetDefTab(sal_uInt16(GetTextWidth(u"XXXX"_ustr)));
// forces new settings to be used // forces new settings to be used
// unfortunately this resets the whole edit engine // unfortunately this resets the whole edit engine
@ -424,7 +424,7 @@ void SmEditWindow::CreateEditView(weld::Builder& rBuilder)
return; return;
mxTextControl.reset(new SmEditTextWindow(*this)); mxTextControl.reset(new SmEditTextWindow(*this));
mxTextControlWin.reset(new weld::CustomWeld(rBuilder, "editview", *mxTextControl)); mxTextControlWin.reset(new weld::CustomWeld(rBuilder, u"editview"_ustr, *mxTextControl));
SetScrollBarRanges(); SetScrollBarRanges();
} }

View File

@ -30,7 +30,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
// code snippet copied from MathType::Parse // code snippet copied from MathType::Parse
rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream( rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream(
"Equation Native", u"Equation Native"_ustr,
StreamMode::STD_READ); StreamMode::STD_READ);
if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError())) if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError()))
return bSuccess; return bSuccess;

View File

@ -121,20 +121,20 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium)
// create XPropertySet with three properties for status indicator // create XPropertySet with three properties for status indicator
static const comphelper::PropertyMapEntry aInfoMap[]{ static const comphelper::PropertyMapEntry aInfoMap[]{
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), { u"UsePrettyPrinting"_ustr, 0, cppu::UnoType<bool>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), { u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID,
0 },
{ u"StreamRelPath"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), { u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 } beans::PropertyAttribute::MAYBEVOID, 0 }
}; };
uno::Reference<beans::XPropertySet> xInfoSet( uno::Reference<beans::XPropertySet> xInfoSet(
comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap)));
// Always print pretty // Always print pretty
xInfoSet->setPropertyValue("UsePrettyPrinting", Any(true)); xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, Any(true));
// Set base URI // Set base URI
xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(rMedium.GetBaseURL(true))); xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(rMedium.GetBaseURL(true)));
@ -158,7 +158,7 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium)
{ {
OUString aName = pDocHierarchItem->GetValue(); OUString aName = pDocHierarchItem->GetValue();
if (!aName.isEmpty()) if (!aName.isEmpty())
xInfoSet->setPropertyValue("StreamRelPath", Any(aName)); xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, Any(aName));
} }
} }
else else
@ -256,20 +256,20 @@ OUString SmMLExportWrapper::Export(SmMlElement* pElementTree)
// create XPropertySet with three properties for status indicator // create XPropertySet with three properties for status indicator
static const comphelper::PropertyMapEntry aInfoMap[]{ static const comphelper::PropertyMapEntry aInfoMap[]{
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(), { u"UsePrettyPrinting"_ustr, 0, cppu::UnoType<bool>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), { u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(), beans::PropertyAttribute::MAYBEVOID,
0 },
{ u"StreamRelPath"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), { u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 } beans::PropertyAttribute::MAYBEVOID, 0 }
}; };
uno::Reference<beans::XPropertySet> xInfoSet( uno::Reference<beans::XPropertySet> xInfoSet(
comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap)));
// Always print pretty // Always print pretty
xInfoSet->setPropertyValue("UsePrettyPrinting", Any(true)); xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, Any(true));
// Fetch mathml tree // Fetch mathml tree
m_pElementTree = pElementTree; m_pElementTree = pElementTree;
@ -382,13 +382,13 @@ bool SmMLExportWrapper::WriteThroughComponentS(const Reference<embed::XStorage>&
// Set stream as text / xml // Set stream as text / xml
uno::Reference<beans::XPropertySet> xSet(xStream, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xSet(xStream, uno::UNO_QUERY);
xSet->setPropertyValue("MediaType", Any(u"text/xml"_ustr)); xSet->setPropertyValue(u"MediaType"_ustr, Any(u"text/xml"_ustr));
// all streams must be encrypted in encrypted document // all streams must be encrypted in encrypted document
xSet->setPropertyValue("UseCommonStoragePasswordEncryption", Any(true)); xSet->setPropertyValue(u"UseCommonStoragePasswordEncryption"_ustr, Any(true));
// set Base URL // set Base URL
rPropSet->setPropertyValue("StreamName", Any(OUString(pStreamName))); rPropSet->setPropertyValue(u"StreamName"_ustr, Any(OUString(pStreamName)));
// write the stuff // write the stuff
// Note: export through an XML exporter component (output stream version) // Note: export through an XML exporter component (output stream version)
@ -412,7 +412,7 @@ SmMLExportWrapper::WriteThroughComponentMS(const Reference<XComponent>& xCompone
// Set the stream as text // Set the stream as text
uno::Reference<beans::XPropertySet> xSet(xStream, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xSet(xStream, uno::UNO_QUERY);
xSet->setPropertyValue("MediaType", Any(OUString("text/xml"))); xSet->setPropertyValue(u"MediaType"_ustr, Any(u"text/xml"_ustr));
// write the stuff // write the stuff
// Note: export through an XML exporter component (output stream version) // Note: export through an XML exporter component (output stream version)
@ -436,7 +436,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_MLExporter_get_implementation(css::uno::XComponentContext* context, Math_MLExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmMLExport(context, "com.sun.star.comp.Math.XMLExporter", return cppu::acquire(new SmMLExport(context, u"com.sun.star.comp.Math.XMLExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::ALL)); SvXMLExportFlags::OASIS | SvXMLExportFlags::ALL));
} }
@ -444,7 +444,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_MLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context, Math_MLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmMLExport(context, "com.sun.star.comp.Math.XMLOasisMetaExporter", return cppu::acquire(new SmMLExport(context,
u"com.sun.star.comp.Math.XMLOasisMetaExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META)); SvXMLExportFlags::OASIS | SvXMLExportFlags::META));
} }
@ -452,7 +453,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_MLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context, Math_MLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmMLExport(context, "com.sun.star.comp.Math.XMLOasisSettingsExporter", return cppu::acquire(new SmMLExport(context,
u"com.sun.star.comp.Math.XMLOasisSettingsExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS)); SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS));
} }
@ -460,7 +462,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_MLContentExporter_get_implementation(css::uno::XComponentContext* context, Math_MLContentExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmMLExport(context, "com.sun.star.comp.Math.XMLContentExporter", return cppu::acquire(new SmMLExport(context, u"com.sun.star.comp.Math.XMLContentExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::CONTENT)); SvXMLExportFlags::OASIS | SvXMLExportFlags::CONTENT));
} }
@ -762,7 +764,7 @@ void SmMLExport::exportMlAttributes(const SmMlElement* pMlElement)
switch (aAttributeValue->m_aMathbackground) switch (aAttributeValue->m_aMathbackground)
{ {
case SmMlAttributeValueMathbackground::MlTransparent: case SmMlAttributeValueMathbackground::MlTransparent:
addAttribute(XML_MATHBACKGROUND, "transparent"); addAttribute(XML_MATHBACKGROUND, u"transparent"_ustr);
break; break;
case SmMlAttributeValueMathbackground::MlRgb: case SmMlAttributeValueMathbackground::MlRgb:
{ {
@ -812,58 +814,58 @@ void SmMLExport::exportMlAttributes(const SmMlElement* pMlElement)
switch (aAttributeValue->m_aMathvariant) switch (aAttributeValue->m_aMathvariant)
{ {
case SmMlAttributeValueMathvariant::normal: case SmMlAttributeValueMathvariant::normal:
addAttribute(XML_MATHVARIANT, "normal"); addAttribute(XML_MATHVARIANT, u"normal"_ustr);
break; break;
case SmMlAttributeValueMathvariant::bold: case SmMlAttributeValueMathvariant::bold:
addAttribute(XML_MATHVARIANT, "bold"); addAttribute(XML_MATHVARIANT, u"bold"_ustr);
break; break;
case SmMlAttributeValueMathvariant::italic: case SmMlAttributeValueMathvariant::italic:
addAttribute(XML_MATHVARIANT, "italic"); addAttribute(XML_MATHVARIANT, u"italic"_ustr);
break; break;
case SmMlAttributeValueMathvariant::double_struck: case SmMlAttributeValueMathvariant::double_struck:
addAttribute(XML_MATHVARIANT, "double-struck"); addAttribute(XML_MATHVARIANT, u"double-struck"_ustr);
break; break;
case SmMlAttributeValueMathvariant::script: case SmMlAttributeValueMathvariant::script:
addAttribute(XML_MATHVARIANT, "script"); addAttribute(XML_MATHVARIANT, u"script"_ustr);
break; break;
case SmMlAttributeValueMathvariant::fraktur: case SmMlAttributeValueMathvariant::fraktur:
addAttribute(XML_MATHVARIANT, "fraktur"); addAttribute(XML_MATHVARIANT, u"fraktur"_ustr);
break; break;
case SmMlAttributeValueMathvariant::sans_serif: case SmMlAttributeValueMathvariant::sans_serif:
addAttribute(XML_MATHVARIANT, "sans-serif"); addAttribute(XML_MATHVARIANT, u"sans-serif"_ustr);
break; break;
case SmMlAttributeValueMathvariant::monospace: case SmMlAttributeValueMathvariant::monospace:
addAttribute(XML_MATHVARIANT, "monospace"); addAttribute(XML_MATHVARIANT, u"monospace"_ustr);
break; break;
case SmMlAttributeValueMathvariant::bold_italic: case SmMlAttributeValueMathvariant::bold_italic:
addAttribute(XML_MATHVARIANT, "bold-italic"); addAttribute(XML_MATHVARIANT, u"bold-italic"_ustr);
break; break;
case SmMlAttributeValueMathvariant::bold_fraktur: case SmMlAttributeValueMathvariant::bold_fraktur:
addAttribute(XML_MATHVARIANT, "bold-fracktur"); addAttribute(XML_MATHVARIANT, u"bold-fracktur"_ustr);
break; break;
case SmMlAttributeValueMathvariant::bold_script: case SmMlAttributeValueMathvariant::bold_script:
addAttribute(XML_MATHVARIANT, "bold-script"); addAttribute(XML_MATHVARIANT, u"bold-script"_ustr);
break; break;
case SmMlAttributeValueMathvariant::bold_sans_serif: case SmMlAttributeValueMathvariant::bold_sans_serif:
addAttribute(XML_MATHVARIANT, "bold-sans-serif"); addAttribute(XML_MATHVARIANT, u"bold-sans-serif"_ustr);
break; break;
case SmMlAttributeValueMathvariant::sans_serif_italic: case SmMlAttributeValueMathvariant::sans_serif_italic:
addAttribute(XML_MATHVARIANT, "sans-serif-italic"); addAttribute(XML_MATHVARIANT, u"sans-serif-italic"_ustr);
break; break;
case SmMlAttributeValueMathvariant::sans_serif_bold_italic: case SmMlAttributeValueMathvariant::sans_serif_bold_italic:
addAttribute(XML_MATHVARIANT, "sans-serif-bold-italic"); addAttribute(XML_MATHVARIANT, u"sans-serif-bold-italic"_ustr);
break; break;
case SmMlAttributeValueMathvariant::initial: case SmMlAttributeValueMathvariant::initial:
addAttribute(XML_MATHVARIANT, "initial"); addAttribute(XML_MATHVARIANT, u"initial"_ustr);
break; break;
case SmMlAttributeValueMathvariant::tailed: case SmMlAttributeValueMathvariant::tailed:
addAttribute(XML_MATHVARIANT, "tailed"); addAttribute(XML_MATHVARIANT, u"tailed"_ustr);
break; break;
case SmMlAttributeValueMathvariant::looped: case SmMlAttributeValueMathvariant::looped:
addAttribute(XML_MATHVARIANT, "looped"); addAttribute(XML_MATHVARIANT, u"looped"_ustr);
break; break;
case SmMlAttributeValueMathvariant::stretched: case SmMlAttributeValueMathvariant::stretched:
addAttribute(XML_MATHVARIANT, "stretched"); addAttribute(XML_MATHVARIANT, u"stretched"_ustr);
break; break;
default: default:
declareMlError(); declareMlError();

View File

@ -142,7 +142,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium)
// Set base URI // Set base URI
// needed for relative URLs; but it's OK to import e.g. MathML from the clipboard without one // needed for relative URLs; but it's OK to import e.g. MathML from the clipboard without one
SAL_INFO_IF(rMedium.GetBaseURL().isEmpty(), "starmath", "SmMLImportWrapper: no base URL"); SAL_INFO_IF(rMedium.GetBaseURL().isEmpty(), "starmath", "SmMLImportWrapper: no base URL");
xInfoSet->setPropertyValue("BaseURI", Any(rMedium.GetBaseURL())); xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(rMedium.GetBaseURL()));
// Fetch progress range // Fetch progress range
sal_Int32 nProgressRange(rMedium.IsStorage() ? 3 : 1); sal_Int32 nProgressRange(rMedium.IsStorage() ? 3 : 1);
@ -165,7 +165,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium)
aName = pDocHierarchItem->GetValue(); aName = pDocHierarchItem->GetValue();
if (!aName.isEmpty()) if (!aName.isEmpty())
xInfoSet->setPropertyValue("StreamRelPath", Any(aName)); xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, Any(aName));
} }
// Check if use OASIS ( new document format ) // Check if use OASIS ( new document format )
@ -513,12 +513,12 @@ ErrCode SmMLImportWrapper::ReadThroughComponentS(const uno::Reference<embed::XSt
// Determine if stream is encrypted or not // Determine if stream is encrypted or not
uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY);
Any aAny = xProps->getPropertyValue("Encrypted"); Any aAny = xProps->getPropertyValue(u"Encrypted"_ustr);
bool bEncrypted = false; bool bEncrypted = false;
aAny >>= bEncrypted; aAny >>= bEncrypted;
// Set base URL and open stream // Set base URL and open stream
rPropSet->setPropertyValue("StreamName", Any(OUString(pStreamName))); rPropSet->setPropertyValue(u"StreamName"_ustr, Any(OUString(pStreamName)));
Reference<io::XInputStream> xStream = xEventsStream->getInputStream(); Reference<io::XInputStream> xStream = xEventsStream->getInputStream();
// Execute read // Execute read
@ -592,14 +592,14 @@ Math_MLImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire( return cppu::acquire(
new SmMLImport(pCtx, "com.sun.star.comp.Math.XMLImporter", SvXMLImportFlags::ALL)); new SmMLImport(pCtx, u"com.sun.star.comp.Math.XMLImporter"_ustr, SvXMLImportFlags::ALL));
} }
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_MLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx, Math_MLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire(new SmMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisMetaImporter", return cppu::acquire(new SmMLImport(pCtx, u"com.sun.star.comp.Math.XMLOasisMetaImporter"_ustr,
SvXMLImportFlags::META)); SvXMLImportFlags::META));
} }
@ -607,8 +607,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_MLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx, Math_MLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire(new SmMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisSettingsImporter", return cppu::acquire(new SmMLImport(
SvXMLImportFlags::SETTINGS)); pCtx, u"com.sun.star.comp.Math.XMLOasisSettingsImporter"_ustr, SvXMLImportFlags::SETTINGS));
} }
// SmMLImportContext // SmMLImportContext

View File

@ -298,7 +298,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<embed::XStorage>&
// set Base URL // set Base URL
if (rPropSet.is()) if (rPropSet.is())
{ {
rPropSet->setPropertyValue("StreamName", Any(sStreamName)); rPropSet->setPropertyValue(u"StreamName"_ustr, Any(sStreamName));
} }
// write the stuff // write the stuff
@ -320,7 +320,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLExporter", return cppu::acquire(new SmXMLExport(context, u"com.sun.star.comp.Math.XMLExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::ALL)); SvXMLExportFlags::OASIS | SvXMLExportFlags::ALL));
} }
@ -328,15 +328,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLMetaExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLMetaExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire( return cppu::acquire(new SmXMLExport(context, u"com.sun.star.comp.Math.XMLMetaExporter"_ustr,
new SmXMLExport(context, "com.sun.star.comp.Math.XMLMetaExporter", SvXMLExportFlags::META)); SvXMLExportFlags::META));
} }
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLOasisMetaExporter", return cppu::acquire(new SmXMLExport(context,
u"com.sun.star.comp.Math.XMLOasisMetaExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::META)); SvXMLExportFlags::OASIS | SvXMLExportFlags::META));
} }
@ -344,15 +345,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLSettingsExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLSettingsExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLSettingsExporter", return cppu::acquire(new SmXMLExport(
SvXMLExportFlags::SETTINGS)); context, u"com.sun.star.comp.Math.XMLSettingsExporter"_ustr, SvXMLExportFlags::SETTINGS));
} }
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLOasisSettingsExporter", return cppu::acquire(new SmXMLExport(context,
u"com.sun.star.comp.Math.XMLOasisSettingsExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS)); SvXMLExportFlags::OASIS | SvXMLExportFlags::SETTINGS));
} }
@ -360,7 +362,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
Math_XMLContentExporter_get_implementation(css::uno::XComponentContext* context, Math_XMLContentExporter_get_implementation(css::uno::XComponentContext* context,
css::uno::Sequence<css::uno::Any> const&) css::uno::Sequence<css::uno::Any> const&)
{ {
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLContentExporter", return cppu::acquire(new SmXMLExport(context, u"com.sun.star.comp.Math.XMLContentExporter"_ustr,
SvXMLExportFlags::OASIS | SvXMLExportFlags::CONTENT)); SvXMLExportFlags::OASIS | SvXMLExportFlags::CONTENT));
} }

View File

@ -120,13 +120,13 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
} }
static const comphelper::PropertyMapEntry aInfoMap[] static const comphelper::PropertyMapEntry aInfoMap[]
= { { OUString("PrivateData"), 0, cppu::UnoType<XInterface>::get(), = { { u"PrivateData"_ustr, 0, cppu::UnoType<XInterface>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(), { u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(), { u"StreamRelPath"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 }, beans::PropertyAttribute::MAYBEVOID, 0 },
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(), { u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
beans::PropertyAttribute::MAYBEVOID, 0 } }; beans::PropertyAttribute::MAYBEVOID, 0 } };
uno::Reference<beans::XPropertySet> xInfoSet( uno::Reference<beans::XPropertySet> xInfoSet(
comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap))); comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap)));
@ -136,7 +136,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
// needed for relative URLs; but it's OK to import e.g. MathML from the // needed for relative URLs; but it's OK to import e.g. MathML from the
// clipboard without one // clipboard without one
SAL_INFO_IF(baseURI.isEmpty(), "starmath", "SmXMLImportWrapper: no base URL"); SAL_INFO_IF(baseURI.isEmpty(), "starmath", "SmXMLImportWrapper: no base URL");
xInfoSet->setPropertyValue("BaseURI", Any(baseURI)); xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(baseURI));
sal_Int32 nSteps = 3; sal_Int32 nSteps = 3;
if (!(rMedium.IsStorage())) if (!(rMedium.IsStorage()))
@ -157,7 +157,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
// TODO/LATER: handle the case of embedded links gracefully // TODO/LATER: handle the case of embedded links gracefully
if (bEmbedded) // && !rMedium.GetStorage()->IsRoot() ) if (bEmbedded) // && !rMedium.GetStorage()->IsRoot() )
{ {
OUString aName("dummyObjName"); OUString aName(u"dummyObjName"_ustr);
const SfxStringItem* pDocHierarchItem const SfxStringItem* pDocHierarchItem
= rMedium.GetItemSet().GetItem(SID_DOC_HIERARCHICALNAME); = rMedium.GetItemSet().GetItem(SID_DOC_HIERARCHICALNAME);
if (pDocHierarchItem) if (pDocHierarchItem)
@ -165,7 +165,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
if (!aName.isEmpty()) if (!aName.isEmpty())
{ {
xInfoSet->setPropertyValue("StreamRelPath", Any(aName)); xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, Any(aName));
} }
} }
@ -355,7 +355,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const uno::Reference<embed::XSt
// determine if stream is encrypted or not // determine if stream is encrypted or not
uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY); uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY);
Any aAny = xProps->getPropertyValue("Encrypted"); Any aAny = xProps->getPropertyValue(u"Encrypted"_ustr);
bool bEncrypted = false; bool bEncrypted = false;
if (aAny.getValueType() == cppu::UnoType<bool>::get()) if (aAny.getValueType() == cppu::UnoType<bool>::get())
aAny >>= bEncrypted; aAny >>= bEncrypted;
@ -363,7 +363,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const uno::Reference<embed::XSt
// set Base URL // set Base URL
if (rPropSet.is()) if (rPropSet.is())
{ {
rPropSet->setPropertyValue("StreamName", Any(sStreamName)); rPropSet->setPropertyValue(u"StreamName"_ustr, Any(sStreamName));
} }
Reference<io::XInputStream> xStream = xEventsStream->getInputStream(); Reference<io::XInputStream> xStream = xEventsStream->getInputStream();
@ -399,14 +399,14 @@ Math_XMLImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire( return cppu::acquire(
new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLImporter", SvXMLImportFlags::ALL)); new SmXMLImport(pCtx, u"com.sun.star.comp.Math.XMLImporter"_ustr, SvXMLImportFlags::ALL));
} }
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_XMLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx, Math_XMLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire(new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisMetaImporter", return cppu::acquire(new SmXMLImport(pCtx, u"com.sun.star.comp.Math.XMLOasisMetaImporter"_ustr,
SvXMLImportFlags::META)); SvXMLImportFlags::META));
} }
@ -414,8 +414,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
Math_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx, Math_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx,
uno::Sequence<uno::Any> const& /*rSeq*/) uno::Sequence<uno::Any> const& /*rSeq*/)
{ {
return cppu::acquire(new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisSettingsImporter", return cppu::acquire(new SmXMLImport(
SvXMLImportFlags::SETTINGS)); pCtx, u"com.sun.star.comp.Math.XMLOasisSettingsImporter"_ustr, SvXMLImportFlags::SETTINGS));
} }
void SmXMLImport::endDocument() void SmXMLImport::endDocument()
@ -1062,14 +1062,14 @@ void SmXMLFencedContext_Impl::endFastElement(sal_Int32 /*nElement*/)
else else
aToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(cBegin); aToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(cBegin);
if (aToken.eType == TERROR) if (aToken.eType == TERROR)
aToken = SmToken(TLPARENT, MS_LPARENT, "(", TG::LBrace, 5); aToken = SmToken(TLPARENT, MS_LPARENT, u"("_ustr, TG::LBrace, 5);
std::unique_ptr<SmNode> pLeft(new SmMathSymbolNode(aToken)); std::unique_ptr<SmNode> pLeft(new SmMathSymbolNode(aToken));
if (bIsStretchy) if (bIsStretchy)
aToken = starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl(cEnd); aToken = starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl(cEnd);
else else
aToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(cEnd); aToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(cEnd);
if (aToken.eType == TERROR) if (aToken.eType == TERROR)
aToken = SmToken(TRPARENT, MS_RPARENT, ")", TG::LBrace, 5); aToken = SmToken(TRPARENT, MS_RPARENT, u")"_ustr, TG::LBrace, 5);
std::unique_ptr<SmNode> pRight(new SmMathSymbolNode(aToken)); std::unique_ptr<SmNode> pRight(new SmMathSymbolNode(aToken));
SmNodeArray aRelationArray; SmNodeArray aRelationArray;
@ -1383,7 +1383,7 @@ void SmXMLOperatorContext_Impl::TCharacters(const OUString& rChars)
if (isPrefix) if (isPrefix)
bToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(aToken.cMathChar); bToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(aToken.cMathChar);
else if (isInfix) else if (isInfix)
bToken = SmToken(TMLINE, MS_VERTLINE, "mline", TG::NONE, 0); bToken = SmToken(TMLINE, MS_VERTLINE, u"mline"_ustr, TG::NONE, 0);
else if (isPostfix) else if (isPostfix)
bToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(aToken.cMathChar); bToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(aToken.cMathChar);
else else

File diff suppressed because it is too large Load Diff

View File

@ -550,7 +550,7 @@ void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace)
bool MathType::Parse(SotStorage *pStor) bool MathType::Parse(SotStorage *pStor)
{ {
rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream( rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream(
"Equation Native", u"Equation Native"_ustr,
StreamMode::STD_READ); StreamMode::STD_READ);
if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError())) if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError()))
return false; return false;
@ -1872,7 +1872,7 @@ bool MathType::ConvertFromStarMath( SfxMedium& rMedium )
rtl::Reference<SotStorage> pStor = new SotStorage(pStream, false); rtl::Reference<SotStorage> pStor = new SotStorage(pStream, false);
SvGlobalName aGName(MSO_EQUATION3_CLASSID); SvGlobalName aGName(MSO_EQUATION3_CLASSID);
pStor->SetClass( aGName, SotClipboardFormatId::NONE, "Microsoft Equation 3.0"); pStor->SetClass( aGName, SotClipboardFormatId::NONE, u"Microsoft Equation 3.0"_ustr);
static sal_uInt8 const aCompObj[] = { static sal_uInt8 const aCompObj[] = {
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00, 0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
@ -1889,7 +1889,7 @@ bool MathType::ConvertFromStarMath( SfxMedium& rMedium )
0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xB2, 0x71, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
}; };
rtl::Reference<SotStorageStream> xStor(pStor->OpenSotStream("\1CompObj")); rtl::Reference<SotStorageStream> xStor(pStor->OpenSotStream(u"\1CompObj"_ustr));
xStor->WriteBytes(aCompObj, sizeof(aCompObj)); xStor->WriteBytes(aCompObj, sizeof(aCompObj));
static sal_uInt8 const aOle[] = { static sal_uInt8 const aOle[] = {
@ -1897,12 +1897,12 @@ bool MathType::ConvertFromStarMath( SfxMedium& rMedium )
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00 0x00, 0x00, 0x00, 0x00
}; };
rtl::Reference<SotStorageStream> xStor2(pStor->OpenSotStream("\1Ole")); rtl::Reference<SotStorageStream> xStor2(pStor->OpenSotStream(u"\1Ole"_ustr));
xStor2->WriteBytes(aOle, sizeof(aOle)); xStor2->WriteBytes(aOle, sizeof(aOle));
xStor.clear(); xStor.clear();
xStor2.clear(); xStor2.clear();
rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream("Equation Native"); rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream(u"Equation Native"_ustr);
if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError())) if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError()))
return false; return false;

View File

@ -562,7 +562,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
SmTmpDevice aTmpDev (rDev, true); SmTmpDevice aTmpDev (rDev, true);
aTmpDev.SetFont(GetFont()); aTmpDev.SetFont(GetFont());
SmRect aRect(aTmpDev, &rFormat, "a", GetFont().GetBorderWidth()); SmRect aRect(aTmpDev, &rFormat, u"a"_ustr, GetFont().GetBorderWidth());
mnFormulaBaseline = GetAlignM(); mnFormulaBaseline = GetAlignM();
// move from middle position by constant - distance // move from middle position by constant - distance
// between middle and baseline for single letter // between middle and baseline for single letter
@ -621,7 +621,7 @@ void SmLineNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
//! be sure to use a character that has explicitly defined HiAttribut //! be sure to use a character that has explicitly defined HiAttribut
//! line in rect.cxx such as 'a' in order to make 'vec a' look same to //! line in rect.cxx such as 'a' in order to make 'vec a' look same to
//! 'vec {a}'. //! 'vec {a}'.
SmRect::operator = (SmRect(aTmpDev, &rFormat, "a", SmRect::operator = (SmRect(aTmpDev, &rFormat, u"a"_ustr,
GetFont().GetBorderWidth())); GetFont().GetBorderWidth()));
// make sure that the rectangle occupies (almost) no space // make sure that the rectangle occupies (almost) no space
SetWidth(1); SetWidth(1);

View File

@ -298,9 +298,9 @@ OUString SmOoxmlImport::handleBorderBox()
OUString SmOoxmlImport::handleD() OUString SmOoxmlImport::handleD()
{ {
m_rStream.ensureOpeningTag( M_TOKEN( d )); m_rStream.ensureOpeningTag( M_TOKEN( d ));
OUString opening = "("; OUString opening = u"("_ustr;
OUString closing = ")"; OUString closing = u")"_ustr;
OUString separator = "|"; OUString separator = u"|"_ustr;
if( XmlStream::Tag dPr = m_rStream.checkOpeningTag( M_TOKEN( dPr ))) if( XmlStream::Tag dPr = m_rStream.checkOpeningTag( M_TOKEN( dPr )))
{ {
if( XmlStream::Tag begChr = m_rStream.checkOpeningTag( M_TOKEN( begChr ))) if( XmlStream::Tag begChr = m_rStream.checkOpeningTag( M_TOKEN( begChr )))
@ -461,7 +461,7 @@ OUString SmOoxmlImport::handleGroupChr()
} }
if( XmlStream::Tag posTag = m_rStream.checkOpeningTag( M_TOKEN( pos ))) if( XmlStream::Tag posTag = m_rStream.checkOpeningTag( M_TOKEN( pos )))
{ {
if( posTag.attribute( M_TOKEN( val ), OUString( "bot" )) == "top" ) if( posTag.attribute( M_TOKEN( val ), u"bot"_ustr) == "top" )
pos = top; pos = top;
m_rStream.ensureClosingTag( M_TOKEN( pos )); m_rStream.ensureClosingTag( M_TOKEN( pos ));
} }

View File

@ -432,13 +432,13 @@ void SmParser5::NextToken() //Central part of the parser
// See https://bz.apache.org/ooo/show_bug.cgi?id=45779 // See https://bz.apache.org/ooo/show_bug.cgi?id=45779
aRes aRes
= m_aNumCC.parsePredefinedToken(KParseType::ASC_NUMBER, m_aBufferString, m_nBufferIndex, = m_aNumCC.parsePredefinedToken(KParseType::ASC_NUMBER, m_aBufferString, m_nBufferIndex,
coNumStartFlags, "", coNumContFlags, ""); coNumStartFlags, u""_ustr, coNumContFlags, u""_ustr);
if (aRes.TokenType == 0) if (aRes.TokenType == 0)
{ {
// Try again with the default token parsing. // Try again with the default token parsing.
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "", aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
coContFlags, ""); coContFlags, u""_ustr);
} }
nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace; nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace;
@ -668,9 +668,9 @@ void SmParser5::NextToken() //Central part of the parser
"unexpected comment start"); "unexpected comment start");
// get identifier of user-defined character // get identifier of user-defined character
ParseResult aTmpRes = m_pSysCC->parseAnyToken(m_aBufferString, rnEndPos, ParseResult aTmpRes = m_pSysCC->parseAnyToken(
KParseTokens::ANY_LETTER, "", m_aBufferString, rnEndPos, KParseTokens::ANY_LETTER, u""_ustr,
coUserDefinedCharContFlags, ""); coUserDefinedCharContFlags, u""_ustr);
sal_Int32 nTmpStart = rnEndPos + aTmpRes.LeadingWhiteSpace; sal_Int32 nTmpStart = rnEndPos + aTmpRes.LeadingWhiteSpace;
@ -984,8 +984,8 @@ void SmParser5::NextTokenColor(SmTokenType dvipload)
while (UnicodeType::SPACE_SEPARATOR == m_pSysCC->getType(m_aBufferString, m_nBufferIndex)) while (UnicodeType::SPACE_SEPARATOR == m_pSysCC->getType(m_aBufferString, m_nBufferIndex))
++m_nBufferIndex; ++m_nBufferIndex;
//parse, there are few options, so less strict. //parse, there are few options, so less strict.
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "", aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
coContFlags, ""); coContFlags, u""_ustr);
nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace; nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace;
m_nBufferIndex = nRealStart; m_nBufferIndex = nRealStart;
bCont = false; bCont = false;
@ -1066,13 +1066,13 @@ void SmParser5::NextTokenFontSize()
while (UnicodeType::SPACE_SEPARATOR == m_pSysCC->getType(m_aBufferString, m_nBufferIndex)) while (UnicodeType::SPACE_SEPARATOR == m_pSysCC->getType(m_aBufferString, m_nBufferIndex))
++m_nBufferIndex; ++m_nBufferIndex;
//hexadecimal parser //hexadecimal parser
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coNum16StartFlags, ".", aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coNum16StartFlags,
coNum16ContFlags, ".,"); u"."_ustr, coNum16ContFlags, u".,"_ustr);
if (aRes.TokenType == 0) if (aRes.TokenType == 0)
{ {
// Try again with the default token parsing. // Try again with the default token parsing.
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "", aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
coContFlags, ""); coContFlags, u""_ustr);
} }
else else
hex = true; hex = true;
@ -2495,12 +2495,12 @@ std::unique_ptr<SmNode> SmParser5::DoEvaluate()
// Create node // Create node
std::unique_ptr<SmStructureNode> xSNode(new SmBraceNode(m_aCurToken)); std::unique_ptr<SmStructureNode> xSNode(new SmBraceNode(m_aCurToken));
xSNode->SetSelection(m_aCurESelection); xSNode->SetSelection(m_aCurESelection);
SmToken aToken(TRLINE, MS_VERTLINE, "evaluate", TG::RBrace, 5); SmToken aToken(TRLINE, MS_VERTLINE, u"evaluate"_ustr, TG::RBrace, 5);
// Parse body && left none // Parse body && left none
NextToken(); NextToken();
std::unique_ptr<SmNode> pBody = DoPower(); std::unique_ptr<SmNode> pBody = DoPower();
SmToken bToken(TNONE, '\0', "", TG::LBrace, 5); SmToken bToken(TNONE, '\0', u""_ustr, TG::LBrace, 5);
std::unique_ptr<SmNode> pLeft; std::unique_ptr<SmNode> pLeft;
pLeft.reset(new SmMathSymbolNode(bToken)); pLeft.reset(new SmMathSymbolNode(bToken));

View File

@ -75,11 +75,11 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
bStorageOk = !aStorage->GetError(); bStorageOk = !aStorage->GetError();
if (bStorageOk) if (bStorageOk)
{ {
if ( aStorage->IsStream("Equation Native") ) if ( aStorage->IsStream(u"Equation Native"_ustr) )
{ {
sal_uInt8 nVersion; sal_uInt8 nVersion;
if ( GetMathTypeVersion( aStorage.get(), nVersion ) && nVersion <=3 ) if ( GetMathTypeVersion( aStorage.get(), nVersion ) && nVersion <=3 )
return "math_MathType_3x"; return u"math_MathType_3x"_ustr;
} }
} }
} }
@ -113,7 +113,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
0 == strncmp( "<math:math> ", aBuffer, 12)); 0 == strncmp( "<math:math> ", aBuffer, 12));
if ( bIsMathType ) if ( bIsMathType )
return "math_MathML_XML_Math"; return u"math_MathML_XML_Math"_ustr;
} }
} }
@ -123,7 +123,7 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
/* XServiceInfo */ /* XServiceInfo */
OUString SAL_CALL SmFilterDetect::getImplementationName() OUString SAL_CALL SmFilterDetect::getImplementationName()
{ {
return "com.sun.star.comp.math.FormatDetector"; return u"com.sun.star.comp.math.FormatDetector"_ustr;
} }
/* XServiceInfo */ /* XServiceInfo */
@ -135,7 +135,7 @@ sal_Bool SAL_CALL SmFilterDetect::supportsService( const OUString& sServiceName
/* XServiceInfo */ /* XServiceInfo */
Sequence< OUString > SAL_CALL SmFilterDetect::getSupportedServiceNames() Sequence< OUString > SAL_CALL SmFilterDetect::getSupportedServiceNames()
{ {
return { "com.sun.star.frame.ExtendedTypeDetection" }; return { u"com.sun.star.frame.ExtendedTypeDetection"_ustr };
} }
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*

View File

@ -55,7 +55,7 @@ namespace
SmModule* pModule = pUniqueModule.get(); SmModule* pModule = pUniqueModule.get();
SfxApplication::SetModule(SfxToolsModule::Math, std::move(pUniqueModule)); SfxApplication::SetModule(SfxToolsModule::Math, std::move(pUniqueModule));
rFactory.SetDocumentServiceName( "com.sun.star.formula.FormulaProperties" ); rFactory.SetDocumentServiceName( u"com.sun.star.formula.FormulaProperties"_ustr );
SmModule::RegisterInterface(pModule); SmModule::RegisterInterface(pModule);
SmDocShell::RegisterInterface(pModule); SmDocShell::RegisterInterface(pModule);

View File

@ -36,7 +36,7 @@ SmEditEngine::SmEditEngine(SfxItemPool* pItemPool)
EnableUndo(true); EnableUndo(true);
// Length in pixel of a tabulation // Length in pixel of a tabulation
SetDefTab(sal_uInt16(Application::GetDefaultDevice()->GetTextWidth("XXXX"))); SetDefTab(sal_uInt16(Application::GetDefaultDevice()->GetTextWidth(u"XXXX"_ustr)));
// Set default background color by theme // Set default background color by theme
SetBackgroundColor( SetBackgroundColor(
@ -48,7 +48,7 @@ SmEditEngine::SmEditEngine(SfxItemPool* pItemPool)
& EEControlBits(~EEControlBits::PASTESPECIAL)); & EEControlBits(~EEControlBits::PASTESPECIAL));
// Word delimiters for auto word selection by double click // Word delimiters for auto word selection by double click
SetWordDelimiters(" .=+-*/(){}[];\""); SetWordDelimiters(u" .=+-*/(){}[];\""_ustr);
// Default mapping mode // Default mapping mode
SetRefMapMode(MapMode(MapUnit::MapPixel)); SetRefMapMode(MapMode(MapUnit::MapPixel));

View File

@ -120,7 +120,7 @@ void SmModule::InitInterface_Impl()
SmModule::SmModule(SfxObjectFactory* pObjFact) SmModule::SmModule(SfxObjectFactory* pObjFact)
: SfxModule("sm"_ostr, {pObjFact}) : SfxModule("sm"_ostr, {pObjFact})
{ {
SetName("StarMath"); SetName(u"StarMath"_ustr);
SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this); SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this);
} }

View File

@ -27,8 +27,8 @@
SmSym::SmSym() : SmSym::SmSym() :
m_aUiName(OUString("unknown")), m_aUiName(u"unknown"_ustr),
m_aSetName(OUString("unknown")), m_aSetName(u"unknown"_ustr),
m_cChar('\0'), m_cChar('\0'),
m_bPredefined(false) m_bPredefined(false)
{ {

View File

@ -62,7 +62,7 @@ sal_Bool MathTypeFilter::filter(const uno::Sequence<beans::PropertyValue>& rDesc
{ {
rtl::Reference<SotStorage> aStorage(new SotStorage(pStream.get(), false)); rtl::Reference<SotStorage> aStorage(new SotStorage(pStream.get(), false));
// Is this a MathType Storage? // Is this a MathType Storage?
if (aStorage->IsStream("Equation Native")) if (aStorage->IsStream(u"Equation Native"_ustr))
{ {
if (auto pModel = dynamic_cast<SmModel*>(m_xDstDoc.get())) if (auto pModel = dynamic_cast<SmModel*>(m_xDstDoc.get()))
{ {
@ -94,7 +94,10 @@ void MathTypeFilter::setTargetDocument(const uno::Reference<lang::XComponent>& x
m_xDstDoc = xDoc; m_xDstDoc = xDoc;
} }
OUString MathTypeFilter::getImplementationName() { return "com.sun.star.comp.Math.MathTypeFilter"; } OUString MathTypeFilter::getImplementationName()
{
return u"com.sun.star.comp.Math.MathTypeFilter"_ustr;
}
sal_Bool MathTypeFilter::supportsService(const OUString& rServiceName) sal_Bool MathTypeFilter::supportsService(const OUString& rServiceName)
{ {
@ -103,7 +106,7 @@ sal_Bool MathTypeFilter::supportsService(const OUString& rServiceName)
uno::Sequence<OUString> MathTypeFilter::getSupportedServiceNames() uno::Sequence<OUString> MathTypeFilter::getSupportedServiceNames()
{ {
return { "com.sun.star.document.ImportFilter" }; return { u"com.sun.star.document.ImportFilter"_ustr };
} }
extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface* extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*

View File

@ -80,36 +80,36 @@ SmPrintUIOptions::SmPrintUIOptions()
// load the math PrinterOptions into the custom tab // load the math PrinterOptions into the custom tab
m_aUIProperties[nIdx].Name = "OptionsUIFile"; m_aUIProperties[nIdx].Name = "OptionsUIFile";
m_aUIProperties[nIdx++].Value <<= OUString("modules/smath/ui/printeroptions.ui"); m_aUIProperties[nIdx++].Value <<= u"modules/smath/ui/printeroptions.ui"_ustr;
// create Section for formula (results in an extra tab page in dialog) // create Section for formula (results in an extra tab page in dialog)
SvtModuleOptions aOpt; SvtModuleOptions aOpt;
OUString aAppGroupname( OUString aAppGroupname(
SmResId( RID_PRINTUIOPT_PRODNAME ). SmResId( RID_PRINTUIOPT_PRODNAME ).
replaceFirst( "%s", aOpt.GetModuleName( SvtModuleOptions::EModule::MATH ) ) ); replaceFirst( "%s", aOpt.GetModuleName( SvtModuleOptions::EModule::MATH ) ) );
m_aUIProperties[nIdx++].Value = setGroupControlOpt("tabcontrol-page2", aAppGroupname, ".HelpID:vcl:PrintDialog:TabPage:AppPage"); m_aUIProperties[nIdx++].Value = setGroupControlOpt(u"tabcontrol-page2"_ustr, aAppGroupname, u".HelpID:vcl:PrintDialog:TabPage:AppPage"_ustr);
// create subgroup for print options // create subgroup for print options
m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("contents", SmResId( RID_PRINTUIOPT_CONTENTS ), OUString()); m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(u"contents"_ustr, SmResId( RID_PRINTUIOPT_CONTENTS ), OUString());
// create a bool option for title row (matches to SID_PRINTTITLE) // create a bool option for title row (matches to SID_PRINTTITLE)
m_aUIProperties[nIdx++].Value = setBoolControlOpt("title", SmResId( RID_PRINTUIOPT_TITLE ), m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"title"_ustr, SmResId( RID_PRINTUIOPT_TITLE ),
".HelpID:vcl:PrintDialog:TitleRow:CheckBox", u".HelpID:vcl:PrintDialog:TitleRow:CheckBox"_ustr,
PRTUIOPT_TITLE_ROW, PRTUIOPT_TITLE_ROW,
pConfig->IsPrintTitle()); pConfig->IsPrintTitle());
// create a bool option for formula text (matches to SID_PRINTTEXT) // create a bool option for formula text (matches to SID_PRINTTEXT)
m_aUIProperties[nIdx++].Value = setBoolControlOpt("formulatext", SmResId( RID_PRINTUIOPT_FRMLTXT ), m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"formulatext"_ustr, SmResId( RID_PRINTUIOPT_FRMLTXT ),
".HelpID:vcl:PrintDialog:FormulaText:CheckBox", u".HelpID:vcl:PrintDialog:FormulaText:CheckBox"_ustr,
PRTUIOPT_FORMULA_TEXT, PRTUIOPT_FORMULA_TEXT,
pConfig->IsPrintFormulaText()); pConfig->IsPrintFormulaText());
// create a bool option for border (matches to SID_PRINTFRAME) // create a bool option for border (matches to SID_PRINTFRAME)
m_aUIProperties[nIdx++].Value = setBoolControlOpt("borders", SmResId( RID_PRINTUIOPT_BORDERS ), m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"borders"_ustr, SmResId( RID_PRINTUIOPT_BORDERS ),
".HelpID:vcl:PrintDialog:Border:CheckBox", u".HelpID:vcl:PrintDialog:Border:CheckBox"_ustr,
PRTUIOPT_BORDER, PRTUIOPT_BORDER,
pConfig->IsPrintFrame()); pConfig->IsPrintFrame());
// create subgroup for print format // create subgroup for print format
m_aUIProperties[nIdx++].Value = setSubgroupControlOpt("size", SmResId( RID_PRINTUIOPT_SIZE ), OUString()); m_aUIProperties[nIdx++].Value = setSubgroupControlOpt(u"size"_ustr, SmResId( RID_PRINTUIOPT_SIZE ), OUString());
// create a radio button group for print format (matches to SID_PRINTSIZE) // create a radio button group for print format (matches to SID_PRINTSIZE)
Sequence< OUString > aChoices{ Sequence< OUString > aChoices{
@ -118,14 +118,14 @@ SmPrintUIOptions::SmPrintUIOptions()
SmResId( RID_PRINTUIOPT_SCALING ) SmResId( RID_PRINTUIOPT_SCALING )
}; };
Sequence< OUString > aHelpIds{ Sequence< OUString > aHelpIds{
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0", u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0"_ustr,
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1", u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1"_ustr,
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2" u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2"_ustr
}; };
Sequence< OUString > aWidgetIds{ Sequence< OUString > aWidgetIds{
"originalsize", u"originalsize"_ustr,
"fittopage", u"fittopage"_ustr,
"scaling" u"scaling"_ustr
}; };
OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT ); OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT );
m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(), m_aUIProperties[nIdx++].Value = setChoiceRadiosControlOpt(aWidgetIds, OUString(),
@ -136,15 +136,15 @@ SmPrintUIOptions::SmPrintUIOptions()
// create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM) // create a numeric box for scale dependent on PrintFormat = "Scaling" (matches to SID_PRINTZOOM)
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, true ); vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, true );
m_aUIProperties[nIdx++].Value = setRangeControlOpt("scalingspin", OUString(), m_aUIProperties[nIdx++].Value = setRangeControlOpt(u"scalingspin"_ustr, OUString(),
".HelpID:vcl:PrintDialog:PrintScale:NumericField", u".HelpID:vcl:PrintDialog:PrintScale:NumericField"_ustr,
PRTUIOPT_PRINT_SCALE, PRTUIOPT_PRINT_SCALE,
pConfig->GetPrintZoomFactor(), // initial value pConfig->GetPrintZoomFactor(), // initial value
10, // min value 10, // min value
1000, // max value 1000, // max value
aRangeOpt); aRangeOpt);
Sequence aHintNoLayoutPage{ comphelper::makePropertyValue("HintNoLayoutPage", true) }; Sequence aHintNoLayoutPage{ comphelper::makePropertyValue(u"HintNoLayoutPage"_ustr, true) };
m_aUIProperties[nIdx++].Value <<= aHintNoLayoutPage; m_aUIProperties[nIdx++].Value <<= aHintNoLayoutPage;
assert(nIdx == nNumProps); assert(nIdx == nNumProps);
@ -236,80 +236,80 @@ static const rtl::Reference<PropertySetInfo> & lcl_createModelPropertyInfo ()
{ {
static const PropertyMapEntry aModelPropertyInfoMap[] = static const PropertyMapEntry aModelPropertyInfoMap[] =
{ {
{ OUString("Alignment") , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { u"Alignment"_ustr , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
{ OUString("BaseFontHeight") , HANDLE_BASE_FONT_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { u"BaseFontHeight"_ustr , HANDLE_BASE_FONT_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
{ OUString("BasicLibraries") , HANDLE_BASIC_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 }, { u"BasicLibraries"_ustr , HANDLE_BASIC_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 },
{ OUString("BottomMargin") , HANDLE_BOTTOM_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BOTTOMSPACE }, { u"BottomMargin"_ustr , HANDLE_BOTTOM_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BOTTOMSPACE },
{ OUString("CustomFontNameFixed") , HANDLE_CUSTOM_FONT_NAME_FIXED , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FIXED }, { u"CustomFontNameFixed"_ustr , HANDLE_CUSTOM_FONT_NAME_FIXED , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FIXED },
{ OUString("CustomFontNameSans") , HANDLE_CUSTOM_FONT_NAME_SANS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SANS }, { u"CustomFontNameSans"_ustr , HANDLE_CUSTOM_FONT_NAME_SANS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SANS },
{ OUString("CustomFontNameSerif") , HANDLE_CUSTOM_FONT_NAME_SERIF , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SERIF }, { u"CustomFontNameSerif"_ustr , HANDLE_CUSTOM_FONT_NAME_SERIF , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SERIF },
{ OUString("DialogLibraries") , HANDLE_DIALOG_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 }, { u"DialogLibraries"_ustr , HANDLE_DIALOG_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 },
{ OUString("FontFixedIsBold") , HANDLE_CUSTOM_FONT_FIXED_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED }, { u"FontFixedIsBold"_ustr , HANDLE_CUSTOM_FONT_FIXED_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED },
{ OUString("FontFixedIsItalic") , HANDLE_CUSTOM_FONT_FIXED_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED }, { u"FontFixedIsItalic"_ustr , HANDLE_CUSTOM_FONT_FIXED_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED },
{ OUString("FontFunctionsIsBold") , HANDLE_FONT_FUNCTIONS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION }, { u"FontFunctionsIsBold"_ustr , HANDLE_FONT_FUNCTIONS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION },
{ OUString("FontFunctionsIsItalic") , HANDLE_FONT_FUNCTIONS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION }, { u"FontFunctionsIsItalic"_ustr , HANDLE_FONT_FUNCTIONS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION },
{ OUString("FontMathIsBold") , HANDLE_FONT_MATH_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH }, { u"FontMathIsBold"_ustr , HANDLE_FONT_MATH_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH },
{ OUString("FontMathIsItalic") , HANDLE_FONT_MATH_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH }, { u"FontMathIsItalic"_ustr , HANDLE_FONT_MATH_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH },
{ OUString("FontNameFunctions") , HANDLE_FONT_NAME_FUNCTIONS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FUNCTION }, { u"FontNameFunctions"_ustr , HANDLE_FONT_NAME_FUNCTIONS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FUNCTION },
{ OUString("FontNameMath") , HANDLE_FONT_NAME_MATH , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_MATH }, { u"FontNameMath"_ustr , HANDLE_FONT_NAME_MATH , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_MATH },
{ OUString("FontNameNumbers") , HANDLE_FONT_NAME_NUMBERS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_NUMBER }, { u"FontNameNumbers"_ustr , HANDLE_FONT_NAME_NUMBERS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_NUMBER },
{ OUString("FontNameText") , HANDLE_FONT_NAME_TEXT , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_TEXT }, { u"FontNameText"_ustr , HANDLE_FONT_NAME_TEXT , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_TEXT },
{ OUString("FontNameVariables") , HANDLE_FONT_NAME_VARIABLES , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_VARIABLE }, { u"FontNameVariables"_ustr , HANDLE_FONT_NAME_VARIABLES , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_VARIABLE },
{ OUString("FontNumbersIsBold") , HANDLE_FONT_NUMBERS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER }, { u"FontNumbersIsBold"_ustr , HANDLE_FONT_NUMBERS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER },
{ OUString("FontNumbersIsItalic") , HANDLE_FONT_NUMBERS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER }, { u"FontNumbersIsItalic"_ustr , HANDLE_FONT_NUMBERS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER },
{ OUString("FontSansIsBold") , HANDLE_CUSTOM_FONT_SANS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS }, { u"FontSansIsBold"_ustr , HANDLE_CUSTOM_FONT_SANS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS },
{ OUString("FontSansIsItalic") , HANDLE_CUSTOM_FONT_SANS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS }, { u"FontSansIsItalic"_ustr , HANDLE_CUSTOM_FONT_SANS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS },
{ OUString("FontSerifIsBold") , HANDLE_CUSTOM_FONT_SERIF_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF }, { u"FontSerifIsBold"_ustr , HANDLE_CUSTOM_FONT_SERIF_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF },
{ OUString("FontSerifIsItalic") , HANDLE_CUSTOM_FONT_SERIF_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF }, { u"FontSerifIsItalic"_ustr , HANDLE_CUSTOM_FONT_SERIF_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF },
{ OUString("FontTextIsBold") , HANDLE_FONT_TEXT_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT }, { u"FontTextIsBold"_ustr , HANDLE_FONT_TEXT_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT },
{ OUString("FontTextIsItalic") , HANDLE_FONT_TEXT_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT }, { u"FontTextIsItalic"_ustr , HANDLE_FONT_TEXT_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT },
{ OUString("FontVariablesIsBold") , HANDLE_FONT_VARIABLES_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE }, { u"FontVariablesIsBold"_ustr , HANDLE_FONT_VARIABLES_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE },
{ OUString("FontVariablesIsItalic") , HANDLE_FONT_VARIABLES_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE }, { u"FontVariablesIsItalic"_ustr , HANDLE_FONT_VARIABLES_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE },
{ OUString("Formula") , HANDLE_FORMULA , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 }, { u"Formula"_ustr , HANDLE_FORMULA , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 },
{ OUString("IsScaleAllBrackets") , HANDLE_IS_SCALE_ALL_BRACKETS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { u"IsScaleAllBrackets"_ustr , HANDLE_IS_SCALE_ALL_BRACKETS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
{ OUString("IsTextMode") , HANDLE_IS_TEXT_MODE , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { u"IsTextMode"_ustr , HANDLE_IS_TEXT_MODE , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
{ OUString("IsRightToLeft") , HANDLE_IS_RIGHT_TO_LEFT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { u"IsRightToLeft"_ustr , HANDLE_IS_RIGHT_TO_LEFT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
{ OUString("GreekCharStyle") , HANDLE_GREEK_CHAR_STYLE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { u"GreekCharStyle"_ustr , HANDLE_GREEK_CHAR_STYLE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
{ OUString("LeftMargin") , HANDLE_LEFT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LEFTSPACE }, { u"LeftMargin"_ustr , HANDLE_LEFT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LEFTSPACE },
{ OUString("PrinterName") , HANDLE_PRINTER_NAME , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 }, { u"PrinterName"_ustr , HANDLE_PRINTER_NAME , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 },
{ OUString("PrinterSetup") , HANDLE_PRINTER_SETUP , cppu::UnoType<const Sequence < sal_Int8 >>::get(), PROPERTY_NONE, 0 }, { u"PrinterSetup"_ustr , HANDLE_PRINTER_SETUP , cppu::UnoType<const Sequence < sal_Int8 >>::get(), PROPERTY_NONE, 0 },
{ OUString("RelativeBracketDistance") , HANDLE_RELATIVE_BRACKET_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSPACE }, { u"RelativeBracketDistance"_ustr , HANDLE_RELATIVE_BRACKET_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSPACE },
{ OUString("RelativeBracketExcessSize") , HANDLE_RELATIVE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSIZE }, { u"RelativeBracketExcessSize"_ustr , HANDLE_RELATIVE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSIZE },
{ OUString("RelativeFontHeightFunctions") , HANDLE_RELATIVE_FONT_HEIGHT_FUNCTIONS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_FUNCTION }, { u"RelativeFontHeightFunctions"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_FUNCTIONS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_FUNCTION },
{ OUString("RelativeFontHeightIndices") , HANDLE_RELATIVE_FONT_HEIGHT_INDICES , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_INDEX }, { u"RelativeFontHeightIndices"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_INDICES , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_INDEX },
{ OUString("RelativeFontHeightLimits") , HANDLE_RELATIVE_FONT_HEIGHT_LIMITS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_LIMITS }, { u"RelativeFontHeightLimits"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_LIMITS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_LIMITS },
{ OUString("RelativeFontHeightOperators") , HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_OPERATOR }, { u"RelativeFontHeightOperators"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_OPERATOR },
{ OUString("RelativeFontHeightText") , HANDLE_RELATIVE_FONT_HEIGHT_TEXT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_TEXT }, { u"RelativeFontHeightText"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_TEXT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_TEXT },
{ OUString("RelativeFractionBarExcessLength") , HANDLE_RELATIVE_FRACTION_BAR_EXCESS_LENGTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_FRACTION }, { u"RelativeFractionBarExcessLength"_ustr , HANDLE_RELATIVE_FRACTION_BAR_EXCESS_LENGTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_FRACTION },
{ OUString("RelativeFractionBarLineWeight") , HANDLE_RELATIVE_FRACTION_BAR_LINE_WEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_STROKEWIDTH }, { u"RelativeFractionBarLineWeight"_ustr , HANDLE_RELATIVE_FRACTION_BAR_LINE_WEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_STROKEWIDTH },
{ OUString("RelativeFractionDenominatorDepth") , HANDLE_RELATIVE_FRACTION_DENOMINATOR_DEPTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_DENOMINATOR }, { u"RelativeFractionDenominatorDepth"_ustr , HANDLE_RELATIVE_FRACTION_DENOMINATOR_DEPTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_DENOMINATOR },
{ OUString("RelativeFractionNumeratorHeight") , HANDLE_RELATIVE_FRACTION_NUMERATOR_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NUMERATOR }, { u"RelativeFractionNumeratorHeight"_ustr , HANDLE_RELATIVE_FRACTION_NUMERATOR_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NUMERATOR },
{ OUString("RelativeIndexSubscript") , HANDLE_RELATIVE_INDEX_SUBSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUBSCRIPT }, { u"RelativeIndexSubscript"_ustr , HANDLE_RELATIVE_INDEX_SUBSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUBSCRIPT },
{ OUString("RelativeIndexSuperscript") , HANDLE_RELATIVE_INDEX_SUPERSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUPERSCRIPT }, { u"RelativeIndexSuperscript"_ustr , HANDLE_RELATIVE_INDEX_SUPERSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUPERSCRIPT },
{ OUString("RelativeLineSpacing") , HANDLE_RELATIVE_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_VERTICAL }, { u"RelativeLineSpacing"_ustr , HANDLE_RELATIVE_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_VERTICAL },
{ OUString("RelativeLowerLimitDistance") , HANDLE_RELATIVE_LOWER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LOWERLIMIT }, { u"RelativeLowerLimitDistance"_ustr , HANDLE_RELATIVE_LOWER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LOWERLIMIT },
{ OUString("RelativeMatrixColumnSpacing") , HANDLE_RELATIVE_MATRIX_COLUMN_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXCOL }, { u"RelativeMatrixColumnSpacing"_ustr , HANDLE_RELATIVE_MATRIX_COLUMN_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXCOL },
{ OUString("RelativeMatrixLineSpacing") , HANDLE_RELATIVE_MATRIX_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXROW }, { u"RelativeMatrixLineSpacing"_ustr , HANDLE_RELATIVE_MATRIX_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXROW },
{ OUString("RelativeOperatorExcessSize") , HANDLE_RELATIVE_OPERATOR_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSIZE }, { u"RelativeOperatorExcessSize"_ustr , HANDLE_RELATIVE_OPERATOR_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSIZE },
{ OUString("RelativeOperatorSpacing") , HANDLE_RELATIVE_OPERATOR_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSPACE }, { u"RelativeOperatorSpacing"_ustr , HANDLE_RELATIVE_OPERATOR_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSPACE },
{ OUString("RelativeRootSpacing") , HANDLE_RELATIVE_ROOT_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ROOT }, { u"RelativeRootSpacing"_ustr , HANDLE_RELATIVE_ROOT_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ROOT },
{ OUString("RelativeScaleBracketExcessSize") , HANDLE_RELATIVE_SCALE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NORMALBRACKETSIZE }, { u"RelativeScaleBracketExcessSize"_ustr , HANDLE_RELATIVE_SCALE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NORMALBRACKETSIZE },
{ OUString("RelativeSpacing") , HANDLE_RELATIVE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_HORIZONTAL }, { u"RelativeSpacing"_ustr , HANDLE_RELATIVE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_HORIZONTAL },
{ OUString("RelativeSymbolMinimumHeight") , HANDLE_RELATIVE_SYMBOL_MINIMUM_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSPACE }, { u"RelativeSymbolMinimumHeight"_ustr , HANDLE_RELATIVE_SYMBOL_MINIMUM_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSPACE },
{ OUString("RelativeSymbolPrimaryHeight") , HANDLE_RELATIVE_SYMBOL_PRIMARY_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSIZE }, { u"RelativeSymbolPrimaryHeight"_ustr , HANDLE_RELATIVE_SYMBOL_PRIMARY_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSIZE },
{ OUString("RelativeUpperLimitDistance") , HANDLE_RELATIVE_UPPER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_UPPERLIMIT }, { u"RelativeUpperLimitDistance"_ustr , HANDLE_RELATIVE_UPPER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_UPPERLIMIT },
{ OUString("RightMargin") , HANDLE_RIGHT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_RIGHTSPACE }, { u"RightMargin"_ustr , HANDLE_RIGHT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_RIGHTSPACE },
{ OUString("RuntimeUID") , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 }, { u"RuntimeUID"_ustr , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 },
{ OUString("SaveThumbnail") , HANDLE_SAVE_THUMBNAIL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { u"SaveThumbnail"_ustr , HANDLE_SAVE_THUMBNAIL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
{ OUString("Symbols") , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 }, { u"Symbols"_ustr , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 },
{ OUString("UserDefinedSymbolsInUse") , HANDLE_USED_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PropertyAttribute::READONLY, 0 }, { u"UserDefinedSymbolsInUse"_ustr , HANDLE_USED_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PropertyAttribute::READONLY, 0 },
{ OUString("TopMargin") , HANDLE_TOP_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_TOPSPACE }, { u"TopMargin"_ustr , HANDLE_TOP_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_TOPSPACE },
// #i33095# Security Options // #i33095# Security Options
{ OUString("LoadReadonly") , HANDLE_LOAD_READONLY , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 }, { u"LoadReadonly"_ustr , HANDLE_LOAD_READONLY , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
// #i972# // #i972#
{ OUString("BaseLine") , HANDLE_BASELINE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { u"BaseLine"_ustr , HANDLE_BASELINE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
{ OUString("InteropGrabBag") , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get(), PROPERTY_NONE, 0 }, { u"InteropGrabBag"_ustr , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::get(), PROPERTY_NONE, 0 },
{ OUString("SyntaxVersion") , HANDLE_STARMATH_VERSION , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 }, { u"SyntaxVersion"_ustr , HANDLE_STARMATH_VERSION , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
}; };
static const rtl::Reference<PropertySetInfo> PROPS_INFO = new PropertySetInfo ( aModelPropertyInfoMap ); static const rtl::Reference<PropertySetInfo> PROPS_INFO = new PropertySetInfo ( aModelPropertyInfoMap );
return PROPS_INFO; return PROPS_INFO;
@ -385,7 +385,7 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
OUString SmModel::getImplementationName() OUString SmModel::getImplementationName()
{ {
return "com.sun.star.comp.Math.FormulaDocument"; return u"com.sun.star.comp.Math.FormulaDocument"_ustr;
} }
sal_Bool SmModel::supportsService(const OUString& rServiceName) sal_Bool SmModel::supportsService(const OUString& rServiceName)

View File

@ -106,14 +106,14 @@ using namespace css::accessibility;
using namespace css::uno; using namespace css::uno;
SmGraphicWindow::SmGraphicWindow(SmViewShell& rShell) SmGraphicWindow::SmGraphicWindow(SmViewShell& rShell)
: InterimItemWindow(&rShell.GetViewFrame().GetWindow(), "modules/smath/ui/mathwindow.ui", "MathWindow") : InterimItemWindow(&rShell.GetViewFrame().GetWindow(), u"modules/smath/ui/mathwindow.ui"_ustr, u"MathWindow"_ustr)
, nLinePixH(GetSettings().GetStyleSettings().GetScrollBarSize()) , nLinePixH(GetSettings().GetStyleSettings().GetScrollBarSize())
, nColumnPixW(nLinePixH) , nColumnPixW(nLinePixH)
, nZoom(100) , nZoom(100)
// continue to use user-scrolling to make this work equivalent to how it 'always' worked // continue to use user-scrolling to make this work equivalent to how it 'always' worked
, mxScrolledWindow(m_xBuilder->weld_scrolled_window("scrolledwindow", true)) , mxScrolledWindow(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true))
, mxGraphic(new SmGraphicWidget(rShell, *this)) , mxGraphic(new SmGraphicWidget(rShell, *this))
, mxGraphicWin(new weld::CustomWeld(*m_xBuilder, "mathview", *mxGraphic)) , mxGraphicWin(new weld::CustomWeld(*m_xBuilder, u"mathview"_ustr, *mxGraphic))
{ {
InitControlBase(mxGraphic->GetDrawingArea()); InitControlBase(mxGraphic->GetDrawingArea());
@ -940,13 +940,13 @@ void SmEditController::StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemStat
/**************************************************************************/ /**************************************************************************/
SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWindow, SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWindow,
vcl::Window *pParent) vcl::Window *pParent)
: SfxDockingWindow(pBindings_, pChildWindow, pParent, "EditWindow", "modules/smath/ui/editwindow.ui") : SfxDockingWindow(pBindings_, pChildWindow, pParent, u"EditWindow"_ustr, u"modules/smath/ui/editwindow.ui"_ustr)
, m_xEdit(new SmEditWindow(*this, *m_xBuilder)) , m_xEdit(new SmEditWindow(*this, *m_xBuilder))
, aController(*m_xEdit, SID_TEXT, *pBindings_) , aController(*m_xEdit, SID_TEXT, *pBindings_)
, bExiting(false) , bExiting(false)
, aInitialFocusTimer("SmCmdBoxWindow aInitialFocusTimer") , aInitialFocusTimer("SmCmdBoxWindow aInitialFocusTimer")
{ {
set_id("math_edit"); set_id(u"math_edit"_ustr);
SetHelpId( HID_SMA_COMMAND_WIN ); SetHelpId( HID_SMA_COMMAND_WIN );
SetSizePixel(LogicToPixel(Size(292 , 94), MapMode(MapUnit::MapAppFont))); SetSizePixel(LogicToPixel(Size(292 , 94), MapMode(MapUnit::MapAppFont)));
@ -977,7 +977,7 @@ void SmCmdBoxWindow::ShowContextMenu(const Point& rPos)
ToTop(); ToTop();
SmViewShell *pViewSh = GetView(); SmViewShell *pViewSh = GetView();
if (pViewSh) if (pViewSh)
pViewSh->GetViewFrame().GetDispatcher()->ExecutePopup("edit", this, &rPos); pViewSh->GetViewFrame().GetDispatcher()->ExecutePopup(u"edit"_ustr, this, &rPos);
} }
void SmCmdBoxWindow::Command(const CommandEvent& rCEvt) void SmCmdBoxWindow::Command(const CommandEvent& rCEvt)
@ -1298,7 +1298,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage(); uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage();
if (xStorage.is() && xStorage->getElementNames().hasElements()) if (xStorage.is() && xStorage->getElementNames().hasElements())
{ {
if (xStorage->hasByName("content.xml")) if (xStorage->hasByName(u"content.xml"_ustr))
{ {
// is this a fabulous math package ? // is this a fabulous math package ?
rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(pDoc->GetModel().get())); rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(pDoc->GetModel().get()));
@ -1590,7 +1590,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
SotClipboardFormatId nId = SotClipboardFormatId::MATHML; SotClipboardFormatId nId = SotClipboardFormatId::MATHML;
if (aDataHelper.HasFormat(nId)) if (aDataHelper.HasFormat(nId))
{ {
xStrm = aDataHelper.GetInputStream(nId, ""); xStrm = aDataHelper.GetInputStream(nId, u""_ustr);
if (xStrm.is()) if (xStrm.is())
{ {
SfxMedium aClipboardMedium; SfxMedium aClipboardMedium;
@ -2017,7 +2017,7 @@ public:
} }
private: private:
static OUString GetContextName() { return "Math"; } // Static constant for now static OUString GetContextName() { return u"Math"_ustr; } // Static constant for now
rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler; rtl::Reference<svx::sidebar::SelectionChangeHandler> mpSelectionChangeHandler;
}; };
@ -2031,7 +2031,7 @@ SmViewShell::SmViewShell(SfxViewFrame& rFrame_, SfxViewShell *)
{ {
SetStatusText(OUString()); SetStatusText(OUString());
SetWindow(mxGraphicWindow.get()); SetWindow(mxGraphicWindow.get());
SfxShell::SetName("SmView"); SfxShell::SetName(u"SmView"_ustr);
SfxShell::SetUndoManager( &GetDoc()->GetEditEngine().GetUndoManager() ); SfxShell::SetUndoManager( &GetDoc()->GetEditEngine().GetUndoManager() );
SetController(new SmController(*this)); SetController(new SmController(*this));
} }