[Libreoffice-commits] .: binfilter/bf_sw binfilter/inc

Caolán McNamara caolan at kemper.freedesktop.org
Tue Aug 9 05:58:30 PDT 2011


 binfilter/bf_sw/source/core/doc/sw_docredln.cxx   |   33 -------
 binfilter/bf_sw/source/core/sw3io/sw3imp.hxx      |    6 -
 binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx   |   34 -------
 binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx |   98 ----------------------
 binfilter/bf_sw/source/core/sw3io/sw_sw3num.cxx   |    6 -
 binfilter/bf_sw/source/core/sw3io/sw_sw3sectn.cxx |   42 ---------
 binfilter/bf_sw/source/core/sw3io/sw_sw3table.cxx |   38 --------
 binfilter/inc/bf_sw/redline.hxx                   |    6 -
 8 files changed, 263 deletions(-)

New commits:
commit 74fa8f88afe89eb16e6c161d892e5e192de4dd41
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Aug 9 13:57:12 2011 +0100

    throw out some more unused methods

diff --git a/binfilter/bf_sw/source/core/doc/sw_docredln.cxx b/binfilter/bf_sw/source/core/doc/sw_docredln.cxx
index 1932054..2e1ee2a 100644
--- a/binfilter/bf_sw/source/core/doc/sw_docredln.cxx
+++ b/binfilter/bf_sw/source/core/doc/sw_docredln.cxx
@@ -500,15 +500,6 @@ typedef BOOL (*Fn_AcceptReject)( SwRedlineTbl& rArr, USHORT& rPos,
 DBG_BF_ASSERT(0, "STRIP");
 /*N*/ }
 
-USHORT SwRedline::GetStackCount() const
-{
-    USHORT nRet = 1;
-    for( SwRedlineData* pCur = pRedlineData; pCur->pNext; ++nRet )
-        pCur = pCur->pNext;
-    return nRet;
-}
-
-
 /*?*/const String& SwRedline::GetAuthorString( USHORT nPos ) const
 /*?*/{
         SwRedlineData* pCur;
@@ -518,30 +509,6 @@ USHORT SwRedline::GetStackCount() const
 /*?*/   return SW_MOD()->GetRedlineAuthor(pCur->nAuthor);
 /*?*/}
 
