[PATCH 2/4] Remove unused Variables in WW8Export

Maciej Rumianowski maciej.rumianowski at gmail.com
Mon Oct 3 13:50:47 PDT 2011


Variables were NULL or 0 saved and restored but nothing more.
---
 sw/source/filter/ww8/wrtww8.cxx |   15 ---------------
 sw/source/filter/ww8/wrtww8.hxx |    4 ----
 2 files changed, 0 insertions(+), 19 deletions(-)

diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 6c3670e..e0a3074 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -1755,8 +1755,6 @@ void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
 
     // WW8Export only stuff - zeroed here not to issue warnings
     aData.pOOld = NULL;
-    aData.mpTableAtOld = NULL;
-    aData.mnTableStdAtLenOld = 0;
 
     // Common stuff
     aData.pOldPam = pCurPam;
@@ -1829,11 +1827,6 @@ void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
     else
         rData.pOOld = 0; // reuse pO
 
-    rData.mpTableAtOld = mpTableAt;
-    mpTableAt = NULL;
-    rData.mnTableStdAtLenOld = mnTableStdAtLen;
-    mnTableStdAtLen = 0;
-
     rData.bOldWriteAll = GetWriter().bWriteAll;
     GetWriter().bWriteAll = true;
 }
@@ -1851,12 +1844,6 @@ void WW8Export::RestoreData()
         pO = rData.pOOld;
     }
 
-    OSL_ENSURE( !mpTableAt || !mpTableAt->Count(), "mpTableAt is not empty in WW8Export::RestoreData()" );
-    if ( mpTableAt )
-        delete mpTableAt;
-    mpTableAt = rData.mpTableAtOld;
-    mnTableStdAtLen = rData.mnTableStdAtLenOld;
-
     MSWordExportBase::RestoreData();
 }
 
@@ -3361,8 +3348,6 @@ WW8Export::WW8Export( SwWW8Writer *pWriter,
         bool bIsWW8 )
     : MSWordExportBase( pDocument, pCurrentPam, pOriginalPam ),
       pO( NULL ),
-      mpTableAt( NULL ),
-      mnTableStdAtLen( 0 ),
       pSepx( NULL ),
       bWrtWW8( bIsWW8 ),
       m_pWriter( pWriter ),
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 47ddc56..691c912 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -429,8 +429,6 @@ struct MSWordSaveData
     Point* pOldFlyOffset;
     RndStdIds eOldAnchorType;
     ww::bytes* pOOld;                ///< WW8Export only
-    WW8Bytes* mpTableAtOld;         ///< WW8Export only: Additional buffer for the output of the tables
-    sal_uInt16 mnTableStdAtLenOld;  ///< WW8Export only: Standard length of mpTableAt
     SwPaM* pOldPam, *pOldEnd;
     const sw::Frame* pOldFlyFmt;
     const SwPageDesc* pOldPageDesc;
@@ -913,8 +911,6 @@ class WW8Export : public MSWordExportBase
 {
 public:
     ww::bytes* pO;                       ///< Buffer
-    WW8Bytes* mpTableAt;                ///< Additional buffer for the output of the tables
-    sal_uInt16 mnTableStdAtLen;         ///< Standard length of mpTableAt
 
     SvStream *pTableStrm, *pDataStrm;   ///< Streams for WW97 Export
 
-- 
1.7.4.1


--=-QA4DNqzTCL/OKykWUufJ
Content-Disposition: attachment; filename="0003-2-Part-of-Replace-WW8Bytes-with-ww-bytes.patch"
Content-Type: text/x-patch; name="0003-2-Part-of-Replace-WW8Bytes-with-ww-bytes.patch"; charset="UTF-8"
Content-Transfer-Encoding: 7bit



More information about the LibreOffice mailing list