[Libreoffice-commits] core.git: sw/qa sw/source

Miklos Vajna vmiklos at collabora.co.uk
Tue Oct 28 09:02:43 PDT 2014


 sw/qa/core/data/odt/pass/fdo84692.odt |binary
 sw/source/core/unocore/unostyle.cxx   |    4 ++--
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 6cee94ba6b224399e5a4a2511df39d3118454c83
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Tue Oct 28 16:43:04 2014 +0100

    fdo#84692 SwXAutoStyleFamily::insertStyle: don't throw on unknown property
    
    Regression from commit 7d9bb549d498d6beed2c4050c402d09643febdfa
    (Related: #i124638# Second step of DrawingLayer FillAttributes...,
    2014-06-02), the problem was that the new branch (used for paragraphs)
    in the method does not tolerate unknown properties (it throws), while
    the behavior was just a warning.
    
    Adapt the new branch to the old behavior, so that the document can be
    opened again.
    
    Change-Id: I5d849987602fb8aa0cbbda92ce07c050067473b3

diff --git a/sw/qa/core/data/odt/pass/fdo84692.odt b/sw/qa/core/data/odt/pass/fdo84692.odt
new file mode 100644
index 0000000..db5c878
Binary files /dev/null and b/sw/qa/core/data/odt/pass/fdo84692.odt differ
diff --git a/sw/source/core/unocore/unostyle.cxx b/sw/source/core/unocore/unostyle.cxx
index 1038f26..84d7148 100644
--- a/sw/source/core/unocore/unostyle.cxx
+++ b/sw/source/core/unocore/unostyle.cxx
@@ -4210,8 +4210,8 @@ uno::Reference< style::XAutoStyle > SwXAutoStyleFamily::insertStyle(
 
             if (!pEntry)
             {
-                throw uno::RuntimeException(OUString("Unknown property: ") + rPropName,
-                    static_cast<cppu::OWeakObject*>(this));
+                SAL_WARN("sw.core", "SwXAutoStyleFamily::Modify: Unknown property: " << rPropName);
+                continue;
             }
 
             const sal_uInt8 nMemberId(pEntry->nMemberId & (~SFX_METRIC_ITEM));


More information about the Libreoffice-commits mailing list