summaryrefslogtreecommitdiff
path: root/starmath/source/cursor.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2010-12-23 16:23:32 +0000
committerCaolán McNamara <caolanm@redhat.com>2010-12-23 16:23:32 +0000
commitcea2ae0781687945cacc91d94904bda76cf29490 (patch)
tree88ff5fc3197db74fb8e7f97594cf058ac7ee0cbf /starmath/source/cursor.cxx
parenta8be19763fbe2b899cdaf51a21edabf96b5c9b05 (diff)
cppcheck: the scope of this variable can be reduced
Diffstat (limited to 'starmath/source/cursor.cxx')
-rw-r--r--starmath/source/cursor.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/starmath/source/cursor.cxx b/starmath/source/cursor.cxx
index 249d6a421ca3..efc61bcad9bc 100644
--- a/starmath/source/cursor.cxx
+++ b/starmath/source/cursor.cxx
@@ -393,8 +393,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
SmTextNode* pText = (SmTextNode*)*it;
String aText = pText->GetText();
//Start and lengths of the segments, 2 is the selected segment
- int start1 = 0,
- start2 = pText->GetSelectionStart(),
+ int start2 = pText->GetSelectionStart(),
start3 = pText->GetSelectionEnd(),
len1 = start2 - 0,
len2 = start3 - start2,
@@ -403,6 +402,7 @@ SmNodeList::iterator SmCursor::TakeSelectedNodesFromList(SmNodeList *pLineList,
USHORT eFontDesc = pText->GetFontDesc();
//If we need make segment 1
if(len1 > 0) {
+ int start1 = 0,
String str = aText.Copy(start1, len1);
pText->ChangeText(str);
it++;