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

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Thu May 7 13:28:01 UTC 2020


 writerfilter/source/dmapper/DomainMapper_Impl.cxx |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 142a2d3d51b8d1cacea6593a856ba7a7a1d477be
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Mon May 4 10:31:17 2020 +0300
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Thu May 7 15:27:20 2020 +0200

    writerfilter: remove unused xCrsr
    
    This looks like copy/paste code.
    xCrsr isn't really used, and I hardly doubt that it needs
    to verify that a Crsr can exist in order to ensure
    that the dummy paragraph is really created.
    
    In fact, even checking for xTextAppend.is() shouldn't
    be necessary because before this it was being used
    without checking. But since I myself am a copy/paste
    programmer, and I see lots of examples where this
    is tested in similar situations, I leave it as it is
    just to be safe.
    
    Change-Id: Ie45d4bc9d0e1cf0a0d7602b83962805165c3b85d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93413
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index b538ba19f872..ec77ea4c55fa 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -466,8 +466,7 @@ void DomainMapper_Impl::AddDummyParaForTableInSection()
     if (!m_aTextAppendStack.empty())
     {
         uno::Reference< text::XTextAppend >  xTextAppend = m_aTextAppendStack.top().xTextAppend;
-        uno::Reference< text::XTextCursor > xCrsr = xTextAppend->getText()->createTextCursor();
-        if (xCrsr.is())
+        if (xTextAppend.is())
         {
             xTextAppend->finishParagraph(  uno::Sequence< beans::PropertyValue >() );
             SetIsDummyParaAddedForTableInSection(true);


More information about the Libreoffice-commits mailing list