sw/source/core/unocore/unodraw.cxx |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit f706f8d494e2527dc3f84e1595ea73a20659080c
Author:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
AuthorDate: Tue Sep 1 12:53:13 2020 +0200
Commit:     Samuel Mehrbrodt <samuel.mehrbr...@cib.de>
CommitDate: Wed Sep 2 09:06:19 2020 +0200

    Improve exception when shape with illegal anchor is given
    
    Change-Id: I24cb57b39511db3523f776463a832513a1aae0d9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/101843
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <samuel.mehrbr...@cib.de>

diff --git a/sw/source/core/unocore/unodraw.cxx 
b/sw/source/core/unocore/unodraw.cxx
index 9248bfdf098f..7c7f84f4399b 100644
--- a/sw/source/core/unocore/unodraw.cxx
+++ b/sw/source/core/unocore/unodraw.cxx
@@ -72,6 +72,7 @@
 #include <com/sun/star/text/TextContentAnchorType.hpp>
 #include <basegfx/matrix/b2dhommatrixtools.hxx>
 #include <com/sun/star/drawing/PointSequence.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
 #include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 
 using namespace ::com::sun::star;
@@ -760,7 +761,8 @@ uno::Reference< drawing::XShapeGroup >  
SwXDrawPage::group(const uno::Reference<
                     if (RndStdIds::FLY_AS_CHAR == 
::FindFrameFormat(const_cast<SdrObject*>(
                                             pObj))->GetAnchor().GetAnchorId())
                     {
-                        throw uno::RuntimeException(); // FlyInCnt!
+                        throw lang::IllegalArgumentException(
+                            "Shape must not have 'as character' anchor!", 
nullptr, 0);
                     }
                 }
 
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to