sw/source/uibase/dochdl/swdtflvr.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit bfb45397935d809f162ea4bcc0c95b4e02ca4524
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Mon Jun 16 10:19:48 2025 +0500
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Mon Jun 16 11:17:37 2025 +0200

    Related: tdf#167035 Check SvxDrawingLayerExport return value
    
    The error may come not only from stream.
    
    Change-Id: I71f050502381459bc0ee6fc8048790a51b0e1d0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/186532
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/uibase/dochdl/swdtflvr.cxx 
b/sw/source/uibase/dochdl/swdtflvr.cxx
index 4c74da31d4f8..9473bd5d0928 100644
--- a/sw/source/uibase/dochdl/swdtflvr.cxx
+++ b/sw/source/uibase/dochdl/swdtflvr.cxx
@@ -735,10 +735,11 @@ bool SwTransferable::WriteObject( SvStream& rOStream,
 
             {
                 uno::Reference<io::XOutputStream> xDocOut( new 
utl::OOutputStreamWrapper( rOStream ) );
-                SvxDrawingLayerExport( pModel, xDocOut );
+                bRet = SvxDrawingLayerExport( pModel, xDocOut );
             }
 
-            bRet = ERRCODE_NONE == rOStream.GetError();
+            if (bRet)
+                bRet = ERRCODE_NONE == rOStream.GetError();
         }
         break;
 

Reply via email to