sw/source/core/text/porfld.cxx |    2 --
 sw/source/core/text/porfld.hxx |    1 -
 sw/source/core/text/txtfld.cxx |   10 ----------
 3 files changed, 13 deletions(-)

New commits:
commit 3a87f9b67f3274fe4a02b003c49f893c87291c3d
Author:     Mike Kaganski <mike.kagan...@collabora.com>
AuthorDate: Wed Oct 25 11:51:13 2023 +0200
Commit:     Mike Kaganski <mike.kagan...@collabora.com>
CommitDate: Wed Oct 25 14:28:47 2023 +0200

    Drop unused SwFieldPortion::m_nAttrFieldType
    
    Change-Id: Id5858018607c6b0cab0d55a5d247fb39db0978bb
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/158431
    Tested-by: Jenkins
    Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com>

diff --git a/sw/source/core/text/porfld.cxx b/sw/source/core/text/porfld.cxx
index e07747ff8a22..66f39644ffed 100644
--- a/sw/source/core/text/porfld.cxx
+++ b/sw/source/core/text/porfld.cxx
@@ -81,7 +81,6 @@ SwFieldPortion::SwFieldPortion(OUString aExpand, 
std::unique_ptr<SwFont> pFont,
     , m_bAnimated( false), m_bNoPaint( false)
     , m_bReplace( false), m_bPlaceHolder( bPlaceHold )
     , m_bNoLength( false )
-    , m_nAttrFieldType(0)
 {
     SetWhichPor( PortionType::Field );
 }
@@ -103,7 +102,6 @@ SwFieldPortion::SwFieldPortion( const SwFieldPortion& 
rField )
     , m_bReplace( rField.m_bReplace )
     , m_bPlaceHolder( rField.m_bPlaceHolder )
     , m_bNoLength( rField.m_bNoLength )
-    , m_nAttrFieldType( rField.m_nAttrFieldType)
 {
     if ( rField.HasFont() )
         m_pFont.reset( new SwFont( *rField.GetFont() ) );
diff --git a/sw/source/core/text/porfld.hxx b/sw/source/core/text/porfld.hxx
index 39a08a5db665..e1c18fc9bd18 100644
--- a/sw/source/core/text/porfld.hxx
+++ b/sw/source/core/text/porfld.hxx
@@ -63,7 +63,6 @@ public:
     SwFieldPortion(OUString aExpand, std::unique_ptr<SwFont> pFnt = nullptr, 
bool bPlaceHolder = false, TextFrameIndex nLen = TextFrameIndex(1));
     virtual ~SwFieldPortion() override;
 
-    sal_uInt16 m_nAttrFieldType;
     void TakeNextOffset( const SwFieldPortion* pField );
     void CheckScript( const SwTextSizeInfo &rInf );
     bool HasFont() const { return nullptr != m_pFont; }
diff --git a/sw/source/core/text/txtfld.cxx b/sw/source/core/text/txtfld.cxx
index a728c36aec8b..462c9085036b 100644
--- a/sw/source/core/text/txtfld.cxx
+++ b/sw/source/core/text/txtfld.cxx
@@ -142,7 +142,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
                     : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
                 pRet = new SwFieldPortion( aStr );
             }
-            static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= 
ATTR_PAGECOUNTFLD;
             break;
 
         case SwFieldIds::PageNumber:
@@ -170,7 +169,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
                     : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
                 pRet = new SwFieldPortion( aStr );
             }
-            static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= 
ATTR_PAGENUMBERFLD;
             break;
         }
         case SwFieldIds::GetExp:
@@ -250,10 +248,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
                     : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
                 pRet = new SwFieldPortion(str);
             }
-            if( subType == REF_BOOKMARK  )
-                static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = 
ATTR_BOOKMARKFLD;
-            else if( subType == REF_SETREFATTR )
-                static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = 
ATTR_SETREFATTRFLD;
         }
         break;
         case SwFieldIds::DateTime:
@@ -264,10 +258,6 @@ SwExpandPortion *SwTextFormatter::NewFieldPortion( 
SwTextFormatInfo &rInf,
                     : pField->ExpandField(bInClipboard, 
pFrame->getRootFrame()) );
                 pRet = new SwFieldPortion(str);
             }
-            if( subType & DATEFLD  )
-                static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType= 
ATTR_DATEFLD;
-            else if( subType & TIMEFLD )
-                static_cast<SwFieldPortion*>(pRet)->m_nAttrFieldType = 
ATTR_TIMEFLD;
             break;
         default:
             {

Reply via email to