[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - 2 commits - sw/source xmloff/source

Michael Stahl mstahl at redhat.com
Mon Dec 2 14:51:29 PST 2013


 sw/source/filter/ww8/ww8par.cxx            |    2 +-
 xmloff/source/text/XMLTextFrameContext.cxx |   12 ++++++++++--
 2 files changed, 11 insertions(+), 3 deletions(-)

New commits:
commit ae9017f0ba3a3a1fdc55b2f3d57230d04a46808e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 2 23:28:20 2013 +0100

    fdo#71450 fdo#71698: ODF import: fix frame name corner cases
    
    Trying to set a name that is already in use will throw an exception (and
    set a different, generated name); if there is actually no name in the
    file then there's no point trying to set anything.
    
    (regression from b69d152cfa1da868ba960345d72ba78f9f8e1b35)
    
    Change-Id: Ie54d4a830cc23e2853a6efeb81f77dcc788192ea
    (cherry picked from commit 8171e713e74e3d09e86592c28abfe05d0400c071)

diff --git a/xmloff/source/text/XMLTextFrameContext.cxx b/xmloff/source/text/XMLTextFrameContext.cxx
index 6795dcd..3731221 100644
--- a/xmloff/source/text/XMLTextFrameContext.cxx
+++ b/xmloff/source/text/XMLTextFrameContext.cxx
@@ -1307,12 +1307,20 @@ void XMLTextFrameContext_Impl::SetHyperlink( const OUString& rHRef,
 void XMLTextFrameContext_Impl::SetName()
 {
     Reference<XNamed> xNamed(xPropSet, UNO_QUERY);
-    if (xNamed.is())
+    if (!m_sOrigName.isEmpty() && xNamed.is())
     {
         OUString const name(xNamed->getName());
         if (name != m_sOrigName)
         {
-            xNamed->setName(m_sOrigName);
+            try
+            {
+                xNamed->setName(m_sOrigName);
+            }
+            catch (uno::Exception const& e)
+            {   // fdo#71698 document contains 2 frames with same draw:name
+                SAL_INFO("xmloff.text", "SetName(): exception setting \""
+                        << m_sOrigName << "\": " << e.Message);
+            }
         }
     }
 }
commit 276eea27c124560422339da47755014a4801a27e
Author: Michael Stahl <mstahl at redhat.com>
Date:   Mon Dec 2 22:20:25 2013 +0100

    fdo#71749: sw: WW8: don't loop on tables in footnotes
    
    (regression from ee1db992b98378b5e2f5e9aa8af0e36c375e582f)
    
    Change-Id: Id10b6fb8e9e3697b10a1df605cb48d94a55ad207
    (cherry picked from commit 790896d9a557d34ea91d6e5926471de66503be7a)

diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 6a1c048..9638ed3 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -2719,7 +2719,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
                 pPlcxMan->GetPap()->Restore( aSave );
             }
         }
-    } while (nInTable < nCellLevel);
+    } while (!bFtnEdn && (nInTable < nCellLevel));
     return bTableRowEnd;
 }
 


More information about the Libreoffice-commits mailing list