-const DateTime& SwRedline::GetTimeStamp( USHORT nPos ) const
-{
-    SwRedlineData* pCur; for( pCur = pRedlineData; nPos && pCur->pNext; --nPos )
-        pCur = pCur->pNext;
-    OSL_ENSURE( !nPos, "Pos angabe ist zu gross" );
-    return pCur->aStamp;
-}
-
-SwRedlineType SwRedline::GetRealType( USHORT nPos ) const
-{
-    SwRedlineData* pCur; for( pCur = pRedlineData; nPos && pCur->pNext; --nPos )
-        pCur = pCur->pNext;
-    OSL_ENSURE( !nPos, "Pos angabe ist zu gross" );
-    return pCur->eType;
-}
-
-const String& SwRedline::GetComment( USHORT nPos ) const
-{
-    SwRedlineData* pCur; for( pCur = pRedlineData; nPos && pCur->pNext; --nPos )
-        pCur = pCur->pNext;
-    OSL_ENSURE( !nPos, "Pos angabe ist zu gross" );
-    return pCur->sComment;
-}
-
 /*N*/ int SwRedline::operator==( const SwRedline& rCmp ) const
 /*N*/ {
 /*N*/   return this == &rCmp;
diff --git a/binfilter/bf_sw/source/core/sw3io/sw3imp.hxx b/binfilter/bf_sw/source/core/sw3io/sw3imp.hxx
index 3f7bc04..cadac95 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw3imp.hxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw3imp.hxx
@@ -512,9 +512,7 @@ public:
     BYTE OpenFlagRec();             // Endeposition eines Flag-Records merken
     void CloseFlagRec();            // Flag-Record schliessen
     void OpenValuePos16( UINT16 );  // Position fuer UINT16-Wert merken
-    void CloseValuePos16( UINT16 ); // UINT16-Wert an Position eintragen
     void OpenValuePos32( UINT32 );  // Position fuer UINT32-Wert merken
-    void CloseValuePos32( UINT32 ); // UINT32-Wert an Position eintragen
     ULONG BytesLeft();              // wie viele Bytes hat der Record noch?
     void CheckIoError( SvStream*);  // korrekten E/A-Fehlercode setzen
     static String ConvertStringNoDbDelim( const ByteString& rStr,
@@ -532,7 +530,6 @@ public:
     inline SvStream& OutString( SvStream& rStrm, const String& rStr );
 
     void AddTblLineBoxFmt( SwFrmFmt *pFmt );
-    USHORT GetTblLineBoxFmtId( SwFrmFmt *pFmt );
     USHORT GetTblLineBoxFmtStrPoolId40( SwFrmFmt *pFmt );
     SwFrmFmt *GetTblLineBoxFmt( USHORT nIdx );
 
@@ -636,12 +633,9 @@ public:
 
                                             // SW3NODES.CXX
     void   OutNodeFlyFrames( ULONG nNdId );// O: Absatz- und Zeichen-Flys
-    void   ExportNodeDrawFrmFmts( const SwTxtNode& rNd, xub_StrLen nStart,
-                            xub_StrLen nEnd, USHORT nCount );
     void   ConvertText( SwTxtNode& rNd, const ByteString& rText8,
                         xub_StrLen, SvUShorts*, SvXub_StrLens* );   // I: Zeichensatz-Konversion
     void   InTxtNode( SwTxtNode*, SwNodeIndex&, xub_StrLen, BYTE = 0 );
-    void   OutEmptyTxtNode( ULONG nNodeIdx=0, BOOL bNodeMarks=FALSE );
                                             // I: hartes Attribut
     Sw3ExportTxtAttrs *ExportTxtNode( const SwTxtNode& rNd,
                                             xub_StrLen nStart, xub_StrLen nEnd,
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
index 4c72377..6eb69a0 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3imp.cxx
@@ -911,23 +911,6 @@ void Sw3IoImp::InRecSizes( ULONG nRecPos )
 /*N*/   *pStrm << (sal_uInt16) 0;
 /*N*/ }
 
-// Einfuegen eines 16-Bit-Werts an der obersten Stack-Position
-
-/*N*/ void Sw3IoImp::CloseValuePos16( sal_uInt16 nVal )
-/*N*/ {
-/*N*/   sal_uInt16 nLvl = aValPositions.Count();
-/*N*/   OSL_ENSURE( nLvl, "Unterlauf ValuePos-Stack" );
-/*N*/   if( nLvl )
-/*N*/   {
-/*N*/       nLvl--;
-/*N*/       sal_uInt32 nPos = pStrm->Tell();
-/*N*/       pStrm->Seek( aValPositions[nLvl] );
-/*N*/       aValPositions.Remove( nLvl, 1 );
-/*N*/       *pStrm << nVal;
-/*N*/       pStrm->Seek( nPos );
-/*N*/   }
-/*N*/ }
-
 // Merken der Position fuer einen 32-Bit-Wert, der spaeter dort eingefuegt wird
 // Der Parameter ist nur Dokumentation
 
@@ -940,23 +923,6 @@ void Sw3IoImp::InRecSizes( ULONG nRecPos )
 /*N*/   *pStrm << (sal_uInt32) 0;
 /*N*/ }
 
-// Einfuegen eines 32-Bit-Werts an der obersten Stack-Position
-
-/*N*/ void Sw3IoImp::CloseValuePos32( sal_uInt32 nVal )
-/*N*/ {
-/*N*/   sal_uInt16 nLvl = aValPositions.Count();
-/*N*/   OSL_ENSURE( nLvl, "Unterlauf ValuePos-Stack" );
-/*N*/   if( nLvl )
-/*N*/   {
-/*N*/       nLvl--;
-/*N*/       sal_uInt32 nPos = pStrm->Tell();
-/*N*/       pStrm->Seek( aValPositions[nLvl] );
-/*N*/       aValPositions.Remove( nLvl, 1 );
-/*N*/       *pStrm << nVal;
-/*N*/       pStrm->Seek( nPos );
-/*N*/   }
-/*N*/ }
-
 /*N*/ void Sw3IoImp::CheckIoError( SvStream* p )
 /*N*/ {
 /*N*/   const sal_uInt32 nErr = p->GetErrorCode();
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
index f858353..751311b 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3nodes.cxx
@@ -181,40 +181,6 @@ public:
 /*N*/   pCurTbl = pSave;
 /*N*/ }
 
-// zeichengebundene Zeichen-Objekte absatzgebunden exportieren
-void Sw3IoImp::ExportNodeDrawFrmFmts( const SwTxtNode& rNd, xub_StrLen nStart,
-                                     xub_StrLen nEnd, USHORT nCount )
-{
-   OSL_ENSURE( pExportInfo, "Wo sind die Export-Informationen???" );
-   if( !pExportInfo || !nCount )
-       return;
-
-   pExportInfo->bDrwFrmFmt31 = TRUE;
-
-   USHORT nCntAttr = rNd.HasHints() ? rNd.GetSwpHints().Count() : 0;
-   USHORT nExported = 0;
-   for( USHORT n = 0; n < nCntAttr && nExported < nCount; n++ )
-   {
-       const SwTxtAttr* pHt = rNd.GetSwpHints()[ n ];
-       BOOL   bHtEnd   = BOOL( pHt->GetEnd() != NULL );
-       xub_StrLen nHtStart = *pHt->GetStart();
-
-       if( !bHtEnd && nHtStart >= nStart && nHtStart < nEnd &&
-           RES_TXTATR_FLYCNT==pHt->GetAttr().Which() )
-       {
-           const SwFmtFlyCnt& rFlyCnt = (const SwFmtFlyCnt&)pHt->GetAttr();
-           const SwFmt *pFmt = rFlyCnt.GetFrmFmt();
-           if( RES_DRAWFRMFMT == pFmt->Which() )
-           {
-               OutFormat( SWG_SDRFMT, *pFmt );
-               nExported++;
-           }
-       }
-   }
-
-   pExportInfo->bDrwFrmFmt31 = FALSE;
-}
-
 /*N*/ sal_Char Sw3IoImp::ConvStarSymbolCharToStarBats( sal_Unicode c )
 /*N*/ {
 /*N*/   if( !hBatsFontConv )
@@ -1210,50 +1176,6 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )
 /*N*/   rPos++;
 /*N*/ }
 
