[Libreoffice-commits] core.git: starmath/source

Nicola Povoleri nicola.povoleri at libreitalia.it
Sat Nov 28 10:38:54 PST 2015


 starmath/source/edit.cxx |    7 -------
 1 file changed, 7 deletions(-)

New commits:
commit df506d23a96a489934c948d5f87859ab5313e228
Author: Nicola Povoleri <nicola.povoleri at libreitalia.it>
Date:   Sat Nov 28 16:48:10 2015 +0100

    Remove unused code
    
    Found by scanbuild.
    
    Change-Id: Ie46c056327747bbcb3a9eb0890cf74be7179ea24
    Reviewed-on: https://gerrit.libreoffice.org/20257
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: jan iversen <jani at documentfoundation.org>
    Reviewed-by: Riccardo Magliocchetti <riccardo.magliocchetti at gmail.com>

diff --git a/starmath/source/edit.cxx b/starmath/source/edit.cxx
index 203740a..f156ee6 100644
--- a/starmath/source/edit.cxx
+++ b/starmath/source/edit.cxx
@@ -1015,7 +1015,6 @@ void SmEditWindow::InsertText(const OUString& rText)
         ESelection aSelection = pEditView->GetSelection();
         OUString aCurrentFormula = pEditView->GetEditEngine()->GetText();
         sal_Int32 nStartIndex = 0;
-        sal_Int32 nEndIndex = 0;
 
         // get the start position (when we get a multi line formula)
         for (sal_Int32 nParaPos = 0; nParaPos < aSelection.nStartPara; nParaPos++)
@@ -1023,12 +1022,6 @@ void SmEditWindow::InsertText(const OUString& rText)
 
         nStartIndex += aSelection.nStartPos;
 
-        // get the end position (when we get a multi line formula)
-        for (sal_Int32 nParaPos = 0; nParaPos < aSelection.nEndPara; nParaPos++)
-             nEndIndex = aCurrentFormula.indexOf("\n", nEndIndex) + 1;
-
-        nEndIndex += aSelection.nEndPos;
-
         // TODO: unify this function with the InsertCommand: The do the same thing for different
         // callers
         OUString string(rText);


More information about the Libreoffice-commits mailing list