summaryrefslogtreecommitdiff
path: root/sw/source/filter/writer/writer.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/writer/writer.cxx')
-rw-r--r--sw/source/filter/writer/writer.cxx78
1 files changed, 39 insertions, 39 deletions
diff --git a/sw/source/filter/writer/writer.cxx b/sw/source/filter/writer/writer.cxx
index 2a77d47dd65b..cd943f2278d2 100644
--- a/sw/source/filter/writer/writer.cxx
+++ b/sw/source/filter/writer/writer.cxx
@@ -94,7 +94,7 @@ Writer_Impl::~Writer_Impl()
void Writer_Impl::RemoveFontList( SwDoc& rDoc )
{
ASSERT( 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 );
@@ -106,7 +106,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 )
{
@@ -184,18 +184,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
@@ -204,7 +204,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
@@ -223,8 +223,8 @@ 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 nStartIdx, sal_uLong nEndIdx,
+ sal_Bool bNodesArray )
{
SwNodes* pNds = bNodesArray ? &rDoc.GetNodes() : (SwNodes*)rDoc.GetUndoNds();
@@ -261,11 +261,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' )
@@ -296,7 +296,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);
@@ -309,12 +309,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;
@@ -329,38 +329,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* )
{
ASSERT( !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* )
{
ASSERT( !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 );
// JP 01.11.00: what is the correct question for the portal??
@@ -376,11 +376,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
@@ -393,8 +393,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();
@@ -432,11 +432,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() )
{
@@ -449,7 +449,7 @@ void Writer::PutNumFmtFontsInAttrPool()
continue;
}
else if( *pFont == *pDefFont )
- bCheck = TRUE;
+ bCheck = sal_True;
_AddFontItem( rPool, SvxFontItem( pFont->GetFamily(),
pFont->GetName(), pFont->GetStyleName(),
@@ -457,7 +457,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() )
@@ -479,7 +479,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 );
@@ -534,12 +534,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)
{
ASSERT( !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 )
@@ -550,7 +550,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 )
{
@@ -579,13 +579,13 @@ USHORT Writer::GetBookmarks(const SwCntntNode& rNd, xub_StrLen nStt,
// Storage-spezifisches
-ULONG StgWriter::WriteStream()
+sal_uLong StgWriter::WriteStream()
{
ASSERT( !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;
@@ -597,7 +597,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();
@@ -605,7 +605,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;
@@ -618,7 +618,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();