-// Zaehlen der Worte eines Nodes
-//!! Wird auch vom SW2-Reader benutzt!!
-
-/*N*/ void sw3io_countwords( const String& rDelimWrd, const String& rStr,
-/*N*/                       ULONG &rWords, ULONG &rChars )
-/*N*/ {
-/*N*/   bool bInWord = FALSE;
-/*N*/   USHORT nSpChars = 0;
-/*N*/
-/*N*/   for( xub_StrLen nPos = 0; nPos < rStr.Len(); nPos++ )
-/*N*/   {
-/*N*/       sal_Unicode c = rStr.GetChar( nPos );
-/*N*/       switch( c )
-/*N*/       {
-/*N*/           case CH_TXTATR_BREAKWORD:
-/*N*/           case CH_TXTATR_INWORD:
-/*N*/               ++nSpChars;
-/*N*/               break;
-/*N*/
-/*N*/           case 0x0A:
-/*N*/               ++nSpChars;
-/*N*/               if ( bInWord )
-/*N*/               {
-/*N*/                   rWords++;
-/*N*/                   bInWord = FALSE;
-/*N*/               }
-/*N*/               break;
-/*N*/
-/*N*/           default:
-/*N*/               if( rDelimWrd.Search( c ) == STRING_NOTFOUND  )
-/*N*/                   bInWord = TRUE;
-/*N*/               else if ( bInWord )
-/*N*/               {
-/*N*/                   rWords++;
-/*N*/                   bInWord = FALSE;
-/*N*/               }
-/*N*/       }
-/*N*/   }
-/*N*/
-/*N*/   if( bInWord )
-/*N*/       rWords++;
-/*N*/   rChars += rStr.Len() - nSpChars;
-/*N*/ }
-
 /*N*/ SwInsHardBlankSoftHyph::~SwInsHardBlankSoftHyph()
 /*N*/ {
 /*N*/   for( USHORT n = 0, nCnt = aItems.Count(); n < nCnt; ++n )
@@ -1624,26 +1546,6 @@ SV_DECL_PTRARR( SwTxtAttrs, SwTxtAttrPtr, 5, 5 )
 /*N*/   }
 /*N*/ }
 
