summaryrefslogtreecommitdiff
path: root/starmath
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2012-01-02 10:55:27 +0000
committerCaolán McNamara <caolanm@redhat.com>2012-01-05 09:18:19 +0000
commitbacfd2dc4cea1a5d87658ed8592116acd931e000 (patch)
treed22172a33fdd13a440b6882a28c23ea2d639bbad /starmath
parent6281eb0e0792da0194c07da18296e94dd944b8e5 (diff)
add a comphelper::string::getTokenCount
suitable for conversion from [Byte]String::GetTokenCount converted low-hanging variants to rtl::O[UString]::getToken loops added unit test
Diffstat (limited to 'starmath')
-rw-r--r--starmath/source/view.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 4dbc8a8897ad..d75b78b7e37e 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1072,7 +1072,7 @@ Size SmViewShell::GetTextLineSize(OutputDevice& rDevice, const String& rLine)
String aText;
Size aSize(rDevice.GetTextWidth(rLine), rDevice.GetTextHeight());
- sal_uInt16 nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
if (nTabs > 0)
{
@@ -1104,7 +1104,7 @@ Size SmViewShell::GetTextSize(OutputDevice& rDevice, const String& rText, long M
String aLine;
Size TextSize;
String aText;
- sal_uInt16 nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = comphelper::string::getTokenCount(rText, '\n');
for (sal_uInt16 i = 0; i < nLines; i++)
{
@@ -1164,7 +1164,7 @@ void SmViewShell::DrawTextLine(OutputDevice& rDevice, const Point& rPosition, co
String aText;
Point aPoint (rPosition);
- sal_uInt16 nTabs = rLine.GetTokenCount('\t');
+ sal_uInt16 nTabs = comphelper::string::getTokenCount(rLine, '\t');
if (nTabs > 0)
{
@@ -1191,7 +1191,7 @@ void SmViewShell::DrawText(OutputDevice& rDevice, const Point& rPosition, const
{
RTL_LOGFILE_CONTEXT( aLog, "starmath: SmViewShell::DrawText" );
- sal_uInt16 nLines = rText.GetTokenCount('\n');
+ sal_uInt16 nLines = comphelper::string::getTokenCount(rText, '\n');
Point aPoint (rPosition);
Size aSize;
String aLine;