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

New commits:
commit 6441652a3ec925f850c41b4c1e49ad28f3de6c38
Author:     Justin Luth <[email protected]>
AuthorDate: Tue Feb 3 15:20:54 2026 -0500
Commit:     Justin Luth <[email protected]>
CommitDate: Thu Feb 5 14:52:54 2026 +0100

    tdf#170516 docx export: remove unncessary m_nStateOfFlyFrame
    
    This use of this just didn't sound plausible.
    The state of whether a fly was processed or not
    should have absolutely no bearing
    on whether a run will be round-tripped with runSdt properties.
    
    Plus the 'state' has a high chance of being inaccurate anyway.
    
    This was the only use of m_nStateOfFlyFrame,
    so this ends up just being a revert of synerzip's
      fdo#83057 File corrupts on save, as SDT is added incorrectly
    The unit test that came with that still passes...
    
    No existing unit tests matched this condition.
    I guess I should test whether that is true before my changes.
    
    Change-Id: Ib249cccad4eee169d7d2db9545162de546a20ed9
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/198626
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <[email protected]>

diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx 
b/sw/source/filter/ww8/attributeoutputbase.hxx
index 162c414c0a57..2d46bef3842b 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -298,9 +298,6 @@ public:
     /// Has different headers/footers for the title page.
     virtual void SectionTitlePage() = 0;
 
-    /// Set the state of the Fly at current position
-    virtual void SetStateOfFlyFrame( FlyProcessingState /*nStateOfFlyFrame*/ 
){};
-
     /// 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 32da12ed3218..caa090a17b63 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -1791,11 +1791,6 @@ void DocxAttributeOutput::EndParagraphProperties(const 
SfxItemSet& rParagraphMar
     m_bOpenedParaPr = false;
 }
 
-void DocxAttributeOutput::SetStateOfFlyFrame( FlyProcessingState 
nStateOfFlyFrame )
-{
-    m_nStateOfFlyFrame = nStateOfFlyFrame;
-}
-
 void DocxAttributeOutput::ResetFlyProcessingFlag()
 {
     m_bPostponedProcessingFly = false ;
@@ -10664,7 +10659,7 @@ void DocxAttributeOutput::CharGrabBag( const 
SfxGrabBagItem& rItem )
             if (m_aRunSdt.m_bStartedSdt)
                 m_bEndCharSdt = true;
         }
-        else if (rGrabBagElement.first == "SdtPr" && FLY_NOT_PROCESSED != 
m_nStateOfFlyFrame )
+        else if (rGrabBagElement.first == "SdtPr")
         {
             const uno::Sequence<beans::PropertyValue> aGrabBagSdt =
                     rGrabBagElement.second.get< 
uno::Sequence<beans::PropertyValue> >();
@@ -10720,8 +10715,7 @@ DocxAttributeOutput::DocxAttributeOutput( DocxExport 
&rExport, const FSHelperPtr
       m_bParaBeforeAutoSpacing(false),
       m_bParaAfterAutoSpacing(false),
       m_nParaBeforeSpacing(0),
-      m_nParaAfterSpacing(0),
-      m_nStateOfFlyFrame( FLY_NOT_PROCESSED )
+      m_nParaAfterSpacing(0)
 {
     m_nHyperLinkCount.push_back(0);
 }
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx 
b/sw/source/filter/ww8/docxattributeoutput.hxx
index 26391b2d8c80..066b65edd4a6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -277,7 +277,6 @@ public:
     /// End of the tag that encloses the run.
     void EndRedline(const SwRedlineData* pRedlineData, bool bLastRun, bool 
bParagraphProps = false);
 
-    virtual void SetStateOfFlyFrame( FlyProcessingState nStateOfFlyFrame ) 
override;
     virtual bool IsFlyProcessingPostponed() override;
     virtual void ResetFlyProcessingFlag() override;
 
@@ -1086,9 +1085,6 @@ private:
     SdtBlockHelper m_aParagraphSdt;
     SdtBlockHelper m_aRunSdt;
 
-    /// State of the Fly at current position
-    FlyProcessingState m_nStateOfFlyFrame;
-
     /// Same as m_aParagraphSdtPrAlias, but its content is available till the 
SDT is closed.
     OUString m_aStartedParagraphSdtPrAlias;
 
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx 
b/sw/source/filter/ww8/wrtw8nds.cxx
index 978cce67d5ae..ce32d66427f0 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -2527,7 +2527,6 @@ void MSWordExportBase::OutputTextNode( SwTextNode& rNode )
             }
 
             const FlyProcessingState nStateOfFlyFrame = 
aAttrIter.OutFlys(nCurrentPos);
-            AttrOutput().SetStateOfFlyFrame( nStateOfFlyFrame );
 
             // Append bookmarks in this range after flys, exclusive of final
             // position of this range

Reply via email to