diff options
Diffstat (limited to 'sw/source/filter/writer/writer.cxx')
-rw-r--r-- | sw/source/filter/writer/writer.cxx | 86 |
1 files changed, 43 insertions, 43 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx index 3bda70b247a3..40537c7dde23 100644 --- a/sw/source/filter/writer/writer.cxx +++ b/sw/source/filter/writer/writer.cxx @@ -95,7 +95,7 @@ Writer_Impl::~Writer_Impl() void Writer_Impl::RemoveFontList( SwDoc& rDoc ) { OSL_ENSURE( pFontRemoveLst, "wo ist die FontListe?" ); - for( USHORT i = pFontRemoveLst->Count(); i; ) + for( sal_uInt16 i = pFontRemoveLst->Count(); i; ) { SvxFontItem* pItem = (SvxFontItem*)(*pFontRemoveLst)[ --i ]; rDoc.GetAttrPool().Remove( *pItem ); @@ -107,7 +107,7 @@ void Writer_Impl::InsertBkmk(const ::sw::mark::IMark& rBkmk) if( !pBkmkNodePos ) pBkmkNodePos = new SwBookmarkNodeTable; - ULONG nNd = rBkmk.GetMarkPos().nNode.GetIndex(); + sal_uLong nNd = rBkmk.GetMarkPos().nNode.GetIndex(); SvPtrarr* pArr = pBkmkNodePos->Get( nNd ); if( !pArr ) { @@ -185,18 +185,18 @@ void Writer::ResetWriter() pOrigFileName = 0; pDoc = 0; - bShowProgress = bUCS2_WithStartChar = TRUE; + bShowProgress = bUCS2_WithStartChar = sal_True; bASCII_NoLastLineEnd = bASCII_ParaAsBlanc = bASCII_ParaAsCR = bWriteClipboardDoc = bWriteOnlyFirstTable = bBlock = - bOrganizerMode = FALSE; + bOrganizerMode = sal_False; } -BOOL Writer::CopyNextPam( SwPaM ** ppPam ) +sal_Bool Writer::CopyNextPam( SwPaM ** ppPam ) { if( (*ppPam)->GetNext() == pOrigPam ) { *ppPam = pOrigPam; // wieder auf den Anfangs-Pam setzen - return FALSE; // Ende vom Ring + return sal_False; // Ende vom Ring } // ansonsten kopiere den die Werte aus dem naechsten Pam @@ -205,7 +205,7 @@ BOOL Writer::CopyNextPam( SwPaM ** ppPam ) *pCurPam->GetPoint() = *(*ppPam)->Start(); *pCurPam->GetMark() = *(*ppPam)->End(); - return TRUE; + return sal_True; } // suche die naechste Bookmark-Position aus der Bookmark-Tabelle @@ -224,10 +224,10 @@ sal_Int32 Writer::FindPos_Bkmk(const SwPosition& rPos) const } -SwPaM* Writer::NewSwPaM( SwDoc & rDoc, ULONG nStartIdx, ULONG nEndIdx, - BOOL bNodesArray ) +SwPaM * +Writer::NewSwPaM(SwDoc & rDoc, sal_uLong const nStartIdx, sal_uLong const nEndIdx) { - SwNodes* pNds = bNodesArray ? &rDoc.GetNodes() : (SwNodes*)rDoc.GetUndoNds(); + SwNodes *const pNds = &rDoc.GetNodes(); SwNodeIndex aStt( *pNds, nStartIdx ); SwCntntNode* pCNode = aStt.GetNode().GetCntntNode(); @@ -262,11 +262,11 @@ void Writer::SetStream(SvStream *const pStream) { m_pImpl->m_pStream = pStream; } -SvStream& Writer::OutHex( SvStream& rStrm, ULONG nHex, BYTE nLen ) +SvStream& Writer::OutHex( SvStream& rStrm, sal_uLong nHex, sal_uInt8 nLen ) { // in einen Stream aus // Pointer an das Bufferende setzen sal_Char* pStr = aNToABuf + (NTOABUFLEN-1); - for( BYTE n = 0; n < nLen; ++n ) + for( sal_uInt8 n = 0; n < nLen; ++n ) { *(--pStr) = (sal_Char)(nHex & 0xf ) + 48; if( *pStr > '9' ) @@ -297,7 +297,7 @@ SvStream& Writer::OutLong( SvStream& rStrm, long nVal ) return rStrm << pStr; } -SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal ) +SvStream& Writer::OutULong( SvStream& rStrm, sal_uLong nVal ) { // Pointer an das Bufferende setzen sal_Char* pStr = aNToABuf + (NTOABUFLEN-1); @@ -310,12 +310,12 @@ SvStream& Writer::OutULong( SvStream& rStrm, ULONG nVal ) } -ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) +sal_uLong Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) { if ( IsStgWriter() ) { SotStorageRef aRef = new SotStorage( rStrm ); - ULONG nResult = Write( rPaM, *aRef, pFName ); + sal_uLong nResult = Write( rPaM, *aRef, pFName ); if ( nResult == ERRCODE_NONE ) aRef->Commit(); return nResult; @@ -330,38 +330,38 @@ ULONG Writer::Write( SwPaM& rPaM, SvStream& rStrm, const String* pFName ) // zum Vergleich auf den akt. Pam sichern pOrigPam = &rPaM; - ULONG nRet = WriteStream(); + sal_uLong nRet = WriteStream(); ResetWriter(); return nRet; } -ULONG Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName ) +sal_uLong Writer::Write( SwPaM& rPam, SfxMedium& rMed, const String* pFileName ) { // This method must be overloaded in SwXMLWriter a storage from medium will be used there. // The microsoft format can write to storage but the storage will be based on the stream. return Write( rPam, *rMed.GetOutStream(), pFileName ); } -ULONG Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* ) +sal_uLong Writer::Write( SwPaM& /*rPam*/, SvStorage&, const String* ) { OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" ); return ERR_SWG_WRITE_ERROR; } -ULONG Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* ) +sal_uLong Writer::Write( SwPaM&, const uno::Reference < embed::XStorage >&, const String*, SfxMedium* ) { OSL_ENSURE( !this, "Schreiben in Storages auf einem Stream?" ); return ERR_SWG_WRITE_ERROR; } -BOOL Writer::CopyLocalFileToINet( String& rFileNm ) +sal_Bool Writer::CopyLocalFileToINet( String& rFileNm ) { if( !pOrigFileName ) // can be happen, by example if we - return FALSE; // write into the clipboard + return sal_False; // write into the clipboard - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; INetURLObject aFileUrl( rFileNm ), aTargetUrl( *pOrigFileName ); // this is our old without the Mail-Export @@ -374,11 +374,11 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm ) if (m_pImpl->pSrcArr) { // wurde die Datei schon verschoben - USHORT nPos; + sal_uInt16 nPos; if (m_pImpl->pSrcArr->Seek_Entry( &rFileNm, &nPos )) { rFileNm = *(*m_pImpl->pDestArr)[ nPos ]; - return TRUE; + return sal_True; } } else @@ -391,8 +391,8 @@ BOOL Writer::CopyLocalFileToINet( String& rFileNm ) String *pDest = new String( aTargetUrl.GetPartBeforeLastName() ); *pDest += String(aFileUrl.GetName()); - SfxMedium aSrcFile( *pSrc, STREAM_READ, FALSE ); - SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, FALSE ); + SfxMedium aSrcFile( *pSrc, STREAM_READ, sal_False ); + SfxMedium aDstFile( *pDest, STREAM_WRITE | STREAM_SHARE_DENYNONE, sal_False ); *aDstFile.GetOutStream() << *aSrcFile.GetInStream(); @@ -428,11 +428,11 @@ void Writer::PutNumFmtFontsInAttrPool() const Font* pFont; const Font* pDefFont = &numfunc::GetDefBulletFont(); // <-- - BOOL bCheck = FALSE; + sal_Bool bCheck = sal_False; - for( USHORT nGet = rListTbl.Count(); nGet; ) + for( sal_uInt16 nGet = rListTbl.Count(); nGet; ) if( pDoc->IsUsed( *(pRule = rListTbl[ --nGet ] ))) - for( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) + for( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl ) if( SVX_NUM_CHAR_SPECIAL == (pFmt = &pRule->Get( nLvl ))->GetNumberingType() || SVX_NUM_BITMAP == pFmt->GetNumberingType() ) { @@ -445,7 +445,7 @@ void Writer::PutNumFmtFontsInAttrPool() continue; } else if( *pFont == *pDefFont ) - bCheck = TRUE; + bCheck = sal_True; _AddFontItem( rPool, SvxFontItem( pFont->GetFamily(), pFont->GetName(), pFont->GetStyleName(), @@ -453,7 +453,7 @@ void Writer::PutNumFmtFontsInAttrPool() } } -void Writer::PutEditEngFontsInAttrPool( BOOL bIncl_CJK_CTL ) +void Writer::PutEditEngFontsInAttrPool( sal_Bool bIncl_CJK_CTL ) { SfxItemPool& rPool = pDoc->GetAttrPool(); if( rPool.GetSecondaryPool() ) @@ -475,7 +475,7 @@ void Writer::PutCJKandCTLFontsInAttrPool() } -void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW ) +void Writer::_AddFontItems( SfxItemPool& rPool, sal_uInt16 nW ) { const SvxFontItem* pFont = (const SvxFontItem*)&rPool.GetDefaultItem( nW ); _AddFontItem( rPool, *pFont ); @@ -483,9 +483,9 @@ void Writer::_AddFontItems( SfxItemPool& rPool, USHORT nW ) if( 0 != ( pFont = (const SvxFontItem*)rPool.GetPoolDefaultItem( nW )) ) _AddFontItem( rPool, *pFont ); - USHORT nMaxItem = rPool.GetItemCount( nW ); - for( USHORT nGet = 0; nGet < nMaxItem; ++nGet ) - if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem( nW, nGet )) ) + sal_uInt32 nMaxItem = rPool.GetItemCount2( nW ); + for( sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet ) + if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem2( nW, nGet )) ) _AddFontItem( rPool, *pFont ); } @@ -530,12 +530,12 @@ void Writer::CreateBookmarkTbl() // search alle Bookmarks in the range and return it in the Array -USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, +sal_uInt16 Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, xub_StrLen nEnd, SvPtrarr& rArr) { OSL_ENSURE( !rArr.Count(), "es sind noch Eintraege vorhanden" ); - ULONG nNd = rNd.GetIndex(); + sal_uLong nNd = rNd.GetIndex(); SvPtrarr* pArr = (m_pImpl->pBkmkNodePos) ? m_pImpl->pBkmkNodePos->Get( nNd ) : 0; if( pArr ) @@ -546,7 +546,7 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, rArr.Insert( pArr, 0 ); else { - USHORT n; + sal_uInt16 n; xub_StrLen nCntnt; for( n = 0; n < pArr->Count(); ++n ) { @@ -575,13 +575,13 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt, // Storage-spezifisches -ULONG StgWriter::WriteStream() +sal_uLong StgWriter::WriteStream() { OSL_ENSURE( !this, "Schreiben in Streams auf einem Storage?" ); return ERR_SWG_WRITE_ERROR; } -ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) +sal_uLong StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) { SetStream(0); pStg = &rStg; @@ -593,7 +593,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) // zum Vergleich auf den akt. Pam sichern pOrigPam = &rPaM; - ULONG nRet = WriteStorage(); + sal_uLong nRet = WriteStorage(); pStg = NULL; ResetWriter(); @@ -601,7 +601,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, SvStorage& rStg, const String* pFName ) return nRet; } -ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium ) +sal_uLong StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& rStg, const String* pFName, SfxMedium* pMedium ) { SetStream(0); pStg = 0; @@ -614,7 +614,7 @@ ULONG StgWriter::Write( SwPaM& rPaM, const uno::Reference < embed::XStorage >& r // zum Vergleich auf den akt. Pam sichern pOrigPam = &rPaM; - ULONG nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage(); + sal_uLong nRet = pMedium ? WriteMedium( *pMedium ) : WriteStorage(); pStg = NULL; ResetWriter(); |