-/*N*/ void Sw3IoImp::OutEmptyTxtNode( ULONG nNodeIdx, BOOL bNodeMarks )
-/*N*/ {
-/*N*/   // 0x0L: length of data
-/*N*/   // 0x20: wrong list is valid
-/*N*/   BYTE   cFlags = 0x24; // CollIdx & CondCollIdx
-/*N*/   USHORT nColl = aStringPool.Add( *SwStyleNameMapper::GetTextUINameArray()
-/*N*/                       [ RES_POOLCOLL_STANDARD - RES_POOLCOLL_TEXT_BEGIN ],
-/*N*/                       RES_POOLCOLL_STANDARD );
-/*N*/
-/*N*/   OpenRec( SWG_TEXTNODE );
-/*N*/   *pStrm << cFlags << nColl << IDX_DFLT_VALUE;
-/*N*/   OutString( *pStrm, aEmptyStr );
-/*N*/
-/*N*/   if( bNodeMarks )
-/*?*/       OutNodeMarks( nNodeIdx );
-/*N*/
-/*N*/   aStat.nPara++;
-/*N*/   CloseRec( SWG_TEXTNODE );
-/*N*/ }
-
 // nOffset ist ungleich Null, wenn innerhalb eines Nodes eingefuegt werden
 // soll. Dann ist nOffset die Start-Position des Textes.
 
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3num.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3num.cxx
index 6adf524..2080830 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3num.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3num.cxx
@@ -67,12 +67,6 @@ namespace binfilter {
 
 /*N*/ SV_IMPL_OP_PTRARR_SORT(Sw3NumRuleInfos, Sw3NumRuleInfoPtr)
 
-// Konvertierung BYTE/BOOL von SwNumFmt::GetUpperLever fuer SW3.1/4.0
-/*N*/ BOOL lcl_sw3io__IsInclUpperLevel( BYTE nUpperLevel )
-/*N*/ {
-/*N*/    return 1 < nUpperLevel;
-/*N*/ }
-/*N*/
 /*N*/ BYTE lcl_sw3io__GetIncludeUpperLevel( BOOL bInclUpperLevel )
 /*N*/ {
 /*N*/   return bInclUpperLevel ? MAXLEVEL : 1;
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3sectn.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3sectn.cxx
index 93e7e3b..a6e521c 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3sectn.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3sectn.cxx
@@ -363,34 +363,6 @@ namespace binfilter {
 /*N*/   return *pSttNd;
 /*N*/ }
 
-// Besitzt ein Text-Knoten Markierungen oder FlyFrames?
-/*N*/ BOOL lcl_sw3sectn_NodeHasFlyOrMark( Sw3IoImp& rIo, ULONG nIdx )
-/*N*/ {
-/*N*/   USHORT nPos;
-/*N*/
-/*N*/   if( rIo.pMarks )
-/*N*/       for( nPos = 0; nPos < rIo.pMarks->Count(); ++nPos )
-/*N*/       {
-/*N*/           const Sw3Mark *pMark = (*rIo.pMarks)[ nPos ];
-/*N*/           if( pMark->GetNodePos() == nIdx )
-/*N*/               return TRUE;
-/*N*/           else if( pMark->GetNodePos() > nIdx )
-/*N*/               break;
-/*N*/       }
-/*N*/
-/*N*/   if( rIo.pFlyFrms )
-/*N*/       for( nPos = 0; nPos < rIo.pFlyFrms->Count(); nPos++ )
-/*N*/       {
-/*N*/           ULONG nIdFly = (*rIo.pFlyFrms)[nPos]->GetNdIndex().GetIndex();
-/*N*/           if( nIdFly == nIdx )
-/*N*/               return TRUE;
-/*N*/           else if( nIdFly > nIdx )
-/*N*/               break;
-/*N*/       }
-/*N*/
-/*N*/   return FALSE;
-/*N*/ }
-
 // Einlesen einer "echten" Section innerhalb eines Content-Bereichs
 // Auch hier wird der uebergebene Index weitergefuehrt.
 
@@ -489,20 +461,6 @@ namespace binfilter {
 /*N*/
 /*N*/   CloseRec( SWG_SECTION );
 /*N*/ }
-
-/*N*/ BOOL lcl_sw3io_isTOXHeaderSection( const SwStartNode& rSttNd )
-/*N*/ {
-/*N*/   BOOL bRet = FALSE;
-/*N*/
-/*N*/   const SwSectionNode *pSectNd = rSttNd.GetSectionNode();
-/*N*/   if( pSectNd &&
-/*N*/       TOX_HEADER_SECTION == pSectNd->GetSection().GetType() )
-/*N*/   {
-/*N*/       bRet = TRUE;
-/*N*/   }
-/*N*/
-/*N*/   return bRet;
-/*N*/ }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/bf_sw/source/core/sw3io/sw_sw3table.cxx b/binfilter/bf_sw/source/core/sw3io/sw_sw3table.cxx
index 48639a3..508340e 100644
--- a/binfilter/bf_sw/source/core/sw3io/sw_sw3table.cxx
+++ b/binfilter/bf_sw/source/core/sw3io/sw_sw3table.cxx
@@ -116,17 +116,6 @@ BOOL lcl_sw3io_CollectLineFmts( const SwTableLine*& rpLine, void* pPara );
 /*N*/   pTblLineBoxFmts->Insert( pFmt, pTblLineBoxFmts->Count() );
 /*N*/ }
 
-/*N*/ USHORT Sw3IoImp::GetTblLineBoxFmtId( SwFrmFmt *pFmt )
-/*N*/ {
-/*N*/   USHORT nIdx = pTblLineBoxFmts ? pTblLineBoxFmts->GetPos( pFmt )
-/*N*/                                 : USHRT_MAX;
-/*N*/   OSL_ENSURE( USHRT_MAX != nIdx, "Tabellen-Line/-Box-Format nicht gefunden" );
-/*N*/   if( USHRT_MAX == nIdx )
-/*N*/       Error();
-/*N*/
-/*N*/   return nIdx;
-/*N*/ }
-/*N*/
 /*N*/ USHORT Sw3IoImp::GetTblLineBoxFmtStrPoolId40( SwFrmFmt *pFmt )
 /*N*/ {
 /*N*/   OSL_ENSURE( pExportInfo, "Wo ist die Export-Info?" );
@@ -366,19 +355,6 @@ BOOL lcl_sw3io_CollectLineFmts( const SwTableLine*& rpLine, void* pPara );
 /*N*/   CloseRec( SWG_TABLELINE );
 /*N*/ }
 /*N*/
-/*N*/ BOOL lcl_sw3io_IsLineFmtShared( SwFrmFmt& rFmt,   const SwTableLine& rLine )
-/*N*/ {
-/*N*/   SwClientIter aIter( rFmt );
-/*N*/
-/*N*/   SwClient* pLast;
-/*N*/
-/*N*/   for( pLast = aIter.First( TYPE( SwTableLine ));
-/*N*/        pLast && pLast == (SwClient *)&rLine;
-/*N*/        pLast = aIter.Next() )
-/*N*/       ;
-/*N*/
-/*N*/   return pLast != 0;
-/*N*/ }
 
 // Einlesen einer Zelle
 // BYTE         Flag-Byte
@@ -480,20 +456,6 @@ BOOL lcl_sw3io_CollectLineFmts( const SwTableLine*& rpLine, void* pPara );
 /*N*/   }
 /*N*/   CloseRec( SWG_TABLEBOX );
 /*N*/ }
