starmath/source/mathmlimport.cxx | 4 +--- starmath/source/view.cxx | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-)
New commits: commit 41de10f5fd181dc45b487d2ac29cd2b4fbb34710 Author: Marcos Paulo de Souza <marcos.souza....@gmail.com> Date: Wed Jun 19 14:32:38 2013 -0300 Fix fdo#59641 - Duplication in formula when import mathml Remove wrong concatenation of text from EditView in SmXMLImport::endDocument, and use just the text extracted from formula. After the SmXMLImport::endDocument method, we compare the text from doc(extracted from formula) and from editview(text inserted before call the importer) and as they're different, the text from formula will be inserted in the current edit cursor position. Also, remove bogus pDocShell->SetText( String() ), as we will set the text some lines below. Change-Id: Ia317a23d27964a9d1264dcaf9ec0d38b8c586655 Reviewed-on: https://gerrit.libreoffice.org/4369 Reviewed-by: Noel Power <noel.po...@suse.com> Tested-by: Noel Power <noel.po...@suse.com> diff --git a/starmath/source/mathmlimport.cxx b/starmath/source/mathmlimport.cxx index 4d1f95e..a7133df 100644 --- a/starmath/source/mathmlimport.cxx +++ b/starmath/source/mathmlimport.cxx @@ -557,12 +557,10 @@ void SmXMLImport::endDocument(void) pDocShell->SetFormulaTree(pTree); if (0 == aText.Len()) //If we picked up no annotation text { - //Make up some editable text - aText = pDocShell->GetText(); + // Get text from imported formula pTree->CreateTextFromNode(aText); aText = comphelper::string::stripEnd(aText, ' '); } - pDocShell->SetText( String() ); // Convert symbol names SmParser &rParser = pDocShell->GetParser(); diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx index d3ffcfe..e0fd8d43 100644 --- a/starmath/source/view.cxx +++ b/starmath/source/view.cxx @@ -1519,9 +1519,7 @@ bool SmViewShell::InsertFrom(SfxMedium &rMedium) if (pEditWin) pEditWin->InsertText( aText ); else - { SAL_WARN( "starmath", "EditWindow missing" ); - } pDoc->Parse(); pDoc->SetModified(true); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits