sw/source/filter/ww8/docxexport.cxx |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

New commits:
commit 500c6a5bfb6a6c6ee63c7563436c1024169df292
Author:     Justin Luth <[email protected]>
AuthorDate: Fri Mar 6 12:04:14 2026 -0500
Commit:     Justin Luth <[email protected]>
CommitDate: Fri Mar 6 21:52:31 2026 +0100

    tdf#143269 docx export: no LinkToExternalData followup
    
    addressing reviewer comments
    
    Change-Id: I49afdb1bbd89ba58a25df88bd10253e03de3cb0d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/201159
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins CollaboraOffice <[email protected]>

diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index debb3ad5e40f..98d5bae70dca 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -454,12 +454,12 @@ OString DocxExport::OutputChart( uno::Reference< 
frame::XModel > const & xModel,
     {
         // missing or zero-sized embedded files are reported as corrupt by MS 
Word
         aChartExport.mbLinkToExternalData = false; // assume something wrong 
until proven valid
-        const OUString rExternalDataPath = aChartExport.GetExternalDataPath();
-        if (!rExternalDataPath.isEmpty())
+        const OUString sExternalDataPath = aChartExport.GetExternalDataPath();
+        if (!sExternalDataPath.isEmpty())
         {
             for (const auto& rEmbedding : lcl_getEmbeddingsList(m_xTextDoc))
             {
-                if (rEmbedding.Name == rExternalDataPath)
+                if (rEmbedding.Name == sExternalDataPath)
                 {
                     uno::Reference<io::XInputStream> embeddingsStream;
                     rEmbedding.Value >>= embeddingsStream;
@@ -467,7 +467,10 @@ OString DocxExport::OutputChart( uno::Reference< 
frame::XModel > const & xModel,
                     {
                         uno::Reference<io::XSeekable> 
xSeekable(embeddingsStream, uno::UNO_QUERY);
                         if (xSeekable && xSeekable->getLength())
+                        {
                             aChartExport.mbLinkToExternalData = true;
+                            break;
+                        }
                     }
                 }
             }

Reply via email to