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:
parent
1d83ac544d
commit
b56ca52cef
@ -1055,7 +1055,7 @@ class SmPlaceNode final : public SmMathSymbolNode
|
||||
public:
|
||||
explicit SmPlaceNode(const SmToken &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
|
||||
|
@ -70,7 +70,7 @@ void Test::tearDown()
|
||||
|
||||
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);
|
||||
|
||||
SmCursor aCursor(xTree.get(), xDocShRef.get());
|
||||
@ -88,13 +88,13 @@ void Test::testCopyPaste()
|
||||
aCursor.Paste();
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
SmCursor aCursor(xTree.get(), xDocShRef.get());
|
||||
@ -116,13 +116,13 @@ void Test::testCopySelectPaste()
|
||||
aCursor.Paste();
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
SmCursor aCursor(xTree.get(), xDocShRef.get());
|
||||
@ -140,13 +140,13 @@ void Test::testCutPaste()
|
||||
aCursor.Paste();
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
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);
|
||||
|
||||
SmCursor aCursor(xTree.get(), xDocShRef.get());
|
||||
@ -168,7 +168,7 @@ void Test::testCutSelectPaste()
|
||||
aCursor.Paste();
|
||||
|
||||
#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
|
||||
}
|
||||
|
||||
|
@ -23,7 +23,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("starmath/qa/cppunit/data/")
|
||||
: UnoApiTest(u"starmath/qa/cppunit/data/"_ustr)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -68,10 +68,10 @@ void NodeTest::testTdf47813()
|
||||
{
|
||||
SmParser5 aParser;
|
||||
#define MATRIX "matrix {-2#33##4#-5##6,0#7}"
|
||||
auto pNodeA = aParser.Parse(MATRIX);
|
||||
auto pNodeC = aParser.Parse("alignc " MATRIX);
|
||||
auto pNodeL = aParser.Parse("alignl " MATRIX);
|
||||
auto pNodeR = aParser.Parse("alignr " MATRIX);
|
||||
auto pNodeA = aParser.Parse(u"" MATRIX ""_ustr);
|
||||
auto pNodeC = aParser.Parse(u"alignc " MATRIX ""_ustr);
|
||||
auto pNodeL = aParser.Parse(u"alignl " MATRIX ""_ustr);
|
||||
auto pNodeR = aParser.Parse(u"alignr " MATRIX ""_ustr);
|
||||
#undef MATRIX
|
||||
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
|
||||
SmFormat aFmt;
|
||||
@ -115,26 +115,26 @@ void NodeTest::testTdf52225()
|
||||
{
|
||||
SmFormat aFormat = mxDocShell->GetFormat();
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int16(2), aFormat.GetGreekCharStyle()); // default format = 2
|
||||
CHECK_GREEK_SYMBOL("%ALPHA", u'\x0391', false);
|
||||
CHECK_GREEK_SYMBOL("%iALPHA", u'\x0391', true);
|
||||
CHECK_GREEK_SYMBOL("%alpha", u'\x03b1', true);
|
||||
CHECK_GREEK_SYMBOL("%ialpha", u'\x03b1', true);
|
||||
CHECK_GREEK_SYMBOL(u"%ALPHA"_ustr, u'\x0391', false);
|
||||
CHECK_GREEK_SYMBOL(u"%iALPHA"_ustr, u'\x0391', true);
|
||||
CHECK_GREEK_SYMBOL(u"%alpha"_ustr, u'\x03b1', true);
|
||||
CHECK_GREEK_SYMBOL(u"%ialpha"_ustr, u'\x03b1', true);
|
||||
|
||||
// mode 1
|
||||
aFormat.SetGreekCharStyle(1);
|
||||
mxDocShell->SetFormat(aFormat);
|
||||
CHECK_GREEK_SYMBOL("%BETA", u'\x0392', true);
|
||||
CHECK_GREEK_SYMBOL("%iBETA", u'\x0392', true);
|
||||
CHECK_GREEK_SYMBOL("%beta", u'\x03b2', true);
|
||||
CHECK_GREEK_SYMBOL("%ibeta", u'\x03b2', true);
|
||||
CHECK_GREEK_SYMBOL(u"%BETA"_ustr, u'\x0392', true);
|
||||
CHECK_GREEK_SYMBOL(u"%iBETA"_ustr, u'\x0392', true);
|
||||
CHECK_GREEK_SYMBOL(u"%beta"_ustr, u'\x03b2', true);
|
||||
CHECK_GREEK_SYMBOL(u"%ibeta"_ustr, u'\x03b2', true);
|
||||
|
||||
// mode 0
|
||||
aFormat.SetGreekCharStyle(0);
|
||||
mxDocShell->SetFormat(aFormat);
|
||||
CHECK_GREEK_SYMBOL("%GAMMA", u'\x0393', false);
|
||||
CHECK_GREEK_SYMBOL("%iGAMMA", u'\x0393', true);
|
||||
CHECK_GREEK_SYMBOL("%gamma", u'\x03b3', false);
|
||||
CHECK_GREEK_SYMBOL("%igamma", u'\x03b3', true);
|
||||
CHECK_GREEK_SYMBOL(u"%GAMMA"_ustr, u'\x0393', false);
|
||||
CHECK_GREEK_SYMBOL(u"%iGAMMA"_ustr, u'\x0393', true);
|
||||
CHECK_GREEK_SYMBOL(u"%gamma"_ustr, u'\x03b3', false);
|
||||
CHECK_GREEK_SYMBOL(u"%igamma"_ustr, u'\x03b3', true);
|
||||
|
||||
#undef CHECK_GREEK_SYMBOL
|
||||
}
|
||||
|
@ -524,7 +524,7 @@ void Test::testBinomInBinHor()
|
||||
|
||||
// tack +d on the end, which will put the binom into an SmBinHorNode
|
||||
aCursor.InsertElement(PlusElement);
|
||||
aCursor.InsertText("d");
|
||||
aCursor.InsertText(u"d"_ustr);
|
||||
|
||||
sExpected += "{ { binom a { b + c } } + d }";
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binom Node in BinHor Node", sExpected, xDocShRef->GetText());
|
||||
@ -552,7 +552,7 @@ void Test::testBinVerInUnary()
|
||||
// set up a fraction
|
||||
aCursor.InsertFraction();
|
||||
aCursor.Move(pOutputDevice, MoveDown);
|
||||
aCursor.InsertText("2");
|
||||
aCursor.InsertText(u"2"_ustr);
|
||||
|
||||
sExpected += "- { 1 over 2 }";
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("Binary Vertical in Unary Operator", sExpected,
|
||||
@ -569,25 +569,25 @@ void Test::testBinHorInSubSup()
|
||||
ScopedVclPtrInstance<VirtualDevice> pOutputDevice;
|
||||
|
||||
// Insert an RSup expression with a BinHor for the exponent
|
||||
aCursor.InsertText("a");
|
||||
aCursor.InsertText(u"a"_ustr);
|
||||
aCursor.InsertSubSup(RSUP);
|
||||
aCursor.InsertText("b");
|
||||
aCursor.InsertText(u"b"_ustr);
|
||||
aCursor.InsertElement(PlusElement);
|
||||
aCursor.InsertText("c");
|
||||
aCursor.InsertText(u"c"_ustr);
|
||||
|
||||
// Move to the end and add d to the expression
|
||||
aCursor.Move(pOutputDevice, MoveRight);
|
||||
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());
|
||||
}
|
||||
|
||||
void Test::testUnaryInMixedNumberAsNumerator()
|
||||
{
|
||||
// set up a unary operator
|
||||
auto pTree = SmParser5().Parse("- 1");
|
||||
auto pTree = SmParser5().Parse(u"- 1"_ustr);
|
||||
pTree->Prepare(xDocShRef->GetFormat(), *xDocShRef, 0);
|
||||
|
||||
SmCursor aCursor(pTree.get(), xDocShRef.get());
|
||||
@ -604,13 +604,13 @@ void Test::testUnaryInMixedNumberAsNumerator()
|
||||
// Set up a fraction
|
||||
aCursor.InsertFraction();
|
||||
aCursor.Move(pOutputDevice, MoveDown);
|
||||
aCursor.InsertText("2");
|
||||
aCursor.InsertText(u"2"_ustr);
|
||||
|
||||
// Move left and turn this into a mixed number
|
||||
// (bad form, but this could happen right?)
|
||||
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
|
||||
for (size_t i = 0; i < 8; ++i)
|
||||
@ -618,10 +618,10 @@ void Test::testUnaryInMixedNumberAsNumerator()
|
||||
|
||||
// add 4 to the end
|
||||
aCursor.InsertElement(PlusElement);
|
||||
aCursor.InsertText("4");
|
||||
aCursor.InsertText(u"4"_ustr);
|
||||
|
||||
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()
|
||||
|
@ -63,7 +63,7 @@ void ParseTest::tearDown()
|
||||
*/
|
||||
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());
|
||||
const SmNode *pNode0 = pNode->GetSubNode(0);
|
||||
CPPUNIT_ASSERT(pNode0);
|
||||
@ -79,14 +79,14 @@ void ParseTest::testMinus()
|
||||
// GetText() vs GetToken().aText
|
||||
CPPUNIT_ASSERT_EQUAL(OUString(MS_MINUS),
|
||||
static_cast<const SmMathSymbolNode *>(pNode000)->GetText());
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("-"),
|
||||
CPPUNIT_ASSERT_EQUAL(u"-"_ustr,
|
||||
static_cast<const SmMathSymbolNode *>(pNode000)->GetToken().aText);
|
||||
const SmNode *pNode001 = pNode00->GetSubNode(1);
|
||||
CPPUNIT_ASSERT(pNode001);
|
||||
CPPUNIT_ASSERT_EQUAL(SmNodeType::Text, pNode001->GetType());
|
||||
// GetText() vs GetToken().aText
|
||||
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);
|
||||
}
|
||||
|
||||
@ -96,7 +96,7 @@ void ParseTest::testMinus()
|
||||
*/
|
||||
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());
|
||||
const SmNode *pNode0 = pNode->GetSubNode(0);
|
||||
CPPUNIT_ASSERT(pNode0);
|
||||
@ -110,7 +110,7 @@ void ParseTest::testNospace()
|
||||
const SmNode *pNode000 = pNode00->GetSubNode(0);
|
||||
CPPUNIT_ASSERT(pNode000);
|
||||
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);
|
||||
const SmNode *pNode001 = pNode00->GetSubNode(1);
|
||||
CPPUNIT_ASSERT(pNode001);
|
||||
|
@ -148,7 +148,7 @@ void Test::testSmTmpDeviceRestoreFont()
|
||||
{
|
||||
ScopedVclPtrInstance<Printer> pPrinter;
|
||||
|
||||
OUString aFontName("Linux Libertine G");
|
||||
OUString aFontName(u"Linux Libertine G"_ustr);
|
||||
CPPUNIT_ASSERT(pPrinter->IsFontAvailable(aFontName));
|
||||
|
||||
vcl::Font aOriginalFont = pPrinter->GetFont();
|
||||
@ -178,7 +178,7 @@ void Test::editMarker()
|
||||
{
|
||||
SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow();
|
||||
{
|
||||
OUString sMarkedText("<?> under <?> under <?>");
|
||||
OUString sMarkedText(u"<?> under <?> under <?>"_ustr);
|
||||
rEditWindow.SetText(sMarkedText);
|
||||
rEditWindow.Flush();
|
||||
OUString sFinalText = rEditWindow.GetText();
|
||||
@ -190,12 +190,12 @@ void Test::editMarker()
|
||||
|
||||
rEditWindow.SelNextMark();
|
||||
rEditWindow.Delete();
|
||||
rEditWindow.InsertText("a");
|
||||
rEditWindow.InsertText(u"a"_ustr);
|
||||
|
||||
rEditWindow.SelNextMark();
|
||||
rEditWindow.SelNextMark();
|
||||
rEditWindow.Delete();
|
||||
rEditWindow.InsertText("c");
|
||||
rEditWindow.InsertText(u"c"_ustr);
|
||||
|
||||
// should be safe i.e. do nothing
|
||||
rEditWindow.SelNextMark();
|
||||
@ -207,7 +207,7 @@ void Test::editMarker()
|
||||
|
||||
rEditWindow.SelPrevMark();
|
||||
rEditWindow.Delete();
|
||||
rEditWindow.InsertText("b");
|
||||
rEditWindow.InsertText(u"b"_ustr);
|
||||
|
||||
// tdf#106116: should be safe i.e. do nothing
|
||||
rEditWindow.SelPrevMark();
|
||||
@ -219,7 +219,7 @@ void Test::editMarker()
|
||||
|
||||
rEditWindow.Flush();
|
||||
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()
|
||||
{
|
||||
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();
|
||||
|
||||
@ -263,7 +263,7 @@ void Test::editFailure()
|
||||
|
||||
void Test::ParseErrorUnexpectedToken()
|
||||
{
|
||||
m_xDocShRef->SetText("\\foo");
|
||||
m_xDocShRef->SetText(u"\\foo"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::UnexpectedToken expected",
|
||||
@ -272,7 +272,7 @@ void Test::ParseErrorUnexpectedToken()
|
||||
|
||||
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();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::PoundExpected expected",
|
||||
@ -281,7 +281,7 @@ void Test::ParseErrorPoundExpected()
|
||||
|
||||
void Test::ParseErrorColorExpected()
|
||||
{
|
||||
m_xDocShRef->SetText("color 42 x");
|
||||
m_xDocShRef->SetText(u"color 42 x"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ColorExpected expected",
|
||||
@ -290,7 +290,7 @@ void Test::ParseErrorColorExpected()
|
||||
|
||||
void Test::ParseErrorLgroupExpected()
|
||||
{
|
||||
m_xDocShRef->SetText("stack 42");
|
||||
m_xDocShRef->SetText(u"stack 42"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LgroupExpected expected",
|
||||
@ -299,7 +299,7 @@ void Test::ParseErrorLgroupExpected()
|
||||
|
||||
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();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RgroupExpected expected",
|
||||
@ -308,7 +308,7 @@ void Test::ParseErrorRgroupExpected()
|
||||
|
||||
void Test::ParseErrorLbraceExpected()
|
||||
{
|
||||
m_xDocShRef->SetText("left 42");
|
||||
m_xDocShRef->SetText(u"left 42"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::LbraceExpected expected",
|
||||
@ -317,7 +317,7 @@ void Test::ParseErrorLbraceExpected()
|
||||
|
||||
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();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RbraceExpected expected",
|
||||
@ -326,7 +326,7 @@ void Test::ParseErrorRbraceExpected()
|
||||
|
||||
void Test::ParseErrorParentMismatch()
|
||||
{
|
||||
m_xDocShRef->SetText("lbrace foo rceil");
|
||||
m_xDocShRef->SetText(u"lbrace foo rceil"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::ParentMismatch expected",
|
||||
@ -335,7 +335,7 @@ void Test::ParseErrorParentMismatch()
|
||||
|
||||
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();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::RightExpected expected",
|
||||
@ -344,7 +344,7 @@ void Test::ParseErrorRightExpected()
|
||||
|
||||
void Test::ParseErrorFontExpected()
|
||||
{
|
||||
m_xDocShRef->SetText("font small bar");
|
||||
m_xDocShRef->SetText(u"font small bar"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::FontExpected expected",
|
||||
@ -353,7 +353,7 @@ void Test::ParseErrorFontExpected()
|
||||
|
||||
void Test::ParseErrorSizeExpected()
|
||||
{
|
||||
m_xDocShRef->SetText("size small baz");
|
||||
m_xDocShRef->SetText(u"size small baz"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::SizeExpected expected",
|
||||
@ -362,7 +362,7 @@ void Test::ParseErrorSizeExpected()
|
||||
|
||||
void Test::ParseErrorDoubleAlign()
|
||||
{
|
||||
m_xDocShRef->SetText("alignl alignc x");
|
||||
m_xDocShRef->SetText(u"alignl alignc x"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleAlign expected",
|
||||
@ -371,7 +371,7 @@ void Test::ParseErrorDoubleAlign()
|
||||
|
||||
void Test::ParseErrorDoubleSubsupscript()
|
||||
{
|
||||
m_xDocShRef->SetText("x_y_z");
|
||||
m_xDocShRef->SetText(u"x_y_z"_ustr);
|
||||
const SmErrorDesc *pErrorDesc = m_xDocShRef->GetParser()->NextError();
|
||||
CPPUNIT_ASSERT(pErrorDesc);
|
||||
CPPUNIT_ASSERT_EQUAL_MESSAGE("SmParseError::DoubleSubsupscript expected",
|
||||
@ -382,7 +382,7 @@ void Test::editUndoRedo()
|
||||
{
|
||||
EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
|
||||
|
||||
OUString sStringOne("a under b");
|
||||
OUString sStringOne(u"a under b"_ustr);
|
||||
{
|
||||
rEditEngine.SetText(0, sStringOne);
|
||||
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);
|
||||
m_xDocShRef->UpdateText();
|
||||
OUString sFinalText = m_xDocShRef->GetText();
|
||||
@ -437,11 +437,11 @@ void Test::replacePlaceholder()
|
||||
SmEditWindow& rEditWindow = m_pSmCmdBoxWindow->GetEditWindow();
|
||||
// Test the placeholder replacement. In this case, testing 'a + b', it
|
||||
// should return '+a + b' when selecting '+<?>' in ElementsDock
|
||||
rEditWindow.SetText("a + b");
|
||||
rEditWindow.SetText(u"a + b"_ustr);
|
||||
rEditWindow.SelectAll();
|
||||
rEditWindow.InsertText("+<?>");
|
||||
rEditWindow.InsertText(u"+<?>"_ustr);
|
||||
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()
|
||||
@ -451,7 +451,7 @@ void Test::viewZoom()
|
||||
EditEngine &rEditEngine = m_xDocShRef->GetEditEngine();
|
||||
|
||||
{
|
||||
OUString sStringOne("a under b");
|
||||
OUString sStringOne(u"a under b"_ustr);
|
||||
rEditEngine.SetText(0, sStringOne);
|
||||
m_xDocShRef->UpdateText();
|
||||
OUString sFinalText = m_xDocShRef->GetText();
|
||||
|
@ -24,7 +24,7 @@ class MathMLExportTest : public UnoApiXmlTest
|
||||
{
|
||||
public:
|
||||
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()
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/smath");
|
||||
mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText("x`y~~z");
|
||||
save("MathML XML (Math)");
|
||||
pDocShell->SetText(u"x`y~~z"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
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[2]"_ostr, "width"_ostr, "4em");
|
||||
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, u"4em"_ustr);
|
||||
}
|
||||
|
||||
void MathMLExportTest::testTdf97049()
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/smath");
|
||||
mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText("intd {{1 over x} dx}");
|
||||
save("MathML XML (Math)");
|
||||
pDocShell->SetText(u"intd {{1 over x} dx}"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
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);
|
||||
CPPUNIT_ASSERT_EQUAL(sal_Int32(1), aContent.getLength());
|
||||
CPPUNIT_ASSERT_EQUAL(u'\x222B', aContent[0]);
|
||||
@ -83,35 +83,37 @@ void MathMLExportTest::testTdf97049()
|
||||
|
||||
void MathMLExportTest::checkMathVariant(SmDocShell& rDocShell, bool bCapital, bool bSmall)
|
||||
{
|
||||
rDocShell.SetText("%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} "
|
||||
"%gamma %igamma {ital %gamma} {nitalic %igamma}");
|
||||
save("MathML XML (Math)");
|
||||
rDocShell.SetText(u"%GAMMA %iGAMMA {ital %GAMMA} {nitalic %iGAMMA} "
|
||||
"%gamma %igamma {ital %gamma} {nitalic %igamma}"_ustr);
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
if (bCapital)
|
||||
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[1]"_ostr, "mathvariant"_ostr);
|
||||
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,
|
||||
"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,
|
||||
"normal");
|
||||
u"normal"_ustr);
|
||||
if (bSmall)
|
||||
assertXPathNoAttribute(pDoc, "/m:math/m:semantics/m:mrow/m:mi[3]"_ostr, "mathvariant"_ostr);
|
||||
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,
|
||||
"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,
|
||||
"normal");
|
||||
rDocShell.SetText("");
|
||||
u"normal"_ustr);
|
||||
rDocShell.SetText(u""_ustr);
|
||||
}
|
||||
|
||||
void MathMLExportTest::testTdf101022()
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/smath");
|
||||
mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
|
||||
@ -126,27 +128,27 @@ void MathMLExportTest::testTdf101022()
|
||||
|
||||
void MathMLExportTest::testMaj()
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/smath");
|
||||
mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(
|
||||
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);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
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,
|
||||
u"\U0001EEF0"_ustr);
|
||||
}
|
||||
|
||||
void MathMLExportTest::testHadd()
|
||||
{
|
||||
mxComponent = loadFromDesktop("private:factory/smath");
|
||||
mxComponent = loadFromDesktop(u"private:factory/smath"_ustr);
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
pDocShell->SetText(u"hadd to { \U0001EE4E } from { \U0001EE4E } \U0001EE4E"_ustr);
|
||||
save("MathML XML (Math)");
|
||||
save(u"MathML XML (Math)"_ustr);
|
||||
xmlDocUniquePtr pDoc = parseXml(maTempFile);
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
assertXPathContent(pDoc, "/m:math/m:semantics/m:mrow/m:munderover/m:mi"_ostr,
|
||||
|
@ -21,7 +21,7 @@ class Test : public UnoApiTest
|
||||
{
|
||||
public:
|
||||
Test()
|
||||
: UnoApiTest("starmath/qa/extras/data/")
|
||||
: UnoApiTest(u"starmath/qa/extras/data/"_ustr)
|
||||
{
|
||||
}
|
||||
|
||||
@ -61,26 +61,26 @@ void Test::testColor()
|
||||
loadFromFile(u"color.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
CPPUNIT_ASSERT_EQUAL(OUString("{ color black b"
|
||||
" color white w"
|
||||
" color red r"
|
||||
" color green g"
|
||||
" color blue b"
|
||||
" color yellow y"
|
||||
" color silver s"
|
||||
" color gray g"
|
||||
" color maroon m"
|
||||
" color purple p"
|
||||
" color lime l"
|
||||
" color olive o"
|
||||
" color navy n"
|
||||
" color teal t"
|
||||
" color aqua a"
|
||||
" color fuchsia f"
|
||||
" color crimson c"
|
||||
" color dvip apricot"
|
||||
" a color yellow y"
|
||||
" color rgb 220 20 61 x }"),
|
||||
CPPUNIT_ASSERT_EQUAL(u"{ color black b"
|
||||
" color white w"
|
||||
" color red r"
|
||||
" color green g"
|
||||
" color blue b"
|
||||
" color yellow y"
|
||||
" color silver s"
|
||||
" color gray g"
|
||||
" color maroon m"
|
||||
" color purple p"
|
||||
" color lime l"
|
||||
" color olive o"
|
||||
" color navy n"
|
||||
" color teal t"
|
||||
" color aqua a"
|
||||
" color fuchsia f"
|
||||
" color crimson c"
|
||||
" color dvip apricot"
|
||||
" a color yellow y"
|
||||
" color rgb 220 20 61 x }"_ustr,
|
||||
pDocShell->GetText());
|
||||
}
|
||||
|
||||
@ -89,7 +89,7 @@ void Test::testSimple()
|
||||
loadFromFile(u"simple.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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());
|
||||
}
|
||||
|
||||
@ -98,7 +98,7 @@ void Test::testNsPrefixMath()
|
||||
loadFromFile(u"ns-prefix-math.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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());
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ void Test::testMaction()
|
||||
loadFromFile(u"maction.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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());
|
||||
}
|
||||
|
||||
@ -116,7 +116,7 @@ void Test::testMspace()
|
||||
loadFromFile(u"mspace.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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()
|
||||
@ -124,7 +124,7 @@ void Test::testtdf99556()
|
||||
loadFromFile(u"tdf99556-1.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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()
|
||||
@ -132,10 +132,9 @@ void Test::testTdf103430()
|
||||
loadFromFile(u"tdf103430.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
OUString("{ frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
|
||||
"apricot nitalic d font sans bold italic color red x } } }"),
|
||||
pDocShell->GetText());
|
||||
CPPUNIT_ASSERT_EQUAL(u"{ frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
|
||||
"apricot nitalic d font sans bold italic color red x } } }"_ustr,
|
||||
pDocShell->GetText());
|
||||
}
|
||||
|
||||
void Test::testTdf103500()
|
||||
@ -143,10 +142,9 @@ void Test::testTdf103500()
|
||||
loadFromFile(u"tdf103500.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
SmDocShell* pDocShell = static_cast<SmDocShell*>(pModel->GetObjectShell());
|
||||
CPPUNIT_ASSERT_EQUAL(
|
||||
OUString("{ { int csup b csub a { { frac { 1 } { x } } ` nitalic d x } } = { "
|
||||
"intd csup b csub a { { frac { 1 } { y } } ` nitalic d y } } }"),
|
||||
pDocShell->GetText());
|
||||
CPPUNIT_ASSERT_EQUAL(u"{ { int csup b csub a { { frac { 1 } { x } } ` nitalic d x } } = { "
|
||||
"intd csup b csub a { { frac { 1 } { y } } ` nitalic d y } } }"_ustr,
|
||||
pDocShell->GetText());
|
||||
}
|
||||
|
||||
void Test::testTdf137008()
|
||||
@ -155,7 +153,7 @@ void Test::testTdf137008()
|
||||
loadFromFile(u"tdf137008.mml");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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()
|
||||
@ -164,7 +162,7 @@ void Test::testTdf151842()
|
||||
loadFromFile(u"tdf151842.odf");
|
||||
SfxBaseModel* pModel = dynamic_cast<SfxBaseModel*>(mxComponent.get());
|
||||
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();
|
||||
|
||||
// Without the fix in place, this test would have failed with
|
||||
|
@ -41,10 +41,12 @@ std::unique_ptr<PanelLayout> SmElementsPanel::Create(weld::Widget& rParent,
|
||||
}
|
||||
|
||||
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)
|
||||
, mxCategoryList(m_xBuilder->weld_combo_box("categorylist"))
|
||||
, mxElementsControl(std::make_unique<SmElementsControl>(m_xBuilder->weld_icon_view("elements")))
|
||||
, mxCategoryList(m_xBuilder->weld_combo_box(u"categorylist"_ustr))
|
||||
, mxElementsControl(
|
||||
std::make_unique<SmElementsControl>(m_xBuilder->weld_icon_view(u"elements"_ustr)))
|
||||
{
|
||||
for (const auto& rCategoryId : SmElementsControl::categories())
|
||||
mxCategoryList->append_text(SmResId(rCategoryId));
|
||||
|
@ -62,10 +62,12 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
|
||||
try
|
||||
{
|
||||
const comphelper::NamedValueCollection aArguments(Arguments);
|
||||
auto xFrame(aArguments.getOrDefault("Frame", css::uno::Reference<css::frame::XFrame>()));
|
||||
auto xParentWindow(
|
||||
aArguments.getOrDefault("ParentWindow", css::uno::Reference<css::awt::XWindow>()));
|
||||
const sal_uInt64 nBindingsValue(aArguments.getOrDefault("SfxBindings", sal_uInt64(0)));
|
||||
auto xFrame(
|
||||
aArguments.getOrDefault(u"Frame"_ustr, css::uno::Reference<css::frame::XFrame>()));
|
||||
auto xParentWindow(aArguments.getOrDefault(u"ParentWindow"_ustr,
|
||||
css::uno::Reference<css::awt::XWindow>()));
|
||||
const sal_uInt64 nBindingsValue(
|
||||
aArguments.getOrDefault(u"SfxBindings"_ustr, sal_uInt64(0)));
|
||||
SfxBindings* pBindings = reinterpret_cast<SfxBindings*>(nBindingsValue);
|
||||
|
||||
weld::Widget* pParent(nullptr);
|
||||
@ -73,11 +75,13 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
|
||||
pParent = pTunnel->getWidget();
|
||||
|
||||
if (!pParent)
|
||||
throw css::uno::RuntimeException("SmPanelFactory::createUIElement: no ParentWindow");
|
||||
throw css::uno::RuntimeException(
|
||||
u"SmPanelFactory::createUIElement: no ParentWindow"_ustr);
|
||||
if (!xFrame)
|
||||
throw css::uno::RuntimeException("SmPanelFactory::createUIElement: no Frame");
|
||||
throw css::uno::RuntimeException(u"SmPanelFactory::createUIElement: no Frame"_ustr);
|
||||
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;
|
||||
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&)
|
||||
{
|
||||
css::uno::Any anyEx = cppu::getCaughtException();
|
||||
throw css::lang::WrappedTargetRuntimeException("SmPanelFactory::createUIElement exception",
|
||||
nullptr, anyEx);
|
||||
throw css::lang::WrappedTargetRuntimeException(
|
||||
u"SmPanelFactory::createUIElement exception"_ustr, nullptr, anyEx);
|
||||
}
|
||||
|
||||
return {};
|
||||
@ -111,7 +115,7 @@ css::uno::Reference<css::ui::XUIElement> SAL_CALL SmPanelFactory::createUIElemen
|
||||
|
||||
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)
|
||||
@ -121,7 +125,7 @@ sal_Bool SmPanelFactory::supportsService(OUString const& ServiceName)
|
||||
|
||||
css::uno::Sequence<OUString> SmPanelFactory::getSupportedServiceNames()
|
||||
{
|
||||
return { "com.sun.star.ui.UIElementFactory" };
|
||||
return { u"com.sun.star.ui.UIElementFactory"_ustr };
|
||||
}
|
||||
|
||||
} // end of unnamed namespace
|
||||
|
@ -41,12 +41,13 @@ SmPropertiesPanel::Create(weld::Widget& rParent,
|
||||
|
||||
SmPropertiesPanel::SmPropertiesPanel(weld::Widget& rParent,
|
||||
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)
|
||||
, mpFormatFontsButton(m_xBuilder->weld_button("btnFormatFonts"))
|
||||
, mpFormatFontSizeButton(m_xBuilder->weld_button("btnFormatFontSize"))
|
||||
, mpFormatSpacingButton(m_xBuilder->weld_button("btnFormatSpacing"))
|
||||
, mpFormatAlignmentButton(m_xBuilder->weld_button("btnFormatAlignment"))
|
||||
, mpFormatFontsButton(m_xBuilder->weld_button(u"btnFormatFonts"_ustr))
|
||||
, mpFormatFontSizeButton(m_xBuilder->weld_button(u"btnFormatFontSize"_ustr))
|
||||
, mpFormatSpacingButton(m_xBuilder->weld_button(u"btnFormatSpacing"_ustr))
|
||||
, mpFormatAlignmentButton(m_xBuilder->weld_button(u"btnFormatAlignment"_ustr))
|
||||
, maButtonCommands{ { mpFormatFontsButton.get(), ".uno:ChangeFont" },
|
||||
{ mpFormatFontSizeButton.get(), ".uno:ChangeFontSize" },
|
||||
{ mpFormatSpacingButton.get(), ".uno:ChangeDistance" },
|
||||
@ -56,12 +57,13 @@ SmPropertiesPanel::SmPropertiesPanel(weld::Widget& rParent,
|
||||
auto xConfs
|
||||
= css::frame::theUICommandDescription::get(comphelper::getProcessComponentContext());
|
||||
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)
|
||||
{
|
||||
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()));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -723,7 +723,7 @@ sal_Bool SAL_CALL SmGraphicAccessible::scrollSubstringTo( sal_Int32, sal_Int32,
|
||||
|
||||
OUString SAL_CALL SmGraphicAccessible::getImplementationName()
|
||||
{
|
||||
return "SmGraphicAccessible";
|
||||
return u"SmGraphicAccessible"_ustr;
|
||||
}
|
||||
|
||||
sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
|
||||
@ -735,10 +735,10 @@ sal_Bool SAL_CALL SmGraphicAccessible::supportsService(
|
||||
Sequence< OUString > SAL_CALL SmGraphicAccessible::getSupportedServiceNames()
|
||||
{
|
||||
return {
|
||||
"css::accessibility::Accessible",
|
||||
"css::accessibility::AccessibleComponent",
|
||||
"css::accessibility::AccessibleContext",
|
||||
"css::accessibility::AccessibleText"
|
||||
u"css::accessibility::Accessible"_ustr,
|
||||
u"css::accessibility::AccessibleComponent"_ustr,
|
||||
u"css::accessibility::AccessibleContext"_ustr,
|
||||
u"css::accessibility::AccessibleText"_ustr
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -48,41 +48,41 @@ constexpr OUString FONT_FORMAT_LIST = u"FontFormatList"_ustr;
|
||||
static Sequence< OUString > lcl_GetFontPropertyNames()
|
||||
{
|
||||
return Sequence< OUString > {
|
||||
"Name",
|
||||
"CharSet",
|
||||
"Family",
|
||||
"Pitch",
|
||||
"Weight",
|
||||
"Italic"
|
||||
u"Name"_ustr,
|
||||
u"CharSet"_ustr,
|
||||
u"Family"_ustr,
|
||||
u"Pitch"_ustr,
|
||||
u"Weight"_ustr,
|
||||
u"Italic"_ustr
|
||||
};
|
||||
}
|
||||
|
||||
static Sequence< OUString > lcl_GetSymbolPropertyNames()
|
||||
{
|
||||
return Sequence< OUString > {
|
||||
"Char",
|
||||
"Set",
|
||||
"Predefined",
|
||||
"FontFormatId"
|
||||
u"Char"_ustr,
|
||||
u"Set"_ustr,
|
||||
u"Predefined"_ustr,
|
||||
u"FontFormatId"_ustr
|
||||
};
|
||||
}
|
||||
|
||||
static Sequence<OUString> lcl_GetOtherPropertyNames()
|
||||
{
|
||||
return Sequence<OUString>{ "LoadSave/IsSaveOnlyUsedSymbols",
|
||||
"Misc/AutoCloseBrackets",
|
||||
"Misc/DefaultSmSyntaxVersion",
|
||||
"Misc/IgnoreSpacesRight",
|
||||
"Misc/InlineEditEnable",
|
||||
"Misc/SmEditWindowZoomFactor",
|
||||
"Print/FormulaText",
|
||||
"Print/Frame",
|
||||
"Print/Size",
|
||||
"Print/Title",
|
||||
"Print/ZoomFactor",
|
||||
"View/AutoRedraw",
|
||||
"View/FormulaCursor",
|
||||
"View/ToolboxVisible" };
|
||||
return Sequence<OUString>{ u"LoadSave/IsSaveOnlyUsedSymbols"_ustr,
|
||||
u"Misc/AutoCloseBrackets"_ustr,
|
||||
u"Misc/DefaultSmSyntaxVersion"_ustr,
|
||||
u"Misc/IgnoreSpacesRight"_ustr,
|
||||
u"Misc/InlineEditEnable"_ustr,
|
||||
u"Misc/SmEditWindowZoomFactor"_ustr,
|
||||
u"Print/FormulaText"_ustr,
|
||||
u"Print/Frame"_ustr,
|
||||
u"Print/Size"_ustr,
|
||||
u"Print/Title"_ustr,
|
||||
u"Print/ZoomFactor"_ustr,
|
||||
u"View/AutoRedraw"_ustr,
|
||||
u"View/FormulaCursor"_ustr,
|
||||
u"View/ToolboxVisible"_ustr };
|
||||
}
|
||||
|
||||
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 !
|
||||
//! see respective load/save routines here
|
||||
return Sequence< OUString > {
|
||||
"StandardFormat/Textmode",
|
||||
"StandardFormat/RightToLeft",
|
||||
"StandardFormat/GreekCharStyle",
|
||||
"StandardFormat/ScaleNormalBracket",
|
||||
"StandardFormat/HorizontalAlignment",
|
||||
"StandardFormat/BaseSize",
|
||||
"StandardFormat/TextSize",
|
||||
"StandardFormat/IndexSize",
|
||||
"StandardFormat/FunctionSize",
|
||||
"StandardFormat/OperatorSize",
|
||||
"StandardFormat/LimitsSize",
|
||||
"StandardFormat/Distance/Horizontal",
|
||||
"StandardFormat/Distance/Vertical",
|
||||
"StandardFormat/Distance/Root",
|
||||
"StandardFormat/Distance/SuperScript",
|
||||
"StandardFormat/Distance/SubScript",
|
||||
"StandardFormat/Distance/Numerator",
|
||||
"StandardFormat/Distance/Denominator",
|
||||
"StandardFormat/Distance/Fraction",
|
||||
"StandardFormat/Distance/StrokeWidth",
|
||||
"StandardFormat/Distance/UpperLimit",
|
||||
"StandardFormat/Distance/LowerLimit",
|
||||
"StandardFormat/Distance/BracketSize",
|
||||
"StandardFormat/Distance/BracketSpace",
|
||||
"StandardFormat/Distance/MatrixRow",
|
||||
"StandardFormat/Distance/MatrixColumn",
|
||||
"StandardFormat/Distance/OrnamentSize",
|
||||
"StandardFormat/Distance/OrnamentSpace",
|
||||
"StandardFormat/Distance/OperatorSize",
|
||||
"StandardFormat/Distance/OperatorSpace",
|
||||
"StandardFormat/Distance/LeftSpace",
|
||||
"StandardFormat/Distance/RightSpace",
|
||||
"StandardFormat/Distance/TopSpace",
|
||||
"StandardFormat/Distance/BottomSpace",
|
||||
"StandardFormat/Distance/NormalBracketSize",
|
||||
"StandardFormat/VariableFont",
|
||||
"StandardFormat/FunctionFont",
|
||||
"StandardFormat/NumberFont",
|
||||
"StandardFormat/TextFont",
|
||||
"StandardFormat/SerifFont",
|
||||
"StandardFormat/SansFont",
|
||||
"StandardFormat/FixedFont"
|
||||
u"StandardFormat/Textmode"_ustr,
|
||||
u"StandardFormat/RightToLeft"_ustr,
|
||||
u"StandardFormat/GreekCharStyle"_ustr,
|
||||
u"StandardFormat/ScaleNormalBracket"_ustr,
|
||||
u"StandardFormat/HorizontalAlignment"_ustr,
|
||||
u"StandardFormat/BaseSize"_ustr,
|
||||
u"StandardFormat/TextSize"_ustr,
|
||||
u"StandardFormat/IndexSize"_ustr,
|
||||
u"StandardFormat/FunctionSize"_ustr,
|
||||
u"StandardFormat/OperatorSize"_ustr,
|
||||
u"StandardFormat/LimitsSize"_ustr,
|
||||
u"StandardFormat/Distance/Horizontal"_ustr,
|
||||
u"StandardFormat/Distance/Vertical"_ustr,
|
||||
u"StandardFormat/Distance/Root"_ustr,
|
||||
u"StandardFormat/Distance/SuperScript"_ustr,
|
||||
u"StandardFormat/Distance/SubScript"_ustr,
|
||||
u"StandardFormat/Distance/Numerator"_ustr,
|
||||
u"StandardFormat/Distance/Denominator"_ustr,
|
||||
u"StandardFormat/Distance/Fraction"_ustr,
|
||||
u"StandardFormat/Distance/StrokeWidth"_ustr,
|
||||
u"StandardFormat/Distance/UpperLimit"_ustr,
|
||||
u"StandardFormat/Distance/LowerLimit"_ustr,
|
||||
u"StandardFormat/Distance/BracketSize"_ustr,
|
||||
u"StandardFormat/Distance/BracketSpace"_ustr,
|
||||
u"StandardFormat/Distance/MatrixRow"_ustr,
|
||||
u"StandardFormat/Distance/MatrixColumn"_ustr,
|
||||
u"StandardFormat/Distance/OrnamentSize"_ustr,
|
||||
u"StandardFormat/Distance/OrnamentSpace"_ustr,
|
||||
u"StandardFormat/Distance/OperatorSize"_ustr,
|
||||
u"StandardFormat/Distance/OperatorSpace"_ustr,
|
||||
u"StandardFormat/Distance/LeftSpace"_ustr,
|
||||
u"StandardFormat/Distance/RightSpace"_ustr,
|
||||
u"StandardFormat/Distance/TopSpace"_ustr,
|
||||
u"StandardFormat/Distance/BottomSpace"_ustr,
|
||||
u"StandardFormat/Distance/NormalBracketSize"_ustr,
|
||||
u"StandardFormat/VariableFont"_ustr,
|
||||
u"StandardFormat/FunctionFont"_ustr,
|
||||
u"StandardFormat/NumberFont"_ustr,
|
||||
u"StandardFormat/TextFont"_ustr,
|
||||
u"StandardFormat/SerifFont"_ustr,
|
||||
u"StandardFormat/SansFont"_ustr,
|
||||
u"StandardFormat/FixedFont"_ustr
|
||||
};
|
||||
}
|
||||
|
||||
@ -359,7 +359,7 @@ OUString SmFontFormatList::GetNewFontFormatId() const
|
||||
|
||||
|
||||
SmMathConfig::SmMathConfig() :
|
||||
ConfigItem("Office.Math")
|
||||
ConfigItem(u"Office.Math"_ustr)
|
||||
, bIsOtherModified(false)
|
||||
, bIsFormatModified(false)
|
||||
{
|
||||
@ -392,7 +392,7 @@ void SmMathConfig::ReadSymbol( SmSym &rSymbol,
|
||||
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
|
||||
sal_Int32 nProps = aNames.getLength();
|
||||
|
||||
OUString aDelim( "/" );
|
||||
OUString aDelim( u"/"_ustr );
|
||||
for (auto& rName : asNonConstRange(aNames))
|
||||
rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
|
||||
|
||||
@ -532,7 +532,7 @@ void SmMathConfig::SetSymbols( const std::vector< SmSym > &rNewSymbols )
|
||||
PropertyValue *pValues = aValues.getArray();
|
||||
|
||||
PropertyValue *pVal = pValues;
|
||||
OUString aDelim( "/" );
|
||||
OUString aDelim( u"/"_ustr );
|
||||
for (const SmSym& rSymbol : rNewSymbols)
|
||||
{
|
||||
OUString aNodeNameDelim = SYMBOL_LIST +
|
||||
@ -612,7 +612,7 @@ void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
|
||||
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
|
||||
sal_Int32 nProps = aNames.getLength();
|
||||
|
||||
OUString aDelim( "/" );
|
||||
OUString aDelim( u"/"_ustr );
|
||||
for (auto& rName : asNonConstRange(aNames))
|
||||
rName = rBaseNode + aDelim + rSymbolName + aDelim + rName;
|
||||
|
||||
@ -678,7 +678,7 @@ void SmMathConfig::SaveFontFormatList()
|
||||
PropertyValue *pValues = aValues.getArray();
|
||||
|
||||
PropertyValue *pVal = pValues;
|
||||
OUString aDelim( "/" );
|
||||
OUString aDelim( u"/"_ustr );
|
||||
for (size_t i = 0; i < nCount; ++i)
|
||||
{
|
||||
OUString aFntFmtId(rFntFmtList.GetFontFormatId(i));
|
||||
|
@ -643,7 +643,7 @@ void SmCursor::InsertBrackets(SmBracketType eBracketType) {
|
||||
pSelectedNodesList.reset();
|
||||
|
||||
//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);
|
||||
pBrace->SetScaleMode(SmScaleMode::Height);
|
||||
std::unique_ptr<SmNode> pLeft( CreateBracket(eBracketType, true) ),
|
||||
@ -669,25 +669,25 @@ SmNode *SmCursor::CreateBracket(SmBracketType eBracketType, bool bIsLeft) {
|
||||
if(bIsLeft){
|
||||
switch(eBracketType){
|
||||
case SmBracketType::Round:
|
||||
aTok = SmToken(TLPARENT, MS_LPARENT, "(", TG::LBrace, 5);
|
||||
aTok = SmToken(TLPARENT, MS_LPARENT, u"("_ustr, TG::LBrace, 5);
|
||||
break;
|
||||
case SmBracketType::Square:
|
||||
aTok = SmToken(TLBRACKET, MS_LBRACKET, "[", TG::LBrace, 5);
|
||||
aTok = SmToken(TLBRACKET, MS_LBRACKET, u"["_ustr, TG::LBrace, 5);
|
||||
break;
|
||||
case SmBracketType::Curly:
|
||||
aTok = SmToken(TLBRACE, MS_LBRACE, "lbrace", TG::LBrace, 5);
|
||||
aTok = SmToken(TLBRACE, MS_LBRACE, u"lbrace"_ustr, TG::LBrace, 5);
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
switch(eBracketType) {
|
||||
case SmBracketType::Round:
|
||||
aTok = SmToken(TRPARENT, MS_RPARENT, ")", TG::RBrace, 5);
|
||||
aTok = SmToken(TRPARENT, MS_RPARENT, u")"_ustr, TG::RBrace, 5);
|
||||
break;
|
||||
case SmBracketType::Square:
|
||||
aTok = SmToken(TRBRACKET, MS_RBRACKET, "]", TG::RBrace, 5);
|
||||
aTok = SmToken(TRBRACKET, MS_RBRACKET, u"]"_ustr, TG::RBrace, 5);
|
||||
break;
|
||||
case SmBracketType::Curly:
|
||||
aTok = SmToken(TRBRACE, MS_RBRACE, "rbrace", TG::RBrace, 5);
|
||||
aTok = SmToken(TRBRACE, MS_RBRACE, u"rbrace"_ustr, TG::RBrace, 5);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -770,7 +770,7 @@ bool SmCursor::InsertRow() {
|
||||
pNewLineList.reset();
|
||||
//Wrap pNewLine in SmLineNode if needed
|
||||
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);
|
||||
pNewLine = std::move(pNewLineNode);
|
||||
}
|
||||
@ -858,7 +858,7 @@ void SmCursor::InsertFraction() {
|
||||
pSelectedNodesList.reset();
|
||||
|
||||
//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()));
|
||||
pFrac->SetSubNodes(std::move(pNum), std::move(pRect), std::move(pDenom));
|
||||
|
||||
@ -917,7 +917,7 @@ void SmCursor::InsertElement(SmFormulaElement element){
|
||||
}break;
|
||||
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);
|
||||
}break;
|
||||
case PlusElement:
|
||||
@ -1269,7 +1269,7 @@ void SmCursor::FinishEdit(std::unique_ptr<SmNodeList> pLineList,
|
||||
nParentIndex == 0 &&
|
||||
entries > 1) {
|
||||
//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));
|
||||
pBrace->SetScaleMode(SmScaleMode::Height);
|
||||
std::unique_ptr<SmNode> pLeft( CreateBracket(SmBracketType::Round, true) ),
|
||||
|
@ -178,28 +178,28 @@ IMPL_LINK_NOARG(SmPrintOptionsTabPage, SizeButtonClickHdl, weld::Toggleable&, vo
|
||||
}
|
||||
|
||||
SmPrintOptionsTabPage::SmPrintOptionsTabPage(weld::Container* pPage, weld::DialogController* pController, const SfxItemSet& rOptions)
|
||||
: SfxTabPage(pPage, pController, "modules/smath/ui/smathsettings.ui", "SmathSettings", &rOptions)
|
||||
, m_xTitle(m_xBuilder->weld_check_button("title"))
|
||||
, m_xTitleImg(m_xBuilder->weld_widget("locktitle"))
|
||||
, m_xText(m_xBuilder->weld_check_button("text"))
|
||||
, m_xTextImg(m_xBuilder->weld_widget("locktext"))
|
||||
, m_xFrame(m_xBuilder->weld_check_button("frame"))
|
||||
, m_xFrameImg(m_xBuilder->weld_widget("lockframe"))
|
||||
, m_xSizeNormal(m_xBuilder->weld_radio_button("sizenormal"))
|
||||
, m_xSizeScaled(m_xBuilder->weld_radio_button("sizescaled"))
|
||||
, m_xSizeZoomed(m_xBuilder->weld_radio_button("sizezoomed"))
|
||||
, m_xLockPrintImg(m_xBuilder->weld_widget("lockprintformat"))
|
||||
, m_xZoom(m_xBuilder->weld_metric_spin_button("zoom", FieldUnit::PERCENT))
|
||||
, m_xEnableInlineEdit(m_xBuilder->weld_check_button("enableinlineedit"))
|
||||
, m_xEnableInlineEditImg(m_xBuilder->weld_widget("lockenableinlineedit"))
|
||||
, m_xNoRightSpaces(m_xBuilder->weld_check_button("norightspaces"))
|
||||
, m_xNoRightSpacesImg(m_xBuilder->weld_widget("locknorightspaces"))
|
||||
, m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button("saveonlyusedsymbols"))
|
||||
, m_xSaveOnlyUsedSymbolsImg(m_xBuilder->weld_widget("locksaveonlyusedsymbols"))
|
||||
, m_xAutoCloseBrackets(m_xBuilder->weld_check_button("autoclosebrackets"))
|
||||
, m_xAutoCloseBracketsImg(m_xBuilder->weld_widget("lockautoclosebrackets"))
|
||||
, m_xSmZoom(m_xBuilder->weld_metric_spin_button("smzoom", FieldUnit::PERCENT))
|
||||
, m_xSmZoomImg(m_xBuilder->weld_widget("locksmzoom"))
|
||||
: SfxTabPage(pPage, pController, u"modules/smath/ui/smathsettings.ui"_ustr, u"SmathSettings"_ustr, &rOptions)
|
||||
, m_xTitle(m_xBuilder->weld_check_button(u"title"_ustr))
|
||||
, m_xTitleImg(m_xBuilder->weld_widget(u"locktitle"_ustr))
|
||||
, m_xText(m_xBuilder->weld_check_button(u"text"_ustr))
|
||||
, m_xTextImg(m_xBuilder->weld_widget(u"locktext"_ustr))
|
||||
, m_xFrame(m_xBuilder->weld_check_button(u"frame"_ustr))
|
||||
, m_xFrameImg(m_xBuilder->weld_widget(u"lockframe"_ustr))
|
||||
, m_xSizeNormal(m_xBuilder->weld_radio_button(u"sizenormal"_ustr))
|
||||
, m_xSizeScaled(m_xBuilder->weld_radio_button(u"sizescaled"_ustr))
|
||||
, m_xSizeZoomed(m_xBuilder->weld_radio_button(u"sizezoomed"_ustr))
|
||||
, m_xLockPrintImg(m_xBuilder->weld_widget(u"lockprintformat"_ustr))
|
||||
, m_xZoom(m_xBuilder->weld_metric_spin_button(u"zoom"_ustr, FieldUnit::PERCENT))
|
||||
, m_xEnableInlineEdit(m_xBuilder->weld_check_button(u"enableinlineedit"_ustr))
|
||||
, m_xEnableInlineEditImg(m_xBuilder->weld_widget(u"lockenableinlineedit"_ustr))
|
||||
, m_xNoRightSpaces(m_xBuilder->weld_check_button(u"norightspaces"_ustr))
|
||||
, m_xNoRightSpacesImg(m_xBuilder->weld_widget(u"locknorightspaces"_ustr))
|
||||
, m_xSaveOnlyUsedSymbols(m_xBuilder->weld_check_button(u"saveonlyusedsymbols"_ustr))
|
||||
, m_xSaveOnlyUsedSymbolsImg(m_xBuilder->weld_widget(u"locksaveonlyusedsymbols"_ustr))
|
||||
, m_xAutoCloseBrackets(m_xBuilder->weld_check_button(u"autoclosebrackets"_ustr))
|
||||
, m_xAutoCloseBracketsImg(m_xBuilder->weld_widget(u"lockautoclosebrackets"_ustr))
|
||||
, m_xSmZoom(m_xBuilder->weld_metric_spin_button(u"smzoom"_ustr, FieldUnit::PERCENT))
|
||||
, m_xSmZoomImg(m_xBuilder->weld_widget(u"locksmzoom"_ustr))
|
||||
{
|
||||
m_xSizeNormal->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
|
||||
m_xSizeScaled->connect_toggled(LINK(this, SmPrintOptionsTabPage, SizeButtonClickHdl));
|
||||
@ -218,7 +218,7 @@ SmPrintOptionsTabPage::~SmPrintOptionsTabPage()
|
||||
OUString SmPrintOptionsTabPage::GetAllStrings()
|
||||
{
|
||||
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)
|
||||
{
|
||||
@ -227,7 +227,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
@ -235,7 +235,7 @@ OUString SmPrintOptionsTabPage::GetAllStrings()
|
||||
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)
|
||||
{
|
||||
@ -406,12 +406,12 @@ void SmFontDialog::SetFont(const vcl::Font &rFont)
|
||||
}
|
||||
|
||||
SmFontDialog::SmFontDialog(weld::Window * pParent, OutputDevice *pFntListDevice, bool bHideCheckboxes)
|
||||
: GenericDialogController(pParent, "modules/smath/ui/fontdialog.ui", "FontDialog")
|
||||
, m_xFontBox(m_xBuilder->weld_entry_tree_view("fontgrid", "font", "fonts"))
|
||||
, m_xAttrFrame(m_xBuilder->weld_widget("attrframe"))
|
||||
, m_xBoldCheckBox(m_xBuilder->weld_check_button("bold"))
|
||||
, m_xItalicCheckBox(m_xBuilder->weld_check_button("italic"))
|
||||
, m_xShowFont(new weld::CustomWeld(*m_xBuilder, "preview", m_aShowFont))
|
||||
: GenericDialogController(pParent, u"modules/smath/ui/fontdialog.ui"_ustr, u"FontDialog"_ustr)
|
||||
, m_xFontBox(m_xBuilder->weld_entry_tree_view(u"fontgrid"_ustr, u"font"_ustr, u"fonts"_ustr))
|
||||
, m_xAttrFrame(m_xBuilder->weld_widget(u"attrframe"_ustr))
|
||||
, m_xBoldCheckBox(m_xBuilder->weld_check_button(u"bold"_ustr))
|
||||
, m_xItalicCheckBox(m_xBuilder->weld_check_button(u"italic"_ustr))
|
||||
, m_xShowFont(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aShowFont))
|
||||
{
|
||||
m_xFontBox->set_height_request_by_rows(8);
|
||||
|
||||
@ -458,8 +458,8 @@ class SaveDefaultsQuery : public weld::MessageDialogController
|
||||
{
|
||||
public:
|
||||
explicit SaveDefaultsQuery(weld::Widget* pParent)
|
||||
: MessageDialogController(pParent, "modules/smath/ui/savedefaultsdialog.ui",
|
||||
"SaveDefaultsDialog")
|
||||
: MessageDialogController(pParent, u"modules/smath/ui/savedefaultsdialog.ui"_ustr,
|
||||
u"SaveDefaultsDialog"_ustr)
|
||||
{
|
||||
}
|
||||
};
|
||||
@ -479,14 +479,14 @@ IMPL_LINK_NOARG( SmFontSizeDialog, DefaultButtonClickHdl, weld::Button&, void )
|
||||
}
|
||||
|
||||
SmFontSizeDialog::SmFontSizeDialog(weld::Window* pParent)
|
||||
: GenericDialogController(pParent, "modules/smath/ui/fontsizedialog.ui", "FontSizeDialog")
|
||||
, m_xBaseSize(m_xBuilder->weld_metric_spin_button("spinB_baseSize", FieldUnit::POINT))
|
||||
, m_xTextSize(m_xBuilder->weld_metric_spin_button("spinB_text", FieldUnit::PERCENT))
|
||||
, m_xIndexSize(m_xBuilder->weld_metric_spin_button("spinB_index", FieldUnit::PERCENT))
|
||||
, m_xFunctionSize(m_xBuilder->weld_metric_spin_button("spinB_function", FieldUnit::PERCENT))
|
||||
, m_xOperatorSize(m_xBuilder->weld_metric_spin_button("spinB_operator", FieldUnit::PERCENT))
|
||||
, m_xBorderSize(m_xBuilder->weld_metric_spin_button("spinB_limit", FieldUnit::PERCENT))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button("default"))
|
||||
: GenericDialogController(pParent, u"modules/smath/ui/fontsizedialog.ui"_ustr, u"FontSizeDialog"_ustr)
|
||||
, m_xBaseSize(m_xBuilder->weld_metric_spin_button(u"spinB_baseSize"_ustr, FieldUnit::POINT))
|
||||
, m_xTextSize(m_xBuilder->weld_metric_spin_button(u"spinB_text"_ustr, FieldUnit::PERCENT))
|
||||
, m_xIndexSize(m_xBuilder->weld_metric_spin_button(u"spinB_index"_ustr, FieldUnit::PERCENT))
|
||||
, m_xFunctionSize(m_xBuilder->weld_metric_spin_button(u"spinB_function"_ustr, FieldUnit::PERCENT))
|
||||
, m_xOperatorSize(m_xBuilder->weld_metric_spin_button(u"spinB_operator"_ustr, FieldUnit::PERCENT))
|
||||
, m_xBorderSize(m_xBuilder->weld_metric_spin_button(u"spinB_limit"_ustr, FieldUnit::PERCENT))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
|
||||
{
|
||||
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)
|
||||
: GenericDialogController(pParent, "modules/smath/ui/fonttypedialog.ui", "FontsDialog")
|
||||
: GenericDialogController(pParent, u"modules/smath/ui/fonttypedialog.ui"_ustr, u"FontsDialog"_ustr)
|
||||
, pFontListDev(pFntListDevice)
|
||||
, m_xMathFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("mathCB")))
|
||||
, m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("variableCB")))
|
||||
, m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("functionCB")))
|
||||
, m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("numberCB")))
|
||||
, m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("textCB")))
|
||||
, m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("serifCB")))
|
||||
, m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("sansCB")))
|
||||
, m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box("fixedCB")))
|
||||
, m_xMenuButton(m_xBuilder->weld_menu_button("modify"))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button("default"))
|
||||
, m_xMathFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"mathCB"_ustr)))
|
||||
, m_xVariableFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"variableCB"_ustr)))
|
||||
, m_xFunctionFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"functionCB"_ustr)))
|
||||
, m_xNumberFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"numberCB"_ustr)))
|
||||
, m_xTextFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"textCB"_ustr)))
|
||||
, m_xSerifFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"serifCB"_ustr)))
|
||||
, m_xSansFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"sansCB"_ustr)))
|
||||
, m_xFixedFont(new SmFontPickListBox(m_xBuilder->weld_combo_box(u"fixedCB"_ustr)))
|
||||
, m_xMenuButton(m_xBuilder->weld_menu_button(u"modify"_ustr))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
|
||||
{
|
||||
m_xDefaultButton->connect_clicked(LINK(this, SmFontTypeDialog, DefaultButtonClickHdl));
|
||||
m_xMenuButton->connect_selected(LINK(this, SmFontTypeDialog, MenuSelectHdl));
|
||||
@ -889,20 +889,20 @@ void SmDistanceDialog::SetCategory(sal_uInt16 nCategory)
|
||||
}
|
||||
|
||||
SmDistanceDialog::SmDistanceDialog(weld::Window *pParent)
|
||||
: GenericDialogController(pParent, "modules/smath/ui/spacingdialog.ui", "SpacingDialog")
|
||||
, m_xFrame(m_xBuilder->weld_frame("template"))
|
||||
, m_xFixedText1(m_xBuilder->weld_label("label1"))
|
||||
, m_xMetricField1(m_xBuilder->weld_metric_spin_button("spinbutton1", FieldUnit::CM))
|
||||
, m_xFixedText2(m_xBuilder->weld_label("label2"))
|
||||
, m_xMetricField2(m_xBuilder->weld_metric_spin_button("spinbutton2", FieldUnit::CM))
|
||||
, m_xFixedText3(m_xBuilder->weld_label("label3"))
|
||||
, m_xMetricField3(m_xBuilder->weld_metric_spin_button("spinbutton3", FieldUnit::CM))
|
||||
, m_xCheckBox1(m_xBuilder->weld_check_button("checkbutton"))
|
||||
, m_xFixedText4(m_xBuilder->weld_label("label4"))
|
||||
, m_xMetricField4(m_xBuilder->weld_metric_spin_button("spinbutton4", FieldUnit::CM))
|
||||
, m_xMenuButton(m_xBuilder->weld_menu_button("category"))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button("default"))
|
||||
, m_xBitmap(m_xBuilder->weld_widget("image"))
|
||||
: GenericDialogController(pParent, u"modules/smath/ui/spacingdialog.ui"_ustr, u"SpacingDialog"_ustr)
|
||||
, m_xFrame(m_xBuilder->weld_frame(u"template"_ustr))
|
||||
, m_xFixedText1(m_xBuilder->weld_label(u"label1"_ustr))
|
||||
, m_xMetricField1(m_xBuilder->weld_metric_spin_button(u"spinbutton1"_ustr, FieldUnit::CM))
|
||||
, m_xFixedText2(m_xBuilder->weld_label(u"label2"_ustr))
|
||||
, m_xMetricField2(m_xBuilder->weld_metric_spin_button(u"spinbutton2"_ustr, FieldUnit::CM))
|
||||
, m_xFixedText3(m_xBuilder->weld_label(u"label3"_ustr))
|
||||
, m_xMetricField3(m_xBuilder->weld_metric_spin_button(u"spinbutton3"_ustr, FieldUnit::CM))
|
||||
, m_xCheckBox1(m_xBuilder->weld_check_button(u"checkbutton"_ustr))
|
||||
, m_xFixedText4(m_xBuilder->weld_label(u"label4"_ustr))
|
||||
, m_xMetricField4(m_xBuilder->weld_metric_spin_button(u"spinbutton4"_ustr, FieldUnit::CM))
|
||||
, m_xMenuButton(m_xBuilder->weld_menu_button(u"category"_ustr))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
|
||||
, m_xBitmap(m_xBuilder->weld_widget(u"image"_ustr))
|
||||
, m_pCurrentImage(m_xBitmap.get())
|
||||
{
|
||||
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)
|
||||
: GenericDialogController(pParent, "modules/smath/ui/alignmentdialog.ui", "AlignmentDialog")
|
||||
, m_xLeft(m_xBuilder->weld_radio_button("left"))
|
||||
, m_xCenter(m_xBuilder->weld_radio_button("center"))
|
||||
, m_xRight(m_xBuilder->weld_radio_button("right"))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button("default"))
|
||||
: GenericDialogController(pParent, u"modules/smath/ui/alignmentdialog.ui"_ustr, u"AlignmentDialog"_ustr)
|
||||
, m_xLeft(m_xBuilder->weld_radio_button(u"left"_ustr))
|
||||
, m_xCenter(m_xBuilder->weld_radio_button(u"center"_ustr))
|
||||
, m_xRight(m_xBuilder->weld_radio_button(u"right"_ustr))
|
||||
, m_xDefaultButton(m_xBuilder->weld_button(u"default"_ustr))
|
||||
{
|
||||
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,
|
||||
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)
|
||||
, rSymbolMgr(rMgr)
|
||||
, pFontListDev(pFntListDevice)
|
||||
, m_aSymbolDisplay(rViewShell)
|
||||
, m_xSymbolSets(m_xBuilder->weld_combo_box("symbolset"))
|
||||
, m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window("scrolledwindow", true), rViewShell))
|
||||
, m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, "symbolsetdisplay", *m_xSymbolSetDisplay))
|
||||
, m_xSymbolName(m_xBuilder->weld_label("symbolname"))
|
||||
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "preview", m_aSymbolDisplay))
|
||||
, m_xGetBtn(m_xBuilder->weld_button("ok"))
|
||||
, m_xEditBtn(m_xBuilder->weld_button("edit"))
|
||||
, m_xSymbolSets(m_xBuilder->weld_combo_box(u"symbolset"_ustr))
|
||||
, m_xSymbolSetDisplay(new SmShowSymbolSet(m_xBuilder->weld_scrolled_window(u"scrolledwindow"_ustr, true), rViewShell))
|
||||
, m_xSymbolSetDisplayArea(new weld::CustomWeld(*m_xBuilder, u"symbolsetdisplay"_ustr, *m_xSymbolSetDisplay))
|
||||
, m_xSymbolName(m_xBuilder->weld_label(u"symbolname"_ustr))
|
||||
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"preview"_ustr, m_aSymbolDisplay))
|
||||
, m_xGetBtn(m_xBuilder->weld_button(u"ok"_ustr))
|
||||
, m_xEditBtn(m_xBuilder->weld_button(u"edit"_ustr))
|
||||
{
|
||||
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
|
||||
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() ) +
|
||||
aHex;
|
||||
m_xSymbols->set_entry_text(aUnicodePos);
|
||||
@ -1844,28 +1844,28 @@ void SmSymDefineDialog::UpdateButtons()
|
||||
}
|
||||
|
||||
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_rSymbolMgr(rMgr)
|
||||
, m_xFontList(new FontList(pFntListDevice))
|
||||
, m_xOldSymbols(m_xBuilder->weld_combo_box("oldSymbols"))
|
||||
, m_xOldSymbolSets(m_xBuilder->weld_combo_box("oldSymbolSets"))
|
||||
, m_xSymbols(m_xBuilder->weld_combo_box("symbols"))
|
||||
, m_xSymbolSets(m_xBuilder->weld_combo_box("symbolSets"))
|
||||
, m_xFonts(m_xBuilder->weld_combo_box("fonts"))
|
||||
, m_xFontsSubsetLB(m_xBuilder->weld_combo_box("fontsSubsetLB"))
|
||||
, m_xStyles(m_xBuilder->weld_combo_box("styles"))
|
||||
, m_xOldSymbolName(m_xBuilder->weld_label("oldSymbolName"))
|
||||
, m_xOldSymbolSetName(m_xBuilder->weld_label("oldSymbolSetName"))
|
||||
, m_xSymbolName(m_xBuilder->weld_label("symbolName"))
|
||||
, m_xSymbolSetName(m_xBuilder->weld_label("symbolSetName"))
|
||||
, m_xAddBtn(m_xBuilder->weld_button("add"))
|
||||
, m_xChangeBtn(m_xBuilder->weld_button("modify"))
|
||||
, m_xDeleteBtn(m_xBuilder->weld_button("delete"))
|
||||
, m_xOldSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "oldSymbolDisplay", m_aOldSymbolDisplay))
|
||||
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, "symbolDisplay", m_aSymbolDisplay))
|
||||
, m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window("showscroll", true), m_xVirDev))
|
||||
, m_xCharsetDisplayArea(new weld::CustomWeld(*m_xBuilder, "charsetDisplay", *m_xCharsetDisplay))
|
||||
, m_xOldSymbols(m_xBuilder->weld_combo_box(u"oldSymbols"_ustr))
|
||||
, m_xOldSymbolSets(m_xBuilder->weld_combo_box(u"oldSymbolSets"_ustr))
|
||||
, m_xSymbols(m_xBuilder->weld_combo_box(u"symbols"_ustr))
|
||||
, m_xSymbolSets(m_xBuilder->weld_combo_box(u"symbolSets"_ustr))
|
||||
, m_xFonts(m_xBuilder->weld_combo_box(u"fonts"_ustr))
|
||||
, m_xFontsSubsetLB(m_xBuilder->weld_combo_box(u"fontsSubsetLB"_ustr))
|
||||
, m_xStyles(m_xBuilder->weld_combo_box(u"styles"_ustr))
|
||||
, m_xOldSymbolName(m_xBuilder->weld_label(u"oldSymbolName"_ustr))
|
||||
, m_xOldSymbolSetName(m_xBuilder->weld_label(u"oldSymbolSetName"_ustr))
|
||||
, m_xSymbolName(m_xBuilder->weld_label(u"symbolName"_ustr))
|
||||
, m_xSymbolSetName(m_xBuilder->weld_label(u"symbolSetName"_ustr))
|
||||
, m_xAddBtn(m_xBuilder->weld_button(u"add"_ustr))
|
||||
, m_xChangeBtn(m_xBuilder->weld_button(u"modify"_ustr))
|
||||
, m_xDeleteBtn(m_xBuilder->weld_button(u"delete"_ustr))
|
||||
, m_xOldSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"oldSymbolDisplay"_ustr, m_aOldSymbolDisplay))
|
||||
, m_xSymbolDisplay(new weld::CustomWeld(*m_xBuilder, u"symbolDisplay"_ustr, m_aSymbolDisplay))
|
||||
, m_xCharsetDisplay(new SvxShowCharSet(m_xBuilder->weld_scrolled_window(u"showscroll"_ustr, true), m_xVirDev))
|
||||
, 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
|
||||
// display and if the user previously selected a character to define/redefine that one this is bad
|
||||
|
@ -97,7 +97,7 @@ SFX_IMPL_SUPERCLASS_INTERFACE(SmDocShell, SfxObjectShell)
|
||||
|
||||
void SmDocShell::InitInterface_Impl()
|
||||
{
|
||||
GetStaticInterface()->RegisterPopupMenu("view");
|
||||
GetStaticInterface()->RegisterPopupMenu(u"view"_ustr);
|
||||
}
|
||||
|
||||
void SmDocShell::SetSmSyntaxVersion(sal_Int16 nSmSyntaxVersion)
|
||||
@ -106,7 +106,7 @@ void SmDocShell::SetSmSyntaxVersion(sal_Int16 nSmSyntaxVersion)
|
||||
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)
|
||||
{
|
||||
@ -639,7 +639,7 @@ bool SmDocShell::ConvertFrom(SfxMedium &rMedium)
|
||||
if ( SotStorage::IsStorageFile( pStream ) )
|
||||
{
|
||||
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?
|
||||
OUStringBuffer aBuffer;
|
||||
@ -684,7 +684,7 @@ bool SmDocShell::Load( SfxMedium& rMedium )
|
||||
if( SfxObjectShell::Load( rMedium ))
|
||||
{
|
||||
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 ?
|
||||
rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(GetModel().get()));
|
||||
|
@ -134,7 +134,7 @@ void SmEditTextWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
|
||||
|
||||
SmEditWindow::SmEditWindow(SmCmdBoxWindow &rMyCmdBoxWin, weld::Builder& rBuilder)
|
||||
: 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));
|
||||
|
||||
@ -201,7 +201,7 @@ void SmEditTextWindow::StyleUpdated()
|
||||
|
||||
pDoc->UpdateEditEngineDefaultFonts();
|
||||
pEditEngine->SetBackgroundColor(rStyleSettings.GetFieldColor());
|
||||
pEditEngine->SetDefTab(sal_uInt16(GetTextWidth("XXXX")));
|
||||
pEditEngine->SetDefTab(sal_uInt16(GetTextWidth(u"XXXX"_ustr)));
|
||||
|
||||
// forces new settings to be used
|
||||
// unfortunately this resets the whole edit engine
|
||||
@ -424,7 +424,7 @@ void SmEditWindow::CreateEditView(weld::Builder& rBuilder)
|
||||
return;
|
||||
|
||||
mxTextControl.reset(new SmEditTextWindow(*this));
|
||||
mxTextControlWin.reset(new weld::CustomWeld(rBuilder, "editview", *mxTextControl));
|
||||
mxTextControlWin.reset(new weld::CustomWeld(rBuilder, u"editview"_ustr, *mxTextControl));
|
||||
|
||||
SetScrollBarRanges();
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ bool GetMathTypeVersion( SotStorage* pStor, sal_uInt8 &nVersion )
|
||||
// code snippet copied from MathType::Parse
|
||||
|
||||
rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream(
|
||||
"Equation Native",
|
||||
u"Equation Native"_ustr,
|
||||
StreamMode::STD_READ);
|
||||
if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError()))
|
||||
return bSuccess;
|
||||
|
@ -121,20 +121,20 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium)
|
||||
|
||||
// create XPropertySet with three properties for status indicator
|
||||
static const comphelper::PropertyMapEntry aInfoMap[]{
|
||||
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(),
|
||||
{ u"UsePrettyPrinting"_ustr, 0, cppu::UnoType<bool>::get(),
|
||||
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 },
|
||||
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
{ u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 }
|
||||
};
|
||||
uno::Reference<beans::XPropertySet> xInfoSet(
|
||||
comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap)));
|
||||
|
||||
// Always print pretty
|
||||
xInfoSet->setPropertyValue("UsePrettyPrinting", Any(true));
|
||||
xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, Any(true));
|
||||
|
||||
// Set base URI
|
||||
xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(rMedium.GetBaseURL(true)));
|
||||
@ -158,7 +158,7 @@ bool SmMLExportWrapper::Export(SfxMedium& rMedium)
|
||||
{
|
||||
OUString aName = pDocHierarchItem->GetValue();
|
||||
if (!aName.isEmpty())
|
||||
xInfoSet->setPropertyValue("StreamRelPath", Any(aName));
|
||||
xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, Any(aName));
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -256,20 +256,20 @@ OUString SmMLExportWrapper::Export(SmMlElement* pElementTree)
|
||||
|
||||
// create XPropertySet with three properties for status indicator
|
||||
static const comphelper::PropertyMapEntry aInfoMap[]{
|
||||
{ OUString("UsePrettyPrinting"), 0, cppu::UnoType<bool>::get(),
|
||||
{ u"UsePrettyPrinting"_ustr, 0, cppu::UnoType<bool>::get(),
|
||||
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 },
|
||||
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
{ u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 }
|
||||
};
|
||||
uno::Reference<beans::XPropertySet> xInfoSet(
|
||||
comphelper::GenericPropertySet_CreateInstance(new comphelper::PropertySetInfo(aInfoMap)));
|
||||
|
||||
// Always print pretty
|
||||
xInfoSet->setPropertyValue("UsePrettyPrinting", Any(true));
|
||||
xInfoSet->setPropertyValue(u"UsePrettyPrinting"_ustr, Any(true));
|
||||
|
||||
// Fetch mathml tree
|
||||
m_pElementTree = pElementTree;
|
||||
@ -382,13 +382,13 @@ bool SmMLExportWrapper::WriteThroughComponentS(const Reference<embed::XStorage>&
|
||||
|
||||
// Set stream as text / xml
|
||||
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
|
||||
xSet->setPropertyValue("UseCommonStoragePasswordEncryption", Any(true));
|
||||
xSet->setPropertyValue(u"UseCommonStoragePasswordEncryption"_ustr, Any(true));
|
||||
|
||||
// set Base URL
|
||||
rPropSet->setPropertyValue("StreamName", Any(OUString(pStreamName)));
|
||||
rPropSet->setPropertyValue(u"StreamName"_ustr, Any(OUString(pStreamName)));
|
||||
|
||||
// write the stuff
|
||||
// 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
|
||||
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
|
||||
// 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,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -444,7 +444,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_MLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -452,7 +453,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_MLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -460,7 +462,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_MLContentExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -762,7 +764,7 @@ void SmMLExport::exportMlAttributes(const SmMlElement* pMlElement)
|
||||
switch (aAttributeValue->m_aMathbackground)
|
||||
{
|
||||
case SmMlAttributeValueMathbackground::MlTransparent:
|
||||
addAttribute(XML_MATHBACKGROUND, "transparent");
|
||||
addAttribute(XML_MATHBACKGROUND, u"transparent"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathbackground::MlRgb:
|
||||
{
|
||||
@ -812,58 +814,58 @@ void SmMLExport::exportMlAttributes(const SmMlElement* pMlElement)
|
||||
switch (aAttributeValue->m_aMathvariant)
|
||||
{
|
||||
case SmMlAttributeValueMathvariant::normal:
|
||||
addAttribute(XML_MATHVARIANT, "normal");
|
||||
addAttribute(XML_MATHVARIANT, u"normal"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::bold:
|
||||
addAttribute(XML_MATHVARIANT, "bold");
|
||||
addAttribute(XML_MATHVARIANT, u"bold"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::italic:
|
||||
addAttribute(XML_MATHVARIANT, "italic");
|
||||
addAttribute(XML_MATHVARIANT, u"italic"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::double_struck:
|
||||
addAttribute(XML_MATHVARIANT, "double-struck");
|
||||
addAttribute(XML_MATHVARIANT, u"double-struck"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::script:
|
||||
addAttribute(XML_MATHVARIANT, "script");
|
||||
addAttribute(XML_MATHVARIANT, u"script"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::fraktur:
|
||||
addAttribute(XML_MATHVARIANT, "fraktur");
|
||||
addAttribute(XML_MATHVARIANT, u"fraktur"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::sans_serif:
|
||||
addAttribute(XML_MATHVARIANT, "sans-serif");
|
||||
addAttribute(XML_MATHVARIANT, u"sans-serif"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::monospace:
|
||||
addAttribute(XML_MATHVARIANT, "monospace");
|
||||
addAttribute(XML_MATHVARIANT, u"monospace"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::bold_italic:
|
||||
addAttribute(XML_MATHVARIANT, "bold-italic");
|
||||
addAttribute(XML_MATHVARIANT, u"bold-italic"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::bold_fraktur:
|
||||
addAttribute(XML_MATHVARIANT, "bold-fracktur");
|
||||
addAttribute(XML_MATHVARIANT, u"bold-fracktur"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::bold_script:
|
||||
addAttribute(XML_MATHVARIANT, "bold-script");
|
||||
addAttribute(XML_MATHVARIANT, u"bold-script"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::bold_sans_serif:
|
||||
addAttribute(XML_MATHVARIANT, "bold-sans-serif");
|
||||
addAttribute(XML_MATHVARIANT, u"bold-sans-serif"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::sans_serif_italic:
|
||||
addAttribute(XML_MATHVARIANT, "sans-serif-italic");
|
||||
addAttribute(XML_MATHVARIANT, u"sans-serif-italic"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::sans_serif_bold_italic:
|
||||
addAttribute(XML_MATHVARIANT, "sans-serif-bold-italic");
|
||||
addAttribute(XML_MATHVARIANT, u"sans-serif-bold-italic"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::initial:
|
||||
addAttribute(XML_MATHVARIANT, "initial");
|
||||
addAttribute(XML_MATHVARIANT, u"initial"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::tailed:
|
||||
addAttribute(XML_MATHVARIANT, "tailed");
|
||||
addAttribute(XML_MATHVARIANT, u"tailed"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::looped:
|
||||
addAttribute(XML_MATHVARIANT, "looped");
|
||||
addAttribute(XML_MATHVARIANT, u"looped"_ustr);
|
||||
break;
|
||||
case SmMlAttributeValueMathvariant::stretched:
|
||||
addAttribute(XML_MATHVARIANT, "stretched");
|
||||
addAttribute(XML_MATHVARIANT, u"stretched"_ustr);
|
||||
break;
|
||||
default:
|
||||
declareMlError();
|
||||
|
@ -142,7 +142,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium)
|
||||
// Set base URI
|
||||
// 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");
|
||||
xInfoSet->setPropertyValue("BaseURI", Any(rMedium.GetBaseURL()));
|
||||
xInfoSet->setPropertyValue(u"BaseURI"_ustr, Any(rMedium.GetBaseURL()));
|
||||
|
||||
// Fetch progress range
|
||||
sal_Int32 nProgressRange(rMedium.IsStorage() ? 3 : 1);
|
||||
@ -165,7 +165,7 @@ ErrCode SmMLImportWrapper::Import(SfxMedium& rMedium)
|
||||
aName = pDocHierarchItem->GetValue();
|
||||
|
||||
if (!aName.isEmpty())
|
||||
xInfoSet->setPropertyValue("StreamRelPath", Any(aName));
|
||||
xInfoSet->setPropertyValue(u"StreamRelPath"_ustr, Any(aName));
|
||||
}
|
||||
|
||||
// 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
|
||||
uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY);
|
||||
Any aAny = xProps->getPropertyValue("Encrypted");
|
||||
Any aAny = xProps->getPropertyValue(u"Encrypted"_ustr);
|
||||
bool bEncrypted = false;
|
||||
aAny >>= bEncrypted;
|
||||
|
||||
// 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();
|
||||
|
||||
// Execute read
|
||||
@ -592,14 +592,14 @@ Math_MLImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
uno::Sequence<uno::Any> const& /*rSeq*/)
|
||||
{
|
||||
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*
|
||||
Math_MLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -607,8 +607,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
|
||||
Math_MLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
uno::Sequence<uno::Any> const& /*rSeq*/)
|
||||
{
|
||||
return cppu::acquire(new SmMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisSettingsImporter",
|
||||
SvXMLImportFlags::SETTINGS));
|
||||
return cppu::acquire(new SmMLImport(
|
||||
pCtx, u"com.sun.star.comp.Math.XMLOasisSettingsImporter"_ustr, SvXMLImportFlags::SETTINGS));
|
||||
}
|
||||
|
||||
// SmMLImportContext
|
||||
|
@ -298,7 +298,7 @@ bool SmXMLExportWrapper::WriteThroughComponent(const Reference<embed::XStorage>&
|
||||
// set Base URL
|
||||
if (rPropSet.is())
|
||||
{
|
||||
rPropSet->setPropertyValue("StreamName", Any(sStreamName));
|
||||
rPropSet->setPropertyValue(u"StreamName"_ustr, Any(sStreamName));
|
||||
}
|
||||
|
||||
// write the stuff
|
||||
@ -320,7 +320,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -328,15 +328,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLMetaExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
return cppu::acquire(
|
||||
new SmXMLExport(context, "com.sun.star.comp.Math.XMLMetaExporter", SvXMLExportFlags::META));
|
||||
return cppu::acquire(new SmXMLExport(context, u"com.sun.star.comp.Math.XMLMetaExporter"_ustr,
|
||||
SvXMLExportFlags::META));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLOasisMetaExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -344,15 +345,16 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLSettingsExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
css::uno::Sequence<css::uno::Any> const&)
|
||||
{
|
||||
return cppu::acquire(new SmXMLExport(context, "com.sun.star.comp.Math.XMLSettingsExporter",
|
||||
SvXMLExportFlags::SETTINGS));
|
||||
return cppu::acquire(new SmXMLExport(
|
||||
context, u"com.sun.star.comp.Math.XMLSettingsExporter"_ustr, SvXMLExportFlags::SETTINGS));
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLOasisSettingsExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -360,7 +362,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
|
||||
Math_XMLContentExporter_get_implementation(css::uno::XComponentContext* context,
|
||||
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));
|
||||
}
|
||||
|
||||
|
@ -120,13 +120,13 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
|
||||
}
|
||||
|
||||
static const comphelper::PropertyMapEntry aInfoMap[]
|
||||
= { { OUString("PrivateData"), 0, cppu::UnoType<XInterface>::get(),
|
||||
= { { u"PrivateData"_ustr, 0, cppu::UnoType<XInterface>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ OUString("BaseURI"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
{ u"BaseURI"_ustr, 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ OUString("StreamRelPath"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
{ u"StreamRelPath"_ustr, 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 },
|
||||
{ OUString("StreamName"), 0, ::cppu::UnoType<OUString>::get(),
|
||||
{ u"StreamName"_ustr, 0, ::cppu::UnoType<OUString>::get(),
|
||||
beans::PropertyAttribute::MAYBEVOID, 0 } };
|
||||
uno::Reference<beans::XPropertySet> xInfoSet(
|
||||
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
|
||||
// clipboard without one
|
||||
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;
|
||||
if (!(rMedium.IsStorage()))
|
||||
@ -157,7 +157,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
|
||||
// TODO/LATER: handle the case of embedded links gracefully
|
||||
if (bEmbedded) // && !rMedium.GetStorage()->IsRoot() )
|
||||
{
|
||||
OUString aName("dummyObjName");
|
||||
OUString aName(u"dummyObjName"_ustr);
|
||||
const SfxStringItem* pDocHierarchItem
|
||||
= rMedium.GetItemSet().GetItem(SID_DOC_HIERARCHICALNAME);
|
||||
if (pDocHierarchItem)
|
||||
@ -165,7 +165,7 @@ ErrCode SmXMLImportWrapper::Import(SfxMedium& rMedium)
|
||||
|
||||
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
|
||||
uno::Reference<beans::XPropertySet> xProps(xEventsStream, uno::UNO_QUERY);
|
||||
Any aAny = xProps->getPropertyValue("Encrypted");
|
||||
Any aAny = xProps->getPropertyValue(u"Encrypted"_ustr);
|
||||
bool bEncrypted = false;
|
||||
if (aAny.getValueType() == cppu::UnoType<bool>::get())
|
||||
aAny >>= bEncrypted;
|
||||
@ -363,7 +363,7 @@ ErrCode SmXMLImportWrapper::ReadThroughComponent(const uno::Reference<embed::XSt
|
||||
// set Base URL
|
||||
if (rPropSet.is())
|
||||
{
|
||||
rPropSet->setPropertyValue("StreamName", Any(sStreamName));
|
||||
rPropSet->setPropertyValue(u"StreamName"_ustr, Any(sStreamName));
|
||||
}
|
||||
|
||||
Reference<io::XInputStream> xStream = xEventsStream->getInputStream();
|
||||
@ -399,14 +399,14 @@ Math_XMLImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
uno::Sequence<uno::Any> const& /*rSeq*/)
|
||||
{
|
||||
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*
|
||||
Math_XMLOasisMetaImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
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));
|
||||
}
|
||||
|
||||
@ -414,8 +414,8 @@ extern "C" SAL_DLLPUBLIC_EXPORT uno::XInterface*
|
||||
Math_XMLOasisSettingsImporter_get_implementation(uno::XComponentContext* pCtx,
|
||||
uno::Sequence<uno::Any> const& /*rSeq*/)
|
||||
{
|
||||
return cppu::acquire(new SmXMLImport(pCtx, "com.sun.star.comp.Math.XMLOasisSettingsImporter",
|
||||
SvXMLImportFlags::SETTINGS));
|
||||
return cppu::acquire(new SmXMLImport(
|
||||
pCtx, u"com.sun.star.comp.Math.XMLOasisSettingsImporter"_ustr, SvXMLImportFlags::SETTINGS));
|
||||
}
|
||||
|
||||
void SmXMLImport::endDocument()
|
||||
@ -1062,14 +1062,14 @@ void SmXMLFencedContext_Impl::endFastElement(sal_Int32 /*nElement*/)
|
||||
else
|
||||
aToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(cBegin);
|
||||
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));
|
||||
if (bIsStretchy)
|
||||
aToken = starmathdatabase::Identify_PrefixPostfix_SmXMLOperatorContext_Impl(cEnd);
|
||||
else
|
||||
aToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(cEnd);
|
||||
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));
|
||||
|
||||
SmNodeArray aRelationArray;
|
||||
@ -1383,7 +1383,7 @@ void SmXMLOperatorContext_Impl::TCharacters(const OUString& rChars)
|
||||
if (isPrefix)
|
||||
bToken = starmathdatabase::Identify_Prefix_SmXMLOperatorContext_Impl(aToken.cMathChar);
|
||||
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)
|
||||
bToken = starmathdatabase::Identify_Postfix_SmXMLOperatorContext_Impl(aToken.cMathChar);
|
||||
else
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -550,7 +550,7 @@ void MathType::TypeFaceToString(OUString &rTxt,sal_uInt8 nFace)
|
||||
bool MathType::Parse(SotStorage *pStor)
|
||||
{
|
||||
rtl::Reference<SotStorageStream> xSrc = pStor->OpenSotStream(
|
||||
"Equation Native",
|
||||
u"Equation Native"_ustr,
|
||||
StreamMode::STD_READ);
|
||||
if ( (!xSrc.is()) || (ERRCODE_NONE != xSrc->GetError()))
|
||||
return false;
|
||||
@ -1872,7 +1872,7 @@ bool MathType::ConvertFromStarMath( SfxMedium& rMedium )
|
||||
rtl::Reference<SotStorage> pStor = new SotStorage(pStream, false);
|
||||
|
||||
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[] = {
|
||||
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,
|
||||
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));
|
||||
|
||||
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
|
||||
};
|
||||
rtl::Reference<SotStorageStream> xStor2(pStor->OpenSotStream("\1Ole"));
|
||||
rtl::Reference<SotStorageStream> xStor2(pStor->OpenSotStream(u"\1Ole"_ustr));
|
||||
xStor2->WriteBytes(aOle, sizeof(aOle));
|
||||
xStor.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()))
|
||||
return false;
|
||||
|
||||
|
@ -562,7 +562,7 @@ void SmTableNode::Arrange(OutputDevice &rDev, const SmFormat &rFormat)
|
||||
SmTmpDevice aTmpDev (rDev, true);
|
||||
aTmpDev.SetFont(GetFont());
|
||||
|
||||
SmRect aRect(aTmpDev, &rFormat, "a", GetFont().GetBorderWidth());
|
||||
SmRect aRect(aTmpDev, &rFormat, u"a"_ustr, GetFont().GetBorderWidth());
|
||||
mnFormulaBaseline = GetAlignM();
|
||||
// move from middle position by constant - distance
|
||||
// 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
|
||||
//! line in rect.cxx such as 'a' in order to make 'vec a' look same to
|
||||
//! 'vec {a}'.
|
||||
SmRect::operator = (SmRect(aTmpDev, &rFormat, "a",
|
||||
SmRect::operator = (SmRect(aTmpDev, &rFormat, u"a"_ustr,
|
||||
GetFont().GetBorderWidth()));
|
||||
// make sure that the rectangle occupies (almost) no space
|
||||
SetWidth(1);
|
||||
|
@ -298,9 +298,9 @@ OUString SmOoxmlImport::handleBorderBox()
|
||||
OUString SmOoxmlImport::handleD()
|
||||
{
|
||||
m_rStream.ensureOpeningTag( M_TOKEN( d ));
|
||||
OUString opening = "(";
|
||||
OUString closing = ")";
|
||||
OUString separator = "|";
|
||||
OUString opening = u"("_ustr;
|
||||
OUString closing = u")"_ustr;
|
||||
OUString separator = u"|"_ustr;
|
||||
if( XmlStream::Tag dPr = m_rStream.checkOpeningTag( M_TOKEN( dPr )))
|
||||
{
|
||||
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( posTag.attribute( M_TOKEN( val ), OUString( "bot" )) == "top" )
|
||||
if( posTag.attribute( M_TOKEN( val ), u"bot"_ustr) == "top" )
|
||||
pos = top;
|
||||
m_rStream.ensureClosingTag( M_TOKEN( pos ));
|
||||
}
|
||||
|
@ -432,13 +432,13 @@ void SmParser5::NextToken() //Central part of the parser
|
||||
// See https://bz.apache.org/ooo/show_bug.cgi?id=45779
|
||||
aRes
|
||||
= m_aNumCC.parsePredefinedToken(KParseType::ASC_NUMBER, m_aBufferString, m_nBufferIndex,
|
||||
coNumStartFlags, "", coNumContFlags, "");
|
||||
coNumStartFlags, u""_ustr, coNumContFlags, u""_ustr);
|
||||
|
||||
if (aRes.TokenType == 0)
|
||||
{
|
||||
// Try again with the default token parsing.
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "",
|
||||
coContFlags, "");
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
|
||||
coContFlags, u""_ustr);
|
||||
}
|
||||
|
||||
nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace;
|
||||
@ -668,9 +668,9 @@ void SmParser5::NextToken() //Central part of the parser
|
||||
"unexpected comment start");
|
||||
|
||||
// get identifier of user-defined character
|
||||
ParseResult aTmpRes = m_pSysCC->parseAnyToken(m_aBufferString, rnEndPos,
|
||||
KParseTokens::ANY_LETTER, "",
|
||||
coUserDefinedCharContFlags, "");
|
||||
ParseResult aTmpRes = m_pSysCC->parseAnyToken(
|
||||
m_aBufferString, rnEndPos, KParseTokens::ANY_LETTER, u""_ustr,
|
||||
coUserDefinedCharContFlags, u""_ustr);
|
||||
|
||||
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))
|
||||
++m_nBufferIndex;
|
||||
//parse, there are few options, so less strict.
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "",
|
||||
coContFlags, "");
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
|
||||
coContFlags, u""_ustr);
|
||||
nRealStart = m_nBufferIndex + aRes.LeadingWhiteSpace;
|
||||
m_nBufferIndex = nRealStart;
|
||||
bCont = false;
|
||||
@ -1066,13 +1066,13 @@ void SmParser5::NextTokenFontSize()
|
||||
while (UnicodeType::SPACE_SEPARATOR == m_pSysCC->getType(m_aBufferString, m_nBufferIndex))
|
||||
++m_nBufferIndex;
|
||||
//hexadecimal parser
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coNum16StartFlags, ".",
|
||||
coNum16ContFlags, ".,");
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coNum16StartFlags,
|
||||
u"."_ustr, coNum16ContFlags, u".,"_ustr);
|
||||
if (aRes.TokenType == 0)
|
||||
{
|
||||
// Try again with the default token parsing.
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, "",
|
||||
coContFlags, "");
|
||||
aRes = m_pSysCC->parseAnyToken(m_aBufferString, m_nBufferIndex, coStartFlags, u""_ustr,
|
||||
coContFlags, u""_ustr);
|
||||
}
|
||||
else
|
||||
hex = true;
|
||||
@ -2495,12 +2495,12 @@ std::unique_ptr<SmNode> SmParser5::DoEvaluate()
|
||||
// Create node
|
||||
std::unique_ptr<SmStructureNode> xSNode(new SmBraceNode(m_aCurToken));
|
||||
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
|
||||
NextToken();
|
||||
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;
|
||||
pLeft.reset(new SmMathSymbolNode(bToken));
|
||||
|
||||
|
@ -75,11 +75,11 @@ OUString SAL_CALL SmFilterDetect::detect( Sequence< PropertyValue >& lDescriptor
|
||||
bStorageOk = !aStorage->GetError();
|
||||
if (bStorageOk)
|
||||
{
|
||||
if ( aStorage->IsStream("Equation Native") )
|
||||
if ( aStorage->IsStream(u"Equation Native"_ustr) )
|
||||
{
|
||||
sal_uInt8 nVersion;
|
||||
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));
|
||||
|
||||
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 */
|
||||
OUString SAL_CALL SmFilterDetect::getImplementationName()
|
||||
{
|
||||
return "com.sun.star.comp.math.FormatDetector";
|
||||
return u"com.sun.star.comp.math.FormatDetector"_ustr;
|
||||
}
|
||||
|
||||
/* XServiceInfo */
|
||||
@ -135,7 +135,7 @@ sal_Bool SAL_CALL SmFilterDetect::supportsService( const OUString& sServiceName
|
||||
/* XServiceInfo */
|
||||
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*
|
||||
|
@ -55,7 +55,7 @@ namespace
|
||||
SmModule* pModule = pUniqueModule.get();
|
||||
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);
|
||||
SmDocShell::RegisterInterface(pModule);
|
||||
|
@ -36,7 +36,7 @@ SmEditEngine::SmEditEngine(SfxItemPool* pItemPool)
|
||||
EnableUndo(true);
|
||||
|
||||
// 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
|
||||
SetBackgroundColor(
|
||||
@ -48,7 +48,7 @@ SmEditEngine::SmEditEngine(SfxItemPool* pItemPool)
|
||||
& EEControlBits(~EEControlBits::PASTESPECIAL));
|
||||
|
||||
// Word delimiters for auto word selection by double click
|
||||
SetWordDelimiters(" .=+-*/(){}[];\"");
|
||||
SetWordDelimiters(u" .=+-*/(){}[];\""_ustr);
|
||||
|
||||
// Default mapping mode
|
||||
SetRefMapMode(MapMode(MapUnit::MapPixel));
|
||||
|
@ -120,7 +120,7 @@ void SmModule::InitInterface_Impl()
|
||||
SmModule::SmModule(SfxObjectFactory* pObjFact)
|
||||
: SfxModule("sm"_ostr, {pObjFact})
|
||||
{
|
||||
SetName("StarMath");
|
||||
SetName(u"StarMath"_ustr);
|
||||
|
||||
SvxModifyControl::RegisterControl(SID_DOC_MODIFIED, this);
|
||||
}
|
||||
|
@ -27,8 +27,8 @@
|
||||
|
||||
|
||||
SmSym::SmSym() :
|
||||
m_aUiName(OUString("unknown")),
|
||||
m_aSetName(OUString("unknown")),
|
||||
m_aUiName(u"unknown"_ustr),
|
||||
m_aSetName(u"unknown"_ustr),
|
||||
m_cChar('\0'),
|
||||
m_bPredefined(false)
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ sal_Bool MathTypeFilter::filter(const uno::Sequence<beans::PropertyValue>& rDesc
|
||||
{
|
||||
rtl::Reference<SotStorage> aStorage(new SotStorage(pStream.get(), false));
|
||||
// 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()))
|
||||
{
|
||||
@ -94,7 +94,10 @@ void MathTypeFilter::setTargetDocument(const uno::Reference<lang::XComponent>& x
|
||||
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)
|
||||
{
|
||||
@ -103,7 +106,7 @@ sal_Bool MathTypeFilter::supportsService(const OUString& rServiceName)
|
||||
|
||||
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*
|
||||
|
@ -80,36 +80,36 @@ SmPrintUIOptions::SmPrintUIOptions()
|
||||
|
||||
// load the math PrinterOptions into the custom tab
|
||||
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)
|
||||
SvtModuleOptions aOpt;
|
||||
OUString aAppGroupname(
|
||||
SmResId( RID_PRINTUIOPT_PRODNAME ).
|
||||
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
|
||||
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)
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt("title", SmResId( RID_PRINTUIOPT_TITLE ),
|
||||
".HelpID:vcl:PrintDialog:TitleRow:CheckBox",
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"title"_ustr, SmResId( RID_PRINTUIOPT_TITLE ),
|
||||
u".HelpID:vcl:PrintDialog:TitleRow:CheckBox"_ustr,
|
||||
PRTUIOPT_TITLE_ROW,
|
||||
pConfig->IsPrintTitle());
|
||||
// create a bool option for formula text (matches to SID_PRINTTEXT)
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt("formulatext", SmResId( RID_PRINTUIOPT_FRMLTXT ),
|
||||
".HelpID:vcl:PrintDialog:FormulaText:CheckBox",
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"formulatext"_ustr, SmResId( RID_PRINTUIOPT_FRMLTXT ),
|
||||
u".HelpID:vcl:PrintDialog:FormulaText:CheckBox"_ustr,
|
||||
PRTUIOPT_FORMULA_TEXT,
|
||||
pConfig->IsPrintFormulaText());
|
||||
// create a bool option for border (matches to SID_PRINTFRAME)
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt("borders", SmResId( RID_PRINTUIOPT_BORDERS ),
|
||||
".HelpID:vcl:PrintDialog:Border:CheckBox",
|
||||
m_aUIProperties[nIdx++].Value = setBoolControlOpt(u"borders"_ustr, SmResId( RID_PRINTUIOPT_BORDERS ),
|
||||
u".HelpID:vcl:PrintDialog:Border:CheckBox"_ustr,
|
||||
PRTUIOPT_BORDER,
|
||||
pConfig->IsPrintFrame());
|
||||
|
||||
// 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)
|
||||
Sequence< OUString > aChoices{
|
||||
@ -118,14 +118,14 @@ SmPrintUIOptions::SmPrintUIOptions()
|
||||
SmResId( RID_PRINTUIOPT_SCALING )
|
||||
};
|
||||
Sequence< OUString > aHelpIds{
|
||||
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0",
|
||||
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1",
|
||||
".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2"
|
||||
u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:0"_ustr,
|
||||
u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:1"_ustr,
|
||||
u".HelpID:vcl:PrintDialog:PrintFormat:RadioButton:2"_ustr
|
||||
};
|
||||
Sequence< OUString > aWidgetIds{
|
||||
"originalsize",
|
||||
"fittopage",
|
||||
"scaling"
|
||||
u"originalsize"_ustr,
|
||||
u"fittopage"_ustr,
|
||||
u"scaling"_ustr
|
||||
};
|
||||
OUString aPrintFormatProp( PRTUIOPT_PRINT_FORMAT );
|
||||
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)
|
||||
vcl::PrinterOptionsHelper::UIControlOptions aRangeOpt( aPrintFormatProp, 2, true );
|
||||
m_aUIProperties[nIdx++].Value = setRangeControlOpt("scalingspin", OUString(),
|
||||
".HelpID:vcl:PrintDialog:PrintScale:NumericField",
|
||||
m_aUIProperties[nIdx++].Value = setRangeControlOpt(u"scalingspin"_ustr, OUString(),
|
||||
u".HelpID:vcl:PrintDialog:PrintScale:NumericField"_ustr,
|
||||
PRTUIOPT_PRINT_SCALE,
|
||||
pConfig->GetPrintZoomFactor(), // initial value
|
||||
10, // min value
|
||||
1000, // max value
|
||||
aRangeOpt);
|
||||
|
||||
Sequence aHintNoLayoutPage{ comphelper::makePropertyValue("HintNoLayoutPage", true) };
|
||||
Sequence aHintNoLayoutPage{ comphelper::makePropertyValue(u"HintNoLayoutPage"_ustr, true) };
|
||||
m_aUIProperties[nIdx++].Value <<= aHintNoLayoutPage;
|
||||
|
||||
assert(nIdx == nNumProps);
|
||||
@ -236,80 +236,80 @@ static const rtl::Reference<PropertySetInfo> & lcl_createModelPropertyInfo ()
|
||||
{
|
||||
static const PropertyMapEntry aModelPropertyInfoMap[] =
|
||||
{
|
||||
{ OUString("Alignment") , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ OUString("BaseFontHeight") , 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 },
|
||||
{ OUString("BottomMargin") , 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 },
|
||||
{ OUString("CustomFontNameSans") , 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 },
|
||||
{ OUString("DialogLibraries") , 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 },
|
||||
{ OUString("FontFixedIsItalic") , 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 },
|
||||
{ OUString("FontFunctionsIsItalic") , 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 },
|
||||
{ OUString("FontMathIsItalic") , 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 },
|
||||
{ OUString("FontNameMath") , 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 },
|
||||
{ OUString("FontNameText") , 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 },
|
||||
{ OUString("FontNumbersIsBold") , 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 },
|
||||
{ OUString("FontSansIsBold") , 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 },
|
||||
{ OUString("FontSerifIsBold") , 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 },
|
||||
{ OUString("FontTextIsBold") , 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 },
|
||||
{ OUString("FontVariablesIsBold") , 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 },
|
||||
{ OUString("Formula") , HANDLE_FORMULA , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 },
|
||||
{ OUString("IsScaleAllBrackets") , 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 },
|
||||
{ OUString("IsRightToLeft") , 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 },
|
||||
{ OUString("LeftMargin") , HANDLE_LEFT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LEFTSPACE },
|
||||
{ OUString("PrinterName") , 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 },
|
||||
{ OUString("RelativeBracketDistance") , 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 },
|
||||
{ OUString("RelativeFontHeightFunctions") , 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 },
|
||||
{ OUString("RelativeFontHeightLimits") , 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 },
|
||||
{ OUString("RelativeFontHeightText") , 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 },
|
||||
{ OUString("RelativeFractionBarLineWeight") , 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 },
|
||||
{ OUString("RelativeFractionNumeratorHeight") , 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 },
|
||||
{ OUString("RelativeIndexSuperscript") , 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 },
|
||||
{ OUString("RelativeLowerLimitDistance") , 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 },
|
||||
{ OUString("RelativeMatrixLineSpacing") , 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 },
|
||||
{ OUString("RelativeOperatorSpacing") , 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 },
|
||||
{ OUString("RelativeScaleBracketExcessSize") , 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 },
|
||||
{ OUString("RelativeSymbolMinimumHeight") , 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 },
|
||||
{ OUString("RelativeUpperLimitDistance") , 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 },
|
||||
{ OUString("RuntimeUID") , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 },
|
||||
{ OUString("SaveThumbnail") , HANDLE_SAVE_THUMBNAIL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
|
||||
{ OUString("Symbols") , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 },
|
||||
{ OUString("UserDefinedSymbolsInUse") , 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"Alignment"_ustr , HANDLE_ALIGNMENT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"BaseFontHeight"_ustr , HANDLE_BASE_FONT_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"BasicLibraries"_ustr , HANDLE_BASIC_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 },
|
||||
{ u"BottomMargin"_ustr , HANDLE_BOTTOM_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BOTTOMSPACE },
|
||||
{ u"CustomFontNameFixed"_ustr , HANDLE_CUSTOM_FONT_NAME_FIXED , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FIXED },
|
||||
{ u"CustomFontNameSans"_ustr , HANDLE_CUSTOM_FONT_NAME_SANS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SANS },
|
||||
{ u"CustomFontNameSerif"_ustr , HANDLE_CUSTOM_FONT_NAME_SERIF , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_SERIF },
|
||||
{ u"DialogLibraries"_ustr , HANDLE_DIALOG_LIBRARIES , cppu::UnoType<script::XLibraryContainer>::get(), PropertyAttribute::READONLY, 0 },
|
||||
{ u"FontFixedIsBold"_ustr , HANDLE_CUSTOM_FONT_FIXED_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED },
|
||||
{ u"FontFixedIsItalic"_ustr , HANDLE_CUSTOM_FONT_FIXED_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FIXED },
|
||||
{ u"FontFunctionsIsBold"_ustr , HANDLE_FONT_FUNCTIONS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION },
|
||||
{ u"FontFunctionsIsItalic"_ustr , HANDLE_FONT_FUNCTIONS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_FUNCTION },
|
||||
{ u"FontMathIsBold"_ustr , HANDLE_FONT_MATH_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH },
|
||||
{ u"FontMathIsItalic"_ustr , HANDLE_FONT_MATH_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_MATH },
|
||||
{ u"FontNameFunctions"_ustr , HANDLE_FONT_NAME_FUNCTIONS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_FUNCTION },
|
||||
{ u"FontNameMath"_ustr , HANDLE_FONT_NAME_MATH , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_MATH },
|
||||
{ u"FontNameNumbers"_ustr , HANDLE_FONT_NAME_NUMBERS , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_NUMBER },
|
||||
{ u"FontNameText"_ustr , HANDLE_FONT_NAME_TEXT , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_TEXT },
|
||||
{ u"FontNameVariables"_ustr , HANDLE_FONT_NAME_VARIABLES , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, FNT_VARIABLE },
|
||||
{ u"FontNumbersIsBold"_ustr , HANDLE_FONT_NUMBERS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER },
|
||||
{ u"FontNumbersIsItalic"_ustr , HANDLE_FONT_NUMBERS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_NUMBER },
|
||||
{ u"FontSansIsBold"_ustr , HANDLE_CUSTOM_FONT_SANS_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS },
|
||||
{ u"FontSansIsItalic"_ustr , HANDLE_CUSTOM_FONT_SANS_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SANS },
|
||||
{ u"FontSerifIsBold"_ustr , HANDLE_CUSTOM_FONT_SERIF_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF },
|
||||
{ u"FontSerifIsItalic"_ustr , HANDLE_CUSTOM_FONT_SERIF_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_SERIF },
|
||||
{ u"FontTextIsBold"_ustr , HANDLE_FONT_TEXT_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT },
|
||||
{ u"FontTextIsItalic"_ustr , HANDLE_FONT_TEXT_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_TEXT },
|
||||
{ u"FontVariablesIsBold"_ustr , HANDLE_FONT_VARIABLES_WEIGHT , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE },
|
||||
{ u"FontVariablesIsItalic"_ustr , HANDLE_FONT_VARIABLES_POSTURE , cppu::UnoType<bool>::get(), PROPERTY_NONE, FNT_VARIABLE },
|
||||
{ u"Formula"_ustr , HANDLE_FORMULA , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"IsScaleAllBrackets"_ustr , HANDLE_IS_SCALE_ALL_BRACKETS , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"IsTextMode"_ustr , HANDLE_IS_TEXT_MODE , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"IsRightToLeft"_ustr , HANDLE_IS_RIGHT_TO_LEFT , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"GreekCharStyle"_ustr , HANDLE_GREEK_CHAR_STYLE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"LeftMargin"_ustr , HANDLE_LEFT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LEFTSPACE },
|
||||
{ u"PrinterName"_ustr , HANDLE_PRINTER_NAME , ::cppu::UnoType<OUString>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"PrinterSetup"_ustr , HANDLE_PRINTER_SETUP , cppu::UnoType<const Sequence < sal_Int8 >>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"RelativeBracketDistance"_ustr , HANDLE_RELATIVE_BRACKET_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSPACE },
|
||||
{ u"RelativeBracketExcessSize"_ustr , HANDLE_RELATIVE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_BRACKETSIZE },
|
||||
{ u"RelativeFontHeightFunctions"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_FUNCTIONS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_FUNCTION },
|
||||
{ u"RelativeFontHeightIndices"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_INDICES , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_INDEX },
|
||||
{ u"RelativeFontHeightLimits"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_LIMITS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_LIMITS },
|
||||
{ u"RelativeFontHeightOperators"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_OPERATORS , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_OPERATOR },
|
||||
{ u"RelativeFontHeightText"_ustr , HANDLE_RELATIVE_FONT_HEIGHT_TEXT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, SIZ_TEXT },
|
||||
{ u"RelativeFractionBarExcessLength"_ustr , HANDLE_RELATIVE_FRACTION_BAR_EXCESS_LENGTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_FRACTION },
|
||||
{ u"RelativeFractionBarLineWeight"_ustr , HANDLE_RELATIVE_FRACTION_BAR_LINE_WEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_STROKEWIDTH },
|
||||
{ u"RelativeFractionDenominatorDepth"_ustr , HANDLE_RELATIVE_FRACTION_DENOMINATOR_DEPTH, ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_DENOMINATOR },
|
||||
{ u"RelativeFractionNumeratorHeight"_ustr , HANDLE_RELATIVE_FRACTION_NUMERATOR_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NUMERATOR },
|
||||
{ u"RelativeIndexSubscript"_ustr , HANDLE_RELATIVE_INDEX_SUBSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUBSCRIPT },
|
||||
{ u"RelativeIndexSuperscript"_ustr , HANDLE_RELATIVE_INDEX_SUPERSCRIPT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_SUPERSCRIPT },
|
||||
{ u"RelativeLineSpacing"_ustr , HANDLE_RELATIVE_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_VERTICAL },
|
||||
{ u"RelativeLowerLimitDistance"_ustr , HANDLE_RELATIVE_LOWER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_LOWERLIMIT },
|
||||
{ u"RelativeMatrixColumnSpacing"_ustr , HANDLE_RELATIVE_MATRIX_COLUMN_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXCOL },
|
||||
{ u"RelativeMatrixLineSpacing"_ustr , HANDLE_RELATIVE_MATRIX_LINE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_MATRIXROW },
|
||||
{ u"RelativeOperatorExcessSize"_ustr , HANDLE_RELATIVE_OPERATOR_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSIZE },
|
||||
{ u"RelativeOperatorSpacing"_ustr , HANDLE_RELATIVE_OPERATOR_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_OPERATORSPACE },
|
||||
{ u"RelativeRootSpacing"_ustr , HANDLE_RELATIVE_ROOT_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ROOT },
|
||||
{ u"RelativeScaleBracketExcessSize"_ustr , HANDLE_RELATIVE_SCALE_BRACKET_EXCESS_SIZE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_NORMALBRACKETSIZE },
|
||||
{ u"RelativeSpacing"_ustr , HANDLE_RELATIVE_SPACING , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_HORIZONTAL },
|
||||
{ u"RelativeSymbolMinimumHeight"_ustr , HANDLE_RELATIVE_SYMBOL_MINIMUM_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSPACE },
|
||||
{ u"RelativeSymbolPrimaryHeight"_ustr , HANDLE_RELATIVE_SYMBOL_PRIMARY_HEIGHT , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_ORNAMENTSIZE },
|
||||
{ u"RelativeUpperLimitDistance"_ustr , HANDLE_RELATIVE_UPPER_LIMIT_DISTANCE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_UPPERLIMIT },
|
||||
{ u"RightMargin"_ustr , HANDLE_RIGHT_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_RIGHTSPACE },
|
||||
{ u"RuntimeUID"_ustr , HANDLE_RUNTIME_UID , cppu::UnoType<OUString>::get(), PropertyAttribute::READONLY, 0 },
|
||||
{ u"SaveThumbnail"_ustr , HANDLE_SAVE_THUMBNAIL , cppu::UnoType<bool>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"Symbols"_ustr , HANDLE_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"UserDefinedSymbolsInUse"_ustr , HANDLE_USED_SYMBOLS , cppu::UnoType<Sequence < SymbolDescriptor >>::get(), PropertyAttribute::READONLY, 0 },
|
||||
{ u"TopMargin"_ustr , HANDLE_TOP_MARGIN , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, DIS_TOPSPACE },
|
||||
// #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#
|
||||
{ OUString("BaseLine") , 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 },
|
||||
{ OUString("SyntaxVersion") , HANDLE_STARMATH_VERSION , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"BaseLine"_ustr , HANDLE_BASELINE , ::cppu::UnoType<sal_Int16>::get(), PROPERTY_NONE, 0 },
|
||||
{ u"InteropGrabBag"_ustr , HANDLE_INTEROP_GRAB_BAG , cppu::UnoType<uno::Sequence< beans::PropertyValue >>::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 );
|
||||
return PROPS_INFO;
|
||||
@ -385,7 +385,7 @@ static sal_Int16 lcl_AnyToINT16(const uno::Any& rAny)
|
||||
|
||||
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)
|
||||
|
@ -106,14 +106,14 @@ using namespace css::accessibility;
|
||||
using namespace css::uno;
|
||||
|
||||
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())
|
||||
, nColumnPixW(nLinePixH)
|
||||
, nZoom(100)
|
||||
// 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))
|
||||
, mxGraphicWin(new weld::CustomWeld(*m_xBuilder, "mathview", *mxGraphic))
|
||||
, mxGraphicWin(new weld::CustomWeld(*m_xBuilder, u"mathview"_ustr, *mxGraphic))
|
||||
{
|
||||
InitControlBase(mxGraphic->GetDrawingArea());
|
||||
|
||||
@ -940,13 +940,13 @@ void SmEditController::StateChangedAtToolBoxControl(sal_uInt16 nSID, SfxItemStat
|
||||
/**************************************************************************/
|
||||
SmCmdBoxWindow::SmCmdBoxWindow(SfxBindings *pBindings_, SfxChildWindow *pChildWindow,
|
||||
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))
|
||||
, aController(*m_xEdit, SID_TEXT, *pBindings_)
|
||||
, bExiting(false)
|
||||
, aInitialFocusTimer("SmCmdBoxWindow aInitialFocusTimer")
|
||||
{
|
||||
set_id("math_edit");
|
||||
set_id(u"math_edit"_ustr);
|
||||
|
||||
SetHelpId( HID_SMA_COMMAND_WIN );
|
||||
SetSizePixel(LogicToPixel(Size(292 , 94), MapMode(MapUnit::MapAppFont)));
|
||||
@ -977,7 +977,7 @@ void SmCmdBoxWindow::ShowContextMenu(const Point& rPos)
|
||||
ToTop();
|
||||
SmViewShell *pViewSh = GetView();
|
||||
if (pViewSh)
|
||||
pViewSh->GetViewFrame().GetDispatcher()->ExecutePopup("edit", this, &rPos);
|
||||
pViewSh->GetViewFrame().GetDispatcher()->ExecutePopup(u"edit"_ustr, this, &rPos);
|
||||
}
|
||||
|
||||
void SmCmdBoxWindow::Command(const CommandEvent& rCEvt)
|
||||
@ -1298,7 +1298,7 @@ void SmViewShell::Insert( SfxMedium& rMedium )
|
||||
uno::Reference <embed::XStorage> xStorage = rMedium.GetStorage();
|
||||
if (xStorage.is() && xStorage->getElementNames().hasElements())
|
||||
{
|
||||
if (xStorage->hasByName("content.xml"))
|
||||
if (xStorage->hasByName(u"content.xml"_ustr))
|
||||
{
|
||||
// is this a fabulous math package ?
|
||||
rtl::Reference<SmModel> xModel(dynamic_cast<SmModel*>(pDoc->GetModel().get()));
|
||||
@ -1590,7 +1590,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
|
||||
SotClipboardFormatId nId = SotClipboardFormatId::MATHML;
|
||||
if (aDataHelper.HasFormat(nId))
|
||||
{
|
||||
xStrm = aDataHelper.GetInputStream(nId, "");
|
||||
xStrm = aDataHelper.GetInputStream(nId, u""_ustr);
|
||||
if (xStrm.is())
|
||||
{
|
||||
SfxMedium aClipboardMedium;
|
||||
@ -2017,7 +2017,7 @@ public:
|
||||
}
|
||||
|
||||
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;
|
||||
};
|
||||
@ -2031,7 +2031,7 @@ SmViewShell::SmViewShell(SfxViewFrame& rFrame_, SfxViewShell *)
|
||||
{
|
||||
SetStatusText(OUString());
|
||||
SetWindow(mxGraphicWindow.get());
|
||||
SfxShell::SetName("SmView");
|
||||
SfxShell::SetName(u"SmView"_ustr);
|
||||
SfxShell::SetUndoManager( &GetDoc()->GetEditEngine().GetUndoManager() );
|
||||
SetController(new SmController(*this));
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user