summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
Diffstat (limited to 'starmath')
-rw-r--r--starmath/qa/extras/mmlimport-test.cxx16
-rw-r--r--starmath/qa/unit/starmath-dialogs-test.cxx2
-rw-r--r--starmath/source/cfgitem.cxx8
-rw-r--r--starmath/source/cfgitem.hxx7
4 files changed, 17 insertions, 16 deletions
diff --git a/starmath/qa/extras/mmlimport-test.cxx b/starmath/qa/extras/mmlimport-test.cxx
index bc52fceb3d29..542722e8c75b 100644
--- a/starmath/qa/extras/mmlimport-test.cxx
+++ b/starmath/qa/extras/mmlimport-test.cxx
@@ -94,7 +94,7 @@ void Test::tearDown()
void Test::testColor()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/color.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/color.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{ color black b"
" color white w"
" color red r"
@@ -120,40 +120,40 @@ void Test::testColor()
void Test::testSimple()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/simple.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/simple.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"),
mxDocShell->GetText());
}
void Test::testNsPrefixMath()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/ns-prefix-math.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/ns-prefix-math.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("left ( { a + b } right ) ^ 2"),
mxDocShell->GetText());
}
void Test::testMaction()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/maction.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/maction.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("matrix{ 1 ## 2 ## 3 }"),
mxDocShell->GetText());
}
void Test::testMspace()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/mspace.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/mspace.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("{ a b ~ c ~~``` d }"), mxDocShell->GetText());
}
void Test::testtdf99556()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf99556-1.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf99556-1.mml"));
CPPUNIT_ASSERT_EQUAL_MESSAGE("loaded text", OUString("sqrt { }"), mxDocShell->GetText());
}
void Test::testTdf103430()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103430.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103430.mml"));
CPPUNIT_ASSERT_EQUAL(OUString("frac { { nitalic d ^ 2 nitalic color blue y } } { { color dvip "
"apricot nitalic d font sans bold italic color red x } }"),
mxDocShell->GetText());
@@ -161,7 +161,7 @@ void Test::testTdf103430()
void Test::testTdf103500()
{
- loadURL(m_directories.getURLFromSrc("starmath/qa/extras/data/tdf103500.mml"));
+ loadURL(m_directories.getURLFromSrc(u"starmath/qa/extras/data/tdf103500.mml"));
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 } } }"),
mxDocShell->GetText());
diff --git a/starmath/qa/unit/starmath-dialogs-test.cxx b/starmath/qa/unit/starmath-dialogs-test.cxx
index e0e45c606cbb..11bcb1dd940c 100644
--- a/starmath/qa/unit/starmath-dialogs-test.cxx
+++ b/starmath/qa/unit/starmath-dialogs-test.cxx
@@ -51,7 +51,7 @@ VclPtr<VclAbstractDialog> StarmathDialogsTest::createDialogByID(sal_uInt32 /*nID
void StarmathDialogsTest::openAnyDialog()
{
/// process input file containing the UXMLDescriptions of the dialogs to dump
- processDialogBatchFile("starmath/qa/unit/data/starmath-dialogs-test.txt");
+ processDialogBatchFile(u"starmath/qa/unit/data/starmath-dialogs-test.txt");
}
CPPUNIT_TEST_SUITE_REGISTRATION(StarmathDialogsTest);
diff --git a/starmath/source/cfgitem.cxx b/starmath/source/cfgitem.cxx
index a7d7d51f71af..e5438e383440 100644
--- a/starmath/source/cfgitem.cxx
+++ b/starmath/source/cfgitem.cxx
@@ -367,7 +367,7 @@ void SmMathConfig::SetFormatModified( bool bVal )
void SmMathConfig::ReadSymbol( SmSym &rSymbol,
const OUString &rSymbolName,
- const OUString &rBaseNode ) const
+ std::u16string_view rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetSymbolPropertyNames();
sal_Int32 nProps = aNames.getLength();
@@ -480,7 +480,7 @@ void SmMathConfig::GetSymbols( std::vector< SmSym > &rSymbols ) const
rSymbols.resize( nNodes );
for (auto& rSymbol : rSymbols)
{
- ReadSymbol( rSymbol, *pNode++, SYMBOL_LIST );
+ ReadSymbol( rSymbol, *pNode++, u"" SYMBOL_LIST );
}
}
@@ -564,7 +564,7 @@ void SmMathConfig::LoadFontFormatList()
for (const OUString& rNode : aNodes)
{
SmFontFormat aFntFmt;
- ReadFontFormat( aFntFmt, rNode, FONT_FORMAT_LIST );
+ ReadFontFormat( aFntFmt, rNode, u"" FONT_FORMAT_LIST );
if (!pFontFormatList->GetFontFormat( rNode ))
pFontFormatList->AddFontFormat( rNode, aFntFmt );
}
@@ -573,7 +573,7 @@ void SmMathConfig::LoadFontFormatList()
void SmMathConfig::ReadFontFormat( SmFontFormat &rFontFormat,
- const OUString &rSymbolName, const OUString &rBaseNode ) const
+ std::u16string_view rSymbolName, std::u16string_view rBaseNode ) const
{
Sequence< OUString > aNames = lcl_GetFontPropertyNames();
sal_Int32 nProps = aNames.getLength();
diff --git a/starmath/source/cfgitem.hxx b/starmath/source/cfgitem.hxx
index fe11ce08f409..47aaf6309d33 100644
--- a/starmath/source/cfgitem.hxx
+++ b/starmath/source/cfgitem.hxx
@@ -22,6 +22,7 @@
#include <utility.hxx>
+#include <string_view>
#include <vector>
#include <rtl/ustring.hxx>
@@ -111,10 +112,10 @@ class SmMathConfig final : public utl::ConfigItem, public SfxBroadcaster
void ReadSymbol( SmSym &rSymbol,
const OUString &rSymbolName,
- const OUString &rBaseNode ) const;
+ std::u16string_view rBaseNode ) const;
void ReadFontFormat( SmFontFormat &rFontFormat,
- const OUString &rSymbolName,
- const OUString &rBaseNode ) const;
+ std::u16string_view rSymbolName,
+ std::u16string_view rBaseNode ) const;
void SetOtherIfNotEqual( bool &rbItem, bool bNewVal );