sw/source/filter/ww8/docxexport.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit e44f852f67414f35f9d5b3ac9990df161c0f6441
Author:     Justin Luth <[email protected]>
AuthorDate: Fri Jan 23 11:12:52 2026 -0500
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Jan 26 09:39:43 2026 +0100

    tdf#170457 docx export: only export comment start/end for this node
    
    Without this patch, LO was creating documents
    that not only had the comment indicators in the wrong position,
    but was also being (correctly) reported as corrupt by MS Word.
    
    Change-Id: I237742274d5d57bb491e25116d90d42c231faced
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198018
    Reviewed-by: Justin Luth <[email protected]>
    Tested-by: Jenkins
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198027
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/filter/ww8/docxexport.cxx 
b/sw/source/filter/ww8/docxexport.cxx
index 0711544ab60e..2c699648b450 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -214,10 +214,10 @@ void DocxExport::AppendAnnotationMarks( const 
SwWW8AttrIter& rAttrs, sal_Int32 n
             const sal_Int32 nStart = pMark->GetMarkStart().GetContentIndex();
             const sal_Int32 nEnd = pMark->GetMarkEnd().GetContentIndex();
 
-            if ( nStart == nCurrentPos )
+            if (nStart == nCurrentPos && rAttrs.GetNode() == 
pMark->GetMarkStart().GetNode())
                 aStarts.push_back( pMark->GetName() );
 
-            if ( nEnd == nCurrentPos )
+            if (nEnd == nCurrentPos && rAttrs.GetNode() == 
pMark->GetMarkEnd().GetNode())
                 aEnds.push_back( pMark->GetName() );
         }
     }

Reply via email to