sw/source/filter/ww8/attributeoutputbase.hxx |    2 --
 sw/source/filter/ww8/docxattributeoutput.cxx |   10 ++--------
 sw/source/filter/ww8/docxattributeoutput.hxx |    2 --
 sw/source/filter/ww8/wrtw8nds.cxx            |   13 +------------
 sw/source/filter/ww8/wrtww8.hxx              |    1 -
 5 files changed, 3 insertions(+), 25 deletions(-)

New commits:
commit 8ec1032d28a394e072402f2e69f41d73d61ec486
Author:     Justin Luth <[email protected]>
AuthorDate: Mon Feb 2 11:34:18 2026 -0500
Commit:     Miklos Vajna <[email protected]>
CommitDate: Thu Feb 5 09:42:19 2026 +0100

    NFC tdf#170516 cleanup: remove unused m_bAnchorLinkedToNode
    
    This variable is obsolete since the previous patch.
    It was never set to true anymore.
    
    IsAnchorLinkedToThisNode is also never called anymore.
    
    Change-Id: Iebe51865cdc512ffb15cab8c1f47d34c0d3ca4e1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198636
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index 0f30865b0425..162c414c0a57 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -300,8 +300,6 @@ public:
 
     /// Set the state of the Fly at current position
     virtual void SetStateOfFlyFrame( FlyProcessingState /*nStateOfFlyFrame*/ 
){};
-    /// If the node has an anchor linked.
-    virtual void SetAnchorIsLinkedToNode( bool /*bAnchorLinkedToNode*/){};
 
     /// Is processing of fly postponed ?
     virtual bool IsFlyProcessingPostponed(){ return false; };
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx 
b/sw/source/filter/ww8/docxattributeoutput.cxx
index 16dc68ccf6b0..5a67c6400db9 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1265,7 +1265,7 @@ void DocxAttributeOutput::EndParagraph( const 
ww8::WW8TableNodeInfoInner::Pointe
 
     m_pSerializer->endElementNS( XML_w, XML_p );
     // on export sdt blocks are never nested ATM
-    if (!m_bAnchorLinkedToNode && !m_aParagraphSdt.m_bStartedSdt)
+    if (!m_aParagraphSdt.m_bStartedSdt)
     {
         m_aParagraphSdt.WriteSdtBlock(m_pSerializer, m_bRunTextIsOn, 
m_rExport.SdrExporter().IsParagraphHasDrawing());
 
@@ -1799,11 +1799,6 @@ void DocxAttributeOutput::SetStateOfFlyFrame( 
FlyProcessingState nStateOfFlyFram
     m_nStateOfFlyFrame = nStateOfFlyFrame;
 }
 
-void DocxAttributeOutput::SetAnchorIsLinkedToNode( bool bAnchorLinkedToNode )
-{
-    m_bAnchorLinkedToNode = bAnchorLinkedToNode ;
-}
-
 void DocxAttributeOutput::ResetFlyProcessingFlag()
 {
     m_bPostponedProcessingFly = false ;
@@ -2122,7 +2117,7 @@ void DocxAttributeOutput::EndRun(const SwTextNode* pNode, 
sal_Int32 nPos, sal_In
 
     // enclose in a sdt block, if necessary: if one is already started, then 
don't do it for now
     // (so on export sdt blocks are never nested ATM)
-    if ( !m_bAnchorLinkedToNode && !m_aRunSdt.m_bStartedSdt)
+    if (!m_aRunSdt.m_bStartedSdt)
     {
         m_aRunSdt.WriteSdtBlock(m_pSerializer, m_bRunTextIsOn, 
m_rExport.SdrExporter().IsParagraphHasDrawing());
     }
@@ -10696,7 +10691,6 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport 
&rExport, const FSHelperPtr
       m_bOpenedParaPr( false ),
       m_bRunTextIsOn( false ),
       m_bWritingHeaderFooter( false ),
-      m_bAnchorLinkedToNode(false),
       m_bWritingField( false ),
       m_bPreventDoubleFieldsHandling( false ),
       m_nNextBookmarkId( 0 ),
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index cfe93a2d7467..26391b2d8c80 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -278,7 +278,6 @@ public:
     void EndRedline(const SwRedlineData* pRedlineData, bool bLastRun, bool 
bParagraphProps = false);
 
     virtual void SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) 
override;
-    virtual void SetAnchorIsLinkedToNode( bool bAnchorLinkedToNode ) override;
     virtual bool IsFlyProcessingPostponed() override;
     virtual void ResetFlyProcessingFlag() override;
 
@@ -873,7 +872,6 @@ private:
 
     /// Flag indicating that the header \ footer are being written
     bool m_bWritingHeaderFooter;
-    bool m_bAnchorLinkedToNode;
 
     /// Flag indicating that multiple runs of a field are being written
     bool m_bWritingField;
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index ea35fbafcc7e..5a90c41f1209 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -717,17 +717,6 @@ bool SwWW8AttrIter::IsWatermarkFrame()
     return false;
 }
 
-bool SwWW8AttrIter::IsAnchorLinkedToThisNode( SwNodeOffset nNodePos )
-{
-    if ( maFlyIter == maFlyFrames.end() )
-        return false;
-
-    /* if current node position and the anchor position are the same
-        then the frame anchor is linked to this node
-    */
-    return nNodePos == maFlyIter->GetPosition().GetNodeIndex();
-}
-
 bool SwWW8AttrIter::HasFlysAt(sal_Int32 nSwPos, const ww8::Frame** 
pInlineHeading) const
 {
     for (const auto& rFly : maFlyFrames)
@@ -2543,7 +2532,7 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
 
             FlyProcessingState nStateOfFlyFrame = aAttrIter.OutFlys( 
nCurrentPos );
             AttrOutput().SetStateOfFlyFrame( nStateOfFlyFrame );
-            AttrOutput().SetAnchorIsLinkedToNode(false);
+
             // Append bookmarks in this range after flys, exclusive of final
             // position of this range
             AppendBookmarks( rNode, nCurrentPos, nNextAttr - nCurrentPos, 
pRedlineData );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index a9991dfc6dda..8943674cfb39 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -1592,7 +1592,6 @@ public:
     const SwFormatDrop& GetSwFormatDrop() const { return mrSwFormatDrop; }
 
     bool IsWatermarkFrame();
-    bool IsAnchorLinkedToThisNode( SwNodeOffset nNodePos );
 
     void SplitRun( sal_Int32 nSplitEndPos );
 

Reply via email to