-
-/*N*/ BOOL lcl_sw3io_IsBoxFmtShared( SwFrmFmt& rFmt, const SwTableBox& rBox )
-/*N*/ {
-/*N*/   SwClientIter aIter( rFmt );
-/*N*/
-/*N*/   SwClient* pLast;
-/*N*/
-/*N*/   for( pLast = aIter.First( TYPE( SwTableBox ));
-/*N*/        pLast && pLast == (SwClient *)&rBox;
-/*N*/        pLast = aIter.Next() )
-/*N*/       ;
-/*N*/
-/*N*/   return pLast != 0;
-/*N*/ }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binfilter/inc/bf_sw/redline.hxx b/binfilter/inc/bf_sw/redline.hxx
index d91569f..dd80f61 100644
--- a/binfilter/inc/bf_sw/redline.hxx
+++ b/binfilter/inc/bf_sw/redline.hxx
@@ -190,13 +190,7 @@ public:
         { return *pRedlineData != rCmp; }
     void SetAutoFmtFlag()               { pRedlineData->SetAutoFmtFlag(); }
 
-    USHORT GetStackCount() const;
     const String& GetAuthorString( USHORT nPos = 0 ) const;
-    const DateTime& GetTimeStamp( USHORT nPos ) const;
-    SwRedlineType GetRealType( USHORT nPos ) const;
-    SwRedlineType GetType( USHORT nPos ) const
-        { return SwRedlineType( GetRealType( nPos ) & REDLINE_NO_FLAG_MASK); }
-    const String& GetComment( USHORT nPos ) const;
 
     const String& GetComment() const    { return pRedlineData->GetComment(); }
     void SetComment( const String& rS ) { pRedlineData->SetComment( rS ); }


More information about the Libreoffice-commits mailing list