summaryrefslogtreecommitdiff
path: root/sw/source/filter
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter')
-rw-r--r--sw/source/filter/ascii/ascatr.cxx20
-rw-r--r--sw/source/filter/ascii/makefile.mk57
-rw-r--r--sw/source/filter/ascii/parasc.cxx46
-rw-r--r--sw/source/filter/ascii/wrtasc.cxx22
-rw-r--r--sw/source/filter/ascii/wrtasc.hxx2
-rw-r--r--sw/source/filter/basflt/fltini.cxx660
-rw-r--r--sw/source/filter/basflt/iodetect.cxx76
-rw-r--r--sw/source/filter/basflt/makefile.mk57
-rw-r--r--sw/source/filter/basflt/shellio.cxx168
-rw-r--r--sw/source/filter/html/SwAppletImpl.cxx8
-rw-r--r--sw/source/filter/html/css1atr.cxx330
-rw-r--r--sw/source/filter/html/htmlatr.cxx478
-rw-r--r--sw/source/filter/html/htmlbas.cxx30
-rw-r--r--sw/source/filter/html/htmlcss1.cxx412
-rw-r--r--sw/source/filter/html/htmlctxt.cxx108
-rw-r--r--sw/source/filter/html/htmldraw.cxx6
-rw-r--r--sw/source/filter/html/htmlfld.cxx88
-rw-r--r--sw/source/filter/html/htmlfldw.cxx56
-rw-r--r--sw/source/filter/html/htmlfly.cxx262
-rw-r--r--sw/source/filter/html/htmlfly.hxx38
-rw-r--r--sw/source/filter/html/htmlflyt.cxx12
-rw-r--r--sw/source/filter/html/htmlform.cxx24
-rw-r--r--sw/source/filter/html/htmlforw.cxx2
-rw-r--r--sw/source/filter/html/htmlftn.cxx70
-rw-r--r--sw/source/filter/html/htmlgrin.cxx203
-rw-r--r--sw/source/filter/html/htmlnum.cxx8
-rw-r--r--sw/source/filter/html/htmlplug.cxx114
-rw-r--r--sw/source/filter/html/htmlsect.cxx18
-rw-r--r--sw/source/filter/html/htmltab.cxx29
-rw-r--r--sw/source/filter/html/htmltabw.cxx17
-rw-r--r--sw/source/filter/html/makefile.mk79
-rw-r--r--sw/source/filter/html/parcss1.cxx154
-rw-r--r--sw/source/filter/html/svxcss1.cxx642
-rw-r--r--sw/source/filter/html/swcss1.hxx94
-rw-r--r--sw/source/filter/html/swhtml.cxx602
-rw-r--r--sw/source/filter/html/swhtml.hxx8
-rw-r--r--sw/source/filter/html/wrthtml.cxx16
-rw-r--r--sw/source/filter/html/wrthtml.hxx6
-rw-r--r--sw/source/filter/inc/fltbase.hxx26
-rw-r--r--sw/source/filter/inc/fltglbls.hxx46
-rw-r--r--sw/source/filter/inc/fltini.hxx12
-rw-r--r--sw/source/filter/inc/fltshell.hxx240
-rw-r--r--sw/source/filter/inc/makefile.mk26
-rw-r--r--sw/source/filter/inc/msfilter.hxx12
-rw-r--r--sw/source/filter/inc/rtf.hxx70
-rw-r--r--sw/source/filter/inc/wrt_fn.hxx2
-rw-r--r--sw/source/filter/inc/wrtswtbl.hxx172
-rw-r--r--sw/source/filter/makefile.mk67
-rw-r--r--sw/source/filter/rtf/makefile.mk60
-rw-r--r--sw/source/filter/rtf/rtffld.cxx58
-rw-r--r--sw/source/filter/rtf/rtffly.cxx182
-rw-r--r--sw/source/filter/rtf/rtfnum.cxx137
-rw-r--r--sw/source/filter/rtf/rtftbl.cxx143
-rw-r--r--sw/source/filter/rtf/swparrtf.cxx463
-rw-r--r--sw/source/filter/rtf/swparrtf.hxx61
-rw-r--r--sw/source/filter/writer/makefile.mk58
-rw-r--r--sw/source/filter/writer/writer.cxx86
-rw-r--r--sw/source/filter/writer/wrt_fn.cxx10
-rw-r--r--sw/source/filter/writer/wrtswtbl.cxx220
-rw-r--r--sw/source/filter/ww1/fltshell.cxx381
-rw-r--r--sw/source/filter/ww1/makefile.mk93
-rw-r--r--sw/source/filter/ww1/w1class.cxx354
-rw-r--r--sw/source/filter/ww1/w1class.hxx612
-rw-r--r--sw/source/filter/ww1/w1filter.cxx206
-rw-r--r--sw/source/filter/ww1/w1par.cxx16
-rw-r--r--sw/source/filter/ww1/w1par.hxx2
-rw-r--r--sw/source/filter/ww1/w1sprm.cxx139
-rw-r--r--sw/source/filter/ww1/w1struct.hxx516
-rw-r--r--sw/source/filter/ww8/README-rtf.txt31
-rw-r--r--sw/source/filter/ww8/WW8FFData.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.cxx2
-rw-r--r--sw/source/filter/ww8/WW8Sttbf.hxx6
-rw-r--r--sw/source/filter/ww8/WW8TableInfo.cxx6
-rw-r--r--sw/source/filter/ww8/attributeoutputbase.hxx46
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.cxx121
-rw-r--r--sw/source/filter/ww8/docxattributeoutput.hxx42
-rw-r--r--sw/source/filter/ww8/docxexport.cxx21
-rw-r--r--sw/source/filter/ww8/docxexport.hxx14
-rw-r--r--sw/source/filter/ww8/docxexportfilter.cxx125
-rw-r--r--sw/source/filter/ww8/docxexportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/docxfootnotes.hxx1
-rw-r--r--sw/source/filter/ww8/escher.hxx32
-rw-r--r--sw/source/filter/ww8/makefile.mk91
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.cxx112
-rw-r--r--sw/source/filter/ww8/rtfattributeoutput.hxx48
-rw-r--r--sw/source/filter/ww8/rtfexport.cxx145
-rw-r--r--sw/source/filter/ww8/rtfexport.hxx37
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.cxx9
-rw-r--r--sw/source/filter/ww8/rtfexportfilter.hxx9
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.cxx10
-rw-r--r--sw/source/filter/ww8/rtfimportfilter.hxx7
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.cxx13
-rw-r--r--sw/source/filter/ww8/rtfsdrexport.hxx9
-rw-r--r--sw/source/filter/ww8/writerhelper.cxx40
-rw-r--r--sw/source/filter/ww8/writerhelper.hxx8
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx18
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx193
-rw-r--r--sw/source/filter/ww8/wrtw8nds.cxx114
-rw-r--r--sw/source/filter/ww8/wrtw8num.cxx137
-rw-r--r--sw/source/filter/ww8/wrtw8sty.cxx277
-rw-r--r--sw/source/filter/ww8/wrtww8.cxx466
-rw-r--r--sw/source/filter/ww8/wrtww8.hxx364
-rw-r--r--sw/source/filter/ww8/wrtww8gr.cxx78
-rw-r--r--sw/source/filter/ww8/ww8atr.cxx374
-rw-r--r--sw/source/filter/ww8/ww8attributeoutput.hxx50
-rw-r--r--sw/source/filter/ww8/ww8glsy.cxx20
-rw-r--r--sw/source/filter/ww8/ww8glsy.hxx10
-rw-r--r--sw/source/filter/ww8/ww8graf.cxx296
-rw-r--r--sw/source/filter/ww8/ww8graf.hxx26
-rw-r--r--sw/source/filter/ww8/ww8graf2.cxx58
-rw-r--r--sw/source/filter/ww8/ww8par.cxx497
-rw-r--r--sw/source/filter/ww8/ww8par.hxx402
-rw-r--r--sw/source/filter/ww8/ww8par2.cxx332
-rw-r--r--sw/source/filter/ww8/ww8par2.hxx68
-rw-r--r--sw/source/filter/ww8/ww8par3.cxx74
-rw-r--r--sw/source/filter/ww8/ww8par4.cxx50
-rw-r--r--sw/source/filter/ww8/ww8par5.cxx142
-rw-r--r--sw/source/filter/ww8/ww8par6.cxx466
-rw-r--r--sw/source/filter/ww8/ww8scan.cxx636
-rw-r--r--sw/source/filter/ww8/ww8scan.hxx940
-rw-r--r--sw/source/filter/ww8/ww8struc.hxx300
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx6
-rw-r--r--sw/source/filter/xml/makefile.mk76
-rw-r--r--sw/source/filter/xml/swxml.cxx28
-rw-r--r--sw/source/filter/xml/wrtxml.cxx6
-rw-r--r--sw/source/filter/xml/wrtxml.hxx6
-rw-r--r--sw/source/filter/xml/xmlexp.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.hxx2
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx6
-rw-r--r--sw/source/filter/xml/xmlimp.cxx8
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx30
-rw-r--r--sw/source/filter/xml/xmlimpit.hxx8
-rw-r--r--sw/source/filter/xml/xmlitem.cxx6
-rw-r--r--sw/source/filter/xml/xmlitem.hxx6
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx2
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx4
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx4
-rw-r--r--sw/source/filter/xml/xmltble.cxx38
-rw-r--r--sw/source/filter/xml/xmltbli.cxx16
-rw-r--r--sw/source/filter/xml/xmltbli.hxx6
-rw-r--r--sw/source/filter/xml/xmltexte.cxx6
142 files changed, 8265 insertions, 8879 deletions
diff --git a/sw/source/filter/ascii/ascatr.cxx b/sw/source/filter/ascii/ascatr.cxx
index 2a21ee899db5..9142689b1c87 100644
--- a/sw/source/filter/ascii/ascatr.cxx
+++ b/sw/source/filter/ascii/ascatr.cxx
@@ -68,7 +68,7 @@ public:
void NextPos() { nAktSwPos = SearchNext( nAktSwPos + 1 ); }
xub_StrLen WhereNext() const { return nAktSwPos; }
- BOOL OutAttr( xub_StrLen nSwPos );
+ sal_Bool OutAttr( xub_StrLen nSwPos );
};
@@ -89,7 +89,7 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
// kann noch optimiert werden, wenn ausgenutzt wird, dass die TxtAttrs
// nach der Anfangsposition geordnet sind. Dann muessten
// allerdings noch 2 Indices gemerkt werden
- for ( USHORT i = 0; i < pTxtAttrs->Count(); i++ )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if (pHt->HasDummyChar())
@@ -108,25 +108,25 @@ xub_StrLen SwASC_AttrIter::SearchNext( xub_StrLen nStartPos )
}
-BOOL SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
+sal_Bool SwASC_AttrIter::OutAttr( xub_StrLen nSwPos )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
if( pTxtAttrs )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pTxtAttrs->Count(); i++ )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && nSwPos == *pHt->GetStart() )
{
- bRet = TRUE;
+ bRet = sal_True;
String sOut;
switch( pHt->Which() )
{
case RES_TXTATR_FIELD:
sOut = static_cast<SwTxtFld const*>(pHt)->GetFld().GetFld()
- ->ExpandField(rWrt.pDoc->IsClipBoard());
+ ->ExpandField(true);
break;
case RES_TXTATR_FTN:
@@ -164,7 +164,7 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
xub_StrLen nStrPos = rWrt.pCurPam->GetPoint()->nContent.GetIndex();
xub_StrLen nNodeEnde = rNd.Len(), nEnde = nNodeEnde;
- BOOL bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
+ sal_Bool bLastNd = rWrt.pCurPam->GetPoint()->nNode == rWrt.pCurPam->GetMark()->nNode;
if( bLastNd )
nEnde = rWrt.pCurPam->GetMark()->nContent.GetIndex();
@@ -206,8 +206,8 @@ static Writer& OutASC_SwTxtNode( Writer& rWrt, SwCntntNode& rNode )
} while( nStrPos < nEnde );
if( !bLastNd ||
- (( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
- && !nStrPos && nEnde == nNodeEnde ))
+ ( ( !rWrt.bWriteClipboardDoc && !rWrt.bASCII_NoLastLineEnd )
+ && !nStrPos && nEnde == nNodeEnde ) )
rWrt.Strm().WriteUnicodeOrByteText( ((SwASCWriter&)rWrt).GetLineEnd());
return rWrt;
diff --git a/sw/source/filter/ascii/makefile.mk b/sw/source/filter/ascii/makefile.mk
deleted file mode 100644
index 4bc8bfacd49e..000000000000
--- a/sw/source/filter/ascii/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ascii
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- ascatr.cxx \
- parasc.cxx \
- wrtasc.cxx
-
-EXCEPTIONSFILES = \
- $(SLO)$/ascatr.obj \
- $(SLO)$/parasc.obj \
- $(SLO)$/wrtasc.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/ascii/parasc.cxx b/sw/source/filter/ascii/parasc.cxx
index ff537818a13f..fd4ab7226e1a 100644
--- a/sw/source/filter/ascii/parasc.cxx
+++ b/sw/source/filter/ascii/parasc.cxx
@@ -51,6 +51,8 @@
#include <mdiexp.hxx> // ...Percent()
#include <poolfmt.hxx>
+#include "vcl/metric.hxx"
+
#define ASC_BUFFLEN 4096
class SwASCIIParser
@@ -62,10 +64,10 @@ class SwASCIIParser
const SwAsciiOptions& rOpt;
SfxItemSet* pItemSet;
long nFileSize;
- USHORT nScript;
+ sal_uInt16 nScript;
bool bNewDoc;
- ULONG ReadChars();
+ sal_uLong ReadChars();
void InsertText( const String& rStr );
public:
@@ -73,12 +75,12 @@ public:
int bReadNewDoc, const SwAsciiOptions& rOpts );
~SwASCIIParser();
- ULONG CallParser();
+ sal_uLong CallParser();
};
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
+sal_uLong AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String & )
{
if( !pStrm )
{
@@ -93,7 +95,7 @@ ULONG AsciiReader::Read( SwDoc &rDoc, const String&, SwPaM &rPam, const String &
SwASCIIParser* pParser = new SwASCIIParser( &rDoc, rPam, *pStrm,
!bInsertMode, aOpt.GetASCIIOpts() );
- ULONG nRet = pParser->CallParser();
+ sal_uLong nRet = pParser->CallParser();
delete pParser;
// after Read reset the options
@@ -126,24 +128,14 @@ SwASCIIParser::SwASCIIParser(SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
}
if( rOpt.GetFontName().Len() )
{
- bool bDelete = false;
- const SfxFont* pFnt = 0;
+ Font aTextFont( rOpt.GetFontName(), Size( 0, 10 ) );
if( pDoc->getPrinter( false ) )
- pFnt = pDoc->getPrinter( false )->GetFontByName( rOpt.GetFontName() );
-
- if( !pFnt )
- {
- pFnt = new SfxFont( FAMILY_DONTKNOW, rOpt.GetFontName() );
- bDelete = true;
- }
- SvxFontItem aFont( pFnt->GetFamily(), pFnt->GetName(),
- aEmptyStr, pFnt->GetPitch(), pFnt->GetCharSet(), RES_CHRATR_FONT );
+ aTextFont = pDoc->getPrinter( false )->GetFontMetric( aTextFont );
+ SvxFontItem aFont( aTextFont.GetFamily(), aTextFont.GetName(),
+ aEmptyStr, aTextFont.GetPitch(), aTextFont.GetCharSet(), RES_CHRATR_FONT );
pItemSet->Put( aFont );
pItemSet->Put( aFont, RES_CHRATR_CJK_FONT );
pItemSet->Put( aFont, RES_CHRATR_CTL_FONT );
-
- if( bDelete )
- delete (SfxFont*)pFnt;
}
}
@@ -156,7 +148,7 @@ SwASCIIParser::~SwASCIIParser()
// Aufruf des Parsers
-ULONG SwASCIIParser::CallParser()
+sal_uLong SwASCIIParser::CallParser()
{
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
@@ -187,7 +179,7 @@ ULONG SwASCIIParser::CallParser()
pDoc->SetTxtFmtColl(*pPam, pColl);
}
- ULONG nError = ReadChars();
+ sal_uLong nError = ReadChars();
if( pItemSet )
{
@@ -268,7 +260,7 @@ ULONG SwASCIIParser::CallParser()
return nError;
}
-ULONG SwASCIIParser::ReadChars()
+sal_uLong SwASCIIParser::ReadChars()
{
sal_Unicode *pStt = 0, *pEnd = 0, *pLastStt = 0;
long nReadCnt = 0, nLineLen = 0;
@@ -283,7 +275,7 @@ ULONG SwASCIIParser::ReadChars()
aEmpty.GetLanguage() == rOpt.GetLanguage() &&
aEmpty.GetParaFlags() == rOpt.GetParaFlags())
{
- ULONG nLen, nOrig;
+ sal_uLong nLen, nOrig;
nOrig = nLen = rInput.Read(pArr, ASC_BUFFLEN);
CharSet eCharSet;
bool bRet = SwIoSystem::IsDetectableText(pArr, nLen, &eCharSet, &bSwapUnicode);
@@ -315,12 +307,12 @@ ULONG SwASCIIParser::ReadChars()
}
else if (pUseMe != &aEmpty) //Already successfully figured out type
{
- rInput.StartReadingUnicodeText();
+ rInput.StartReadingUnicodeText( currentCharSet );
bSwapUnicode = rInput.IsEndianSwap();
}
String sWork;
- ULONG nArrOffset = 0;
+ sal_uLong nArrOffset = 0;
do {
if( pStt >= pEnd )
@@ -329,7 +321,7 @@ ULONG SwASCIIParser::ReadChars()
InsertText( String( pLastStt ));
// lese einen neuen Block ein
- ULONG lGCount;
+ sal_uLong lGCount;
if( SVSTREAM_OK != rInput.GetError() || 0 == (lGCount =
rInput.Read( pArr + nArrOffset,
ASC_BUFFLEN - nArrOffset )))
@@ -374,7 +366,7 @@ ULONG SwASCIIParser::ReadChars()
if( bSwapUnicode )
{
sal_Char* pF = pArr, *pN = pArr + 1;
- for( ULONG n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
+ for( sal_uLong n = 0; n < lGCount; n += 2, pF += 2, pN += 2 )
{
sal_Char c = *pF;
*pF = *pN;
diff --git a/sw/source/filter/ascii/wrtasc.cxx b/sw/source/filter/ascii/wrtasc.cxx
index 3962e094e84b..656fa2e40eeb 100644
--- a/sw/source/filter/ascii/wrtasc.cxx
+++ b/sw/source/filter/ascii/wrtasc.cxx
@@ -68,7 +68,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
break;
case 'A':
-#if !defined(WIN) && !defined(WNT)
+#if !defined(WNT)
aNewOpts.SetCharSet( RTL_TEXTENCODING_MS_1252 );
aNewOpts.SetParaFlags( LINEEND_CRLF );
#endif
@@ -98,7 +98,7 @@ SwASCWriter::SwASCWriter( const String& rFltNm )
SwASCWriter::~SwASCWriter() {}
-ULONG SwASCWriter::WriteStream()
+sal_uLong SwASCWriter::WriteStream()
{
sal_Char cLineEnd[ 3 ];
sal_Char* pCEnd = cLineEnd;
@@ -124,7 +124,7 @@ ULONG SwASCWriter::WriteStream()
SwPaM* pPam = pOrigPam;
- BOOL bWriteSttTag = bUCS2_WithStartChar &&
+ sal_Bool bWriteSttTag = bUCS2_WithStartChar &&
(RTL_TEXTENCODING_UCS2 == GetAsciiOptions().GetCharSet() ||
RTL_TEXTENCODING_UTF8 == GetAsciiOptions().GetCharSet());
@@ -133,7 +133,7 @@ ULONG SwASCWriter::WriteStream()
// gebe alle Bereich des Pams in das ASC-File aus.
do {
- BOOL bTstFly = TRUE;
+ sal_Bool bTstFly = sal_True;
while( pCurPam->GetPoint()->nNode.GetIndex() < pCurPam->GetMark()->nNode.GetIndex() ||
(pCurPam->GetPoint()->nNode.GetIndex() == pCurPam->GetMark()->nNode.GetIndex() &&
pCurPam->GetPoint()->nContent.GetIndex() <= pCurPam->GetMark()->nContent.GetIndex()) )
@@ -176,24 +176,24 @@ ULONG SwASCWriter::WriteStream()
switch(GetAsciiOptions().GetCharSet())
{
case RTL_TEXTENCODING_UTF8:
- Strm() << BYTE(0xEF) << BYTE(0xBB) <<
- BYTE(0xBF);
+ Strm() << sal_uInt8(0xEF) << sal_uInt8(0xBB) <<
+ sal_uInt8(0xBF);
break;
case RTL_TEXTENCODING_UCS2:
- Strm().SetEndianSwap(FALSE);
+ Strm().SetEndianSwap(sal_False);
#ifdef OSL_LITENDIAN
- Strm() << BYTE(0xFF) << BYTE(0xFE);
+ Strm() << sal_uInt8(0xFF) << sal_uInt8(0xFE);
#else
- Strm() << BYTE(0xFE) << BYTE(0xFF);
+ Strm() << sal_uInt8(0xFE) << sal_uInt8(0xFF);
#endif
break;
}
- bWriteSttTag = FALSE;
+ bWriteSttTag = sal_False;
}
Out( aASCNodeFnTab, *pNd, *this );
}
- bTstFly = FALSE; // eimal Testen reicht
+ bTstFly = sal_False; // eimal Testen reicht
}
if( !pCurPam->Move( fnMoveForward, fnGoNode ) )
diff --git a/sw/source/filter/ascii/wrtasc.hxx b/sw/source/filter/ascii/wrtasc.hxx
index e260f9546c81..c073dddbc337 100644
--- a/sw/source/filter/ascii/wrtasc.hxx
+++ b/sw/source/filter/ascii/wrtasc.hxx
@@ -40,7 +40,7 @@ class SwASCWriter : public Writer
{
String sLineEnd;
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
public:
SwASCWriter( const String& rFilterName );
diff --git a/sw/source/filter/basflt/fltini.cxx b/sw/source/filter/basflt/fltini.cxx
index 49e993581649..7d0b8a816f03 100644
--- a/sw/source/filter/basflt/fltini.cxx
+++ b/sw/source/filter/basflt/fltini.cxx
@@ -31,7 +31,7 @@
#define _SVSTDARR_STRINGS
#include <string.h>
-#include <stdio.h> // sscanf
+#include <stdio.h> // sscanf
#include <hintids.hxx>
#include <i18npool/lang.h>
#include <i18npool/mslangid.hxx>
@@ -78,7 +78,7 @@ using namespace com::sun::star::uno;
using namespace com::sun::star;
SwRead ReadAscii = 0, /*ReadSwg = 0, ReadSw3 = 0,*/
- ReadHTML = 0, ReadXML = 0;
+ ReadHTML = 0, ReadXML = 0;
Reader* GetRTFReader();
Reader* GetWW8Reader();
@@ -87,17 +87,17 @@ Reader* GetWW8Reader();
// ReaderWriterEnum and aFilterDetect in shellio.hxx
SwReaderWriterEntry aReaderWriter[] =
{
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, FALSE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, TRUE ),
- SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetHTMLWriter, TRUE ),
- SwReaderWriterEntry( 0, 0, TRUE ),
- SwReaderWriterEntry( &::GetWW8Reader, 0, TRUE ),
- SwReaderWriterEntry( 0, &::GetXMLWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE ),
- SwReaderWriterEntry( 0, &::GetASCWriter, TRUE )
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_False ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, &::GetWW8Writer, sal_True ),
+ SwReaderWriterEntry( &::GetRTFReader, &::GetRTFWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetHTMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, 0, sal_True ),
+ SwReaderWriterEntry( &::GetWW8Reader, 0, sal_True ),
+ SwReaderWriterEntry( 0, &::GetXMLWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True ),
+ SwReaderWriterEntry( 0, &::GetASCWriter, sal_True )
};
Reader* SwReaderWriterEntry::GetReader()
@@ -122,7 +122,7 @@ void SwReaderWriterEntry::GetWriter( const String& rNm, const String& rBaseURL,
SwRead SwGetReaderXML() // SW_DLLPUBLIC
{
- return ReadXML;
+ return ReadXML;
}
bool IsDocShellRegistered()
@@ -130,9 +130,9 @@ bool IsDocShellRegistered()
return 0 != SwDocShell::_GetInterface();
}
-inline void _SetFltPtr( USHORT rPos, SwRead pReader )
+inline void _SetFltPtr( sal_uInt16 rPos, SwRead pReader )
{
- aReaderWriter[ rPos ].pReader = pReader;
+ aReaderWriter[ rPos ].pReader = pReader;
}
void _InitFilter()
@@ -147,13 +147,13 @@ void _InitFilter()
void _FinitFilter()
{
- // die Reader vernichten
- for( USHORT n = 0; n < MAXFILTER; ++n )
- {
- SwReaderWriterEntry& rEntry = aReaderWriter[n];
- if( rEntry.bDelReader && rEntry.pReader )
- delete rEntry.pReader, rEntry.pReader = NULL;
- }
+ // die Reader vernichten
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ {
+ SwReaderWriterEntry& rEntry = aReaderWriter[n];
+ if( rEntry.bDelReader && rEntry.pReader )
+ delete rEntry.pReader, rEntry.pReader = NULL;
+ }
}
@@ -168,27 +168,27 @@ Reader* GetReader( ReaderWriterEnum eReader )
void GetWriter( const String& rFltName, const String& rBaseURL, WriterRef& xRet )
{
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
aReaderWriter[n].GetWriter( rFltName, rBaseURL, xRet );
- break;
- }
+ break;
+ }
}
SwRead GetReader( const String& rFltName )
{
- SwRead pRead = 0;
- for( USHORT n = 0; n < MAXFILTER; ++n )
- if( aFilterDetect[n].IsFilter( rFltName ) )
- {
- pRead = aReaderWriter[n].GetReader();
- // fuer einige Reader noch eine Sonderbehandlung:
- if ( pRead )
- pRead->SetFltName( rFltName );
- break;
- }
- return pRead;
+ SwRead pRead = 0;
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
+ if( aFilterDetect[n].IsFilter( rFltName ) )
+ {
+ pRead = aReaderWriter[n].GetReader();
+ // fuer einige Reader noch eine Sonderbehandlung:
+ if ( pRead )
+ pRead->SetFltName( rFltName );
+ break;
+ }
+ return pRead;
}
} // namespace SwReaderWriter
@@ -199,24 +199,24 @@ void Writer::SetPasswd( const String& ) {}
void Writer::SetVersion( const String&, long ) {}
-BOOL Writer::IsStgWriter() const { return FALSE; }
+sal_Bool Writer::IsStgWriter() const { return sal_False; }
-BOOL StgWriter::IsStgWriter() const { return TRUE; }
+sal_Bool StgWriter::IsStgWriter() const { return sal_True; }
/* */
-BOOL SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
+sal_Bool SwReader::NeedsPasswd( const Reader& /*rOptions*/ )
{
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
return bRes;
}
-BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
+sal_Bool SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*/ )
{
- return TRUE;
+ return sal_True;
}
@@ -261,38 +261,38 @@ BOOL SwReader::CheckPasswd( const String& /*rPasswd*/, const Reader& /*rOptions*
</FilterFlags>
*/
-#define FILTER_OPTION_ROOT String::CreateFromAscii( \
- RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
+#define FILTER_OPTION_ROOT String::CreateFromAscii( \
+ RTL_CONSTASCII_STRINGPARAM( "Office.Writer/FilterFlags" ) )
SwFilterOptions::SwFilterOptions( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
- : ConfigItem( FILTER_OPTION_ROOT )
+ sal_uInt32* pValues )
+ : ConfigItem( FILTER_OPTION_ROOT )
{
- GetValues( nCnt, ppNames, pValues );
+ GetValues( nCnt, ppNames, pValues );
}
void SwFilterOptions::GetValues( sal_uInt16 nCnt, const sal_Char** ppNames,
- sal_uInt32* pValues )
+ sal_uInt32* pValues )
{
- Sequence<OUString> aNames( nCnt );
- OUString* pNames = aNames.getArray();
- USHORT n;
-
- for( n = 0; n < nCnt; ++n )
- pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
- Sequence<Any> aValues = GetProperties( aNames );
+ Sequence<OUString> aNames( nCnt );
+ OUString* pNames = aNames.getArray();
+ sal_uInt16 n;
- if( nCnt == aValues.getLength() )
- {
- const Any* pAnyValues = aValues.getConstArray();
for( n = 0; n < nCnt; ++n )
- pValues[ n ] = pAnyValues[ n ].hasValue()
- ? *(sal_uInt32*)pAnyValues[ n ].getValue()
- : 0;
- }
- else
- for( n = 0; n < nCnt; ++n )
- pValues[ n ] = 0;
+ pNames[ n ] = OUString::createFromAscii( ppNames[ n ] );
+ Sequence<Any> aValues = GetProperties( aNames );
+
+ if( nCnt == aValues.getLength() )
+ {
+ const Any* pAnyValues = aValues.getConstArray();
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = pAnyValues[ n ].hasValue()
+ ? *(sal_uInt32*)pAnyValues[ n ].getValue()
+ : 0;
+ }
+ else
+ for( n = 0; n < nCnt; ++n )
+ pValues[ n ] = 0;
}
void SwFilterOptions::Commit() {}
@@ -303,66 +303,66 @@ void SwFilterOptions::Notify( const ::com::sun::star::uno::Sequence< rtl::OUStri
void StgReader::SetFltName( const String& rFltNm )
{
- if( SW_STORAGE_READER & GetReaderType() )
- aFltName = rFltNm;
+ if( SW_STORAGE_READER & GetReaderType() )
+ aFltName = rFltNm;
}
/* */
-SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNDoc )
- : bNewDoc( bNDoc )
+SwRelNumRuleSpaces::SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNDoc )
+ : bNewDoc( bNDoc )
{
- pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
- if( !bNDoc )
- pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
+ pNumRuleTbl = new SwNumRuleTbl( 8, 8 );
+ if( !bNDoc )
+ pNumRuleTbl->Insert( &rDoc.GetNumRuleTbl(), 0 );
}
SwRelNumRuleSpaces::~SwRelNumRuleSpaces()
{
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl;
- }
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl;
+ }
}
void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
{
- const SwNumRuleTbl* pRuleTbl = NULL;
+ const SwNumRuleTbl* pRuleTbl = NULL;
- if( !bNewDoc )
- {
- // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
- // damit nur die neuen angepasst werden
- SwNumRuleTbl aNumRuleTbl;
- aNumRuleTbl.Insert( pNumRuleTbl, 0 );
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
- SwNumRule* pRule;
+ if( !bNewDoc )
+ {
+ // jetzt alle schon vorhanden NumRules aus dem Array entfernen,
+ // damit nur die neuen angepasst werden
+ SwNumRuleTbl aNumRuleTbl;
+ aNumRuleTbl.Insert( pNumRuleTbl, 0 );
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ const SwNumRuleTbl& rRuleTbl = rDoc.GetNumRuleTbl();
+ SwNumRule* pRule;
- for( USHORT n = 0; n < rRuleTbl.Count(); ++n )
- if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
- // war noch nicht vorhanden, also neu
- pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
+ for( sal_uInt16 n = 0; n < rRuleTbl.Count(); ++n )
+ if( USHRT_MAX == aNumRuleTbl.GetPos( ( pRule = rRuleTbl[ n ] )))
+ // war noch nicht vorhanden, also neu
+ pNumRuleTbl->Insert( pRule, pNumRuleTbl->Count() );
- aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
+ aNumRuleTbl.Remove( 0, aNumRuleTbl.Count() );
pRuleTbl = pNumRuleTbl;
- }
+ }
else
{
pRuleTbl = &rDoc.GetNumRuleTbl();
}
- if( pRuleTbl )
- {
- for( USHORT n = pRuleTbl->Count(); n; )
+ if( pRuleTbl )
{
- SwNumRule* pRule = (*pRuleTbl)[ --n ];
- // Rule noch gueltig und am Doc vorhanden?
- if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
- {
+ for( sal_uInt16 n = pRuleTbl->Count(); n; )
+ {
+ SwNumRule* pRule = (*pRuleTbl)[ --n ];
+ // Rule noch gueltig und am Doc vorhanden?
+ if( USHRT_MAX != rDoc.GetNumRuleTbl().GetPos( pRule ))
+ {
SwNumRule::tTxtNodeList aTxtNodeList;
pRule->GetTxtNodeList( aTxtNodeList );
for ( SwNumRule::tTxtNodeList::iterator aIter = aTxtNodeList.begin();
@@ -371,220 +371,220 @@ void SwRelNumRuleSpaces::SetNumRelSpaces( SwDoc& rDoc )
SwTxtNode* pNd = *aIter;
SetNumLSpace( *pNd, *pRule );
}
- }
+ }
+ }
}
- }
- if( pNumRuleTbl )
- {
- pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
- delete pNumRuleTbl, pNumRuleTbl = 0;
- }
+ if( pNumRuleTbl )
+ {
+ pNumRuleTbl->Remove( 0, pNumRuleTbl->Count() );
+ delete pNumRuleTbl, pNumRuleTbl = 0;
+ }
- if( bNewDoc )
- {
- SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
- SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
- }
+ if( bNewDoc )
+ {
+ SetOultineRelSpaces( SwNodeIndex( rDoc.GetNodes() ),
+ SwNodeIndex( rDoc.GetNodes().GetEndOfContent()));
+ }
}
void SwRelNumRuleSpaces::SetOultineRelSpaces( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd )
+ const SwNodeIndex& rEnd )
{
- SwDoc* pDoc = rStt.GetNode().GetDoc();
- const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
- if( rOutlNds.Count() )
- {
- USHORT nPos;
- rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
- for( ; nPos < rOutlNds.Count() &&
- rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ SwDoc* pDoc = rStt.GetNode().GetDoc();
+ const SwOutlineNodes& rOutlNds = pDoc->GetNodes().GetOutLineNds();
+ if( rOutlNds.Count() )
{
- SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
- if( pNd->IsOutline() && !pNd->GetNumRule() )
- SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ sal_uInt16 nPos;
+ rOutlNds.Seek_Entry( &rStt.GetNode(), &nPos );
+ for( ; nPos < rOutlNds.Count() &&
+ rOutlNds[ nPos ]->GetIndex() < rEnd.GetIndex(); ++nPos )
+ {
+ SwTxtNode* pNd = rOutlNds[ nPos ]->GetTxtNode();
+ if( pNd->IsOutline() && !pNd->GetNumRule() )
+ SetNumLSpace( *pNd, *pDoc->GetOutlineNumRule() );
+ }
}
- }
}
void SwRelNumRuleSpaces::SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule )
{
- BOOL bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
+ sal_Bool bOutlineRule = OUTLINE_RULE == rRule.GetRuleType();
// correction of refactoring done by cws swnumtree:
// - assure a correct level for retrieving numbering format.
- BYTE nLvl = 0;
+ sal_uInt8 nLvl = 0;
if ( rNd.GetActualListLevel() >= 0 && rNd.GetActualListLevel() < MAXLEVEL )
{
- nLvl = static_cast< BYTE >(rNd.GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(rNd.GetActualListLevel());
}
- const SwNumFmt& rFmt = rRule.Get( nLvl );
- const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
+ const SwNumFmt& rFmt = rRule.Get( nLvl );
+ const SvxLRSpaceItem& rLR = rNd.GetSwAttrSet().GetLRSpace();
- SvxLRSpaceItem aLR( rLR );
- aLR.SetTxtFirstLineOfst( 0 );
+ SvxLRSpaceItem aLR( rLR );
+ aLR.SetTxtFirstLineOfst( 0 );
- // sagt der Node, das die Numerierung den Wert vorgibt?
- if( !bOutlineRule && rNd.IsSetNumLSpace() )
- aLR.SetTxtLeft( 0 );
- else
- {
- long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
- if( 0 < rLR.GetTxtFirstLineOfst() )
- nParaLeft += rLR.GetTxtFirstLineOfst();
- else if( nParaLeft >= nLeft )
- // set correct paragraph indent
- nParaLeft -= nLeft;
+ // sagt der Node, das die Numerierung den Wert vorgibt?
+ if( !bOutlineRule && rNd.IsSetNumLSpace() )
+ aLR.SetTxtLeft( 0 );
else
- nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
- aLR.SetTxtLeft( nParaLeft );
- }
+ {
+ long nLeft = rFmt.GetAbsLSpace(), nParaLeft = rLR.GetTxtLeft();
+ if( 0 < rLR.GetTxtFirstLineOfst() )
+ nParaLeft += rLR.GetTxtFirstLineOfst();
+ else if( nParaLeft >= nLeft )
+ // set correct paragraph indent
+ nParaLeft -= nLeft;
+ else
+ nParaLeft = rLR.GetTxtLeft()+rLR.GetTxtFirstLineOfst();
+ aLR.SetTxtLeft( nParaLeft );
+ }
- if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
- {
- //bevor rLR geloescht wird!
- long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
+ if( aLR.GetTxtLeft() != rLR.GetTxtLeft() )
+ {
+ //bevor rLR geloescht wird!
+ long nOffset = rLR.GetTxtLeft() - aLR.GetTxtLeft();
rNd.SetAttr( aLR );
- // Tabs anpassen !!
- const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
- RES_PARATR_TABSTOP, TRUE, &pItem ))
- {
- SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
- for( USHORT n = 0; n < aTStop.Count(); ++n )
- {
- SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
- if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ // Tabs anpassen !!
+ const SfxPoolItem* pItem;
+ if( SFX_ITEM_SET == rNd.GetSwAttrSet().GetItemState(
+ RES_PARATR_TABSTOP, sal_True, &pItem ))
{
- if( !rTab.GetTabPos() )
- {
- aTStop.Remove( n );
- --n;
- }
- else
- rTab.GetTabPos() += nOffset;
- }
- }
+ SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
+ for( sal_uInt16 n = 0; n < aTStop.Count(); ++n )
+ {
+ SvxTabStop& rTab = (SvxTabStop&)aTStop[ n ];
+ if( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() )
+ {
+ if( !rTab.GetTabPos() )
+ {
+ aTStop.Remove( n );
+ --n;
+ }
+ else
+ rTab.GetTabPos() += nOffset;
+ }
+ }
rNd.SetAttr( aTStop );
+ }
}
- }
}
/* */
void CalculateFlySize(SfxItemSet& rFlySet, const SwNodeIndex& rAnchor,
- SwTwips nPageWidth)
+ SwTwips nPageWidth)
{
- const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) ||
- MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
- {
- SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, TRUE));
- if (pItem)
- aSz = (SwFmtFrmSize&)(*pItem);
-
- SwTwips nWidth;
- // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
- // defininiert, dann benutze deren Breite, sonst die Breite der
- // Seite
- const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
- if( pTblNd )
- nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
- else
- nWidth = nPageWidth;
-
- const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
- GetCntntIdx();
- if( pSttNd )
+ const SfxPoolItem* pItem = 0;
+ if( SFX_ITEM_SET != rFlySet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) ||
+ MINFLY > ((SwFmtFrmSize*)pItem)->GetWidth() )
{
- BOOL bOnlyOneNode = TRUE;
- ULONG nMinFrm = 0;
- ULONG nMaxFrm = 0;
- SwTxtNode* pFirstTxtNd = 0;
- SwNodeIndex aIdx( *pSttNd, 1 );
- SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
- while( aIdx < aEnd )
- {
- SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
- if( pTxtNd )
- {
- if( !pFirstTxtNd )
- pFirstTxtNd = pTxtNd;
- else if( pFirstTxtNd != pTxtNd )
- {
- // forget it
- bOnlyOneNode = FALSE;
- break;
- }
-
- ULONG nAbsMinCnts;
- pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
- nMaxFrm, nAbsMinCnts );
- }
- aIdx++;
- }
+ SwFmtFrmSize aSz((SwFmtFrmSize&)rFlySet.Get(RES_FRM_SIZE, sal_True));
+ if (pItem)
+ aSz = (SwFmtFrmSize&)(*pItem);
+
+ SwTwips nWidth;
+ // dann die Breite des Flys selbst bestimmen. Ist eine Tabelle
+ // defininiert, dann benutze deren Breite, sonst die Breite der
+ // Seite
+ const SwTableNode* pTblNd = rAnchor.GetNode().FindTableNode();
+ if( pTblNd )
+ nWidth = pTblNd->GetTable().GetFrmFmt()->GetFrmSize().GetWidth();
+ else
+ nWidth = nPageWidth;
- if( bOnlyOneNode )
- {
- if( nMinFrm < MINLAY && pFirstTxtNd )
+ const SwNodeIndex* pSttNd = ((SwFmtCntnt&)rFlySet.Get( RES_CNTNT )).
+ GetCntntIdx();
+ if( pSttNd )
{
- // if the first node dont contained any content, then
- // insert one char in it calc again and delete once again
- SwIndex aNdIdx( pFirstTxtNd );
+ sal_Bool bOnlyOneNode = sal_True;
+ sal_uLong nMinFrm = 0;
+ sal_uLong nMaxFrm = 0;
+ SwTxtNode* pFirstTxtNd = 0;
+ SwNodeIndex aIdx( *pSttNd, 1 );
+ SwNodeIndex aEnd( *pSttNd->GetNode().EndOfSectionNode() );
+ while( aIdx < aEnd )
+ {
+ SwTxtNode *pTxtNd = aIdx.GetNode().GetTxtNode();
+ if( pTxtNd )
+ {
+ if( !pFirstTxtNd )
+ pFirstTxtNd = pTxtNd;
+ else if( pFirstTxtNd != pTxtNd )
+ {
+ // forget it
+ bOnlyOneNode = sal_False;
+ break;
+ }
+
+ sal_uLong nAbsMinCnts;
+ pTxtNd->GetMinMaxSize( aIdx.GetIndex(), nMinFrm,
+ nMaxFrm, nAbsMinCnts );
+ }
+ aIdx++;
+ }
+
+ if( bOnlyOneNode )
+ {
+ if( nMinFrm < MINLAY && pFirstTxtNd )
+ {
+ // if the first node dont contained any content, then
+ // insert one char in it calc again and delete once again
+ SwIndex aNdIdx( pFirstTxtNd );
pFirstTxtNd->InsertText( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( "MM" )), aNdIdx );
- ULONG nAbsMinCnts;
- pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
- nMinFrm, nMaxFrm, nAbsMinCnts );
- aNdIdx -= 2;
+ sal_uLong nAbsMinCnts;
+ pFirstTxtNd->GetMinMaxSize( pFirstTxtNd->GetIndex(),
+ nMinFrm, nMaxFrm, nAbsMinCnts );
+ aNdIdx -= 2;
pFirstTxtNd->EraseText( aNdIdx, 2 );
}
- // Umrandung und Abstand zum Inhalt beachten
- const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
- USHORT nLine = BOX_LINE_LEFT;
- for( int i = 0; i < 2; ++i )
- {
- const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
- if( pLn )
- {
- USHORT nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
+ // Umrandung und Abstand zum Inhalt beachten
+ const SvxBoxItem& rBoxItem = (SvxBoxItem&)rFlySet.Get( RES_BOX );
+ sal_uInt16 nLine = BOX_LINE_LEFT;
+ for( int i = 0; i < 2; ++i )
+ {
+ const SvxBorderLine* pLn = rBoxItem.GetLine( nLine );
+ if( pLn )
+ {
+ sal_uInt16 nWidthTmp = pLn->GetOutWidth() + pLn->GetInWidth();
nWidthTmp = nWidthTmp + rBoxItem.GetDistance( nLine );
- nMinFrm += nWidthTmp;
- nMaxFrm += nWidthTmp;
- }
- nLine = BOX_LINE_RIGHT;
+ nMinFrm += nWidthTmp;
+ nMaxFrm += nWidthTmp;
+ }
+ nLine = BOX_LINE_RIGHT;
+ }
+
+ // Mindestbreite fuer Inhalt einhalten
+ if( nMinFrm < MINLAY )
+ nMinFrm = MINLAY;
+ if( nMaxFrm < MINLAY )
+ nMaxFrm = MINLAY;
+
+ if( nWidth > (sal_uInt16)nMaxFrm )
+ nWidth = nMaxFrm;
+ else if( nWidth > (sal_uInt16)nMinFrm )
+ nWidth = nMinFrm;
+ }
}
- // Mindestbreite fuer Inhalt einhalten
- if( nMinFrm < MINLAY )
- nMinFrm = MINLAY;
- if( nMaxFrm < MINLAY )
- nMaxFrm = MINLAY;
-
- if( nWidth > (USHORT)nMaxFrm )
- nWidth = nMaxFrm;
- else if( nWidth > (USHORT)nMinFrm )
- nWidth = nMinFrm;
- }
- }
-
- if( MINFLY > nWidth )
- nWidth = MINFLY;
+ if( MINFLY > nWidth )
+ nWidth = MINFLY;
- aSz.SetWidth( nWidth );
- if( MINFLY > aSz.GetHeight() )
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
- else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
- {
- SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
- aSz.SetHeight( MINFLY );
- rFlySet.Put( aSz );
- }
+ aSz.SetWidth( nWidth );
+ if( MINFLY > aSz.GetHeight() )
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
+ else if( MINFLY > ((SwFmtFrmSize*)pItem)->GetHeight() )
+ {
+ SwFmtFrmSize aSz( *(SwFmtFrmSize*)pItem );
+ aSz.SetHeight( MINFLY );
+ rFlySet.Put( aSz );
+ }
}
/* */
@@ -714,7 +714,7 @@ rtl_TextEncoding CharSetFromName(const String& rChrSetStr)
OSL_ENSURE(nRet != pStart->eCode, "TXT: That was an unknown language!");
- return nRet;
+ return nRet;
}
@@ -743,55 +743,55 @@ String NameFromCharSet(rtl_TextEncoding nChrSet)
// for the automatic conversion (mail/news/...)
// The user data contains the options for the ascii import/export filter.
// The format is:
-// 1. CharSet - as ascii chars
-// 2. LineEnd - as CR/LR/CRLF
-// 3. Fontname
-// 4. Language
+// 1. CharSet - as ascii chars
+// 2. LineEnd - as CR/LR/CRLF
+// 3. Fontname
+// 4. Language
// the delimetercharacter is ","
//
void SwAsciiOptions::ReadUserData( const String& rStr )
{
- xub_StrLen nToken = 0;
- USHORT nCnt = 0;
- String sToken;
- do {
- if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
- {
- switch( nCnt )
- {
- case 0: // CharSet
+ xub_StrLen nToken = 0;
+ sal_uInt16 nCnt = 0;
+ String sToken;
+ do {
+ if( 0 != (sToken = rStr.GetToken( 0, ',', nToken )).Len() )
+ {
+ switch( nCnt )
+ {
+ case 0: // CharSet
eCharSet = CharSetFromName(sToken);
- break;
- case 1: // LineEnd
- if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
- eCRLF_Flag = LINEEND_CRLF;
- else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
- eCRLF_Flag = LINEEND_LF;
- else
- eCRLF_Flag = LINEEND_CR;
- break;
- case 2: // fontname
- sFont = sToken;
- break;
- case 3: // Language
+ break;
+ case 1: // LineEnd
+ if( sToken.EqualsIgnoreCaseAscii( "CRLF" ))
+ eCRLF_Flag = LINEEND_CRLF;
+ else if( sToken.EqualsIgnoreCaseAscii( "LF" ))
+ eCRLF_Flag = LINEEND_LF;
+ else
+ eCRLF_Flag = LINEEND_CR;
+ break;
+ case 2: // fontname
+ sFont = sToken;
+ break;
+ case 3: // Language
nLanguage = MsLangId::convertIsoStringToLanguage( sToken );
- break;
- }
- }
- ++nCnt;
- } while( STRING_NOTFOUND != nToken );
+ break;
+ }
+ }
+ ++nCnt;
+ } while( STRING_NOTFOUND != nToken );
}
void SwAsciiOptions::WriteUserData( String& rStr )
{
- // 1. charset
- rStr = NameFromCharSet(eCharSet);
- rStr += ',';
+ // 1. charset
+ rStr = NameFromCharSet(eCharSet);
+ rStr += ',';
- // 2. LineEnd
- switch(eCRLF_Flag)
- {
+ // 2. LineEnd
+ switch(eCRLF_Flag)
+ {
case LINEEND_CRLF:
rStr.AppendAscii( "CRLF" );
break;
@@ -801,20 +801,20 @@ void SwAsciiOptions::WriteUserData( String& rStr )
case LINEEND_LF:
rStr.AppendAscii( "LF" );
break;
- }
- rStr += ',';
+ }
+ rStr += ',';
- // 3. Fontname
- rStr += sFont;
- rStr += ',';
+ // 3. Fontname
+ rStr += sFont;
+ rStr += ',';
- // 4. Language
- if (nLanguage)
- {
+ // 4. Language
+ if (nLanguage)
+ {
rtl::OUString sTmp = MsLangId::convertLanguageToIsoString( nLanguage );
rStr += (String)sTmp;
- }
- rStr += ',';
+ }
+ rStr += ',';
}
extern "C" { static void SAL_CALL thisModule() {} }
@@ -822,11 +822,11 @@ extern "C" { static void SAL_CALL thisModule() {} }
static oslGenericFunction GetMswordLibSymbol( const char *pSymbol )
{
static ::osl::Module aModule;
- static sal_Bool bLoaded = sal_False;
+ static sal_Bool bLoaded = sal_False;
static ::rtl::OUString aLibName( RTL_CONSTASCII_USTRINGPARAM( SVLIBRARY( "msword" ) ) );
- if (!bLoaded)
- bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
- if (bLoaded)
+ if (!bLoaded)
+ bLoaded = SvLibrary::LoadModule( aModule, aLibName, &thisModule );
+ if (bLoaded)
return aModule.getFunctionSymbol( ::rtl::OUString::createFromAscii( pSymbol ) );
return NULL;
}
@@ -871,23 +871,23 @@ void GetWW8Writer( const String& rFltName, const String& rBaseURL, WriterRef& xR
xRet = WriterRef(0);
}
-typedef ULONG ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, BOOL, const String& );
-typedef ULONG ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
+typedef sal_uLong ( __LOADONCALLAPI *SaveOrDel )( SfxObjectShell&, SotStorage&, sal_Bool, const String& );
+typedef sal_uLong ( __LOADONCALLAPI *GetSaveWarning )( SfxObjectShell& );
-ULONG SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+sal_uLong SaveOrDelMSVBAStorage( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SaveOrDel pFunction = reinterpret_cast<SaveOrDel>( GetMswordLibSymbol( "SaveOrDelMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDoc, rStor, bSaveInto, rStorageName );
- return ERRCODE_NONE;
+ return pFunction( rDoc, rStor, bSaveInto, rStorageName );
+ return ERRCODE_NONE;
}
-ULONG GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
+sal_uLong GetSaveWarningOfMSVBAStorage( SfxObjectShell &rDocS )
{
GetSaveWarning pFunction = reinterpret_cast<GetSaveWarning>( GetMswordLibSymbol( "GetSaveWarningOfMSVBAStorage_ww8" ) );
if( pFunction )
- return pFunction( rDocS );
- return ERRCODE_NONE;
+ return pFunction( rDocS );
+ return ERRCODE_NONE;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/basflt/iodetect.cxx b/sw/source/filter/basflt/iodetect.cxx
index 8fcb6dd99fa5..81012d99768c 100644
--- a/sw/source/filter/basflt/iodetect.cxx
+++ b/sw/source/filter/basflt/iodetect.cxx
@@ -53,7 +53,7 @@ SwIoDetect aFilterDetect[] =
SwIoDetect( FILTER_TEXT, 4 )
};
-const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
+const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, sal_uLong nLen_,
const String & /*rFileName*/, const String& /*rUserData*/) const
{
// Filter erkennung
@@ -66,17 +66,17 @@ const sal_Char* SwIoDetect::IsReader(const sal_Char* pHeader, ULONG nLen_,
SVBT16 pnNext; // 0x8
SVBT16 fFlags;
- USHORT nFibGet() { return SVBT16ToShort(nFib); }
- USHORT wIdentGet() { return SVBT16ToShort(wIdent); }
- USHORT fFlagsGet() { return SVBT16ToShort(fFlags); }
+ sal_uInt16 nFibGet() { return SVBT16ToShort(nFib); }
+ sal_uInt16 wIdentGet() { return SVBT16ToShort(wIdent); }
+ sal_uInt16 fFlagsGet() { return SVBT16ToShort(fFlags); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() { return static_cast< BOOL >((fFlagsGet() >> 2) & 1); }
+ sal_Bool fComplexGet() { return static_cast< sal_Bool >((fFlagsGet() >> 2) & 1); }
};
- int bRet = FALSE;
+ int bRet = sal_False;
rtl::OString aName( pName );
if ( sHTML == aName )
- bRet = HTMLParser::IsHTMLFormat( pHeader, TRUE, RTL_TEXTENCODING_DONTKNOW );
+ bRet = HTMLParser::IsHTMLFormat( pHeader, sal_True, RTL_TEXTENCODING_DONTKNOW );
else if ( FILTER_RTF == aName )
bRet = 0 == strncmp( "{\\rtf", pHeader, 5 );
else if ( sWW5 == aName )
@@ -138,16 +138,16 @@ const SfxFilter* SwIoSystem::GetFilterOfFormat(const String& rFmtNm,
if( pCnt || pFltCnt == &aCntSwWeb )
break;
pFltCnt = &aCntSwWeb;
- } while( TRUE );
+ } while( sal_True );
return 0;
}
-BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rStg, const SfxFilter& rFilter)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
try
{
- ULONG nStgFmtId = SotStorage::GetFormatID( rStg );
+ sal_uLong nStgFmtId = SotStorage::GetFormatID( rStg );
bRet = rStg->isStreamElement( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("content.xml")) );
if ( bRet )
bRet = ( nStgFmtId && ( rFilter.GetFormat() == nStgFmtId ) );
@@ -159,9 +159,9 @@ BOOL SwIoSystem::IsValidStgFilter( const com::sun::star::uno::Reference < com::s
return bRet;
}
-BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
+sal_Bool SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
{
- ULONG nStgFmtId = rStg.GetFormat();
+ sal_uLong nStgFmtId = rStg.GetFormat();
/*#i8409# We cannot trust the clipboard id anymore :-(*/
if( rFilter.GetUserData().EqualsAscii(FILTER_WW8) ||
rFilter.GetUserData().EqualsAscii(sWW6) )
@@ -169,7 +169,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
nStgFmtId = 0;
}
- BOOL bRet = SVSTREAM_OK == rStg.GetError() &&
+ sal_Bool bRet = SVSTREAM_OK == rStg.GetError() &&
( !nStgFmtId || rFilter.GetFormat() == nStgFmtId ) &&
( rStg.IsContained( SwIoSystem::GetSubStorageName( rFilter )) );
if( bRet )
@@ -188,7 +188,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
rStg.OpenSotStream(String::CreateFromAscii("WordDocument"),
STREAM_STD_READ | STREAM_NOCREATE );
xRef->Seek(10);
- BYTE nByte;
+ sal_uInt8 nByte;
*xRef >> nByte;
bRet = !(nByte & 1);
}
@@ -197,7 +197,7 @@ BOOL SwIoSystem::IsValidStgFilter(SotStorage& rStg, const SfxFilter& rFilter)
return bRet;
}
-void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
+void TerminateBuffer(sal_Char *pBuffer, sal_uLong nBytesRead, sal_uLong nBufferLen)
{
OSL_ENSURE(nBytesRead <= nBufferLen - 2,
"what you read must be less than the max + null termination");
@@ -213,10 +213,10 @@ void TerminateBuffer(sal_Char *pBuffer, ULONG nBytesRead, ULONG nBufferLen)
/* Feststellen ob das File in dem entsprechenden Format vorliegt. */
/* Z.z werden nur unsere eigene Filter unterstuetzt */
-BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
+sal_Bool SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
const SfxFilter** ppFilter )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
SfxFilterContainer aCntSw( String::CreateFromAscii( sSWRITER ) );
SfxFilterContainer aCntSwWeb( String::CreateFromAscii( sSWRITERWEB ) );
@@ -230,7 +230,7 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
{
SvStream* pStream = rMedium.GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
}
SfxFilterMatcher aMatcher( rFltContainer.GetName() );
@@ -255,11 +255,11 @@ BOOL SwIoSystem::IsFileFilter( SfxMedium& rMedium, const String& rFmtName,
if( pStrm && !pStrm->GetError() )
{
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = pStrm->Read(aBuffer, nMaxRead);
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = pStrm->Read(aBuffer, nMaxRead);
pStrm->Seek(STREAM_SEEK_TO_BEGIN);
TerminateBuffer(aBuffer, nBytesRead, sizeof(aBuffer));
- for (USHORT i = 0; i < MAXFILTER; ++i)
+ for (sal_uInt16 i = 0; i < MAXFILTER; ++i)
{
if (aFilterDetect[i].IsFilter(rFmtName))
{
@@ -312,13 +312,13 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
INetURLObject aObj;
aObj.SetSmartProtocol( INET_PROT_FILE );
aObj.SetSmartURL( rFileName );
- pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, FALSE );
+ pMedium = new SfxMedium( aObj.GetMainURL( INetURLObject::NO_DECODE ), STREAM_STD_READ, sal_False );
}
// templates should not get precedence over "normal" filters (#i35508, #i33168)
const SfxFilter* pTemplateFilter = 0;
const SfxFilter* pOldFilter = pFCntnr->GetFilter4FilterName( rPrefFltName );
- BOOL bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
+ sal_Bool bLookForTemplate = pOldFilter && pOldFilter->IsOwnTemplateFormat();
if ( pMedium->IsStorage() )
{
com::sun::star::uno::Reference < com::sun::star::embed::XStorage > xStor = pMedium->GetStorage();
@@ -347,7 +347,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
SvStream* pStream = pMedium->GetInStream();
if ( pStream && SotStorage::IsStorageFile(pStream) )
- xStg = new SotStorage( pStream, FALSE );
+ xStg = new SotStorage( pStream, sal_False );
if( xStg.Is() && ( xStg->GetError() == SVSTREAM_OK ) )
{
@@ -376,14 +376,14 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
}
sal_Char aBuffer[4098];
- const ULONG nMaxRead = sizeof(aBuffer) - 2;
- ULONG nBytesRead = 0;
+ const sal_uLong nMaxRead = sizeof(aBuffer) - 2;
+ sal_uLong nBytesRead = 0;
if (pMedium)
{
SvStream* pIStrm = pMedium->GetInStream();
if( !pIStrm || SVSTREAM_OK != pIStrm->GetError() )
return 0;
- ULONG nCurrPos = pIStrm->Tell();
+ sal_uLong nCurrPos = pIStrm->Tell();
nBytesRead = pIStrm->Read(aBuffer, nMaxRead);
pIStrm->Seek( nCurrPos );
}
@@ -400,7 +400,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
{
const SfxFilter* pFilterTmp = 0;
const sal_Char* pNm;
- for( USHORT n = 0; n < MAXFILTER; ++n )
+ for( sal_uInt16 n = 0; n < MAXFILTER; ++n )
{
String sEmptyUserData;
pNm = aFilterDetect[n].IsReader(aBuffer, nBytesRead, rFileName, sEmptyUserData);
@@ -423,7 +423,7 @@ const SfxFilter* SwIoSystem::GetFileFilter(const String& rFileName,
return SwIoSystem::GetTextFilter( aBuffer, nBytesRead);
}
-bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
+bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, sal_uLong &rLen,
CharSet *pCharSet, bool *pSwap, LineEnd *pLineEnd, bool bEncodedFilter)
{
bool bSwap = false;
@@ -432,20 +432,20 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
/*See if its a known unicode type*/
if (rLen >= 2)
{
- ULONG nHead=0;
- if (rLen > 2 && BYTE(pBuf[0]) == 0xEF && BYTE(pBuf[1]) == 0xBB &&
- BYTE(pBuf[2]) == 0xBF)
+ sal_uLong nHead=0;
+ if (rLen > 2 && sal_uInt8(pBuf[0]) == 0xEF && sal_uInt8(pBuf[1]) == 0xBB &&
+ sal_uInt8(pBuf[2]) == 0xBF)
{
eCharSet = RTL_TEXTENCODING_UTF8;
nHead = 3;
}
- else if (BYTE(pBuf[0]) == 0xFE && BYTE(pBuf[1]) == 0xFF)
+ else if (sal_uInt8(pBuf[0]) == 0xFE && sal_uInt8(pBuf[1]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
bLE = false;
nHead = 2;
}
- else if (BYTE(pBuf[1]) == 0xFE && BYTE(pBuf[0]) == 0xFF)
+ else if (sal_uInt8(pBuf[1]) == 0xFE && sal_uInt8(pBuf[0]) == 0xFF)
{
eCharSet = RTL_TEXTENCODING_UCS2;
nHead = 2;
@@ -506,7 +506,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
sWork.ReleaseBufferAccess( static_cast< xub_StrLen >(nNewLen) );
pNewBuf = sWork.GetBufferAccess();
- for (ULONG nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
+ for (sal_uLong nCnt = 0; nCnt < nNewLen; ++nCnt, ++pNewBuf)
{
switch (*pNewBuf)
{
@@ -523,7 +523,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
}
else
{
- for( ULONG nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
+ for( sal_uLong nCnt = 0; nCnt < rLen; ++nCnt, ++pBuf )
{
switch (*pBuf)
{
@@ -565,7 +565,7 @@ bool SwIoSystem::IsDetectableText(const sal_Char* pBuf, ULONG &rLen,
return bEncodedFilter || (!bIsBareUnicode && eSysLE == eLineEnd);
}
-const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, ULONG nLen)
+const SfxFilter* SwIoSystem::GetTextFilter( const sal_Char* pBuf, sal_uLong nLen)
{
bool bAuto = IsDetectableText(pBuf, nLen);
const sal_Char* pNm = bAuto ? FILTER_TEXT : FILTER_TEXT_DLG;
diff --git a/sw/source/filter/basflt/makefile.mk b/sw/source/filter/basflt/makefile.mk
deleted file mode 100644
index e52622717426..000000000000
--- a/sw/source/filter/basflt/makefile.mk
+++ /dev/null
@@ -1,57 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=basflt
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS+=-Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
-
-EXCEPTIONSFILES = \
- $(SLO)$/docfact.obj \
- $(SLO)$/fltini.obj \
- $(SLO)$/iodetect.obj \
- $(SLO)$/shellio.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/basflt/shellio.cxx b/sw/source/filter/basflt/shellio.cxx
index 6a3d12bca014..aeb5946a6aa7 100644
--- a/sw/source/filter/basflt/shellio.cxx
+++ b/sw/source/filter/basflt/shellio.cxx
@@ -28,6 +28,7 @@
// MARKER(update_precomp.py): autogen include statement, do not remove
#include "precompiled_sw.hxx"
+
#include <hintids.hxx>
#include <tools/date.hxx>
#include <tools/time.hxx>
@@ -47,6 +48,7 @@
#include <swtypes.hxx>
#include <shellio.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <editsh.hxx>
#include <undobj.hxx> // fuer Undo Insert-Dokument
@@ -68,7 +70,7 @@ using namespace ::com::sun::star;
//////////////////////////////////////////////////////////////////////////
-ULONG SwReader::Read( const Reader& rOptions )
+sal_uLong SwReader::Read( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
@@ -81,14 +83,14 @@ ULONG SwReader::Read( const Reader& rOptions )
if( 0 != (po->pMedium = pMedium ) &&
!po->SetStrmStgPtr() )
{
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return ERR_SWG_FILE_FORMAT_ERROR;
}
- ULONG nError = 0L;
+ sal_uLong nError = 0L;
GetDoc();
@@ -122,24 +124,24 @@ ULONG SwReader::Read( const Reader& rOptions )
SwPaM *pEnd = pPam;
SwUndoInsDoc* pUndo = 0;
- BOOL bReadPageDescs = FALSE;
- BOOL bDocUndo = pDoc->DoesUndo();
- BOOL bSaveUndo = bDocUndo && pCrsr;
+ sal_Bool bReadPageDescs = sal_False;
+ bool const bDocUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
+ sal_Bool bSaveUndo = bDocUndo && pCrsr;
if( bSaveUndo )
{
// das Einlesen von Seitenvorlagen ist nicht Undofaehig!
if( 0 != ( bReadPageDescs = po->aOpt.IsPageDescs() ) )
{
- bSaveUndo = FALSE;
- pDoc->DelAllUndoObj();
+ bSaveUndo = sal_False;
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
}
else
{
- pDoc->ClearRedo();
- pDoc->StartUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().ClearRedo();
+ pDoc->GetIDocumentUndoRedo().StartUndo( UNDO_INSDOKUMENT, NULL );
}
}
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
SwNodeIndex aSplitIdx( pDoc->GetNodes() );
@@ -149,9 +151,9 @@ ULONG SwReader::Read( const Reader& rOptions )
// Array von FlyFormaten
SwSpzFrmFmts aFlyFrmArr;
// only read templates? then ignore multi selection!
- BOOL bFmtsOnly = po->aOpt.IsFmtsOnly();
+ sal_Bool bFmtsOnly = po->aOpt.IsFmtsOnly();
- while( TRUE )
+ while( sal_True )
{
if( bSaveUndo )
pUndo = new SwUndoInsDoc( *pPam );
@@ -208,7 +210,7 @@ ULONG SwReader::Read( const Reader& rOptions )
SwTableBox* pBox = pTblBoxStart->GetTblBox();
if ( pBox )
{
- pDoc->ChkBoxNumFmt( *pBox, TRUE );
+ pDoc->ChkBoxNumFmt( *pBox, sal_True );
}
}
}
@@ -229,7 +231,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// Suche alle neuen Fly's und speicher sie als einzelne Undo
// Objecte
- for( USHORT n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
+ for( sal_uInt16 n = 0; n < pDoc->GetSpzFrmFmts()->Count(); ++n )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ n ];
const SwFmtAnchor& rAnchor = pFrmFmt->GetAnchor();
@@ -272,7 +274,11 @@ ULONG SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pDoc->AppendUndo( new SwUndoInsLayFmt( pFrmFmt,0,0 ) );
+ // UGLY: temp. enable undo
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ pDoc->GetIDocumentUndoRedo().AppendUndo(
+ new SwUndoInsLayFmt( pFrmFmt,0,0 ) );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
if( pFrmFmt->GetDepends() )
@@ -293,7 +299,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// seitengebundene Flys eingefuegt, dann schalte
// die Optimierungs-Flags vom SwDoc ab. Sonst
// werden die Flys nicht an der Position erzeugt.
- pDoc->SetLoaded( FALSE );
+ pDoc->SetLoaded( sal_False );
}
}
else
@@ -315,8 +321,11 @@ ULONG SwReader::Read( const Reader& rOptions )
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pUndo->SetInsertRange( *pUndoPam, FALSE );
- pDoc->AppendUndo( pUndo );
+ pUndo->SetInsertRange( *pUndoPam, sal_False );
+ // UGLY: temp. enable undo
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ pDoc->GetIDocumentUndoRedo().AppendUndo( pUndo );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
@@ -350,15 +359,13 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->ChkCondColls();
pDoc->SetAllUniqueFlyNames();
- if( bReadPageDescs )
- pDoc->DoUndo( TRUE );
- else
+ pDoc->GetIDocumentUndoRedo().DoUndo(bDocUndo);
+ if (!bReadPageDescs)
{
- pDoc->DoUndo( bDocUndo );
if( bSaveUndo )
{
pDoc->SetRedlineMode_intern( eOld );
- pDoc->EndUndo( UNDO_INSDOKUMENT, NULL );
+ pDoc->GetIDocumentUndoRedo().EndUndo( UNDO_INSDOKUMENT, NULL );
pDoc->SetRedlineMode_intern( nsRedlineMode_t::REDLINE_IGNORE );
}
}
@@ -371,7 +378,7 @@ ULONG SwReader::Read( const Reader& rOptions )
// #i42634# Moved common code of SwReader::Read() and
// SwDocShell::UpdateLinks() to new SwDoc::UpdateLinks():
// ATM still with Update
- pDoc->UpdateLinks( TRUE );
+ pDoc->UpdateLinks( sal_True );
// <--
// not insert: set the redline mode read from settings.xml
@@ -395,10 +402,10 @@ ULONG SwReader::Read( const Reader& rOptions )
pDoc->SetModified();
}
- po->SetReadUTF8( FALSE );
- po->SetBlockMode( FALSE );
- po->SetOrganizerMode( FALSE );
- po->SetIgnoreHTMLComments( FALSE );
+ po->SetReadUTF8( sal_False );
+ po->SetBlockMode( sal_False );
+ po->SetOrganizerMode( sal_False );
+ po->SetIgnoreHTMLComments( sal_False );
return nError;
}
@@ -459,7 +466,7 @@ SwDoc* Reader::GetTemplateDoc()
if( !bHasAskTemplateName )
{
SetTemplateName( GetTemplateName() );
- bHasAskTemplateName = TRUE;
+ bHasAskTemplateName = sal_True;
}
if( !aTemplateNm.Len() )
@@ -470,7 +477,7 @@ SwDoc* Reader::GetTemplateDoc()
String aFileName = aTDir.GetMainURL( INetURLObject::NO_DECODE );
DBG_ASSERT( !aTDir.HasError(), "No absolute path for template name!" );
DateTime aCurrDateTime;
- BOOL bLoad = FALSE;
+ sal_Bool bLoad = sal_False;
// Wenn das Template schon mal geladen wurde, nur einmal pro
// Minute nachschauen, ob es geaendert wurde.
@@ -483,7 +490,7 @@ SwDoc* Reader::GetTemplateDoc()
&aTstDate, &aTstTime ) &&
( !pTemplate || aDStamp != aTstDate || aTStamp != aTstTime ))
{
- bLoad = TRUE;
+ bLoad = sal_True;
aDStamp = aTstDate;
aTStamp = aTstTime;
}
@@ -508,20 +515,21 @@ SwDoc* Reader::GetTemplateDoc()
{
SwDocShell *pDocSh =
new SwDocShell ( SFX_CREATE_MODE_INTERNAL );
- SfxObjectShellRef xDocSh = pDocSh;
+ SfxObjectShellLock xDocSh = pDocSh;
if( pDocSh->DoInitNew( 0 ) )
{
pTemplate = pDocSh->GetDoc();
pTemplate->SetOle2Link( Link() );
- pTemplate->DoUndo( FALSE ); // always FALSE
+ // always FALSE
+ pTemplate->GetIDocumentUndoRedo().DoUndo( false );
pTemplate->set(IDocumentSettingAccess::BROWSE_MODE, bTmplBrowseMode );
pTemplate->RemoveAllFmtLanguageDependencies();
- ReadXML->SetOrganizerMode( TRUE );
- SfxMedium aMedium( aFileName, FALSE );
+ ReadXML->SetOrganizerMode( sal_True );
+ SfxMedium aMedium( aFileName, sal_False );
SwReader aRdr( aMedium, aEmptyStr, pTemplate );
aRdr.Read( *ReadXML );
- ReadXML->SetOrganizerMode( FALSE );
+ ReadXML->SetOrganizerMode( sal_False );
pTemplate->acquire();
}
@@ -536,9 +544,9 @@ SwDoc* Reader::GetTemplateDoc()
return pTemplate;
}
-BOOL Reader::SetTemplate( SwDoc& rDoc )
+sal_Bool Reader::SetTemplate( SwDoc& rDoc )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
GetTemplateDoc();
if( pTemplate )
@@ -546,7 +554,7 @@ BOOL Reader::SetTemplate( SwDoc& rDoc )
rDoc.RemoveAllFmtLanguageDependencies();
rDoc.ReplaceStyles( *pTemplate );
rDoc.SetFixFields(false, NULL);
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -594,7 +602,7 @@ int Reader::SetStrmStgPtr()
if( SW_STORAGE_READER & GetReaderType() )
{
xStg = pMedium->GetStorage();
- return TRUE;
+ return sal_True;
}
}
else
@@ -608,12 +616,12 @@ int Reader::SetStrmStgPtr()
else if ( !(SW_STREAM_READER & GetReaderType()) )
{
pStrm = NULL;
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -644,9 +652,9 @@ void Reader::ResetFrmFmtAttrs( SfxItemSet &rFrmSet )
void Reader::ResetFrmFmts( SwDoc& rDoc )
{
- for (USHORT i=0; i<3; ++i)
+ for (sal_uInt16 i=0; i<3; ++i)
{
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
switch (i)
{
default:
@@ -673,51 +681,51 @@ void Reader::ResetFrmFmts( SwDoc& rDoc )
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT Reader::GetSectionList( SfxMedium&, SvStrings& ) const
+sal_uInt16 Reader::GetSectionList( SfxMedium&, SvStrings& ) const
{
return 0;
}
// ------------------------------------------------
-BOOL SwReader::HasGlossaries( const Reader& rOptions )
+sal_Bool SwReader::HasGlossaries( const Reader& rOptions )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->HasGlossaries();
return bRet;
}
-BOOL SwReader::ReadGlossaries( const Reader& rOptions,
- SwTextBlocks& rBlocks, BOOL bSaveRelFiles )
+sal_Bool SwReader::ReadGlossaries( const Reader& rOptions,
+ SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles )
{
// Variable uebertragen
Reader* po = (Reader*) &rOptions;
po->pStrm = pStrm;
po->pStg = pStg;
- po->bInsertMode = FALSE;
+ po->bInsertMode = sal_False;
// ist ein Medium angegeben, dann aus diesem die Streams besorgen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( !( 0 != (po->pMedium = pMedium ) && !po->SetStrmStgPtr() ))
bRet = po->ReadGlossaries( rBlocks, bSaveRelFiles );
return bRet;
}
-BOOL Reader::HasGlossaries() const
+sal_Bool Reader::HasGlossaries() const
{
- return FALSE;
+ return sal_False;
}
-BOOL Reader::ReadGlossaries( SwTextBlocks&, BOOL ) const
+sal_Bool Reader::ReadGlossaries( SwTextBlocks&, sal_Bool ) const
{
- return FALSE;
+ return sal_False;
}
// ------------------------------------------------
@@ -738,7 +746,7 @@ int StgReader::GetReaderType()
* Konstruktoren, Destruktoren sind inline (inc/shellio.hxx).
*/
-SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -750,7 +758,7 @@ SwWriter::SwWriter(SvStream& rStrm,SwDoc &rDocument)
{
}
-SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, BOOL bInWriteAll)
+SwWriter::SwWriter(SvStream& rStrm, SwPaM& rPam, sal_Bool bInWriteAll)
: pStrm(&rStrm), pMedium(0), pOutPam(&rPam), pShell(0),
rDoc(*rPam.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -761,7 +769,7 @@ SwWriter::SwWriter( const uno::Reference < embed::XStorage >& rStg, SwDoc &rDocu
{
}
-SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, BOOL bInWriteAll)
+SwWriter::SwWriter(SfxMedium& rMedium, SwCrsrShell &rShell, sal_Bool bInWriteAll)
: pStrm(0), pMedium(&rMedium), pOutPam(0), pShell(&rShell),
rDoc(*rShell.GetDoc()), bWriteAll(bInWriteAll)
{
@@ -773,24 +781,21 @@ SwWriter::SwWriter(SfxMedium& rMedium, SwDoc &rDocument)
{
}
-ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
+sal_uLong SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
{
// #i73788#
SwPauseThreadStarting aPauseThreadStarting;
- BOOL bHasMark = FALSE;
+ sal_Bool bHasMark = sal_False;
SwPaM * pPam;
SwDoc *pDoc = 0;
- SfxObjectShellRef* pRefForDocSh = 0;
if ( pShell && !bWriteAll && pShell->IsTableMode() )
{
- bWriteAll = TRUE;
+ bWriteAll = sal_True;
pDoc = new SwDoc;
pDoc->acquire();
- pRefForDocSh = new SfxObjectShellRef();
- pDoc->SetRefForDocShell( pRefForDocSh );
// kopiere Teile aus einer Tabelle: lege eine Tabelle mit der Breite
// von der Originalen an und kopiere die selectierten Boxen.
@@ -817,7 +822,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
SwPaM *pEnd = pPam;
// Erste Runde: Nachsehen, ob eine Selektion besteht.
- while(TRUE)
+ while(sal_True)
{
bHasMark = bHasMark || pPam->HasMark();
pPam = (SwPaM *) pPam->GetNext();
@@ -831,9 +836,9 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if( pShell )
{
pShell->Push();
- pShell->SttEndDoc(TRUE);
+ pShell->SttEndDoc(sal_True);
pShell->SetMark();
- pShell->SttEndDoc(FALSE);
+ pShell->SttEndDoc(sal_False);
}
else
{
@@ -890,19 +895,19 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
}
}
- BOOL bLockedView(FALSE);
+ sal_Bool bLockedView(sal_False);
SwEditShell* pESh = pOutDoc->GetEditShell();
if( pESh )
{
bLockedView = pESh->IsViewLocked();
- pESh->LockView( TRUE ); //lock visible section
+ pESh->LockView( sal_True ); //lock visible section
pESh->StartAllAction();
}
- BOOL bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
+ sal_Bool bWasPurgeOle = pOutDoc->get(IDocumentSettingAccess::PURGE_OLE);
pOutDoc->set(IDocumentSettingAccess::PURGE_OLE, false);
- ULONG nError = 0;
+ sal_uLong nError = 0;
if( pMedium )
nError = rxWriter->Write( *pPam, *pMedium, pRealFileName );
else if( pStg )
@@ -927,7 +932,7 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if(!bHasMark)
{
if( pShell )
- pShell->Pop( FALSE );
+ pShell->Pop( sal_False );
else
delete pPam;
}
@@ -946,10 +951,9 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
if ( pDoc )
{
- delete pRefForDocSh;
if ( !pDoc->release() )
delete pDoc;
- bWriteAll = FALSE;
+ bWriteAll = sal_False;
}
return nError;
@@ -961,13 +965,13 @@ ULONG SwWriter::Write( WriterRef& rxWriter, const String* pRealFileName )
// ----------------------------------------------------------------------
-BOOL SetHTMLTemplate( SwDoc & rDoc )
+sal_Bool SetHTMLTemplate( SwDoc & rDoc )
{
// Vorlagennamen von den Sfx-HTML-Filter besorgen!!!
if( !ReadHTML->GetTemplateDoc() )
ReadHTML->MakeHTMLDummyTemplateDoc();
- BOOL bRet = ReadHTML->SetTemplate( rDoc );
+ sal_Bool bRet = ReadHTML->SetTemplate( rDoc );
SwNodes& rNds = rDoc.GetNodes();
SwNodeIndex aIdx( rNds.GetEndOfExtras(), 1 );
diff --git a/sw/source/filter/html/SwAppletImpl.cxx b/sw/source/filter/html/SwAppletImpl.cxx
index 3c10b4c30aa9..5891531d53c1 100644
--- a/sw/source/filter/html/SwAppletImpl.cxx
+++ b/sw/source/filter/html/SwAppletImpl.cxx
@@ -49,9 +49,9 @@ static char const sHTML_O_Object[] = "OBJECT";
}
-USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
+sal_uInt16 SwApplet_Impl::GetOptionType( const String& rName, sal_Bool bApplet )
{
- USHORT nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
+ sal_uInt16 nType = bApplet ? SWHTML_OPTTYPE_PARAM : SWHTML_OPTTYPE_TAG;
switch( rName.GetChar(0) )
{
@@ -125,13 +125,13 @@ USHORT SwApplet_Impl::GetOptionType( const String& rName, BOOL bApplet )
return nType;
}
-SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, USHORT nWhich1, USHORT nWhich2 ) :
+SwApplet_Impl::SwApplet_Impl( SfxItemPool& rPool, sal_uInt16 nWhich1, sal_uInt16 nWhich2 ) :
aItemSet( rPool, nWhich1, nWhich2 )
{
}
void SwApplet_Impl::CreateApplet( const String& rCode, const String& rName,
- BOOL bMayScript, const String& rCodeBase,
+ sal_Bool bMayScript, const String& rCodeBase,
const String& rDocumentBaseURL )
{
comphelper::EmbeddedObjectContainer aCnt;
diff --git a/sw/source/filter/html/css1atr.cxx b/sw/source/filter/html/css1atr.cxx
index 82678f47ed3b..c6bcc0cb50f1 100644
--- a/sw/source/filter/html/css1atr.cxx
+++ b/sw/source/filter/html/css1atr.cxx
@@ -151,10 +151,10 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate );
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rFmt,
IDocumentStylePoolAccess /*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo=TRUE );
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo=sal_True );
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote );
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote );
static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
const SwFmtDrop& rDrop,
const SfxItemSet *pCharFmtItemSet=0 );
@@ -172,24 +172,24 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SvxLRSpaceItem *pLRSpace );
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName );
+ sal_uInt16 nMode, const String *pGrfName );
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt );
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode );
+ sal_uInt16 nMode );
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep );
+ sal_Bool bDeep );
static Writer& OutCSS1_SwFmtLayoutSplit( Writer& rWrt, const SfxPoolItem& rHt );
-static void ConvToHex( USHORT nHex, ByteString& rStr )
+static void ConvToHex( sal_uInt16 nHex, ByteString& rStr )
{
sal_Char aNToABuf[] = "00";
// Pointer an das Bufferende setzen
sal_Char *pStr = aNToABuf + (sizeof(aNToABuf)-1);
- for( BYTE n = 0; n < 2; ++n )
+ for( sal_uInt8 n = 0; n < 2; ++n )
{
*(--pStr) = (sal_Char)(nHex & 0xf ) + 48;
if( *pStr > '9' )
@@ -212,18 +212,18 @@ static void GetCSS1Color( const Color& rColor, ByteString& rStr )
class SwCSS1OutMode
{
SwHTMLWriter& rWrt;
- USHORT nOldMode;
+ sal_uInt16 nOldMode;
public:
- SwCSS1OutMode( SwHTMLWriter& rHWrt, USHORT nMode, BOOL bStartFirst=TRUE,
+ SwCSS1OutMode( SwHTMLWriter& rHWrt, sal_uInt16 nMode, sal_Bool bStartFirst=sal_True,
const String *pSelector=0 ) :
rWrt( rHWrt ),
nOldMode( rHWrt.nCSS1OutMode )
{
rWrt.nCSS1OutMode = nMode;
if( bStartFirst )
- rWrt.bFirstCSS1Property = TRUE;
+ rWrt.bFirstCSS1Property = sal_True;
if( pSelector )
rWrt.aCSS1Selector = *pSelector;
}
@@ -244,7 +244,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
if( bFirstCSS1Rule && (nCSS1OutMode & CSS1_OUTMODE_RULE_ON)!=0 )
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
OutNewLine();
((((sOut += '<') += OOO_STRING_SVTOOLS_HTML_style) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += "=\"text/css\">";
Strm() << sOut.GetBuffer();
@@ -267,7 +267,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
}
else
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
return;
}
break;
@@ -284,7 +284,7 @@ void SwHTMLWriter::OutCSS1_Property( const sal_Char *pProp,
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_style) += "=\"";
break;
}
- bFirstCSS1Property = FALSE;
+ bFirstCSS1Property = sal_False;
}
else
{
@@ -392,7 +392,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
}
long nLongVal = 0;
- BOOL bOutLongVal = TRUE;
+ sal_Bool bOutLongVal = sal_True;
if( nVal > LONG_MAX / nMul )
{
// Zum Unrechnen der Einheit wird ein BigInt benoetigt
@@ -423,7 +423,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
rOut += (int)((nBigVal / nBigFac) % nBig10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#else
sal_Int64 nBigVal( nVal );
@@ -450,7 +450,7 @@ static void AddUnitPropertyValue( long nVal, FieldUnit eUnit, ByteString& rOut )
(nBigVal / (sal_Int64)nFac) % (sal_Int64)10 );
}
}
- bOutLongVal = FALSE;
+ bOutLongVal = sal_False;
}
#endif
}
@@ -487,7 +487,7 @@ void SwHTMLWriter::OutCSS1_UnitProperty( const sal_Char *pProp, long nVal )
}
void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
- BOOL bVert )
+ sal_Bool bVert )
{
if( nVal && Application::GetDefaultDevice() )
{
@@ -504,7 +504,7 @@ void SwHTMLWriter::OutCSS1_PixelProperty( const sal_Char *pProp, long nVal,
}
void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
// den ItemSet ausgeben, und zwar inklusive aller Attribute
Out_SfxItemSet( aCSS1AttrFnTab, *this, rItemSet, bDeep );
@@ -565,16 +565,16 @@ void SwHTMLWriter::OutCSS1_SfxItemSet( const SfxItemSet& rItemSet,
}
}
-void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
+void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, sal_Bool bUsed )
{
- bFirstCSS1Rule = TRUE;
+ bFirstCSS1Rule = sal_True;
// Feature: PrintExt
if( IsHTMLMode(HTMLMODE_PRINT_EXT) )
{
const SwPageDesc *pFirstPageDesc = 0;
- USHORT nFirstRefPoolId = RES_POOLPAGE_HTML;
- bCSS1IgnoreFirstPageDesc = TRUE;
+ sal_uInt16 nFirstRefPoolId = RES_POOLPAGE_HTML;
+ bCSS1IgnoreFirstPageDesc = sal_True;
// Erstmal versuchen wir zu erraten, wie das Dokument so augebaut ist.
// Erlaubt sind nur die Vorlagen HTML, erste Seite, linke Seite und
@@ -605,7 +605,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// Die Attributierung wird relativ zur HTML-Seitenvorlage
// aus der HTML-Vorlage exportiert.
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE, FALSE );
+ RES_POOLPAGE_HTML, sal_True, sal_False );
nFirstRefPoolId = pFollow->GetPoolFmtId();
}
else if( (RES_POOLPAGE_LEFT == pPageDesc->GetPoolFmtId() &&
@@ -615,17 +615,17 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
{
// Das Dokument ist zweiseitig
OutCSS1_SwPageDesc( *this, *pPageDesc, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
OutCSS1_SwPageDesc( *this, *pFollow, pStylePoolAccess, pTemplate,
- RES_POOLPAGE_HTML, TRUE );
+ RES_POOLPAGE_HTML, sal_True );
nFirstRefPoolId = RES_POOLPAGE_RIGHT;
- bCSS1IgnoreFirstPageDesc = FALSE;
+ bCSS1IgnoreFirstPageDesc = sal_False;
}
// Alles andere bekommen wir nicht hin.
if( pFirstPageDesc )
OutCSS1_SwPageDesc( *this, *pFirstPageDesc, pStylePoolAccess, pTemplate,
- nFirstRefPoolId, FALSE );
+ nFirstRefPoolId, sal_False );
}
// /Feature: PrintExt
@@ -637,13 +637,13 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// das Default-TextStyle wir nicht mit ausgegeben !!
// das 0-Style ist das Default, wird nie ausgegeben !!
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- USHORT i;
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 i;
for( i = 1; i < nArrLen; i++ )
{
const SwTxtFmtColl* pColl = (*pDoc->GetTxtFmtColls())[i];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCOLL_TEXT ||
pDoc->IsUsed( *pColl ) )
OutCSS1_SwFmt( *this, *pColl, pDoc, pTemplate );
@@ -654,7 +654,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
for( i=1; i<nArrLen; i++ )
{
const SwCharFmt *pCFmt = (*pDoc->GetCharFmts())[i];
- USHORT nPoolId = pCFmt->GetPoolFmtId();
+ sal_uInt16 nPoolId = pCFmt->GetPoolFmtId();
if( !bUsed || nPoolId == RES_POOLCHR_INET_NORMAL ||
nPoolId == RES_POOLCHR_INET_VISIT ||
pDoc->IsUsed( *pCFmt ) )
@@ -663,7 +663,7 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
const SwFtnIdxs& rIdxs = pDoc->GetFtnIdxs();
nArrLen = rIdxs.Count();
- USHORT nEnd = 0, nFtn = 0;
+ sal_uInt16 nEnd = 0, nFtn = 0;
for( i=0; i < nArrLen; i++ )
{
if( rIdxs[i]->GetFtn().IsEndNote() )
@@ -671,8 +671,8 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
else
nFtn++;
}
- OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, FALSE );
- OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, TRUE );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetFtnInfo(), pDoc, nFtn, sal_False );
+ OutCSS1_SwFtnInfo( *this, pDoc->GetEndNoteInfo(), pDoc, nEnd, sal_True );
if( !bFirstCSS1Rule )
{
@@ -681,11 +681,11 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
Strm() << "-->";
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_style, sal_False );
}
else
{
- bFirstCSS1Rule = FALSE;
+ bFirstCSS1Rule = sal_False;
}
nDfltTopMargin = 0;
@@ -696,25 +696,25 @@ void SwHTMLWriter::OutStyleSheet( const SwPageDesc& rPageDesc, BOOL bUsed )
// wenn pPseudo gesetzt ist werden Styles-Sheets ausgegeben,
// sonst wird nur nach Token und Class fuer ein Format gesucht
-USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
- String& rClass, USHORT& rRefPoolId,
+sal_uInt16 SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
+ String& rClass, sal_uInt16& rRefPoolId,
String *pPseudo )
{
- USHORT nDeep = 0;
+ sal_uInt16 nDeep = 0;
rToken.Erase(); rClass.Erase();
rRefPoolId = 0;
if( pPseudo )
pPseudo->Erase();
- BOOL bChrFmt = RES_CHRFMT==pFmt->Which();
+ sal_Bool bChrFmt = RES_CHRFMT==pFmt->Which();
// Nach oben die Formate abklappern, bis man auf eine Standard-
// oder eine HTML-Tag-Vorlage trifft
const SwFmt *pPFmt = pFmt;
while( pPFmt && !pPFmt->IsDefault() )
{
- BOOL bStop = FALSE;
- USHORT nPoolId = pPFmt->GetPoolFmtId();
+ sal_Bool bStop = sal_False;
+ sal_uInt16 nPoolId = pPFmt->GetPoolFmtId();
if( USER_FMT & nPoolId )
{
// Benutzer-Vorlagen
@@ -756,7 +756,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
}
else if( !bChrFmt )
{
- USHORT nDefListLvl = GetDefListLvl( rNm, nPoolId );
+ sal_uInt16 nDefListLvl = GetDefListLvl( rNm, nPoolId );
// Die Vorlagen DD 1/DT 1 werden ausgegeben,
// aber keine von ihnen abgeleiteten Vorlagen,
// auch nicht DD 2/DT 2 etc.
@@ -765,7 +765,7 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
if( pPseudo &&
(nDeep || (nDefListLvl & 0x0fff) > 1) )
{
- bStop = TRUE;
+ bStop = sal_True;
}
else if( nDefListLvl & HTML_DLCOLL_DD )
{
@@ -1045,14 +1045,14 @@ USHORT SwHTMLWriter::GetCSS1Selector( const SwFmt *pFmt, ByteString& rToken,
return nDeep;
}
-static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
- USHORT& rRefPoolId )
+static sal_uInt16 GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
+ sal_uInt16& rRefPoolId )
{
ByteString aToken;
String aClass;
String aPseudo;
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
rRefPoolId, &aPseudo );
if( nDeep )
{
@@ -1070,7 +1070,7 @@ static USHORT GetCSS1Selector( const SwFmt *pFmt, String& rSelector,
return nDeep;
}
-const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
+const SwFmt *SwHTMLWriter::GetTemplateFmt( sal_uInt16 nPoolFmtId,
IDocumentStylePoolAccess* pTemplate /*SwDoc *pTemplate*/)
{
const SwFmt *pRefFmt = 0;
@@ -1088,7 +1088,7 @@ const SwFmt *SwHTMLWriter::GetTemplateFmt( USHORT nPoolFmtId,
return pRefFmt;
}
-const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
+const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, sal_uInt16 nDeep )
{
OSL_ENSURE( nDeep != USHRT_MAX, "GetParent fuer HTML-Vorlage aufgerufen!" );
const SwFmt *pRefFmt = 0;
@@ -1098,7 +1098,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
// hier wird die HTML-Tag-Vorlage, von der die Vorlage abgeleitet
// ist als Referenz geholt
pRefFmt = &rFmt;
- for( USHORT i=nDeep; i>0; i-- )
+ for( sal_uInt16 i=nDeep; i>0; i-- )
pRefFmt = pRefFmt->DerivedFrom();
if( pRefFmt && pRefFmt->IsDefault() )
@@ -1108,7 +1108,7 @@ const SwFmt *SwHTMLWriter::GetParentFmt( const SwFmt& rFmt, USHORT nDeep )
return pRefFmt;
}
-BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
+sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
{
return ((const SvxFontItem &)r1).GetFamilyName() ==
((const SvxFontItem &)r2).GetFamilyName() &&
@@ -1118,8 +1118,8 @@ BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 )
void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
const SfxItemSet& rRefItemSet,
- BOOL bSetDefaults,
- BOOL bClearSame,
+ sal_Bool bSetDefaults,
+ sal_Bool bClearSame,
const SfxItemSet *pRefScriptItemSet )
{
OSL_ENSURE( bSetDefaults || bClearSame,
@@ -1129,13 +1129,13 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
// und mit dem Attr-Set der Vorlage vergleichen
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pRefItem, *pItem;
- BOOL bItemSet = ( SFX_ITEM_SET ==
- rItemSet.GetItemState( nWhich, FALSE, &pItem) );
- BOOL bRefItemSet;
+ sal_Bool bItemSet = ( SFX_ITEM_SET ==
+ rItemSet.GetItemState( nWhich, sal_False, &pItem) );
+ sal_Bool bRefItemSet;
if( pRefScriptItemSet )
{
@@ -1157,18 +1157,18 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
case RES_CHRATR_CTL_POSTURE:
case RES_CHRATR_CTL_WEIGHT:
bRefItemSet = ( SFX_ITEM_SET ==
- pRefScriptItemSet->GetItemState( nWhich, TRUE, &pRefItem) );
+ pRefScriptItemSet->GetItemState( nWhich, sal_True, &pRefItem) );
break;
default:
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
break;
}
}
else
{
bRefItemSet = ( SFX_ITEM_SET ==
- aRefItemSet.GetItemState( nWhich, FALSE, &pRefItem) );
+ aRefItemSet.GetItemState( nWhich, sal_False, &pRefItem) );
}
if( bItemSet )
@@ -1201,11 +1201,11 @@ void SwHTMLWriter::SubtractItemSet( SfxItemSet& rItemSet,
void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
String& rNames,
- sal_Unicode cQuote, BOOL bGeneric )
+ sal_Unicode cQuote, sal_Bool bGeneric )
{
rNames = aEmptyStr;
const String& rName = rFontItem.GetFamilyName();
- BOOL bContainsKeyword = FALSE;
+ sal_Bool bContainsKeyword = sal_False;
if( rName.Len() )
{
xub_StrLen nStrPos = 0;
@@ -1216,7 +1216,7 @@ void SwHTMLWriter::PrepareFontList( const SvxFontItem& rFontItem,
if( !aName.Len() )
continue;
- BOOL bIsKeyword = FALSE;
+ sal_Bool bIsKeyword = sal_False;
switch( aName.GetChar( 0 ) )
{
case 'c':
@@ -1395,8 +1395,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
SfxItemSet aScriptItemSet( *rItemSet.GetPool(),
@@ -1412,8 +1412,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1421,8 +1421,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1430,8 +1430,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( aScriptItemSet, sal_False );
}
}
else
@@ -1444,8 +1444,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1453,8 +1453,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
aNewSelector = aSelector;
@@ -1462,8 +1462,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aNewSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &aNewSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
}
}
@@ -1475,8 +1475,8 @@ static sal_Bool OutCSS1Rule( SwHTMLWriter& rHTMLWrt, const String& rSelector,
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &rSelector );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ sal_True, &rSelector );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
}
return bScriptDependent;
@@ -1508,7 +1508,7 @@ static void OutCSS1DropCapRule(
// some class rule for the additional style dependen properties
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_NO_SCRIPT|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1526,7 +1526,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1535,7 +1535,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
@@ -1544,7 +1544,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop, &aScriptItemSet );
}
}
@@ -1558,7 +1558,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_WESTERN|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1567,7 +1567,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CJK|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
@@ -1576,7 +1576,7 @@ static void OutCSS1DropCapRule(
aNewSelector.Append( aPseudo );
{
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_CTL|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &aNewSelector );
+ sal_True, &aNewSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1589,7 +1589,7 @@ static void OutCSS1DropCapRule(
// script dependencies by now.
SwCSS1OutMode aMode( rHTMLWrt,
rHTMLWrt.nCSS1Script|CSS1_OUTMODE_RULE|CSS1_OUTMODE_DROPCAP,
- TRUE, &rSelector );
+ sal_True, &rSelector );
OutCSS1_SwFmtDropAttrs( rHTMLWrt, rDrop );
}
}
@@ -1599,11 +1599,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bCharFmt = FALSE;
+ sal_Bool bCharFmt = sal_False;
switch( rFmt.Which() )
{
case RES_CHRFMT:
- bCharFmt = TRUE;
+ bCharFmt = sal_True;
break;
case RES_TXTFMTCOLL:
@@ -1618,12 +1618,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// den Selector und die auszugebende Attr-Set-Tiefe ermitteln
String aSelector;
- USHORT nRefPoolId = 0;
- USHORT nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
+ sal_uInt16 nRefPoolId = 0;
+ sal_uInt16 nDeep = GetCSS1Selector( &rFmt, aSelector, nRefPoolId );
if( !nDeep )
return rWrt; // von keiner HTML-Vorlage abgeleitet
- USHORT nPoolFmtId = rFmt.GetPoolFmtId();
+ sal_uInt16 nPoolFmtId = rFmt.GetPoolFmtId();
// Den auszugebenden Attr-Set bestimmen. Hier muessen 3 Faelle
// unterschieden werden:
@@ -1645,11 +1645,11 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// (ausser fuer nDeep==1)
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE ); // Was nDeep!=1 that is not working
+ aItemSet.Set( rFmtItemSet, sal_True ); // Was nDeep!=1 that is not working
// for script dependent items buts should
// not make a deifference for any other
- BOOL bSetDefaults = TRUE, bClearSame = TRUE;
+ sal_Bool bSetDefaults = sal_True, bClearSame = sal_True;
const SwFmt *pRefFmt = 0;
const SwFmt *pRefFmtScript = 0;
switch( nDeep )
@@ -1660,12 +1660,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
case CSS1_FMT_CMPREF:
pRefFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pDoc );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bClearSame = FALSE;
+ bClearSame = sal_False;
break;
default:
pRefFmt = SwHTMLWriter::GetParentFmt( rFmt, nDeep );
pRefFmtScript = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
- bSetDefaults = FALSE;
+ bSetDefaults = sal_False;
break;
}
@@ -1767,12 +1767,12 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
if( nPoolFmtId==RES_POOLCOLL_TEXT && !rHTMLWrt.bFirstCSS1Property )
- rHTMLWrt.bPoolCollTextModified = TRUE;
+ rHTMLWrt.bPoolCollTextModified = sal_True;
// Drop-Caps ausgeben
const SfxPoolItem *pItem;
if( rHTMLWrt.IsHTMLMode(HTMLMODE_DROPCAPS) &&
- SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, FALSE, &pItem ))
+ SFX_ITEM_SET==aItemSet.GetItemState( RES_PARATR_DROP, sal_False, &pItem ))
{
String sOut( aSelector );
sOut.Append( ':');
@@ -1786,8 +1786,8 @@ static Writer& OutCSS1_SwFmt( Writer& rWrt, const SwFmt& rFmt,
static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
IDocumentStylePoolAccess/*SwDoc*/ *pDoc, SwDoc *pTemplate,
- USHORT nRefPoolId, BOOL bExtRef,
- BOOL bPseudo )
+ sal_uInt16 nRefPoolId, sal_Bool bExtRef,
+ sal_Bool bPseudo )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1817,12 +1817,12 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE_ON|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
// Die Groesse: Wenn sie sich nur durch das Landscape-Flag unterscheidet,
// wird nur Portrait oder Landscape exportiert. Sonst wird die Groesse
// exportiert.
- BOOL bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : FALSE;
+ sal_Bool bRefLandscape = pRefPageDesc ? pRefPageDesc->GetLandscape() : sal_False;
Size aRefSz;
const Size& rSz = rPageDesc.GetMaster().GetFrmSize().GetSize();
if( pRefPageDesc )
@@ -1866,16 +1866,16 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
const SwFrmFmt &rMaster = rPageDesc.GetMaster();
SfxItemSet aItemSet( *rMaster.GetAttrSet().GetPool(),
RES_LR_SPACE, RES_UL_SPACE );
- aItemSet.Set( rMaster.GetAttrSet(), TRUE );
+ aItemSet.Set( rMaster.GetAttrSet(), sal_True );
if( pRefPageDesc )
{
SwHTMLWriter::SubtractItemSet( aItemSet,
pRefPageDesc->GetMaster().GetAttrSet(),
- TRUE );
+ sal_True );
}
- OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, FALSE );
+ OutCSS1_SvxULSpace_SvxLRSpace( rWrt, aItemSet, sal_False );
// Wenn fuer einen Pseudo-Selektor keine Property ausgegeben wurde, muessen
// wir trotzdem etwas ausgeben, damit beim Import die entsprechende
@@ -1885,7 +1885,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
rHTMLWrt.OutNewLine();
ByteString sTmp( aSelector, rHTMLWrt.eDestEnc );
rWrt.Strm() << sTmp.GetBuffer() << " {";
- rHTMLWrt.bFirstCSS1Property = FALSE;
+ rHTMLWrt.bFirstCSS1Property = sal_False;
}
if( !rHTMLWrt.bFirstCSS1Property )
@@ -1895,7 +1895,7 @@ static Writer& OutCSS1_SwPageDesc( Writer& rWrt, const SwPageDesc& rPageDesc,
}
static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
- SwDoc *pDoc, USHORT nNotes, BOOL bEndNote )
+ SwDoc *pDoc, sal_uInt16 nNotes, sal_Bool bEndNote )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1908,7 +1908,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
aSelector.AppendAscii( bEndNote ? OOO_STRING_SVTOOLS_HTML_sdendnote_anc
: OOO_STRING_SVTOOLS_HTML_sdfootnote_anc );
SwCSS1OutMode aMode( rHTMLWrt, CSS1_OUTMODE_RULE|CSS1_OUTMODE_TEMPLATE,
- TRUE, &aSelector );
+ sal_True, &aSelector );
rHTMLWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size,
sHTML_FTN_fontheight );
rHTMLWrt.Strm() << sCSS1_rule_end;
@@ -1919,7 +1919,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
{
const SfxItemSet& rFmtItemSet = pSymCharFmt->GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), rFmtItemSet.GetRanges() );
- aItemSet.Set( rFmtItemSet, TRUE );
+ aItemSet.Set( rFmtItemSet, sal_True );
// Wenn es Fuss- bzw. Endnoten gibt, dann muessen alles Attribute
// ausgegeben werden, damit Netscape das Dokument richtig anzeigt.
@@ -1931,7 +1931,7 @@ static Writer& OutCSS1_SwFtnInfo( Writer& rWrt, const SwEndNoteInfo& rInfo,
static_cast< sal_uInt16 >(bEndNote ? RES_POOLCHR_ENDNOTE : RES_POOLCHR_FOOTNOTE) );
if( pRefFmt )
SwHTMLWriter::SubtractItemSet( aItemSet, pRefFmt->GetAttrSet(),
- TRUE );
+ sal_True );
}
if( aItemSet.Count() )
{
@@ -1961,14 +1961,14 @@ Writer& OutCSS1_BodyTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet,
// Export der Absatz-Vorlagen beruecksichtigt.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
OutCSS1_SvxBrush( rWrt, *pItem, CSS1_BACKGROUND_PAGE,
&aEmbBGGrfName );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_False,
&pItem ))
{
OutCSS1_SvxBox( rWrt, *pItem );
@@ -1990,7 +1990,7 @@ Writer& OutCSS1_ParaTagStyleOpt( Writer& rWrt, const SfxItemSet& rItemSet )
SwCSS1OutMode aMode( rHTMLWrt, rHTMLWrt.nCSS1Script|CSS1_OUTMODE_STYLE_OPT |
CSS1_OUTMODE_ENCODE|CSS1_OUTMODE_PARA );
- rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, FALSE );
+ rHTMLWrt.OutCSS1_SfxItemSet( rItemSet, sal_False );
return rWrt;
}
@@ -2044,7 +2044,7 @@ Writer& OutCSS1_TableBGStyleOpt( Writer& rWrt, const SfxPoolItem& rHt )
Writer& OutCSS1_NumBulListStyleOpt( Writer& rWrt, const SwNumRule& rNumRule,
- BYTE nLevel )
+ sal_uInt8 nLevel )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -2128,7 +2128,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
// top
long nXPos=0, nYPos=0;
- BOOL bOutXPos = FALSE, bOutYPos = FALSE;
+ sal_Bool bOutXPos = sal_False, bOutYPos = sal_False;
if( RES_DRAWFRMFMT == rFrmFmt.Which() )
{
OSL_ENSURE( pSdrObj, "Kein SdrObject uebergeben. Ineffizient" );
@@ -2141,7 +2141,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos = aPos.A();
nYPos = aPos.B();
}
- bOutXPos = bOutYPos = TRUE;
+ bOutXPos = bOutYPos = sal_True;
}
else
{
@@ -2162,7 +2162,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nYPos -= aULItem.GetUpper();
if( nYPos < 0 )
{
- aULItem.SetUpper( (USHORT)(aULItem.GetUpper() + nYPos) );
+ aULItem.SetUpper( (sal_uInt16)(aULItem.GetUpper() + nYPos) );
nYPos = 0;
}
}
@@ -2178,7 +2178,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
nXPos -= aLRItem.GetLeft();
if( nXPos < 0 )
{
- aLRItem.SetLeft( (USHORT)(aLRItem.GetLeft() + nXPos) );
+ aLRItem.SetLeft( (sal_uInt16)(aLRItem.GetLeft() + nXPos) );
nXPos = 0;
}
}
@@ -2209,7 +2209,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_width, aTwipSz.Width(),
- FALSE );
+ sal_False );
else
OutCSS1_UnitProperty( sCSS1_P_width, aTwipSz.Width() );
}
@@ -2217,7 +2217,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
if( nFrmOpts & HTML_FRMOPT_S_PIXSIZE )
OutCSS1_PixelProperty( sCSS1_P_height, aTwipSz.Height(),
- TRUE );
+ sal_True );
else
OutCSS1_UnitProperty( sCSS1_P_height, aTwipSz.Height() );
}
@@ -2229,7 +2229,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
"Absolute Groesse wird exportiert" );
OSL_ENSURE( HTML_FRMOPT_ANYSIZE & nFrmOpts,
"Jede Groesse wird exportiert" );
- USHORT nMode = 0;
+ sal_uInt16 nMode = 0;
if( nFrmOpts & HTML_FRMOPT_S_WIDTH )
nMode |= CSS1_FRMSIZE_WIDTH;
if( nFrmOpts & HTML_FRMOPT_S_HEIGHT )
@@ -2248,9 +2248,9 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
{
const SvxLRSpaceItem *pLRItem = 0;
const SvxULSpaceItem *pULItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True ) )
pLRItem = &aLRItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True ) )
pULItem = &aULItem;
if( pLRItem || pULItem )
OutCSS1_SvxULSpace_SvxLRSpace( *this, pULItem, pLRItem );
@@ -2262,7 +2262,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
const SfxPoolItem* pItem;
if( nFrmOpts & HTML_FRMOPT_S_NOBORDER )
OutCSS1_SvxBox( *this, rFrmFmt.GetBox() );
- else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ else if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
OutCSS1_SvxBox( *this, *pItem );
}
@@ -2271,7 +2271,7 @@ void SwHTMLWriter::OutCSS1_FrmFmtOptions( const SwFrmFmt& rFrmFmt,
OutCSS1_FrmFmtBackground( rFrmFmt );
if( pItemSet )
- OutCSS1_SfxItemSet( *pItemSet, FALSE );
+ OutCSS1_SfxItemSet( *pItemSet, sal_False );
if( !bFirstCSS1Property )
Strm() << '\"';
@@ -2285,13 +2285,13 @@ void SwHTMLWriter::OutCSS1_TableFrmFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_TABLE, 0 );
if( IsHTMLMode( HTMLMODE_PRINT_EXT ) )
- OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, FALSE );
+ OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( *this, rItemSet, sal_False );
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_LAYOUT_SPLIT, sal_False, &pItem ) )
OutCSS1_SwFmtLayoutSplit( *this, *pItem );
if( !bFirstCSS1Property )
@@ -2306,17 +2306,17 @@ void SwHTMLWriter::OutCSS1_SectionFmtOptions( const SwFrmFmt& rFrmFmt )
const SfxPoolItem *pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
- if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
OutCSS1_SvxBrush( *this, *pItem, CSS1_BACKGROUND_SECTION, 0 );
if( !bFirstCSS1Property )
Strm() << '\"';
}
-static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
+static sal_Bool OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
const SvxBrushItem& rBrushItem )
{
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
/// output brush of frame format, if its background color is not "no fill"/"auto fill"
/// or it has a background graphic.
if( rBrushItem.GetColor() != COL_TRANSPARENT ||
@@ -2324,7 +2324,7 @@ static BOOL OutCSS1_FrmFmtBrush( SwHTMLWriter& rWrt,
0 != rBrushItem.GetGraphicPos() )
{
OutCSS1_SvxBrush( rWrt, rBrushItem, CSS1_BACKGROUND_FLY, 0 );
- bWritten = TRUE;
+ bWritten = sal_True;
}
return bWritten;
}
@@ -2431,7 +2431,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
const SvxBlinkItem *pBItem )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
- BOOL bNone = FALSE;
+ sal_Bool bNone = sal_False;
const sal_Char *pUStr = 0;
if( pUItem )
@@ -2439,7 +2439,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pUItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2462,7 +2462,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pOItem->GetLineStyle() )
{
case UNDERLINE_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case UNDERLINE_DONTKNOW:
break;
@@ -2485,7 +2485,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
switch( pCOItem->GetStrikeout() )
{
case STRIKEOUT_NONE:
- bNone = TRUE;
+ bNone = sal_True;
break;
case STRIKEOUT_DONTKNOW:
break;
@@ -2507,7 +2507,7 @@ static Writer& OutCSS1_SvxTxtLn_SvxCrOut_SvxBlink( Writer& rWrt,
{
if( !pBItem->GetValue() )
{
- bNone = TRUE;
+ bNone = sal_True;
}
else if( !rHTMLWrt.IsCSS1Source( CSS1_OUTMODE_PARA ) )
{
@@ -2637,10 +2637,10 @@ static Writer& OutCSS1_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
String sOut;
// MS IE3b1 hat mit einfachen Haekchen Probleme
- USHORT nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
+ sal_uInt16 nMode = rHTMLWrt.nCSS1OutMode & CSS1_OUTMODE_ANY_ON;
sal_Unicode cQuote = nMode == CSS1_OUTMODE_RULE_ON ? '\"' : '\'';
SwHTMLWriter::PrepareFontList( ((const SvxFontItem&)rHt), sOut, cQuote,
- TRUE );
+ sal_True );
rHTMLWrt.OutCSS1_Property( sCSS1_P_font_family, sOut );
@@ -2666,11 +2666,11 @@ static Writer& OutCSS1_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsCSS1Script( nScript ) )
return rWrt;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
if( rHTMLWrt.IsCSS1Source(CSS1_OUTMODE_HINT) )
{
// einen Hint nur dann ausgeben wenn es auch was bringt
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
if( rHTMLWrt.aFontHeights[nSize-1] == nHeight )
return rWrt;
}
@@ -2729,7 +2729,7 @@ static Writer& OutCSS1_SvxKerning( Writer& rWrt, const SfxPoolItem& rHt )
if( !rHTMLWrt.IsHTMLMode(HTMLMODE_FULL_STYLES) )
return rWrt;
- INT16 nValue = ((const SvxKerningItem&)rHt).GetValue();
+ sal_Int16 nValue = ((const SvxKerningItem&)rHt).GetValue();
if( nValue )
{
ByteString sOut;
@@ -2881,8 +2881,8 @@ static Writer& OutCSS1_SvxLineSpacing( Writer& rWrt, const SfxPoolItem& rHt )
const SvxLineSpacingItem& rLSItem = (const SvxLineSpacingItem&)rHt;
- USHORT nHeight = 0;
- USHORT nPrcHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt16 nPrcHeight = 0;
SvxLineSpace eLineSpace = rLSItem.GetLineSpaceRule();
switch( rLSItem.GetInterLineSpaceRule() )
{
@@ -3011,7 +3011,7 @@ static void OutCSS1_SwFmtDropAttrs( SwHTMLWriter& rHWrt,
rHWrt.OutCSS1_PropertyAscii( sCSS1_P_font_size, sOut );
// Abstand zum Text = rechter Rand
- USHORT nDistance = rDrop.GetDistance();
+ sal_uInt16 nDistance = rDrop.GetDistance();
if( nDistance > 0 )
rHWrt.OutCSS1_UnitProperty( sCSS1_P_margin_right, nDistance );
@@ -3044,14 +3044,14 @@ static Writer& OutCSS1_SwFmtDrop( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
}
static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode )
+ sal_uInt16 nMode )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3060,7 +3060,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_WIDTH )
{
- BYTE nPrcWidth = rFSItem.GetWidthPercent();
+ sal_uInt8 nPrcWidth = rFSItem.GetWidthPercent();
if( nPrcWidth )
{
(sOut = ByteString::CreateFromInt32( nPrcWidth) ) += '%';
@@ -3069,7 +3069,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
else if( nMode & CSS1_FRMSIZE_PIXEL )
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_width,
- rFSItem.GetSize().Width(), FALSE );
+ rFSItem.GetSize().Width(), sal_False );
}
else
{
@@ -3080,7 +3080,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( nMode & CSS1_FRMSIZE_ANYHEIGHT )
{
- BOOL bOutHeight = FALSE;
+ sal_Bool bOutHeight = sal_False;
switch( rFSItem.GetHeightSizeType() )
{
case ATT_FIX_SIZE:
@@ -3099,7 +3099,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
if( bOutHeight )
{
- BYTE nPrcHeight = rFSItem.GetHeightPercent();
+ sal_uInt8 nPrcHeight = rFSItem.GetHeightPercent();
if( nPrcHeight )
{
(sOut = ByteString::CreateFromInt32( nPrcHeight ) ) += '%';
@@ -3109,7 +3109,7 @@ static Writer& OutCSS1_SwFmtFrmSize( Writer& rWrt, const SfxPoolItem& rHt,
{
rHTMLWrt.OutCSS1_PixelProperty( sCSS1_P_height,
rFSItem.GetSize().Width(),
- TRUE );
+ sal_True );
}
else
{
@@ -3209,7 +3209,7 @@ static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
static Writer& OutCSS1_SvxULSpace_SvxLRSpace( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
const SvxULSpaceItem *pULSpace = 0;
const SvxLRSpaceItem *pLRSpace = 0;
@@ -3295,7 +3295,7 @@ static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
static Writer& OutCSS1_SvxFmtBreak_SwFmtPDesc_SvxFmtKeep( Writer& rWrt,
const SfxItemSet& rItemSet,
- BOOL bDeep )
+ sal_Bool bDeep )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SfxPoolItem *pItem;
@@ -3331,7 +3331,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt )
static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
- USHORT nMode, const String *pGrfName )
+ sal_uInt16 nMode, const String *pGrfName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3358,14 +3358,14 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
}
// Erstmal die Farbe holen
- BOOL bColor = FALSE;
- /// set <bTransparent> to TRUE, if color is "no fill"/"auto fill"
- BOOL bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
+ sal_Bool bColor = sal_False;
+ /// set <bTransparent> to sal_True, if color is "no fill"/"auto fill"
+ sal_Bool bTransparent = (rColor.GetColor() == COL_TRANSPARENT);
Color aColor;
if( !bTransparent )
{
aColor = rColor;
- bColor = TRUE;
+ bColor = sal_True;
}
// und jetzt eine Grafik
@@ -3381,7 +3381,7 @@ static Writer& OutCSS1_SvxBrush( Writer& rWrt, const SfxPoolItem& rHt,
const String* pTempFileName = rHTMLWrt.GetOrigFileName();
if( pTempFileName )
sGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, sGrfNm,
String::CreateFromAscii("JPG"),
XOUTBMP_USE_NATIVE_IF_POSSIBLE );
if( !nErr ) // fehlerhaft, da ist nichts auszugeben
@@ -3539,13 +3539,13 @@ static void OutCSS1_SvxBorderLine( SwHTMLWriter& rHTMLWrt,
return;
}
- BOOL bDouble = FALSE;
- INT32 nWidth = pLine->GetOutWidth();
+ sal_Bool bDouble = sal_False;
+ sal_Int32 nWidth = pLine->GetOutWidth();
if( pLine->GetInWidth() )
{
nWidth += pLine->GetDistance();
nWidth += pLine->GetInWidth();
- bDouble = TRUE;
+ bDouble = sal_True;
}
ByteString sOut;
diff --git a/sw/source/filter/html/htmlatr.cxx b/sw/source/filter/html/htmlatr.cxx
index 5aeee781d6ec..1747205b5fb6 100644
--- a/sw/source/filter/html/htmlatr.cxx
+++ b/sw/source/filter/html/htmlatr.cxx
@@ -135,7 +135,7 @@ HTMLOutEvent aAnchorEventTable[] =
static Writer& OutHTML_SvxAdjust( Writer& rWrt, const SfxPoolItem& rHt );
-static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
+static Writer& OutHTML_HoriSpacer( Writer& rWrt, sal_Int16 nSize )
{
OSL_ENSURE( nSize>0, "horizontaler SPACER mit negativem Wert?" );
if( nSize <= 0 )
@@ -143,7 +143,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
if( Application::GetDefaultDevice() )
{
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
}
@@ -158,7 +158,7 @@ static Writer& OutHTML_HoriSpacer( Writer& rWrt, INT16 nSize )
return rWrt;
}
-USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
+sal_uInt16 SwHTMLWriter::GetDefListLvl( const String& rNm, sal_uInt16 nPoolId )
{
if( nPoolId == RES_POOLCOLL_HTML_DD )
{
@@ -173,18 +173,18 @@ USHORT SwHTMLWriter::GetDefListLvl( const String& rNm, USHORT nPoolId )
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - term
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DT;
sDTDD.AssignAscii( OOO_STRING_SVTOOLS_HTML_dd );
sDTDD += ' ';
if( COMPARE_EQUAL == sDTDD.CompareTo( rNm, sDTDD.Len() ) )
// DefinitionList - definition
- return (USHORT)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
+ return (sal_uInt16)rNm.Copy( sDTDD.Len() ).ToInt32() | HTML_DLCOLL_DD;
return 0;
}
-void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
+void SwHTMLWriter::OutAndSetDefList( sal_uInt16 nNewLvl )
{
// eventuell muss erst mal eine Liste aufgemacht werden
if( nDefListLvl < nNewLvl )
@@ -198,24 +198,24 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
ChangeParaToken( 0 );
// entsprechend dem Level-Unterschied schreiben!
- for( USHORT i=nDefListLvl; i<nNewLvl; i++ )
+ for( sal_uInt16 i=nDefListLvl; i<nNewLvl; i++ )
{
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_True );
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
else if( nDefListLvl > nNewLvl )
{
- for( USHORT i=nNewLvl ; i < nDefListLvl; i++ )
+ for( sal_uInt16 i=nNewLvl ; i < nDefListLvl; i++ )
{
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_deflist, sal_False );
+ bLFPossible = sal_True;
}
}
@@ -223,12 +223,12 @@ void SwHTMLWriter::OutAndSetDefList( USHORT nNewLvl )
}
-void SwHTMLWriter::ChangeParaToken( USHORT nNew )
+void SwHTMLWriter::ChangeParaToken( sal_uInt16 nNew )
{
if( nNew != nLastParaToken && HTML_PREFORMTXT_ON == nLastParaToken )
{
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_preformtxt, sal_False );
+ bLFPossible = sal_True;
}
nLastParaToken = nNew;
}
@@ -273,23 +273,23 @@ struct SwHTMLTxtCollOutputInfo
ByteString aToken; // auszugendens End-Token
SfxItemSet *pItemSet; // harte Attributierung
- BOOL bInNumBulList; // in einer Aufzaehlungs-Liste;
- BOOL bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
- BOOL bOutPara; // ein </P> soll ausgegeben werden
- BOOL bOutDiv; // write a </DIV>
+ sal_Bool bInNumBulList; // in einer Aufzaehlungs-Liste;
+ sal_Bool bParaPossible; // ein </P> darf zusaetzlich ausgegeben werden
+ sal_Bool bOutPara; // ein </P> soll ausgegeben werden
+ sal_Bool bOutDiv; // write a </DIV>
SwHTMLTxtCollOutputInfo() :
pItemSet( 0 ),
- bInNumBulList( FALSE ),
- bParaPossible( FALSE ),
- bOutPara( FALSE ),
- bOutDiv( FALSE )
+ bInNumBulList( sal_False ),
+ bParaPossible( sal_False ),
+ bOutPara( sal_False ),
+ bOutDiv( sal_False )
{}
~SwHTMLTxtCollOutputInfo();
- BOOL HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
- BOOL ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
+ sal_Bool HasParaToken() const { return aToken.Len()==1 && aToken.GetChar(0)=='P'; }
+ sal_Bool ShouldOutputToken() const { return bOutPara || !HasParaToken(); }
};
SwHTMLTxtCollOutputInfo::~SwHTMLTxtCollOutputInfo()
@@ -311,8 +311,8 @@ struct SwHTMLFmtInfo
sal_Int32 nRightMargin; // Absatz-Vorlagen
short nFirstLineIndent;
- USHORT nTopMargin;
- USHORT nBottomMargin;
+ sal_uInt16 nTopMargin;
+ sal_uInt16 nBottomMargin;
sal_Bool bScriptDependent;
@@ -324,18 +324,18 @@ struct SwHTMLFmtInfo
// Konstruktor zum Erstellen der Format-Info
SwHTMLFmtInfo( const SwFmt *pFmt, SwDoc *pDoc, SwDoc *pTemlate,
- BOOL bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
+ sal_Bool bOutStyles, LanguageType eDfltLang=LANGUAGE_DONTKNOW,
sal_uInt16 nScript=CSS1_OUTMODE_ANY_SCRIPT,
- BOOL bHardDrop=FALSE );
+ sal_Bool bHardDrop=sal_False );
~SwHTMLFmtInfo();
- friend BOOL operator==( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator==( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt == (long)rInfo2.pFmt;
}
- friend BOOL operator<( const SwHTMLFmtInfo& rInfo1,
+ friend sal_Bool operator<( const SwHTMLFmtInfo& rInfo1,
const SwHTMLFmtInfo& rInfo2 )
{
return (long)rInfo1.pFmt < (long)rInfo2.pFmt;
@@ -346,21 +346,21 @@ struct SwHTMLFmtInfo
SV_IMPL_OP_PTRARR_SORT( SwHTMLFmtInfos, SwHTMLFmtInfo* )
SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
- BOOL bOutStyles,
+ sal_Bool bOutStyles,
LanguageType eDfltLang,
- sal_uInt16 nCSS1Script, BOOL bHardDrop ) :
+ sal_uInt16 nCSS1Script, sal_Bool bHardDrop ) :
pFmt( pF ), pRefFmt(0), pItemSet( 0 ), bScriptDependent( sal_False )
{
- USHORT nRefPoolId = 0;
+ sal_uInt16 nRefPoolId = 0;
// Den Selektor des Formats holen
- USHORT nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
+ sal_uInt16 nDeep = SwHTMLWriter::GetCSS1Selector( pFmt, aToken, aClass,
nRefPoolId );
OSL_ENSURE( nDeep ? aToken.Len()>0 : aToken.Len()==0,
"Hier stimmt doch was mit dem Token nicht!" );
OSL_ENSURE( nDeep ? nRefPoolId : !nRefPoolId,
"Hier stimmt doch was mit der Vergleichs-Vorlage nicht!" );
- BOOL bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
+ sal_Bool bTxtColl = pFmt->Which() == RES_TXTFMTCOLL ||
pFmt->Which() == RES_CONDTXTFMTCOLL;
const SwFmt *pReferenceFmt = 0; // Vergleichs-Format
@@ -415,7 +415,7 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
// sollen ist harte Attributierung noetig. Fuer Vorlagen, die
// nicht von HTML-Tag-Vorlagen abgeleitet sind, gilt das immer
- pItemSet->Set( pFmt->GetAttrSet(), TRUE );
+ pItemSet->Set( pFmt->GetAttrSet(), sal_True );
if( pReferenceFmt )
SwHTMLWriter::SubtractItemSet( *pItemSet, pReferenceFmt->GetAttrSet(),
@@ -488,16 +488,16 @@ SwHTMLFmtInfo::SwHTMLFmtInfo( const SwFmt *pF, SwDoc *pDoc, SwDoc *pTemplate,
{
const SfxPoolItem *pItem;
if( SFX_ITEM_SET==pFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pItem ) )
+ RES_PARATR_DROP, sal_True, &pItem ) )
{
- BOOL bPut = TRUE;
+ sal_Bool bPut = sal_True;
if( pTemplate )
{
pReferenceFmt = SwHTMLWriter::GetTemplateFmt( nRefPoolId, pTemplate );
const SfxPoolItem *pRefItem;
- BOOL bRefItemSet =
+ sal_Bool bRefItemSet =
SFX_ITEM_SET==pReferenceFmt->GetAttrSet().GetItemState(
- RES_PARATR_DROP, TRUE, &pRefItem );
+ RES_PARATR_DROP, sal_True, &pRefItem );
bPut = !bRefItemSet || *pItem!=*pRefItem;
}
if( bPut )
@@ -574,19 +574,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
SwHTMLWriter & rHWrt = (SwHTMLWriter&)rWrt;
// Erstmal ein par Flags ...
- USHORT nNewDefListLvl = 0;
- USHORT nNumStart = USHRT_MAX;
- BOOL bForceDL = FALSE;
- BOOL bDT = FALSE;
- rInfo.bInNumBulList = FALSE; // Wir sind in einer Liste?
- BOOL bNumbered = FALSE; // Der aktuelle Absatz ist numeriert
- BOOL bPara = FALSE; // das aktuelle Token ist <P>
- rInfo.bParaPossible = FALSE; // ein <P> darf zusaetzlich ausgegeben werden
- BOOL bNoEndTag = FALSE; // kein End-Tag ausgeben
-
- rHWrt.bNoAlign = FALSE; // kein ALIGN=... moeglich
- BOOL bNoStyle = FALSE; // kein STYLE=... moeglich
- BYTE nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
+ sal_uInt16 nNewDefListLvl = 0;
+ sal_uInt16 nNumStart = USHRT_MAX;
+ sal_Bool bForceDL = sal_False;
+ sal_Bool bDT = sal_False;
+ rInfo.bInNumBulList = sal_False; // Wir sind in einer Liste?
+ sal_Bool bNumbered = sal_False; // Der aktuelle Absatz ist numeriert
+ sal_Bool bPara = sal_False; // das aktuelle Token ist <P>
+ rInfo.bParaPossible = sal_False; // ein <P> darf zusaetzlich ausgegeben werden
+ sal_Bool bNoEndTag = sal_False; // kein End-Tag ausgeben
+
+ rHWrt.bNoAlign = sal_False; // kein ALIGN=... moeglich
+ sal_Bool bNoStyle = sal_False; // kein STYLE=... moeglich
+ sal_uInt8 nBulletGrfLvl = 255; // Die auszugebende Bullet-Grafik
// Sind wir in einer Aufzaehlungs- oder Numerierungliste?
const SwTxtNode* pTxtNd = rWrt.pCurPam->GetNode()->GetTxtNode();
@@ -604,16 +604,16 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( aNumInfo.GetNumRule() )
{
- rInfo.bInNumBulList = TRUE;
+ rInfo.bInNumBulList = sal_True;
nNewDefListLvl = 0;
// ist der aktuelle Absatz numeriert?
bNumbered = aNumInfo.IsNumbered();
- BYTE nLvl = aNumInfo.GetLevel();
+ sal_uInt8 nLvl = aNumInfo.GetLevel();
OSL_ENSURE( pTxtNd->GetActualListLevel() == nLvl,
"Gemerkter Num-Level ist falsch" );
- OSL_ENSURE( bNumbered == static_cast< BOOL >(pTxtNd->IsCountedInList()),
+ OSL_ENSURE( bNumbered == static_cast< sal_Bool >(pTxtNd->IsCountedInList()),
"Gemerkter Numerierungs-Zustand ist falsch" );
if( bNumbered )
@@ -626,7 +626,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// indicates, that no additional restart value has to be written.
if ( pTxtNd->IsListRestart() )
{
- nNumStart = static_cast< USHORT >(pTxtNd->GetActualListStartValue());
+ nNumStart = static_cast< sal_uInt16 >(pTxtNd->GetActualListStartValue());
}
// <--
DBG_ASSERT( rHWrt.nLastParaToken == 0,
@@ -636,7 +636,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// Jetzt holen wir das Token und ggf. die Klasse
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nArrayPos;
+ sal_uInt16 nArrayPos;
const SwHTMLFmtInfo *pFmtInfo;
if( rHWrt.aTxtCollInfos.Seek_Entry( &aFmtInfo, &nArrayPos ) )
{
@@ -655,8 +655,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
}
// Jetzt wird festgelegt, was aufgrund des Tokens so moeglich ist
- USHORT nToken = 0; // Token fuer Tag-Wechsel
- BOOL bOutNewLine = FALSE; // nur ein LF ausgeben?
+ sal_uInt16 nToken = 0; // Token fuer Tag-Wechsel
+ sal_Bool bOutNewLine = sal_False; // nur ein LF ausgeben?
if( pFmtInfo->aToken.Len() )
{
// Es ist eine HTML-Tag-Vorlage oder die Vorlage ist von einer
@@ -668,19 +668,19 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
case 'A': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_address),
"Doch kein ADDRESS?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'B': OSL_ENSURE( rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_blockquote),
"Doch kein BLOCKQUOTE?" );
- rInfo.bParaPossible = TRUE;
- rHWrt.bNoAlign = TRUE;
+ rInfo.bParaPossible = sal_True;
+ rHWrt.bNoAlign = sal_True;
break;
case 'P': if( rInfo.aToken.Len() == 1 )
{
- bPara = TRUE;
+ bPara = sal_True;
}
else
{
@@ -688,13 +688,13 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein PRE?" );
if( HTML_PREFORMTXT_ON == rHWrt.nLastParaToken )
{
- bOutNewLine = TRUE;
+ bOutNewLine = sal_True;
}
else
{
nToken = HTML_PREFORMTXT_ON;
- rHWrt.bNoAlign = TRUE;
- bNoEndTag = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bNoEndTag = sal_True;
}
}
break;
@@ -704,8 +704,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
"Doch kein DD/DT?" );
bDT = rInfo.aToken.Equals(OOO_STRING_SVTOOLS_HTML_dt);
rInfo.bParaPossible = !bDT;
- rHWrt.bNoAlign = TRUE;
- bForceDL = TRUE;
+ rHWrt.bNoAlign = sal_True;
+ bForceDL = sal_True;
break;
}
}
@@ -715,7 +715,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
// diesem abgeleitet sind, werden als <P> exportiert
rInfo.aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
+ bPara = sal_True;
}
// Falls noetig, die harte Attributierung der Vorlage uebernehmen
@@ -759,8 +759,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
RES_UL_SPACE, RES_UL_SPACE );
rInfo.pItemSet->Put( aULSpaceItem );
}
- rHWrt.bOutHeader = FALSE;
- rHWrt.bOutFooter = FALSE;
+ rHWrt.bOutHeader = sal_False;
+ rHWrt.bOutFooter = sal_False;
}
if( bOutNewLine )
@@ -780,14 +780,14 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rInfo.pItemSet &&
SFX_ITEM_SET == rInfo.pItemSet->GetItemState( RES_PARATR_ADJUST,
- FALSE, &pItem ) )
+ sal_False, &pItem ) )
{
pAdjItem = pItem;
}
// Unteren Absatz-Abstand beachten ? (nie im letzen Absatz von
// Tabellen)
- BOOL bUseParSpace = !rHWrt.bOutTable ||
+ sal_Bool bUseParSpace = !rHWrt.bOutTable ||
(rWrt.pCurPam->GetPoint()->nNode.GetIndex() !=
rWrt.pCurPam->GetMark()->nNode.GetIndex());
// Wenn Styles exportiert werden, wird aus eingerueckten Absaetzen
@@ -807,7 +807,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( nLeftMargin > 0 && rHWrt.nDefListMargin > 0 )
{
- nNewDefListLvl = static_cast< USHORT >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
+ nNewDefListLvl = static_cast< sal_uInt16 >((nLeftMargin + (rHWrt.nDefListMargin/2)) /
rHWrt.nDefListMargin);
if( nNewDefListLvl == 0 && bForceDL && !bDT )
nNewDefListLvl = 1;
@@ -820,7 +820,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
nNewDefListLvl = (bForceDL&& !bDT) ? 1 : 0;
}
- BOOL bIsNextTxtNode =
+ sal_Bool bIsNextTxtNode =
rWrt.pDoc->GetNodes()[rWrt.pCurPam->GetPoint()->nNode.GetIndex()+1]
->IsTxtNode();
@@ -838,9 +838,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
// Absaetze ohne unteren Abstand als DT exportieren
nNewDefListLvl = 1;
- bDT = TRUE;
- rInfo.bParaPossible = FALSE;
- rHWrt.bNoAlign = TRUE;
+ bDT = sal_True;
+ rInfo.bParaPossible = sal_False;
+ rHWrt.bNoAlign = sal_True;
}
}
@@ -856,7 +856,7 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( bNumbered )
{
if( rHWrt.aBulletGrfs[nBulletGrfLvl].Len() )
- bNumbered = FALSE;
+ bNumbered = sal_False;
else
nBulletGrfLvl = 255;
}
@@ -911,12 +911,12 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
if( rHWrt.bLFPossible )
rHWrt.OutNewLine(); // Absatz-Tag in neue Zeile
- rInfo.bOutPara = FALSE;
+ rInfo.bOutPara = sal_False;
// das ist jetzt unser neues Token
rHWrt.ChangeParaToken( nToken );
- BOOL bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
+ sal_Bool bHasParSpace = bUseParSpace && rULSpace.GetLower() > 0;
// ggf ein List-Item aufmachen
if( rInfo.bInNumBulList && bNumbered )
@@ -946,15 +946,15 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
sOut += OOO_STRING_SVTOOLS_HTML_division;
rWrt.Strm() << sOut.GetBuffer();
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
OutHTML_SvxAdjust( rWrt, *pAdjItem );
rWrt.Strm() << '>';
pAdjItem = 0;
- rHWrt.bNoAlign = FALSE;
- rInfo.bOutDiv = TRUE;
+ rHWrt.bNoAlign = sal_False;
+ rInfo.bOutDiv = sal_True;
rHWrt.IncIndentLevel();
- rHWrt.bLFPossible = TRUE;
+ rHWrt.bLFPossible = sal_True;
rHWrt.OutNewLine();
}
@@ -968,9 +968,9 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
{
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer() );
aToken = OOO_STRING_SVTOOLS_HTML_parabreak;
- bPara = TRUE;
- rHWrt.bNoAlign = FALSE;
- bNoStyle = FALSE;
+ bPara = sal_True;
+ rHWrt.bNoAlign = sal_False;
+ bNoStyle = sal_False;
}
LanguageType eLang = rInfo.pItemSet
@@ -1018,8 +1018,8 @@ void OutHTML_SwFmt( Writer& rWrt, const SwFmt& rFmt,
rHWrt.bCfgOutStyles )
{
// jetzt werden Optionen ausgegeben
- rHWrt.bTxtAttr = FALSE;
- rHWrt.bOutOpts = TRUE;
+ rHWrt.bTxtAttr = sal_False;
+ rHWrt.bOutOpts = sal_True;
ByteString sOut( '<' );
sOut += aToken;
@@ -1157,17 +1157,17 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
if( rInfo.ShouldOutputToken() )
{
if( rHWrt.bLFPossible )
- rHWrt.OutNewLine( TRUE );
+ rHWrt.OutNewLine( sal_True );
// fuer BLOCKQUOTE, ADDRESS und DD wird ggf noch ein
// Absatz-Token ausgegeben, wenn
// - keine Styles geschrieben werden, und
// - ein untere Abstand existiert
if( rInfo.bParaPossible && rInfo.bOutPara )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_parabreak, sal_False );
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), rInfo.aToken.GetBuffer(),
- FALSE );
+ sal_False );
rHWrt.bLFPossible = !rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dt ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_dd ) &&
!rInfo.aToken.Equals( OOO_STRING_SVTOOLS_HTML_li );
@@ -1177,8 +1177,8 @@ void OutHTML_SwFmtOff( Writer& rWrt, const SwHTMLTxtCollOutputInfo& rInfo )
rHWrt.DecIndentLevel();
if( rHWrt.bLFPossible )
rHWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- rHWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ rHWrt.bLFPossible = sal_True;
}
// ggf. eine Aufzaehlung- oder Numerierungsliste beenden
@@ -1243,41 +1243,42 @@ class HTMLEndPosLst
SvXub_StrLens aScriptChgLst; // positions where script changes
// 0 is not contained in this list,
// but the text length
- SvUShorts aScriptLst; // the script that is valif up to the position
- // contained in aScriptChgList at the same index
+ // the script that is valif up to the position
+ // contained in aScriptChgList at the same index
+ ::std::vector<sal_uInt16> aScriptLst;
SwDoc *pDoc; // das aktuelle Dokument
SwDoc* pTemplate; // die HTML-Vorlage (oder 0)
const Color* pDfltColor;// die Default-Vordergrund-Farbe
SvStringsSortDtor& rScriptTxtStyles; //
- ULONG nHTMLMode;
- BOOL bOutStyles : 1; // werden Styles exportiert
+ sal_uLong nHTMLMode;
+ sal_Bool bOutStyles : 1; // werden Styles exportiert
// die Position eines Items in der Start-/Ende-Liste suchen
- USHORT _FindStartPos( const HTMLSttEndPos *pPos ) const;
- USHORT _FindEndPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindStartPos( const HTMLSttEndPos *pPos ) const;
+ sal_uInt16 _FindEndPos( const HTMLSttEndPos *pPos ) const;
// Eine SttEndPos in die Start- und Ende-Listen eintragen bzw. aus
// ihnen loeschen, wobei die Ende-Position bekannt ist
- void _InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos );
- void _RemoveItem( USHORT nEndPos );
+ void _InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos );
+ void _RemoveItem( sal_uInt16 nEndPos );
// die "Art" es Attributs ermitteln
HTMLOnOffState GetHTMLItemState( const SfxPoolItem& rItem );
// Existiert ein bestimmtes On-Tag-Item
- BOOL ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos );
+ sal_Bool ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos );
// Existiert ein Item zum ausschalten eines Attributs, das genauso
// exportiert wird wie das uebergebene Item im gleichen Bereich?
- BOOL ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+ sal_Bool ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos );
// das Ende eines gesplitteten Items anpassen
- void FixSplittedItem( HTMLSttEndPos *pPos, USHORT nStartPos,
+ void FixSplittedItem( HTMLSttEndPos *pPos, sal_uInt16 nStartPos,
xub_StrLen nNewEnd );
// Ein Attribut in die Listen eintragen und ggf. aufteilen
@@ -1291,7 +1292,7 @@ class HTMLEndPosLst
// Insert without taking care of script
void InsertNoScript( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd, SwHTMLFmtInfos& rFmtInfos,
- BOOL bParaAttrs=FALSE );
+ sal_Bool bParaAttrs=sal_False );
const SwHTMLFmtInfo *GetFmtInfo( const SwFmt& rFmt,
SwHTMLFmtInfos& rFmtInfos );
@@ -1299,16 +1300,16 @@ class HTMLEndPosLst
public:
HTMLEndPosLst( SwDoc *pDoc, SwDoc* pTemplate, const Color* pDfltColor,
- BOOL bOutStyles, ULONG nHTMLMode,
+ sal_Bool bOutStyles, sal_uLong nHTMLMode,
const String& rText, SvStringsSortDtor& rStyles );
~HTMLEndPosLst();
// Ein Attribut einfuegen
void Insert( const SfxPoolItem& rItem, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs=sal_False );
void Insert( const SfxItemSet& rItemSet, xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bDeep,
- BOOL bParaAttrs=FALSE );
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bDeep,
+ sal_Bool bParaAttrs=sal_False );
void Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
SwHTMLFmtInfos& rFmtInfos );
@@ -1320,15 +1321,15 @@ public:
void OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext = 0 );
- USHORT Count() const { return aEndLst.Count(); }
+ sal_uInt16 Count() const { return aEndLst.Count(); }
- BOOL IsHTMLMode( ULONG nMode ) const { return (nHTMLMode & nMode) != 0; }
+ sal_Bool IsHTMLMode( sal_uLong nMode ) const { return (nHTMLMode & nMode) != 0; }
};
-USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() && aStartLst[i] != pPos; i++ )
;
@@ -1337,9 +1338,9 @@ USHORT HTMLEndPosLst::_FindStartPos( const HTMLSttEndPos *pPos ) const
return i==aStartLst.Count() ? USHRT_MAX : i;
}
-USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
+sal_uInt16 HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count() && aEndLst[i] != pPos; i++ )
;
@@ -1350,12 +1351,12 @@ USHORT HTMLEndPosLst::_FindEndPos( const HTMLSttEndPos *pPos ) const
}
-void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
+void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, sal_uInt16 nEndPos )
{
// In der Start-Liste das Attribut hinter allen vorher und an
// der gleichen Position gestarteten Attributen einfuegen
xub_StrLen nStart = pPos->GetStart();
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aStartLst.Count() &&
aStartLst[i]->GetStart() <= nStart; i++ )
@@ -1366,12 +1367,12 @@ void HTMLEndPosLst::_InsertItem( HTMLSttEndPos *pPos, USHORT nEndPos )
aEndLst.Insert( pPos, nEndPos );
}
-void HTMLEndPosLst::_RemoveItem( USHORT nEndPos )
+void HTMLEndPosLst::_RemoveItem( sal_uInt16 nEndPos )
{
HTMLSttEndPos *pPos = aEndLst[nEndPos];
// jetzt Suchen wir es in der Start-Liste
- USHORT nStartPos = _FindStartPos( pPos );
+ sal_uInt16 nStartPos = _FindStartPos( pPos );
if( nStartPos != USHRT_MAX )
aStartLst.Remove( nStartPos, 1 );
@@ -1526,9 +1527,9 @@ HTMLOnOffState HTMLEndPosLst::GetHTMLItemState( const SfxPoolItem& rItem )
return eState;
}
-BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
+sal_Bool HTMLEndPosLst::ExistsOnTagItem( sal_uInt16 nWhich, xub_StrLen nPos )
{
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1546,25 +1547,25 @@ BOOL HTMLEndPosLst::ExistsOnTagItem( USHORT nWhich, xub_StrLen nPos )
HTML_ON_VALUE == GetHTMLItemState(*pItem) )
{
// ein On-Tag-Attibut wurde gefunden
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
-BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
+sal_Bool HTMLEndPosLst::ExistsOffTagItem( sal_uInt16 nWhich, xub_StrLen nStartPos,
xub_StrLen nEndPos )
{
if( nWhich != RES_CHRATR_CROSSEDOUT &&
nWhich != RES_CHRATR_UNDERLINE &&
nWhich != RES_CHRATR_BLINK )
{
- return FALSE;
+ return sal_False;
}
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
@@ -1579,7 +1580,7 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
// das Attribut beginnt vor oder an der aktuellen Position
// und endet hinter ihr
const SfxPoolItem *pItem = pTest->GetItem();
- USHORT nTstWhich = pItem->Which() ;
+ sal_uInt16 nTstWhich = pItem->Which() ;
if( (nTstWhich == RES_CHRATR_CROSSEDOUT ||
nTstWhich == RES_CHRATR_UNDERLINE ||
nTstWhich == RES_CHRATR_BLINK) &&
@@ -1587,22 +1588,22 @@ BOOL HTMLEndPosLst::ExistsOffTagItem( USHORT nWhich, xub_StrLen nStartPos,
{
// Ein Off-Tag-Attibut wurde gefunden, das genauso
// exportiert wird, wie das aktuelle Item
- return TRUE;
+ return sal_True;
}
}
}
- return FALSE;
+ return sal_False;
}
void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
- USHORT nStartPos )
+ sal_uInt16 nStartPos )
{
// die End-Position entsprechend fixen
pPos->SetEnd( nNewEnd );
// das Item aus der End-Liste entfernen
- USHORT nEndPos = _FindEndPos( pPos );
+ sal_uInt16 nEndPos = _FindEndPos( pPos );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
@@ -1614,7 +1615,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
aEndLst.Insert( pPos, nEndPos );
// jetzt noch die spaeter gestarteten Attribute anpassen
- for( USHORT i=nStartPos+1; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=nStartPos+1; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestEnd = pTest->GetEnd();
@@ -1633,7 +1634,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
pTest->SetEnd( nNewEnd );
// das Attribut aus der End-Liste entfernen
- USHORT nEPos = _FindEndPos( pTest );
+ sal_uInt16 nEPos = _FindEndPos( pTest );
if( nEPos != USHRT_MAX )
aEndLst.Remove( nEPos, 1 );
@@ -1651,7 +1652,7 @@ void HTMLEndPosLst::FixSplittedItem( HTMLSttEndPos *pPos, xub_StrLen nNewEnd,
void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aEndLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aEndLst[i];
@@ -1685,12 +1686,12 @@ void HTMLEndPosLst::InsertItem( const SfxPoolItem& rItem, xub_StrLen nStart,
void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
xub_StrLen nEnd )
{
- USHORT nWhich = rItem.Which();
+ sal_uInt16 nWhich = rItem.Which();
// erstmal muessen wir die alten Items anhand der Startliste suchen
// und die neuen Item-Bereiche festlegen
- for( USHORT i=0; i<aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i<aStartLst.Count(); i++ )
{
HTMLSttEndPos *pTest = aStartLst[i];
xub_StrLen nTestStart = pTest->GetStart();
@@ -1711,14 +1712,14 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
if( pItem->Which() == nWhich &&
HTML_ON_VALUE == GetHTMLItemState( *pItem ) )
{
- BOOL bDelete = TRUE;
+ sal_Bool bDelete = sal_True;
if( nTestStart < nStart )
{
// der Start des neuen Attribut entspricht
// dem neuen Ende des Attribts
FixSplittedItem( pTest, nStart, i );
- bDelete = FALSE;
+ bDelete = sal_False;
}
else
{
@@ -1728,7 +1729,7 @@ void HTMLEndPosLst::SplitItem( const SfxPoolItem& rItem, xub_StrLen nStart,
aStartLst.Remove( i, 1 );
i--;
- USHORT nEndPos = _FindEndPos( pTest );
+ sal_uInt16 nEndPos = _FindEndPos( pTest );
if( nEndPos != USHRT_MAX )
aEndLst.Remove( nEndPos, 1 );
}
@@ -1751,7 +1752,7 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
{
const SwHTMLFmtInfo *pFmtInfo;
SwHTMLFmtInfo aFmtInfo( &rFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
pFmtInfo = rFmtInfos[nPos];
@@ -1770,8 +1771,8 @@ const SwHTMLFmtInfo *HTMLEndPosLst::GetFmtInfo( const SwFmt& rFmt,
}
HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
- const Color* pDfltCol, BOOL bStyles,
- ULONG nMode, const String& rText,
+ const Color* pDfltCol, sal_Bool bStyles,
+ sal_uLong nMode, const String& rText,
SvStringsSortDtor& rStyles ):
pDoc( pD ),
pTemplate( pTempl ),
@@ -1786,8 +1787,8 @@ HTMLEndPosLst::HTMLEndPosLst( SwDoc *pD, SwDoc* pTempl,
{
sal_uInt16 nScript = pBreakIt->GetBreakIter()->getScriptType( rText, nPos );
nPos = (xub_StrLen)pBreakIt->GetBreakIter()->endOfScript( rText, nPos, nScript );
- aScriptChgLst.Insert( nPos, aScriptChgLst.Count() );
- aScriptLst.Insert( nScript, aScriptLst.Count() );
+ aScriptChgLst.push_back( nPos );
+ aScriptLst.push_back( nScript );
}
}
@@ -1801,19 +1802,19 @@ HTMLEndPosLst::~HTMLEndPosLst()
void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
// kein Bereich ?? dann nicht aufnehmen, wird nie wirksam !!
if( nStart != nEnd )
{
- BOOL bSet = FALSE, bSplit = FALSE;
+ sal_Bool bSet = sal_False, bSplit = sal_False;
switch( GetHTMLItemState(rItem) )
{
case HTML_ON_VALUE:
// das Attribut wird ausgegeben, wenn es nicht sowieso
// schon an ist
if( !ExistsOnTagItem( rItem.Which(), nStart ) )
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_OFF_VALUE:
@@ -1822,14 +1823,14 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
// am ganzen Absatz gesetzt ist, weil es dann ja schon mit dem
// ABsatz-Tag ausgegeben wurde.
if( ExistsOnTagItem( rItem.Which(), nStart ) )
- bSplit = TRUE;
+ bSplit = sal_True;
bSet = bOutStyles && !bParaAttrs &&
!ExistsOffTagItem( rItem.Which(), nStart, nEnd );
break;
case HTML_REAL_VALUE:
// das Attribut kann immer ausgegeben werden
- bSet = TRUE;
+ bSet = sal_True;
break;
case HTML_STYLE_VALUE:
@@ -1861,7 +1862,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pFmtInfo->pItemSet )
{
Insert( *pFmtInfo->pItemSet, nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
break;
@@ -1871,7 +1872,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
const SwFmtAutoFmt& rAutoFmt = (const SwFmtAutoFmt&)rItem;
const boost::shared_ptr<SfxItemSet> pSet = rAutoFmt.GetStyleHandle();
if( pSet.get() )
- Insert( *pSet.get(), nStart, nEnd, rFmtInfos, TRUE, bParaAttrs );
+ Insert( *pSet.get(), nStart, nEnd, rFmtInfos, sal_True, bParaAttrs );
}
break;
@@ -1902,12 +1903,12 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
if( pCharFmt )
{
Insert( pCharFmt->GetAttrSet(), nStart, nEnd,
- rFmtInfos, TRUE, bParaAttrs );
+ rFmtInfos, sal_True, bParaAttrs );
}
}
else
{
- bSet = TRUE;
+ bSet = sal_True;
}
}
break;
@@ -1924,7 +1925,7 @@ void HTMLEndPosLst::InsertNoScript( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
xub_StrLen nStart, xub_StrLen nEnd,
- SwHTMLFmtInfos& rFmtInfos, BOOL bParaAttrs )
+ SwHTMLFmtInfos& rFmtInfos, sal_Bool bParaAttrs )
{
sal_Bool bDependsOnScript = sal_False, bDependsOnAnyScript = sal_False;
sal_uInt16 nScript = i18n::ScriptType::LATIN;
@@ -1984,9 +1985,8 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
if( bDependsOnScript )
{
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
xub_StrLen nPos = nStart;
- for( sal_uInt16 i=0; i < nScriptChgs; i++ )
+ for( size_t i=0; i < aScriptChgLst.size(); i++ )
{
xub_StrLen nChgPos = aScriptChgLst[i];
if( nPos >= nChgPos )
@@ -2023,11 +2023,11 @@ void HTMLEndPosLst::Insert( const SfxPoolItem& rItem,
void HTMLEndPosLst::Insert( const SfxItemSet& rItemSet,
xub_StrLen nStart, xub_StrLen nEnd,
SwHTMLFmtInfos& rFmtInfos,
- BOOL bDeep, BOOL bParaAttrs )
+ sal_Bool bDeep, sal_Bool bParaAttrs )
{
SfxWhichIter aIter( rItemSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
const SfxPoolItem *pItem;
@@ -2056,10 +2056,10 @@ void HTMLEndPosLst::Insert( const SwDrawFrmFmt& rFmt, xub_StrLen nPos,
const SfxItemSet& rFmtItemSet = rFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, TRUE );
- BOOL bOutStylesOld = bOutStyles;
- bOutStyles = FALSE;
- Insert( aItemSet, nPos, nPos+1, rFmtInfos, FALSE, FALSE );
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, pTextObj, sal_True );
+ sal_Bool bOutStylesOld = bOutStyles;
+ bOutStyles = sal_False;
+ Insert( aItemSet, nPos, nPos+1, rFmtInfos, sal_False, sal_False );
bOutStyles = bOutStylesOld;
}
}
@@ -2069,8 +2069,8 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
{
sal_uInt16 nRet = CSS1_OUTMODE_ANY_SCRIPT;
- sal_uInt16 nScriptChgs = aScriptChgLst.Count();
- sal_uInt16 i=0;
+ size_t nScriptChgs = aScriptChgLst.size();
+ size_t i=0;
while( i < nScriptChgs && nPos >= aScriptChgLst[i] )
i++;
OSL_ENSURE( i < nScriptChgs, "script list is to short" );
@@ -2088,10 +2088,10 @@ sal_uInt16 HTMLEndPosLst::GetScriptAtPos( xub_StrLen nPos ,
void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = TRUE;
+ rHWrt.bTagOn = sal_True;
// die Attribute in der Start-Liste sind aufsteigend sortiert
- for( USHORT i=0; i< aStartLst.Count(); i++ )
+ for( sal_uInt16 i=0; i< aStartLst.Count(); i++ )
{
HTMLSttEndPos *pPos = aStartLst[i];
xub_StrLen nStart = pPos->GetStart();
@@ -2125,10 +2125,10 @@ void HTMLEndPosLst::OutStartAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
void HTMLEndPosLst::OutEndAttrs( SwHTMLWriter& rHWrt, xub_StrLen nPos,
HTMLOutContext *pContext )
{
- rHWrt.bTagOn = FALSE;
+ rHWrt.bTagOn = sal_False;
// die Attribute in der End-Liste sind aufsteigend sortiert
- USHORT i=0;
+ sal_uInt16 i=0;
while( i < aEndLst.Count() )
{
HTMLSttEndPos *pPos = aEndLst[i];
@@ -2172,7 +2172,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Besonderheit: leere Node und HR-Vorlage (horizontaler Strich)
// nur ein <HR> ausgeben
- USHORT nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
+ sal_uInt16 nPoolId = pNd->GetAnyFmtColl().GetPoolFmtId();
if( !nEnde && (RES_POOLCOLL_HTML_HR==nPoolId ||
pNd->GetAnyFmtColl().GetName().EqualsAscii( OOO_STRING_SVTOOLS_HTML_horzrule) ) )
@@ -2189,7 +2189,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine(); // Absatz-Tag in eine neue Zeile
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_horzrule;
@@ -2201,7 +2201,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
return rHTMLWrt;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_LR_SPACE, sal_False, &pItem ))
{
sal_Int32 nLeft = ((SvxLRSpaceItem*)pItem)->GetLeft();
sal_Int32 nRight = ((SvxLRSpaceItem*)pItem)->GetRight();
@@ -2242,13 +2242,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
}
rWrt.Strm() << sOut.GetBuffer();
- if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pItemSet->GetItemState( RES_BOX, sal_False, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
const SvxBorderLine* pBorderLine = pBoxItem->GetBottom();
if( pBorderLine )
{
- USHORT nWidth = pBorderLine->GetOutWidth() +
+ sal_uInt16 nWidth = pBorderLine->GetOutWidth() +
pBorderLine->GetInWidth() +
pBorderLine->GetDistance();
((sOut = ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=';
@@ -2287,14 +2287,14 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
const SfxPoolItem* pItem;
const SfxItemSet *pItemSet = pNd->GetpSwAttrSet();
if( pItemSet && pItemSet->Count() &&
- SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) &&
+ SFX_ITEM_SET == pItemSet->GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) &&
40 == ((const SvxFontHeightItem *)pItem)->GetHeight() )
{
// ... ausserdem ist die 2pt Schrift eingestellt ...
- ULONG nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNdPos = rWrt.pCurPam->GetPoint()->nNode.GetIndex();
const SwNode *pNextNd = rWrt.pDoc->GetNodes()[nNdPos+1];
const SwNode *pPrevNd = rWrt.pDoc->GetNodes()[nNdPos-1];
- BOOL bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
+ sal_Bool bStdColl = nPoolId == RES_POOLCOLL_STANDARD;
if( ( bStdColl && (pNextNd->IsTableNode() ||
pNextNd->IsSectionNode()) ) ||
( !bStdColl && pNextNd->IsEndNode() &&
@@ -2308,7 +2308,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// Alle an dem Node verankerten Rahmen ausgeben
rHTMLWrt.OutFlyFrm( rNode.GetIndex(), 0, HTML_POS_ANY );
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
return rWrt;
}
@@ -2316,36 +2316,36 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
}
// PagePreaks uns PagDescs abfangen
- BOOL bPageBreakBehind = FALSE;
+ sal_Bool bPageBreakBehind = sal_False;
if( rHTMLWrt.bCfgFormFeed &&
!(rHTMLWrt.bOutTable || rHTMLWrt.bOutFlyFrame) &&
rHTMLWrt.pStartNdIdx->GetIndex() !=
rHTMLWrt.pCurPam->GetPoint()->nNode.GetIndex() )
{
- BOOL bPageBreakBefore = FALSE;
+ sal_Bool bPageBreakBefore = sal_False;
const SfxPoolItem* pItem;
const SfxItemSet* pItemSet = pNd->GetpSwAttrSet();
if( pItemSet )
{
if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_PAGEDESC, TRUE, &pItem ) &&
+ pItemSet->GetItemState( RES_PAGEDESC, sal_True, &pItem ) &&
((SwFmtPageDesc *)pItem)->GetPageDesc() )
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
else if( SFX_ITEM_SET ==
- pItemSet->GetItemState( RES_BREAK, TRUE, &pItem ) )
+ pItemSet->GetItemState( RES_BREAK, sal_True, &pItem ) )
{
switch( ((SvxFmtBreakItem *)pItem)->GetBreak() )
{
case SVX_BREAK_PAGE_BEFORE:
- bPageBreakBefore = TRUE;
+ bPageBreakBefore = sal_True;
break;
case SVX_BREAK_PAGE_AFTER:
- bPageBreakBehind = TRUE;
+ bPageBreakBehind = sal_True;
break;
case SVX_BREAK_PAGE_BOTH:
- bPageBreakBefore = TRUE;
- bPageBreakBehind = TRUE;
+ bPageBreakBefore = sal_True;
+ bPageBreakBehind = sal_True;
break;
default:
;
@@ -2361,7 +2361,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
rHTMLWrt.OutForm();
// An dem Node "verankerte" Seitenegebunde Rahmen ausgeben
- BOOL bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
+ sal_Bool bFlysLeft = rHTMLWrt.OutFlyFrm( rNode.GetIndex(),
0, HTML_POS_PREFIX );
// An dem Node verankerte Rahmen ausgeben, die vor dem
// Absatz-Tag geschrieben werden sollen.
@@ -2373,12 +2373,12 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde = rHTMLWrt.pCurPam->GetMark()->nContent.GetIndex();
// gibt es harte Attribute, die als Optionen geschrieben werden muessen?
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
// jetzt das Tag des Absatzes ausgeben
const SwFmt& rFmt = pNd->GetAnyFmtColl();
SwHTMLTxtCollOutputInfo aFmtInfo;
- BOOL bOldLFPossible = rHTMLWrt.bLFPossible;
+ sal_Bool bOldLFPossible = rHTMLWrt.bLFPossible;
OutHTML_SwFmt( rWrt, rFmt, pNd->GetpSwAttrSet(), aFmtInfo );
// Wenn vor dem Absatz-Tag keine neue Zeile aufgemacht wurde, dann
@@ -2389,7 +2389,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// dann die Bookmarks (inkl. End-Tag)
- rHTMLWrt.bOutOpts = FALSE;
+ rHTMLWrt.bOutOpts = sal_False;
rHTMLWrt.OutBookmarks();
// jetzt ist noch mal eine gute Gelegenheit fuer ein LF, sofern es noch
@@ -2399,7 +2399,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
rHTMLWrt.OutNewLine();
}
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
// Text, der aus einer Outline-Numerierung kommt ermitteln
xub_StrLen nOffset = 0;
@@ -2433,7 +2433,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( aFmtInfo.pItemSet )
{
aEndPosLst.Insert( *aFmtInfo.pItemSet, 0, nEnde + nOffset,
- rHTMLWrt.aChrFmtInfos, FALSE, TRUE );
+ rHTMLWrt.aChrFmtInfos, sal_False, sal_True );
}
@@ -2461,13 +2461,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
// erstmal den Start berichtigen. D.h. wird nur ein Teil vom Satz
// ausgegeben, so muessen auch da die Attribute stimmen!!
- rHTMLWrt.bTxtAttr = TRUE;
+ rHTMLWrt.bTxtAttr = sal_True;
- USHORT nAttrPos = 0;
+ sal_uInt16 nAttrPos = 0;
xub_StrLen nStrPos = rHTMLWrt.pCurPam->GetPoint()->nContent.GetIndex();
const SwTxtAttr * pHt = 0;
- USHORT nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
+ sal_uInt16 nCntAttr = pNd->HasHints() ? pNd->GetSwpHints().Count() : 0;
if( nCntAttr && nStrPos > *( pHt = pNd->GetSwpHints()[ 0 ] )->GetStart() )
{
// Ok, es gibt vorher Attribute, die ausgegeben werden muessen
@@ -2514,9 +2514,9 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
aEndPosLst.OutStartAttrs( rHTMLWrt, nStrPos + nOffset );
}
- BOOL bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
+ sal_Bool bWriteBreak = (HTML_PREFORMTXT_ON != rHTMLWrt.nLastParaToken);
if( bWriteBreak && pNd->GetNumRule() )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
{
HTMLOutContext aContext( rHTMLWrt.eDestEnc );
@@ -2532,7 +2532,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nStrPos, HTML_POS_INSIDE,
&aContext );
- BOOL bOutChar = TRUE;
+ sal_Bool bOutChar = sal_True;
const SwTxtAttr * pTxtHt = 0;
if( nAttrPos < nCntAttr && *pHt->GetStart() == nStrPos
&& nStrPos != nEnde )
@@ -2548,8 +2548,8 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
// Wenn erlaubt, wird das Ding als Spacer exportiert
- bOutChar = FALSE; // Space nicht ausgeben
- bWriteBreak = FALSE; // der Absatz ist aber auch nicht leer
+ bOutChar = sal_False; // Space nicht ausgeben
+ bWriteBreak = sal_False; // der Absatz ist aber auch nicht leer
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
OutHTML_HoriSpacer( rWrt,
((const SvxKerningItem&)pHt->GetAttr()).GetValue() );
@@ -2579,13 +2579,13 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
else
{
pTxtHt = pHt;
- USHORT nFldWhich;
+ sal_uInt16 nFldWhich;
if( RES_TXTATR_FIELD != pHt->Which() ||
( RES_POSTITFLD != (nFldWhich = ((const SwFmtFld&)pHt->GetAttr()).GetFld()->Which()) &&
RES_SCRIPTFLD != nFldWhich ) )
- bWriteBreak = FALSE;
+ bWriteBreak = sal_False;
}
- bOutChar = FALSE; // keine 255 ausgeben
+ bOutChar = sal_False; // keine 255 ausgeben
}
} while( ++nAttrPos < nCntAttr && nStrPos ==
*( pHt = pNd->GetSwpHints()[ nAttrPos ] )->GetStart() );
@@ -2616,7 +2616,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
Out( aHTMLAttrFnTab, pTxtHt->GetAttr(), rHTMLWrt );
rHTMLWrt.nCSS1Script = nCSS1Script;
- rHTMLWrt.bLFPossible = FALSE;
+ rHTMLWrt.bLFPossible = sal_False;
}
if( bOutChar )
@@ -2642,7 +2642,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
{
HTMLOutFuncs::FlushToAscii( rWrt.Strm(), aContext );
rHTMLWrt.OutNewLine();
- bOutChar = FALSE;
+ bOutChar = sal_False;
if( rHTMLWrt.nLastParaToken )
nPreSplitPos = nStrPos+1;
}
@@ -2678,11 +2678,11 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
nEnde, HTML_POS_INSIDE );
OSL_ENSURE( !bFlysLeft, "Es wurden nicht alle Rahmen gespeichert!" );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_False;
if( bWriteBreak )
{
- BOOL bEndOfCell = rHTMLWrt.bOutTable &&
+ sal_Bool bEndOfCell = rHTMLWrt.bOutTable &&
rWrt.pCurPam->GetPoint()->nNode.GetIndex() ==
rWrt.pCurPam->GetMark()->nNode.GetIndex();
@@ -2702,7 +2702,7 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
if( rULSpace.GetLower() > 0 && !bEndOfCell &&
!rHTMLWrt.IsHTMLMode(HTMLMODE_NO_BR_AT_PAREND) )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_linebreak );
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
}
@@ -2723,23 +2723,23 @@ Writer& OutHTML_SwTxtNode( Writer& rWrt, const SwCntntNode& rNode )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_clear) += '=') += pStr;
HTMLOutFuncs::Out_AsciiTag( rHTMLWrt.Strm(), sOut.GetBuffer() );
- rHTMLWrt.bClearLeft = FALSE;
- rHTMLWrt.bClearRight = FALSE;
+ rHTMLWrt.bClearLeft = sal_False;
+ rHTMLWrt.bClearRight = sal_False;
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
}
// wenn ein LF nicht schon erlaubt ist wird es erlaubt, wenn der
// Absatz mit einem ' ' endet
if( !rHTMLWrt.bLFPossible && !rHTMLWrt.nLastParaToken &&
nEnde > 0 && ' ' == rStr.GetChar(nEnde-1) )
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
OutHTML_SwFmtOff( rWrt, aFmtInfo );
// eventuell eine Form schliessen
- rHTMLWrt.OutForm( FALSE );
+ rHTMLWrt.OutForm( sal_False );
if( bPageBreakBehind )
rWrt.Strm() << '\f';
@@ -2800,7 +2800,7 @@ static Writer& OutHTML_SvxColor( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_Color( rWrt.Strm(), aColor, rHTMLWrt.eDestEnc ) << '>';
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
return rWrt;
}
@@ -2844,7 +2844,7 @@ static Writer& OutHTML_SvxFont( Writer& rWrt, const SfxPoolItem& rHt )
<< "\">";
}
else
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font , sal_False );
return rWrt;
}
@@ -2860,8 +2860,8 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
ByteString sOut( '<' );
sOut += OOO_STRING_SVTOOLS_HTML_font;
- UINT32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
- USHORT nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
+ sal_uInt32 nHeight = ((const SvxFontHeightItem&)rHt).GetHeight();
+ sal_uInt16 nSize = rHTMLWrt.GetHTMLFontSize( nHeight );
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_size) += '=')
+= ByteString::CreateFromInt32( nSize );
rWrt.Strm() << sOut.GetBuffer();
@@ -2877,7 +2877,7 @@ static Writer& OutHTML_SvxFontHeight( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_font, sal_False );
}
return rWrt;
@@ -2903,7 +2903,7 @@ static Writer& OutHTML_SvxLanguage( Writer& rWrt, const SfxPoolItem& rHt )
}
else
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
return rWrt;
@@ -3014,14 +3014,14 @@ static Writer& OutHTML_SwFlyCnt( Writer& rWrt, const SfxPoolItem& rHt )
SwHTMLFrmType eType =
(SwHTMLFrmType)rHTMLWrt.GuessFrmType( rFmt, pSdrObj );
- BYTE nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
+ sal_uInt8 nMode = aHTMLOutFrmAsCharTable[eType][rHTMLWrt.nExportMode];
rHTMLWrt.OutFrmFmt( nMode, rFmt, pSdrObj );
return rWrt;
}
// Das ist jetzt unser Blink-Item. Blinkend wird eingeschaltet, indem man
-// das Item auf TRUE setzt!
+// das Item auf sal_True setzt!
static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -3041,13 +3041,13 @@ static Writer& OutHTML_SwBlink( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
}
-Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
+Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, sal_Bool bOn )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aURL( rINetFmt.GetValue() );
const SvxMacroTableDtor *pMacTable = rINetFmt.GetMacroTbl();
- BOOL bEvents = pMacTable != 0 && pMacTable->Count() > 0;
+ sal_Bool bEvents = pMacTable != 0 && pMacTable->Count() > 0;
// Gibt es ueberhaupt etwas auszugeben?
if( !aURL.Len() && !bEvents && !rINetFmt.GetName().Len() )
@@ -3056,7 +3056,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
// Tag aus? Dann nur ein </A> ausgeben.
if( !bOn )
{
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -3068,7 +3068,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_NORMAL );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3079,7 +3079,7 @@ Writer& OutHTML_INetFmt( Writer& rWrt, const SwFmtINetFmt& rINetFmt, BOOL bOn )
const SwCharFmt* pFmt = rWrt.pDoc->GetCharFmtFromPool(
RES_POOLCHR_INET_VISIT );
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
{
bScriptDependent = rHTMLWrt.aChrFmtInfos[nPos]->bScriptDependent;
@@ -3177,11 +3177,11 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
// jetzt das neue aufmachen
- OutHTML_INetFmt( rWrt, rINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_True );
// und merken
const SwFmtINetFmt *pINetFmt = new SwFmtINetFmt( rINetFmt );
@@ -3191,7 +3191,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
else
{
// das
- OutHTML_INetFmt( rWrt, rINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, rINetFmt, sal_False );
OSL_ENSURE( rHTMLWrt.aINetFmts.Count(), "da fehlt doch ein URL-Attribut" );
if( rHTMLWrt.aINetFmts.Count() )
@@ -3210,7 +3210,7 @@ static Writer& OutHTML_SwFmtINetFmt( Writer& rWrt, const SfxPoolItem& rHt )
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
}
@@ -3232,7 +3232,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
}
SwHTMLFmtInfo aFmtInfo( pFmt );
- USHORT nPos;
+ sal_uInt16 nPos;
if( !rHTMLWrt.aChrFmtInfos.Seek_Entry( &aFmtInfo, &nPos ) )
return rWrt;
@@ -3281,7 +3281,7 @@ static Writer& OutHTML_SwTxtCharFmt( Writer& rWrt, const SfxPoolItem& rHt )
HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(),
pFmtInfo->aToken.Len() ? pFmtInfo->aToken.GetBuffer()
: OOO_STRING_SVTOOLS_HTML_span,
- FALSE );
+ sal_False );
}
return rWrt;
diff --git a/sw/source/filter/html/htmlbas.cxx b/sw/source/filter/html/htmlbas.cxx
index b0db17a7da3c..339b4da73042 100644
--- a/sw/source/filter/html/htmlbas.cxx
+++ b/sw/source/filter/html/htmlbas.cxx
@@ -81,26 +81,26 @@ void SwHTMLParser::NewScript()
if( aScriptURL.Len() )
{
// Den Inhalt des Script-Tags ignorieren
- bIgnoreRawData = TRUE;
+ bIgnoreRawData = sal_True;
}
}
void SwHTMLParser::EndScript()
{
- BOOL bInsIntoBasic = FALSE,
- bInsSrcIntoFld = FALSE;
+ sal_Bool bInsIntoBasic = sal_False,
+ bInsSrcIntoFld = sal_False;
switch( eScriptLang )
{
case HTML_SL_STARBASIC:
- bInsIntoBasic = TRUE;
+ bInsIntoBasic = sal_True;
break;
default:
- bInsSrcIntoFld = TRUE;
+ bInsSrcIntoFld = sal_True;
break;
}
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
aScriptSource.ConvertLineEnd();
// Ausser StarBasic und unbenutzem JavaScript jedes Script oder den
@@ -122,7 +122,7 @@ void SwHTMLParser::EndScript()
{
// Fuer JavaScript und StarBasic noch ein Basic-Modul anlegen
// Das Basic entfernt natuerlich weiterhin keine SGML-Kommentare
- RemoveSGMLComment( aScriptSource, TRUE );
+ RemoveSGMLComment( aScriptSource, sal_True );
// get library name
::rtl::OUString aLibName;
@@ -154,7 +154,7 @@ void SwHTMLParser::EndScript()
if( !aBasicModule.Len() )
{
// create module name
- BOOL bFound = TRUE;
+ sal_Bool bFound = sal_True;
while( bFound )
{
aBasicModule.AssignAscii( "Modul" );
@@ -268,8 +268,7 @@ void SwHTMLParser::InsertBasicDocEvent( rtl::OUString aEvent, const String& rNam
rtl::OUString aEventName;
- SfxEventConfiguration* pECfg = SFX_APP()->GetEventConfig();
- pECfg->ConfigureEvent( aEvent, SvxMacro( sEvent, sScriptType, eScrType ),
+ SfxEventConfiguration::ConfigureEvent( aEvent, SvxMacro( sEvent, sScriptType, eScrType ),
pDocSh );
}
@@ -278,26 +277,23 @@ void SwHTMLWriter::OutBasic()
if( !bCfgStarBasic )
return;
- SFX_APP()->EnterBasicCall();
-
BasicManager *pBasicMan = pDoc->GetDocShell()->GetBasicManager();
OSL_ENSURE( pBasicMan, "Wo ist der Basic-Manager?" );
// nur das DocumentBasic schreiben
if( !pBasicMan || pBasicMan == SFX_APP()->GetBasicManager() )
{
- SFX_APP()->LeaveBasicCall();
return;
}
// und jetzt alle StarBasic-Module und alle unbenutzen JavaSrript-Module
// ausgeben
- for( USHORT i=0; i<pBasicMan->GetLibCount(); i++ )
+ for( sal_uInt16 i=0; i<pBasicMan->GetLibCount(); i++ )
{
StarBASIC *pBasic = pBasicMan->GetLib( i );
const String& rLibName = pBasic->GetName();
SbxArray *pModules = pBasic->GetModules();
- for( USHORT j=0; j<pModules->Count(); j++ )
+ for( sal_uInt16 j=0; j<pModules->Count(); j++ )
{
const SbModule *pModule = PTR_CAST( SbModule, pModules->Get(j) );
OSL_ENSURE( pModule, "Wo ist das Modul?" );
@@ -332,8 +328,6 @@ void SwHTMLWriter::OutBasic()
eDestEnc, &aNonConvertableCharacters );
}
}
-
- SFX_APP()->LeaveBasicCall();
}
static const char* aEventNames[] =
@@ -353,7 +347,7 @@ void SwHTMLWriter::OutBasicBodyEvents()
uno::Reference < container::XNameReplace > xEvents = xSup->getEvents();
for ( sal_Int32 i=0; i<4; i++ )
{
- SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, TRUE );
+ SvxMacro* pMacro = SfxEventConfiguration::ConvertToMacro( xEvents->getByName( ::rtl::OUString::createFromAscii(aEventNames[i]) ), pDocSh, sal_True );
if ( pMacro )
pDocTable->Insert( aBodyEventTable[i].nEvent, pMacro );
}
diff --git a/sw/source/filter/html/htmlcss1.cxx b/sw/source/filter/html/htmlcss1.cxx
index 91d535cf24c6..a8b8d5b03411 100644
--- a/sw/source/filter/html/htmlcss1.cxx
+++ b/sw/source/filter/html/htmlcss1.cxx
@@ -89,9 +89,9 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc );
// Implementierung des SwCSS1Parsers (eigentlich swcss1.cxx)
static struct SwCSS1ItemIds
{
- USHORT nFmtBreak;
- USHORT nFmtPageDesc;
- USHORT nFmtKeep;
+ sal_uInt16 nFmtBreak;
+ sal_uInt16 nFmtPageDesc;
+ sal_uInt16 nFmtKeep;
SwCSS1ItemIds() :
nFmtBreak( RES_BREAK ),
@@ -104,8 +104,8 @@ static struct SwCSS1ItemIds
void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
const SwPageDesc& rNewPageDesc )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
- USHORT i;
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 i;
for( i=0; i<nPageDescs; i++ )
if( pPageDesc == &(const_cast<const SwDoc *>(pDoc)->GetPageDesc(i)) )
{
@@ -116,22 +116,22 @@ void SwCSS1Parser::ChgPageDesc( const SwPageDesc *pPageDesc,
OSL_ENSURE( i<nPageDescs, "Seitenvorlage nicht gefunden" );
}
-SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, BOOL bNewDoc ) :
+SwCSS1Parser::SwCSS1Parser( SwDoc *pD, sal_uInt32 aFHeights[7], const String& rBaseURL, sal_Bool bNewDoc ) :
SvxCSS1Parser( pD->GetAttrPool(), rBaseURL, MM50/2,
- (USHORT*)&aItemIds, sizeof(aItemIds) / sizeof(USHORT) ),
+ (sal_uInt16*)&aItemIds, sizeof(aItemIds) / sizeof(sal_uInt16) ),
pDoc( pD ),
nDropCapCnt( 0 ),
bIsNewDoc( bNewDoc ),
- bBodyBGColorSet( FALSE ),
- bBodyBackgroundSet( FALSE ),
- bBodyTextSet( FALSE ),
- bBodyLinkSet( FALSE ),
- bBodyVLinkSet( FALSE ),
- bSetFirstPageDesc( FALSE ),
- bSetRightPageDesc( FALSE ),
- bTableHeaderTxtCollSet( FALSE ),
- bTableTxtCollSet( FALSE ),
- bLinkCharFmtsSet( FALSE )
+ bBodyBGColorSet( sal_False ),
+ bBodyBackgroundSet( sal_False ),
+ bBodyTextSet( sal_False ),
+ bBodyLinkSet( sal_False ),
+ bBodyVLinkSet( sal_False ),
+ bSetFirstPageDesc( sal_False ),
+ bSetRightPageDesc( sal_False ),
+ bTableHeaderTxtCollSet( sal_False ),
+ bTableTxtCollSet( sal_False ),
+ bLinkCharFmtsSet( sal_False )
{
aFontHeights[0] = aFHeights[0];
aFontHeights[1] = aFHeights[1];
@@ -150,29 +150,29 @@ SwCSS1Parser::~SwCSS1Parser()
/* */
// Feature: PrintExt
-BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
+sal_Bool SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo )
{
SvxBreak eBreak = SVX_BREAK_NONE;
- BOOL bKeep = FALSE;
- BOOL bSetKeep = FALSE, bSetBreak = FALSE, bSetPageDesc = FALSE;
+ sal_Bool bKeep = sal_False;
+ sal_Bool bSetKeep = sal_False, bSetBreak = sal_False, bSetPageDesc = sal_False;
const SwPageDesc *pPageDesc = 0;
switch( rPropInfo.ePageBreakBefore )
{
case SVX_CSS1_PBREAK_ALWAYS:
eBreak = SVX_BREAK_PAGE_BEFORE;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_LEFT:
- pPageDesc = GetLeftPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetLeftPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_RIGHT:
- pPageDesc = GetRightPageDesc( TRUE );
- bSetPageDesc = TRUE;
+ pPageDesc = GetRightPageDesc( sal_True );
+ bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetPageDesc = TRUE;
+ bSetBreak = bSetPageDesc = sal_True;
break;
default:
;
@@ -184,13 +184,13 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
case SVX_CSS1_PBREAK_RIGHT:
// LEFT/RIGHT koennte man auch am Absatz davor setzen
eBreak = SVX_BREAK_PAGE_AFTER;
- bSetBreak = TRUE;
+ bSetBreak = sal_True;
break;
case SVX_CSS1_PBREAK_AUTO:
- bSetBreak = bSetKeep = bSetPageDesc = TRUE;
+ bSetBreak = bSetKeep = bSetPageDesc = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bKeep = bSetKeep = TRUE;
+ bKeep = bSetKeep = sal_True;
break;
default:
;
@@ -210,11 +210,11 @@ BOOL SwCSS1Parser::SetFmtBreak( SfxItemSet& rItemSet,
static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
{
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -225,7 +225,7 @@ static void SetCharFmtAttrs( SwCharFmt *pCharFmt, SfxItemSet& rItemSet )
pCharFmt->SetFmtAttr( rItemSet );
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// Ein Brush-Item mit RES_BACKGROUND muss noch in eines mit
// RES_CHRATR_BACKGROUND gewandelt werden
@@ -246,8 +246,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
bBodyLinkSet |= bColorSet;
@@ -264,8 +264,8 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pUnvisited )
pUnvisited = GetCharFmtFromPool( RES_POOLCHR_INET_NORMAL );
SetCharFmtAttrs( pUnvisited, rItemSet );
@@ -279,15 +279,15 @@ void SwCSS1Parser::SetLinkCharFmts()
if( pStyleEntry )
{
SfxItemSet& rItemSet = pStyleEntry->GetItemSet();
- BOOL bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
- FALSE));
+ sal_Bool bColorSet = (SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,
+ sal_False));
if( !pVisited )
pVisited = GetCharFmtFromPool( RES_POOLCHR_INET_VISIT );
SetCharFmtAttrs( pVisited, rItemSet );
bBodyVLinkSet |= bColorSet;
}
- bLinkCharFmtsSet = TRUE;
+ bLinkCharFmtsSet = sal_True;
}
static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
@@ -302,8 +302,8 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rPropInfo.bTextIndent) &&
(!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin ||
!rPropInfo.bTextIndent) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,TRUE,&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_LR_SPACE,sal_True,&pCollItem) &&
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -321,9 +321,9 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
(!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,TRUE,
+ SFX_ITEM_SET == rCollItemSet.GetItemState(RES_UL_SPACE,sal_True,
&pCollItem) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -336,11 +336,11 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
rItemSet.Put( aULItem );
}
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
((const SvxFontHeightItem *)pItem)->GetProp() != 100)
{
@@ -356,12 +356,12 @@ static void SetTxtCollAttrs( SwTxtFmtColl *pColl, SfxItemSet& rItemSet,
pColl->SetFmtAttr( rItemSet );
}
-void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
+void SwCSS1Parser::SetTableTxtColl( sal_Bool bHeader )
{
OSL_ENSURE( !(bHeader ? bTableHeaderTxtCollSet : bTableTxtCollSet),
"Aufruf von SetTableTxtColl unnoetig" );
- USHORT nPoolId;
+ sal_uInt16 nPoolId;
String sTag;
if( bHeader )
{
@@ -398,9 +398,9 @@ void SwCSS1Parser::SetTableTxtColl( BOOL bHeader )
}
if( bHeader )
- bTableHeaderTxtCollSet = TRUE;
+ bTableHeaderTxtCollSet = sal_True;
else
- bTableTxtCollSet = TRUE;
+ bTableTxtCollSet = sal_True;
}
void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
@@ -409,54 +409,54 @@ void SwCSS1Parser::SetPageDescAttrs( const SvxBrushItem *pBrush,
SvxBrushItem aBrushItem( RES_BACKGROUND );
SvxBoxItem aBoxItem( RES_BOX );
SvxFrameDirectionItem aFrmDirItem(FRMDIR_ENVIRONMENT, RES_FRAMEDIR);
- BOOL bSetBrush = pBrush!=0, bSetBox = FALSE, bSetFrmDir = FALSE;
+ sal_Bool bSetBrush = pBrush!=0, bSetBox = sal_False, bSetFrmDir = sal_False;
if( pBrush )
aBrushItem = *pBrush;
if( pItemSet2 )
{
const SfxPoolItem *pItem = 0;
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
// ein Hintergrund wird gesetzt
aBrushItem = *((const SvxBrushItem *)pItem);
pItemSet2->ClearItem( RES_BACKGROUND );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_BOX, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aBoxItem = *((const SvxBoxItem *)pItem);
pItemSet2->ClearItem( RES_BOX );
- bSetBox = TRUE;
+ bSetBox = sal_True;
}
- if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == pItemSet2->GetItemState( RES_FRAMEDIR, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
aFrmDirItem = *static_cast< const SvxFrameDirectionItem *>( pItem );
pItemSet2->ClearItem( RES_FRAMEDIR );
- bSetFrmDir = TRUE;
+ bSetFrmDir = sal_True;
}
}
if( bSetBrush || bSetBox || bSetFrmDir )
{
- static USHORT aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
+ static sal_uInt16 aPoolIds[] = { RES_POOLPAGE_HTML, RES_POOLPAGE_FIRST,
RES_POOLPAGE_LEFT, RES_POOLPAGE_RIGHT };
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], FALSE );
+ const SwPageDesc *pPageDesc = GetPageDesc( aPoolIds[i], sal_False );
if( pPageDesc )
{
SwPageDesc aNewPageDesc( *pPageDesc );
@@ -486,15 +486,15 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
SwFrmFmt &rMaster = aNewPageDesc.GetMaster();
const SfxItemSet& rPageItemSet = rMaster.GetAttrSet();
const SfxPoolItem *pPageItem, *pItem;
- BOOL bChanged = FALSE;
+ sal_Bool bChanged = sal_False;
// linker, rechter Rand und Erstzeilen-Einzug
if( (rPropInfo.bLeftMargin || rPropInfo.bRightMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bLeftMargin || !rPropInfo.bRightMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_LR_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -510,16 +510,16 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// oberer und unterer Rand
if( (rPropInfo.bTopMargin || rPropInfo.bBottomMargin) &&
- SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,FALSE,&pItem) )
+ SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_False,&pItem) )
{
if( (!rPropInfo.bTopMargin || !rPropInfo.bBottomMargin) &&
SFX_ITEM_SET == rPageItemSet.GetItemState(RES_UL_SPACE,
- TRUE,&pPageItem) )
+ sal_True,&pPageItem) )
{
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
@@ -535,7 +535,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( *pItem );
}
- bChanged = TRUE;
+ bChanged = sal_True;
}
// die Groesse
@@ -545,7 +545,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
{
rMaster.SetFmtAttr( SwFmtFrmSize( ATT_FIX_SIZE, rPropInfo.nWidth,
rPropInfo.nHeight ) );
- bChanged = TRUE;
+ bChanged = sal_True;
}
else
{
@@ -554,7 +554,7 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
// wird das Landscape-Flag gesetzt und evtl. die Breite/Hoehe
// vertauscht.
SwFmtFrmSize aFrmSz( rMaster.GetFrmSize() );
- BOOL bLandscape = aNewPageDesc.GetLandscape();
+ sal_Bool bLandscape = aNewPageDesc.GetLandscape();
if( ( bLandscape &&
rPropInfo.eSizeType == SVX_CSS1_STYPE_PORTRAIT ) ||
( !bLandscape &&
@@ -565,18 +565,18 @@ void SwCSS1Parser::SetPageDescAttrs( const SwPageDesc *pPageDesc,
aFrmSz.SetWidth( nTmp );
rMaster.SetFmtAttr( aFrmSz );
aNewPageDesc.SetLandscape( !bLandscape );
- bChanged = TRUE;
+ bChanged = sal_True;
}
}
}
// Geht das wirklich?
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False, &pItem ) )
{
// eine Umrandung wird gesetzt
rMaster.SetFmtAttr( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
- bChanged = TRUE;
+ bChanged = sal_True;
}
if( bChanged )
@@ -671,7 +671,7 @@ static CSS1SelectorType GetTokenAndClass( const CSS1Selector *pSelector,
return eType;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
const SfxItemSet *pParentItemSet = 0 )
@@ -723,12 +723,12 @@ static void RemoveScriptItems( SfxItemSet& rItemSet, sal_uInt16 nScript,
}
}
-BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
+sal_Bool SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
if( !bIsNewDoc )
- return TRUE;
+ return sal_True;
CSS1SelectorType eSelType = pSelector->GetType();
const CSS1Selector *pNext = pSelector->GetNext();
@@ -771,7 +771,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT != eSelType &&
CSS1_SELTYPE_ELEM_CLASS != eSelType)
- return TRUE;
+ return sal_True;
// Token und Class zu dem Selektor holen
String aToken2, aClass;
@@ -792,7 +792,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( pNext && CSS1_SELTYPE_PSEUDO == eNextType )
{
@@ -801,19 +801,19 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
String aPseudo( pNext->GetString() );
aPseudo.ToLowerAscii();
- BOOL bInsert = FALSE;
+ sal_Bool bInsert = sal_False;
switch( aPseudo.GetChar( 0 ))
{
case 'l':
if( aPseudo.EqualsAscii(sCSS1_link) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
case 'v':
if( aPseudo.EqualsAscii(sCSS1_visited) )
{
- bInsert = TRUE;
+ bInsert = sal_True;
}
break;
}
@@ -831,7 +831,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
{
InsertTag( sTmp, rItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
break;
@@ -843,16 +843,16 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// Den Hintergrund muessen wir vor dem Setzen abfragen,
// denn in SetPageDescAttrs wird er geloescht.
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,FALSE,&pItem) )
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_BACKGROUND,sal_False,&pItem) )
{
const SvxBrushItem *pBrushItem =
(const SvxBrushItem *)pItem;
/// Body has a background color, if it is not "no fill"/"auto fill"
if( pBrushItem->GetColor() != COL_TRANSPARENT )
- bBodyBGColorSet = TRUE;
+ bBodyBGColorSet = sal_True;
if( GPOS_NONE != pBrushItem->GetGraphicPos() )
- bBodyBackgroundSet = TRUE;
+ bBodyBackgroundSet = sal_True;
}
// Border and Padding
@@ -864,13 +864,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
// alle noch uebrigen Optionen koennen an der Standard-Vorlage
// gesetzt werden und gelten dann automatisch als defaults
- if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,FALSE) )
- bBodyTextSet = TRUE;
+ if( SFX_ITEM_SET==rItemSet.GetItemState(RES_CHRATR_COLOR,sal_False) )
+ bBodyTextSet = sal_True;
SetTxtCollAttrs(
GetTxtCollFromPool( RES_POOLCOLL_STANDARD ),
rItemSet, rPropInfo, this );
- return FALSE;
+ return sal_False;
}
break;
}
@@ -879,7 +879,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
!pNext && aClass.Len() >= 9 &&
('s' == aClass.GetChar(0) || 'S' == aClass.GetChar(0)) )
{
- USHORT nPoolFmtId = 0;
+ sal_uInt16 nPoolFmtId = 0;
if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdendnote_sym) )
nPoolFmtId = RES_POOLCHR_ENDNOTE;
else if( aClass.EqualsIgnoreCaseAscii(OOO_STRING_SVTOOLS_HTML_sdfootnote_sym) )
@@ -897,13 +897,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
SetCharFmtAttrs( GetCharFmtFromPool(nPoolFmtId),
aScriptItemSet);
}
- return FALSE;
+ return sal_False;
}
}
// Jetzt werden die Selektoren verarbeitet, die zu einer Absatz-Vorlage
// gehoehren
- USHORT nPoolCollId = 0;
+ sal_uInt16 nPoolCollId = 0;
switch( nToken2 )
{
case HTML_HEAD1_ON:
@@ -963,7 +963,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( CSS1_SELTYPE_ELEMENT==eSelType && !pNext )
{
InsertTag( aToken2, rItemSet, rPropInfo );
- return FALSE;
+ return sal_False;
}
else if( CSS1_SELTYPE_ELEMENT==eSelType && pNext &&
(CSS1_SELTYPE_ELEMENT==eNextType ||
@@ -980,7 +980,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( aClass.Len() || pNext )
{
- nPoolCollId = static_cast< USHORT >(
+ nPoolCollId = static_cast< sal_uInt16 >(
HTML_TABLEHEADER_ON == nToken2 ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE );
}
@@ -1001,7 +1001,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
InsertTag( sTmp, aScriptItemSet, rPropInfo );
}
- return FALSE;
+ return sal_False;
}
}
}
@@ -1040,7 +1040,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
const SfxPoolItem *pItem;
const SvxBoxItem *pBoxItem = 0;
if( SFX_ITEM_SET ==
- pColl->GetAttrSet().GetItemState(RES_BOX,TRUE,&pItem) )
+ pColl->GetAttrSet().GetItemState(RES_BOX,sal_True,&pItem) )
pBoxItem = (const SvxBoxItem *)pItem;
rPropInfo.SetBoxItem( rItemSet, MIN_BORDER_DIST, pBoxItem );
if( CSS1_SCRIPT_ALL == nScript && !pParentColl )
@@ -1105,18 +1105,18 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
}
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
// Jetzt werden die Selektoten verarbeitet, die zu einer Zechenvorlage
// gehoehren. Zusammengesetzte gibt es hier allerdings nich nicht.
if( pNext )
- return TRUE;
+ return sal_True;
- SwCharFmt *pCFmt = GetChrFmt( static_cast< USHORT >(nToken2), aEmptyStr );
+ SwCharFmt *pCFmt = GetChrFmt( static_cast< sal_uInt16 >(nToken2), aEmptyStr );
if( pCFmt )
{
SwCharFmt *pParentCFmt = 0;
@@ -1130,7 +1130,7 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pParentCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1145,13 +1145,13 @@ BOOL SwCSS1Parser::StyleParsed( const CSS1Selector *pSelector,
pParentCFmt ? &pParentCFmt->GetAttrSet() : 0 );
SetCharFmtAttrs( pCFmt, aScriptItemSet );
}
- return FALSE;
+ return sal_False;
}
- return TRUE;
+ return sal_True;
}
-sal_uInt32 SwCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SwCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
return aFontHeights[ nSize>6 ? 6 : nSize ];
}
@@ -1173,10 +1173,10 @@ const FontList *SwCSS1Parser::GetFontList() const
/* */
-SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
+SwCharFmt* SwCSS1Parser::GetChrFmt( sal_uInt16 nToken2, const String& rClass ) const
{
// die entsprechende Vorlage suchen
- USHORT nPoolId = 0;
+ sal_uInt16 nPoolId = 0;
const sal_Char* sName = 0;
switch( nToken2 )
{
@@ -1217,7 +1217,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( sCName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
}
@@ -1242,7 +1242,7 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
if( pClass )
{
pCFmt = pDoc->MakeCharFmt( aTmp, pCFmt );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
SfxItemSet aItemSet( pClass->GetItemSet() );
SetCharFmtAttrs( pCFmt, aItemSet );
}
@@ -1255,16 +1255,16 @@ SwCharFmt* SwCSS1Parser::GetChrFmt( USHORT nToken2, const String& rClass ) const
/* */
-SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
+SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetTxtFmtColls()->Count();
SwTxtFmtColl *pColl = pDoc->GetTxtCollFromPool( nPoolId, false );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i],
GetDfltEncoding() );
}
@@ -1272,17 +1272,17 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtCollFromPool( USHORT nPoolId ) const
return pColl;
}
-SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
+SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( sal_uInt16 nPoolId ) const
{
- USHORT nOldArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nOldArrLen = pDoc->GetCharFmts()->Count();
SwCharFmt *pCharFmt = pDoc->GetCharFmtFromPool( nPoolId );
if( bIsNewDoc )
{
- USHORT nArrLen = pDoc->GetCharFmts()->Count();
+ sal_uInt16 nArrLen = pDoc->GetCharFmts()->Count();
- for( USHORT i=nOldArrLen; i<nArrLen; i++ )
+ for( sal_uInt16 i=nOldArrLen; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetCharFmts())[i],
GetDfltEncoding() );
}
@@ -1290,7 +1290,7 @@ SwCharFmt *SwCSS1Parser::GetCharFmtFromPool( USHORT nPoolId ) const
return pCharFmt;
}
-SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
+SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( sal_uInt16 nTxtColl,
const String& rClass )
{
SwTxtFmtColl* pColl = 0;
@@ -1357,7 +1357,7 @@ SwTxtFmtColl *SwCSS1Parser::GetTxtFmtColl( USHORT nTxtColl,
SfxItemSet aItemSet( pClass->GetItemSet() );
SvxCSS1PropertyInfo aPropInfo( pClass->GetPropertyInfo() );
aPropInfo.SetBoxItem( aItemSet, MIN_BORDER_DIST );
- BOOL bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
+ sal_Bool bPositioned = MayBePositioned( pClass->GetPropertyInfo() );
if( bPositioned )
aItemSet.ClearItem( RES_BACKGROUND );
SetTxtCollAttrs( pColl, aItemSet, aPropInfo,
@@ -1378,9 +1378,9 @@ SwPageDesc *SwCSS1Parser::GetMasterPageDesc()
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
}
-static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
+static SwPageDesc *FindPageDesc( SwDoc *pDoc, sal_uInt16 nPoolId, sal_uInt16& rPage )
{
- USHORT nPageDescs = pDoc->GetPageDescCnt();
+ sal_uInt16 nPageDescs = pDoc->GetPageDescCnt();
for( rPage=0; rPage < nPageDescs &&
const_cast<const SwDoc *>(pDoc)->
GetPageDesc(rPage).GetPoolFmtId() != nPoolId; rPage++ )
@@ -1389,12 +1389,12 @@ static SwPageDesc *FindPageDesc( SwDoc *pDoc, USHORT nPoolId, USHORT& rPage )
return rPage < nPageDescs ? &pDoc->_GetPageDesc( rPage ) : 0;
}
-const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
+const SwPageDesc *SwCSS1Parser::GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate )
{
if( RES_POOLPAGE_HTML == nPoolId )
return pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- USHORT nPage;
+ sal_uInt16 nPage;
const SwPageDesc *pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
if( !pPageDesc && bCreate )
{
@@ -1414,11 +1414,11 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
pPageDesc = FindPageDesc( pDoc, nPoolId, nPage );
OSL_ENSURE( pPageDesc==pNewPageDesc, "Seitenvorlage nicht gefunden" );
- pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, FALSE );
+ pDoc->CopyPageDesc( *pMasterPageDesc, *pNewPageDesc, sal_False );
// Die Vorlagen an ihren neuen Zweck anpassen.
const SwPageDesc *pFollow = 0;
- BOOL bSetFollowFollow = FALSE;
+ sal_Bool bSetFollowFollow = sal_False;
switch( nPoolId )
{
case RES_POOLPAGE_FIRST:
@@ -1433,7 +1433,7 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Wenn die linke Vorlage schon angelegt ist, passiert hier gar
// nichts. Sonst wird die linke Vorlage angelegt und sorgt auch
// fuer die richtige Verkettung mit der rechten Voralge.
- GetLeftPageDesc( TRUE );
+ GetLeftPageDesc( sal_True );
break;
case RES_POOLPAGE_LEFT:
@@ -1441,8 +1441,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
// Es findet aber keine Verkettung statt.
// Wenn schon eine erste Seitenvorlage existiert, wird die linke
// Vorlage die Folge-Vorlage der ersten Seite.
- pFollow = GetRightPageDesc( TRUE );
- bSetFollowFollow = TRUE;
+ pFollow = GetRightPageDesc( sal_True );
+ bSetFollowFollow = sal_True;
{
const SwPageDesc *pFirstPageDesc = GetFirstPageDesc();
if( pFirstPageDesc )
@@ -1475,8 +1475,8 @@ const SwPageDesc *SwCSS1Parser::GetPageDesc( USHORT nPoolId, BOOL bCreate )
}
-BOOL SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth )
+sal_Bool SwCSS1Parser::MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth )
{
// abs-pos
// left/top none auto twip perc
@@ -1519,12 +1519,12 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
{
// die Anzahl der Zeilen entspricht in etwa einer %-Angabe
// fuer die Hoehe (was passiert mit absoluten Hoehen???)
- BYTE nLines = rDrop.GetLines();
+ sal_uInt8 nLines = rDrop.GetLines();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_CHRATR_FONTSIZE, sal_False, &pItem ) )
{
- USHORT nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
- nLines = (BYTE)((nProp + 50) / 100);
+ sal_uInt16 nProp = ((const SvxFontHeightItem *)pItem)->GetProp();
+ nLines = (sal_uInt8)((nProp + 50) / 100);
if( nLines < 1 )
nLines = 1;
else if( nLines > MAX_DROPCAP_LINES )
@@ -1548,9 +1548,9 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
rDrop.GetLines() = nLines;
// ein rechter Rand wird der Abstand zum Text!
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_False, &pItem ) )
{
- rDrop.GetDistance() = static_cast< USHORT >(
+ rDrop.GetDistance() = static_cast< sal_uInt16 >(
((const SvxLRSpaceItem *)pItem)->GetRight() );
rItemSet.ClearItem( RES_LR_SPACE );
}
@@ -1581,7 +1581,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
if( !pCFmt )
{
pCFmt = pDoc->MakeCharFmt( aName, pDoc->GetDfltCharFmt() );
- pCFmt->SetAuto( FALSE );
+ pCFmt->SetAuto( sal_False );
}
SetCharFmtAttrs( pCFmt, rItemSet );
@@ -1596,7 +1596,7 @@ void SwCSS1Parser::FillDropCap( SwFmtDrop& rDrop,
// CSS1-sezifisches des SwHTMLParsers
-_HTMLAttr **SwHTMLParser::GetAttrTabEntry( USHORT nWhich )
+_HTMLAttr **SwHTMLParser::GetAttrTabEntry( sal_uInt16 nWhich )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
_HTMLAttr **ppAttr = 0;
@@ -1724,7 +1724,7 @@ void SwHTMLParser::NewStyle()
String sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
if( HTML_O_TYPE==pOption->GetToken() )
@@ -1737,7 +1737,7 @@ void SwHTMLParser::NewStyle()
void SwHTMLParser::EndStyle()
{
- bIgnoreRawData = FALSE;
+ bIgnoreRawData = sal_False;
if( aStyleSource.Len() )
{
@@ -1746,14 +1746,14 @@ void SwHTMLParser::EndStyle()
}
}
-BOOL SwHTMLParser::FileDownload( const String& rURL,
+sal_Bool SwHTMLParser::FileDownload( const String& rURL,
String& rStr )
{
// View wegschmeissen (wegen Reschedule)
ViewShell *pOldVSh = CallEndAction();
// Ein Medium anlegen
- SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, FALSE );
+ SfxMedium aDLMedium( rURL, STREAM_READ | STREAM_SHARE_DENYWRITE, sal_False );
// Medium registrieren, damit abgebrochen werden kann
if( pDoc->GetDocShell() )
@@ -1801,7 +1801,7 @@ BOOL SwHTMLParser::FileDownload( const String& rURL,
void SwHTMLParser::InsertLink()
{
- BOOL bFinishDownload = FALSE;
+ sal_Bool bFinishDownload = sal_False;
if( pPendStack )
{
OSL_ENSURE( ShouldFinishFileDownload(),
@@ -1812,14 +1812,14 @@ void SwHTMLParser::InsertLink()
pPendStack = pTmp;
OSL_ENSURE( !pPendStack, "Wo kommt der Pending-Stack her?" );
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
String sRel, sHRef, sType;
const HTMLOptions *pOptions2 = GetOptions();
- for( USHORT i = pOptions2->Count(); i; )
+ for( sal_uInt16 i = pOptions2->Count(); i; )
{
const HTMLOption *pOption = (*pOptions2)[--i];
switch( pOption->GetToken() )
@@ -1848,7 +1848,7 @@ void SwHTMLParser::InsertLink()
{
// Der Style wurde synchron geladen und wir koennen
// es direkt aufrufen.
- bFinishDownload = TRUE;
+ bFinishDownload = sal_True;
}
else
{
@@ -1876,15 +1876,15 @@ void SwHTMLParser::InsertLink()
}
}
-BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SwCSS1Parser::ParseStyleSheet( const String& rIn )
{
if( !SvxCSS1Parser::ParseStyleSheet( rIn ) )
- return FALSE;
+ return sal_False;
SwPageDesc *pMasterPageDesc =
pDoc->GetPageDescFromPool( RES_POOLPAGE_HTML, false );
- SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, FALSE );
+ SvxCSS1MapEntry *pPageEntry = GetPage( aEmptyStr, sal_False );
if( pPageEntry )
{
// @page (wirkt auf alle Seiten, die es schon gibt
@@ -1904,31 +1904,31 @@ BOOL SwCSS1Parser::ParseStyleSheet( const String& rIn )
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_first), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetFirstPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetFirstPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetFirstPageDesc = TRUE;
+ bSetFirstPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_right), sal_True );
if( pPageEntry )
{
- SetPageDescAttrs( GetRightPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetRightPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- bSetRightPageDesc = TRUE;
+ bSetRightPageDesc = sal_True;
}
- pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), TRUE );
+ pPageEntry = GetPage( String::CreateFromAscii(sCSS1_left), sal_True );
if( pPageEntry )
- SetPageDescAttrs( GetLeftPageDesc(TRUE), pPageEntry->GetItemSet(),
+ SetPageDescAttrs( GetLeftPageDesc(sal_True), pPageEntry->GetItemSet(),
pPageEntry->GetPropertyInfo() );
- return TRUE;
+ return sal_True;
}
-BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
+sal_Bool SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String &rId,
const String &rClass,
SfxItemSet &rItemSet,
@@ -1936,7 +1936,7 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
const String *pLang,
const String *pDir )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.Len() )
{
@@ -1947,8 +1947,8 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
{
pCSS1Parser->MergeStyles( pClass->GetItemSet(),
pClass->GetPropertyInfo(),
- rItemSet, rPropInfo, FALSE );
- bRet = TRUE;
+ rItemSet, rPropInfo, sal_False );
+ bRet = sal_True;
}
}
@@ -1960,13 +1960,13 @@ BOOL SwHTMLParser::ParseStyleOptions( const String &rStyle,
pId->GetPropertyInfo(),
rItemSet, rPropInfo, rClass.Len()!=0 );
rPropInfo.aId = rId;
- bRet = TRUE;
+ bRet = sal_True;
}
if( rStyle.Len() )
{
pCSS1Parser->ParseStyleOption( rStyle, rItemSet, rPropInfo );
- bRet = TRUE;
+ bRet = sal_True;
}
if( bRet )
@@ -2030,7 +2030,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
// sie nicht schon in einem Rahmen stehen und sonst
// Rahmengebunden.
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
aAnchor.SetType( FLY_AT_FLY );
@@ -2090,7 +2090,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
if( nCntnt )
pPam->Move( fnMoveForward );
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -2118,15 +2118,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( const SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo &rPropInfo,
SfxItemSet &rFrmItemSet,
- SwTwips nDfltWidth, BYTE nDfltPrcWidth )
+ SwTwips nDfltWidth, sal_uInt8 nDfltPrcWidth )
{
SwFrmSize eSize = ATT_MIN_SIZE;
SwTwips nWidth = nDfltWidth, nHeight = MINFLY;
- BYTE nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = nDfltPrcWidth, nPrcHeight = 0;
switch( rPropInfo.eWidthType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcWidth = rPropInfo.nWidth > 0 ? (BYTE)rPropInfo.nWidth : 1;
+ nPrcWidth = rPropInfo.nWidth > 0 ? (sal_uInt8)rPropInfo.nWidth : 1;
nWidth = MINFLY;
break;
case SVX_CSS1_LTYPE_TWIP:
@@ -2139,7 +2139,7 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
switch( rPropInfo.eHeightType )
{
case SVX_CSS1_LTYPE_PERCENTAGE:
- nPrcHeight = rPropInfo.nHeight > 0 ? (BYTE)rPropInfo.nHeight : 1;
+ nPrcHeight = rPropInfo.nHeight > 0 ? (sal_uInt8)rPropInfo.nHeight : 1;
break;
case SVX_CSS1_LTYPE_TWIP:
// Netscape und MS-IE interpretieren die Hoehe regelwiedrig
@@ -2158,12 +2158,12 @@ void SwHTMLParser::SetVarSize( SfxItemSet & /*rItemSet*/,
void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo & /*rPropInfo*/,
- USHORT nFlags,
+ sal_uInt16 nFlags,
SfxItemSet &rFrmItemSet )
{
const SfxPoolItem *pItem;
if( (nFlags & HTML_FF_BOX) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BOX, sal_True, &pItem ) )
{
if( (nFlags & HTML_FF_PADDING) == 0 )
{
@@ -2180,14 +2180,14 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
}
if( (nFlags & HTML_FF_BACKGROUND) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_BACKGROUND, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_BACKGROUND );
}
if( (nFlags & HTML_FF_DIRECTION) != 0 &&
- SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, TRUE, &pItem ) )
+ SFX_ITEM_SET==rItemSet.GetItemState( RES_FRAMEDIR, sal_True, &pItem ) )
{
rFrmItemSet.Put( *pItem );
rItemSet.ClearItem( RES_FRAMEDIR );
@@ -2197,23 +2197,23 @@ void SwHTMLParser::SetFrmFmtAttrs( SfxItemSet &rItemSet,
/* */
-_HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
- BOOL bRemove )
+_HTMLAttrContext *SwHTMLParser::PopContext( sal_uInt16 nToken, sal_uInt16 nLimit,
+ sal_Bool bRemove )
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( nPos <= nContextStMin )
return 0;
- BOOL bFound = 0==nToken;
+ sal_Bool bFound = 0==nToken;
if( nToken )
{
// Stack-Eintrag zu dem Token suchen
while( nPos > nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
if( nCntxtToken == nToken )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else if( nCntxtToken == nLimit ) // 0 als Token kommt nicht vor
@@ -2238,16 +2238,16 @@ _HTMLAttrContext *SwHTMLParser::PopContext( USHORT nToken, USHORT nLimit,
return pCntxt;
}
-BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContext( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent,
- BOOL bIgnoreTopContext ) const
+ sal_Bool bIgnoreTopContext ) const
{
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
if( bIgnoreTopContext )
{
if( !nPos )
- return FALSE;
+ return sal_False;
else
nPos--;
}
@@ -2258,22 +2258,22 @@ BOOL SwHTMLParser::GetMarginsFromContext( USHORT& nLeft,
if( pCntxt->IsLRSpaceChanged() )
{
pCntxt->GetMargins( nLeft, nRight, nIndent );
- return TRUE;
+ return sal_True;
}
}
- return FALSE;
+ return sal_False;
}
-BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
- USHORT& nRight,
+sal_Bool SwHTMLParser::GetMarginsFromContextWithNumBul( sal_uInt16& nLeft,
+ sal_uInt16& nRight,
short& nIndent ) const
{
- BOOL bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
+ sal_Bool bRet = GetMarginsFromContext( nLeft, nRight, nIndent );
const SwHTMLNumRuleInfo& rInfo = ((SwHTMLParser*)this)->GetNumInfo();
if( rInfo.GetDepth() )
{
- BYTE nLevel = (BYTE)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
+ sal_uInt8 nLevel = (sal_uInt8)( (rInfo.GetDepth() <= MAXLEVEL ? rInfo.GetDepth()
: MAXLEVEL) - 1 );
const SwNumFmt& rNumFmt = rInfo.GetNumRule()->Get(nLevel);
nLeft = nLeft + rNumFmt.GetAbsLSpace();
@@ -2283,13 +2283,13 @@ BOOL SwHTMLParser::GetMarginsFromContextWithNumBul( USHORT& nLeft,
return bRet;
}
-void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
- USHORT& nLower ) const
+void SwHTMLParser::GetULSpaceFromContext( sal_uInt16& nUpper,
+ sal_uInt16& nLower ) const
{
- USHORT nDfltColl = 0;
+ sal_uInt16 nDfltColl = 0;
String aDfltClass;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( nPos > nContextStAttrMin )
{
const _HTMLAttrContext *pCntxt = aContexts[--nPos];
@@ -2316,10 +2316,10 @@ void SwHTMLParser::GetULSpaceFromContext( USHORT& nUpper,
nLower = rULSpace.GetLower();
}
-void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
+void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, sal_Bool bRemove )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
_HTMLAttr *pAttr = rAttrs[i];
@@ -2333,7 +2333,7 @@ void SwHTMLParser::EndContextAttrs( _HTMLAttrContext *pContext, BOOL bRemove )
pAttr->Invalidate();
else if( nChars > MAX_DROPCAP_CHARS )
nChars = MAX_DROPCAP_CHARS;
- ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (BYTE)nChars;
+ ((SwFmtDrop&)pAttr->GetItem()).GetChars() = (sal_uInt8)nChars;
}
EndAttr( pAttr );
@@ -2351,7 +2351,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
while( pItem )
{
// den zu dem Item gehoehrenden Tabellen-Eintrag ermitteln ...
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
_HTMLAttr **ppAttr = GetAttrTabEntry( nWhich );
if( ppAttr )
@@ -2360,7 +2360,7 @@ void SwHTMLParser::InsertParaAttrs( const SfxItemSet& rItemSet )
if( RES_PARATR_BEGIN > nWhich )
(*ppAttr)->SetLikePara();
aParaAttrs.Insert( *ppAttr, aParaAttrs.Count() );
- EndAttr( *ppAttr, 0, FALSE );
+ EndAttr( *ppAttr, 0, sal_False );
}
pItem = aIter.NextItem();
@@ -2373,12 +2373,12 @@ void lcl_swcss1_setEncoding( SwFmt& rFmt, rtl_TextEncoding eEnc )
return;
const SfxItemSet& rItemSet = rFmt.GetAttrSet();
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
const SfxPoolItem *pItem;
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], FALSE,&pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aWhichIds[i], sal_False,&pItem ) )
{
const SvxFontItem& rFont = *(const SvxFontItem *)pItem;
if( RTL_TEXTENCODING_SYMBOL != rFont.GetCharSet() )
@@ -2399,9 +2399,9 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
if( bIsNewDoc )
{
// Set new encoding as pool default
- static USHORT aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT,
RES_CHRATR_CTL_FONT };
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<3; i++ )
{
const SvxFontItem& rDfltFont =
@@ -2415,7 +2415,7 @@ void SwCSS1Parser::SetDfltEncoding( rtl_TextEncoding eEnc )
}
// Change all paragraph styles that do specify a font.
- USHORT nArrLen = pDoc->GetTxtFmtColls()->Count();
+ sal_uInt16 nArrLen = pDoc->GetTxtFmtColls()->Count();
for( i=1; i<nArrLen; i++ )
lcl_swcss1_setEncoding( *(*pDoc->GetTxtFmtColls())[i], eEnc );
diff --git a/sw/source/filter/html/htmlctxt.cxx b/sw/source/filter/html/htmlctxt.cxx
index f69256f453c6..3717496db121 100644
--- a/sw/source/filter/html/htmlctxt.cxx
+++ b/sw/source/filter/html/htmlctxt.cxx
@@ -63,28 +63,28 @@ class _HTMLAttrContext_SaveDoc
// wenn Attributierung nicht
// beibehalten werden soll.
- USHORT nContextStMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn der Stack
// geschuetzt werden soll.
- USHORT nContextStAttrMin; // In Umgebung gueltige Stack-
+ sal_uInt16 nContextStAttrMin; // In Umgebung gueltige Stack-
// Untergrenze, wenn die Attribute
// nicht beibehalten werden sollen.
- BOOL bStripTrailingPara : 1; // letzen Absatz entfernen?
- BOOL bKeepNumRules : 1; // Numerierung beibehalten?
- BOOL bPopStack : 1; // Stack-Elemente oberhalb des
+ sal_Bool bStripTrailingPara : 1; // letzen Absatz entfernen?
+ sal_Bool bKeepNumRules : 1; // Numerierung beibehalten?
+ sal_Bool bPopStack : 1; // Stack-Elemente oberhalb des
// zu schliessenden entfernen?
- BOOL bFixHeaderDist : 1;
- BOOL bFixFooterDist : 1;
+ sal_Bool bFixHeaderDist : 1;
+ sal_Bool bFixFooterDist : 1;
public:
_HTMLAttrContext_SaveDoc() :
pPos( 0 ), pAttrTab( 0 ),
nContextStMin( USHRT_MAX ), nContextStAttrMin( USHRT_MAX ),
- bStripTrailingPara( FALSE ), bKeepNumRules( FALSE ),
- bPopStack( FALSE ),
- bFixHeaderDist( FALSE ), bFixFooterDist( FALSE )
+ bStripTrailingPara( sal_False ), bKeepNumRules( sal_False ),
+ bPopStack( sal_False ),
+ bFixHeaderDist( sal_False ), bFixFooterDist( sal_False )
{}
~_HTMLAttrContext_SaveDoc() { delete pPos; delete pAttrTab; }
@@ -97,28 +97,28 @@ public:
void SetNumInfo( const SwHTMLNumRuleInfo& rInf ) { aNumRuleInfo.Set(rInf); }
const SwHTMLNumRuleInfo& GetNumInfo() const { return aNumRuleInfo; }
- _HTMLAttrTable *GetAttrTab( BOOL bCreate= FALSE );
+ _HTMLAttrTable *GetAttrTab( sal_Bool bCreate= sal_False );
- void SetContextStMin( USHORT nMin ) { nContextStMin = nMin; }
- USHORT GetContextStMin() const { return nContextStMin; }
+ void SetContextStMin( sal_uInt16 nMin ) { nContextStMin = nMin; }
+ sal_uInt16 GetContextStMin() const { return nContextStMin; }
- void SetContextStAttrMin( USHORT nMin ) { nContextStAttrMin = nMin; }
- USHORT GetContextStAttrMin() const { return nContextStAttrMin; }
+ void SetContextStAttrMin( sal_uInt16 nMin ) { nContextStAttrMin = nMin; }
+ sal_uInt16 GetContextStAttrMin() const { return nContextStAttrMin; }
- void SetStripTrailingPara( BOOL bSet ) { bStripTrailingPara = bSet; }
- BOOL GetStripTrailingPara() const { return bStripTrailingPara; }
+ void SetStripTrailingPara( sal_Bool bSet ) { bStripTrailingPara = bSet; }
+ sal_Bool GetStripTrailingPara() const { return bStripTrailingPara; }
- void SetKeepNumRules( BOOL bSet ) { bKeepNumRules = bSet; }
- BOOL GetKeepNumRules() const { return bKeepNumRules; }
+ void SetKeepNumRules( sal_Bool bSet ) { bKeepNumRules = bSet; }
+ sal_Bool GetKeepNumRules() const { return bKeepNumRules; }
- void SetFixHeaderDist( BOOL bSet ) { bFixHeaderDist = bSet; }
- BOOL GetFixHeaderDist() const { return bFixHeaderDist; }
+ void SetFixHeaderDist( sal_Bool bSet ) { bFixHeaderDist = bSet; }
+ sal_Bool GetFixHeaderDist() const { return bFixHeaderDist; }
- void SetFixFooterDist( BOOL bSet ) { bFixFooterDist = bSet; }
- BOOL GetFixFooterDist() const { return bFixFooterDist; }
+ void SetFixFooterDist( sal_Bool bSet ) { bFixFooterDist = bSet; }
+ sal_Bool GetFixFooterDist() const { return bFixFooterDist; }
};
-_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
+_HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( sal_Bool bCreate )
{
if( !pAttrTab && bCreate )
{
@@ -130,7 +130,7 @@ _HTMLAttrTable *_HTMLAttrContext_SaveDoc::GetAttrTab( BOOL bCreate )
/* */
-_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( BOOL bCreate )
+_HTMLAttrContext_SaveDoc *_HTMLAttrContext::GetSaveDocContext( sal_Bool bCreate )
{
if( !pSaveDocContext && bCreate )
pSaveDocContext = new _HTMLAttrContext_SaveDoc;
@@ -161,12 +161,12 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
const SwNodeIndex& rNewSttPara = rNewPos.nNode;
xub_StrLen nNewSttCnt = rNewPos.nContent.GetIndex();
- BOOL bMoveBack = FALSE;
+ sal_Bool bMoveBack = sal_False;
// alle noch offenen Attribute beenden und hinter der Tabelle
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
@@ -175,7 +175,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
_HTMLAttr *pNext = pAttr->GetNext();
_HTMLAttr *pPrev = pAttr->GetPrev();
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( !nOldEndCnt && RES_PARATR_BEGIN <= nWhich &&
pAttr->GetSttParaIdx() < pOldEndPara->GetIndex() )
{
@@ -209,7 +209,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp =
+ sal_uInt16 nTmp =
pSetAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -223,7 +223,7 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -245,10 +245,10 @@ void SwHTMLParser::SplitAttrTab( const SwPosition& rNewPos )
}
void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
- USHORT nFlags,
+ sal_uInt16 nFlags,
const SwPosition *pNewPos )
{
- _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( TRUE );
+ _HTMLAttrContext_SaveDoc *pSave = pCntxt->GetSaveDocContext( sal_True );
pSave->SetStripTrailingPara( (HTML_CNTXT_STRIP_PARA & nFlags) != 0 );
pSave->SetKeepNumRules( (HTML_CNTXT_KEEP_NUMRULE & nFlags) != 0 );
pSave->SetFixHeaderDist( (HTML_CNTXT_HEADER_DIST & nFlags) != 0 );
@@ -274,7 +274,7 @@ void SwHTMLParser::SaveDocContext( _HTMLAttrContext *pCntxt,
}
else
{
- _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( TRUE );
+ _HTMLAttrTable *pSaveAttrTab = pSave->GetAttrTab( sal_True );
SaveAttrTab( *pSaveAttrTab );
}
@@ -404,7 +404,7 @@ void SwHTMLParser::EndContext( _HTMLAttrContext *pContext )
void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
{
_HTMLAttrs &rAttrs = pContext->GetAttrs();
- for( USHORT i=0; i<rAttrs.Count(); i++ )
+ for( sal_uInt16 i=0; i<rAttrs.Count(); i++ )
{
// einfaches Loeschen reicht hier nicht, weil das
// Attribut auch aus seiner Liste ausgetragen werden
@@ -436,11 +436,11 @@ void SwHTMLParser::ClearContext( _HTMLAttrContext *pContext )
/* */
-BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
+sal_Bool SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
// Unter folgenden Umstaenden wird jetzt ein Rahmen aufgemacht:
// - das Tag wird absolut positioniert und left/top sind beide
@@ -471,20 +471,20 @@ BOOL SwHTMLParser::DoPositioning( SfxItemSet &rItemSet,
InsertFlyFrame( aFrmItemSet, pContext, rPropInfo.aId,
CONTEXT_FLAGS_ABSPOS );
- pContext->SetPopStack( TRUE );
+ pContext->SetPopStack( sal_True );
rPropInfo.aId.Erase();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL SwHTMLParser::CreateContainer( const String& rClass,
+sal_Bool SwHTMLParser::CreateContainer( const String& rClass,
SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( rClass.EqualsIgnoreCaseAscii(sCSS1_class_abs_pos) &&
pCSS1Parser->MayBePositioned( rPropInfo ) )
{
@@ -496,13 +496,13 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
SetAnchorAndAdjustment( text::VertOrientation::NONE, text::HoriOrientation::NONE,
rItemSet, rPropInfo, *pFrmItemSet );
Size aDummy(0,0);
- SetFixSize( aDummy, aDummy, FALSE, FALSE, rItemSet, rPropInfo,
+ SetFixSize( aDummy, aDummy, sal_False, sal_False, rItemSet, rPropInfo,
*pFrmItemSet );
SetSpace( aDummy, rItemSet, rPropInfo, *pFrmItemSet );
SetFrmFmtAttrs( rItemSet, rPropInfo, HTML_FF_BOX|HTML_FF_BACKGROUND|HTML_FF_DIRECTION,
*pFrmItemSet );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
@@ -513,7 +513,7 @@ BOOL SwHTMLParser::CreateContainer( const String& rClass,
void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
SvxCSS1PropertyInfo &rPropInfo,
_HTMLAttrContext *pContext,
- BOOL bCharLvl )
+ sal_Bool bCharLvl )
{
// Ein DropCap-Attribut basteln, wenn auf Zeichen-Ebene vor dem
// ersten Zeichen ein float: left vorkommt
@@ -567,16 +567,16 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
// die bisherigen Absatz-Abstaende holen (ohne die vom
// obersten Kontext, denn den veraendern wir ja gerade) ...
- USHORT nOldLeft = 0, nOldRight = 0;
+ sal_uInt16 nOldLeft = 0, nOldRight = 0;
short nOldIndent = 0;
- BOOL bIgnoreTop = aContexts.Count() > nContextStMin &&
+ sal_Bool bIgnoreTop = aContexts.Count() > nContextStMin &&
aContexts[aContexts.Count()-1] == pContext;
GetMarginsFromContext( nOldLeft, nOldRight, nOldIndent,
bIgnoreTop );
// und noch die aktuell gueltigen
- USHORT nLeft = nOldLeft, nRight = nOldRight;
+ sal_uInt16 nLeft = nOldLeft, nRight = nOldRight;
short nIndent = nOldIndent;
pContext->GetMargins( nLeft, nRight, nIndent );
@@ -595,7 +595,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nLeftMargin > nOldLeft )
nLeft = 0;
else
- nLeft = nOldLeft + static_cast< USHORT >(rPropInfo.nLeftMargin);
+ nLeft = nOldLeft + static_cast< sal_uInt16 >(rPropInfo.nLeftMargin);
}
if( rPropInfo.bRightMargin )
{
@@ -606,7 +606,7 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
-rPropInfo.nRightMargin > nOldRight )
nRight = 0;
else
- nRight = nOldRight + static_cast< USHORT >(rPropInfo.nRightMargin);
+ nRight = nOldRight + static_cast< sal_uInt16 >(rPropInfo.nRightMargin);
}
if( rPropInfo.bTextIndent )
nIndent = pLRItem->GetTxtFirstLineOfst();
@@ -620,14 +620,14 @@ void SwHTMLParser::InsertAttrs( SfxItemSet &rItemSet,
aLRItem.SetTxtLeft( nLeft );
aLRItem.SetRight( nRight );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
break;
case RES_UL_SPACE:
if( !rPropInfo.bTopMargin || !rPropInfo.bBottomMargin )
{
- USHORT nUpper = 0, nLower = 0;
+ sal_uInt16 nUpper = 0, nLower = 0;
GetULSpaceFromContext( nUpper, nLower );
SvxULSpaceItem aULSpace( *((const SvxULSpaceItem *)pItem) );
if( !rPropInfo.bTopMargin )
@@ -730,15 +730,15 @@ void SwHTMLParser::InsertAttr( _HTMLAttr **ppAttr, const SfxPoolItem & rItem,
void SwHTMLParser::SplitPREListingXMP( _HTMLAttrContext *pCntxt )
{
// PRE/Listing/XMP soll beim beenden des Kontexts beendet werden.
- pCntxt->SetFinishPREListingXMP( TRUE );
+ pCntxt->SetFinishPREListingXMP( sal_True );
// Und die jetzt gueltigen Flags sollen wieder gesetzt werden.
if( IsReadPRE() )
- pCntxt->SetRestartPRE( TRUE );
+ pCntxt->SetRestartPRE( sal_True );
if( IsReadXMP() )
- pCntxt->SetRestartXMP( TRUE );
+ pCntxt->SetRestartXMP( sal_True );
if( IsReadListing() )
- pCntxt->SetRestartListing( TRUE );
+ pCntxt->SetRestartListing( sal_True );
// PRE/Listing/XMP wird auuserdem sofort beendet
FinishPREListingXMP();
diff --git a/sw/source/filter/html/htmldraw.cxx b/sw/source/filter/html/htmldraw.cxx
index 92338694f31a..ac895745bdfa 100644
--- a/sw/source/filter/html/htmldraw.cxx
+++ b/sw/source/filter/html/htmldraw.cxx
@@ -184,7 +184,7 @@ void SwHTMLParser::InsertDrawObject( SdrObject* pNewDrawObj,
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
{
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
@@ -447,8 +447,8 @@ void SwHTMLParser::NewMarquee( HTMLTable *pCurTable )
RES_CHRATR_CTL_POSTURE, RES_CHRATR_CTL_WEIGHT,
0
};
- const SwTxtNode *pTxtNd = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ SwTxtNode const*const pTxtNd =
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode();
if( pTxtNd )
{
const SfxItemSet& rItemSet = pTxtNd->GetAnyFmtColl().GetAttrSet();
diff --git a/sw/source/filter/html/htmlfld.cxx b/sw/source/filter/html/htmlfld.cxx
index 46e0b444b6b0..3f5c753e117e 100644
--- a/sw/source/filter/html/htmlfld.cxx
+++ b/sw/source/filter/html/htmlfld.cxx
@@ -206,9 +206,9 @@ static HTMLOptionEnum aHTMLFileNameFldFmtTable[] =
/* */
-USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
+sal_uInt16 SwHTMLParser::GetNumType( const String& rStr, sal_uInt16 nDfltType )
{
- USHORT nType = nDfltType;
+ sal_uInt16 nType = nDfltType;
const HTMLOptionEnum *pOptEnums = aHTMLPageNumFldFmtTable;
while( pOptEnums->pName )
if( !rStr.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -225,14 +225,14 @@ USHORT SwHTMLParser::GetNumType( const String& rStr, USHORT nDfltType )
void SwHTMLParser::NewField()
{
- BOOL bKnownType = FALSE, bFixed = FALSE,
- bHasNumFmt = FALSE, bHasNumValue = FALSE;
- USHORT nType = 0;
+ sal_Bool bKnownType = sal_False, bFixed = sal_False,
+ bHasNumFmt = sal_False, bHasNumValue = sal_False;
+ sal_uInt16 nType = 0;
String aValue, aNumFmt, aNumValue, aName;
const HTMLOption *pSubOption=0, *pFmtOption=0;
const HTMLOptions *pHTMLOptions = GetOptions();
- USHORT i;
+ sal_uInt16 i;
for( i = pHTMLOptions->Count(); i; )
{
@@ -256,14 +256,14 @@ void SwHTMLParser::NewField()
break;
case HTML_O_SDNUM:
aNumFmt = pOption->GetString();
- bHasNumFmt = TRUE;
+ bHasNumFmt = sal_True;
break;
case HTML_O_SDVAL:
aNumValue = pOption->GetString();
- bHasNumValue = TRUE;
+ bHasNumValue = sal_True;
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
}
}
@@ -293,29 +293,29 @@ void SwHTMLParser::NewField()
const String& rCreated = xDocProps->getAuthor();
if( !rUser.Len() ||
(rChanged.Len() ? rUser != rChanged : rUser != rCreated) )
- bFixed = TRUE;
+ bFixed = sal_True;
}
}
- USHORT nWhich = nType;
+ sal_uInt16 nWhich = nType;
if( RES_DATEFLD==nType || RES_TIMEFLD==nType )
nWhich = RES_DATETIMEFLD;
SwFieldType* pType = pDoc->GetSysFldType( nWhich );
SwField *pFld = 0;
- BOOL bInsOnEndTag = FALSE;
+ sal_Bool bInsOnEndTag = sal_False;
switch( (RES_FIELDS)nType )
{
case RES_EXTUSERFLD:
if( pSubOption )
{
- USHORT nSub;
- ULONG nFmt = 0;
+ sal_uInt16 nSub;
+ sal_uLong nFmt = 0;
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
if( pSubOption->GetEnum( nSub, aHTMLExtUsrFldSubTable ) )
pFld = new SwExtUserField( (SwExtUserFieldType*)pType,
@@ -325,13 +325,13 @@ void SwHTMLParser::NewField()
case RES_AUTHORFLD:
{
- USHORT nFmt = AF_NAME;
+ sal_uInt16 nFmt = AF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLAuthorFldFmtTable );
if( bFixed )
{
nFmt |= AF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwAuthorField( (SwAuthorFieldType *)pType, nFmt );
@@ -341,10 +341,10 @@ void SwHTMLParser::NewField()
case RES_DATEFLD:
case RES_TIMEFLD:
{
- ULONG nNumFmt = 0;
- ULONG nTime = Time().GetTime(), nDate = Date().GetDate();
- USHORT nSub = 0;
- BOOL bValidFmt = FALSE;
+ sal_uLong nNumFmt = 0;
+ sal_uLong nTime = Time().GetTime(), nDate = Date().GetDate();
+ sal_uInt16 nSub = 0;
+ sal_Bool bValidFmt = sal_False;
HTMLNumFmtTblEntry * pFmtTbl;
if( RES_DATEFLD==nType )
@@ -352,14 +352,14 @@ void SwHTMLParser::NewField()
nSub = DATEFLD;
pFmtTbl = aHTMLDateFldFmtTable;
if( aValue.Len() )
- nDate = (ULONG)aValue.ToInt32();
+ nDate = (sal_uLong)aValue.ToInt32();
}
else
{
nSub = TIMEFLD;
pFmtTbl = aHTMLTimeFldFmtTable;
if( aValue.Len() )
- nTime = (ULONG)aValue.ToInt32();
+ nTime = (sal_uLong)aValue.ToInt32();
}
if( aValue.Len() )
nSub |= FIXEDFLD;
@@ -368,13 +368,13 @@ void SwHTMLParser::NewField()
if( pFmtOption )
{
const String& rFmt = pFmtOption->GetString();
- for( USHORT k = 0; pFmtTbl[k].pName; k++ )
+ for( sal_uInt16 k = 0; pFmtTbl[k].pName; k++ )
{
if( rFmt.EqualsIgnoreCaseAscii( pFmtTbl[k].pName ) )
{
nNumFmt = pFormatter->GetFormatIndex(
pFmtTbl[k].eFmt, LANGUAGE_SYSTEM);
- bValidFmt = TRUE;
+ bValidFmt = sal_True;
break;
}
}
@@ -394,7 +394,7 @@ void SwHTMLParser::NewField()
case RES_DATETIMEFLD:
if( bHasNumFmt )
{
- USHORT nSub = 0;
+ sal_uInt16 nSub = 0;
SvNumberFormatter *pFormatter = pDoc->GetNumberFormatter();
sal_uInt32 nNumFmt;
@@ -425,10 +425,10 @@ void SwHTMLParser::NewField()
case RES_PAGENUMBERFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLPageNumFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_PAGEDESC;
+ sal_uInt16 nFmt = SVX_NUM_PAGEDESC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
@@ -455,10 +455,10 @@ void SwHTMLParser::NewField()
case RES_DOCINFOFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocInfoFldSubTable ) )
{
- USHORT nExtSub = 0;
+ sal_uInt16 nExtSub = 0;
if( DI_CREATE==(SwDocInfoSubType)nSub ||
DI_CHANGE==(SwDocInfoSubType)nSub )
{
@@ -479,7 +479,7 @@ void SwHTMLParser::NewField()
bFixed &= bHasNumValue;
}
else
- bHasNumValue = FALSE;
+ bHasNumValue = sal_False;
if( nSub >= DI_INFO1 && nSub <= DI_INFO4 && aName.Len() == 0 )
{
@@ -492,7 +492,7 @@ void SwHTMLParser::NewField()
if( bFixed )
{
nSub |= DI_SUB_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwDocInfoField( (SwDocInfoFieldType *)pType,
@@ -506,10 +506,10 @@ void SwHTMLParser::NewField()
case RES_DOCSTATFLD:
if( pSubOption )
{
- USHORT nSub;
+ sal_uInt16 nSub;
if( pSubOption->GetEnum( nSub, aHTMLDocStatFldSubTable ) )
{
- USHORT nFmt = SVX_NUM_ARABIC;
+ sal_uInt16 nFmt = SVX_NUM_ARABIC;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLPageNumFldFmtTable );
pFld = new SwDocStatField( (SwDocStatFieldType *)pType,
@@ -521,13 +521,13 @@ void SwHTMLParser::NewField()
case RES_FILENAMEFLD:
{
- USHORT nFmt = FF_NAME;
+ sal_uInt16 nFmt = FF_NAME;
if( pFmtOption )
pFmtOption->GetEnum( nFmt, aHTMLFileNameFldFmtTable );
if( bFixed )
{
nFmt |= FF_FIXED;
- bInsOnEndTag = TRUE;
+ bInsOnEndTag = sal_True;
}
pFld = new SwFileNameField( (SwFileNameFieldType *)pType, nFmt );
@@ -548,7 +548,7 @@ void SwHTMLParser::NewField()
pDoc->InsertPoolItem( *pPam, SwFmtFld(*pFld), 0 );
delete pFld;
}
- bInField = TRUE;
+ bInField = sal_True;
}
}
@@ -588,7 +588,7 @@ void SwHTMLParser::EndField()
pField = 0;
}
- bInField = FALSE;
+ bInField = sal_False;
aContents.Erase();
}
@@ -603,7 +603,7 @@ void SwHTMLParser::InsertFieldText()
void SwHTMLParser::InsertCommentText( const sal_Char *pTag )
{
- BOOL bEmpty = aContents.Len() == 0;
+ sal_Bool bEmpty = aContents.Len() == 0;
if( !bEmpty )
aContents += '\n';
@@ -633,14 +633,14 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
// weniger Probleme beim Formatieren (bug #40483#)
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
SwTxtNode *pTxtNd = pPam->GetNode()->GetTxtNode();
- BOOL bMoveFwd = FALSE;
+ sal_Bool bMoveFwd = sal_False;
if( nPos>0 && pTxtNd && ' '==pTxtNd->GetTxt().GetChar(nPos-1) )
{
- bMoveFwd = TRUE;
+ bMoveFwd = sal_True;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
xub_StrLen nIdx = pPam->GetPoint()->nContent.GetIndex();
- for( USHORT i = aSetAttrTab.Count(); i > 0; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i > 0; )
{
_HTMLAttr *pAttr = aSetAttrTab[--i];
if( pAttr->GetSttParaIdx() != nNodeIdx ||
@@ -651,7 +651,7 @@ void SwHTMLParser::InsertComment( const String& rComment, const sal_Char *pTag )
RES_SCRIPTFLD == ((const SwFmtFld *)pAttr->pItem)->GetFld()
->GetTyp()->Which() )
{
- bMoveFwd = FALSE;
+ bMoveFwd = sal_False;
break;
}
}
diff --git a/sw/source/filter/html/htmlfldw.cxx b/sw/source/filter/html/htmlfldw.cxx
index e86060f85d59..1d2def315b93 100644
--- a/sw/source/filter/html/htmlfldw.cxx
+++ b/sw/source/filter/html/htmlfldw.cxx
@@ -48,7 +48,7 @@
using namespace nsSwDocInfoSubType;
-const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
+const sal_Char *SwHTMLWriter::GetNumFormat( sal_uInt16 nFmt )
{
const sal_Char *pFmtStr = 0;
@@ -71,24 +71,24 @@ const sal_Char *SwHTMLWriter::GetNumFormat( USHORT nFmt )
return pFmtStr;
}
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
const SwTxtNode& rTxtNd, xub_StrLen nFldPos )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFieldType* pFldTyp = pFld->GetTyp();
- USHORT nField = pFldTyp->Which();
- ULONG nFmt = pFld->GetFormat();
+ sal_uInt16 nField = pFldTyp->Which();
+ sal_uLong nFmt = pFld->GetFormat();
const sal_Char *pTypeStr=0, // TYPE
*pSubStr=0, // SUBTYPE
*pFmtStr=0; // FORMAT (SW)
String aValue; // VALUE (SW)
- BOOL bNumFmt=FALSE; // SDNUM (Number-Formatter-Format)
- BOOL bNumValue=FALSE; // SDVAL (Number-Formatter-Value)
+ sal_Bool bNumFmt=sal_False; // SDNUM (Number-Formatter-Format)
+ sal_Bool bNumValue=sal_False; // SDVAL (Number-Formatter-Value)
double dNumValue = 0.0; // SDVAL (Number-Formatter-Value)
- BOOL bFixed=FALSE; // SDFIXED
+ sal_Bool bFixed=sal_False; // SDFIXED
String aName; // NAME (CUSTOM)
switch( nField )
@@ -132,10 +132,10 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DATETIMEFLD:
pTypeStr = OOO_STRING_SW_HTML_FT_datetime;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
if( ((SwDateTimeField*)pFld)->IsFixed() )
{
- bNumValue = TRUE;
+ bNumValue = sal_True;
dNumValue = ((SwDateTimeField*)pFld)->GetValue();
}
break;
@@ -172,9 +172,9 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case RES_DOCINFOFLD:
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
pTypeStr = OOO_STRING_SW_HTML_FT_docinfo;
- USHORT nExtSubType = nSubType & 0x0f00;
+ sal_uInt16 nExtSubType = nSubType & 0x0f00;
nSubType &= 0x00ff;
switch( nSubType )
@@ -202,11 +202,11 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
break;
case DI_SUB_TIME:
pFmtStr = OOO_STRING_SW_HTML_FF_time;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
case DI_SUB_DATE:
pFmtStr = OOO_STRING_SW_HTML_FF_date;
- bNumFmt = TRUE;
+ bNumFmt = sal_True;
break;
}
}
@@ -219,13 +219,13 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Fixe Felder ohne Zahlenformate sollte es
// eigentlich nicht geben. OSL_ENSURE(ist unten.
dNumValue = ((const SwDocInfoField*)pFld)->GetValue();
- bNumValue = TRUE;
+ bNumValue = sal_True;
}
else if( !nFmt )
{
// Nicht fixe Felder muessen kein Zahlenformat haben,
// wenn sie aus 4.0-Dokumenten stammen.
- bNumFmt = FALSE;
+ bNumFmt = sal_False;
}
}
}
@@ -234,7 +234,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case RES_DOCSTATFLD:
{
pTypeStr = OOO_STRING_SW_HTML_FT_docstat;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch( nSubType )
{
case DS_PAGE: pSubStr = OOO_STRING_SW_HTML_FS_page; break;
@@ -306,7 +306,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
}
// Inhalt des Feldes ausgeben
- String const sExpand( pFld->ExpandField(rWrt.pDoc->IsClipBoard()) );
+ String const sExpand( pFld->ExpandField(true) );
sal_Bool bNeedsCJKProcessing = sal_False;
if( sExpand.Len() )
{
@@ -375,7 +375,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
case CSS1_OUTMODE_CTL: pWhichIds = aCTLWhichIds; break;
}
- rHTMLWrt.bTagOn = TRUE;
+ rHTMLWrt.bTagOn = sal_True;
const SfxPoolItem *aItems[5];
sal_uInt16 nItems = 0;
for( sal_uInt16 i=0; i<4; i++ )
@@ -396,7 +396,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
HTMLOutFuncs::Out_String( rWrt.Strm(), sExpand.Copy( nPos, nEndPos ),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- rHTMLWrt.bTagOn = FALSE;
+ rHTMLWrt.bTagOn = sal_False;
while( nItems )
Out( aHTMLAttrFnTab, *aItems[--nItems], rHTMLWrt );
@@ -418,7 +418,7 @@ static Writer& OutHTML_SwField( Writer& rWrt, const SwField* pFld,
// Off-Tag ausgeben
if( pTypeStr )
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_sdfield, sal_False );
return rWrt;
}
@@ -433,9 +433,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
if( RES_SETEXPFLD == pFldTyp->Which() &&
(nsSwGetSetExpType::GSE_STRING & pFld->GetSubType()) )
{
- int bOn = FALSE;
+ int bOn = sal_False;
if( pFldTyp->GetName().EqualsAscii("HTML_ON" ) )
- bOn = TRUE;
+ bOn = sal_True;
else if( !pFldTyp->GetName().EqualsAscii( "HTML_OFF" ) )
return rWrt;
@@ -454,7 +454,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// Kommentare werden im ANSI-Zeichensetz, aber mit System-Zeilen-
// Umbruechen gesschrieben.
const String& rComment = pFld->GetPar2();
- BOOL bWritten = FALSE;
+ sal_Bool bWritten = sal_False;
if( (rComment.Len() >= 6 && '<' == rComment.GetChar(0) &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -470,7 +470,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// characters not contained in the destination encoding are lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
else if( rComment.Len() >= 7 &&
'>' == rComment.GetChar(rComment.Len()-1) &&
@@ -486,7 +486,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
// lost!
ByteString sTmp( sComment, ((SwHTMLWriter&)rWrt).eDestEnc );
rWrt.Strm() << sTmp.GetBuffer();
- bWritten = TRUE;
+ bWritten = sal_True;
}
}
@@ -508,9 +508,9 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
- BOOL bURL = ((const SwScriptField *)pFld)->IsCodeURL();
+ sal_Bool bURL = ((const SwScriptField *)pFld)->IsCodeURL();
const String& rType = pFld->GetPar1();
String aContents, aURL;
if(bURL)
@@ -524,7 +524,7 @@ Writer& OutHTML_SwFmtFld( Writer& rWrt, const SfxPoolItem& rHt )
aURL, 0, 0, rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
}
else
{
diff --git a/sw/source/filter/html/htmlfly.cxx b/sw/source/filter/html/htmlfly.cxx
index 2e3b4549ae71..0fc846d0dab8 100644
--- a/sw/source/filter/html/htmlfly.cxx
+++ b/sw/source/filter/html/htmlfly.cxx
@@ -78,25 +78,25 @@ using namespace ::com::sun::star;
////////////////////////////////////////////////////////////
-const ULONG HTML_FRMOPTS_IMG_ALL =
+const sal_uLong HTML_FRMOPTS_IMG_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_IMG_CNTNR =
+const sal_uLong HTML_FRMOPTS_IMG_CNTNR =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IMG =
+const sal_uLong HTML_FRMOPTS_IMG =
HTML_FRMOPTS_IMG_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IMG_CSS1 =
+const sal_uLong HTML_FRMOPTS_IMG_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
-const ULONG HTML_FRMOPTS_DIV =
+const sal_uLong HTML_FRMOPTS_DIV =
HTML_FRMOPT_ID |
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
@@ -108,22 +108,22 @@ const ULONG HTML_FRMOPTS_DIV =
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL =
+const sal_uLong HTML_FRMOPTS_MULTICOL =
HTML_FRMOPT_ID |
HTML_FRMOPT_WIDTH |
HTML_FRMOPT_ANYSIZE |
HTML_FRMOPT_ABSSIZE |
HTML_FRMOPT_DIR;
-const ULONG HTML_FRMOPTS_MULTICOL_CNTNR =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CNTNR =
HTML_FRMOPTS_MULTICOL;
-const ULONG HTML_FRMOPTS_MULTICOL_CSS1 =
+const sal_uLong HTML_FRMOPTS_MULTICOL_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SIZE |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_BORDER|
HTML_FRMOPT_S_BACKGROUND;
-const ULONG HTML_FRMOPTS_SPACER =
+const sal_uLong HTML_FRMOPTS_SPACER =
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_ANYSIZE |
@@ -131,7 +131,7 @@ const ULONG HTML_FRMOPTS_SPACER =
HTML_FRMOPT_MARGINSIZE |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_CNTNR =
+const sal_uLong HTML_FRMOPTS_CNTNR =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE |
HTML_FRMOPT_S_WIDTH |
@@ -142,15 +142,15 @@ const ULONG HTML_FRMOPTS_CNTNR =
static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt );
static Writer& OutHTML_FrmFmtAsMulticol( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFmt );
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan );
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan );
static Writer& OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFmt,
- BOOL bInCntnr );
+ sal_Bool bInCntnr );
static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SdrObject& rSdrObj );
@@ -177,7 +177,7 @@ static HTMLOutEvent aIMapEventTable[] =
SV_IMPL_OP_PTRARR_SORT( SwHTMLPosFlyFrms, SwHTMLPosFlyFrmPtr )
-USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
+sal_uInt16 SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
const SdrObject*& rpSdrObj )
{
SwHTMLFrmType eType;
@@ -213,7 +213,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
eType = HTML_FRMTYPE_TEXT;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
const SwNode* pNd = pDoc->GetNodes()[ nStt ];
if( pNd->IsGrfNode() )
@@ -228,12 +228,12 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
else
{
- ULONG nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nEnd = pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = rFrmFmt.GetAttrSet();
if( SFX_ITEM_SET == rItemSet.GetItemState( RES_COL,
- TRUE, &pItem ) &&
+ sal_True, &pItem ) &&
((const SwFmtCol *)pItem)->GetNumCols() > 1 )
{
// spaltiger Rahmen
@@ -242,7 +242,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
else if( pNd->IsTableNode() )
{
const SwTableNode *pTblNd = pNd->GetTableNode();
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
if( nTblEnd+1 == nEnd )
{
@@ -259,17 +259,17 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
{
const SwTxtNode *pTxtNd = pNd->GetTxtNode();
- BOOL bEmpty = FALSE;
+ sal_Bool bEmpty = sal_False;
if( nStt==nEnd-1 && !pTxtNd->Len() )
{
// leerer Rahmen? Nur wenn kein Rahmen am
// Text- oder Start-Node verankert ist.
- bEmpty = TRUE;
+ bEmpty = sal_True;
if( pHTMLPosFlyFrms )
{
- for( USHORT i=0; i<pHTMLPosFlyFrms->Count(); i++ )
+ for( sal_uInt16 i=0; i<pHTMLPosFlyFrms->Count(); i++ )
{
- ULONG nIdx = (*pHTMLPosFlyFrms)[i]
+ sal_uLong nIdx = (*pHTMLPosFlyFrms)[i]
->GetNdIndex().GetIndex();
bEmpty = (nIdx != nStt) && (nIdx != nStt-1);
if( !bEmpty || nIdx > nStt )
@@ -284,7 +284,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
/// or its background color is not "no fill"/"auto fill".
if( GPOS_NONE != rBrush.GetGraphicPos() ||
rBrush.GetColor() != COL_TRANSPARENT )
- bEmpty = FALSE;
+ bEmpty = sal_False;
}
if( bEmpty )
{
@@ -305,7 +305,7 @@ USHORT SwHTMLWriter::GuessFrmType( const SwFrmFmt& rFrmFmt,
}
}
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
void SwHTMLWriter::CollectFlyFrms()
@@ -313,11 +313,11 @@ void SwHTMLWriter::CollectFlyFrms()
OSL_ENSURE( HTML_CFG_MAX+1 == MAX_BROWSERS,
"number of browser configurations has changed" );
- BYTE nSz = (BYTE)Min( pDoc->GetSpzFrmFmts()->Count(), USHORT(255) );
+ sal_uInt8 nSz = (sal_uInt8)Min( pDoc->GetSpzFrmFmts()->Count(), sal_uInt16(255) );
SwPosFlyFrms aFlyPos( nSz, nSz );
- pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, TRUE );
+ pDoc->GetAllFlyFmts( aFlyPos, bWriteAll ? 0 : pCurPam, sal_True );
- for( USHORT i=0; i< aFlyPos.Count(); i++ )
+ for( sal_uInt16 i=0; i< aFlyPos.Count(); i++ )
{
const SwFrmFmt& rFrmFmt = aFlyPos[i]->GetFmt();
const SdrObject *pSdrObj = 0;
@@ -325,7 +325,7 @@ void SwHTMLWriter::CollectFlyFrms()
const SwCntntNode *pACNd;
SwHTMLFrmType eType = (SwHTMLFrmType)GuessFrmType( rFrmFmt, pSdrObj );
- BYTE nMode;
+ sal_uInt8 nMode;
const SwFmtAnchor& rAnchor = rFrmFmt.GetAnchor();
sal_Int16 eHoriRel = rFrmFmt.GetHoriOrient().GetRelationOrient();
switch( rAnchor.GetAnchorId() )
@@ -375,21 +375,21 @@ void SwHTMLWriter::CollectFlyFrms()
}
}
-BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
+sal_Bool SwHTMLWriter::OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx, sal_uInt8 nPos,
HTMLOutContext *pContext )
{
- BOOL bFlysLeft = FALSE; // Noch Flys an aktueller Node-Position da?
+ sal_Bool bFlysLeft = sal_False; // Noch Flys an aktueller Node-Position da?
// OutFlyFrm kan rekursiv aufgerufen werden. Deshalb muss man
// manchmal wieder von vorne anfangen, nachdem ein Fly ausgegeben
// wurde.
- BOOL bRestart = TRUE;
+ sal_Bool bRestart = sal_True;
while( pHTMLPosFlyFrms && bRestart )
{
- bFlysLeft = bRestart = FALSE;
+ bFlysLeft = bRestart = sal_False;
// suche nach dem Anfang der FlyFrames
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < pHTMLPosFlyFrms->Count() &&
(*pHTMLPosFlyFrms)[i]->GetNdIndex().GetIndex() < nNdIdx; i++ )
@@ -411,7 +411,7 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
{
delete pHTMLPosFlyFrms;
pHTMLPosFlyFrms = 0;
- bRestart = TRUE; // nicht wirklich, nur raus
+ bRestart = sal_True; // nicht wirklich, nur raus
// aus der Schleife
}
@@ -429,14 +429,14 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
case HTML_OUT_SPAN:
case HTML_OUT_MULTICOL:
case HTML_OUT_TBLNODE:
- bRestart = TRUE; // Hier wird's evtl rekursiv
+ bRestart = sal_True; // Hier wird's evtl rekursiv
break;
}
delete pPosFly;
}
else
{
- bFlysLeft = TRUE;
+ bFlysLeft = sal_True;
}
}
}
@@ -444,11 +444,11 @@ BOOL SwHTMLWriter::OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx, BYTE nPos,
return bFlysLeft;
}
-void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
+void SwHTMLWriter::OutFrmFmt( sal_uInt8 nMode, const SwFrmFmt& rFrmFmt,
const SdrObject *pSdrObject )
{
- BYTE nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
- BYTE nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
+ sal_uInt8 nCntnrMode = SwHTMLPosFlyFrm::GetOutCntnr( nMode );
+ sal_uInt8 nOutMode = SwHTMLPosFlyFrm::GetOutFn(nMode);
const sal_Char *pCntnrStr = 0;
if( HTML_CNTNR_NONE != nCntnrMode )
{
@@ -466,7 +466,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
Strm() << sOut.GetBuffer();
// Fuer Nicht-Zeichenobekte eine Breite ausgeben
- ULONG nFrmFlags = HTML_FRMOPTS_CNTNR;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_CNTNR;
// Fuer spaltige Rahmen koennen wir auch noch den Hintergrund ausgeben.
if( HTML_OUT_MULTICOL == nOutMode )
@@ -480,7 +480,7 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
if( HTML_CNTNR_DIV == nCntnrMode )
{
IncIndentLevel();
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
}
}
@@ -534,11 +534,11 @@ void SwHTMLWriter::OutFrmFmt( BYTE nMode, const SwFrmFmt& rFrmFmt,
DecIndentLevel();
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
}
else if( HTML_CNTNR_SPAN == nCntnrMode )
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_span, sal_False );
}
@@ -604,7 +604,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_ALIGN) && !pStr &&
( (nFrmOpts & HTML_FRMOPT_S_ALIGN) == 0 ||
(FLY_AS_CHAR == eAnchorId) ) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_True, &pItem ))
{
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
@@ -627,7 +627,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// HSPACE und VSPACE
Size aTwipSpc( 0, 0 );
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ))
{
aTwipSpc.Width() =
( ((SvxLRSpaceItem*)pItem)->GetLeft() +
@@ -635,12 +635,12 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
nDfltLeftMargin = nDfltRightMargin = aTwipSpc.Width();
}
if( (nFrmOpts & (HTML_FRMOPT_SPACE|HTML_FRMOPT_MARGINSIZE)) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ))
{
aTwipSpc.Height() =
( ((SvxULSpaceItem*)pItem)->GetUpper() +
((SvxULSpaceItem*)pItem)->GetLower() ) / 2;
- nDfltTopMargin = nDfltBottomMargin = (USHORT)aTwipSpc.Height();
+ nDfltTopMargin = nDfltBottomMargin = (sal_uInt16)aTwipSpc.Height();
}
if( (nFrmOpts & HTML_FRMOPT_SPACE) &&
@@ -682,7 +682,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
}
if( !(nFrmOpts & HTML_FRMOPT_ABSSIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -695,13 +695,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
// WIDTH und/oder HEIGHT
// ATT_VAR_SIZE/ATT_MIN_SIZE nur ausgeben, wenn ANYSIZE gesezut ist
if( (nFrmOpts & HTML_FRMOPT_SIZE) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ) &&
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ) &&
( (nFrmOpts & HTML_FRMOPT_ANYSIZE) ||
ATT_FIX_SIZE == ((const SwFmtFrmSize *)pItem)->GetHeightSizeType()) )
{
const SwFmtFrmSize *pFSItem = (const SwFmtFrmSize *)pItem;
- BYTE nPrcWidth = pFSItem->GetWidthPercent();
- BYTE nPrcHeight = pFSItem->GetHeightPercent();
+ sal_uInt8 nPrcWidth = pFSItem->GetWidthPercent();
+ sal_uInt8 nPrcHeight = pFSItem->GetHeightPercent();
// Groesse des Objekts Twips ohne Raender
Size aTwipSz( (nPrcWidth ? 0
@@ -758,13 +758,13 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
if( (nFrmOpts & HTML_FRMOPT_BRCLEAR) &&
((FLY_AT_PARA == rFrmFmt.GetAnchor().GetAnchorId()) ||
(FLY_AT_CHAR == rFrmFmt.GetAnchor().GetAnchorId())) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_SURROUND, sal_True, &pItem ))
{
const SwFmtSurround* pSurround = (const SwFmtSurround*)pItem;
sal_Int16 eHoriOri = rFrmFmt.GetHoriOrient().GetHoriOrient();
pStr = 0;
SwSurround eSurround = pSurround->GetSurround();
- BOOL bAnchorOnly = pSurround->IsAnchorOnly();
+ sal_Bool bAnchorOnly = pSurround->IsAnchorOnly();
switch( eHoriOri )
{
case text::HoriOrientation::RIGHT:
@@ -778,7 +778,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_LEFT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearRight = TRUE;
+ bClearRight = sal_True;
break;
default:
;
@@ -799,7 +799,7 @@ void SwHTMLWriter::OutFrmFmtOptions( const SwFrmFmt &rFrmFmt,
case SURROUND_RIGHT:
case SURROUND_PARALLEL:
if( bAnchorOnly )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
break;
default:
;
@@ -832,7 +832,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
{
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, FALSE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_False );
}
String aGrfNm( rGrfName );
@@ -847,7 +847,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// das URL-Attribut nur beruecksichtigen, wenn keine Image-Map
// uebergeben wurde
if( !pAltImgMap &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_URL, sal_True, &pItem ))
{
pURLItem = (const SwFmtURL *)pItem;
}
@@ -873,17 +873,17 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
(aIMapName = aNameBase)
+= String::CreateFromInt32( rHTMLWrt.nImgMapCnt );
- BOOL bFound;
+ sal_Bool bFound;
do
{
- bFound = FALSE;
- for( USHORT i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
+ bFound = sal_False;
+ for( sal_uInt16 i=0; i<rHTMLWrt.aImgMapNames.Count(); i++ )
{
// TODO: Unicode: Comparison is case insensitive for ASCII
// characters only now!
if( aIMapName.EqualsIgnoreCaseAscii(*rHTMLWrt.aImgMapNames[i]) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -896,7 +896,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
} while( bFound );
- BOOL bScale = FALSE;
+ sal_Bool bScale = sal_False;
Fraction aScaleX( 1, 1 );
Fraction aScaleY( 1, 1 );
@@ -916,7 +916,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Width() != nWidth )
{
aScaleX = Fraction( nWidth, rRealSize.Width() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
if( !rFrmSize.GetHeightPercent() && rRealSize.Height() )
@@ -932,7 +932,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rRealSize.Height() != nHeight )
{
aScaleY = Fraction( nHeight, rRealSize.Height() );
- bScale = TRUE;
+ bScale = sal_True;
}
}
@@ -947,7 +947,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
if( rHTMLWrt.bLFPossible )
{
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
rHTMLWrt.GetIndentString( aIndMap );
rHTMLWrt.GetIndentString( aIndArea, 1 );
#if defined(UNX)
@@ -984,7 +984,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
// Attribute die ausserhelb der Grafik geschreiben werden muessen sammeln
ByteString sOut;
@@ -996,7 +996,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// URL -> <A>...<IMG ... >...</A>
const SvxMacroItem *pMacItem = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
pMacItem = (const SvxMacroItem *)pItem;
if( pURLItem || pMacItem )
@@ -1010,7 +1010,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aName = pURLItem->GetName();
aTarget = pURLItem->GetTargetFrameName();
}
- BOOL bEvents = pMacItem && pMacItem->GetMacroTable().Count();
+ sal_Bool bEvents = pMacItem && pMacItem->GetMacroTable().Count();
if( aMapURL.Len() || aName.Len() || aTarget.Len() || bEvents )
{
@@ -1066,9 +1066,9 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
}
// Umrandung -> <FONT COLOR = ...>...<IMG ... >...</FONT>
- USHORT nBorderWidth = 0;
+ sal_uInt16 nBorderWidth = 0;
if( (nFrmOpts & HTML_FRMOPT_BORDER) &&
- SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, TRUE, &pItem ))
+ SFX_ITEM_SET == rItemSet.GetItemState( RES_BOX, sal_True, &pItem ))
{
Size aTwipBorder( 0, 0 );
const SvxBoxItem* pBoxItem = (const SvxBoxItem*)pItem;
@@ -1120,7 +1120,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
aPixelBorder.Height() = 0;
nBorderWidth =
- (USHORT)(aPixelBorder.Width() + aPixelBorder.Height());
+ (sal_uInt16)(aPixelBorder.Width() + aPixelBorder.Height());
}
if( pColBorderLine )
@@ -1143,7 +1143,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// Events
sOut.Erase();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRMMACRO, sal_True, &pItem ))
{
const SvxMacroTableDtor& rMacTable =
((const SvxMacroItem *)pItem)->GetMacroTable();
@@ -1189,7 +1189,7 @@ Writer& OutHTML_Image( Writer& rWrt, const SwFrmFmt &rFrmFmt,
// werden muss
SwFmtINetFmt *pINetFmt =
rHTMLWrt.aINetFmts[ rHTMLWrt.aINetFmts.Count()-1 ];
- OutHTML_INetFmt( rWrt, *pINetFmt, TRUE );
+ OutHTML_INetFmt( rWrt, *pINetFmt, sal_True );
}
return rHTMLWrt;
@@ -1219,7 +1219,7 @@ Writer& OutHTML_BulletImage( Writer& rWrt,
// Grafik als (JPG-)File speichern
if( rHTMLWrt.GetOrigFileName() )
rGrfName = *rHTMLWrt.GetOrigFileName();
- USHORT nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( *pGrf, rGrfName,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE));
@@ -1323,11 +1323,11 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
- ULONG nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nEnd = rHTMLWrt.pDoc->GetNodes()[nStt-1]->EndOfSectionIndex();
String aCaption;
- BOOL bTopCaption = FALSE;
+ sal_Bool bTopCaption = sal_False;
// Nicht const, weil GetTable spater mal nicht const ist
SwNode *pNd = rHTMLWrt.pDoc->GetNodes()[ nStt ];
@@ -1336,13 +1336,13 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
if( !pTblNd && pTxtNd )
{
// Tabelle mit Ueberschrift
- bTopCaption = TRUE;
+ bTopCaption = sal_True;
pTblNd = rHTMLWrt.pDoc->GetNodes()[nStt+1]->GetTableNode();
}
OSL_ENSURE( pTblNd, "Rahmen enthaelt keine Tabelle" );
if( pTblNd )
{
- ULONG nTblEnd = pTblNd->EndOfSectionIndex();
+ sal_uLong nTblEnd = pTblNd->EndOfSectionIndex();
OSL_ENSURE( nTblEnd == nEnd - 1 ||
(nTblEnd == nEnd - 2 && !bTopCaption),
"Ungeuelter Rahmen-Inhalt fuer Tabelle" );
@@ -1367,7 +1367,7 @@ static Writer& OutHTML_FrmFmtTableNode( Writer& rWrt, const SwFrmFmt& rFrmFmt )
static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1386,18 +1386,18 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
const SwFmtCol& rFmtCol = rFrmFmt.GetCol();
// die Anzahl der Spalten als COLS ausgeben
- USHORT nCols = rFmtCol.GetNumCols();
+ sal_uInt16 nCols = rFmtCol.GetNumCols();
if( nCols )
(((sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_cols) += '=')
+= ByteString::CreateFromInt32( nCols );
// die Gutter-Breite (Minimalwert) als GUTTER
- USHORT nGutter = rFmtCol.GetGutterWidth( TRUE );
+ sal_uInt16 nGutter = rFmtCol.GetGutterWidth( sal_True );
if( nGutter!=USHRT_MAX )
{
if( nGutter && Application::GetDefaultDevice() )
{
- nGutter = (USHORT)Application::GetDefaultDevice()
+ nGutter = (sal_uInt16)Application::GetDefaultDevice()
->LogicToPixel( Size(nGutter,0),
MapMode(MAP_TWIP) ).Width();
}
@@ -1408,7 +1408,7 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
// WIDTH
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_MULTICOL_CNTNR
: HTML_FRMOPTS_MULTICOL;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_MULTICOL_CSS1;
@@ -1419,11 +1419,11 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rWrt.Strm() << '>';
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
rHTMLWrt.IncIndentLevel(); // den Inhalt von Multicol einruecken;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
@@ -1440,8 +1440,8 @@ static Writer & OutHTML_FrmFmtAsMulticol( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, FALSE );
- rHTMLWrt.bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_multicol, sal_False );
+ rHTMLWrt.bLFPossible = sal_True;
return rWrt;
}
@@ -1452,7 +1452,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
// wenn meoglich vor der Grafik einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
ByteString sOut('<');
((((sOut += OOO_STRING_SVTOOLS_HTML_spacer) += ' ') += OOO_STRING_SVTOOLS_HTML_O_type) += '=')
@@ -1472,7 +1472,7 @@ static Writer& OutHTML_FrmFmtAsSpacer( Writer& rWrt, const SwFrmFmt& rFrmFmt )
}
static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
- const SwFrmFmt& rFrmFmt, BOOL bSpan)
+ const SwFrmFmt& rFrmFmt, sal_Bool bSpan)
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1497,7 +1497,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << sOut.GetBuffer();
ByteString aEndTags;
- ULONG nFrmFlags = HTML_FRMOPTS_DIV;
+ sal_uLong nFrmFlags = HTML_FRMOPTS_DIV;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_BORDER_NONE ) )
nFrmFlags |= HTML_FRMOPT_S_NOBORDER;
rHTMLWrt.OutFrmFmtOptions( rFrmFmt, aEmptyStr, aEndTags, nFrmFlags );
@@ -1505,10 +1505,10 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rWrt.Strm() << '>';
rHTMLWrt.IncIndentLevel(); // den Inhalt einruecken
- rHTMLWrt.bLFPossible = TRUE;
+ rHTMLWrt.bLFPossible = sal_True;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
// Am Start-Node verankerte Rahmen-gebundene Rahmen ausgeben
rHTMLWrt.OutFlyFrm( nStt, 0, HTML_POS_ANY );
@@ -1529,7 +1529,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
if( rHTMLWrt.bLFPossible )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), pStr, sal_False );
if( aEndTags.Len() )
rWrt.Strm() << aEndTags.GetBuffer();
@@ -1538,7 +1538,7 @@ static Writer& OutHTML_FrmFmtAsDivOrSpan( Writer& rWrt,
}
static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL /*bInCntnr*/ )
+ sal_Bool /*bInCntnr*/ )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1571,12 +1571,12 @@ static Writer & OutHTML_FrmFmtAsImage( Writer& rWrt, const SwFrmFmt& rFrmFmt,
static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwGrfNode *pGrfNd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetGrfNode();
OSL_ENSURE( pGrfNd, "Grf-Node erwartet" );
if( !pGrfNd )
@@ -1590,9 +1590,9 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Grafik als File-Referenz speichern (als JPEG-Grafik speichern)
if( rHTMLWrt.GetOrigFileName() )
aGrfNm = *rHTMLWrt.GetOrigFileName();
- pGrfNd->SwapIn( TRUE );
+ pGrfNd->SwapIn( sal_True );
- ULONG nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
+ sal_uLong nFlags = XOUTBMP_USE_GIF_IF_SENSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE;
switch( rMirror.GetValue() )
{
@@ -1608,7 +1608,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aMM100Size = OutputDevice::LogicToLogic( rSize.GetSize(),
MapMode( MAP_TWIP ), MapMode( MAP_100TH_MM ));
- USHORT nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( pGrfNd->GetGrf(), aGrfNm,
String::CreateFromAscii("JPG"), nFlags, &aMM100Size );
if( nErr ) // fehlerhaft, da ist nichts auszugeben
{
@@ -1626,7 +1626,7 @@ static Writer& OutHTML_FrmFmtGrfNode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rWrt.CopyLocalFileToINet( aGrfNm );
}
- ULONG nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
+ sal_uLong nFrmFlags = bInCntnr ? HTML_FRMOPTS_IMG_CNTNR : HTML_FRMOPTS_IMG;
if( rHTMLWrt.IsHTMLMode( HTMLMODE_ABS_POS_FLY ) && !bInCntnr )
nFrmFlags |= HTML_FRMOPTS_IMG_CSS1;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm, pGrfNd->GetTitle(),
@@ -1646,21 +1646,21 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
const SfxItemSet& rFmtItemSet = rFrmFmt.GetAttrSet();
SfxItemSet aItemSet( *rFmtItemSet.GetPool(), RES_CHRATR_BEGIN,
RES_CHRATR_END );
- SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, TRUE );
- BOOL bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
- rHTMLWrt.bCfgOutStyles = FALSE;
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = TRUE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ SwHTMLWriter::GetEEAttrsFromDrwObj( aItemSet, &rSdrObj, sal_True );
+ sal_Bool bCfgOutStylesOld = rHTMLWrt.bCfgOutStyles;
+ rHTMLWrt.bCfgOutStyles = sal_False;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_True;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
OutHTML_DrawFrmFmtAsMarquee( rHTMLWrt,
(const SwDrawFrmFmt &)rFrmFmt,
rSdrObj );
- rHTMLWrt.bTxtAttr = TRUE;
- rHTMLWrt.bTagOn = FALSE;
- Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, FALSE );
- rHTMLWrt.bTxtAttr = FALSE;
+ rHTMLWrt.bTxtAttr = sal_True;
+ rHTMLWrt.bTagOn = sal_False;
+ Out_SfxItemSet( aHTMLAttrFnTab, rWrt, aItemSet, sal_False );
+ rHTMLWrt.bTxtAttr = sal_False;
rHTMLWrt.bCfgOutStyles = bCfgOutStylesOld;
return rWrt;
@@ -1669,7 +1669,7 @@ static Writer& OutHTML_FrmFmtAsMarquee( Writer& rWrt, const SwFrmFmt& rFrmFmt,
//-----------------------------------------------------------------------
Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bHeader )
+ sal_Bool bHeader )
{
SwHTMLWriter & rHTMLWrt = (SwHTMLWriter&)rWrt;
@@ -1686,7 +1686,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// <DL> bzw. </DL> immer einer Absatz-Abstand entsteht, wird der
// ggf. abgezogen.
const SvxULSpaceItem& rULSpace = rFrmFmt.GetULSpace();
- USHORT nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
+ sal_uInt16 nSize = bHeader ? rULSpace.GetLower() : rULSpace.GetUpper();
rHTMLWrt.nHeaderFooterSpace = nSize;
ByteString aSpacer;
@@ -1694,7 +1694,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
nSize > HTML_PARSPACE && Application::GetDefaultDevice() )
{
nSize -= HTML_PARSPACE;
- nSize = (INT16)Application::GetDefaultDevice()
+ nSize = (sal_Int16)Application::GetDefaultDevice()
->LogicToPixel( Size(nSize,0), MapMode(MAP_TWIP) ).Width();
((((((((aSpacer = OOO_STRING_SVTOOLS_HTML_spacer) += ' ')
@@ -1703,7 +1703,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex();
const SwStartNode* pSttNd = rWrt.pDoc->GetNodes()[nStt]->GetStartNode();
OSL_ENSURE( pSttNd, "Wo ist der Start-Node" );
@@ -1721,9 +1721,9 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
pSttNd->EndOfSectionIndex() );
if( bHeader )
- rHTMLWrt.bOutHeader = TRUE;
+ rHTMLWrt.bOutHeader = sal_True;
else
- rHTMLWrt.bOutFooter = TRUE;
+ rHTMLWrt.bOutFooter = sal_True;
rHTMLWrt.Out_SwDoc( rWrt.pCurPam );
}
@@ -1736,7 +1736,7 @@ Writer& OutHTML_HeaderFooter( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // den Inhalt von Multicol einruecken;
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
rHTMLWrt.nHeaderFooterSpace = 0;
@@ -1799,14 +1799,14 @@ void SwHTMLWriter::AddLinkTarget( const String& rURL )
else if( sCmp.EqualsAscii( pMarkToOutline ) )
{
// Hier brauchen wir Position und Name. Deshalb sortieren wir
- // ein USHORT und ein String-Array selbst
+ // ein sal_uInt16 und ein String-Array selbst
String aOutline( aURL.Copy( 0, nPos-1 ) );
SwPosition aPos( *pCurPam->GetPoint() );
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
- USHORT nIns=0;
+ sal_uInt16 nIns=0;
while( nIns < aOutlineMarkPoss.Count() &&
aOutlineMarkPoss[nIns] < nIdx )
nIns++;
@@ -1832,10 +1832,10 @@ void SwHTMLWriter::CollectLinkTargets()
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)pDoc->GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -1846,17 +1846,17 @@ void SwHTMLWriter::CollectLinkTargets()
}
const SwFmtURL *pURL;
- nMaxItems = pDoc->GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = pDoc->GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)pDoc->GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -1873,7 +1873,7 @@ void SwHTMLWriter::CollectLinkTargets()
SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
const SdrObject *pSdrObj,
- BYTE nOutMode ) :
+ sal_uInt8 nOutMode ) :
pFrmFmt( &rPosFly.GetFmt() ),
pSdrObject( pSdrObj ),
pNdIdx( new SwNodeIndex( rPosFly.GetNdIndex() ) ),
@@ -1905,7 +1905,7 @@ SwHTMLPosFlyFrm::SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
}
}
-BOOL SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
+sal_Bool SwHTMLPosFlyFrm::operator<( const SwHTMLPosFlyFrm& rFrm ) const
{
if( pNdIdx->GetIndex() == rFrm.pNdIdx->GetIndex() )
{
diff --git a/sw/source/filter/html/htmlfly.hxx b/sw/source/filter/html/htmlfly.hxx
index 0eb14de5d311..e18cfcc100f1 100644
--- a/sw/source/filter/html/htmlfly.hxx
+++ b/sw/source/filter/html/htmlfly.hxx
@@ -85,31 +85,31 @@ enum SwHTMLFrmType
#define HTML_CNTNR_MASK 0xc0
-const USHORT MAX_FRMTYPES = HTML_FRMTYPE_END;
-const USHORT MAX_BROWSERS = 4;
+const sal_uInt16 MAX_FRMTYPES = HTML_FRMTYPE_END;
+const sal_uInt16 MAX_BROWSERS = 4;
-extern BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
-extern BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS];
+extern sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS];
class SwHTMLPosFlyFrm
{
const SwFrmFmt *pFrmFmt; // der Rahmen
const SdrObject *pSdrObject; // ggf. Sdr-Objekt
SwNodeIndex *pNdIdx; // Node-Index
- UINT32 nOrdNum; // Aus SwPosFlyFrm
+ sal_uInt32 nOrdNum; // Aus SwPosFlyFrm
xub_StrLen nCntntIdx; // seine Position im Content
- BYTE nOutputMode; // Ausgabe-Infos
+ sal_uInt8 nOutputMode; // Ausgabe-Infos
public:
SwHTMLPosFlyFrm( const SwPosFlyFrm& rPosFly,
- const SdrObject *pSdrObj, BYTE nOutMode );
+ const SdrObject *pSdrObj, sal_uInt8 nOutMode );
- BOOL operator==( const SwHTMLPosFlyFrm& ) const { return FALSE; }
- BOOL operator<( const SwHTMLPosFlyFrm& ) const;
+ sal_Bool operator==( const SwHTMLPosFlyFrm& ) const { return sal_False; }
+ sal_Bool operator<( const SwHTMLPosFlyFrm& ) const;
const SwFrmFmt& GetFmt() const { return *pFrmFmt; }
const SdrObject *GetSdrObject() const { return pSdrObject; }
@@ -118,15 +118,15 @@ public:
xub_StrLen GetCntntIndex() const { return nCntntIdx; }
- BYTE GetOutMode() const { return nOutputMode; }
+ sal_uInt8 GetOutMode() const { return nOutputMode; }
- static BYTE GetOutFn( BYTE nMode ) { return nMode & HTML_OUT_MASK; }
- static BYTE GetOutPos( BYTE nMode ) { return nMode & HTML_POS_MASK; }
- static BYTE GetOutCntnr( BYTE nMode ) { return nMode & HTML_CNTNR_MASK; }
+ static sal_uInt8 GetOutFn( sal_uInt8 nMode ) { return nMode & HTML_OUT_MASK; }
+ static sal_uInt8 GetOutPos( sal_uInt8 nMode ) { return nMode & HTML_POS_MASK; }
+ static sal_uInt8 GetOutCntnr( sal_uInt8 nMode ) { return nMode & HTML_CNTNR_MASK; }
- BYTE GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
- BYTE GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
- BYTE GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
+ sal_uInt8 GetOutFn() const { return nOutputMode & HTML_OUT_MASK; }
+ sal_uInt8 GetOutPos() const { return nOutputMode & HTML_POS_MASK; }
+ sal_uInt8 GetOutCntnr() const { return nOutputMode & HTML_CNTNR_MASK; }
};
typedef SwHTMLPosFlyFrm *SwHTMLPosFlyFrmPtr;
diff --git a/sw/source/filter/html/htmlflyt.cxx b/sw/source/filter/html/htmlflyt.cxx
index 454faca19a88..5e5023b2470d 100644
--- a/sw/source/filter/html/htmlflyt.cxx
+++ b/sw/source/filter/html/htmlflyt.cxx
@@ -32,9 +32,9 @@
#include "htmlfly.hxx"
-#define TE(t,p,c) (BYTE)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
+#define TE(t,p,c) (sal_uInt8)( HTML_OUT_##t | HTML_POS_##p | HTML_CNTNR_##c )
-BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -130,7 +130,7 @@ BYTE aHTMLOutFrmPageFlyTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -227,7 +227,7 @@ BYTE aHTMLOutFrmParaFrameTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -323,7 +323,7 @@ BYTE aHTMLOutFrmParaPrtAreaTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
@@ -419,7 +419,7 @@ BYTE aHTMLOutFrmParaOtherTable[MAX_FRMTYPES][MAX_BROWSERS] =
}
};
-BYTE aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
+sal_uInt8 aHTMLOutFrmAsCharTable[MAX_FRMTYPES][MAX_BROWSERS] =
{
{
// Textrahmen mit Tabelle
diff --git a/sw/source/filter/html/htmlform.cxx b/sw/source/filter/html/htmlform.cxx
index efd1441e82b4..4b3b6fb0034d 100644
--- a/sw/source/filter/html/htmlform.cxx
+++ b/sw/source/filter/html/htmlform.cxx
@@ -545,7 +545,7 @@ void SwHTMLImageWatcher::init( sal_Int32 Width, sal_Int32 Height )
SwNode *pANd;
SwTableNode *pTblNd;
if( pAPos &&
- 0 != (pANd = pDoc->GetNodes()[pAPos->nNode]) &&
+ 0 != (pANd = & pAPos->nNode.GetNode()) &&
0 != (pTblNd = pANd->FindTableNode()) )
{
const sal_Bool bLastGrf = !pTblNd->GetTable().DecGrfsThatResize();
@@ -1167,7 +1167,7 @@ uno::Reference< drawing::XShape > SwHTMLParser::InsertControl(
SVX_CSS1_LTYPE_TWIP == rCSS1PropInfo.eTopType )
{
const SwStartNode *pFlySttNd =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->FindFlyStartNode();
+ pPam->GetPoint()->nNode.GetNode().FindFlyStartNode();
if( pFlySttNd )
{
@@ -1347,7 +1347,7 @@ void SwHTMLParser::NewForm( sal_Bool bAppend )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -1521,7 +1521,7 @@ void SwHTMLParser::InsertInput()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -1734,7 +1734,7 @@ void SwHTMLParser::InsertInput()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue(&bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")), aTmp );
}
@@ -2012,7 +2012,7 @@ void SwHTMLParser::NewTextArea()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -2127,7 +2127,7 @@ void SwHTMLParser::NewTextArea()
aTmp <<= OUString(sName);
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Name")), aTmp );
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("MultiLine")),
aTmp );
@@ -2150,7 +2150,7 @@ void SwHTMLParser::NewTextArea()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
@@ -2302,7 +2302,7 @@ void SwHTMLParser::NewSelect()
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
- sal_uInt16 nEvent;
+ sal_uInt16 nEvent = 0;
sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
@@ -2415,7 +2415,7 @@ void SwHTMLParser::NewSelect()
if( bDisabled )
{
- BOOL bFalse = sal_False;
+ sal_Bool bFalse = sal_False;
aTmp.setValue( &bFalse, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Enabled")),
aTmp );
@@ -2425,7 +2425,7 @@ void SwHTMLParser::NewSelect()
sal_Bool bMinWidth = sal_True, bMinHeight = sal_True;
if( !bMultiple && 1==nSelectEntryCnt )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue( OUString(RTL_CONSTASCII_USTRINGPARAM("Dropdown")),
aTmp );
@@ -2437,7 +2437,7 @@ void SwHTMLParser::NewSelect()
if( bMultiple )
{
- BOOL bTrue = sal_True;
+ sal_Bool bTrue = sal_True;
aTmp.setValue( &bTrue, ::getBooleanCppuType() );
xPropSet->setPropertyValue(
OUString(RTL_CONSTASCII_USTRINGPARAM("MultiSelection")), aTmp );
diff --git a/sw/source/filter/html/htmlforw.cxx b/sw/source/filter/html/htmlforw.cxx
index 67e4e3020a74..47ce516701f2 100644
--- a/sw/source/filter/html/htmlforw.cxx
+++ b/sw/source/filter/html/htmlforw.cxx
@@ -100,7 +100,7 @@ struct HTMLControl
{
// die Form, zu der das Control gehoert
uno::Reference< container::XIndexContainer > xFormComps;
- ULONG nNdIdx; // der Node, in dem es verankert ist
+ sal_uLong nNdIdx; // der Node, in dem es verankert ist
xub_StrLen nCount; // wie viele Controls sind in dem Node
HTMLControl( const uno::Reference< container::XIndexContainer > & rForm,
diff --git a/sw/source/filter/html/htmlftn.cxx b/sw/source/filter/html/htmlftn.cxx
index 286d3210ded5..700c1233378b 100644
--- a/sw/source/filter/html/htmlftn.cxx
+++ b/sw/source/filter/html/htmlftn.cxx
@@ -56,8 +56,8 @@ struct SwHTMLFootEndNote_Impl
String sName;
String sContent; // Infos fuer die letzte Fussnote
- BOOL bEndNote;
- BOOL bFixed;
+ sal_Bool bEndNote;
+ sal_Bool bFixed;
};
@@ -72,7 +72,7 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
}
else
{
- BOOL bQuoted = FALSE, bDone = FALSE;
+ sal_Bool bQuoted = sal_False, bDone = sal_False;
for( ; nPos < nLen && !bDone; nPos++ )
{
sal_Unicode c = rContent.GetChar( nPos );
@@ -88,13 +88,13 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
if( bQuoted )
rPart += c;
else
- bDone = TRUE;
- bQuoted = FALSE;
+ bDone = sal_True;
+ bQuoted = sal_False;
break;
default:
rPart += c;
- bQuoted = FALSE;
+ bQuoted = sal_False;
break;
}
}
@@ -105,10 +105,10 @@ xub_StrLen lcl_html_getNextPart( String& rPart, const String& rContent,
xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
const String& rContent,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
xub_StrLen nStrPos = 0;
- for( USHORT nPart = 0; nPart < 4; nPart++ )
+ for( sal_uInt16 nPart = 0; nPart < 4; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -124,7 +124,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
break;
case 1:
- rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (USHORT)aPart.ToInt32();
+ rInfo.nFtnOffset = aPart.Len() == 0 ? 0 : (sal_uInt16)aPart.ToInt32();
break;
case 2:
@@ -143,7 +143,7 @@ xub_StrLen lcl_html_getEndNoteInfo( SwEndNoteInfo& rInfo,
void SwHTMLParser::FillEndNoteInfo( const String& rContent )
{
SwEndNoteInfo aInfo( pDoc->GetEndNoteInfo() );
- lcl_html_getEndNoteInfo( aInfo, rContent, TRUE );
+ lcl_html_getEndNoteInfo( aInfo, rContent, sal_True );
pDoc->SetEndNoteInfo( aInfo );
}
@@ -151,9 +151,9 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
{
SwFtnInfo aInfo( pDoc->GetFtnInfo() );
- xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, FALSE );
+ xub_StrLen nStrPos = lcl_html_getEndNoteInfo( aInfo, rContent, sal_False );
- for( USHORT nPart = 4; nPart < 8; nPart++ )
+ for( sal_uInt16 nPart = 4; nPart < 8; nPart++ )
{
String aPart;
if( STRING_MAXLEN != nStrPos )
@@ -199,8 +199,8 @@ void SwHTMLParser::FillFootNoteInfo( const String& rContent )
pDoc->SetFtnInfo( aInfo );
}
-void SwHTMLParser::InsertFootEndNote( const String& rName, BOOL bEndNote,
- BOOL bFixed )
+void SwHTMLParser::InsertFootEndNote( const String& rName, sal_Bool bEndNote,
+ sal_Bool bFixed )
{
if( !pFootEndNoteImpl )
pFootEndNoteImpl = new SwHTMLFootEndNote_Impl;
@@ -240,7 +240,7 @@ void SwHTMLParser::FinishFootEndNote()
}
pFootEndNoteImpl->sName = aEmptyStr;
pFootEndNoteImpl->sContent = aEmptyStr;
- pFootEndNoteImpl->bFixed = FALSE;
+ pFootEndNoteImpl->bFixed = sal_False;
}
void SwHTMLParser::InsertFootEndNoteText()
@@ -265,8 +265,8 @@ SwNodeIndex *SwHTMLParser::GetFootEndNoteSection( const String& rName )
// TODO: ToUpperAscii
aName.ToUpperAscii();
- USHORT nCount = pFootEndNoteImpl->aNames.Count();
- for( USHORT i=0; i<nCount; i++ )
+ sal_uInt16 nCount = pFootEndNoteImpl->aNames.Count();
+ for( sal_uInt16 i=0; i<nCount; i++ )
{
if( *pFootEndNoteImpl->aNames[i] == aName )
{
@@ -297,7 +297,7 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
return rWrt;
String sFtnName, sClass;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rFmtFtn.IsEndNote() )
{
nPos = rHTMLWrt.pFootEndNotes ? rHTMLWrt.pFootEndNotes->Count() : 0;
@@ -334,12 +334,12 @@ Writer& OutHTML_SwFmtFtn( Writer& rWrt, const SfxPoolItem& rHt )
(sOut += ' ') += OOO_STRING_SVTOOLS_HTML_O_sdfixed;
sOut += '>';
rWrt.Strm() << sOut.GetBuffer();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, TRUE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_True );
HTMLOutFuncs::Out_String( rWrt.Strm(), rFmtFtn.GetViewNumStr(*rWrt.pDoc),
rHTMLWrt.eDestEnc, &rHTMLWrt.aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, FALSE );
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_superscript, sal_False );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
return rWrt;
}
@@ -352,11 +352,11 @@ void SwHTMLWriter::OutFootEndNotes()
return;
#if OSL_DEBUG_LEVEL > 1
- USHORT nFtn = nFootNote, nEn = nEndNote;
+ sal_uInt16 nFtn = nFootNote, nEn = nEndNote;
#endif
nFootNote = 0, nEndNote = 0;
- for( USHORT i=0; i<pFootEndNotes->Count(); i++ )
+ for( sal_uInt16 i=0; i<pFootEndNotes->Count(); i++ )
{
SwTxtFtn *pTxtFtn = (*pFootEndNotes)[i];
pFmtFtn = &pTxtFtn->GetFtn();
@@ -383,7 +383,7 @@ void SwHTMLWriter::OutFootEndNotes()
HTMLOutFuncs::Out_String( Strm(), sFtnName, eDestEnc, &aNonConvertableCharacters );
Strm() << "\">";
- bLFPossible = TRUE;
+ bLFPossible = sal_True;
IncIndentLevel(); // Inhalt von <DIV> einruecken
OSL_ENSURE( pTxtFtn, "SwHTMLWriter::OutFootEndNotes: SwTxtFtn fehlt" );
@@ -393,15 +393,15 @@ void SwHTMLWriter::OutFootEndNotes()
if( pSttNdIdx )
{
HTMLSaveData aSaveData( *this, pSttNdIdx->GetIndex()+1,
- pSttNdIdx->GetNode().EndOfSectionIndex(), FALSE );
+ pSttNdIdx->GetNode().EndOfSectionIndex(), sal_False );
Out_SwDoc( pCurPam );
}
DecIndentLevel(); // Inhalt von <DIV> einruecken
if( bLFPossible )
OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, FALSE );
- bLFPossible = TRUE;
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_division, sal_False );
+ bLFPossible = sal_True;
OSL_ENSURE( !pFmtFtn,
"SwHTMLWriter::OutFootEndNotes: Ftn wurde nicht ausgegeben" );
@@ -498,14 +498,14 @@ void SwHTMLWriter::OutFootEndNoteSym( const SwFmtFtn& rFmtFtn,
Strm() << sOut.GetBuffer();
HTMLOutFuncs::Out_String( Strm(), rNum, eDestEnc, &aNonConvertableCharacters );
- HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( Strm(), OOO_STRING_SVTOOLS_HTML_anchor, sal_False );
}
-USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
+sal_uInt16 lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
String *pParts,
- BOOL bEndNote )
+ sal_Bool bEndNote )
{
- USHORT nParts = 0;
+ sal_uInt16 nParts = 0;
sal_Int16 eFmt = rInfo.aFmt.GetNumberingType();
if( (bEndNote ? SVX_NUM_ROMAN_LOWER : SVX_NUM_ARABIC) != eFmt )
{
@@ -536,12 +536,12 @@ USHORT lcl_html_fillEndNoteInfo( const SwEndNoteInfo& rInfo,
}
void lcl_html_outFootEndNoteInfo( Writer& rWrt, String *pParts,
- USHORT nParts, const sal_Char *pName )
+ sal_uInt16 nParts, const sal_Char *pName )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
String aContent;
- for( USHORT i=0; i<nParts; i++ )
+ for( sal_uInt16 i=0; i<nParts; i++ )
{
xub_StrLen nPos = 0;
String aTmp( pParts[i] );
@@ -583,7 +583,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwFtnInfo& rInfo = pDoc->GetFtnInfo();
String aParts[8];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, FALSE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_False );
if( rInfo.eNum != FTNNUM_DOC )
{
aParts[4] = rInfo.eNum == FTNNUM_CHAPTER ? 'C' : 'P';
@@ -612,7 +612,7 @@ void SwHTMLWriter::OutFootEndNoteInfo()
{
const SwEndNoteInfo& rInfo = pDoc->GetEndNoteInfo();
String aParts[4];
- USHORT nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, TRUE );
+ sal_uInt16 nParts = lcl_html_fillEndNoteInfo( rInfo, aParts, sal_True );
if( nParts > 0 )
lcl_html_outFootEndNoteInfo( *this, aParts, nParts,
OOO_STRING_SVTOOLS_HTML_META_sdendnote );
diff --git a/sw/source/filter/html/htmlgrin.cxx b/sw/source/filter/html/htmlgrin.cxx
index 34d446ad5306..82c2e41aa403 100644
--- a/sw/source/filter/html/htmlgrin.cxx
+++ b/sw/source/filter/html/htmlgrin.cxx
@@ -112,7 +112,7 @@ ImageMap *SwHTMLParser::FindImageMap( const String& rName ) const
if( pImageMaps )
{
- for( USHORT i=0; i<pImageMaps->Count(); i++ )
+ for( sal_uInt16 i=0; i<pImageMaps->Count(); i++ )
{
ImageMap *pIMap = (*pImageMaps)[i];
if( rName.EqualsIgnoreCaseAscii( pIMap->GetName() ) )
@@ -129,8 +129,8 @@ void SwHTMLParser::ConnectImageMaps()
{
SwNodes& rNds = pDoc->GetNodes();
// auf den Start-Node der 1. Section
- ULONG nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
- ULONG nEndIdx = rNds.GetEndOfAutotext().GetIndex();
+ sal_uLong nIdx = rNds.GetEndOfAutotext().StartOfSectionIndex() + 1;
+ sal_uLong nEndIdx = rNds.GetEndOfAutotext().GetIndex();
SwGrfNode* pGrfNd;
while( nMissingImgMaps > 0 && nIdx < nEndIdx )
@@ -164,7 +164,7 @@ void SwHTMLParser::ConnectImageMaps()
}
-/* */
+/* */
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
@@ -173,7 +173,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
SfxItemSet& rFrmItemSet )
{
const SfxItemSet *pCntnrItemSet = 0;
- USHORT i = aContexts.Count();
+ sal_uInt16 i = aContexts.Count();
while( !pCntnrItemSet && i > nContextStMin )
pCntnrItemSet = aContexts[--i]->GetFrmItemSet();
@@ -183,7 +183,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// des Containers uebernommen.
rFrmItemSet.Put( *pCntnrItemSet );
}
- else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, TRUE ) )
+ else if( pCSS1Parser->MayBePositioned( rCSS1PropInfo, sal_True ) )
{
// Wenn die Ausrichtung anhand der CSS1-Optionen gesetzt werden kann
// werden die benutzt.
@@ -200,16 +200,16 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
sal_Int16 eHoriOri,
SfxItemSet& rFrmSet,
- BOOL bDontAppend )
+ sal_Bool bDontAppend )
{
- BOOL bMoveBackward = FALSE;
+ sal_Bool bMoveBackward = sal_False;
SwFmtAnchor aAnchor( FLY_AS_CHAR );
sal_Int16 eVertRel = text::RelOrientation::FRAME;
if( text::HoriOrientation::NONE != eHoriOri )
{
// den Absatz-Einzug bestimmen
- USHORT nLeftSpace = 0, nRightSpace = 0;
+ sal_uInt16 nLeftSpace = 0, nRightSpace = 0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeftSpace, nRightSpace, nIndent );
@@ -238,15 +238,15 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
// Einen neuen Absatz aufmachen, wenn der aktuelle
// absatzgebundene Rahmen ohne Umlauf enthaelt.
- if( !bDontAppend && HasCurrentParaFlys( TRUE ) )
+ if( !bDontAppend && HasCurrentParaFlys( sal_True ) )
{
// Wenn der Absatz nur Grafiken enthaelt, braucht er
// auch keinen unteren Absatz-Abstand. Da hier auch bei
// Verwendung von Styles kein Abstand enstehen soll, wird
// hier auch geweohnlich attributiert !!!
- USHORT nUpper=0, nLower=0;
+ sal_uInt16 nUpper=0, nLower=0;
GetULSpaceFromContext( nUpper, nLower );
- InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), FALSE, TRUE );
+ InsertAttr( SvxULSpaceItem( nUpper, 0, RES_UL_SPACE ), sal_False, sal_True );
AppendTxtNode( AM_NOSPACE );
@@ -254,7 +254,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
{
NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, nLower, RES_UL_SPACE ) );
aParaAttrs.Insert( aAttrTab.pULSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
}
}
@@ -263,7 +263,7 @@ void SwHTMLParser::SetAnchorAndAdjustment( sal_Int16 eVertOri,
if( nCntnt )
{
aAnchor.SetType( FLY_AT_CHAR );
- bMoveBackward = TRUE;
+ bMoveBackward = sal_True;
eVertOri = text::VertOrientation::CHAR_BOTTOM;
eVertRel = text::RelOrientation::CHAR;
}
@@ -300,12 +300,11 @@ void SwHTMLParser::RegisterFlyFrm( SwFrmFmt *pFlyFmt )
SURROUND_THROUGHT == pFlyFmt->GetSurround().GetSurround() )
{
aMoveFlyFrms.Insert( pFlyFmt, aMoveFlyFrms.Count() );
- aMoveFlyCnts.Insert( pPam->GetPoint()->nContent.GetIndex(),
- aMoveFlyCnts.Count() );
+ aMoveFlyCnts.push_back( pPam->GetPoint()->nContent.GetIndex() );
}
}
-/* */
+/* */
void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
String& rTypeStr ) const
@@ -317,7 +316,7 @@ void SwHTMLParser::GetDefaultScriptType( ScriptType& rType,
rTypeStr = GetScriptTypeString( pHeaderAttrs );
}
-/* */
+/* */
void SwHTMLParser::InsertImage()
{
@@ -328,10 +327,10 @@ void SwHTMLParser::InsertImage()
long nWidth=0, nHeight=0;
long nVSpace=0, nHSpace=0;
- USHORT nBorder = (aAttrTab.pINetFmt ? 1 : 0);
- BOOL bIsMap = FALSE;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
+ sal_uInt16 nBorder = (aAttrTab.pINetFmt ? 1 : 0);
+ sal_Bool bIsMap = sal_False;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
SvxMacroItem aMacroItem(RES_FRMMACRO);
ScriptType eDfltScriptType;
@@ -339,9 +338,9 @@ void SwHTMLParser::InsertImage()
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -392,10 +391,10 @@ void SwHTMLParser::InsertImage()
sAltNm = pOption->GetString();
break;
case HTML_O_BORDER:
- nBorder = (USHORT)pOption->GetNumber();
+ nBorder = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ISMAP:
- bIsMap = TRUE;
+ bIsMap = sal_True;
break;
case HTML_O_USEMAP:
aMap = pOption->GetString();
@@ -461,7 +460,7 @@ IMAGE_SETEVENT:
// Rule invalisieren ist noetig, weil zwischem dem einlesen
// des LI und der Grafik ein EndAction gerufen worden sein kann.
if( GetNumInfo().GetNumRule() )
- GetNumInfo().GetNumRule()->SetInvalidRule( TRUE );
+ GetNumInfo().GetNumRule()->SetInvalidRule( sal_True );
// Die Vorlage novh mal setzen. Ist noetig, damit der
// Erstzeilen-Einzug stimmt.
@@ -493,12 +492,12 @@ IMAGE_SETEVENT:
SvxBorderLine aVBorderLine;
SvxCSS1Parser::SetBorderWidth( aHBorderLine,
- (USHORT)nHBorderWidth, FALSE );
+ (sal_uInt16)nHBorderWidth, sal_False );
if( nHBorderWidth == nVBorderWidth )
aVBorderLine.SetOutWidth( aHBorderLine.GetOutWidth() );
else
SvxCSS1Parser::SetBorderWidth( aVBorderLine,
- (USHORT)nVBorderWidth, FALSE );
+ (sal_uInt16)nVBorderWidth, sal_False );
// die tatsaechlich gesetzter Rahmenbreite benutzen und nicht die
// Wunschbreite!
@@ -511,7 +510,7 @@ IMAGE_SETEVENT:
((const SwFmtINetFmt&)aAttrTab.pINetFmt->GetItem()).GetValue();
pCSS1Parser->SetATagStyles();
- USHORT nPoolId = static_cast< USHORT >(pDoc->IsVisitedURL( rURL )
+ sal_uInt16 nPoolId = static_cast< sal_uInt16 >(pDoc->IsVisitedURL( rURL )
? RES_POOLCHR_INET_VISIT
: RES_POOLCHR_INET_NORMAL);
const SwCharFmt *pCharFmt = pCSS1Parser->GetCharFmtFromPool( nPoolId );
@@ -558,12 +557,12 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Width() = aPropInfo.nWidth;
nWidth = 1; // != 0
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Width() = 0;
nWidth = aPropInfo.nWidth;
- bPrcWidth = TRUE;
+ bPrcWidth = sal_True;
break;
default:
;
@@ -573,23 +572,23 @@ IMAGE_SETEVENT:
case SVX_CSS1_LTYPE_TWIP:
aTwipSz.Height() = aPropInfo.nHeight;
nHeight = 1; // != 0
- bPrcHeight = FALSE;
+ bPrcHeight = sal_False;
break;
case SVX_CSS1_LTYPE_PERCENTAGE:
aTwipSz.Height() = 0;
nHeight = aPropInfo.nHeight;
- bPrcHeight = TRUE;
+ bPrcHeight = sal_True;
break;
default:
;
}
Size aGrfSz( 0, 0 );
- BOOL bSetTwipSize = TRUE; // Twip-Size am Node setzen?
- BOOL bChangeFrmSize = FALSE; // Frame-Format nachtraeglich anpassen?
- BOOL bRequestGrfNow = FALSE;
- BOOL bSetScaleImageMap = FALSE;
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_Bool bSetTwipSize = sal_True; // Twip-Size am Node setzen?
+ sal_Bool bChangeFrmSize = sal_False; // Frame-Format nachtraeglich anpassen?
+ sal_Bool bRequestGrfNow = sal_False;
+ sal_Bool bSetScaleImageMap = sal_False;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
if( !nWidth || !nHeight )
{
@@ -599,12 +598,12 @@ IMAGE_SETEVENT:
// Tabelle layoutet wird.
if( pTable!=0 && !nWidth )
{
- bRequestGrfNow = TRUE;
+ bRequestGrfNow = sal_True;
IncGrfsThatResizeTable();
}
// Die Groesse des Rahmens wird nachtraeglich gesetzt
- bChangeFrmSize = TRUE;
+ bChangeFrmSize = sal_True;
aGrfSz = aTwipSz;
if( !nWidth && !nHeight )
{
@@ -616,7 +615,7 @@ IMAGE_SETEVENT:
// eine %-Angabe
if( bPrcWidth )
{
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
nPrcHeight = 255;
}
else
@@ -628,7 +627,7 @@ IMAGE_SETEVENT:
{
if( bPrcHeight )
{
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
nPrcWidth = 255;
}
else
@@ -641,13 +640,13 @@ IMAGE_SETEVENT:
{
// Breite und Hoehe wurden angegeben und brauchen nicht gesetzt
// zu werden
- bSetTwipSize = FALSE;
+ bSetTwipSize = sal_False;
if( bPrcWidth )
- nPrcWidth = (BYTE)nWidth;
+ nPrcWidth = (sal_uInt8)nWidth;
if( bPrcHeight )
- nPrcHeight = (BYTE)nHeight;
+ nPrcHeight = (sal_uInt8)nHeight;
}
// Image-Map setzen
@@ -732,7 +731,7 @@ IMAGE_SETEVENT:
// ggfs. eine Grafik anspringen
if( JUMPTO_GRAPHIC == eJumpTo && sHTMLGrfName == sJmpMark )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
@@ -746,7 +745,7 @@ IMAGE_SETEVENT:
pGrfNd->SetChgTwipSize( bChangeFrmSize, bChangeFrmSize );
if( bSetScaleImageMap )
- pGrfNd->SetScaleImageMap( TRUE );
+ pGrfNd->SetScaleImageMap( sal_True );
if( aAttrTab.pINetFmt )
{
@@ -762,13 +761,13 @@ IMAGE_SETEVENT:
{
const SvxMacro *pMacro;
- static USHORT const aEvents[] = {
+ static sal_uInt16 aEvents[] = {
SFX_EVENT_MOUSEOVER_OBJECT,
SFX_EVENT_MOUSECLICK_OBJECT,
SFX_EVENT_MOUSEOUT_OBJECT,
0 };
- for( USHORT n = 0; aEvents[ n ]; ++n )
+ for( sal_uInt16 n = 0; aEvents[ n ]; ++n )
if( 0 != ( pMacro = rINetFmt.GetMacro( aEvents[ n ] ) ))
aMacroItem.SetMacro( aEvents[ n ], *pMacro );
}
@@ -814,7 +813,7 @@ IMAGE_SETEVENT:
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::InsertBodyOptions()
{
@@ -823,20 +822,20 @@ void SwHTMLParser::InsertBodyOptions()
String aBackGround, aId, aStyle, aLang, aDir;
Color aBGColor, aTextColor, aLinkColor, aVLinkColor;
- BOOL bBGColor=FALSE, bTextColor=FALSE;
- BOOL bLinkColor=FALSE, bVLinkColor=FALSE;
+ sal_Bool bBGColor=sal_False, bTextColor=sal_False;
+ sal_Bool bLinkColor=sal_False, bVLinkColor=sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
ScriptType eScriptType2 = eDfltScriptType;
rtl::OUString aEvent;
- BOOL bSetEvent = FALSE;
+ sal_Bool bSetEvent = sal_False;
switch( pOption->GetToken() )
{
@@ -848,47 +847,47 @@ void SwHTMLParser::InsertBodyOptions()
break;
case HTML_O_BGCOLOR:
pOption->GetColor( aBGColor );
- bBGColor = TRUE;
+ bBGColor = sal_True;
break;
case HTML_O_TEXT:
pOption->GetColor( aTextColor );
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LINK:
pOption->GetColor( aLinkColor );
- bLinkColor = TRUE;
+ bLinkColor = sal_True;
break;
case HTML_O_VLINK:
pOption->GetColor( aVLinkColor );
- bVLinkColor = TRUE;
+ bVLinkColor = sal_True;
break;
case HTML_O_SDONLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_OPENDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONUNLOAD:
eScriptType2 = STARBASIC;
case HTML_O_ONUNLOAD:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_PREPARECLOSEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONFOCUS:
eScriptType2 = STARBASIC;
case HTML_O_ONFOCUS:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_ACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_SDONBLUR:
eScriptType2 = STARBASIC;
case HTML_O_ONBLUR:
aEvent = GlobalEventConfig::GetEventName( STR_EVENT_DEACTIVATEDOC );
- bSetEvent = TRUE;
+ bSetEvent = sal_True;
break;
case HTML_O_ONERROR:
@@ -896,7 +895,7 @@ void SwHTMLParser::InsertBodyOptions()
case HTML_O_STYLE:
aStyle = pOption->GetString();
- bTextColor = TRUE;
+ bTextColor = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -927,7 +926,7 @@ void SwHTMLParser::InsertBodyOptions()
// Die Item fuer die Seitenvorlage vorbereiten (Hintergrund, Umrandung)
// Beim BrushItem muessen schon gesetzte werte erhalten bleiben!
SvxBrushItem aBrushItem( pCSS1Parser->GetPageDescBackground() );
- BOOL bSetBrush = FALSE;
+ sal_Bool bSetBrush = sal_False;
if( bBGColor && !pCSS1Parser->IsBodyBGColorSet() )
{
@@ -944,7 +943,7 @@ void SwHTMLParser::InsertBodyOptions()
aBrushItem.SetGraphicLink( aLink );
aBrushItem.SetGraphicPos( ePos );
}
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBGColorSet();
}
@@ -953,7 +952,7 @@ void SwHTMLParser::InsertBodyOptions()
// Hintergrundgrafik aus "BACKGROUND"
aBrushItem.SetGraphicLink( INetURLObject::GetAbsURL( sBaseURL, aBackGround ) );
aBrushItem.SetGraphicPos( GPOS_TILED );
- bSetBrush = TRUE;
+ bSetBrush = sal_True;
pCSS1Parser->SetBodyBackgroundSet();
}
@@ -970,12 +969,12 @@ void SwHTMLParser::InsertBodyOptions()
&aItemSet );
const SfxPoolItem *pItem;
- static USHORT aWhichIds[3] = { RES_CHRATR_FONTSIZE,
+ static sal_uInt16 aWhichIds[3] = { RES_CHRATR_FONTSIZE,
RES_CHRATR_CJK_FONTSIZE,
RES_CHRATR_CTL_FONTSIZE };
- for( USHORT i=0; i<3; i++ )
+ for( sal_uInt16 i=0; i<3; i++ )
{
- if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], FALSE,
+ if( SFX_ITEM_SET == aItemSet.GetItemState( aWhichIds[i], sal_False,
&pItem ) &&
static_cast <const SvxFontHeightItem * >(pItem)->GetProp() != 100)
{
@@ -1042,7 +1041,7 @@ void SwHTMLParser::InsertBodyOptions()
InsertBookmark( aId );
}
-/* */
+/* */
void SwHTMLParser::NewAnchor()
{
@@ -1058,16 +1057,16 @@ void SwHTMLParser::NewAnchor()
SvxMacroTableDtor aMacroTbl;
String sHRef, aName, sTarget;
String aId, aStyle, aClass, aLang, aDir;
- BOOL bHasHRef = FALSE, bFixed = FALSE;
+ sal_Bool bHasHRef = sal_False, bFixed = sal_False;
ScriptType eDfltScriptType;
String sDfltScriptType;
GetDefaultScriptType( eDfltScriptType, sDfltScriptType );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
- USHORT nEvent = 0;
+ sal_uInt16 nEvent = 0;
ScriptType eScriptType2 = eDfltScriptType;
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -1078,7 +1077,7 @@ void SwHTMLParser::NewAnchor()
case HTML_O_HREF:
sHRef = pOption->GetString();
- bHasHRef = TRUE;
+ bHasHRef = sal_True;
break;
case HTML_O_TARGET:
sTarget = pOption->GetString();
@@ -1094,7 +1093,7 @@ void SwHTMLParser::NewAnchor()
aClass = pOption->GetString();
break;
case HTML_O_SDFIXED:
- bFixed = TRUE;
+ bFixed = sal_True;
break;
case HTML_O_LANG:
aLang = pOption->GetString();
@@ -1170,7 +1169,7 @@ ANCHOR_SETEVENT:
// einen neuen Kontext anlegen
_HTMLAttrContext *pCntxt = new _HTMLAttrContext( HTML_ANCHOR_ON );
- BOOL bEnAnchor = FALSE, bFtnAnchor = FALSE, bFtnEnSymbol = FALSE;
+ sal_Bool bEnAnchor = sal_False, bFtnAnchor = sal_False, bFtnEnSymbol = sal_False;
String aFtnName;
String aStrippedClass( aClass );
SwCSS1Parser::GetScriptFromClass( aStrippedClass, sal_False );
@@ -1179,17 +1178,17 @@ ANCHOR_SETEVENT:
('d' == aStrippedClass.GetChar(1) || 'D' == aStrippedClass.GetChar(1)) )
{
if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_anc ) )
- bEnAnchor = TRUE;
+ bEnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_anc ) )
- bFtnAnchor = TRUE;
+ bFtnAnchor = sal_True;
else if( aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdendnote_sym ) ||
aStrippedClass.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_sdfootnote_sym ) )
- bFtnEnSymbol = TRUE;
+ bFtnEnSymbol = sal_True;
if( bEnAnchor || bFtnAnchor || bFtnEnSymbol )
{
aFtnName = sHRef.Copy( 1 );
aClass = aStrippedClass = aName = aEmptyStr;
- bHasHRef = FALSE;
+ bHasHRef = sal_False;
}
}
@@ -1202,7 +1201,7 @@ ANCHOR_SETEVENT:
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
{
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -1237,11 +1236,11 @@ ANCHOR_SETEVENT:
if( bEnAnchor || bFtnAnchor )
{
InsertFootEndNote( aFtnName, bEnAnchor, bFixed );
- bInFootEndNoteAnchor = bCallNextToken = TRUE;
+ bInFootEndNoteAnchor = bCallNextToken = sal_True;
}
else if( bFtnEnSymbol )
{
- bInFootEndNoteSymbol = bCallNextToken = TRUE;
+ bInFootEndNoteSymbol = bCallNextToken = sal_True;
}
// den Kontext merken
@@ -1253,17 +1252,17 @@ void SwHTMLParser::EndAnchor()
if( bInFootEndNoteAnchor )
{
FinishFootEndNote();
- bInFootEndNoteAnchor = FALSE;
+ bInFootEndNoteAnchor = sal_False;
}
else if( bInFootEndNoteSymbol )
{
- bInFootEndNoteSymbol = FALSE;
+ bInFootEndNoteSymbol = sal_False;
}
EndTag( HTML_ANCHOR_OFF );
}
-/* */
+/* */
void SwHTMLParser::InsertBookmark( const String& rName )
{
@@ -1272,10 +1271,10 @@ void SwHTMLParser::InsertBookmark( const String& rName )
aSetAttrTab.Insert( pTmp, aSetAttrTab.Count() );
}
-BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
+sal_Bool SwHTMLParser::HasCurrentParaBookmarks( sal_Bool bIgnoreStack ) const
{
- BOOL bHasMarks = FALSE;
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_Bool bHasMarks = sal_False;
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
// first step: are there still bookmark in the attribute-stack?
// bookmarks are added to the end of the stack - thus we only have
@@ -1283,13 +1282,13 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
if( !bIgnoreStack )
{
_HTMLAttr* pAttr;
- for( USHORT i = aSetAttrTab.Count(); i; )
+ for( sal_uInt16 i = aSetAttrTab.Count(); i; )
{
pAttr = aSetAttrTab[ --i ];
if( RES_FLTR_BOOKMARK == pAttr->pItem->Which() )
{
if( pAttr->GetSttParaIdx() == nNodeIdx )
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
}
@@ -1305,10 +1304,10 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
ppMark++)
{
const ::sw::mark::IMark* pBookmark = ppMark->get();
- ULONG nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pBookmark->GetMarkPos().nNode.GetIndex();
if( nBookNdIdx==nNodeIdx )
{
- bHasMarks = TRUE;
+ bHasMarks = sal_True;
break;
}
else if( nBookNdIdx > nNodeIdx )
@@ -1319,11 +1318,11 @@ BOOL SwHTMLParser::HasCurrentParaBookmarks( BOOL bIgnoreStack ) const
return bHasMarks;
}
-/* */
+/* */
void SwHTMLParser::StripTrailingPara()
{
- BOOL bSetSmallFont = FALSE;
+ sal_Bool bSetSmallFont = sal_False;
SwCntntNode* pCNd = pPam->GetCntntNode();
if( !pPam->GetPoint()->nContent.GetIndex() )
@@ -1331,11 +1330,11 @@ void SwHTMLParser::StripTrailingPara()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt const*const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -1348,7 +1347,7 @@ void SwHTMLParser::StripTrailingPara()
return; // den Knoten duerfen wir nicht loeschen
}
- SetAttr( FALSE ); // die noch offenen Attribute muessen
+ SetAttr( sal_False ); // die noch offenen Attribute muessen
// beendet werden, bevor der Node
// geloescht wird, weil sonst der
// End-Index in die Botanik zeigt
@@ -1373,7 +1372,7 @@ void SwHTMLParser::StripTrailingPara()
ppMark++)
{
::sw::mark::IMark* pMark = ppMark->get();
- ULONG nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
+ sal_uLong nBookNdIdx = pMark->GetMarkPos().nNode.GetIndex();
if(nBookNdIdx==nNodeIdx)
{
SwNodeIndex nNewNdIdx(pPam->GetPoint()->nNode);
@@ -1408,7 +1407,7 @@ void SwHTMLParser::StripTrailingPara()
// In leeren Zellen stellen wir einen kleinen Font ein, damit die
// Zelle nicht hoeher wird als die Grafik bzw. so niedrig wie
// moeglich bleibt.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
}
}
else if( pCNd && pCNd->IsTxtNode() && pTable &&
@@ -1417,7 +1416,7 @@ void SwHTMLParser::StripTrailingPara()
{
// Wenn die Zelle nur zeichengebundene Grafiken/Rahmen enthaelt
// stellen wir ebenfalls einen kleinen Font ein.
- bSetSmallFont = TRUE;
+ bSetSmallFont = sal_True;
SwTxtNode* pTxtNd = pCNd->GetTxtNode();
xub_StrLen nPos = pPam->GetPoint()->nContent.GetIndex();
diff --git a/sw/source/filter/html/htmlnum.cxx b/sw/source/filter/html/htmlnum.cxx
index 4ae6c12afc62..6ff9bfe73cbf 100644
--- a/sw/source/filter/html/htmlnum.cxx
+++ b/sw/source/filter/html/htmlnum.cxx
@@ -300,7 +300,7 @@ void SwHTMLParser::NewNumBulList( int nToken )
// den aktuellen Absatz erst einmal nicht numerieren
{
- BYTE nLvl = nLevel;
+ sal_uInt8 nLvl = nLevel;
SetNodeNum( nLvl, false );
}
@@ -681,7 +681,7 @@ void SwHTMLWriter::FillNextNumInfo()
{
pNextNumRuleInfo = 0;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex() + 1;
sal_Bool bTable = sal_False;
do
@@ -755,7 +755,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
bStartValue = sal_True;
if( rInfo.GetDepth() > 1 )
{
- ULONG nPos =
+ sal_uLong nPos =
rWrt.pCurPam->GetPoint()->nNode.GetIndex() + 1;
do
{
@@ -898,7 +898,7 @@ Writer& OutHTML_NumBulListStart( SwHTMLWriter& rWrt,
rWrt.Strm() << sOut.GetBuffer();
if( rWrt.bCfgOutStyles )
- OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (BYTE)i );
+ OutCSS1_NumBulListStyleOpt( rWrt, *rInfo.GetNumRule(), (sal_uInt8)i );
rWrt.Strm() << '>';
diff --git a/sw/source/filter/html/htmlplug.cxx b/sw/source/filter/html/htmlplug.cxx
index 5cf6a7b93496..6c82e8141d88 100644
--- a/sw/source/filter/html/htmlplug.cxx
+++ b/sw/source/filter/html/htmlplug.cxx
@@ -78,53 +78,53 @@ using namespace com::sun::star;
namespace {
-static char const sHTML_O_Hidden_False[] = "FALSE";
+static char const sHTML_O_Hidden_False[] = "sal_False";
}
-const ULONG HTML_FRMOPTS_EMBED_ALL =
+const sal_uLong HTML_FRMOPTS_EMBED_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_EMBED_CNTNR =
+const sal_uLong HTML_FRMOPTS_EMBED_CNTNR =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_EMBED =
+const sal_uLong HTML_FRMOPTS_EMBED =
HTML_FRMOPTS_EMBED_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_HIDDEN_EMBED =
+const sal_uLong HTML_FRMOPTS_HIDDEN_EMBED =
HTML_FRMOPT_ALT |
HTML_FRMOPT_NAME;
-const ULONG HTML_FRMOPTS_APPLET_ALL =
+const sal_uLong HTML_FRMOPTS_APPLET_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_APPLET_CNTNR =
+const sal_uLong HTML_FRMOPTS_APPLET_CNTNR =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_APPLET =
+const sal_uLong HTML_FRMOPTS_APPLET =
HTML_FRMOPTS_APPLET_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_IFRAME_ALL =
+const sal_uLong HTML_FRMOPTS_IFRAME_ALL =
HTML_FRMOPT_ALT |
HTML_FRMOPT_SIZE;
-const ULONG HTML_FRMOPTS_IFRAME_CNTNR =
+const sal_uLong HTML_FRMOPTS_IFRAME_CNTNR =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ABSSIZE;
-const ULONG HTML_FRMOPTS_IFRAME =
+const sal_uLong HTML_FRMOPTS_IFRAME =
HTML_FRMOPTS_IFRAME_ALL |
HTML_FRMOPT_ALIGN |
HTML_FRMOPT_SPACE |
HTML_FRMOPT_BORDER |
HTML_FRMOPT_BRCLEAR;
-const ULONG HTML_FRMOPTS_OLE_CSS1 =
+const sal_uLong HTML_FRMOPTS_OLE_CSS1 =
HTML_FRMOPT_S_ALIGN |
HTML_FRMOPT_S_SPACE;
@@ -132,13 +132,13 @@ const ULONG HTML_FRMOPTS_OLE_CSS1 =
void SwHTMLParser::SetFixSize( const Size& rPixSize,
const Size& rTwipDfltSize,
- BOOL bPrcWidth, BOOL bPrcHeight,
+ sal_Bool bPrcWidth, sal_Bool bPrcHeight,
SfxItemSet& /*rCSS1ItemSet*/,
SvxCSS1PropertyInfo& rCSS1PropInfo,
SfxItemSet& rFlyItemSet )
{
// absolulte Groessenangaben in Twip umrechnen
- BYTE nPrcWidth = 0, nPrcHeight = 0;
+ sal_uInt8 nPrcWidth = 0, nPrcHeight = 0;
Size aTwipSz( bPrcWidth || USHRT_MAX==rPixSize.Width() ? 0 : rPixSize.Width(),
bPrcHeight || USHRT_MAX==rPixSize.Height() ? 0 : rPixSize.Height() );
if( (aTwipSz.Width() || aTwipSz.Height()) && Application::GetDefaultDevice() )
@@ -151,7 +151,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// die Breite bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eWidthType )
{
- nPrcWidth = (BYTE)rCSS1PropInfo.nWidth;
+ nPrcWidth = (sal_uInt8)rCSS1PropInfo.nWidth;
aTwipSz.Width() = rTwipDfltSize.Width();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eWidthType )
@@ -160,7 +160,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcWidth && rPixSize.Width() )
{
- nPrcWidth = (BYTE)rPixSize.Width();
+ nPrcWidth = (sal_uInt8)rPixSize.Width();
if( nPrcWidth > 100 )
nPrcWidth = 100;
@@ -178,7 +178,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
// Hoehe bearbeiten
if( SVX_CSS1_LTYPE_PERCENTAGE == rCSS1PropInfo.eHeightType )
{
- nPrcHeight = (BYTE)rCSS1PropInfo.nHeight;
+ nPrcHeight = (sal_uInt8)rCSS1PropInfo.nHeight;
aTwipSz.Height() = rTwipDfltSize.Height();
}
else if( SVX_CSS1_LTYPE_TWIP== rCSS1PropInfo.eHeightType )
@@ -187,7 +187,7 @@ void SwHTMLParser::SetFixSize( const Size& rPixSize,
}
else if( bPrcHeight && rPixSize.Height() )
{
- nPrcHeight = (BYTE)rPixSize.Height();
+ nPrcHeight = (sal_uInt8)rPixSize.Height();
if( nPrcHeight > 100 )
nPrcHeight = 100;
@@ -223,12 +223,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
Application::GetDefaultDevice()->PixelToLogic( aTwipSpc,
MapMode(MAP_TWIP) );
nLeftSpace = nRightSpace = aTwipSpc.Width();
- nUpperSpace = nLowerSpace = (USHORT)aTwipSpc.Height();
+ nUpperSpace = nLowerSpace = (sal_uInt16)aTwipSpc.Height();
}
// linken/rechten Rand setzen
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_LR_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxLRSpaceItem *pLRItem = (const SvxLRSpaceItem *)pItem;
@@ -237,12 +237,12 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
if( rCSS1PropInfo.bLeftMargin )
{
nLeftSpace = aLRItem.GetLeft();
- rCSS1PropInfo.bLeftMargin = FALSE;
+ rCSS1PropInfo.bLeftMargin = sal_False;
}
if( rCSS1PropInfo.bRightMargin )
{
nRightSpace = aLRItem.GetRight();
- rCSS1PropInfo.bRightMargin = FALSE;
+ rCSS1PropInfo.bRightMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_LR_SPACE );
}
@@ -266,19 +266,19 @@ void SwHTMLParser::SetSpace( const Size& rPixSpace,
}
// oberen/unteren Rand setzen
- if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, TRUE, &pItem ) )
+ if( SFX_ITEM_SET==rCSS1ItemSet.GetItemState( RES_UL_SPACE, sal_True, &pItem ) )
{
// Ggf. den Erstzeilen-Einzug noch plaetten
const SvxULSpaceItem *pULItem = (const SvxULSpaceItem *)pItem;
if( rCSS1PropInfo.bTopMargin )
{
nUpperSpace = pULItem->GetUpper();
- rCSS1PropInfo.bTopMargin = FALSE;
+ rCSS1PropInfo.bTopMargin = sal_False;
}
if( rCSS1PropInfo.bBottomMargin )
{
nLowerSpace = pULItem->GetLower();
- rCSS1PropInfo.bBottomMargin = FALSE;
+ rCSS1PropInfo.bBottomMargin = sal_False;
}
rCSS1ItemSet.ClearItem( RES_UL_SPACE );
}
@@ -309,7 +309,7 @@ void SwHTMLParser::InsertEmbed()
String aURL, aType, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( USHRT_MAX, USHRT_MAX );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bHidden = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bHidden = sal_False;
sal_Int16 eVertOri = text::VertOrientation::NONE;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
SvCommandList aCmdLst;
@@ -318,8 +318,8 @@ void SwHTMLParser::InsertEmbed()
// Die Optionen werden vorwaerts gelesen, weil die Plugins sie in
// dieser Reihenfolge erwarten. Trotzdem darf immer nur der erste
// Wert einer Option beruecksichtigt werden.
- USHORT nArrLen = pHTMLOptions->Count();
- for( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -405,7 +405,7 @@ void SwHTMLParser::InsertEmbed()
// Size (0,0) wird in SetFrmSize auf (MINFLY, MINFLY) umgebogen
aSize.Width() = 0; aSize.Height() = 0;
aSpace.Width() = 0; aSpace.Height() = 0;
- bPrcWidth = bPrcHeight = FALSE;
+ bPrcWidth = bPrcHeight = sal_False;
}
// die URL aufbereiten
@@ -514,7 +514,7 @@ void SwHTMLParser::NewObject()
RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -673,7 +673,7 @@ void SwHTMLParser::InsertApplet()
String aCodeBase, aCode, aName, aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE, bMayScript = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False, bMayScript = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
@@ -683,7 +683,7 @@ void SwHTMLParser::InsertApplet()
pAppletImpl = new SwApplet_Impl( pDoc->GetAttrPool(), RES_FRMATR_BEGIN, RES_FRMATR_END-1 );
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -728,7 +728,7 @@ void SwHTMLParser::InsertApplet()
aSpace.Height() = (long)pOption->GetNumber();
break;
case HTML_O_MAYSCRIPT:
- bMayScript = TRUE;
+ bMayScript = sal_True;
break;
}
@@ -808,7 +808,7 @@ void SwHTMLParser::InsertParam()
String aName, aValue;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -837,15 +837,15 @@ void SwHTMLParser::InsertFloatingFrame()
String aAlt, aId, aStyle, aClass;
Size aSize( USHRT_MAX, USHRT_MAX );
Size aSpace( 0, 0 );
- BOOL bPrcWidth = FALSE, bPrcHeight = FALSE;
+ sal_Bool bPrcWidth = sal_False, bPrcHeight = sal_False;
sal_Int16 eVertOri = text::VertOrientation::TOP;
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
const HTMLOptions *pHTMLOptions = GetOptions();
// Erstmal die Optionen f?r das Writer-Frame-Format holen
- USHORT nArrLen = pHTMLOptions->Count();
- for ( USHORT i=0; i<nArrLen; i++ )
+ sal_uInt16 nArrLen = pHTMLOptions->Count();
+ for ( sal_uInt16 i=0; i<nArrLen; i++ )
{
const HTMLOption *pOption = (*pHTMLOptions)[i];
switch( pOption->GetToken() )
@@ -964,12 +964,12 @@ void SwHTMLParser::InsertFloatingFrame()
// Ggf Frames anlegen und auto-geb. Rahmen registrieren
RegisterFlyFrm( pFlyFmt );
- bInFloatingFrame = TRUE;
+ bInFloatingFrame = sal_True;
}
/* */
-USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
+sal_uInt16 SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
{
SwOLEObj& rObj = ((SwOLENode*)rNode.GetOLENode())->GetOLEObj();
@@ -992,16 +992,16 @@ USHORT SwHTMLWriter::GuessOLENodeFrmType( const SwNode& rNode )
}
#endif
- return static_cast< USHORT >(eType);
+ return static_cast< sal_uInt16 >(eType);
}
Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
@@ -1015,7 +1015,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
return rWrt;
uno::Reference < beans::XPropertySet > xSet( xObj->getComponent(), uno::UNO_QUERY );
- BOOL bHiddenEmbed = FALSE;
+ sal_Bool bHiddenEmbed = sal_False;
if( !xSet.is() )
{
@@ -1024,11 +1024,11 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
ByteString aEndTags;
- ULONG nFrmOpts;
+ sal_uLong nFrmOpts;
// wenn meoglich vor dem "Objekt" einen Zeilen-Umbruch ausgeben
if( rHTMLWrt.bLFPossible )
- rHTMLWrt.OutNewLine( TRUE );
+ rHTMLWrt.OutNewLine( sal_True );
if( rFrmFmt.GetName().Len() )
rHTMLWrt.OutImplicitMark( rFrmFmt.GetName(),
@@ -1074,7 +1074,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// Das Plugin ist HIDDEN
(sOut += ' ') += OOO_STRING_SW_HTML_O_Hidden;
nFrmOpts = HTML_FRMOPTS_HIDDEN_EMBED;
- bHiddenEmbed = TRUE;
+ bHiddenEmbed = sal_True;
}
else
{
@@ -1172,12 +1172,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
SvULongs aParams;
- ULONG i = aCommands.Count();
+ sal_uLong i = aCommands.Count();
while( i > 0 )
{
const SvCommand& rCommand = aCommands[ --i ];
const String& rName = rCommand.GetCommand();
- USHORT nType = SwApplet_Impl::GetOptionType( rName, TRUE );
+ sal_uInt16 nType = SwApplet_Impl::GetOptionType( rName, sal_True );
if( SWHTML_OPTTYPE_TAG == nType )
{
const String& rValue = rCommand.GetArgument();
@@ -1196,7 +1196,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.IncIndentLevel(); // Inhalt von Applet einruecken
- USHORT ii = aParams.Count();
+ sal_uInt16 ii = aParams.Count();
while( ii > 0 )
{
const SvCommand& rCommand = aCommands[ aParams[--ii] ];
@@ -1215,7 +1215,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
rHTMLWrt.DecIndentLevel(); // Inhalt von Applet einruecken
if( aCommands.Count() )
rHTMLWrt.OutNewLine();
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_applet, sal_False );
}
else
if( aGlobName == SvGlobalName( SO3_PLUGIN_CLASSID ) )
@@ -1228,12 +1228,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
SvCommandList aCommands;
aCommands.FillFromSequence( aProps );
- for( ULONG i=0; i<aCommands.Count(); i++ )
+ for( sal_uLong i=0; i<aCommands.Count(); i++ )
{
const SvCommand& rCommand = aCommands[ i ];
const String& rName = rCommand.GetCommand();
- if( SwApplet_Impl::GetOptionType( rName, FALSE ) == SWHTML_OPTTYPE_TAG )
+ if( SwApplet_Impl::GetOptionType( rName, sal_False ) == SWHTML_OPTTYPE_TAG )
{
const String& rValue = rCommand.GetArgument();
rWrt.Strm() << ' ';
@@ -1250,7 +1250,7 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
// ausgeben
rHTMLWrt.Strm() << '>';
- HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rWrt.Strm(), OOO_STRING_SVTOOLS_HTML_iframe, sal_False );
}
if( aEndTags.Len() )
@@ -1260,12 +1260,12 @@ Writer& OutHTML_FrmFmtOLENode( Writer& rWrt, const SwFrmFmt& rFrmFmt,
}
Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
- BOOL bInCntnr )
+ sal_Bool bInCntnr )
{
SwHTMLWriter& rHTMLWrt = (SwHTMLWriter&)rWrt;
const SwFmtCntnt& rFlyCntnt = rFrmFmt.GetCntnt();
- ULONG nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
+ sal_uLong nStt = rFlyCntnt.GetCntntIdx()->GetIndex()+1;
SwOLENode *pOLENd = rHTMLWrt.pDoc->GetNodes()[ nStt ]->GetOLENode();
OSL_ENSURE( pOLENd, "OLE-Node erwartet" );
@@ -1279,7 +1279,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
if(pTempFileName)
aGrfNm = *pTempFileName;
- USHORT nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
+ sal_uInt16 nErr = XOutBitmap::WriteGraphic( aGrf, aGrfNm,
String::CreateFromAscii("JPG"),
(XOUTBMP_USE_GIF_IF_POSSIBLE |
XOUTBMP_USE_NATIVE_IF_POSSIBLE) );
@@ -1291,7 +1291,7 @@ Writer& OutHTML_FrmFmtOLENodeGrf( Writer& rWrt, const SwFrmFmt& rFrmFmt,
aGrfNm = URIHelper::SmartRel2Abs(
INetURLObject(rWrt.GetBaseURL()), aGrfNm,
URIHelper::GetMaybeFileHdl() );
- ULONG nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
+ sal_uLong nFlags = bInCntnr ? HTML_FRMOPTS_GENIMG_CNTNR
: HTML_FRMOPTS_GENIMG;
OutHTML_Image( rWrt, rFrmFmt, aGrfNm,
pOLENd->GetTitle(), pOLENd->GetTwipSize(),
diff --git a/sw/source/filter/html/htmlsect.cxx b/sw/source/filter/html/htmlsect.cxx
index 46d8d6a0c05f..e1bf61ee49ed 100644
--- a/sw/source/filter/html/htmlsect.cxx
+++ b/sw/source/filter/html/htmlsect.cxx
@@ -204,7 +204,7 @@ void SwHTMLParser::NewDivision( int nToken )
aDelPam.SetMark();
const SwStartNode *pStNd =
- (const SwStartNode *)pDoc->GetNodes()[rCntntStIdx];
+ (const SwStartNode *) &rCntntStIdx.GetNode();
aDelPam.GetPoint()->nNode = pStNd->EndOfSectionIndex() - 1;
pDoc->DelFullPara( aDelPam );
@@ -261,7 +261,7 @@ void SwHTMLParser::NewDivision( int nToken )
if( !bAppended )
{
SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 );
- if( (pDoc->GetNodes()[aPrvNdIdx])->IsSectionNode() )
+ if (aPrvNdIdx.GetNode().IsSectionNode())
{
AppendTxtNode();
bAppended = sal_True;
@@ -350,8 +350,7 @@ void SwHTMLParser::NewDivision( int nToken )
}
SwTxtNode* pOldTxtNd =
- bAppended ? 0 : pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode();
pPam->Move( fnMoveBackward );
@@ -435,10 +434,10 @@ void SwHTMLParser::FixHeaderFooterDistance( sal_Bool bHeader,
const SwFmtCntnt& rFlyCntnt = pHdFtFmt->GetCntnt();
const SwNodeIndex& rCntntStIdx = *rFlyCntnt.GetCntntIdx();
- ULONG nPrvNxtIdx;
+ sal_uLong nPrvNxtIdx;
if( bHeader )
{
- nPrvNxtIdx = pDoc->GetNodes()[rCntntStIdx]->EndOfSectionIndex()-1;
+ nPrvNxtIdx = rCntntStIdx.GetNode().EndOfSectionIndex()-1;
}
else
{
@@ -689,7 +688,7 @@ void SwHTMLParser::NewMultiCol()
// node must be inserted. Otherwise, the new section will be
// inserted in front of the old one.
SwNodeIndex aPrvNdIdx( pPam->GetPoint()->nNode, -1 );
- if( (pDoc->GetNodes()[aPrvNdIdx])->IsSectionNode() )
+ if (aPrvNdIdx.GetNode().IsSectionNode())
{
AppendTxtNode();
bAppended = sal_True;
@@ -745,8 +744,7 @@ void SwHTMLParser::NewMultiCol()
}
SwTxtNode* pOldTxtNd =
- bAppended ? 0 : pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->GetTxtNode();
+ (bAppended) ? 0 : pPam->GetPoint()->nNode.GetNode().GetTxtNode();
pPam->Move( fnMoveBackward );
@@ -810,7 +808,7 @@ void SwHTMLParser::InsertFlyFrame( const SfxItemSet& rItemSet,
/* */
void SwHTMLParser::MovePageDescAttrs( SwNode *pSrcNd,
- ULONG nDestIdx,
+ sal_uLong nDestIdx,
sal_Bool bFmtBreak )
{
SwCntntNode* pDestCntntNd =
diff --git a/sw/source/filter/html/htmltab.cxx b/sw/source/filter/html/htmltab.cxx
index 31797ba1599c..d2cbded94ee0 100644
--- a/sw/source/filter/html/htmltab.cxx
+++ b/sw/source/filter/html/htmltab.cxx
@@ -2728,7 +2728,7 @@ void HTMLTable::MakeTable( SwTableBox *pBox, sal_uInt16 nAbsAvail,
if( GetBGBrush() )
pSwTable->GetFrmFmt()->SetFmtAttr( *GetBGBrush() );
- ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< USHORT >(nHeadlineRepeat) );
+ ((SwTable *)pSwTable)->SetRowsToRepeat( static_cast< sal_uInt16 >(nHeadlineRepeat) );
((SwTable *)pSwTable)->GCLines();
sal_Bool bIsInFlyFrame = pContext && pContext->GetFrmFmt();
@@ -2887,7 +2887,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection
const SwStartNode *pStNd;
if( pTable && pTable->bFirstCell )
{
- SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode();
pNd->GetTxtNode()->ChgFmtColl( pColl );
pStNd = pNd->FindTableBoxStartNode();
pTable->bFirstCell = sal_False;
@@ -2930,7 +2930,7 @@ const SwStartNode *SwHTMLParser::InsertTableSection( sal_uInt16 nPoolId )
SwTxtFmtColl *pColl = pCSS1Parser->GetTxtCollFromPool( nPoolId );
- SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode *const pNd = & pPam->GetPoint()->nNode.GetNode();
const SwStartNode *pStNd;
if( pTable && pTable->bFirstCell )
{
@@ -3438,7 +3438,7 @@ void _CellSaveStruct::EndNoBreak( const SwPosition& rPos )
}
}
-void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc *pDoc )
+void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc * /*pDoc*/ )
{
if( pCnts && pCurrCnts==pCnts )
{
@@ -3457,8 +3457,7 @@ void _CellSaveStruct::CheckNoBreak( const SwPosition& rPos, SwDoc *pDoc )
}
else if( nNoBreakEndCntntPos + 1 == rPos.nContent.GetIndex() )
{
- const SwTxtNode *pTxtNd =
- pDoc->GetNodes()[rPos.nNode]->GetTxtNode();
+ SwTxtNode const*const pTxtNd(rPos.nNode.GetNode().GetTxtNode());
if( pTxtNd )
{
sal_Unicode cLast =
@@ -3482,13 +3481,13 @@ HTMLTableCnts *SwHTMLParser::InsertTableContents(
{
// eine neue Section anlegen, der PaM steht dann darin
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(bHead ? RES_POOLCOLL_TABLE_HDLN
+ InsertTableSection( static_cast< sal_uInt16 >(bHead ? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE) );
if( GetNumInfo().GetNumRule() )
{
// 1. Absatz auf nicht numeriert setzen
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
SetNodeNum( nLvl, false );
}
@@ -3836,11 +3835,11 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
pPam->Move( fnMoveBackward );
}
- const SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode const*const pNd = & pPam->GetPoint()->nNode.GetNode();
if( !bAppended && !bForceFrame )
{
- SwTxtNode* pOldTxtNd =
- pDoc->GetNodes()[pSavePos->nNode]->GetTxtNode();
+ SwTxtNode *const pOldTxtNd =
+ pSavePos->nNode.GetNode().GetTxtNode();
OSL_ENSURE( pOldTxtNd, "Wieso stehen wir in keinem Txt-Node?" );
SwFrmFmt *pFrmFmt = pSwTable->GetFrmFmt();
@@ -3909,7 +3908,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
}
}
- const SwNode *pNd = pDoc->GetNodes()[pPam->GetPoint()->nNode];
+ SwNode const*const pNd = & pPam->GetPoint()->nNode.GetNode();
const SwStartNode *pStNd = (pTable->bFirstCell ? pNd->FindTableNode()
: pNd->FindTableBoxStartNode() );
@@ -4013,8 +4012,8 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
// koennen wir erneut eine echte Tabelle aufmachen.
// Wir erkennen das daran, dass wir keinen
// Tabellen-Node mehr finden.
- bTopTable = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->FindTableNode() == 0;
+ bTopTable = (0 ==
+ pPam->GetPoint()->nNode.GetNode().FindTableNode());
// Wenn im aktuellen Absatz Flys verankert sind,
// muss die neue Tabelle in einen Rahmen.
@@ -4174,7 +4173,7 @@ void SwHTMLParser::BuildTableCell( HTMLTable *pCurTable, sal_Bool bReadOptions,
!pSaveStruct->IsInSection(),
"Section oder nicht, das ist hier die Frage" );
const SwStartNode *pStNd =
- InsertTableSection( static_cast< USHORT >(pSaveStruct->IsHeaderCell()
+ InsertTableSection( static_cast< sal_uInt16 >(pSaveStruct->IsHeaderCell()
? RES_POOLCOLL_TABLE_HDLN
: RES_POOLCOLL_TABLE ));
const SwEndNode *pEndNd = pStNd->EndOfSectionNode();
diff --git a/sw/source/filter/html/htmltabw.cxx b/sw/source/filter/html/htmltabw.cxx
index 445369af2fcf..82628e810b8c 100644
--- a/sw/source/filter/html/htmltabw.cxx
+++ b/sw/source/filter/html/htmltabw.cxx
@@ -67,6 +67,7 @@
#include <viewsh.hxx>
#include <viewopt.hxx>
#endif
+#include <sal/types.h>
#define MAX_DEPTH (3)
@@ -94,8 +95,8 @@ class SwHTMLWrtTable : public SwWriteTable
sal_Bool bTop, sal_Bool bBottom, sal_Bool bLeft, sal_Bool bRight );
public:
- SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt16 nBWidth,
- sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ SwHTMLWrtTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
+ sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0 );
SwHTMLWrtTable( const SwHTMLTableLayout *pLayoutInfo );
@@ -107,7 +108,7 @@ public:
SwHTMLWrtTable::SwHTMLWrtTable( const SwTableLines& rLines, long nWidth,
- sal_uInt16 nBWidth, sal_Bool bRel, USHORT nNumOfRowsToRepeat,
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nNumOfRowsToRepeat,
sal_uInt16 nLSub, sal_uInt16 nRSub )
: SwWriteTable( rLines, nWidth, nBWidth, bRel, MAX_DEPTH, nLSub, nRSub, nNumOfRowsToRepeat )
{
@@ -287,7 +288,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
sal_Bool bHead = sal_False;
if( pSttNd )
{
- ULONG nNdPos = pSttNd->GetIndex()+1;
+ sal_uLong nNdPos = pSttNd->GetIndex()+1;
// Art der Zelle (TD/TH) bestimmen
SwNode* pNd;
@@ -332,7 +333,7 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
#ifndef PURE_HTML
long nWidth = 0;
- sal_uInt16 nPrcWidth = USHRT_MAX;
+ sal_uInt32 nPrcWidth = USHRT_MAX;
if( bOutWidth )
{
if( bLayoutExport )
@@ -471,7 +472,9 @@ void SwHTMLWrtTable::OutTableCell( SwHTMLWriter& rWrt,
}
else
{
- sal_uInt16 nTWidth, nBWidth, nLSub, nRSub;
+ sal_uInt16 nTWidth;
+ sal_uInt32 nBWidth;
+ sal_uInt16 nLSub, nRSub;
if( HasRelWidths() )
{
nTWidth = 100;
@@ -829,7 +832,7 @@ void SwHTMLWrtTable::Write( SwHTMLWriter& rWrt, sal_Int16 eAlign,
ByteString sOutStr( '<' );
sOutStr += OOO_STRING_SVTOOLS_HTML_col;
- sal_uInt16 nWidth;
+ sal_uInt32 nWidth;
sal_Bool bRel;
if( bLayoutExport )
{
diff --git a/sw/source/filter/html/makefile.mk b/sw/source/filter/html/makefile.mk
deleted file mode 100644
index f64a6d593fd2..000000000000
--- a/sw/source/filter/html/makefile.mk
+++ /dev/null
@@ -1,79 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=html
-
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/css1kywd.obj \
- $(SLO)$/htmlflyt.obj
-
-EXCEPTIONSFILES = \
- $(SLO)$/SwAppletImpl.obj \
- $(SLO)$/css1atr.obj \
- $(SLO)$/htmlatr.obj \
- $(SLO)$/htmlbas.obj \
- $(SLO)$/htmlcss1.obj \
- $(SLO)$/htmlctxt.obj \
- $(SLO)$/htmldraw.obj \
- $(SLO)$/htmlfld.obj \
- $(SLO)$/htmlfldw.obj \
- $(SLO)$/htmlfly.obj \
- $(SLO)$/htmlform.obj \
- $(SLO)$/htmlforw.obj \
- $(SLO)$/htmlftn.obj \
- $(SLO)$/htmlgrin.obj \
- $(SLO)$/htmlnum.obj \
- $(SLO)$/htmlplug.obj \
- $(SLO)$/htmlsect.obj \
- $(SLO)$/htmltab.obj \
- $(SLO)$/htmltabw.obj \
- $(SLO)$/parcss1.obj \
- $(SLO)$/svxcss1.obj \
- $(SLO)$/swhtml.obj \
- $(SLO)$/wrthtml.obj
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/html/parcss1.cxx b/sw/source/filter/html/parcss1.cxx
index 6f2b4bfd2cd6..d8743e92ab85 100644
--- a/sw/source/filter/html/parcss1.cxx
+++ b/sw/source/filter/html/parcss1.cxx
@@ -77,8 +77,8 @@ void CSS1Parser::InitRead( const String& rIn )
nlLineNr = 0;
nlLinePos = 0;
- bWhiteSpace = TRUE; // Wenn noch nichts gelesen wurde ist das wie WS
- bEOF = FALSE;
+ bWhiteSpace = sal_True; // Wenn noch nichts gelesen wurde ist das wie WS
+ bEOF = sal_False;
eState = CSS1_PAR_WORKING;
nValue = 0.;
@@ -92,7 +92,7 @@ sal_Unicode CSS1Parser::GetNextChar()
{
if( nInPos >= aIn.Len() )
{
- bEOF = TRUE;
+ bEOF = sal_True;
return (sal_Unicode)EOF;
}
@@ -125,10 +125,10 @@ CSS1Token CSS1Parser::GetNextToken()
do {
// Merken, ob davor White-Space gelesen wurde
- BOOL bPrevWhiteSpace = bWhiteSpace;
- bWhiteSpace = FALSE;
+ sal_Bool bPrevWhiteSpace = bWhiteSpace;
+ bWhiteSpace = sal_False;
- BOOL bNextCh = TRUE;
+ sal_Bool bNextCh = sal_True;
switch( cNextCh )
{
case '/': // COMMENT | '/'
@@ -139,7 +139,7 @@ CSS1Token CSS1Parser::GetNextToken()
// COMMENT
cNextCh = GetNextChar();
- BOOL bAsterix = FALSE;
+ sal_Bool bAsterix = sal_False;
while( !(bAsterix && '/'==cNextCh) && !IsEOF() )
{
bAsterix = ('*'==cNextCh);
@@ -149,7 +149,7 @@ CSS1Token CSS1Parser::GetNextToken()
else
{
// '/'
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_SLASH;
}
}
@@ -196,13 +196,13 @@ CSS1Token CSS1Parser::GetNextToken()
if( CSS1_NULL==nRet )
{
aToken.Erase();
- USHORT nBlockLvl = 0;
+ sal_uInt16 nBlockLvl = 0;
sal_Unicode cQuoteCh = 0;
- BOOL bDone = FALSE, bEscape = FALSE;
+ sal_Bool bDone = sal_False, bEscape = sal_False;
while( !bDone && !IsEOF() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
switch( cNextCh )
{
case '{':
@@ -234,14 +234,14 @@ CSS1Token CSS1Parser::GetNextToken()
break;
case '\\':
if( !bOldEscape )
- bEscape = TRUE;
+ bEscape = sal_True;
break;
}
cNextCh = GetNextChar();
}
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -253,7 +253,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -283,13 +283,13 @@ CSS1Token CSS1Parser::GetNextToken()
nRet = CSS1_IDENT;
}
- bWhiteSpace = FALSE;
- bNextCh = FALSE;
+ bWhiteSpace = sal_False;
+ bNextCh = sal_False;
}
else
{
// Fehlerbehandlung: '!' ignorieren
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -329,7 +329,7 @@ CSS1Token CSS1Parser::GetNextToken()
sal_Unicode cNextChSave = cNextCh;
sal_uInt32 nlLineNrSave = nlLineNr;
sal_uInt32 nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 16 );
@@ -347,7 +347,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -374,7 +374,7 @@ CSS1Token CSS1Parser::GetNextToken()
while( ( ' ' == cNextCh ||
(cNextCh >= 0x09 && cNextCh <= 0x0d) ) && !IsEOF() )
{
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
cNextCh = GetNextChar();
}
@@ -382,7 +382,7 @@ CSS1Token CSS1Parser::GetNextToken()
switch( cNextCh )
{
case '%': // PERCENTAGE
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
nRet = CSS1_PERCENTAGE;
break;
@@ -400,9 +400,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosOld = nInPos;
sal_Unicode cNextChOld = cNextCh;
- ULONG nlLineNrOld = nlLineNr;
- ULONG nlLinePosOld = nlLinePos;
- BOOL bEOFOld = bEOF;
+ sal_uLong nlLineNrOld = nlLineNr;
+ sal_uLong nlLinePosOld = nlLinePos;
+ sal_Bool bEOFOld = bEOF;
// den naechsten Identifer scannen
String aIdent;
@@ -498,13 +498,13 @@ CSS1Token CSS1Parser::GetNextToken()
}
else
{
- bWhiteSpace = FALSE;
+ bWhiteSpace = sal_False;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default: // NUMBER IDENT
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_NUMBER;
break;
}
@@ -553,9 +553,9 @@ CSS1Token CSS1Parser::GetNextToken()
// die aktuelle Position retten
xub_StrLen nInPosSave = nInPos;
sal_Unicode cNextChSave = cNextCh;
- ULONG nlLineNrSave = nlLineNr;
- ULONG nlLinePosSave = nlLinePos;
- BOOL bEOFSave = bEOF;
+ sal_uLong nlLineNrSave = nlLineNr;
+ sal_uLong nlLinePosSave = nlLinePos;
+ sal_Bool bEOFSave = bEOF;
// erstmal versuchen eine Hex-Zahl zu scannen
::rtl::OUStringBuffer sTmpBuffer( 6L );
@@ -573,7 +573,7 @@ CSS1Token CSS1Parser::GetNextToken()
// wir haben eine hexadezimale Farbe gefunden
aToken += String(sTmpBuffer.makeStringAndClear());
nRet = CSS1_HEXCOLOR;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -587,21 +587,21 @@ CSS1Token CSS1Parser::GetNextToken()
}
nRet = CSS1_HASH;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
case ' ':
case '\t':
case '\r':
case '\n': // White-Space
- bWhiteSpace = TRUE;
+ bWhiteSpace = sal_True;
break;
case (sal_Unicode)EOF:
if( IsEOF() )
{
eState = CSS1_PAR_ACCEPTED;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
// kein break;
@@ -613,7 +613,7 @@ CSS1Token CSS1Parser::GetNextToken()
{
// IDENT
- BOOL bHexColor = TRUE;
+ sal_Bool bHexColor = sal_True;
// den naechsten Identifer scannen
::rtl::OUStringBuffer sTmpBuffer( 64L );
@@ -638,7 +638,7 @@ CSS1Token CSS1Parser::GetNextToken()
if( bHexColor && sTmpBuffer.getLength()==6 )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_HEXCOLOR;
break;
@@ -649,7 +649,7 @@ CSS1Token CSS1Parser::GetNextToken()
(('r'==aToken.GetChar(0) || 'R'==aToken.GetChar(0)) &&
aToken.EqualsIgnoreCaseAscii(sCSS1_rgb)) ) )
{
- USHORT nNestCnt = 0;
+ sal_uInt16 nNestCnt = 0;
::rtl::OUStringBuffer sTmpBuffer2( 64L );
do {
sTmpBuffer2.append( cNextCh );
@@ -662,14 +662,14 @@ CSS1Token CSS1Parser::GetNextToken()
} while( (nNestCnt>1 || ')'!=cNextCh) && !IsEOF() );
sTmpBuffer2.append( cNextCh );
aToken += String(sTmpBuffer2.makeStringAndClear());
- bNextCh = TRUE;
+ bNextCh = sal_True;
nRet = 'u'==aToken.GetChar(0) || 'U'==aToken.GetChar(0)
? CSS1_URL
: CSS1_RGB;
}
else
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nRet = CSS1_IDENT;
}
}
@@ -707,7 +707,7 @@ void CSS1Parser::ParseStyleSheet()
LOOP_CHECK_DECL
// import*
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
while( !bDone && IsParserWorking() )
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseStyleSheet()/import *" )
@@ -726,7 +726,7 @@ void CSS1Parser::ParseStyleSheet()
case CSS1_PAGE_SYM:
// /Feature: PrintExt
// rule
- bDone = TRUE;
+ bDone = sal_True;
break;
default:
// Fehlerbehandlung: ueberlesen
@@ -775,7 +775,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, TRUE ) )
+ if( SelectorParsed( pSelector, sal_True ) )
delete pSelector;
LOOP_CHECK_DECL
@@ -794,7 +794,7 @@ void CSS1Parser::ParseRule()
return;
// Selektor verarbeiten
- if( SelectorParsed( pSelector, FALSE ) )
+ if( SelectorParsed( pSelector, sal_False ) )
delete pSelector;
}
@@ -865,7 +865,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
CSS1Selector *pRoot = 0, *pLast = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
CSS1Selector *pNew = 0;
LOOP_CHECK_DECL
@@ -875,7 +875,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
{
LOOP_CHECK_CHECK( "Endlos-Schleife in ParseSelector()" )
- BOOL bNextToken = TRUE;
+ sal_Bool bNextToken = sal_True;
switch( nToken )
{
@@ -908,7 +908,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
else
{
// das war jetzt ein Look-Ahead
- bNextToken = FALSE;
+ bNextToken = sal_False;
}
pNew = new CSS1Selector( eType, aElement );
}
@@ -959,7 +959,7 @@ CSS1Selector *CSS1Parser::ParseSelector()
default:
// wir wissen nicht was kommt, also aufhoehren
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1056,7 +1056,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
// term [operator term]*
// hier sind wir sehr lax, was die Syntax angeht, sollte aber kein
// Problem sein
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
sal_Unicode cSign = 0, cOp = 0;
CSS1Expression *pNew = 0;
@@ -1106,7 +1106,7 @@ CSS1Expression *CSS1Parser::ParseDeclaration( String& rProperty )
break;
default:
- bDone = TRUE;
+ bDone = sal_True;
break;
}
@@ -1157,7 +1157,7 @@ CSS1Parser::~CSS1Parser()
}
-BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleSheet( const String& rIn )
{
String aTmp( rIn );
@@ -1180,20 +1180,20 @@ BOOL CSS1Parser::ParseStyleSheet( const String& rIn )
aTmp.Erase( aTmp.Len()-3 );
if( !aTmp.Len() )
- return TRUE;
+ return sal_True;
InitRead( aTmp );
ParseStyleSheet();
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::ParseStyleOption( const String& rIn )
+sal_Bool CSS1Parser::ParseStyleOption( const String& rIn )
{
if( !rIn.Len() )
- return TRUE;
+ return sal_True;
InitRead( rIn );
@@ -1201,7 +1201,7 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
CSS1Expression *pExpr = ParseDeclaration( aProperty );
if( !pExpr )
{
- return FALSE;
+ return sal_False;
}
// expression verarbeiten
@@ -1228,20 +1228,20 @@ BOOL CSS1Parser::ParseStyleOption( const String& rIn )
}
}
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, BOOL /*bFirst*/ )
+sal_Bool CSS1Parser::SelectorParsed( const CSS1Selector * /* pSelector */, sal_Bool /*bFirst*/ )
{
// Selektor loeschen
- return TRUE;
+ return sal_True;
}
-BOOL CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
+sal_Bool CSS1Parser::DeclarationParsed( const String& /*rProperty*/,
const CSS1Expression * /* pExpr */ )
{
// Deklaration loeschen
- return TRUE;
+ return sal_True;
}
@@ -1257,7 +1257,7 @@ CSS1Expression::~CSS1Expression()
delete pNext;
}
-BOOL CSS1Expression::GetURL( String& rURL ) const
+sal_Bool CSS1Expression::GetURL( String& rURL ) const
{
DBG_ASSERT( CSS1_URL==eType, "CSS1-Ausruck ist keine Farbe URL" );
@@ -1268,33 +1268,33 @@ BOOL CSS1Expression::GetURL( String& rURL ) const
')' == aValue.GetChar(aValue.Len()-1),
"keine gueltiges URL(...)" );
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
if( aValue.Len() > 5 )
{
rURL = aValue.Copy( 4, aValue.Len()-5 );
rURL.EraseTrailingChars();
rURL.EraseLeadingChars();
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}
-BOOL CSS1Expression::GetColor( Color &rColor ) const
+sal_Bool CSS1Expression::GetColor( Color &rColor ) const
{
DBG_ASSERT( CSS1_IDENT==eType || CSS1_RGB==eType ||
CSS1_HEXCOLOR==eType || CSS1_STRING==eType,
"CSS1-Ausruck kann keine Farbe sein" );
- BOOL bRet = FALSE;
- ULONG nColor = ULONG_MAX;
+ sal_Bool bRet = sal_False;
+ sal_uLong nColor = ULONG_MAX;
switch( eType )
{
case CSS1_RGB:
{
- BYTE aColors[3] = { 0, 0, 0 };
+ sal_uInt8 aColors[3] = { 0, 0, 0 };
DBG_ASSERT( aValue.CompareIgnoreCaseToAscii( sCSS1_rgb, 3 )
== COMPARE_EQUAL &&
@@ -1306,7 +1306,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
String aColorStr( aValue.Copy( 4, aValue.Len()-1 ) );
xub_StrLen nPos = 0;
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
while( nCol < 3 && nPos < aColorStr.Len() )
{
@@ -1329,7 +1329,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
nPos = nEnd+1;
}
- USHORT nNumber = (USHORT)aNumber.ToInt32();
+ sal_uInt16 nNumber = (sal_uInt16)aNumber.ToInt32();
if( aNumber.Search('%') != STRING_NOTFOUND )
{
if( nNumber > 100 )
@@ -1340,7 +1340,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
else if( nNumber > 255 )
nNumber = 255;
- aColors[nCol] = (BYTE)nNumber;
+ aColors[nCol] = (sal_uInt8)nNumber;
nCol ++;
}
@@ -1348,7 +1348,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
rColor.SetGreen( aColors[1] );
rColor.SetBlue( aColors[2] );
- bRet = TRUE; // etwas anderes als eine Farbe kann es nicht sein
+ bRet = sal_True; // etwas anderes als eine Farbe kann es nicht sein
}
break;
@@ -1368,7 +1368,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
{
// HACK fuer MS-IE: DIe Farbe kann auch in einem String stehen
xub_StrLen nOffset = CSS1_STRING==eType ? 1 : 0;
- BOOL bDouble = aValue.Len()-nOffset == 3;
+ sal_Bool bDouble = aValue.Len()-nOffset == 3;
xub_StrLen i = nOffset, nEnd = (bDouble ? 3 : 6) + nOffset;
nColor = 0;
@@ -1395,7 +1395,7 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
nColor += c;
}
}
- bRet = TRUE;
+ bRet = sal_True;
}
break;
default:
@@ -1405,9 +1405,9 @@ BOOL CSS1Expression::GetColor( Color &rColor ) const
if( bRet && nColor!=ULONG_MAX )
{
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000UL) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00UL) >> 8) );
- rColor.SetBlue( (BYTE)(nColor & 0x000000ffUL) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000UL) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00UL) >> 8) );
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ffUL) );
}
return bRet;
diff --git a/sw/source/filter/html/svxcss1.cxx b/sw/source/filter/html/svxcss1.cxx
index 64517351f524..b9ce6940a08d 100644
--- a/sw/source/filter/html/svxcss1.cxx
+++ b/sw/source/filter/html/svxcss1.cxx
@@ -259,13 +259,13 @@ static CSS1PropertyEnum const aPageBreakTable[] =
DEF_DOUBLE_LINE##n##_DIST
-static USHORT const aSBorderWidths[] =
+static sal_uInt16 aSBorderWidths[] =
{
SBORDER_ENTRY( 0 ), SBORDER_ENTRY( 1 ), SBORDER_ENTRY( 2 ),
SBORDER_ENTRY( 3 ), SBORDER_ENTRY( 4 )
};
-static USHORT const aDBorderWidths[] =
+static sal_uInt16 aDBorderWidths[] =
{
DBORDER_ENTRY( 0 ),
DBORDER_ENTRY( 7 ),
@@ -279,7 +279,7 @@ static USHORT const aDBorderWidths[] =
DBORDER_ENTRY( 5 )
};
-static USHORT const aTDBorderWidths[] =
+static sal_uInt16 aTDBorderWidths[] =
{
TDBORDER_ENTRY( 7 ), TDBORDER_ENTRY( 8 ), TDBORDER_ENTRY( 9 ),
TDBORDER_ENTRY( 10 )
@@ -292,41 +292,41 @@ static USHORT const aTDBorderWidths[] =
struct SvxCSS1ItemIds
{
- USHORT nFont;
- USHORT nFontCJK;
- USHORT nFontCTL;
- USHORT nPosture;
- USHORT nPostureCJK;
- USHORT nPostureCTL;
- USHORT nWeight;
- USHORT nWeightCJK;
- USHORT nWeightCTL;
- USHORT nFontHeight;
- USHORT nFontHeightCJK;
- USHORT nFontHeightCTL;
- USHORT nUnderline;
- USHORT nOverline;
- USHORT nCrossedOut;
- USHORT nColor;
- USHORT nKerning;
- USHORT nCaseMap;
- USHORT nBlink;
-
- USHORT nLineSpacing;
- USHORT nAdjust;
- USHORT nWidows;
- USHORT nOrphans;
- USHORT nFmtSplit;
-
- USHORT nLRSpace;
- USHORT nULSpace;
- USHORT nBox;
- USHORT nBrush;
-
- USHORT nLanguage;
- USHORT nLanguageCJK;
- USHORT nLanguageCTL;
- USHORT nDirection;
+ sal_uInt16 nFont;
+ sal_uInt16 nFontCJK;
+ sal_uInt16 nFontCTL;
+ sal_uInt16 nPosture;
+ sal_uInt16 nPostureCJK;
+ sal_uInt16 nPostureCTL;
+ sal_uInt16 nWeight;
+ sal_uInt16 nWeightCJK;
+ sal_uInt16 nWeightCTL;
+ sal_uInt16 nFontHeight;
+ sal_uInt16 nFontHeightCJK;
+ sal_uInt16 nFontHeightCTL;
+ sal_uInt16 nUnderline;
+ sal_uInt16 nOverline;
+ sal_uInt16 nCrossedOut;
+ sal_uInt16 nColor;
+ sal_uInt16 nKerning;
+ sal_uInt16 nCaseMap;
+ sal_uInt16 nBlink;
+
+ sal_uInt16 nLineSpacing;
+ sal_uInt16 nAdjust;
+ sal_uInt16 nWidows;
+ sal_uInt16 nOrphans;
+ sal_uInt16 nFmtSplit;
+
+ sal_uInt16 nLRSpace;
+ sal_uInt16 nULSpace;
+ sal_uInt16 nBox;
+ sal_uInt16 nBrush;
+
+ sal_uInt16 nLanguage;
+ sal_uInt16 nLanguageCJK;
+ sal_uInt16 nLanguageCTL;
+ sal_uInt16 nDirection;
};
@@ -338,8 +338,8 @@ static SvxCSS1ItemIds aItemIds;
struct SvxCSS1BorderInfo
{
Color aColor;
- USHORT nAbsWidth;
- USHORT nNamedWidth;
+ sal_uInt16 nAbsWidth;
+ sal_uInt16 nNamedWidth;
CSS1BorderStyle eStyle;
SvxCSS1BorderInfo() :
@@ -352,10 +352,10 @@ struct SvxCSS1BorderInfo
nNamedWidth( rInfo.nNamedWidth ), eStyle( rInfo.eStyle )
{}
- void SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const;
+ void SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const;
};
-void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) const
+void SvxCSS1BorderInfo::SetBorderLine( sal_uInt16 nLine, SvxBoxItem &rBoxItem ) const
{
if( CSS1_BS_NONE==eStyle || nAbsWidth==0 ||
(nAbsWidth==USHRT_MAX && nNamedWidth==USHRT_MAX) )
@@ -367,7 +367,7 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxBorderLine aBorderLine( &aColor );
// Linien-Stil doppelt oder einfach?
- BOOL bDouble = eStyle == CSS1_BS_DOUBLE;
+ sal_Bool bDouble = eStyle == CSS1_BS_DOUBLE;
if ( eStyle == CSS1_BS_DOTTED )
aBorderLine.SetStyle( DOTTED );
else if ( eStyle == CSS1_BS_DASHED )
@@ -378,8 +378,8 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
// benannte Breite umrechnenen, wenn keine absolute gegeben ist
if( nAbsWidth==USHRT_MAX )
{
- const USHORT *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
- USHORT nNWidth = nNamedWidth * 4;
+ const sal_uInt16 *aWidths = bDouble ? aDBorderWidths : aSBorderWidths;
+ sal_uInt16 nNWidth = nNamedWidth * 4;
aBorderLine.SetOutWidth( aWidths[nNWidth+1] );
aBorderLine.SetInWidth( aWidths[nNWidth+2] );
aBorderLine.SetDistance( aWidths[nNWidth+3] );
@@ -397,7 +397,7 @@ void SvxCSS1BorderInfo::SetBorderLine( USHORT nLine, SvxBoxItem &rBoxItem ) cons
SvxCSS1PropertyInfo::SvxCSS1PropertyInfo()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = 0;
Clear();
@@ -432,7 +432,7 @@ SvxCSS1PropertyInfo::SvxCSS1PropertyInfo( const SvxCSS1PropertyInfo& rProp ) :
ePageBreakAfter( rProp.ePageBreakAfter )
// /Feature: PrintExt
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
aBorderInfos[i] = rProp.aBorderInfos[i]
? new SvxCSS1BorderInfo( *rProp.aBorderInfos[i] )
: 0;
@@ -445,7 +445,7 @@ SvxCSS1PropertyInfo::~SvxCSS1PropertyInfo()
void SvxCSS1PropertyInfo::DestroyBorderInfos()
{
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
delete aBorderInfos[i];
aBorderInfos[i] = 0;
@@ -455,8 +455,8 @@ void SvxCSS1PropertyInfo::DestroyBorderInfos()
void SvxCSS1PropertyInfo::Clear()
{
aId.Erase();
- bTopMargin = bBottomMargin = FALSE;
- bLeftMargin = bRightMargin = bTextIndent = FALSE;
+ bTopMargin = bBottomMargin = sal_False;
+ bLeftMargin = bRightMargin = bTextIndent = sal_False;
nLeftMargin = nRightMargin = 0;
eFloat = SVX_ADJUST_END;
@@ -477,24 +477,24 @@ void SvxCSS1PropertyInfo::Clear()
void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
{
if( rProp.bTopMargin )
- bTopMargin = TRUE;
+ bTopMargin = sal_True;
if( rProp.bBottomMargin )
- bBottomMargin = TRUE;
+ bBottomMargin = sal_True;
if( rProp.bLeftMargin )
{
- bLeftMargin = TRUE;
+ bLeftMargin = sal_True;
nLeftMargin = rProp.nLeftMargin;
}
if( rProp.bRightMargin )
{
- bRightMargin = TRUE;
+ bRightMargin = sal_True;
nRightMargin = rProp.nRightMargin;
}
if( rProp.bTextIndent )
- bTextIndent = TRUE;
+ bTextIndent = sal_True;
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
if( rProp.aBorderInfos[i] )
{
@@ -561,9 +561,9 @@ void SvxCSS1PropertyInfo::Merge( const SvxCSS1PropertyInfo& rProp )
}
}
-SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreate )
+SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( sal_uInt16 nLine, sal_Bool bCreate )
{
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
switch( nLine )
{
case BOX_LINE_TOP: nPos = 0; break;
@@ -578,10 +578,10 @@ SvxCSS1BorderInfo *SvxCSS1PropertyInfo::GetBorderInfo( USHORT nLine, BOOL bCreat
return aBorderInfos[nPos];
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
- USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nSrcLine, sal_uInt16 nDstLine,
+ sal_uInt16 nWhat )
{
- SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, FALSE );
+ SvxCSS1BorderInfo *pSrcInfo = GetBorderInfo( nSrcLine, sal_False );
if( !pSrcInfo )
return;
@@ -599,7 +599,7 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nSrcLine, USHORT nDstLine,
pDstInfo->eStyle = pSrcInfo->eStyle;
}
-void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
+void SvxCSS1PropertyInfo::CopyBorderInfo( sal_uInt16 nCount, sal_uInt16 nWhat )
{
if( nCount==0 )
{
@@ -613,15 +613,15 @@ void SvxCSS1PropertyInfo::CopyBorderInfo( USHORT nCount, USHORT nWhat )
}
void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
- USHORT nMinBorderDist,
+ sal_uInt16 nMinBorderDist,
const SvxBoxItem *pDfltItem,
- BOOL bTable )
+ sal_Bool bTable )
{
- BOOL bChg = nTopBorderDistance != USHRT_MAX ||
+ sal_Bool bChg = nTopBorderDistance != USHRT_MAX ||
nBottomBorderDistance != USHRT_MAX ||
nLeftBorderDistance != USHRT_MAX ||
nRightBorderDistance != USHRT_MAX;
- USHORT i;
+ sal_uInt16 i;
for( i = 0; !bChg && i < 4; i++ )
bChg = aBorderInfos[i]!=0;
@@ -633,25 +633,25 @@ void SvxCSS1PropertyInfo::SetBoxItem( SfxItemSet& rItemSet,
if( pDfltItem )
aBoxItem = *pDfltItem;
- SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, FALSE );
+ SvxCSS1BorderInfo *pInfo = GetBorderInfo( BOX_LINE_TOP, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_TOP, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_BOTTOM, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_BOTTOM, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_BOTTOM, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_LEFT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_LEFT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_LEFT, aBoxItem );
- pInfo = GetBorderInfo( BOX_LINE_RIGHT, FALSE );
+ pInfo = GetBorderInfo( BOX_LINE_RIGHT, sal_False );
if( pInfo )
pInfo->SetBorderLine( BOX_LINE_RIGHT, aBoxItem );
for( i=0; i<4; i++ )
{
- USHORT nLine = BOX_LINE_TOP, nDist = 0;
+ sal_uInt16 nLine = BOX_LINE_TOP, nDist = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP;
@@ -713,12 +713,12 @@ SvxCSS1MapEntry::SvxCSS1MapEntry( const String& rKey, const SfxItemSet& rItemSet
}
#if defined( ICC )
-BOOL operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator==( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey==rE2.aKey;
}
-BOOL operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
+sal_Bool operator<( const SvxCSS1MapEntry& rE1, const SvxCSS1MapEntry& rE2 )
{
return rE1.aKey<rE2.aKey;
}
@@ -728,16 +728,16 @@ SV_IMPL_OP_PTRARR_SORT( SvxCSS1Map, SvxCSS1MapEntryPtr )
/* */
-BOOL SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
+sal_Bool SvxCSS1Parser::StyleParsed( const CSS1Selector * /*pSelector*/,
SfxItemSet& /*rItemSet*/,
SvxCSS1PropertyInfo& /*rPropInfo*/ )
{
// wie man sieht passiert hier gar nichts
- return TRUE;
+ return sal_True;
}
-BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
- BOOL bFirst )
+sal_Bool SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
+ sal_Bool bFirst )
{
if( bFirst )
{
@@ -746,7 +746,7 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
// Dieses ist der erste Selektor einer Rule, also muessen
// die bisher geparsten Items auf die Styles verteilt werden
// pSheetPropInfo->CreateBoxItem( *pSheetItemSet, GetDfltBorderDist() );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -760,27 +760,27 @@ BOOL SvxCSS1Parser::SelectorParsed( const CSS1Selector *pSelector,
aSelectors.C40_INSERT( CSS1Selector, pSelector, aSelectors.Count() );
- return FALSE; // den Selektor haben wir gespeichert. Loeschen toedlich!
+ return sal_False; // den Selektor haben wir gespeichert. Loeschen toedlich!
}
-BOOL SvxCSS1Parser::DeclarationParsed( const String& rProperty,
+sal_Bool SvxCSS1Parser::DeclarationParsed( const String& rProperty,
const CSS1Expression *pExpr )
{
DBG_ASSERT( pExpr, "DeclarationParsed() without Expression" );
if( !pExpr )
- return TRUE;
+ return sal_True;
ParseProperty( rProperty, pExpr );
- return TRUE; // die Deklaration brauchen wir nicht mehr. Loeschen!
+ return sal_True; // die Deklaration brauchen wir nicht mehr. Loeschen!
}
/* */
-SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT nMinFixLineSp,
- USHORT *pWhichIds, USHORT nWhichIds ) :
+SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, sal_uInt16 nMinFixLineSp,
+ sal_uInt16 *pWhichIds, sal_uInt16 nWhichIds ) :
CSS1Parser(),
sBaseURL( rBaseURL ),
pSheetItemSet(0),
@@ -789,48 +789,48 @@ SvxCSS1Parser::SvxCSS1Parser( SfxItemPool& rPool, const String& rBaseURL, USHORT
nMinFixLineSpace( nMinFixLineSp ),
eDfltEnc( RTL_TEXTENCODING_DONTKNOW ),
nScriptFlags( CSS1_SCRIPT_ALL ),
- bIgnoreFontFamily( FALSE )
+ bIgnoreFontFamily( sal_False )
{
// Item-Ids auch initialisieren
- aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, FALSE );
- aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, FALSE );
- aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, FALSE );
- aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, FALSE );
- aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, FALSE );
- aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, FALSE );
- aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, FALSE );
- aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, FALSE );
- aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, FALSE );
- aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, FALSE );
- aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, FALSE );
- aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, FALSE );
- aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, FALSE );
- aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, FALSE );
- aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, FALSE );
- aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, FALSE );
- aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, FALSE );
- aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, FALSE );
-
- aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, FALSE );
- aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, FALSE );
- aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, FALSE );
- aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, FALSE );
- aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, FALSE );
-
- aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, FALSE );
- aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, FALSE );
- aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, FALSE );
- aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, FALSE );
-
- aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, FALSE );
- aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, FALSE );
- aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, FALSE );
- aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, FALSE );
-
- aWhichMap.Insert( (USHORT)0, (USHORT)0 );
- SvParser::BuildWhichTbl( aWhichMap, (USHORT *)&aItemIds,
- sizeof(aItemIds) / sizeof(USHORT) );
+ aItemIds.nFont = rPool.GetTrueWhich( SID_ATTR_CHAR_FONT, sal_False );
+ aItemIds.nFontCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONT, sal_False );
+ aItemIds.nFontCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONT, sal_False );
+ aItemIds.nPosture = rPool.GetTrueWhich( SID_ATTR_CHAR_POSTURE, sal_False );
+ aItemIds.nPostureCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_POSTURE, sal_False );
+ aItemIds.nPostureCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_POSTURE, sal_False );
+ aItemIds.nWeight = rPool.GetTrueWhich( SID_ATTR_CHAR_WEIGHT, sal_False );
+ aItemIds.nWeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_WEIGHT, sal_False );
+ aItemIds.nWeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_WEIGHT, sal_False );
+ aItemIds.nFontHeight = rPool.GetTrueWhich( SID_ATTR_CHAR_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_FONTHEIGHT, sal_False );
+ aItemIds.nFontHeightCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_FONTHEIGHT, sal_False );
+ aItemIds.nUnderline = rPool.GetTrueWhich( SID_ATTR_CHAR_UNDERLINE, sal_False );
+ aItemIds.nOverline = rPool.GetTrueWhich( SID_ATTR_CHAR_OVERLINE, sal_False );
+ aItemIds.nCrossedOut = rPool.GetTrueWhich( SID_ATTR_CHAR_STRIKEOUT, sal_False );
+ aItemIds.nColor = rPool.GetTrueWhich( SID_ATTR_CHAR_COLOR, sal_False );
+ aItemIds.nKerning = rPool.GetTrueWhich( SID_ATTR_CHAR_KERNING, sal_False );
+ aItemIds.nCaseMap = rPool.GetTrueWhich( SID_ATTR_CHAR_CASEMAP, sal_False );
+ aItemIds.nBlink = rPool.GetTrueWhich( SID_ATTR_FLASH, sal_False );
+
+ aItemIds.nLineSpacing = rPool.GetTrueWhich( SID_ATTR_PARA_LINESPACE, sal_False );
+ aItemIds.nAdjust = rPool.GetTrueWhich( SID_ATTR_PARA_ADJUST, sal_False );
+ aItemIds.nWidows = rPool.GetTrueWhich( SID_ATTR_PARA_WIDOWS, sal_False );
+ aItemIds.nOrphans = rPool.GetTrueWhich( SID_ATTR_PARA_ORPHANS, sal_False );
+ aItemIds.nFmtSplit = rPool.GetTrueWhich( SID_ATTR_PARA_SPLIT, sal_False );
+
+ aItemIds.nLRSpace = rPool.GetTrueWhich( SID_ATTR_LRSPACE, sal_False );
+ aItemIds.nULSpace = rPool.GetTrueWhich( SID_ATTR_ULSPACE, sal_False );
+ aItemIds.nBox = rPool.GetTrueWhich( SID_ATTR_BORDER_OUTER, sal_False );
+ aItemIds.nBrush = rPool.GetTrueWhich( SID_ATTR_BRUSH, sal_False );
+
+ aItemIds.nLanguage = rPool.GetTrueWhich( SID_ATTR_CHAR_LANGUAGE, sal_False );
+ aItemIds.nLanguageCJK = rPool.GetTrueWhich( SID_ATTR_CHAR_CJK_LANGUAGE, sal_False );
+ aItemIds.nLanguageCTL = rPool.GetTrueWhich( SID_ATTR_CHAR_CTL_LANGUAGE, sal_False );
+ aItemIds.nDirection = rPool.GetTrueWhich( SID_ATTR_FRAMEDIRECTION, sal_False );
+
+ aWhichMap.Insert( (sal_uInt16)0, (sal_uInt16)0 );
+ SvParser::BuildWhichTbl( aWhichMap, (sal_uInt16 *)&aItemIds,
+ sizeof(aItemIds) / sizeof(sal_uInt16) );
if( pWhichIds && nWhichIds )
SvParser::BuildWhichTbl( aWhichMap, pWhichIds, nWhichIds );
@@ -849,14 +849,14 @@ SvxCSS1Parser::~SvxCSS1Parser()
/* */
-BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
+sal_Bool SvxCSS1Parser::ParseStyleSheet( const String& rIn )
{
pItemSet = pSheetItemSet;
pPropInfo = pSheetPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleSheet( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleSheet( rIn );
- for( USHORT i=0; i<aSelectors.Count(); i++ )
+ for( sal_uInt16 i=0; i<aSelectors.Count(); i++ )
{
StyleParsed( aSelectors[i], *pSheetItemSet, *pSheetPropInfo );
}
@@ -873,14 +873,14 @@ BOOL SvxCSS1Parser::ParseStyleSheet( const String& rIn )
return bSuccess;
}
-BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
+sal_Bool SvxCSS1Parser::ParseStyleOption( const String& rIn,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo )
{
pItemSet = &rItemSet;
pPropInfo = &rPropInfo;
- BOOL bSuccess = CSS1Parser::ParseStyleOption( rIn );
+ sal_Bool bSuccess = CSS1Parser::ParseStyleOption( rIn );
rItemSet.ClearItem( aItemIds.nDirection );
pItemSet = 0;
@@ -891,8 +891,8 @@ BOOL SvxCSS1Parser::ParseStyleOption( const String& rIn,
/* */
-BOOL SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
- const String &rValue, USHORT& rEnum )
+sal_Bool SvxCSS1Parser::GetEnum( const CSS1PropertyEnum *pPropTable,
+ const String &rValue, sal_uInt16& rEnum )
{
String aValue( rValue );
aValue.ToLowerAscii();
@@ -923,11 +923,11 @@ void SvxCSS1Parser::PixelToTwip( long &rWidth, long &rHeight )
}
}
-void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
- BOOL bDouble, BOOL bTable )
+void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, sal_uInt16 nWidth,
+ sal_Bool bDouble, sal_Bool bTable )
{
- const USHORT *aWidths;
- USHORT nSize;
+ const sal_uInt16 *aWidths;
+ sal_uInt16 nSize;
if( !bDouble )
{
aWidths = aSBorderWidths;
@@ -944,7 +944,7 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
nSize = sizeof( aDBorderWidths );
}
- USHORT i = (nSize / sizeof(USHORT)) - 4;
+ sal_uInt16 i = (nSize / sizeof(sal_uInt16)) - 4;
while( i>0 &&
nWidth <= ((aWidths[i] + aWidths[i-4]) / 2) )
{
@@ -958,9 +958,9 @@ void SvxCSS1Parser::SetBorderWidth( SvxBorderLine& aBorderLine, USHORT nWidth,
aBorderLine.SetDistance( aWidths[i+3] );
}
-sal_uInt32 SvxCSS1Parser::GetFontHeight( USHORT nSize ) const
+sal_uInt32 SvxCSS1Parser::GetFontHeight( sal_uInt16 nSize ) const
{
- USHORT nHeight;
+ sal_uInt16 nHeight;
switch( nSize )
{
@@ -988,7 +988,7 @@ SvxCSS1MapEntry *SvxCSS1Parser::GetMapEntry( const String& rKey,
pSearchEntry->SetKey( rKey );
SvxCSS1MapEntry *pRet = 0;
- USHORT nPos;
+ sal_uInt16 nPos;
if( rMap.Seek_Entry( pSearchEntry, &nPos ) )
pRet = rMap[nPos];
@@ -1004,7 +1004,7 @@ void SvxCSS1Parser::InsertMapEntry( const String& rKey,
if( pEntry )
{
MergeStyles( rItemSet, rProp,
- pEntry->GetItemSet(), pEntry->GetPropertyInfo(), TRUE );
+ pEntry->GetItemSet(), pEntry->GetPropertyInfo(), sal_True );
}
else
{
@@ -1017,7 +1017,7 @@ void SvxCSS1Parser::MergeStyles( const SfxItemSet& rSrcSet,
const SvxCSS1PropertyInfo& rSrcInfo,
SfxItemSet& rTargetSet,
SvxCSS1PropertyInfo& rTargetInfo,
- BOOL bSmart )
+ sal_Bool bSmart )
{
if( !bSmart )
{
@@ -1078,8 +1078,8 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- ULONG nHeight = 0;
- USHORT nPropHeight = 100;
+ sal_uLong nHeight = 0;
+ sal_uInt16 nPropHeight = 100;
switch( pExpr->GetType() )
{
@@ -1091,16 +1091,16 @@ static void ParseCSS1_font_size( const CSS1Expression *pExpr,
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (ULONG)nPHeight;
+ nHeight = (sal_uLong)nPHeight;
}
break;
case CSS1_PERCENTAGE:
// nur fuer Drop-Caps!
- nPropHeight = (USHORT)pExpr->GetNumber();
+ nPropHeight = (sal_uInt16)pExpr->GetNumber();
break;
case CSS1_IDENT:
{
- USHORT nSize;
+ sal_uInt16 nSize;
if( SvxCSS1Parser::GetEnum( aFontSizeTable, pExpr->GetString(),
nSize ) )
@@ -1148,8 +1148,8 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
FontPitch ePitch = PITCH_DONTKNOW;
rtl_TextEncoding eEnc = rParser.GetDfltEncoding();
const FontList *pFList = rParser.GetFontList();
- BOOL bFirst = TRUE;
- BOOL bFound = FALSE;
+ sal_Bool bFirst = sal_True;
+ sal_Bool bFound = sal_False;
while( pExpr && (bFirst || ','==pExpr->GetOp() || !pExpr->GetOp()) )
{
CSS1Token eType = pExpr->GetType();
@@ -1180,7 +1180,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -1193,7 +1193,7 @@ static void ParseCSS1_font_family( const CSS1Expression *pExpr,
}
pExpr = pExpr->GetNext();
- bFirst = FALSE;
+ bFirst = sal_False;
}
if( aName.Len() && !rParser.IsIgnoreFontFamily() )
@@ -1229,7 +1229,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
case CSS1_IDENT:
case CSS1_STRING: // MS-IE, was sonst
{
- USHORT nWeight;
+ sal_uInt16 nWeight;
if( SvxCSS1Parser::GetEnum( aFontWeightTable, pExpr->GetString(),
nWeight ) )
{
@@ -1251,7 +1251,7 @@ static void ParseCSS1_font_weight( const CSS1Expression *pExpr,
break;
case CSS1_NUMBER:
{
- USHORT nWeight = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nWeight = (sal_uInt16)pExpr->GetNumber();
SvxWeightItem aWeight( nWeight>400 ? WEIGHT_BOLD : WEIGHT_NORMAL,
aItemIds.nWeight );
if( rParser.IsSetWesternProps() )
@@ -1283,8 +1283,8 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bPosture = FALSE;
- BOOL bCaseMap = FALSE;
+ sal_Bool bPosture = sal_False;
+ sal_Bool bCaseMap = sal_False;
FontItalic eItalic = ITALIC_NONE;
SvxCaseMap eCaseMap = SVX_CASEMAP_NOT_MAPPED;
@@ -1292,7 +1292,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
// (wobei nor noch normal | italic und oblique zulaessig sind
// der Wert kann zwei Werte enthalten!
- for( USHORT i=0; pExpr && i<2; i++ )
+ for( sal_uInt16 i=0; pExpr && i<2; i++ )
{
// Auch hier hinterlaesst MS-IEs Parser seine Spuren
if( (CSS1_IDENT==pExpr->GetType() || CSS1_STRING==pExpr->GetType()) &&
@@ -1300,7 +1300,7 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
// erstmal pruefen, ob es ein Italic-Wert oder 'normal' ist
- USHORT nItalic;
+ sal_uInt16 nItalic;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nItalic ) )
{
eItalic = (FontItalic)nItalic;
@@ -1308,15 +1308,15 @@ static void ParseCSS1_font_style( const CSS1Expression *pExpr,
{
// fuer 'normal' muessen wir auch die case-map aussch.
eCaseMap = SVX_CASEMAP_NOT_MAPPED;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
- bPosture = TRUE;
+ bPosture = sal_True;
}
else if( !bCaseMap &&
rValue.EqualsIgnoreCaseAscii(sCSS1_PV_small_caps) )
{
eCaseMap = SVX_CASEMAP_KAPITAELCHEN;
- bCaseMap = TRUE;
+ bCaseMap = sal_True;
}
}
@@ -1360,7 +1360,7 @@ static void ParseCSS1_font_variant( const CSS1Expression *pExpr,
{
case CSS1_IDENT:
{
- USHORT nCaseMap;
+ sal_uInt16 nCaseMap;
if( SvxCSS1Parser::GetEnum( aFontVariantTable, pExpr->GetString(),
nCaseMap ) )
{
@@ -1496,10 +1496,10 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
Color aColor;
String aURL;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
SvxGraphicPosition eRepeat = GPOS_TILED;
SvxGraphicPosition ePos = GPOS_LT;
- BOOL bHori = FALSE, bVert = FALSE;
+ sal_Bool bHori = sal_False, bVert = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -1521,16 +1521,16 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// koennen Pixel auch wie alle anderen Einheiten behandelt
// werden.
- ULONG nLength = (ULONG)pExpr->GetNumber();
+ sal_uLong nLength = (sal_uLong)pExpr->GetNumber();
if( !bHori )
{
ePos = nLength ? GPOS_MM : GPOS_LT;
- bHori = TRUE;
+ bHori = sal_True;
}
else if( !bVert )
{
MergeVert( ePos, (nLength ? GPOS_LM : GPOS_LT) );
- bVert = TRUE;
+ bVert = sal_True;
}
}
break;
@@ -1539,7 +1539,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
{
// die %-Angabe wird auf den enum abgebildet
- USHORT nPerc = (USHORT)pExpr->GetNumber();
+ sal_uInt16 nPerc = (sal_uInt16)pExpr->GetNumber();
if( !bHori )
{
ePos = nPerc < 25 ? GPOS_LT
@@ -1560,11 +1560,11 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
case CSS1_HEXCOLOR:
case CSS1_STRING: // Wegen MS-IE
{
- USHORT nEnum;
+ sal_uInt16 nEnum;
const String &rValue = pExpr->GetString();
if( rValue.EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
if( SvxCSS1Parser::GetEnum( aBGRepeatTable, rValue, nEnum ) )
{
@@ -1599,7 +1599,7 @@ static void ParseCSS1_background( const CSS1Expression *pExpr,
// transparent schlaegt alles
if( bTransparent )
{
- bColor = FALSE;
+ bColor = sal_False;
aURL.Erase();
}
@@ -1635,7 +1635,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
Color aColor;
- BOOL bColor = FALSE, bTransparent = FALSE;
+ sal_Bool bColor = sal_False, bTransparent = sal_False;
switch( pExpr->GetType() )
{
@@ -1647,7 +1647,7 @@ static void ParseCSS1_background_color( const CSS1Expression *pExpr,
case CSS1_STRING: // Wegen MS-IE
if( pExpr->GetString().EqualsIgnoreCaseAscii( sCSS1_PV_transparent ) )
{
- bTransparent = TRUE;
+ bTransparent = sal_True;
}
else
{
@@ -1681,32 +1681,32 @@ static void ParseCSS1_line_height( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nHeight = 0;
- BYTE nPropHeight = 0;
+ sal_uInt16 nHeight = 0;
+ sal_uInt8 nPropHeight = 0;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
- nHeight = (USHORT)pExpr->GetULength();
+ nHeight = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
long nPWidth = 0;
long nPHeight = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nHeight = (USHORT)nPHeight;
+ nHeight = (sal_uInt16)nPHeight;
}
break;
case CSS1_PERCENTAGE:
{
- USHORT nPHeight = (USHORT)pExpr->GetNumber();
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)pExpr->GetNumber();
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
case CSS1_NUMBER:
{
- USHORT nPHeight = (USHORT)(pExpr->GetNumber() * 100);
- nPropHeight = nPHeight <= 200 ? (BYTE)nPHeight : 200;
+ sal_uInt16 nPHeight = (sal_uInt16)(pExpr->GetNumber() * 100);
+ nPropHeight = nPHeight <= 200 ? (sal_uInt8)nPHeight : 200;
}
break;
default:
@@ -1762,7 +1762,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
{
const String& rValue = pExpr->GetString();
- USHORT nEnum;
+ sal_uInt16 nEnum;
if( SvxCSS1Parser::GetEnum( aFontStyleTable, rValue, nEnum ) )
{
@@ -1779,7 +1779,7 @@ static void ParseCSS1_font( const CSS1Expression *pExpr,
}
else
{
- eWeight = (USHORT)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
+ eWeight = (sal_uInt16)pExpr->GetNumber() > 400 ? WEIGHT_BOLD
: WEIGHT_NORMAL;
}
@@ -1902,11 +1902,11 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bUnderline = FALSE;
- BOOL bOverline = FALSE;
- BOOL bCrossedOut = FALSE;
- BOOL bBlink = FALSE;
- BOOL bBlinkOn = FALSE;
+ sal_Bool bUnderline = sal_False;
+ sal_Bool bOverline = sal_False;
+ sal_Bool bCrossedOut = sal_False;
+ sal_Bool bBlink = sal_False;
+ sal_Bool bBlinkOn = sal_False;
FontUnderline eUnderline = UNDERLINE_NONE;
FontUnderline eOverline = UNDERLINE_NONE;
FontStrikeout eCrossedOut = STRIKEOUT_NONE;
@@ -1917,73 +1917,73 @@ static void ParseCSS1_text_decoration( const CSS1Expression *pExpr,
{
String aValue = pExpr->GetString();
aValue.ToLowerAscii();
- BOOL bKnown = FALSE;
+ sal_Bool bKnown = sal_False;
switch( aValue.GetChar( 0 ) )
{
case 'n':
if( aValue.EqualsAscii( sCSS1_PV_none ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_NONE;
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_NONE;
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_NONE;
- bBlink = TRUE;
- bBlinkOn = FALSE;
+ bBlink = sal_True;
+ bBlinkOn = sal_False;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'u':
if( aValue.EqualsAscii( sCSS1_PV_underline ) )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'o':
if( aValue.EqualsAscii( sCSS1_PV_overline ) )
{
- bOverline = TRUE;
+ bOverline = sal_True;
eOverline = UNDERLINE_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'l':
if( aValue.EqualsAscii( sCSS1_PV_line_through ) )
{
- bCrossedOut = TRUE;
+ bCrossedOut = sal_True;
eCrossedOut = STRIKEOUT_SINGLE;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
case 'b':
if( aValue.EqualsAscii( sCSS1_PV_blink ) )
{
- bBlink = TRUE;
- bBlinkOn = TRUE;
+ bBlink = sal_True;
+ bBlinkOn = sal_True;
- bKnown = TRUE;
+ bKnown = sal_True;
}
break;
}
if( !bKnown )
{
- bUnderline = TRUE;
+ bUnderline = sal_True;
eUnderline = UNDERLINE_SINGLE;
}
@@ -2015,7 +2015,7 @@ static void ParseCSS1_text_align( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() ||
CSS1_STRING==pExpr->GetType() ) // MS-IE, mal wieder
{
- USHORT nAdjust;
+ sal_uInt16 nAdjust;
if( SvxCSS1Parser::GetEnum( aTextAlignTable, pExpr->GetString(),
nAdjust ) )
{
@@ -2035,12 +2035,12 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
short nIndent = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
nIndent = (short)pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
break;
case CSS1_PIXLENGTH:
{
@@ -2048,7 +2048,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
nIndent = (short)nPWidth;
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2061,7 +2061,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
@@ -2074,7 +2074,7 @@ static void ParseCSS1_text_indent( const CSS1Expression *pExpr,
aLRItem.SetTxtFirstLineOfst( nIndent );
rItemSet.Put( aLRItem );
}
- rPropInfo.bTextIndent = TRUE;
+ rPropInfo.bTextIndent = sal_True;
}
}
@@ -2088,13 +2088,13 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nLeft = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nLeft = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2102,7 +2102,7 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
nLeft = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nLeft, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2118,20 +2118,20 @@ static void ParseCSS1_margin_left( const CSS1Expression *pExpr,
if( nLeft < 0 )
nLeft = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetTxtLeft( (USHORT)nLeft );
+ aLRItem.SetTxtLeft( (sal_uInt16)nLeft );
rItemSet.Put( aLRItem );
}
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
}
}
@@ -2145,13 +2145,13 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nRight = 0;
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
{
nRight = pExpr->GetSLength();
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2159,7 +2159,7 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
nRight = (long)pExpr->GetNumber();
long nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nRight, nPHeight );
- bSet = TRUE;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2175,20 +2175,20 @@ static void ParseCSS1_margin_right( const CSS1Expression *pExpr,
if( nRight < 0 )
nRight = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
- aLRItem.SetRight( (USHORT)nRight );
+ aLRItem.SetRight( (sal_uInt16)nRight );
rItemSet.Put( aLRItem );
}
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
}
}
@@ -2201,8 +2201,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nUpper = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nUpper = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2210,8 +2210,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nUpper = (USHORT)nTmp;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2221,8 +2221,8 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nUpper = (USHORT)nPHeight;
- bSet = TRUE;
+ nUpper = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2235,7 +2235,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2248,7 +2248,7 @@ static void ParseCSS1_margin_top( const CSS1Expression *pExpr,
aULItem.SetUpper( nUpper );
rItemSet.Put( aULItem );
}
- rPropInfo.bTopMargin = TRUE;
+ rPropInfo.bTopMargin = sal_True;
}
}
@@ -2261,8 +2261,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nLower = 0;
- BOOL bSet = FALSE;
+ sal_uInt16 nLower = 0;
+ sal_Bool bSet = sal_False;
switch( pExpr->GetType() )
{
case CSS1_LENGTH:
@@ -2270,8 +2270,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
long nTmp = pExpr->GetSLength();
if( nTmp < 0 )
nTmp = 0;
- nLower = (USHORT)nTmp;
- bSet = TRUE;
+ nLower = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2281,8 +2281,8 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( nPHeight < 0 )
nPHeight = 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nLower = (USHORT)nPHeight;
- bSet = TRUE;
+ nLower = (sal_uInt16)nPHeight;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2295,7 +2295,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
if( bSet )
{
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
@@ -2308,7 +2308,7 @@ static void ParseCSS1_margin_bottom( const CSS1Expression *pExpr,
aULItem.SetLower( nLower );
rItemSet.Put( aULItem );
}
- rPropInfo.bBottomMargin = TRUE;
+ rPropInfo.bBottomMargin = sal_True;
}
}
@@ -2322,11 +2322,11 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
DBG_ASSERT( pExpr, "no expression" );
long nMargins[4] = { 0, 0, 0, 0 };
- BOOL bSetMargins[4] = { FALSE, FALSE, FALSE, FALSE };
+ sal_Bool bSetMargins[4] = { sal_False, sal_False, sal_False, sal_False };
- for( USHORT i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
+ for( sal_uInt16 i=0; pExpr && i<4 && !pExpr->GetOp(); i++ )
{
- BOOL bSetThis = FALSE;
+ sal_Bool bSetThis = sal_False;
long nMargin = 0;
switch( pExpr->GetType() )
@@ -2334,7 +2334,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case CSS1_LENGTH:
{
nMargin = pExpr->GetSLength();
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2342,7 +2342,7 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
long nPWidth = 0;
nMargin = (long)pExpr->GetNumber();
SvxCSS1Parser::PixelToTwip( nPWidth, nMargin );
- bSetThis = TRUE;
+ bSetThis = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2363,19 +2363,19 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
case 0:
nMargins[0] = nMargins[1] =nMargins[2] = nMargins[3] = nMargin;
bSetMargins[0] = bSetMargins[1] =
- bSetMargins[2] = bSetMargins[3] = TRUE;
+ bSetMargins[2] = bSetMargins[3] = sal_True;
break;
case 1:
nMargins[1] = nMargins[3] = nMargin; // right + left
- bSetMargins[1] = bSetMargins[3] = TRUE;
+ bSetMargins[1] = bSetMargins[3] = sal_True;
break;
case 2:
nMargins[2] = nMargin; // bottom
- bSetMargins[2] = TRUE;
+ bSetMargins[2] = sal_True;
break;
case 3:
nMargins[3] = nMargin; // left
- bSetMargins[3] = TRUE;
+ bSetMargins[3] = sal_True;
break;
}
}
@@ -2386,37 +2386,37 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
{
if( bSetMargins[3] )
{
- rPropInfo.bLeftMargin = TRUE;
+ rPropInfo.bLeftMargin = sal_True;
rPropInfo.nLeftMargin = nMargins[3];
if( nMargins[3] < 0 )
nMargins[3] = 0;
}
if( bSetMargins[1] )
{
- rPropInfo.bRightMargin = TRUE;
+ rPropInfo.bRightMargin = sal_True;
rPropInfo.nRightMargin = nMargins[1];
if( nMargins[1] < 0 )
nMargins[1] = 0;
}
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nLRSpace, sal_False,
&pItem ) )
{
SvxLRSpaceItem aLRItem( *((const SvxLRSpaceItem*)pItem) );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
else
{
SvxLRSpaceItem aLRItem( aItemIds.nLRSpace );
if( bSetMargins[3] )
- aLRItem.SetLeft( (USHORT)nMargins[3] );
+ aLRItem.SetLeft( (sal_uInt16)nMargins[3] );
if( bSetMargins[1] )
- aLRItem.SetRight( (USHORT)nMargins[1] );
+ aLRItem.SetRight( (sal_uInt16)nMargins[1] );
rItemSet.Put( aLRItem );
}
}
@@ -2429,23 +2429,23 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
nMargins[2] = 0;
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( aItemIds.nULSpace, sal_False,
&pItem ) )
{
SvxULSpaceItem aULItem( *((const SvxULSpaceItem*)pItem) );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
else
{
SvxULSpaceItem aULItem( aItemIds.nULSpace );
if( bSetMargins[0] )
- aULItem.SetUpper( (USHORT)nMargins[0] );
+ aULItem.SetUpper( (sal_uInt16)nMargins[0] );
if( bSetMargins[2] )
- aULItem.SetLower( (USHORT)nMargins[2] );
+ aULItem.SetLower( (sal_uInt16)nMargins[2] );
rItemSet.Put( aULItem );
}
@@ -2456,16 +2456,16 @@ static void ParseCSS1_margin( const CSS1Expression *pExpr,
/* */
-static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
+static sal_Bool ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "no expression" );
- BOOL bSet = FALSE;
- USHORT nDist = 0;
+ sal_Bool bSet = sal_False;
+ sal_uInt16 nDist = 0;
switch( pExpr->GetType() )
{
@@ -2476,8 +2476,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
nTmp = 0;
else if( nTmp > USHRT_MAX-1 )
nTmp = USHRT_MAX-1;
- nDist = (USHORT)nTmp;
- bSet = TRUE;
+ nDist = (sal_uInt16)nTmp;
+ bSet = sal_True;
}
break;
case CSS1_PIXLENGTH:
@@ -2489,8 +2489,8 @@ static BOOL ParseCSS1_padding_xxx( const CSS1Expression *pExpr,
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
if( nPWidth > USHRT_MAX-1 )
nPWidth = USHRT_MAX-1;
- nDist = (USHORT)nPWidth;
- bSet = TRUE;
+ nDist = (sal_uInt16)nPWidth;
+ bSet = sal_True;
}
break;
case CSS1_PERCENTAGE:
@@ -2555,10 +2555,10 @@ static void ParseCSS1_padding( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
if( ParseCSS1_padding_xxx( pExpr, rItemSet, rPropInfo, rParser,
nLine ) )
{
@@ -2582,15 +2582,15 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine, BOOL bAll )
+ sal_uInt16 nWhichLine, sal_Bool bAll )
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
CSS1BorderStyle eStyle = CSS1_BS_NONE; // Linien-Style
Color aColor;
- BOOL bColor = FALSE;
+ sal_Bool bColor = sal_False;
while( pExpr && !pExpr->GetOp() )
{
@@ -2599,13 +2599,13 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
case CSS1_RGB:
case CSS1_HEXCOLOR:
if( pExpr->GetColor( aColor ) )
- bColor = TRUE;
+ bColor = sal_True;
break;
case CSS1_IDENT:
{
const String& rValue = pExpr->GetString();
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, rValue, nValue ) )
{
nNWidth = nValue;
@@ -2616,18 +2616,18 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
}
else if( pExpr->GetColor( aColor ) )
{
- bColor = TRUE;
+ bColor = sal_True;
}
}
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
// Ein Pixel wird zur Haarlinie (ist huebscher)
long nWidthL = (long)pExpr->GetNumber();
@@ -2636,7 +2636,7 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
else
nWidth = 1;
@@ -2650,9 +2650,9 @@ static void ParseCSS1_border_xxx( const CSS1Expression *pExpr,
pExpr = pExpr->GetNext();
}
- for( USHORT i=0; i<4; i++ )
+ for( sal_uInt16 i=0; i<4; i++ )
{
- USHORT nLine = 0;
+ sal_uInt16 nLine = 0;
switch( i )
{
case 0: nLine = BOX_LINE_TOP; break;
@@ -2677,18 +2677,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
SfxItemSet & /*rItemSet*/,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/,
- USHORT nWhichLine )
+ sal_uInt16 nWhichLine )
{
DBG_ASSERT( pExpr, "no expression" );
- USHORT nWidth = USHRT_MAX; // die Linien-Dicke
- USHORT nNWidth = 1; // benannte Linien-Dicke (und default)
+ sal_uInt16 nWidth = USHRT_MAX; // die Linien-Dicke
+ sal_uInt16 nNWidth = 1; // benannte Linien-Dicke (und default)
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aBorderWidthTable, pExpr->GetString(), nValue ) )
{
nNWidth = nValue;
@@ -2697,18 +2697,18 @@ static void ParseCSS1_border_xxx_width( const CSS1Expression *pExpr,
break;
case CSS1_LENGTH:
- nWidth = (USHORT)pExpr->GetULength();
+ nWidth = (sal_uInt16)pExpr->GetULength();
break;
case CSS1_PIXLENGTH:
{
- BOOL bHori = nWhichLine == BOX_LINE_TOP ||
+ sal_Bool bHori = nWhichLine == BOX_LINE_TOP ||
nWhichLine == BOX_LINE_BOTTOM;
long nWidthL = (long)pExpr->GetNumber();
long nPWidth = bHori ? 0 : nWidthL;
long nPHeight = bHori ? nWidthL : 0;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- nWidth = (USHORT)(bHori ? nPHeight : nPWidth);
+ nWidth = (sal_uInt16)(bHori ? nPHeight : nPWidth);
}
break;
@@ -2760,10 +2760,10 @@ static void ParseCSS1_border_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
ParseCSS1_border_xxx_width( pExpr, rItemSet, rPropInfo, rParser, nLine );
rPropInfo.CopyBorderInfo( n, SVX_CSS1_BORDERINFO_WIDTH );
@@ -2777,10 +2777,10 @@ static void ParseCSS1_border_color( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
Color aColor;
switch( pExpr->GetType() )
{
@@ -2805,11 +2805,11 @@ static void ParseCSS1_border_style( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<4 && pExpr && !pExpr->GetOp() )
{
- USHORT nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
- USHORT nValue;
+ sal_uInt16 nLine = n==0 || n==2 ? BOX_LINE_BOTTOM : BOX_LINE_LEFT;
+ sal_uInt16 nValue;
if( CSS1_IDENT==pExpr->GetType() &&
SvxCSS1Parser::GetEnum( aBorderStyleTable, pExpr->GetString(),
nValue ) )
@@ -2829,7 +2829,7 @@ static void ParseCSS1_border_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_TOP, sal_False );
}
static void ParseCSS1_border_right( const CSS1Expression *pExpr,
@@ -2837,7 +2837,7 @@ static void ParseCSS1_border_right( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_RIGHT, sal_False );
}
static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
@@ -2845,7 +2845,7 @@ static void ParseCSS1_border_bottom( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_BOTTOM, sal_False );
}
static void ParseCSS1_border_left( const CSS1Expression *pExpr,
@@ -2853,7 +2853,7 @@ static void ParseCSS1_border_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, FALSE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, BOX_LINE_LEFT, sal_False );
}
static void ParseCSS1_border( const CSS1Expression *pExpr,
@@ -2861,7 +2861,7 @@ static void ParseCSS1_border( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& rParser )
{
- ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, TRUE );
+ ParseCSS1_border_xxx( pExpr, rItemSet, rPropInfo, rParser, 0, sal_True );
}
/* */
@@ -2875,7 +2875,7 @@ static void ParseCSS1_float( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nFloat;
+ sal_uInt16 nFloat;
if( SvxCSS1Parser::GetEnum( aFloatTable, pExpr->GetString(), nFloat ) )
rPropInfo.eFloat = (SvxAdjust)nFloat;
}
@@ -2893,7 +2893,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
if( CSS1_IDENT==pExpr->GetType() )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( SvxCSS1Parser::GetEnum( aPositionTable, pExpr->GetString(), nPos ) )
rPropInfo.ePosition = (SvxCSS1Position)nPos;
}
@@ -2904,7 +2904,7 @@ static void ParseCSS1_position( const CSS1Expression *pExpr,
static void ParseCSS1_length( const CSS1Expression *pExpr,
long& rLength,
SvxCSS1LengthType& rLengthType,
- BOOL bHori )
+ sal_Bool bHori )
{
switch( pExpr->GetType() )
{
@@ -2952,7 +2952,7 @@ static void ParseCSS1_width( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nWidth, rPropInfo.eWidthType, sal_True );
}
static void ParseCSS1_height( const CSS1Expression *pExpr,
@@ -2960,7 +2960,7 @@ static void ParseCSS1_height( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nHeight, rPropInfo.eHeightType, sal_False );
}
static void ParseCSS1_left( const CSS1Expression *pExpr,
@@ -2968,7 +2968,7 @@ static void ParseCSS1_left( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, TRUE );
+ ParseCSS1_length( pExpr, rPropInfo.nLeft, rPropInfo.eLeftType, sal_True );
}
static void ParseCSS1_top( const CSS1Expression *pExpr,
@@ -2976,7 +2976,7 @@ static void ParseCSS1_top( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, FALSE );
+ ParseCSS1_length( pExpr, rPropInfo.nTop, rPropInfo.eTopType, sal_False );
}
/* */
@@ -2987,14 +2987,14 @@ static void ParseCSS1_size( const CSS1Expression *pExpr,
SvxCSS1PropertyInfo& rPropInfo,
const SvxCSS1Parser& /*rParser*/ )
{
- USHORT n=0;
+ sal_uInt16 n=0;
while( n<2 && pExpr && !pExpr->GetOp() )
{
switch( pExpr->GetType() )
{
case CSS1_IDENT:
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aSizeTable, pExpr->GetString(),
nValue ) )
{
@@ -3042,7 +3042,7 @@ static void ParseCSS1_page_break_xxx( const CSS1Expression *pExpr,
{
if( CSS1_IDENT == pExpr->GetType() )
{
- USHORT nValue;
+ sal_uInt16 nValue;
if( SvxCSS1Parser::GetEnum( aPageBreakTable, pExpr->GetString(),
nValue ) )
{
@@ -3075,15 +3075,15 @@ static void ParseCSS1_page_break_inside( const CSS1Expression *pExpr,
SvxCSS1PageBreak eBreak(SVX_CSS1_PBREAK_NONE);
ParseCSS1_page_break_xxx( pExpr, eBreak );
- BOOL bSetSplit = FALSE, bSplit = TRUE;
+ sal_Bool bSetSplit = sal_False, bSplit = sal_True;
switch( eBreak )
{
case SVX_CSS1_PBREAK_AUTO:
- bSetSplit = TRUE;
+ bSetSplit = sal_True;
break;
case SVX_CSS1_PBREAK_AVOID:
- bSplit = FALSE;
- bSetSplit = TRUE;
+ bSplit = sal_False;
+ bSetSplit = sal_True;
break;
default:
;
@@ -3100,8 +3100,8 @@ static void ParseCSS1_widows( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxWidowsItem aWidowsItem( nVal, aItemIds.nWidows );
rItemSet.Put( aWidowsItem );
@@ -3115,8 +3115,8 @@ static void ParseCSS1_orphans( const CSS1Expression *pExpr,
{
if( CSS1_NUMBER == pExpr->GetType() )
{
- BYTE nVal = pExpr->GetNumber() <= 255
- ? (BYTE)pExpr->GetNumber()
+ sal_uInt8 nVal = pExpr->GetNumber() <= 255
+ ? (sal_uInt8)pExpr->GetNumber()
: 255;
SvxOrphansItem aOrphansItem( nVal, aItemIds.nOrphans );
rItemSet.Put( aOrphansItem );
@@ -3228,7 +3228,7 @@ static CSS1PropEntry aCSS1PropFnTab[] =
/* */
-static int bSortedPropFns = FALSE;
+static int bSortedPropFns = sal_False;
extern "C"
{
@@ -3276,7 +3276,7 @@ void SvxCSS1Parser::ParseProperty( const String& rProperty,
sizeof( aCSS1PropFnTab ) / sizeof( CSS1PropEntry ),
sizeof( CSS1PropEntry ),
CSS1PropEntryCompare );
- bSortedPropFns = TRUE;
+ bSortedPropFns = sal_True;
}
String aTmp( rProperty );
diff --git a/sw/source/filter/html/swcss1.hxx b/sw/source/filter/html/swcss1.hxx
index 3551d8357cd8..8c7265016e71 100644
--- a/sw/source/filter/html/swcss1.hxx
+++ b/sw/source/filter/html/swcss1.hxx
@@ -50,64 +50,64 @@ class SwCSS1Parser : public SvxCSS1Parser
{
SwDoc *pDoc;
- ULONG aFontHeights[7];
+ sal_uLong aFontHeights[7];
- USHORT nDropCapCnt;
+ sal_uInt16 nDropCapCnt;
- BOOL bIsNewDoc : 1;
+ sal_Bool bIsNewDoc : 1;
- BOOL bBodyBGColorSet : 1;
- BOOL bBodyBackgroundSet : 1;
- BOOL bBodyTextSet : 1;
- BOOL bBodyLinkSet : 1;
- BOOL bBodyVLinkSet : 1;
+ sal_Bool bBodyBGColorSet : 1;
+ sal_Bool bBodyBackgroundSet : 1;
+ sal_Bool bBodyTextSet : 1;
+ sal_Bool bBodyLinkSet : 1;
+ sal_Bool bBodyVLinkSet : 1;
- BOOL bSetFirstPageDesc : 1;
- BOOL bSetRightPageDesc : 1;
+ sal_Bool bSetFirstPageDesc : 1;
+ sal_Bool bSetRightPageDesc : 1;
- BOOL bTableHeaderTxtCollSet : 1;
- BOOL bTableTxtCollSet : 1;
+ sal_Bool bTableHeaderTxtCollSet : 1;
+ sal_Bool bTableTxtCollSet : 1;
- BOOL bLinkCharFmtsSet : 1;
+ sal_Bool bLinkCharFmtsSet : 1;
// die Vorlagen fuer DL anlegen
- SwTxtFmtColl* GetDefListTxtFmtColl( USHORT nCollId, USHORT nDeep );
+ SwTxtFmtColl* GetDefListTxtFmtColl( sal_uInt16 nCollId, sal_uInt16 nDeep );
- const SwPageDesc* GetPageDesc( USHORT nPoolId, BOOL bCreate );
+ const SwPageDesc* GetPageDesc( sal_uInt16 nPoolId, sal_Bool bCreate );
- void SetTableTxtColl( BOOL bHeader );
+ void SetTableTxtColl( sal_Bool bHeader );
void SetLinkCharFmts();
protected:
- virtual BOOL StyleParsed( const CSS1Selector *pSelector,
+ virtual sal_Bool StyleParsed( const CSS1Selector *pSelector,
SfxItemSet& rItemSet,
SvxCSS1PropertyInfo& rPropInfo );
using CSS1Parser::ParseStyleSheet;
public:
- SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, BOOL bNewDoc );
+ SwCSS1Parser( SwDoc *pDoc, sal_uInt32 aFHeight[7], const String& rBaseURL, sal_Bool bNewDoc );
virtual ~SwCSS1Parser();
- virtual BOOL ParseStyleSheet( const String& rIn );
+ virtual sal_Bool ParseStyleSheet( const String& rIn );
// Die Font-Hoehe fuer eine bestimmte Font-Groesse (0-6) ermitteln
- virtual sal_uInt32 GetFontHeight( USHORT nSize ) const;
+ virtual sal_uInt32 GetFontHeight( sal_uInt16 nSize ) const;
// Die aktuelle Font-Liste holen (auch 0 ist erlaubt)
virtual const FontList *GetFontList() const;
// das Zeichen-Format zu einem Token und einer ggf leeren Klasse
// ermitteln
- SwCharFmt* GetChrFmt( USHORT nToken, const String& rClass ) const;
+ SwCharFmt* GetChrFmt( sal_uInt16 nToken, const String& rClass ) const;
// eine TextFmtColl zu einer Pool-Id ermitteln
- SwTxtFmtColl *GetTxtFmtColl( USHORT nTxtColl, const String& rClass );
+ SwTxtFmtColl *GetTxtFmtColl( sal_uInt16 nTxtColl, const String& rClass );
// This methods do the same as the one of SwDoc, but change the
// encoding if required.
- SwTxtFmtColl *GetTxtCollFromPool( USHORT nPoolId ) const;
- SwCharFmt *GetCharFmtFromPool( USHORT nPoolId ) const;
+ SwTxtFmtColl *GetTxtCollFromPool( sal_uInt16 nPoolId ) const;
+ SwCharFmt *GetCharFmtFromPool( sal_uInt16 nPoolId ) const;
// Die linke oder rechte Seiten-Vorlage holen. In Dokumenten mit nur
// einer Vorlage gibt es nur eine rechtee Seite.
@@ -115,9 +115,9 @@ public:
// eine Benutzter-Vorlage, die on-demand angelegt wird, wenn
// bCreate gesetzt ist.
SwPageDesc* GetMasterPageDesc();
- inline const SwPageDesc* GetFirstPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetRightPageDesc( BOOL bCreate=FALSE );
- inline const SwPageDesc* GetLeftPageDesc( BOOL bCreate=FALSE );
+ inline const SwPageDesc* GetFirstPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetRightPageDesc( sal_Bool bCreate=sal_False );
+ inline const SwPageDesc* GetLeftPageDesc( sal_Bool bCreate=sal_False );
// Attribute an der HTML-Seitenvorlage setzen (gesetzte Attribute
// werden aus dem Item-Set geloescht ). Wird fuer's BODY-Tag
@@ -136,7 +136,7 @@ public:
void FillDropCap( SwFmtDrop& rDrop, SfxItemSet& rItemSet,
const String *pName=0 );
- BOOL SetFmtBreak( SfxItemSet& rItemSet,
+ sal_Bool SetFmtBreak( SfxItemSet& rItemSet,
const SvxCSS1PropertyInfo& rPropInfo );
@@ -144,26 +144,26 @@ public:
static inline void AddFirstLetterExt( String& rFmtName );
- static BOOL MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
- BOOL bAutoWidth=FALSE );
+ static sal_Bool MayBePositioned( const SvxCSS1PropertyInfo& rPropInfo,
+ sal_Bool bAutoWidth=sal_False );
static sal_uInt16 GetScriptFromClass( String& rClass,
sal_Bool bSubClassOnly = sal_True );
- BOOL IsBodyBGColorSet() const { return bBodyBGColorSet; }
- BOOL IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
- BOOL IsBodyTextSet() const { return bBodyTextSet; }
- BOOL IsBodyLinkSet() const { return bBodyLinkSet; }
- BOOL IsBodyVLinkSet() const { return bBodyVLinkSet; }
+ sal_Bool IsBodyBGColorSet() const { return bBodyBGColorSet; }
+ sal_Bool IsBodyBackgroundSet() const { return bBodyBackgroundSet; }
+ sal_Bool IsBodyTextSet() const { return bBodyTextSet; }
+ sal_Bool IsBodyLinkSet() const { return bBodyLinkSet; }
+ sal_Bool IsBodyVLinkSet() const { return bBodyVLinkSet; }
- BOOL IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
- BOOL IsSetRightPageDesc() const { return bSetRightPageDesc; }
+ sal_Bool IsSetFirstPageDesc() const { return bSetFirstPageDesc; }
+ sal_Bool IsSetRightPageDesc() const { return bSetRightPageDesc; }
- void SetBodyBGColorSet() { bBodyBGColorSet = TRUE; }
- void SetBodyBackgroundSet() { bBodyBackgroundSet = TRUE; }
- void SetBodyTextSet() { bBodyTextSet = TRUE; }
- void SetBodyLinkSet() { bBodyLinkSet = TRUE; }
- void SetBodyVLinkSet() { bBodyVLinkSet = TRUE; }
+ void SetBodyBGColorSet() { bBodyBGColorSet = sal_True; }
+ void SetBodyBackgroundSet() { bBodyBackgroundSet = sal_True; }
+ void SetBodyTextSet() { bBodyTextSet = sal_True; }
+ void SetBodyLinkSet() { bBodyLinkSet = sal_True; }
+ void SetBodyVLinkSet() { bBodyVLinkSet = sal_True; }
const SvxBrushItem& GetPageDescBackground() const;
@@ -181,17 +181,17 @@ inline void SwCSS1Parser::AddFirstLetterExt( String& rFmtName )
rFmtName.AppendAscii( ".FL", 3 ); // first letter
}
-inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetFirstPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_FIRST, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetRightPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_RIGHT, bCreate );
}
-inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
+inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( sal_Bool bCreate )
{
return GetPageDesc( RES_POOLPAGE_LEFT, bCreate );
}
@@ -199,13 +199,13 @@ inline const SwPageDesc* SwCSS1Parser::GetLeftPageDesc( BOOL bCreate )
inline void SwCSS1Parser::SetTHTagStyles()
{
if( !bTableHeaderTxtCollSet )
- SetTableTxtColl( TRUE );
+ SetTableTxtColl( sal_True );
}
inline void SwCSS1Parser::SetTDTagStyles()
{
if( !bTableTxtCollSet )
- SetTableTxtColl( FALSE );
+ SetTableTxtColl( sal_False );
}
diff --git a/sw/source/filter/html/swhtml.cxx b/sw/source/filter/html/swhtml.cxx
index 2a8ff234cf4d..39fec37e444d 100644
--- a/sw/source/filter/html/swhtml.cxx
+++ b/sw/source/filter/html/swhtml.cxx
@@ -88,6 +88,7 @@
#include <docary.hxx>
#include <docstat.hxx>
#include <doc.hxx>
+#include <IDocumentUndoRedo.hxx>
#include <pam.hxx>
#include <ndtxt.hxx>
#include <mdiexp.hxx> // ...Percent()
@@ -157,7 +158,7 @@ SV_IMPL_PTRARR( _HTMLAttrs, _HTMLAttrPtr )
HTMLReader::HTMLReader()
{
- bTmplBrowseMode = TRUE;
+ bTmplBrowseMode = sal_True;
}
String HTMLReader::GetTemplateName() const
@@ -174,7 +175,7 @@ String HTMLReader::GetTemplateName() const
SvtPathOptions aPathOpt;
// OpenDocument Writer/Web template (extension .oth)
- BOOL bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
+ sal_Bool bSet = aPathOpt.SearchFile( sTemplate, SvtPathOptions::PATH_TEMPLATE );
#ifndef MAC_WITHOUT_EXT
if( !bSet )
@@ -206,14 +207,14 @@ int HTMLReader::SetStrmStgPtr()
if( pMedium->IsRemote() || !pMedium->IsStorage() )
{
pStrm = pMedium->GetInStream();
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
+sal_uLong HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & rName )
{
if( !pStrm )
{
@@ -237,7 +238,7 @@ ULONG HTMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const
// damit keiner das Doc klaut!
rDoc.acquire();
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SvParserRef xParser = new SwHTMLParser( &rDoc, rPam, *pStrm,
rName, rBaseURL, !bInsertMode, pMedium,
IsReadUTF8(),
@@ -269,9 +270,9 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
const String& rPath,
const String& rBaseURL,
int bReadNewDoc,
- SfxMedium* pMed, BOOL bReadUTF8,
+ SfxMedium* pMed, sal_Bool bReadUTF8,
sal_Bool bNoHTMLComments )
- : SfxHTMLParser( rIn, static_cast< BOOL >(bReadNewDoc), pMed ),
+ : SfxHTMLParser( rIn, static_cast< sal_Bool >(bReadNewDoc), pMed ),
SwClient( 0 ),
aPathToFile( rPath ),
sBaseURL( rBaseURL ),
@@ -307,32 +308,32 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
nContinue( 0 ),
#endif
eParaAdjust( SVX_ADJUST_END ),
- bDocInitalized( FALSE ),
- bSetModEnabled( FALSE ),
- bInFloatingFrame( FALSE ),
- bInField( FALSE ),
- bCallNextToken( FALSE ),
- bIgnoreRawData( FALSE ),
- bNoParSpace( FALSE ),
- bInNoEmbed( FALSE ),
- bInTitle( FALSE ),
- bUpdateDocStat( FALSE ),
- bFixSelectWidth( FALSE ),
- bFixSelectHeight( FALSE ),
- bTextArea( FALSE ),
- bSelect( FALSE ),
- bInFootEndNoteAnchor( FALSE ),
- bInFootEndNoteSymbol( FALSE ),
+ bDocInitalized( sal_False ),
+ bSetModEnabled( sal_False ),
+ bInFloatingFrame( sal_False ),
+ bInField( sal_False ),
+ bCallNextToken( sal_False ),
+ bIgnoreRawData( sal_False ),
+ bNoParSpace( sal_False ),
+ bInNoEmbed( sal_False ),
+ bInTitle( sal_False ),
+ bUpdateDocStat( sal_False ),
+ bFixSelectWidth( sal_False ),
+ bFixSelectHeight( sal_False ),
+ bTextArea( sal_False ),
+ bSelect( sal_False ),
+ bInFootEndNoteAnchor( sal_False ),
+ bInFootEndNoteSymbol( sal_False ),
bIgnoreHTMLComments( bNoHTMLComments ),
- bRemoveHidden( FALSE ),
+ bRemoveHidden( sal_False ),
pTempViewFrame(0)
{
nEventId = 0;
bUpperSpace = bViewCreated = bChkJumpMark =
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
eScriptLang = HTML_SL_UNKNOWN;
- bAnyStarBasic = TRUE;
+ bAnyStarBasic = sal_True;
pPam = new SwPaM( *rCrsr.GetPoint() );
memset( &aAttrTab, 0, sizeof( _HTMLAttrTable ));
@@ -385,7 +386,7 @@ SwHTMLParser::SwHTMLParser( SwDoc* pD, const SwPaM& rCrsr, SvStream& rIn,
SwDocShell* pDocSh = pDoc->GetDocShell();
if( pDocSh )
{
- bViewCreated = TRUE; // nicht, synchron laden
+ bViewCreated = sal_True; // nicht, synchron laden
// es ist ein Sprungziel vorgegeben.
@@ -435,8 +436,8 @@ SwHTMLParser::~SwHTMLParser()
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( !nContinue, "DTOR im Continue - Das geht schief!!!" );
#endif
- BOOL bAsync = pDoc->IsInLoadAsynchron();
- pDoc->SetInLoadAsynchron( FALSE );
+ sal_Bool bAsync = pDoc->IsInLoadAsynchron();
+ pDoc->SetInLoadAsynchron( sal_False );
pDoc->set(IDocumentSettingAccess::HTML_MODE, bOldIsHTMLMode);
if( pDoc->GetDocShell() && nEventId )
@@ -447,11 +448,11 @@ SwHTMLParser::~SwHTMLParser()
if( pDoc->GetDocShell() )
{
// Gelinkte Bereiche updaten
- USHORT nLinkMode = pDoc->getLinkUpdateMode( true );
+ sal_uInt16 nLinkMode = pDoc->getLinkUpdateMode( true );
if( nLinkMode != NEVER && bAsync &&
SFX_CREATE_MODE_INTERNAL!=pDoc->GetDocShell()->GetCreateMode() )
pDoc->GetLinkManager().UpdateAllLinks( nLinkMode == MANUAL,
- TRUE, FALSE );
+ sal_True, sal_False );
if ( pDoc->GetDocShell()->IsLoading() )
{
@@ -557,7 +558,7 @@ SvParserState SwHTMLParser::CallParser()
}
else
{
- bViewCreated = TRUE;
+ bViewCreated = sal_True;
nEventId = 0;
}
}
@@ -605,8 +606,8 @@ void SwHTMLParser::Continue( int nToken )
// An dieser Stelle wurde im CallParser gerade mal ein Zeichen
// gelesen und ein SaveState(0) gerufen.
eState = SVPAR_PENDING;
- bViewCreated = TRUE;
- pDoc->SetInLoadAsynchron( TRUE );
+ bViewCreated = sal_True;
+ pDoc->SetInLoadAsynchron( sal_True );
#if OSL_DEBUG_LEVEL > 1
nContinue--;
@@ -615,20 +616,20 @@ void SwHTMLParser::Continue( int nToken )
return;
}
- bSetModEnabled = FALSE;
+ bSetModEnabled = sal_False;
if( pDoc->GetDocShell() &&
0 != (bSetModEnabled = pDoc->GetDocShell()->IsEnableSetModified()) )
{
- pDoc->GetDocShell()->EnableSetModified( FALSE );
+ pDoc->GetDocShell()->EnableSetModified( sal_False );
}
// waehrend des einlesens kein OLE-Modified rufen
Link aOLELink( pDoc->GetOle2Link() );
pDoc->SetOle2Link( Link() );
- BOOL bModified = pDoc->IsModified();
- BOOL bWasUndo = pDoc->DoesUndo();
- pDoc->DoUndo( FALSE );
+ sal_Bool bModified = pDoc->IsModified();
+ bool const bWasUndo = pDoc->GetIDocumentUndoRedo().DoesUndo();
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
// Wenn der Import abgebrochen wird, kein Continue mehr rufen.
// Falls ein Pending-Stack existiert aber durch einen Aufruf
@@ -651,7 +652,7 @@ void SwHTMLParser::Continue( int nToken )
// Laufbalken wieder abschalten
EndProgress( pDoc->GetDocShell() );
- BOOL bLFStripped = FALSE;
+ sal_Bool bLFStripped = sal_False;
if( SVPAR_PENDING != GetStatus() )
{
// noch die letzten Attribute setzen
@@ -662,7 +663,7 @@ void SwHTMLParser::Continue( int nToken )
(SwScriptFieldType*)pDoc->GetSysFldType( RES_SCRIPTFLD );
SwScriptField aFld( pType, aScriptType, aScriptSource,
- FALSE );
+ sal_False );
InsertAttr( SwFmtFld( aFld ) );
}
@@ -697,7 +698,7 @@ void SwHTMLParser::Continue( int nToken )
if( aParaAttrs.Count() )
aParaAttrs.Remove( 0, aParaAttrs.Count() );
- SetAttr( FALSE );
+ SetAttr( sal_False );
// Noch die erst verzoegert gesetzten Styles setzen
pCSS1Parser->SetDelayedStyles();
@@ -720,21 +721,21 @@ void SwHTMLParser::Continue( int nToken )
#if OSL_DEBUG_LEVEL > 1
// !!! sollte nicht moeglich sein, oder ??
-OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_True ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
-OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -763,10 +764,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() && !bLFStripped )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
- BOOL bHasFlysOrMarks =
- HasCurrentParaFlys() || HasCurrentParaBookmarks( TRUE );
+ sal_Bool bHasFlysOrMarks =
+ HasCurrentParaFlys() || HasCurrentParaBookmarks( sal_True );
if( IsNewDoc() )
{
@@ -792,8 +793,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pCrsrSh->SetMark();
pCrsrSh->ClearMark();
}
- pPam->GetBound(TRUE).nContent.Assign( 0, 0 );
- pPam->GetBound(FALSE).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_True).nContent.Assign( 0, 0 );
+ pPam->GetBound(sal_False).nContent.Assign( 0, 0 );
pDoc->GetNodes().Delete( pPam->GetPoint()->nNode );
}
}
@@ -841,10 +842,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -885,8 +886,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
{
if( bWasUndo )
{
- pDoc->DelAllUndoObj();
- pDoc->DoUndo( TRUE );
+ pDoc->GetIDocumentUndoRedo().DelAllUndoObj();
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
}
else if( !pInitVSh )
{
@@ -896,7 +897,9 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// wir muessen das Undo noch anschalten.
ViewShell *pTmpVSh = CheckActionViewShell();
if( pTmpVSh )
- pDoc->DoUndo( TRUE );
+ {
+ pDoc->GetIDocumentUndoRedo().DoUndo(true);
+ }
}
pDoc->SetOle2Link( aOLELink );
@@ -904,8 +907,8 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
pDoc->ResetModified();
if( bSetModEnabled && pDoc->GetDocShell() )
{
- pDoc->GetDocShell()->EnableSetModified( TRUE );
- bSetModEnabled = FALSE; // this is unnecessary here
+ pDoc->GetDocShell()->EnableSetModified( sal_True );
+ bSetModEnabled = sal_False; // this is unnecessary here
}
}
@@ -914,7 +917,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
// offen ist (muss bei Abbruch nicht sein), die Action beenden,
// uns von der Shell abmelden und schliesslich die alte Shell
// wieder rekonstruieren.
- CallEndAction( TRUE );
+ CallEndAction( sal_True );
#if OSL_DEBUG_LEVEL > 1
nContinue--;
@@ -939,15 +942,15 @@ void SwHTMLParser::Modify( SfxPoolItem *pOld, SfxPoolItem *pNew )
void SwHTMLParser::DocumentDetected()
{
OSL_ENSURE( !bDocInitalized, "DocumentDetected mehrfach aufgerufen" );
- bDocInitalized = TRUE;
+ bDocInitalized = sal_True;
if( IsNewDoc() )
{
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
- CallEndAction( TRUE, TRUE );
+ CallEndAction( sal_True, sal_True );
- pDoc->DoUndo( FALSE );
+ pDoc->GetIDocumentUndoRedo().DoUndo(false);
// Durch das DocumentDetected wurde im allgemeinen eine
// ViewShell angelegt. Es kann aber auch sein, dass sie
// erst spaeter angelegt wird, naemlich dann, wenn die UI
@@ -1020,7 +1023,7 @@ void SwHTMLParser::NextToken( int nToken )
pDoc->GetDocShell()->SetTitle( sTitle );
}
}
- bInTitle = FALSE;
+ bInTitle = sal_False;
sTitle.Erase();
break;
@@ -1061,9 +1064,9 @@ void SwHTMLParser::NextToken( int nToken )
if( !bDocInitalized )
DocumentDetected();
- BOOL bGetIDOption = FALSE, bInsertUnknown = FALSE;
- BOOL bUpperSpaceSave = bUpperSpace;
- bUpperSpace = FALSE;
+ sal_Bool bGetIDOption = sal_False, bInsertUnknown = sal_False;
+ sal_Bool bUpperSpaceSave = bUpperSpace;
+ bUpperSpace = sal_False;
// Die folgenden Speziallfaelle muessen oder koennen nach der
// Filter-Detection erfolgen.
@@ -1075,7 +1078,7 @@ void SwHTMLParser::NextToken( int nToken )
// Applets ignoriert wird!
if( HTML_IFRAME_OFF == nToken )
{
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndFloatingFrame();
}
@@ -1089,8 +1092,8 @@ void SwHTMLParser::NextToken( int nToken )
aContents.ConvertLineEnd();
InsertComment( aContents, OOO_STRING_SVTOOLS_HTML_noembed );
aContents.Erase();
- bCallNextToken = FALSE;
- bInNoEmbed = FALSE;
+ bCallNextToken = sal_False;
+ bInNoEmbed = sal_False;
break;
case HTML_RAWDATA:
@@ -1113,11 +1116,11 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_APPLET_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndApplet();
break;
case HTML_OBJECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndObject();
break;
@@ -1137,7 +1140,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_TEXTAREA_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndTextArea();
break;
@@ -1154,7 +1157,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SELECT_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndSelect();
return;
@@ -1189,7 +1192,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_MARQUEE_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndMarquee();
break;
@@ -1205,7 +1208,7 @@ void SwHTMLParser::NextToken( int nToken )
switch( nToken )
{
case HTML_SDFIELD_OFF:
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
EndField();
break;
@@ -1222,7 +1225,7 @@ void SwHTMLParser::NextToken( int nToken )
{
case HTML_ANCHOR_OFF:
EndAnchor();
- bCallNextToken = FALSE;
+ bCallNextToken = sal_False;
break;
case HTML_TEXTTOKEN:
@@ -1304,7 +1307,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_BASE:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
@@ -1362,7 +1365,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_TITLE_ON:
- bInTitle = TRUE;
+ bInTitle = sal_True;
break;
case HTML_SCRIPT_ON:
@@ -1375,7 +1378,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_NOSCRIPT_ON:
case HTML_NOSCRIPT_OFF:
- bInsertUnknown = TRUE;
+ bInsertUnknown = sal_True;
break;
case HTML_STYLE_ON:
@@ -1428,7 +1431,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
}
else
- bGetIDOption = TRUE;
+ bGetIDOption = sal_True;
// <BR>s in <PRE> aehneln echten LFs, deshalb kein break
case HTML_NEWPARA:
@@ -1460,7 +1463,7 @@ void SwHTMLParser::NextToken( int nToken )
if( !pTable && !pDoc->IsInHeaderFooter( pPam->GetPoint()->nNode ) )
{
NewAttr( &aAttrTab.pBreak, SvxFmtBreakItem(SVX_BREAK_PAGE_BEFORE, RES_BREAK) );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
break;
@@ -1473,8 +1476,7 @@ void SwHTMLParser::NextToken( int nToken )
if( nPos )
{
const String& rText =
- pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->GetTxtNode()
- ->GetTxt();
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode()->GetTxt();
sal_Unicode cLast = rText.GetChar(--nPos);
if( ' ' == cLast || '\x0a' == cLast)
aToken.Erase(0,1);
@@ -1527,7 +1529,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_NOEMBED_ON:
- bInNoEmbed = TRUE;
+ bInNoEmbed = sal_True;
bCallNextToken = pTable!=0;
ReadRawData( OOO_STRING_SVTOOLS_HTML_noembed );
break;
@@ -1540,7 +1542,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_DEFLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE, 1==nDefListDeep );
+ EndDefListItem( 0, sal_False, 1==nDefListDeep );
EndDefList();
break;
@@ -1548,7 +1550,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_DT_ON:
if( nOpenParaToken )
EndPara();
- EndDefListItem( 0, FALSE );// <DD>/<DT> beenden und keine Vorl. setzen
+ EndDefListItem( 0, sal_False );// <DD>/<DT> beenden und keine Vorl. setzen
NewDefListItem( nToken );
break;
@@ -1558,7 +1560,7 @@ void SwHTMLParser::NextToken( int nToken )
// eigentlich muesste man ein DD/DT jetzt beenden. Da aber sowhl
// Netscape als auch Microsoft das nicht tun, machen wir das eben
// auch nicht.
- EndDefListItem( nToken, FALSE );
+ EndDefListItem( nToken, sal_False );
break;
// Bereiche
@@ -1613,12 +1615,12 @@ void SwHTMLParser::NextToken( int nToken )
// Vorlagen:
case HTML_PARABREAK_ON:
if( nOpenParaToken )
- EndPara( TRUE );
+ EndPara( sal_True );
NewPara();
break;
case HTML_PARABREAK_OFF:
- EndPara( TRUE );
+ EndPara( sal_True );
break;
case HTML_ADDRESS_ON:
@@ -1656,7 +1658,7 @@ void SwHTMLParser::NextToken( int nToken )
break;
case HTML_PREFORMTXT_OFF:
- bNoParSpace = TRUE; // der letzte PRE-Absatz muss einen Zeilenabstand bekommen
+ bNoParSpace = sal_True; // der letzte PRE-Absatz muss einen Zeilenabstand bekommen
EndTxtFmtColl( HTML_PREFORMTXT_OFF );
break;
@@ -1733,7 +1735,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_UNORDERLIST_OFF:
if( nOpenParaToken )
EndPara();
- EndNumBulListItem( 0, TRUE, GetNumInfo().GetDepth()==1 );
+ EndNumBulListItem( 0, sal_True, GetNumInfo().GetDepth()==1 );
EndNumBulList( nToken );
break;
@@ -1747,13 +1749,13 @@ void SwHTMLParser::NextToken( int nToken )
EndPara();
}
- EndNumBulListItem( 0, FALSE );// <LI>/<LH> beenden und keine Vorl. setzen
+ EndNumBulListItem( 0, sal_False );// <LI>/<LH> beenden und keine Vorl. setzen
NewNumBulListItem( nToken );
break;
case HTML_LI_OFF:
case HTML_LISTHEADER_OFF:
- EndNumBulListItem( nToken, FALSE );
+ EndNumBulListItem( nToken, sal_False );
break;
// Attribute :
@@ -1814,7 +1816,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_BLINK_ON:
{
NewStdAttr( HTML_BLINK_ON, &aAttrTab.pBlink,
- SvxBlinkItem( TRUE, RES_CHRATR_BLINK ) );
+ SvxBlinkItem( sal_True, RES_CHRATR_BLINK ) );
}
break;
@@ -1919,7 +1921,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_HTML_ON:
{
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
if( HTML_O_DIR == pOption->GetToken() )
@@ -2020,7 +2022,7 @@ void SwHTMLParser::NextToken( int nToken )
case HTML_NOFRAMES_ON:
if( IsInHeader() )
- FinishHeader( TRUE );
+ FinishHeader( sal_True );
bInsertUnknown = bKeepUnknown;
break;
@@ -2065,7 +2067,7 @@ void SwHTMLParser::NextToken( int nToken )
/* */
-extern BOOL lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
+extern sal_Bool lcl_css1atr_equalFontItems( const SfxPoolItem& r1, const SfxPoolItem& r2 );
void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
sal_Bool& rScriptDependent, sal_Bool& rFont,
@@ -2108,7 +2110,7 @@ void lcl_swhtml_getItemInfo( const _HTMLAttr& rAttr,
}
}
-BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
+sal_Bool SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, sal_Bool bUpdateNum )
{
// Ein harter Zeilen-Umbruch am Ende muss immer entfernt werden.
// Einen zweiten ersetzen wir durch einen Absatz-Abstand.
@@ -2123,12 +2125,12 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
if( AM_SPACE==eMode || AM_NOSPACE==eMode )
{
SwTxtNode *pTxtNode =
- pDoc->GetNodes()[pPam->GetPoint()->nNode]->GetTxtNode();
+ pPam->GetPoint()->nNode.GetNode().GetTxtNode();
const SvxULSpaceItem& rULSpace =
(const SvxULSpaceItem&)pTxtNode->SwCntntNode::GetAttr( RES_UL_SPACE );
- BOOL bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
+ sal_Bool bChange = AM_NOSPACE==eMode ? rULSpace.GetLower() > 0
: rULSpace.GetLower() == 0;
if( bChange )
@@ -2136,7 +2138,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SvxULSpaceItem& rCollULSpace =
pTxtNode->GetAnyFmtColl().GetULSpace();
- BOOL bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
+ sal_Bool bMayReset = AM_NOSPACE==eMode ? rCollULSpace.GetLower() == 0
: rCollULSpace.GetLower() > 0;
if( bMayReset &&
@@ -2156,7 +2158,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
SwPosition aOldPos( *pPam->GetPoint() );
- BOOL bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
+ sal_Bool bRet = pDoc->AppendTxtNode( *pPam->GetPoint() );
// Zeichen-Attribute aufspalten und ggf keine setzen, die ueber den
// ganzen Absatz gesetzt sind
@@ -2165,13 +2167,13 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
const SwPosition& rPos = *pPam->GetPoint();
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; ++pTbl )
{
_HTMLAttr *pAttr = *pTbl;
if( pAttr && pAttr->GetItem().Which() < RES_PARATR_BEGIN )
{
- BOOL bWholePara = FALSE;
+ sal_Bool bWholePara = sal_False;
while( pAttr )
{
@@ -2215,7 +2217,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
pSetAttr->ClearPrev();
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2245,7 +2247,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// wenn Felder ins Rennen kommen
if( !pNext || bWholePara )
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -2260,7 +2262,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
// Die Previous-Attribute muessen trotzdem gesetzt werden.
if( !pNext || bWholePara )
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
else
@@ -2280,7 +2282,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
{
if( GetNumInfo().GetDepth() )
{
- BYTE nLvl = GetNumInfo().GetLevel();
+ sal_uInt8 nLvl = GetNumInfo().GetLevel();
SetNodeNum( nLvl, false );
}
else
@@ -2316,7 +2318,7 @@ BOOL SwHTMLParser::AppendTxtNode( SwHTMLAppendMode eMode, BOOL bUpdateNum )
if( RES_CHRATR_CJK_FONT <= nWhich &&
nWhich <= RES_CHRATR_CTL_WEIGHT )
{
- nIdx = static_cast< USHORT >(nWhich - RES_CHRATR_CJK_FONT + 5);
+ nIdx = static_cast< sal_uInt16 >(nWhich - RES_CHRATR_CJK_FONT + 5);
}
else switch( nWhich )
{
@@ -2379,9 +2381,9 @@ void SwHTMLParser::AddParSpace()
if( !bNoParSpace )
return;
- bNoParSpace = FALSE;
+ bNoParSpace = sal_False;
- ULONG nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
+ sal_uLong nNdIdx = pPam->GetPoint()->nNode.GetIndex() - 1;
SwTxtNode *pTxtNode = pDoc->GetNodes()[nNdIdx]->GetTxtNode();
if( !pTxtNode )
@@ -2434,8 +2436,10 @@ void SwHTMLParser::Show()
// ist der aktuelle Node nicht mehr sichtbar, dann benutzen wir
// eine groessere Schrittweite
if( pVSh )
- nParaCnt = pDoc->GetNodes()[pPam->GetPoint()->nNode]
- ->IsInVisibleArea(pVSh) ? 5 : 50;
+ {
+ nParaCnt = (pPam->GetPoint()->nNode.GetNode().IsInVisibleArea(pVSh))
+ ? 5 : 50;
+ }
}
void SwHTMLParser::ShowStatline()
@@ -2465,13 +2469,13 @@ void SwHTMLParser::ShowStatline()
ViewShell *pVSh = CheckActionViewShell();
if( pVSh && pVSh->HasInvalidRect() )
{
- CallEndAction( FALSE, FALSE );
- CallStartAction( pVSh, FALSE );
+ CallEndAction( sal_False, sal_False );
+ CallStartAction( pVSh, sal_False );
}
}
}
-ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, sal_Bool bChkPtr )
{
OSL_ENSURE( !pActionViewShell, "CallStartAction: ViewShell schon gesetzt" );
@@ -2500,7 +2504,7 @@ ViewShell *SwHTMLParser::CallStartAction( ViewShell *pVSh, BOOL bChkPtr )
return pActionViewShell;
}
-ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
+ViewShell *SwHTMLParser::CallEndAction( sal_Bool bChkAction, sal_Bool bChkPtr )
{
if( bChkPtr )
{
@@ -2525,19 +2529,19 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
ViewShell *pSh = pActionViewShell;
do {
if( pSh->IsA( TYPE( SwCrsrShell ) ) )
- ((SwCrsrShell*)pSh)->SttEndDoc(TRUE);
+ ((SwCrsrShell*)pSh)->SttEndDoc(sal_True);
pSh = (ViewShell *)pSh->GetNext();
} while( pSh != pActionViewShell );
- bSetCrsr = FALSE;
+ bSetCrsr = sal_False;
}
if( pActionViewShell->ISA( SwEditShell ) )
{
//Schon gescrollt?, dann dafuer sorgen, dass die View sich nicht bewegt!
- const BOOL bOldLock = pActionViewShell->IsViewLocked();
- pActionViewShell->LockView( TRUE );
- const BOOL bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
- pActionViewShell->SetEndActionByVirDev( TRUE );;
+ const sal_Bool bOldLock = pActionViewShell->IsViewLocked();
+ pActionViewShell->LockView( sal_True );
+ const sal_Bool bOldEndActionByVirDev = pActionViewShell->IsEndActionByVirDev();
+ pActionViewShell->SetEndActionByVirDev( sal_True );;
((SwEditShell*)pActionViewShell)->EndAction();
pActionViewShell->SetEndActionByVirDev( bOldEndActionByVirDev );
pActionViewShell->LockView( bOldLock );
@@ -2549,7 +2553,7 @@ ViewShell *SwHTMLParser::CallEndAction( BOOL bChkAction, BOOL bChkPtr )
if( GetMedium() && aVisSttPos == pActionViewShell->VisArea().Pos() )
::JumpToSwMark( pActionViewShell,
GetMedium()->GetURLObject().GetMark() );
- bChkJumpMark = FALSE;
+ bChkJumpMark = sal_False;
}
}
else
@@ -2586,7 +2590,7 @@ ViewShell *SwHTMLParser::CheckActionViewShell()
/* */
-void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
+void SwHTMLParser::_SetAttr( sal_Bool bChkEnd, sal_Bool bBeforeTable,
_HTMLAttrs *pPostIts )
{
SwPaM* pAttrPam = new SwPaM( *pPam->GetPoint() );
@@ -2594,17 +2598,17 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
xub_StrLen nEndCnt = pPam->GetPoint()->nContent.GetIndex();
_HTMLAttr* pAttr;
SwCntntNode* pCNd;
- USHORT n;
+ sal_uInt16 n;
_HTMLAttrs aFields( 5, 5 );
for( n = aSetAttrTab.Count(); n; )
{
pAttr = aSetAttrTab[ --n ];
- USHORT nWhich = pAttr->pItem->Which();
+ sal_uInt16 nWhich = pAttr->pItem->Which();
- ULONG nEndParaIdx = pAttr->GetEndParaIdx();
- BOOL bSetAttr;
+ sal_uLong nEndParaIdx = pAttr->GetEndParaIdx();
+ sal_Bool bSetAttr;
if( bChkEnd )
{
// Zechen-Attribute mit Ende moeglich frueh,
@@ -2630,7 +2634,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// Attribiute im Content-Bereich duerfen nicht gesetzt
// werden, wenn wir in einem Sonderbereich stehen, aber
// umgekekehrt schon.
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bSetAttr = nEndParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nEndParaIdx <= nEndOfIcons;
@@ -2640,7 +2644,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
{
// Das Attribute darf nicht in der liste der vorlaeufigen
// Absatz-Attribute stehen, weil es sonst geloescht wurde.
- USHORT ii = aParaAttrs.Count();
+ sal_uInt16 ii = aParaAttrs.Count();
while( ii-- )
{
OSL_ENSURE( pAttr != aParaAttrs[ii],
@@ -2664,7 +2668,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
}
- pCNd = pDoc->GetNodes()[ pAttr->nSttPara ]->GetCntntNode();
+ pCNd = pAttr->nSttPara.GetNode().GetCntntNode();
if( !pCNd )
{
// durch die elende Loescherei von Nodes kann auch mal
@@ -2704,7 +2708,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
if ( (pAttr->GetSttPara() != pAttr->GetEndPara()) &&
!isTXTATR_NOEND(nWhich) )
{
- pCNd = pDoc->GetNodes()[ pAttr->nEndPara ]->GetCntntNode();
+ pCNd = pAttr->nEndPara.GetNode().GetCntntNode();
if( !pCNd )
{
pCNd = pDoc->GetNodes().GoPrevious( &(pAttr->nEndPara) );
@@ -2780,14 +2784,14 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
// jump to bookmark
if( JUMPTO_MARK == eJumpTo && pNewMark->GetName() == ::rtl::OUString(sJmpMark) )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
}
break;
case RES_TXTATR_FIELD:
{
- USHORT nFldWhich =
+ sal_uInt16 nFldWhich =
pPostIts ? ((const SwFmtFld *)pAttr->pItem)
->GetFld()->GetTyp()->Which() : 0;
if( pPostIts && (RES_POSTITFLD == nFldWhich ||
@@ -2824,7 +2828,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
JUMPTO_MARK == eJumpTo &&
sJmpMark == ((SwFmtINetFmt*)pAttr->pItem)->GetName() )
{
- bChkJumpMark = TRUE;
+ bChkJumpMark = sal_True;
eJumpTo = JUMPTO_NONE;
}
@@ -2846,8 +2850,8 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
OSL_ENSURE( FLY_AT_PARA == rAnchor.GetAnchorId(),
"Nur Auto-Rahmen brauchen eine Spezialbehandlung" );
const SwPosition *pFlyPos = rAnchor.GetCntntAnchor();
- ULONG nFlyParaIdx = pFlyPos->nNode.GetIndex();
- BOOL bMoveFly;
+ sal_uLong nFlyParaIdx = pFlyPos->nNode.GetIndex();
+ sal_Bool bMoveFly;
if( bChkEnd )
{
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
@@ -2856,7 +2860,7 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
}
else
{
- ULONG nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
+ sal_uLong nEndOfIcons = pDoc->GetNodes().GetEndOfExtras().GetIndex();
bMoveFly = nFlyParaIdx < rEndIdx.GetIndex() ||
rEndIdx.GetIndex() > nEndOfIcons ||
nFlyParaIdx <= nEndOfIcons;
@@ -2889,14 +2893,14 @@ void SwHTMLParser::_SetAttr( BOOL bChkEnd, BOOL bBeforeTable,
pFrmFmt->MakeFrms();
aMoveFlyFrms.Remove( n, 1 );
- aMoveFlyCnts.Remove( n, 1 );
+ aMoveFlyCnts.erase( aMoveFlyCnts.begin() + n );
}
}
while( aFields.Count() )
{
pAttr = aFields[0];
- pCNd = pDoc->GetNodes()[ pAttr->nSttPara ]->GetCntntNode();
+ pCNd = pAttr->nSttPara.GetNode().GetCntntNode();
pAttrPam->GetPoint()->nNode = pAttr->nSttPara;
pAttrPam->GetPoint()->nContent.Assign( pCNd, pAttr->nSttCntnt );
@@ -2939,7 +2943,7 @@ void SwHTMLParser::NewAttr( _HTMLAttr **ppAttr, const SfxPoolItem& rItem )
void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
- BOOL bChkEmpty )
+ sal_Bool bChkEmpty )
{
OSL_ENSURE( !ppDepAttr, "SwHTMLParser::EndAttr: ppDepAttr-Feature ungetestet?" );
// Der Listenkopf ist im Attribut gespeichert
@@ -2968,8 +2972,8 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
OSL_ENSURE( pLast, "Attribut nicht in eigener Liste gefunden!" );
}
- BOOL bMoveBack = FALSE;
- USHORT nWhich = pAttr->pItem->Which();
+ sal_Bool bMoveBack = sal_False;
+ sal_uInt16 nWhich = pAttr->pItem->Which();
if( !nEndCnt && RES_PARATR_BEGIN <= nWhich &&
*pEndIdx != pAttr->GetSttPara() )
{
@@ -3023,7 +3027,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3053,7 +3057,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
(*ppDepAttr)->InsertPrev( pAttr );
else
{
- USHORT nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pAttr->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pAttr, nTmp );
}
}
@@ -3082,7 +3086,7 @@ void SwHTMLParser::EndAttr( _HTMLAttr* pAttr, _HTMLAttr **ppDepAttr,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3143,7 +3147,7 @@ void SwHTMLParser::DeleteAttr( _HTMLAttr* pAttr )
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3168,7 +3172,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
*pSaveTbl = *pTbl;
@@ -3185,7 +3189,7 @@ void SwHTMLParser::SaveAttrTab( _HTMLAttrTable& rNewAttrTab )
}
void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
- BOOL bMoveEndBack )
+ sal_Bool bMoveEndBack )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3201,14 +3205,14 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
// neu aufspannen
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- BOOL bSetAttr = TRUE;
+ sal_Bool bSetAttr = sal_True;
xub_StrLen nSttCnt = pPam->GetPoint()->nContent.GetIndex();
xub_StrLen nEndCnt = nSttCnt;
if( bMoveEndBack )
{
- ULONG nOldEnd = nEndIdx.GetIndex();
- ULONG nTmpIdx;
+ sal_uLong nOldEnd = nEndIdx.GetIndex();
+ sal_uLong nTmpIdx;
if( ( nTmpIdx = pDoc->GetNodes().GetEndOfExtras().GetIndex()) >= nOldEnd ||
( nTmpIdx = pDoc->GetNodes().GetEndOfAutotext().GetIndex()) >= nOldEnd )
{
@@ -3222,7 +3226,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
nEndCnt = (bSetAttr ? pCNd->Len() : 0);
}
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
_HTMLAttr *pAttr = *pTbl;
@@ -3248,7 +3252,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pSetAttr );
else
{
- USHORT nTmp = pSetAttr->bInsAtStart ? 0
+ sal_uInt16 nTmp = pSetAttr->bInsAtStart ? 0
: aSetAttrTab.Count();
aSetAttrTab.Insert( pSetAttr, nTmp );
}
@@ -3262,7 +3266,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
pNext->InsertPrev( pPrev );
else
{
- USHORT nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = pPrev->bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pPrev, nTmp );
}
}
@@ -3289,7 +3293,7 @@ void SwHTMLParser::SplitAttrTab( _HTMLAttrTable& rNewAttrTab,
}
void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
- BOOL bSetNewStart )
+ sal_Bool bSetNewStart )
{
// Hier darf es keine vorlauefigen Absatz-Attribute geben, den die
// koennten jetzt gesetzt werden und dann sind die Zeiger ungueltig!!!
@@ -3301,7 +3305,7 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
_HTMLAttr** pTbl = (_HTMLAttr**)&aAttrTab;
_HTMLAttr** pSaveTbl = (_HTMLAttr**)&rNewAttrTab;
- for( USHORT nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
+ for( sal_uInt16 nCnt = sizeof( _HTMLAttrTable ) / sizeof( _HTMLAttr* );
nCnt--; (++pTbl, ++pSaveTbl) )
{
OSL_ENSURE( !*pTbl, "Die Attribut-Tabelle ist nicht leer!" );
@@ -3332,14 +3336,14 @@ void SwHTMLParser::RestoreAttrTab( const _HTMLAttrTable& rNewAttrTab,
}
}
-void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, BOOL bLikePara,
- BOOL bInsAtStart )
+void SwHTMLParser::InsertAttr( const SfxPoolItem& rItem, sal_Bool bLikePara,
+ sal_Bool bInsAtStart )
{
_HTMLAttr* pTmp = new _HTMLAttr( *pPam->GetPoint(),
rItem );
if( bLikePara )
pTmp->SetLikePara();
- USHORT nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
+ sal_uInt16 nTmp = bInsAtStart ? 0 : aSetAttrTab.Count();
aSetAttrTab.Insert( pTmp, nTmp );
}
@@ -3361,7 +3365,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3398,7 +3402,7 @@ void SwHTMLParser::NewStdAttr( int nToken )
if( HTML_SPAN_ON != nToken || !aClass.Len() ||
!CreateContainer( aClass, aItemSet, aPropInfo, pCntxt ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -3414,7 +3418,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3455,7 +3459,7 @@ void SwHTMLParser::NewStdAttr( int nToken,
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3492,16 +3496,16 @@ void SwHTMLParser::EndTag( int nToken )
void SwHTMLParser::NewBasefontAttr()
{
String aId, aStyle, aClass, aLang, aDir;
- USHORT nSize = 3;
+ sal_uInt16 nSize = 3;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
{
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_ID:
aId = pOption->GetString();
@@ -3546,7 +3550,7 @@ void SwHTMLParser::NewBasefontAttr()
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3576,23 +3580,23 @@ void SwHTMLParser::EndBasefontAttr()
void SwHTMLParser::NewFontAttr( int nToken )
{
- USHORT nBaseSize =
+ sal_uInt16 nBaseSize =
( aBaseFontStack.Count() > nBaseFontStMin
? (aBaseFontStack[aBaseFontStack.Count()-1] & FONTSIZE_MASK)
: 3 );
- USHORT nFontSize =
+ sal_uInt16 nFontSize =
( aFontStack.Count() > nFontStMin
? (aFontStack[aFontStack.Count()-1] & FONTSIZE_MASK)
: nBaseSize );
String aFace, aId, aStyle, aClass, aLang, aDir;
Color aColor;
- ULONG nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
- USHORT nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
- BOOL bColor = FALSE;
+ sal_uLong nFontHeight = 0; // tatsaechlich einzustellende Font-Hoehe
+ sal_uInt16 nSize = 0; // Fontgroesse in Netscape-Notation (1-7)
+ sal_Bool bColor = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3600,19 +3604,19 @@ void SwHTMLParser::NewFontAttr( int nToken )
case HTML_O_SIZE:
if( HTML_FONT_ON==nToken && pOption->GetString().Len() )
{
- INT32 nSSize;
+ sal_Int32 nSSize;
if( '+' == pOption->GetString().GetChar(0) ||
'-' == pOption->GetString().GetChar(0) )
nSSize = nBaseSize + pOption->GetSNumber();
else
- nSSize = (INT32)pOption->GetNumber();
+ nSSize = (sal_Int32)pOption->GetNumber();
if( nSSize < 1 )
nSSize = 1;
else if( nSSize > 7 )
nSSize = 7;
- nSize = (USHORT)nSSize;
+ nSize = (sal_uInt16)nSSize;
nFontHeight = aFontHeights[nSize-1];
}
break;
@@ -3620,7 +3624,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( HTML_FONT_ON==nToken )
{
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
}
break;
case HTML_O_FACE:
@@ -3651,14 +3655,14 @@ void SwHTMLParser::NewFontAttr( int nToken )
// in Ueberschriften bestimmt die aktuelle Ueberschrift
// die Font-Hoehe und nicht BASEFONT
- USHORT nPoolId = GetCurrFmtColl()->GetPoolFmtId();
+ sal_uInt16 nPoolId = GetCurrFmtColl()->GetPoolFmtId();
if( (nPoolId>=RES_POOLCOLL_HEADLINE1 &&
nPoolId<=RES_POOLCOLL_HEADLINE6) )
{
// wenn die Schriftgroesse in der Ueberschrift noch
// nicht veraendert ist, die aus der Vorlage nehmen
if( nFontStHeadStart==aFontStack.Count() )
- nFontSize = static_cast< USHORT >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
+ nFontSize = static_cast< sal_uInt16 >(6 - (nPoolId - RES_POOLCOLL_HEADLINE1));
}
else
nPoolId = 0;
@@ -3697,7 +3701,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
pFList = pFListItem->GetFontList();
}
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
xub_StrLen nStrPos = 0;
while( nStrPos!=STRING_NOTFOUND )
{
@@ -3713,7 +3717,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
const FontInfo& rFInfo = pFList->GetFontInfo( hFont );
if( RTL_TEXTENCODING_DONTKNOW != rFInfo.GetCharSet() )
{
- bFound = TRUE;
+ bFound = sal_True;
if( RTL_TEXTENCODING_SYMBOL == rFInfo.GetCharSet() )
eEnc = RTL_TEXTENCODING_SYMBOL;
}
@@ -3761,7 +3765,7 @@ void SwHTMLParser::NewFontAttr( int nToken )
if( ParseStyleOptions( aStyle, aId, aClass, aItemSet, aPropInfo, &aLang, &aDir ) )
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
else
{
@@ -3815,7 +3819,7 @@ void SwHTMLParser::NewPara()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3879,7 +3883,7 @@ void SwHTMLParser::NewPara()
nOpenParaToken = HTML_PARABREAK_ON;
}
-void SwHTMLParser::EndPara( BOOL bReal )
+void SwHTMLParser::EndPara( sal_Bool bReal )
{
if( HTML_LI_ON==nOpenParaToken && pTable )
{
@@ -3935,7 +3939,7 @@ void SwHTMLParser::NewHeading( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -3968,7 +3972,7 @@ void SwHTMLParser::NewHeading( int nToken )
AddParSpace();
// die passende Vorlage suchen
- USHORT nTxtColl;
+ sal_uInt16 nTxtColl;
switch( nToken )
{
case HTML_HEAD1_ON: nTxtColl = RES_POOLCOLL_HEADLINE1; break;
@@ -4023,7 +4027,7 @@ void SwHTMLParser::EndHeading()
// Kontext zu dem Token suchen und vom Stack holen
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
switch( aContexts[--nPos]->GetToken() )
@@ -4056,12 +4060,12 @@ void SwHTMLParser::EndHeading()
/* */
-void SwHTMLParser::NewTxtFmtColl( int nToken, USHORT nColl )
+void SwHTMLParser::NewTxtFmtColl( int nToken, sal_uInt16 nColl )
{
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4190,7 +4194,7 @@ void SwHTMLParser::NewDefList()
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4214,7 +4218,7 @@ void SwHTMLParser::NewDefList()
}
// einen neuen Absatz aufmachen
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 0;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4224,11 +4228,11 @@ void SwHTMLParser::NewDefList()
nDefListDeep++;
- BOOL bInDD = FALSE, bNotInDD = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDD = sal_False, bNotInDD = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDD && !bNotInDD && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
@@ -4236,10 +4240,10 @@ void SwHTMLParser::NewDefList()
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDD = TRUE;
+ bNotInDD = sal_True;
break;
case HTML_DD_ON:
- bInDD = TRUE;
+ bInDD = sal_True;
break;
}
}
@@ -4291,7 +4295,7 @@ void SwHTMLParser::NewDefList()
void SwHTMLParser::EndDefList()
{
- BOOL bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
+ sal_Bool bSpace = (GetNumInfo().GetDepth() + nDefListDeep) == 1;
if( pPam->GetPoint()->nContent.GetIndex() )
AppendTxtNode( bSpace ? AM_SPACE : AM_SOFTNOSPACE );
else if( bSpace )
@@ -4319,21 +4323,21 @@ void SwHTMLParser::EndDefList()
void SwHTMLParser::NewDefListItem( int nToken )
{
// festellen, ob das DD/DT in einer DL vorkommt
- BOOL bInDefList = FALSE, bNotInDefList = FALSE;
- USHORT nPos = aContexts.Count();
+ sal_Bool bInDefList = sal_False, bNotInDefList = sal_False;
+ sal_uInt16 nPos = aContexts.Count();
while( !bInDefList && !bNotInDefList && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DEFLIST_ON:
- bInDefList = TRUE;
+ bInDefList = sal_True;
break;
case HTML_DIRLIST_ON:
case HTML_MENULIST_ON:
case HTML_ORDERLIST_ON:
case HTML_UNORDERLIST_ON:
- bNotInDefList = TRUE;
+ bNotInDefList = sal_True;
break;
}
}
@@ -4347,12 +4351,12 @@ void SwHTMLParser::NewDefListItem( int nToken )
nOpenParaToken = static_cast< sal_uInt16 >(nToken);
}
- NewTxtFmtColl( nToken, static_cast< USHORT >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
+ NewTxtFmtColl( nToken, static_cast< sal_uInt16 >(nToken==HTML_DD_ON ? RES_POOLCOLL_HTML_DD
: RES_POOLCOLL_HTML_DT) );
}
-void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
- BOOL /*bLastPara*/ )
+void SwHTMLParser::EndDefListItem( int nToken, sal_Bool bSetColl,
+ sal_Bool /*bLastPara*/ )
{
// einen neuen Absatz aufmachen
if( !nToken && pPam->GetPoint()->nContent.GetIndex() )
@@ -4361,10 +4365,10 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
// Kontext zu dem Token suchen und vom Stack holen
nToken &= ~1;
_HTMLAttrContext *pCntxt = 0;
- USHORT nPos = aContexts.Count();
+ sal_uInt16 nPos = aContexts.Count();
while( !pCntxt && nPos>nContextStMin )
{
- USHORT nCntxtToken = aContexts[--nPos]->GetToken();
+ sal_uInt16 nCntxtToken = aContexts[--nPos]->GetToken();
switch( nCntxtToken )
{
case HTML_DD_ON:
@@ -4402,8 +4406,8 @@ void SwHTMLParser::EndDefListItem( int nToken, BOOL bSetColl,
/* */
-BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
- BOOL bSurroundOnly ) const
+sal_Bool SwHTMLParser::HasCurrentParaFlys( sal_Bool bNoSurroundOnly,
+ sal_Bool bSurroundOnly ) const
{
// bNoSurroundOnly: Der Absatz enthaelt mindestens einen Rahmen
// ohne Umlauf
@@ -4414,8 +4418,8 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- BOOL bFound = FALSE;
- for ( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ sal_Bool bFound = sal_False;
+ for ( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -4433,7 +4437,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( !(bNoSurroundOnly || bSurroundOnly) )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
else
@@ -4447,7 +4451,7 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
break;
}
}
@@ -4455,12 +4459,12 @@ BOOL SwHTMLParser::HasCurrentParaFlys( BOOL bNoSurroundOnly,
{
if( SURROUND_NONE==eSurround )
{
- bFound = FALSE;
+ bFound = sal_False;
break;
}
else if( SURROUND_THROUGHT!=eSurround )
{
- bFound = TRUE;
+ bFound = sal_True;
// weitersuchen: Es koennten ja noch welche ohne
// Umlauf kommen ...
}
@@ -4487,45 +4491,45 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
{
SwTxtFmtColl *pCollToSet = 0; // die zu setzende Vorlage
SfxItemSet *pItemSet = 0; // der Set fuer harte Attrs
- USHORT nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
+ sal_uInt16 nTopColl = pContext ? pContext->GetTxtFmtColl() : 0;
const String& rTopClass = pContext ? pContext->GetClass() : (const String&) aEmptyStr;
- USHORT nDfltColl = RES_POOLCOLL_TEXT;
+ sal_uInt16 nDfltColl = RES_POOLCOLL_TEXT;
- BOOL bInPRE=FALSE; // etwas Kontext Info
+ sal_Bool bInPRE=sal_False; // etwas Kontext Info
- USHORT nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
+ sal_uInt16 nLeftMargin = 0, nRightMargin = 0; // die Einzuege und
short nFirstLineIndent = 0; // Abstaende
- USHORT i;
+ sal_uInt16 i;
for( i = nContextStAttrMin; i < aContexts.Count(); i++ )
{
const _HTMLAttrContext *pCntxt = aContexts[i];
- USHORT nColl = pCntxt->GetTxtFmtColl();
+ sal_uInt16 nColl = pCntxt->GetTxtFmtColl();
if( nColl )
{
// Es gibt eine Vorlage, die zu setzen ist. Dann
// muss zunaechst einmal entschieden werden,
// ob die Vorlage auch gesetzt werden kann
- BOOL bSetThis = TRUE;
+ sal_Bool bSetThis = sal_True;
switch( nColl )
{
- case USHORT(RES_POOLCOLL_HTML_PRE):
- bInPRE = TRUE;
+ case sal_uInt16(RES_POOLCOLL_HTML_PRE):
+ bInPRE = sal_True;
break;
- case USHORT(RES_POOLCOLL_TEXT):
+ case sal_uInt16(RES_POOLCOLL_TEXT):
// <TD><P CLASS=xxx> muss TD.xxx werden
if( nDfltColl==RES_POOLCOLL_TABLE ||
nDfltColl==RES_POOLCOLL_TABLE_HDLN )
nColl = nDfltColl;
break;
- case USHORT(RES_POOLCOLL_HTML_HR):
+ case sal_uInt16(RES_POOLCOLL_HTML_HR):
// <HR> auch in <PRE> als Vorlage setzen, sonst kann man sie
// nicht mehr exportieren
break;
default:
if( bInPRE )
- bSetThis = FALSE;
+ bSetThis = sal_False;
break;
}
@@ -4586,7 +4590,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. neue Absatz-Einzuege holen
if( pCntxt->IsLRSpaceChanged() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
pCntxt->GetMargins( nLeft, nRight, nFirstLineIndent );
nLeftMargin = nLeft;
@@ -4608,7 +4612,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pCSS1Parser->GetTxtFmtColl( nTopColl, rTopClass );
const SfxItemSet& rItemSet = pTopColl->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_LR_SPACE,sal_True, &pItem) )
{
const SvxLRSpaceItem *pLRItem =
(const SvxLRSpaceItem *)pItem;
@@ -4640,7 +4644,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
pContext->SetMargins( nLeftMargin, nRightMargin,
nFirstLineIndent );
}
- if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,TRUE, &pItem) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState(RES_UL_SPACE,sal_True, &pItem) )
{
const SvxULSpaceItem *pULItem =
(const SvxULSpaceItem *)pItem;
@@ -4675,7 +4679,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
// ggf. noch den Absatz-Einzug korrigieren
const SvxLRSpaceItem& rLRItem = pCollToSet->GetLRSpace();
- BOOL bSetLRSpace;
+ sal_Bool bSetLRSpace;
bSetLRSpace = nLeftMargin != rLRItem.GetTxtLeft() ||
nFirstLineIndent != rLRItem.GetTxtFirstLineOfst() ||
@@ -4694,7 +4698,7 @@ void SwHTMLParser::SetTxtCollAttrs( _HTMLAttrContext *pContext )
NewAttr( &aAttrTab.pLRSpace, aLRItem );
aAttrTab.pLRSpace->SetLikePara();
aParaAttrs.Insert( aAttrTab.pLRSpace, aParaAttrs.Count() );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
}
@@ -4713,7 +4717,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
String aId, aStyle, aClass, aLang, aDir;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4755,7 +4759,7 @@ void SwHTMLParser::NewCharFmt( int nToken )
OSL_ENSURE( !aClass.Len() || !pCSS1Parser->GetClass( aClass ),
"Class wird nicht beruecksichtigt" );
DoPositioning( aItemSet, aPropInfo, pCntxt );
- InsertAttrs( aItemSet, aPropInfo, pCntxt, TRUE );
+ InsertAttrs( aItemSet, aPropInfo, pCntxt, sal_True );
}
}
@@ -4780,12 +4784,12 @@ void SwHTMLParser::InsertSpacer()
sal_Int16 eHoriOri = text::HoriOrientation::NONE;
Size aSize( 0, 0);
long nSize = 0;
- BOOL bPrcWidth = FALSE;
- BOOL bPrcHeight = FALSE;
- USHORT nType = HTML_SPTYPE_HORI;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bPrcHeight = sal_False;
+ sal_uInt16 nType = HTML_SPTYPE_HORI;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -4849,7 +4853,7 @@ void SwHTMLParser::InsertSpacer()
// den Inhalt schuetzen
SvxProtectItem aProtectItem( RES_PROTECT) ;
- aProtectItem.SetCntntProtect( TRUE );
+ aProtectItem.SetCntntProtect( sal_True );
aFrmSet.Put( aProtectItem );
// der Rahmen anlegen
@@ -4894,13 +4898,13 @@ void SwHTMLParser::InsertSpacer()
{
SvxULSpaceItem aULSpace( (const SvxULSpaceItem&)pTxtNode
->SwCntntNode::GetAttr( RES_UL_SPACE ) );
- aULSpace.SetLower( aULSpace.GetLower() + (USHORT)nSize );
+ aULSpace.SetLower( aULSpace.GetLower() + (sal_uInt16)nSize );
pTxtNode->SetAttr( aULSpace );
}
else
{
- NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (USHORT)nSize, RES_UL_SPACE ) );
- EndAttr( aAttrTab.pULSpace, 0, FALSE );
+ NewAttr( &aAttrTab.pULSpace, SvxULSpaceItem( 0, (sal_uInt16)nSize, RES_UL_SPACE ) );
+ EndAttr( aAttrTab.pULSpace, 0, sal_False );
AppendTxtNode(); // nicht am Abstand drehen!
}
@@ -4921,7 +4925,7 @@ void SwHTMLParser::InsertSpacer()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- USHORT nLeft=0, nRight=0;
+ sal_uInt16 nLeft=0, nRight=0;
short nIndent = 0;
GetMarginsFromContextWithNumBul( nLeft, nRight, nIndent );
@@ -4933,7 +4937,7 @@ void SwHTMLParser::InsertSpacer()
aLRItem.SetTxtFirstLineOfst( nIndent );
NewAttr( &aAttrTab.pLRSpace, aLRItem );
- EndAttr( aAttrTab.pLRSpace, 0, FALSE );
+ EndAttr( aAttrTab.pLRSpace, 0, sal_False );
}
else
{
@@ -4946,13 +4950,13 @@ void SwHTMLParser::InsertSpacer()
}
}
-USHORT SwHTMLParser::ToTwips( USHORT nPixel ) const
+sal_uInt16 SwHTMLParser::ToTwips( sal_uInt16 nPixel ) const
{
if( nPixel && Application::GetDefaultDevice() )
{
long nTwips = Application::GetDefaultDevice()->PixelToLogic(
Size( nPixel, nPixel ), MapMode( MAP_TWIP ) ).Width();
- return nTwips <= USHRT_MAX ? (USHORT)nTwips : USHRT_MAX;
+ return nTwips <= USHRT_MAX ? (sal_uInt16)nTwips : USHRT_MAX;
}
else
return nPixel;
@@ -4990,7 +4994,7 @@ void SwHTMLParser::InsertIDOption()
{
String aId;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
if( HTML_O_ID==pOption->GetToken() )
@@ -5027,12 +5031,12 @@ void SwHTMLParser::InsertLineBreak()
// harter Zeilenumbruch eingefuegt
String aId, aStyle, aClass; // die ID der Bookmark
- BOOL bClearLeft = FALSE, bClearRight = FALSE;
- BOOL bCleared = FALSE; // wurde ein CLEAR ausgefuehrt?
+ sal_Bool bClearLeft = sal_False, bClearRight = sal_False;
+ sal_Bool bCleared = sal_False; // wurde ein CLEAR ausgefuehrt?
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5042,13 +5046,13 @@ void SwHTMLParser::InsertLineBreak()
const String &aClear = pOption->GetString();
if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_all ) )
{
- bClearLeft = TRUE;
- bClearRight = TRUE;
+ bClearLeft = sal_True;
+ bClearRight = sal_True;
}
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_left ) )
- bClearLeft = TRUE;
+ bClearLeft = sal_True;
else if( aClear.EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_AL_right ) )
- bClearRight = TRUE;
+ bClearRight = sal_True;
}
break;
case HTML_O_ID:
@@ -5072,7 +5076,7 @@ void SwHTMLParser::InsertLineBreak()
{
const SwSpzFrmFmts& rFrmFmtTbl = *pDoc->GetSpzFrmFmts();
- for( USHORT i=0; i<rFrmFmtTbl.Count(); i++ )
+ for( sal_uInt16 i=0; i<rFrmFmtTbl.Count(); i++ )
{
SwFrmFmt *const pFmt = rFrmFmtTbl[i];
SwFmtAnchor const*const pAnchor = &pFmt->GetAnchor();
@@ -5105,9 +5109,9 @@ void SwHTMLParser::InsertLineBreak()
{
SwFmtSurround aSurround( eSurround );
if( SURROUND_NONE != eSurround )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
pFmt->SetFmtAttr( aSurround );
- bCleared = TRUE;
+ bCleared = sal_True;
}
} // Anker ist nicht im Node
} // Schleife ueber Fly-Frames
@@ -5116,7 +5120,7 @@ void SwHTMLParser::InsertLineBreak()
// Styles parsen
SvxFmtBreakItem aBreakItem( SVX_BREAK_NONE, RES_BREAK );
- BOOL bBreakItem = FALSE;
+ sal_Bool bBreakItem = sal_False;
if( HasStyleOptions( aStyle, aId, aClass ) )
{
SfxItemSet aItemSet( pDoc->GetAttrPool(), pCSS1Parser->GetWhichMap() );
@@ -5127,7 +5131,7 @@ void SwHTMLParser::InsertLineBreak()
if( pCSS1Parser->SetFmtBreak( aItemSet, aPropInfo ) )
{
aBreakItem = (const SvxFmtBreakItem &)aItemSet.Get( RES_BREAK );
- bBreakItem = TRUE;
+ bBreakItem = sal_True;
}
if( aPropInfo.aId.Len() )
InsertBookmark( aPropInfo.aId );
@@ -5137,7 +5141,7 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_AFTER==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
if( !bCleared && !bBreakItem )
@@ -5159,27 +5163,27 @@ void SwHTMLParser::InsertLineBreak()
if( bBreakItem && SVX_BREAK_PAGE_BEFORE==aBreakItem.GetBreak() )
{
NewAttr( &aAttrTab.pBreak, aBreakItem );
- EndAttr( aAttrTab.pBreak, 0, FALSE );
+ EndAttr( aAttrTab.pBreak, 0, sal_False );
}
}
void SwHTMLParser::InsertHorzRule()
{
- USHORT nSize = 0;
- USHORT nWidth = 0;
+ sal_uInt16 nSize = 0;
+ sal_uInt16 nWidth = 0;
SvxAdjust eAdjust = SVX_ADJUST_END;
- BOOL bPrcWidth = FALSE;
- BOOL bNoShade = FALSE;
- BOOL bColor = FALSE;
+ sal_Bool bPrcWidth = sal_False;
+ sal_Bool bNoShade = sal_False;
+ sal_Bool bColor = sal_False;
Color aColor;
String aId;
// dann holen wir mal die Optionen
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[--i];
switch( pOption->GetToken() )
@@ -5188,16 +5192,16 @@ void SwHTMLParser::InsertHorzRule()
aId = pOption->GetString();
break;
case HTML_O_SIZE:
- nSize = (USHORT)pOption->GetNumber();
+ nSize = (sal_uInt16)pOption->GetNumber();
break;
case HTML_O_WIDTH:
bPrcWidth = (pOption->GetString().Search('%') != STRING_NOTFOUND);
- nWidth = (USHORT)pOption->GetNumber();
+ nWidth = (sal_uInt16)pOption->GetNumber();
if( bPrcWidth && nWidth>=100 )
{
// 100%-Linien sind der default-Fall (keine Attrs neotig)
nWidth = 0;
- bPrcWidth = FALSE;
+ bPrcWidth = sal_False;
}
break;
case HTML_O_ALIGN:
@@ -5205,11 +5209,11 @@ void SwHTMLParser::InsertHorzRule()
(SvxAdjust)pOption->GetEnum( aHTMLPAlignTable, static_cast< sal_uInt16 >(eAdjust) );
break;
case HTML_O_NOSHADE:
- bNoShade = TRUE;
+ bNoShade = sal_True;
break;
case HTML_O_COLOR:
pOption->GetColor( aColor );
- bColor = TRUE;
+ bColor = sal_True;
break;
}
}
@@ -5246,7 +5250,7 @@ void SwHTMLParser::InsertHorzRule()
long nPWidth = 0;
long nPHeight = (long)nSize;
SvxCSS1Parser::PixelToTwip( nPWidth, nPHeight );
- SvxCSS1Parser::SetBorderWidth( aBorderLine, (USHORT)nPHeight,
+ SvxCSS1Parser::SetBorderWidth( aBorderLine, (sal_uInt16)nPHeight,
!bNoShade );
}
else if( bNoShade )
@@ -5276,8 +5280,8 @@ void SwHTMLParser::InsertHorzRule()
{
// Laenge und Ausrichtung der Linie ueber Absatz-Einzuege "tuerken"
long nBrowseWidth = GetCurrentBrowseWidth();
- nWidth = bPrcWidth ? (USHORT)((nWidth*nBrowseWidth) / 100)
- : ToTwips( (USHORT)nBrowseWidth );
+ nWidth = bPrcWidth ? (sal_uInt16)((nWidth*nBrowseWidth) / 100)
+ : ToTwips( (sal_uInt16)nBrowseWidth );
if( nWidth < MINLAY )
nWidth = MINLAY;
@@ -5290,16 +5294,16 @@ void SwHTMLParser::InsertHorzRule()
switch( eAdjust )
{
case SVX_ADJUST_RIGHT:
- aLRItem.SetTxtLeft( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
break;
case SVX_ADJUST_LEFT:
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
case SVX_ADJUST_CENTER:
default:
nDist /= 2;
- aLRItem.SetTxtLeft( (USHORT)nDist );
- aLRItem.SetRight( (USHORT)nDist );
+ aLRItem.SetTxtLeft( (sal_uInt16)nDist );
+ aLRItem.SetRight( (sal_uInt16)nDist );
break;
}
@@ -5327,21 +5331,21 @@ void SwHTMLParser::InsertHorzRule()
void SwHTMLParser::ParseMoreMetaOptions()
{
String aName, aContent;
- BOOL bHTTPEquiv = FALSE;
+ sal_Bool bHTTPEquiv = sal_False;
const HTMLOptions *pHTMLOptions = GetOptions();
- for( USHORT i = pHTMLOptions->Count(); i; )
+ for( sal_uInt16 i = pHTMLOptions->Count(); i; )
{
const HTMLOption *pOption = (*pHTMLOptions)[ --i ];
switch( pOption->GetToken() )
{
case HTML_O_NAME:
aName = pOption->GetString();
- bHTTPEquiv = FALSE;
+ bHTTPEquiv = sal_False;
break;
case HTML_O_HTTPEQUIV:
aName = pOption->GetString();
- bHTTPEquiv = TRUE;
+ bHTTPEquiv = sal_True;
break;
case HTML_O_CONTENT:
aContent = pOption->GetString();
@@ -5405,9 +5409,9 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
nEndPara( rPos.nNode ),
nSttCntnt( rPos.nContent.GetIndex() ),
nEndCntnt(rPos.nContent.GetIndex() ),
- bInsAtStart( TRUE ),
- bLikePara( FALSE ),
- bValid( TRUE ),
+ bInsAtStart( sal_True ),
+ bLikePara( sal_False ),
+ bValid( sal_True ),
nCount( 1 ),
pNext( 0 ),
pPrev( 0 ),
@@ -5417,7 +5421,7 @@ _HTMLAttr::_HTMLAttr( const SwPosition& rPos, const SfxPoolItem& rItem,
}
_HTMLAttr::_HTMLAttr( const _HTMLAttr &rAttr, const SwNodeIndex &rEndPara,
- USHORT nEndCnt, _HTMLAttr **ppHd ) :
+ sal_uInt16 nEndCnt, _HTMLAttr **ppHd ) :
nSttPara( rAttr.nSttPara ),
nEndPara( rEndPara ),
nSttCntnt( rAttr.nSttCntnt ),
@@ -5438,7 +5442,7 @@ _HTMLAttr::~_HTMLAttr()
delete pItem;
}
-_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
+_HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, sal_uInt16 nEndCnt ) const
{
// das Attribut mit der alten Start-Position neu anlegen
_HTMLAttr *pNew = new _HTMLAttr( *this, rEndPara, nEndCnt, ppHead );
@@ -5449,7 +5453,7 @@ _HTMLAttr *_HTMLAttr::Clone( const SwNodeIndex& rEndPara, USHORT nEndCnt ) const
return pNew;
}
-void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, USHORT nSttCnt,
+void _HTMLAttr::Reset( const SwNodeIndex& rSttPara, sal_uInt16 nSttCnt,
_HTMLAttr **ppHd )
{
// den Anfang (und das Ende) neu setzen
diff --git a/sw/source/filter/html/swhtml.hxx b/sw/source/filter/html/swhtml.hxx
index 0dfb9ee63328..19ed5fe9c5de 100644
--- a/sw/source/filter/html/swhtml.hxx
+++ b/sw/source/filter/html/swhtml.hxx
@@ -407,8 +407,8 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
_HTMLAttrs aParaAttrs; // vorlauefige Absatz-Attribute
_HTMLAttrTable aAttrTab; // "offene" Attribute
_HTMLAttrContexts aContexts;// der aktuelle Attribut/Token-Kontext
- SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, deren Anker verschoben wird
- SvXub_StrLens aMoveFlyCnts;// und deren Content-Positionen
+ SwHTMLFrmFmts aMoveFlyFrms;// Fly-Frames, the anchor is moved
+ SvXub_StrLens aMoveFlyCnts;// and the Content-Positions
SwApplet_Impl *pAppletImpl; // das aktuelle Applet
@@ -434,7 +434,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
sal_uInt32 aFontHeights[7]; // die Font-Hoehen 1-7
sal_uInt32 nScriptStartLineNr; // Zeilennummer eines Script-Blocks
- ULONG nEventId;
+ sal_uLong nEventId;
sal_uInt16 nBaseFontStMin; //
sal_uInt16 nFontStMin; //
@@ -600,7 +600,7 @@ class SwHTMLParser : public SfxHTMLParser, public SwClient
void GetULSpaceFromContext( sal_uInt16 &rUpper, sal_uInt16 &rLower ) const;
- void MovePageDescAttrs( SwNode *pSrcNd, ULONG nDestIdx, sal_Bool bFmtBreak );
+ void MovePageDescAttrs( SwNode *pSrcNd, sal_uLong nDestIdx, sal_Bool bFmtBreak );
// Behandlung von Tags auf Absatz-Ebene
diff --git a/sw/source/filter/html/wrthtml.cxx b/sw/source/filter/html/wrthtml.cxx
index a7abc69664fa..f8adde26bbc3 100644
--- a/sw/source/filter/html/wrthtml.cxx
+++ b/sw/source/filter/html/wrthtml.cxx
@@ -124,7 +124,7 @@ SwHTMLWriter::~SwHTMLWriter()
delete pNumRuleInfo;
}
-ULONG SwHTMLWriter::WriteStream()
+sal_uLong SwHTMLWriter::WriteStream()
{
// neue Konfiguration setzen
SvxHtmlOptions* pHtmlOptions = SvxHtmlOptions::Get();
@@ -486,7 +486,7 @@ const SwFmtCol *lcl_html_GetFmtCol( const SwHTMLWriter& rHTMLWrt,
return pCol;
}
-sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwSectionNode *pSectNd =
@@ -502,7 +502,7 @@ sal_Bool lcl_html_IsMultiColStart( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
return bRet;
}
-sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, ULONG nIndex )
+sal_Bool lcl_html_IsMultiColEnd( const SwHTMLWriter& rHTMLWrt, sal_uLong nIndex )
{
sal_Bool bRet = sal_False;
const SwEndNode *pEndNd = rHTMLWrt.pDoc->GetNodes()[nIndex]->GetEndNode();
@@ -865,8 +865,8 @@ static void OutBodyColor( const sal_Char *pTag, const SwFmt *pFmt,
sal_uInt16 SwHTMLWriter::OutHeaderAttrs()
{
- ULONG nIdx = pCurPam->GetPoint()->nNode.GetIndex();
- ULONG nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
+ sal_uLong nIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nEndIdx = pCurPam->GetMark()->nNode.GetIndex();
SwTxtNode *pTxtNd = 0;
while( nIdx<=nEndIdx &&
@@ -948,7 +948,7 @@ const SwPageDesc *SwHTMLWriter::MakeHeader( sal_uInt16 &rHeaderAttrs )
// In Nicht-HTML-Dokumenten wird die erste gesetzte Seitenvorlage
// exportiert und wenn keine gesetzt ist die Standard-Vorlage
- ULONG nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pCurPam->GetPoint()->nNode.GetIndex();
while( nNodeIdx < pDoc->GetNodes().Count() )
{
@@ -1325,8 +1325,8 @@ sal_uInt16 SwHTMLWriter::GetHTMLFontSize( sal_uInt32 nHeight ) const
// Struktur speichert die aktuellen Daten des Writers zwischen, um
// einen anderen Dokument-Teil auszugeben, wie z.B. Header/Footer
-HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, ULONG nStt,
- ULONG nEnd, sal_Bool bSaveNum,
+HTMLSaveData::HTMLSaveData( SwHTMLWriter& rWriter, sal_uLong nStt,
+ sal_uLong nEnd, sal_Bool bSaveNum,
const SwFrmFmt *pFrmFmt ) :
rWrt( rWriter ),
pOldPam( rWrt.pCurPam ),
diff --git a/sw/source/filter/html/wrthtml.hxx b/sw/source/filter/html/wrthtml.hxx
index 761ca1894922..61b7e99a9bf3 100644
--- a/sw/source/filter/html/wrthtml.hxx
+++ b/sw/source/filter/html/wrthtml.hxx
@@ -216,7 +216,7 @@ class SwHTMLWriter : public Writer
void CollectLinkTargets();
protected:
- ULONG WriteStream();
+ sal_uLong WriteStream();
public:
#if defined(UNX)
@@ -348,7 +348,7 @@ public:
void OutHyperlinkHRefValue( const String& rURL );
// gebe die evt. an der akt. Position stehenden FlyFrame aus.
- sal_Bool OutFlyFrm( ULONG nNdIdx, xub_StrLen nCntntIdx,
+ sal_Bool OutFlyFrm( sal_uLong nNdIdx, xub_StrLen nCntntIdx,
sal_uInt8 nPos, HTMLOutContext *pContext = 0 );
void OutFrmFmt( sal_uInt8 nType, const SwFrmFmt& rFmt,
const SdrObject *pSdrObj );
@@ -541,7 +541,7 @@ struct HTMLSaveData
sal_Bool bOldOutFlyFrame : 1;
const SwFlyFrmFmt* pOldFlyFmt;
- HTMLSaveData( SwHTMLWriter&, ULONG nStt, ULONG nEnd,
+ HTMLSaveData( SwHTMLWriter&, sal_uLong nStt, sal_uLong nEnd,
sal_Bool bSaveNum=sal_True,
const SwFrmFmt *pFrmFmt=0 );
~HTMLSaveData();
diff --git a/sw/source/filter/inc/fltbase.hxx b/sw/source/filter/inc/fltbase.hxx
index 6665ebd7a449..c53613c983e6 100644
--- a/sw/source/filter/inc/fltbase.hxx
+++ b/sw/source/filter/inc/fltbase.hxx
@@ -36,23 +36,23 @@ class SwFilterBase
protected:
SvStream *pIn;
sal_Char *pReadBuff; // Groessenangabe
- INT32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
+ sal_Int32 nBytesLeft; // noch zu lesende Bytes des aktuelle Records
CharSet eQuellChar; // Quell-Zeichensatz (interner Zeichensatz)
// CharSet eZielChar; // Ziel-Zeichensatz
- USHORT nTab; // z.Zt. bearbeitete Tabelle
- USHORT nReadBuffSize;// temporaerer Lesepuffer mit
+ sal_uInt16 nTab; // z.Zt. bearbeitete Tabelle
+ sal_uInt16 nReadBuffSize;// temporaerer Lesepuffer mit
// ----------------------------------------------------------
inline void ReadChar( char &rC );
- inline void ReadByte( BYTE &rN );
+ inline void ReadByte( sal_uInt8 &rN );
inline void Read( short &rN );
inline void ReadUnicode( sal_Unicode &rU );
- inline void Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN );
- inline void Read( USHORT &rN1, USHORT &rN2 );
- inline void Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 );
+ inline void Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2 );
+ inline void Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 );
inline void Read( double &rF );
void Read( String &rS ); // liest 0-terminierten C-String!
inline void ClearBytesLeft( void );
@@ -65,7 +65,7 @@ inline void SwFilterBase::ReadChar( char &rC )
nBytesLeft--;
}
-inline void SwFilterBase::ReadByte( BYTE &rN )
+inline void SwFilterBase::ReadByte( sal_uInt8 &rN )
{
*pIn >> rN;
nBytesLeft--;
@@ -87,25 +87,25 @@ inline void SwFilterBase::Read( short &rN )
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( BYTE &rN0, USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt8 &rN0, sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN0 >> rN1 >> rN2;
nBytesLeft -= 5;
}
-inline void SwFilterBase::Read( USHORT &rN )
+inline void SwFilterBase::Read( sal_uInt16 &rN )
{
*pIn >> rN;
nBytesLeft -= 2;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2 )
{
*pIn >> rN1 >> rN2;
nBytesLeft -= 4;
}
-inline void SwFilterBase::Read( USHORT &rN1, USHORT &rN2, USHORT &rN3, USHORT &rN4 )
+inline void SwFilterBase::Read( sal_uInt16 &rN1, sal_uInt16 &rN2, sal_uInt16 &rN3, sal_uInt16 &rN4 )
{
*pIn >> rN1 >> rN2 >> rN3 >> rN4;
nBytesLeft -= 8;
diff --git a/sw/source/filter/inc/fltglbls.hxx b/sw/source/filter/inc/fltglbls.hxx
index 97fd88e6f7a9..773c47b27fc4 100644
--- a/sw/source/filter/inc/fltglbls.hxx
+++ b/sw/source/filter/inc/fltglbls.hxx
@@ -55,12 +55,12 @@ class FilterGlobals
{
protected:
SvPtrarr aTblFmts;
- USHORT nColStart;
- USHORT nColEnd;
- USHORT nRowStart;
- USHORT nRowEnd;
- USHORT nAnzCols;
- USHORT nAnzRows;
+ sal_uInt16 nColStart;
+ sal_uInt16 nColEnd;
+ sal_uInt16 nRowStart;
+ sal_uInt16 nRowEnd;
+ sal_uInt16 nAnzCols;
+ sal_uInt16 nAnzRows;
public:
FilterGlobals( SwDoc& rDoc, const SwPaM& rPam );
@@ -72,41 +72,41 @@ public:
SvNumberFormatter *pNumFormatter;
LanguageType eDefLanguage;
- ULONG nStandard;
- ULONG nDefFormat; // = 0xFFFFFFFF
+ sal_uLong nStandard;
+ sal_uLong nDefFormat; // = 0xFFFFFFFF
- void SetRange( USHORT nCS, USHORT nCE, USHORT nRS, USHORT nRE );
+ void SetRange( sal_uInt16 nCS, sal_uInt16 nCE, sal_uInt16 nRS, sal_uInt16 nRE );
- BOOL IsInColRange( USHORT nCol )
+ sal_Bool IsInColRange( sal_uInt16 nCol )
{ return ( nCol >= nColStart && nCol <= nColEnd ); }
- BOOL IsInRowRange( USHORT nRow )
+ sal_Bool IsInRowRange( sal_uInt16 nRow )
{ return ( nRow >= nRowStart && nRow <= nRowEnd ); }
- BOOL IsInRange( USHORT nCol, USHORT nRow )
+ sal_Bool IsInRange( sal_uInt16 nCol, sal_uInt16 nRow )
{ return IsInRowRange(nRow) && IsInColRange(nCol); }
- void NormalizeCol( USHORT &rCol ) { rCol -= nColStart; }
- void NormalizeRow( USHORT &rRow ) { rRow -= nRowStart; }
- void Normalize( USHORT &rCol, USHORT &rRow )
+ void NormalizeCol( sal_uInt16 &rCol ) { rCol -= nColStart; }
+ void NormalizeRow( sal_uInt16 &rRow ) { rRow -= nRowStart; }
+ void Normalize( sal_uInt16 &rCol, sal_uInt16 &rRow )
{ NormalizeCol( rCol ); NormalizeRow( rRow ); }
- USHORT AnzCols() const { return nAnzCols; }
- USHORT AnzRows() const { return nAnzRows; }
+ sal_uInt16 AnzCols() const { return nAnzCols; }
+ sal_uInt16 AnzRows() const { return nAnzRows; }
- BOOL ColRangeLimitter( USHORT &rCS, USHORT &rCE );
+ sal_Bool ColRangeLimitter( sal_uInt16 &rCS, sal_uInt16 &rCE );
- void InsertText( USHORT nCol, USHORT nRow, const String& rStr );
+ void InsertText( sal_uInt16 nCol, sal_uInt16 nRow, const String& rStr );
void CreateTable();
void InsertAttr( const SfxPoolItem& rItem );
- inline void ColLimitter( USHORT &rCol );
- inline void RowLimitter( USHORT &rRow );
+ inline void ColLimitter( sal_uInt16 &rCol );
+ inline void RowLimitter( sal_uInt16 &rRow );
};
-inline void FilterGlobals::ColLimitter( USHORT &rCol )
+inline void FilterGlobals::ColLimitter( sal_uInt16 &rCol )
{
if( rCol < nColStart )
rCol = nColStart;
@@ -114,7 +114,7 @@ inline void FilterGlobals::ColLimitter( USHORT &rCol )
rCol = nColEnd;
}
-inline void FilterGlobals::RowLimitter( USHORT &rRow )
+inline void FilterGlobals::RowLimitter( sal_uInt16 &rRow )
{
if( rRow < nRowStart )
rRow = nRowStart;
diff --git a/sw/source/filter/inc/fltini.hxx b/sw/source/filter/inc/fltini.hxx
index d512ba18a866..5b546c031895 100644
--- a/sw/source/filter/inc/fltini.hxx
+++ b/sw/source/filter/inc/fltini.hxx
@@ -43,7 +43,7 @@ class HTMLReader: public Reader
{
// wir wollen die Streams / Storages nicht geoeffnet haben
virtual int SetStrmStgPtr();
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
virtual String GetTemplateName() const;
public:
HTMLReader();
@@ -51,12 +51,12 @@ public:
class WW1Reader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
};
class XMLReader : public Reader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
virtual int GetReaderType();
@@ -64,7 +64,7 @@ public:
// read the sections of the document, which is equal to the medium.
// returns the count of it
- virtual USHORT GetSectionList( SfxMedium& rMedium,
+ virtual sal_uInt16 GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const;
};
@@ -81,12 +81,12 @@ void GetWW8Writer( const String&, const String&, WriterRef& );
class SW_DLLPUBLIC SwRelNumRuleSpaces
{
SwNumRuleTbl* pNumRuleTbl; // Liste aller benannten NumRules
- BOOL bNewDoc;
+ sal_Bool bNewDoc;
void SetNumLSpace( SwTxtNode& rNd, const SwNumRule& rRule );
public:
- SwRelNumRuleSpaces( SwDoc& rDoc, BOOL bNewDoc );
+ SwRelNumRuleSpaces( SwDoc& rDoc, sal_Bool bNewDoc );
~SwRelNumRuleSpaces();
void SetNumRelSpaces( SwDoc& rDoc );
diff --git a/sw/source/filter/inc/fltshell.hxx b/sw/source/filter/inc/fltshell.hxx
index 775febaa3b81..61208b30c445 100644
--- a/sw/source/filter/inc/fltshell.hxx
+++ b/sw/source/filter/inc/fltshell.hxx
@@ -53,13 +53,13 @@ class SwPaM;
using namespace com::sun::star;
-inline void SwFltClearFlag(ULONG& rFieldFlags, int no)
+inline void SwFltClearFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags &= ~(1L << no); }
-inline void SwFltSetFlag(ULONG& rFieldFlags, int no)
+inline void SwFltSetFlag(sal_uLong& rFieldFlags, int no)
{ rFieldFlags |= 1L << no; }
-inline BOOL SwFltGetFlag(ULONG nFieldFlags, int no)
+inline sal_Bool SwFltGetFlag(sal_uLong nFieldFlags, int no)
{ return (nFieldFlags & (1L << no)) != 0; }
// Stack-Eintrag fuer die Attribute Es werden immer Pointer auf neue Attribute uebergeben.
@@ -73,10 +73,10 @@ public:
xub_StrLen nMkCntnt;// Nachbildung von Mark()
xub_StrLen nPtCntnt;// Nachbildung von GetPoint()
- BOOL bOld; // to mark Attributes *before* skipping field results
- BOOL bLocked;
- BOOL bCopied;
- BOOL bConsumedByField;
+ sal_Bool bOld; // to mark Attributes *before* skipping field results
+ sal_Bool bLocked;
+ sal_Bool bCopied;
+ sal_Bool bConsumedByField;
SW_DLLPUBLIC SwFltStackEntry(const SwPosition & rStartPos, SfxPoolItem* pHt );
SW_DLLPUBLIC SwFltStackEntry(const SwFltStackEntry& rEntry);
@@ -84,7 +84,7 @@ public:
void SetStartPos(const SwPosition & rStartPos);
SW_DLLPUBLIC void SetEndPos( const SwPosition & rEndPos);
- SW_DLLPUBLIC BOOL MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck );
+ SW_DLLPUBLIC sal_Bool MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck );
};
class SW_DLLPUBLIC SwFltControlStack
@@ -94,12 +94,12 @@ class SW_DLLPUBLIC SwFltControlStack
Entries maEntries;
friend class SwFltShell;
- ULONG nFieldFlags;
+ sal_uLong nFieldFlags;
KeyCode aEmptyKeyCode; // fuer Bookmarks
protected:
SwDoc* pDoc;
- BOOL bIsEndStack;
+ sal_Bool bIsEndStack;
void MoveAttrs( const SwPosition& rPos );
virtual void SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry* pEntry);
@@ -118,20 +118,20 @@ public:
DONT_HARD_PROTECT
};
- SwFltControlStack(SwDoc* pDo, ULONG nFieldFl);
+ SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl);
virtual ~SwFltControlStack();
- BOOL IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
+ sal_Bool IsFlagSet(Flags no) const { return ::SwFltGetFlag(nFieldFlags, no);}
void NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr );
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand = LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand = LONG_MAX, sal_Bool consumedByField=sal_False);
- void StealAttr(const SwPosition* pPos, USHORT nAttrId = 0);
+ void StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId = 0);
void MarkAllAttrsOld();
void KillUnlockedAttrs(const SwPosition& pPos);
- SfxPoolItem* GetFmtStackAttr(USHORT nWhich, USHORT * pPos = 0);
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
+ SfxPoolItem* GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos = 0);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
void Delete(const SwPaM &rPam);
Entries::size_type Count() { return maEntries.size(); }
@@ -178,14 +178,14 @@ public:
DateTime aStampPrev;
RedlineType_t eType;
RedlineType_t eTypePrev;
- USHORT nAutorNo;
- USHORT nAutorNoPrev;
+ sal_uInt16 nAutorNo;
+ sal_uInt16 nAutorNoPrev;
SwFltRedline(RedlineType_t eType_,
- USHORT nAutorNo_,
+ sal_uInt16 nAutorNo_,
const DateTime& rStamp_,
RedlineType_t eTypePrev_ = nsRedlineType_t::REDLINE_INSERT,
- USHORT nAutorNoPrev_ = USHRT_MAX,
+ sal_uInt16 nAutorNoPrev_ = USHRT_MAX,
const DateTime* pStampPrev_ = 0)
: SfxPoolItem(RES_FLTR_REDLINE), aStamp(rStamp_), eType(eType_),
eTypePrev(eTypePrev_), nAutorNo(nAutorNo_), nAutorNoPrev(nAutorNoPrev_)
@@ -214,44 +214,44 @@ class SW_DLLPUBLIC SwFltBookmark : public SfxPoolItem
long nHandle;
String aName;
String aVal;
- BOOL bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
- BOOL bRef;
- BOOL bPgRef;
+ sal_Bool bOnlyRef; // "FRAGE"-Feld, Ref/Seitenrf oder nichts
+ sal_Bool bRef;
+ sal_Bool bPgRef;
public:
SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR );
+ long nHand, sal_Bool bOnlyR );
SwFltBookmark( const SwFltBookmark& );
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
const String& GetName() const { return aName; }
const String& GetValSys() const { return aVal; }
- BOOL IsOnlyRef() const { return bOnlyRef; }
- BOOL IsRef() const { return bRef; }
- void SetRef(BOOL b = TRUE) { bRef = b; }
- BOOL IsPgRef() const { return bPgRef; }
- void SetPgRef(BOOL b = TRUE) { bPgRef = b; }
+ sal_Bool IsOnlyRef() const { return bOnlyRef; }
+ sal_Bool IsRef() const { return bRef; }
+ void SetRef(sal_Bool b = sal_True) { bRef = b; }
+ sal_Bool IsPgRef() const { return bPgRef; }
+ void SetPgRef(sal_Bool b = sal_True) { bPgRef = b; }
long GetHandle() const { return nHandle; }
};
class SW_DLLPUBLIC SwFltTOX : public SfxPoolItem
{
SwTOXBase* pTOXBase;
- USHORT nCols;
- BOOL bHadBreakItem; // there was a break item BEFORE insertion of the TOX
- BOOL bHadPageDescItem; // ...
+ sal_uInt16 nCols;
+ sal_Bool bHadBreakItem; // there was a break item BEFORE insertion of the TOX
+ sal_Bool bHadPageDescItem; // ...
public:
- SwFltTOX(SwTOXBase* pBase, USHORT _nCols = 0);
+ SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols = 0);
SwFltTOX(const SwFltTOX&);
// "pure virtual Methoden" vom SfxPoolItem
virtual int operator==(const SfxPoolItem&) const;
virtual SfxPoolItem* Clone(SfxItemPool* = 0) const;
SwTOXBase* GetBase() { return pTOXBase; }
- USHORT GetCols() const { return nCols; }
- void SetHadBreakItem( BOOL bVal ) { bHadBreakItem = bVal; }
- void SetHadPageDescItem( BOOL bVal ) { bHadPageDescItem = bVal; }
- BOOL HadBreakItem() const { return bHadBreakItem; }
- BOOL HadPageDescItem() const { return bHadPageDescItem; }
+ sal_uInt16 GetCols() const { return nCols; }
+ void SetHadBreakItem( sal_Bool bVal ) { bHadBreakItem = bVal; }
+ void SetHadPageDescItem( sal_Bool bVal ) { bHadPageDescItem = bVal; }
+ sal_Bool HadBreakItem() const { return bHadBreakItem; }
+ sal_Bool HadPageDescItem() const { return bHadPageDescItem; }
};
class SwFltSection : public SfxPoolItem
@@ -272,10 +272,10 @@ public:
class SwFltEndStack : public SwFltControlStack
{
public:
- SwFltEndStack(SwDoc* pDo, ULONG nFieldFl)
+ SwFltEndStack(SwDoc* pDo, sal_uLong nFieldFl)
:SwFltControlStack(pDo, nFieldFl)
{
- bIsEndStack = TRUE;
+ bIsEndStack = sal_True;
}
};
@@ -298,7 +298,7 @@ class SwFltOutBase
SwDoc& rDoc;
protected:
RndStdIds eFlyAnchor;
- BOOL bFlyAbsPos;
+ sal_Bool bFlyAbsPos;
SwDoc& GetDoc() { return rDoc; }
SfxItemSet* NewFlyDefaults();
@@ -307,26 +307,26 @@ protected:
public:
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem) = 0;
- virtual const SfxPoolItem& GetAttr(USHORT nWhich) = 0;
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich) = 0;
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich) = 0;
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich) = 0;
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
- virtual BOOL IsInFly() = 0;
+ virtual sal_Bool IsInFly() = 0;
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr) = 0;
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich) = 0;
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich) = 0;
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void SetFlyAnchor( RndStdIds eAnchor );
virtual void EndFly();
@@ -343,48 +343,48 @@ class SwFltOutDoc : public SwFltOutBase
SwPosition* pTabSavedPos; // set when in table
SwPosition* pFlySavedPos; // set when in fly
SwTwips nTableWidth;
- USHORT usTableX;
- USHORT usTableY;
- BOOL bReadNoTbl; // Keine Tabellen
+ sal_uInt16 usTableX;
+ sal_uInt16 usTableY;
+ sal_Bool bReadNoTbl; // Keine Tabellen
- SwTableBox* GetBox(USHORT ny, USHORT nx = USHRT_MAX);
- BOOL SeekCell( short nRow, short nCol, BOOL bPam );
+ SwTableBox* GetBox(sal_uInt16 ny, sal_uInt16 nx = USHRT_MAX);
+ sal_Bool SeekCell( short nRow, short nCol, sal_Bool bPam );
void SplitTable();
public:
SwFltOutDoc(SwDoc& rDocu, SwPaM* pP, SwFltControlStack& rStk,
SwFltEndStack& rEStk)
: SwFltOutBase(rDocu), rStack(rStk), rEndStack(rEStk), pPaM(pP),
pFly(0), pTable(0), pTabSavedPos(0), pFlySavedPos(0),
- nTableWidth(0), bReadNoTbl(FALSE)
+ nTableWidth(0), bReadNoTbl(sal_False)
{}
- void SetReadNoTable() { bReadNoTbl = TRUE; }
- BOOL IsTableWidthSet() const { return 0 != nTableWidth; }
+ void SetReadNoTable() { bReadNoTbl = sal_True; }
+ sal_Bool IsTableWidthSet() const { return 0 != nTableWidth; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- BOOL IsInTable();
- virtual const SfxPoolItem& GetCellAttr(USHORT nWhich);
- virtual BOOL BeginTable();
+ sal_Bool IsInTable();
+ virtual const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginTable();
virtual void NextTableCell();
virtual void NextTableRow();
virtual void SetTableWidth(SwTwips nW);
virtual void SetTableOrient(sal_Int16 eOri);
- virtual void SetCellWidth(SwTwips nWidth, USHORT nCell);
+ virtual void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell);
virtual void SetCellHeight(SwTwips nH);
- virtual void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell);
- virtual void SetCellSpace(USHORT nSp);
- virtual void DeleteCell(USHORT nCell);
+ virtual void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell);
+ virtual void SetCellSpace(sal_uInt16 nSp);
+ virtual void DeleteCell(sal_uInt16 nCell);
virtual void EndTable();
SwFrmFmt* MakeFly( RndStdIds eAnchor, SfxItemSet* pSet );
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
virtual void EndFly();
};
@@ -393,7 +393,7 @@ class SwFltFormatCollection : public SwFltOutBase
{
SwTxtFmtColl* pColl;
SfxItemSet* pFlyAttrs; // Simulation der Flys in Styles
- BOOL bHasFly;
+ sal_Bool bHasFly;
public:
SwFltFormatCollection(SwDoc&, RES_POOL_COLLFMT_TYPE nType);
SwFltFormatCollection(SwDoc&, const String& rName );
@@ -404,26 +404,26 @@ public:
// #i73790# - method renamed
pColl->ResetAllFmtAttr();
// <--
- pColl->SetAuto(FALSE); // nach Empfehlung JP
+ pColl->SetAuto(sal_False); // nach Empfehlung JP
}
void Derived(SwTxtFmtColl* pBase)
{ pColl->SetDerivedFrom(pBase); }
// SwTxtFmtColl* Search(String, CharSet eSrc);
SwTxtFmtColl* GetColl() { return pColl; }
- void SetHasFly() { bHasFly = TRUE; }
+ void SetHasFly() { bHasFly = sal_True; }
SfxItemSet* GetpFlyAttrs() { return pFlyAttrs; }
virtual SwFltOutBase& operator << (const SfxPoolItem& rItem);
- virtual const SfxPoolItem& GetAttr(USHORT nWhich);
- virtual const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
+ virtual const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ virtual const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
- virtual BOOL IsInFly();
+ virtual sal_Bool IsInFly();
virtual void SetFlyFrmAttr(const SfxPoolItem& rAttr);
- virtual const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- virtual BOOL BeginFly( RndStdIds eAnchor, BOOL bAbsolutePos,
+ virtual const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ virtual sal_Bool BeginFly( RndStdIds eAnchor, sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs = 0 );
- BOOL BeginStyleFly( SwFltOutDoc* pOutDoc );
+ sal_Bool BeginStyleFly( SwFltOutDoc* pOutDoc );
virtual void EndFly();
};
@@ -462,22 +462,22 @@ class SwFltShell
} eSubMode;
// Fly items:
- USHORT nAktStyle; // zur Indizierung pStyleFlyTable
+ sal_uInt16 nAktStyle; // zur Indizierung pStyleFlyTable
//
SwFltControlStack aStack;
SwFltEndStack aEndStack;
SwPaM* pPaM;
//
String sBaseURL;
- USHORT nPageDescOffset; // fuers update der pagedescs
+ sal_uInt16 nPageDescOffset; // fuers update der pagedescs
CharSet eSrcCharSet; // charset der quelle
friend class SwFltControlStack;
- BOOL bNewDoc;
- BOOL bStdPD;
- BOOL bProtect;
+ sal_Bool bNewDoc;
+ sal_Bool bStdPD;
+ sal_Bool bProtect;
public:
- SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, BOOL bNew, ULONG = 0);
+ SwFltShell(SwDoc* , SwPaM& , const String& rBaseURL, sal_Bool bNew, sal_uLong = 0);
~SwFltShell();
SwDoc& GetDoc() { return *aStack.pDoc; }
@@ -486,20 +486,20 @@ public:
eSrcCharSet = eNew;
return eOld;
}
- void SetUseStdPageDesc() { bStdPD = TRUE; }
- void SetProtect() { bProtect = TRUE; }
+ void SetUseStdPageDesc() { bStdPD = sal_True; }
+ void SetProtect() { bProtect = sal_True; }
SwPageDesc* MakePageDesc(SwPageDesc* pFirstPageDesc = NULL);
SwPageDesc& GetPageDesc() { return *pCurrentPageDesc; }
- void NextTab() { (*this) << BYTE(0x09); }
- void NextLine() { (*this) << BYTE(0x0a); }
+ void NextTab() { (*this) << sal_uInt8(0x09); }
+ void NextLine() { (*this) << sal_uInt8(0x0a); }
void NextParagraph();
void NextPage();
void NextSection() { pCurrentPageDesc = MakePageDesc(); }
SwFltShell& AddGraphic( const String& rPicName );
SwFltShell& AddError( const sal_Char* pErr );
- SwFltShell& EndItem( USHORT nId );
- SwFltShell& SetStyle( USHORT nStyle );
+ SwFltShell& EndItem( sal_uInt16 nId );
+ SwFltShell& SetStyle( sal_uInt16 nStyle );
SwFltShell& operator << ( Graphic& );
SwFltShell& operator << ( SwFltBookmark& aBook );
@@ -521,12 +521,12 @@ public:
void BeginFootnote();
void EndFootnote();
// methoden zur verwaltung von Tabellen
- BOOL IsInTable() {
+ sal_Bool IsInTable() {
return ( pOut == pOutDoc ) ? pOutDoc->IsInTable() : 0; }
- const SfxPoolItem& GetCellAttr(USHORT nWhich) {
+ const SfxPoolItem& GetCellAttr(sal_uInt16 nWhich) {
return pOut->GetCellAttr(nWhich); }
- BOOL BeginTable() {
- BOOL b = pOut->BeginTable();
+ sal_Bool BeginTable() {
+ sal_Bool b = pOut->BeginTable();
if(b) eSubMode = Table;
return b; }
void NextTableCell() {
@@ -535,25 +535,25 @@ public:
pOut->NextTableRow(); }
void SetTableWidth(SwTwips nW) {
pOut->SetTableWidth(nW); }
- BOOL IsTableWidthSet() {
+ sal_Bool IsTableWidthSet() {
return pOutDoc->IsTableWidthSet(); }
void SetTableOrient(sal_Int16 eOri) {
pOut->SetTableOrient(eOri); }
- void SetCellWidth(SwTwips nWidth, USHORT nCell = USHRT_MAX ) {
+ void SetCellWidth(SwTwips nWidth, sal_uInt16 nCell = USHRT_MAX ) {
pOut->SetCellWidth(nWidth, nCell); }
void SetCellHeight(SwTwips nH) {
pOut->SetCellHeight(nH); }
- void SetCellBorder(const SvxBoxItem& rFmtBox, USHORT nCell = USHRT_MAX ){
+ void SetCellBorder(const SvxBoxItem& rFmtBox, sal_uInt16 nCell = USHRT_MAX ){
pOut->SetCellBorder(rFmtBox, nCell); }
- void SetCellSpace(USHORT nSp) {
+ void SetCellSpace(sal_uInt16 nSp) {
pOut->SetCellSpace(nSp); }
- void DeleteCell(USHORT nCell = USHRT_MAX) {
+ void DeleteCell(sal_uInt16 nCell = USHRT_MAX) {
pOut->DeleteCell(nCell); }
void EndTable() {
pOut->EndTable(); }
// methoden zur verwaltung von Flys
- BOOL IsInFly() { return pOut->IsInFly(); }
- BOOL BeginFly( RndStdIds eAnchor = FLY_AT_PARA, BOOL bAbsolutePos = FALSE );
+ sal_Bool IsInFly() { return pOut->IsInFly(); }
+ sal_Bool BeginFly( RndStdIds eAnchor = FLY_AT_PARA, sal_Bool bAbsolutePos = sal_False );
void SetFlyAnchor( RndStdIds eAnchor )
{ pOut->SetFlyAnchor( eAnchor ); }
void SetFlyXPos( short nXPos, sal_Int16 eHRel = com::sun::star::text::RelOrientation::FRAME,
@@ -564,7 +564,7 @@ public:
pOut->SetFlyFrmAttr( rAttr ); }
void EndFly();
// methoden zur verwaltung von styles:
- void BeginStyle(USHORT nUserCode, RES_POOL_COLLFMT_TYPE aType)
+ void BeginStyle(sal_uInt16 nUserCode, RES_POOL_COLLFMT_TYPE aType)
{
OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -574,7 +574,7 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- void BeginStyle( USHORT nUserCode, const String& rName )
+ void BeginStyle( sal_uInt16 nUserCode, const String& rName )
{
OSL_ENSURE(nUserCode<sizeof(pColls)/sizeof(*pColls), "code out of bounds");
OSL_ENSURE(pColls[nUserCode] == NULL, "user codes dublicate");
@@ -584,16 +584,16 @@ public:
nAktStyle = nUserCode;
eSubMode = Style;
}
- BOOL IsStyleImported(USHORT nUserCode)
+ sal_Bool IsStyleImported(sal_uInt16 nUserCode)
{ return pColls[nUserCode] != 0; }
- void BaseStyle(USHORT nBased)
+ void BaseStyle(sal_uInt16 nBased)
{
OSL_ENSURE(eSubMode == Style, "wrong state for style");
OSL_ENSURE(pColls[nBased], "Style based on noexistent style" );
if( eSubMode == Style && pColls[nBased]->GetColl() )
((SwFltFormatCollection*)pOut)->Derived(pColls[nBased]->GetColl());
}
- void NextStyle(USHORT nWhich, USHORT nNext);
+ void NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext);
void EndStyle()
{
@@ -603,22 +603,22 @@ public:
eSubMode = None;
}
- BOOL IsFlagSet(SwFltControlStack::Flags no) const
+ sal_Bool IsFlagSet(SwFltControlStack::Flags no) const
{ return aStack.IsFlagSet(no); }
void ConvertUStr( String& rInOut );
String QuoteStr( const String& rIn );
// folgende status kann die shell verwalten:
- const SfxPoolItem& GetNodeOrStyAttr(USHORT nWhich);
- const SfxPoolItem& GetAttr(USHORT nWhich);
- const SfxPoolItem& GetFlyFrmAttr(USHORT nWhich);
- SwFieldType* GetSysFldType(USHORT eWhich);
- BOOL GetWeightBold();
- BOOL GetPostureItalic();
- BOOL GetCrossedOut();
- BOOL GetContour();
- BOOL GetCaseKapitaelchen();
- BOOL GetCaseVersalien();
+ const SfxPoolItem& GetNodeOrStyAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetAttr(sal_uInt16 nWhich);
+ const SfxPoolItem& GetFlyFrmAttr(sal_uInt16 nWhich);
+ SwFieldType* GetSysFldType(sal_uInt16 eWhich);
+ sal_Bool GetWeightBold();
+ sal_Bool GetPostureItalic();
+ sal_Bool GetCrossedOut();
+ sal_Bool GetContour();
+ sal_Bool GetCaseKapitaelchen();
+ sal_Bool GetCaseVersalien();
const String& GetBaseURL() const { return sBaseURL; }
};
diff --git a/sw/source/filter/inc/makefile.mk b/sw/source/filter/inc/makefile.mk
deleted file mode 100644
index 1b35ca49549d..000000000000
--- a/sw/source/filter/inc/makefile.mk
+++ /dev/null
@@ -1,26 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
diff --git a/sw/source/filter/inc/msfilter.hxx b/sw/source/filter/inc/msfilter.hxx
index 56507948e10e..f7b72790a37d 100644
--- a/sw/source/filter/inc/msfilter.hxx
+++ b/sw/source/filter/inc/msfilter.hxx
@@ -119,7 +119,7 @@ namespace sw
@author
<a href="mailto:mmaher@openoffice.org">Martin Maher</a
*/
- ULONG MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri, USHORT nDocLang);
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams, SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri, sal_uInt16 nDocLang);
/** Used by MSDateTimeFormatToSwFormat to identify AM time fields
@@ -145,10 +145,10 @@ namespace sw
/// Redlining Authors
struct AuthorInfo
{
- USHORT nWWAuthorId;
- USHORT nOurId;
+ sal_uInt16 nWWAuthorId;
+ sal_uInt16 nOurId;
- AuthorInfo(USHORT nWWAuthorId_, USHORT nOurId_ = 0):
+ AuthorInfo(sal_uInt16 nWWAuthorId_, sal_uInt16 nOurId_ = 0):
nWWAuthorId( nWWAuthorId_ ),
nOurId( nOurId_ )
{}
@@ -437,7 +437,7 @@ namespace sw
protected:
std::vector<String> maAuthors; // Array of Sw - Bookmarknames
- USHORT GetPos( const String& rNm );
+ sal_uInt16 GetPos( const String& rNm );
//No copying
WrtRedlineAuthor(const WrtRedlineAuthor&);
@@ -446,7 +446,7 @@ namespace sw
WrtRedlineAuthor() {}
virtual ~WrtRedlineAuthor() {}
- USHORT AddName( const String& rNm );
+ sal_uInt16 AddName( const String& rNm );
virtual void Write(Writer &rWrt) = 0;
// std::vector<String> GetNames();
};
diff --git a/sw/source/filter/inc/rtf.hxx b/sw/source/filter/inc/rtf.hxx
index 1e96a5fc4b3a..e138cc3a4399 100644
--- a/sw/source/filter/inc/rtf.hxx
+++ b/sw/source/filter/inc/rtf.hxx
@@ -35,23 +35,23 @@ class RTFVertOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFVertOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFVertOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFVertOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFVertOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -59,50 +59,50 @@ class RTFHoriOrient
{
union {
struct {
- USHORT nOrient : 4;
- USHORT nRelAnchor : 4;
- USHORT nRelOrient : 1;
+ sal_uInt16 nOrient : 4;
+ sal_uInt16 nRelAnchor : 4;
+ sal_uInt16 nRelOrient : 1;
} Flags;
- USHORT nVal;
+ sal_uInt16 nVal;
} Value;
public:
- RTFHoriOrient( USHORT nValue ) { Value.nVal = nValue; }
+ RTFHoriOrient( sal_uInt16 nValue ) { Value.nVal = nValue; }
- RTFHoriOrient( USHORT nOrient, USHORT nRelOrient ) {
+ RTFHoriOrient( sal_uInt16 nOrient, sal_uInt16 nRelOrient ) {
Value.Flags.nOrient = nOrient;
Value.Flags.nRelOrient = nRelOrient;
Value.Flags.nRelAnchor = 0;
}
- USHORT GetOrient() const { return Value.Flags.nOrient; }
- USHORT GetRelation() const { return Value.Flags.nRelOrient; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt16 GetOrient() const { return Value.Flags.nOrient; }
+ sal_uInt16 GetRelation() const { return Value.Flags.nRelOrient; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
class RTFProtect
{
union {
struct {
- BOOL bCntnt : 1;
- BOOL bSize : 1;
- BOOL bPos : 1;
+ sal_Bool bCntnt : 1;
+ sal_Bool bSize : 1;
+ sal_Bool bPos : 1;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFProtect( BYTE nValue ) { Value.nVal = nValue; }
+ RTFProtect( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFProtect( BOOL bCntnt, BOOL bSize, BOOL bPos ) {
+ RTFProtect( sal_Bool bCntnt, sal_Bool bSize, sal_Bool bPos ) {
Value.Flags.bCntnt = bCntnt;
Value.Flags.bSize = bSize;
Value.Flags.bPos = bPos;
}
- BOOL GetCntnt() const { return Value.Flags.bCntnt; }
- BOOL GetSize() const { return Value.Flags.bSize; }
- BOOL GetPos() const { return Value.Flags.bPos; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_Bool GetCntnt() const { return Value.Flags.bCntnt; }
+ sal_Bool GetSize() const { return Value.Flags.bSize; }
+ sal_Bool GetPos() const { return Value.Flags.bPos; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
@@ -110,22 +110,22 @@ class RTFSurround
{
union {
struct {
- USHORT nGoldCut : 1;
- USHORT nOrder : 4;
+ sal_uInt16 nGoldCut : 1;
+ sal_uInt16 nOrder : 4;
} Flags;
- BYTE nVal;
+ sal_uInt8 nVal;
} Value;
public:
- RTFSurround( BYTE nValue ) { Value.nVal = nValue; }
+ RTFSurround( sal_uInt8 nValue ) { Value.nVal = nValue; }
- RTFSurround( BOOL bGoldCut, BYTE nOrder ) {
+ RTFSurround( sal_Bool bGoldCut, sal_uInt8 nOrder ) {
Value.Flags.nOrder = nOrder;
Value.Flags.nGoldCut = bGoldCut;
}
- BYTE GetOrder() const { return (BYTE)Value.Flags.nOrder; }
- BOOL GetGoldCut() const { return (BOOL)Value.Flags.nGoldCut; }
- USHORT GetValue() const { return Value.nVal; }
+ sal_uInt8 GetOrder() const { return (sal_uInt8)Value.Flags.nOrder; }
+ sal_Bool GetGoldCut() const { return (sal_Bool)Value.Flags.nGoldCut; }
+ sal_uInt16 GetValue() const { return Value.nVal; }
};
#endif // _RTF_HXX
diff --git a/sw/source/filter/inc/wrt_fn.hxx b/sw/source/filter/inc/wrt_fn.hxx
index c4790db74c12..05f724707235 100644
--- a/sw/source/filter/inc/wrt_fn.hxx
+++ b/sw/source/filter/inc/wrt_fn.hxx
@@ -42,7 +42,7 @@ typedef FnAttrOut SwAttrFnTab[ POOLATTR_END - POOLATTR_BEGIN ];
SW_DLLPUBLIC Writer& Out( const SwAttrFnTab, const SfxPoolItem&, Writer& );
SW_DLLPUBLIC Writer& Out_SfxItemSet( const SwAttrFnTab, Writer&, const SfxItemSet&,
- BOOL bDeep, BOOL bTstForDefault = TRUE );
+ sal_Bool bDeep, sal_Bool bTstForDefault = sal_True );
/* Funktionspointer auf die Node-Write-Funktionen */
diff --git a/sw/source/filter/inc/wrtswtbl.hxx b/sw/source/filter/inc/wrtswtbl.hxx
index 8bf5424e3408..3ab7614986db 100644
--- a/sw/source/filter/inc/wrtswtbl.hxx
+++ b/sw/source/filter/inc/wrtswtbl.hxx
@@ -62,46 +62,46 @@ class SwWriteTableCell
long nHeight; // fixe/Mindest-Hoehe der Zeile
- USHORT nWidthOpt; // Breite aus Option;
+ sal_uInt32 nWidthOpt; // Breite aus Option;
- USHORT nRow; // Start-Zeile
- USHORT nCol; // Start-Spalte
+ sal_uInt16 nRow; // Start-Zeile
+ sal_uInt16 nCol; // Start-Spalte
- USHORT nRowSpan; // ueberspannte Zeilen
- USHORT nColSpan; // ueberspannte Spalten
+ sal_uInt16 nRowSpan; // ueberspannte Zeilen
+ sal_uInt16 nColSpan; // ueberspannte Spalten
- BOOL bPrcWidthOpt;
+ sal_Bool bPrcWidthOpt;
public:
- SwWriteTableCell(const SwTableBox *pB, USHORT nR, USHORT nC, USHORT nRSpan,
- USHORT nCSpan, long nHght, const SvxBrushItem *pBGround)
+ SwWriteTableCell(const SwTableBox *pB, sal_uInt16 nR, sal_uInt16 nC, sal_uInt16 nRSpan,
+ sal_uInt16 nCSpan, long nHght, const SvxBrushItem *pBGround)
: pBox( pB ), pBackground( pBGround ), nHeight( nHght ), nWidthOpt( 0 ),
nRow( nR ), nCol( nC ), nRowSpan( nRSpan ), nColSpan( nCSpan ),
- bPrcWidthOpt( FALSE )
+ bPrcWidthOpt( sal_False )
{}
const SwTableBox *GetBox() const { return pBox; }
- USHORT GetRow() const { return nRow; }
- USHORT GetCol() const { return nCol; }
+ sal_uInt16 GetRow() const { return nRow; }
+ sal_uInt16 GetCol() const { return nCol; }
- USHORT GetRowSpan() const { return nRowSpan; }
- USHORT GetColSpan() const { return nColSpan; }
+ sal_uInt16 GetRowSpan() const { return nRowSpan; }
+ sal_uInt16 GetColSpan() const { return nColSpan; }
long GetHeight() const { return nHeight; }
sal_Int16 GetVertOri() const;
const SvxBrushItem *GetBackground() const { return pBackground; }
- void SetWidthOpt( USHORT nWidth, BOOL bPrc )
+ void SetWidthOpt( sal_uInt16 nWidth, sal_Bool bPrc )
{
nWidthOpt = nWidth; bPrcWidthOpt = bPrc;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
- BOOL HasPrcWidthOpt() const { return bPrcWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
+ sal_Bool HasPrcWidthOpt() const { return bPrcWidthOpt; }
};
typedef SwWriteTableCell *SwWriteTableCellPtr;
@@ -116,7 +116,7 @@ class SwWriteTableRow
const SvxBrushItem *pBackground;// Hintergrund
long nPos; // End-Position (twips) der Zeile
- BOOL mbUseLayoutHeights;
+ sal_Bool mbUseLayoutHeights;
// Forbidden and not implemented.
SwWriteTableRow();
@@ -129,17 +129,17 @@ protected:
public:
- USHORT nTopBorder; // Dicke der oberen/unteren Umrandugen
- USHORT nBottomBorder;
+ sal_uInt16 nTopBorder; // Dicke der oberen/unteren Umrandugen
+ sal_uInt16 nBottomBorder;
- BOOL bTopBorder : 1; // Welche Umrandungen sind da?
- BOOL bBottomBorder : 1;
+ sal_Bool bTopBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bBottomBorder : 1;
- SwWriteTableRow( long nPos, BOOL bUseLayoutHeights );
+ SwWriteTableRow( long nPos, sal_Bool bUseLayoutHeights );
SwWriteTableCell *AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackground );
@@ -149,8 +149,8 @@ public:
}
const SvxBrushItem *GetBackground() const { return pBackground; }
- BOOL HasTopBorder() const { return bTopBorder; }
- BOOL HasBottomBorder() const { return bBottomBorder; }
+ sal_Bool HasTopBorder() const { return bTopBorder; }
+ sal_Bool HasBottomBorder() const { return bBottomBorder; }
long GetPos() const { return nPos; }
const SwWriteTableCells& GetCells() const { return aCells; }
@@ -181,39 +181,39 @@ SV_DECL_PTRARR_SORT_DEL( SwWriteTableRows, SwWriteTableRowPtr, 5, 5 )
class SwWriteTableCol
{
- USHORT nPos; // End Position der Spalte
+ sal_uInt32 nPos; // End Position der Spalte
- USHORT nWidthOpt;
+ sal_uInt32 nWidthOpt;
- BOOL bRelWidthOpt : 1;
- BOOL bOutWidth : 1; // Spaltenbreite ausgeben?
+ sal_Bool bRelWidthOpt : 1;
+ sal_Bool bOutWidth : 1; // Spaltenbreite ausgeben?
public:
- BOOL bLeftBorder : 1; // Welche Umrandungen sind da?
- BOOL bRightBorder : 1;
+ sal_Bool bLeftBorder : 1; // Welche Umrandungen sind da?
+ sal_Bool bRightBorder : 1;
- SwWriteTableCol( USHORT nPosition );
+ SwWriteTableCol( sal_uInt32 nPosition );
- USHORT GetPos() const { return nPos; }
+ sal_uInt32 GetPos() const { return nPos; }
- void SetLeftBorder( BOOL bBorder ) { bLeftBorder = bBorder; }
- BOOL HasLeftBorder() const { return bLeftBorder; }
+ void SetLeftBorder( sal_Bool bBorder ) { bLeftBorder = bBorder; }
+ sal_Bool HasLeftBorder() const { return bLeftBorder; }
- void SetRightBorder( BOOL bBorder ) { bRightBorder = bBorder; }
- BOOL HasRightBorder() const { return bRightBorder; }
+ void SetRightBorder( sal_Bool bBorder ) { bRightBorder = bBorder; }
+ sal_Bool HasRightBorder() const { return bRightBorder; }
- void SetOutWidth( BOOL bSet ) { bOutWidth = bSet; }
- BOOL GetOutWidth() const { return bOutWidth; }
+ void SetOutWidth( sal_Bool bSet ) { bOutWidth = bSet; }
+ sal_Bool GetOutWidth() const { return bOutWidth; }
inline int operator==( const SwWriteTableCol& rCol ) const;
inline int operator<( const SwWriteTableCol& rCol ) const;
- void SetWidthOpt( USHORT nWidth, BOOL bRel )
+ void SetWidthOpt( sal_uInt32 nWidth, sal_Bool bRel )
{
nWidthOpt = nWidth; bRelWidthOpt = bRel;
}
- USHORT GetWidthOpt() const { return nWidthOpt; }
- BOOL HasRelWidthOpt() const { return bRelWidthOpt; }
+ sal_uInt32 GetWidthOpt() const { return nWidthOpt; }
+ sal_Bool HasRelWidthOpt() const { return bRelWidthOpt; }
};
inline int SwWriteTableCol::operator==( const SwWriteTableCol& rCol ) const
@@ -242,70 +242,70 @@ protected:
SwWriteTableCols aCols; // alle Spalten
SwWriteTableRows aRows; // alle Zellen
- UINT32 nBorderColor; // Umrandungsfarbe
+ sal_uInt32 nBorderColor; // Umrandungsfarbe
- USHORT nCellSpacing; // Dicke der inneren Umrandung
- USHORT nCellPadding; // Absatnd Umrandung-Inhalt
+ sal_uInt16 nCellSpacing; // Dicke der inneren Umrandung
+ sal_uInt16 nCellPadding; // Absatnd Umrandung-Inhalt
- USHORT nBorder; // Dicke der ausseren Umrandung
- USHORT nInnerBorder; // Dicke der inneren Umrandung
- USHORT nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
+ sal_uInt16 nBorder; // Dicke der ausseren Umrandung
+ sal_uInt16 nInnerBorder; // Dicke der inneren Umrandung
+ sal_uInt32 nBaseWidth; // Bezugsgroesse fur Breiten SwFmtFrmSize
- USHORT nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
+ sal_uInt16 nHeadEndRow; // letzte Zeile des Tabellen-Kopfes
- USHORT nLeftSub;
- USHORT nRightSub;
+ sal_uInt16 nLeftSub;
+ sal_uInt16 nRightSub;
- long nTabWidth; // Absolute/Relative Breite der Tabelle
+ sal_uInt32 nTabWidth; // Absolute/Relative Breite der Tabelle
- BOOL bRelWidths : 1; // Breiten relativ ausgeben?
- BOOL bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
+ sal_Bool bRelWidths : 1; // Breiten relativ ausgeben?
+ sal_Bool bUseLayoutHeights : 1; // Layout zur Hoehenbestimmung nehmen?
#if OSL_DEBUG_LEVEL > 1
- BOOL bGetLineHeightCalled : 1;
+ sal_Bool bGetLineHeightCalled : 1;
#endif
- BOOL bColsOption : 1;
- BOOL bColTags : 1;
- BOOL bLayoutExport : 1;
- BOOL bCollectBorderWidth : 1;
+ sal_Bool bColsOption : 1;
+ sal_Bool bColTags : 1;
+ sal_Bool bLayoutExport : 1;
+ sal_Bool bCollectBorderWidth : 1;
- virtual BOOL ShouldExpandSub( const SwTableBox *pBox,
- BOOL bExpandedBefore, USHORT nDepth ) const;
+ virtual sal_Bool ShouldExpandSub( const SwTableBox *pBox,
+ sal_Bool bExpandedBefore, sal_uInt16 nDepth ) const;
- void CollectTableRowsCols( long nStartRPos, USHORT nStartCPos,
+ void CollectTableRowsCols( long nStartRPos, sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth );
+ sal_uInt16 nDepth );
- void FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+ void FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pLineBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows );
- void MergeBorders( const SvxBorderLine* pBorderLine, BOOL bTable );
+ void MergeBorders( const SvxBorderLine* pBorderLine, sal_Bool bTable );
- USHORT MergeBoxBorders( const SwTableBox *pBox, USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT &rTopBorder, USHORT &rBottomBorder );
+ sal_uInt16 MergeBoxBorders( const SwTableBox *pBox, sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16 &rTopBorder, sal_uInt16 &rBottomBorder );
- USHORT GetBaseWidth() const { return nBaseWidth; }
+ sal_uInt32 GetBaseWidth() const { return nBaseWidth; }
- BOOL HasRelWidths() const { return bRelWidths; }
+ sal_Bool HasRelWidths() const { return bRelWidths; }
public:
- static long GetBoxWidth( const SwTableBox *pBox );
+ static sal_uInt32 GetBoxWidth( const SwTableBox *pBox );
- USHORT GetRawWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetAbsWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetRelWidth( USHORT nCol, USHORT nColSpan ) const;
- USHORT GetPrcWidth( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt32 GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
+ sal_uInt16 GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
- long GetAbsHeight( long nRawWidth, USHORT nRow, USHORT nRowSpan ) const;
+ long GetAbsHeight( long nRawWidth, sal_uInt16 nRow, sal_uInt16 nRowSpan ) const;
protected:
long GetLineHeight( const SwTableLine *pLine );
@@ -313,14 +313,14 @@ protected:
const SvxBrushItem *GetLineBrush( const SwTableBox *pBox,
SwWriteTableRow *pRow );
- USHORT GetLeftSpace( USHORT nCol ) const;
- USHORT GetRightSpace( USHORT nCol, USHORT nColSpan ) const;
+ sal_uInt16 GetLeftSpace( sal_uInt16 nCol ) const;
+ sal_uInt16 GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const;
public:
- SwWriteTable( const SwTableLines& rLines, long nWidth, USHORT nBWidth,
- BOOL bRel, USHORT nMaxDepth = USHRT_MAX,
- USHORT nLeftSub=0, USHORT nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
+ SwWriteTable( const SwTableLines& rLines, long nWidth, sal_uInt32 nBWidth,
+ sal_Bool bRel, sal_uInt16 nMaxDepth = USHRT_MAX,
+ sal_uInt16 nLeftSub=0, sal_uInt16 nRightSub=0, sal_uInt32 nNumOfRowsToRepeat=0 );
SwWriteTable( const SwHTMLTableLayout *pLayoutInfo );
virtual ~SwWriteTable();
diff --git a/sw/source/filter/makefile.mk b/sw/source/filter/makefile.mk
deleted file mode 100644
index c2b343eb8bc6..000000000000
--- a/sw/source/filter/makefile.mk
+++ /dev/null
@@ -1,67 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..
-
-PRJNAME=sw
-TARGET=filter
-
-.IF "$(CALLTARGETS)"=="filter"
-RC_SUBDIRS=
-.ENDIF
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-
-SUBLIBS= \
- $(SLB)$/ascii.lib \
- $(SLB)$/basflt.lib \
- $(SLB)$/html.lib \
- $(SLB)$/writer.lib \
- $(SLB)$/ww1.lib \
- $(SLB)$/xml.lib
-
-# -----------------------------------------------------------
-
-
-################################################################
-
-LIB1TARGET=$(SLB)$/filter.lib
-LIB1FILES= \
- $(SUBLIBS)
-
-.INCLUDE : target.mk
-
-################################################################
-
-
diff --git a/sw/source/filter/rtf/makefile.mk b/sw/source/filter/rtf/makefile.mk
deleted file mode 100644
index 5b073faa2c1c..000000000000
--- a/sw/source/filter/rtf/makefile.mk
+++ /dev/null
@@ -1,60 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=rtf
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-MAKING_LIBMSWORD=TRUE
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/rtffld.obj \
- $(SLO)$/rtffly.obj \
- $(SLO)$/rtfnum.obj \
- $(SLO)$/rtftbl.obj \
- $(SLO)$/swparrtf.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/rtf/rtffld.cxx b/sw/source/filter/rtf/rtffld.cxx
index c1c3ac14d3f4..e0e32329b1af 100644
--- a/sw/source/filter/rtf/rtffld.cxx
+++ b/sw/source/filter/rtf/rtffld.cxx
@@ -166,7 +166,7 @@ static RTF_FLD_TYPES _WhichFld( String& rName, String& rNext )
return RTFFLD_UNKNOWN; // nichts gefunden.
}
-static USHORT CheckNumberFmtStr( const String& rNStr )
+static sal_uInt16 CheckNumberFmtStr( const String& rNStr )
{
const static sal_Char* aNumberTypeTab[] =
{
@@ -183,12 +183,12 @@ static USHORT CheckNumberFmtStr( const String& rNStr )
OSL_ENSURE(sizeof(aNumberTypeTab) / sizeof(sal_Char *)
>= SVX_NUM_PAGEDESC - SVX_NUM_CHARS_UPPER_LETTER, "impossible");
- for (USHORT n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
+ for (sal_uInt16 n = SVX_NUM_CHARS_UPPER_LETTER; n <= SVX_NUM_PAGEDESC; ++n)
{
const sal_Char* pCmp = aNumberTypeTab[n - SVX_NUM_CHARS_UPPER_LETTER];
int nLen = *pCmp++;
if( rNStr.EqualsAscii( pCmp, 0, static_cast< xub_StrLen >(nLen) ))
- return static_cast< USHORT >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
+ return static_cast< sal_uInt16 >(2 <= n ? n : (n + SVX_NUM_CHARS_UPPER_LETTER_N));
}
return SVX_NUM_PAGEDESC; // default-Wert
}
@@ -201,7 +201,7 @@ public:
RtfFieldSwitch( const String& rParam );
sal_Unicode GetSwitch( String& rParam );
- BOOL IsAtEnd() const { return nCurPos >= sParam.Len(); }
+ sal_Bool IsAtEnd() const { return nCurPos >= sParam.Len(); }
xub_StrLen GetCurPos() const { return nCurPos; }
void Erase( xub_StrLen nEndPos ) { sParam.Erase( 0, nEndPos ); }
void Insert( const String& rIns ) { sParam.Insert( rIns, 0 ); }
@@ -232,7 +232,7 @@ sal_Unicode RtfFieldSwitch::GetSwitch( String& rParam )
// dann alles in Hochkommatas oder bis zum naechsten // als
// Param returnen
- USHORT nOffset;
+ sal_uInt16 nOffset;
if( '"' != c && '\'' != c )
c = '\\', nOffset = 0;
else
@@ -290,7 +290,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
else if( 1 < nSubSupFlag )
nSubSupFlag = 0;
- BOOL bCheckBracket = FALSE;
+ sal_Bool bCheckBracket = sal_False;
switch( cKey )
{
case 0:
@@ -324,7 +324,7 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nUp = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
@@ -333,12 +333,12 @@ void lcl_ScanEquationField( const String& rStr, RTF_EquationData& rData,
2 == nSubSupFlag )
{
rData.nDown = sParam.Copy( 1 ).ToInt32();
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
}
break;
default:
- bCheckBracket = TRUE;
+ bCheckBracket = sal_True;
cKey = 0;
break;
}
@@ -486,11 +486,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// and get the rtf filter to use it
SwField *pFld = 0;
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
- ULONG nFmtIdx = NUMBERFORMAT_UNDEFINED;
+ sal_uLong nFmtIdx = NUMBERFORMAT_UNDEFINED;
- USHORT rLang(0);
+ sal_uInt16 rLang(0);
RES_CHRATR eLang = maPageDefaults.mbRTLdoc ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< USHORT >(eLang) );
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)&pDoc->GetAttrPool().GetDefaultItem( static_cast< sal_uInt16 >(eLang) );
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
SvNumberFormatter* pFormatter = pDoc->GetNumberFormatter();
@@ -531,7 +531,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// werden:
// \\data -> Datenbank-Name als Field
// DATA -> Datenbank-Info
- BOOL bField = rFieldStr.GetChar( 0 ) != 'D';
+ sal_Bool bField = rFieldStr.GetChar( 0 ) != 'D';
// nur der Name interressiert
if( STRING_NOTFOUND != (nPos = aSaveStr.Search( '.' )) )
@@ -567,11 +567,11 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
// loesche fuehrende Blanks
if( IsNewGroup() )
GetAttrSet();
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
SfxItemSet& rSet = GetAttrSet();
- BOOL bCharIns = FALSE;
+ sal_Bool bCharIns = sal_False;
RtfFieldSwitch aRFS( aSaveStr );
while( !aRFS.IsAtEnd() )
{
@@ -587,7 +587,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( nChar )
{
pDoc->InsertString( *pPam, nChar );
- bCharIns = TRUE;
+ bCharIns = sal_True;
}
}
break;
@@ -617,7 +617,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
case 's': case 'S':
// Fontsize setzen
{
- const USHORT nVal = (USHORT)(sParam.ToInt32() * 20);
+ const sal_uInt16 nVal = (sal_uInt16)(sParam.ToInt32() * 20);
rSet.Put( SvxFontHeightItem( nVal,
100, RES_CHRATR_FONTSIZE ));
}
@@ -626,7 +626,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
}
if( !IsNewGroup() ) AttrGroupEnd();
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
SkipGroup(); // ueberlese den Rest
}
@@ -694,22 +694,22 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
if( !pCharFmt )
{
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType( aData.sUp, 0);
else
nScript = i18n::ScriptType::ASIAN;
- USHORT nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
+ sal_uInt16 nFntHWhich = GetWhichOfScript( RES_CHRATR_FONTSIZE, nScript ),
nFntWhich = GetWhichOfScript( RES_CHRATR_FONT, nScript );
//Check to see if we already have a ruby charstyle that this fits
- for(USHORT i=0; i < aRubyCharFmts.Count(); ++i )
+ for(sal_uInt16 i=0; i < aRubyCharFmts.Count(); ++i )
{
SwCharFmt *pFmt = (SwCharFmt *)aRubyCharFmts[i];
const SvxFontHeightItem &rF = (const SvxFontHeightItem &)
pFmt->GetFmtAttr( nFntHWhich );
- if( rF.GetHeight() == USHORT(aData.nFontSize * 10 ))
+ if( rF.GetHeight() == sal_uInt16(aData.nFontSize * 10 ))
{
const SvxFontItem &rFI = (const SvxFontItem &)
pFmt->GetFmtAttr( nFntWhich );
@@ -747,7 +747,7 @@ int SwRTFParser::MakeFieldInst( String& rFieldStr )
//Set the charstyle and justification
aRuby.SetCharFmtName( pCharFmt->GetName() );
aRuby.SetCharFmtId( pCharFmt->GetPoolFmtId() );
- aRuby.SetAdjustment( (USHORT)aData.nJustificationCode );
+ aRuby.SetAdjustment( (sal_uInt16)aData.nJustificationCode );
// im FieldStr steht der anzuzeigenden Text, im
pDoc->InsertString( *pPam, aData.sText );
@@ -886,7 +886,7 @@ void SwRTFParser::ReadXEField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nNumOpenBrakets = 1;
String sFieldStr;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -910,7 +910,7 @@ void SwRTFParser::ReadXEField()
if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_HIDDEN, sal_True, &pItem ) )
{
SvxCharHiddenItem aCharHidden(*(SvxCharHiddenItem*)pItem);
- aCharHidden.SetValue(FALSE);
+ aCharHidden.SetValue(sal_False);
rSet.Put(aCharHidden);
}
@@ -994,9 +994,9 @@ void SwRTFParser::ReadField()
bReadSwFly = false; //#it may be that any uses of this need to be removed and replaced
int nRet = 0;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- int bFldInst = FALSE, bFldRslt = FALSE;
+ int bFldInst = sal_False, bFldRslt = sal_False;
String sFieldStr, sFieldNm;
- BYTE cCh;
+ sal_uInt8 cCh;
int nToken;
while (nNumOpenBrakets && IsParserWorking())
@@ -1128,11 +1128,11 @@ void SwRTFParser::ReadField()
break;
case RTF_FLDINST:
- bFldInst = TRUE;
+ bFldInst = sal_True;
break;
case RTF_FLDRSLT:
- bFldRslt = TRUE;
+ bFldRslt = sal_True;
break;
case RTF_U:
diff --git a/sw/source/filter/rtf/rtffly.cxx b/sw/source/filter/rtf/rtffly.cxx
index 1c27c844884d..3d2adf049cdf 100644
--- a/sw/source/filter/rtf/rtffly.cxx
+++ b/sw/source/filter/rtf/rtffly.cxx
@@ -76,11 +76,11 @@ using namespace ::com::sun::star;
#define ANCHOR(p) ((SwFmtAnchor*)p)
// steht in shellio.hxx
-extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, BOOL bChk );
+extern SwCntntNode* GoNextNds( SwNodeIndex * pIdx, sal_Bool bChk );
SV_IMPL_PTRARR( SwFlySaveArr, SwFlySave* )
-inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, BOOL bInP=TRUE)
+inline const SwFmtFrmSize GetFrmSize(const SfxItemSet& rSet, sal_Bool bInP=sal_True)
{
return (const SwFmtFrmSize&)rSet.Get(RES_FRM_SIZE,bInP);
}
@@ -94,29 +94,29 @@ SwFlySave::SwFlySave(const SwPaM& rPam, SfxItemSet& rSet)
int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
if( rSet.Count() != aFlySet.Count() || nDropAnchor )
- return FALSE;
+ return sal_False;
// nur TextNodes zusammenfassen
if( nSttNd == nEndNd && nEndNd.GetNode().IsNoTxtNode() )
- return FALSE;
+ return sal_False;
// teste auf gleiche / naechste Position
if( rPos.GetPoint()->nNode.GetIndex() == nEndNd.GetIndex() )
{
if( 1 < (rPos.GetPoint()->nContent.GetIndex() - nEndCnt) )
- return FALSE;
+ return sal_False;
}
else if( rPos.GetPoint()->nContent.GetIndex() )
- return FALSE;
+ return sal_False;
else
{
SwNodeIndex aIdx( nEndNd );
- SwCntntNode* pCNd = rPos.GetDoc()->GetNodes()[ aIdx ]->GetCntntNode();
- if( !GoNextNds( &aIdx, TRUE ) ||
+ SwCntntNode *const pCNd = aIdx.GetNode().GetCntntNode();
+ if( !GoNextNds( &aIdx, sal_True ) ||
aIdx.GetIndex() != rPos.GetPoint()->nNode.GetIndex() ||
( pCNd && pCNd->Len() != nEndCnt ))
{
- return FALSE;
+ return sal_False;
}
}
@@ -124,23 +124,23 @@ int SwFlySave::IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet )
{
SfxItemIter aIter( rSet );
const SfxPoolItem *pItem, *pCurr = aIter.GetCurItem();
- while( TRUE )
+ while( sal_True )
{
if( SFX_ITEM_SET != aFlySet.GetItemState( pCurr->Which(),
- FALSE, &pItem ) ||
+ sal_False, &pItem ) ||
// Ankerattribute gesondert behandeln
( RES_ANCHOR == pCurr->Which()
? (ANCHOR(pCurr)->GetAnchorId() != ANCHOR(pItem)->GetAnchorId() ||
ANCHOR(pCurr)->GetPageNum() != ANCHOR(pItem)->GetPageNum())
: *pItem != *pCurr ))
- return FALSE;
+ return sal_False;
if( aIter.IsAtEnd() )
break;
pCurr = aIter.NextItem();
}
}
- return TRUE;
+ return sal_True;
}
void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
@@ -153,17 +153,17 @@ void SwFlySave::SetFlySize( const SwTableNode& rTblNd )
aFlySet.Put( SwFmtFrmSize( rSz.GetHeightSizeType(), nWidth, rSz.GetHeight() ));
}
-BOOL lcl_HasBreakAttrs( const SwCntntNode& rNd )
+sal_Bool lcl_HasBreakAttrs( const SwCntntNode& rNd )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
const SfxItemSet& rSet = rNd.GetSwAttrSet();
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, TRUE, &pItem ) &&
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_BREAK, sal_True, &pItem ) &&
SVX_BREAK_NONE != ((SvxFmtBreakItem*)pItem)->GetBreak() )
- bRet = TRUE;
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, TRUE, &pItem )&&
+ bRet = sal_True;
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_PAGEDESC, sal_True, &pItem )&&
0 != ((SwFmtPageDesc*)pItem)->GetPageDesc() )
- bRet = TRUE;
+ bRet = sal_True;
return bRet;
}
@@ -177,11 +177,11 @@ void lcl_CpyBreakAttrs( SwCntntNode* pSrcNd, SwCntntNode* pDstNd,
const SfxPoolItem *pDescItem, *pBreakItem;
if( SFX_ITEM_SET != pSet->GetItemState( RES_BREAK,
- FALSE, &pBreakItem ) )
+ sal_False, &pBreakItem ) )
pBreakItem = 0;
if( SFX_ITEM_SET != pSet->GetItemState( RES_PAGEDESC,
- FALSE, &pDescItem ) )
+ sal_False, &pDescItem ) )
pDescItem = 0;
if( pDescItem || pBreakItem )
@@ -229,7 +229,7 @@ void SwRTFParser::SetFlysInDoc()
rtfFmtMap aPrevFmts;
SwFrmFmt* pParent = pDoc->GetFrmFmtFromPool( RES_POOLFRM_FRAME );
- for( USHORT n = 0; n < aFlyArr.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aFlyArr.Count(); ++n )
{
SwFlySave* pFlySave = aFlyArr[ n ];
@@ -251,10 +251,10 @@ void SwRTFParser::SetFlysInDoc()
pSttNd->GetIndex() + 1 == pEndNd->GetIndex()
&& pSttNd->GetTxt().Len()>0 /* #i38227# leave drop caps with no content as fly frames */ )
{
- ULONG nPos = pSttNd->GetIndex();
+ sal_uLong nPos = pSttNd->GetIndex();
SwDoc * pDoc1 = pSttNd->GetDoc();
- BOOL bJoined;
+ sal_Bool bJoined;
{
SwPaM aTmp( *pSttNd, pSttNd->GetTxt().Len(), *pEndNd, 0 );
bJoined = pDoc1->DeleteAndJoin( aTmp );
@@ -265,7 +265,7 @@ void SwRTFParser::SetFlysInDoc()
if( bJoined && pNd != NULL)
{
SwFmtDrop aDropCap;
- aDropCap.GetLines() = (BYTE)pFlySave->nDropLines;
+ aDropCap.GetLines() = (sal_uInt8)pFlySave->nDropLines;
aDropCap.GetChars() = 1;
SwIndex aIdx( pEndNd );
@@ -282,7 +282,7 @@ void SwRTFParser::SetFlysInDoc()
if( n + 1 < aFlyArr.Count() && pFlySave->nEndCnt &&
pFlySave->nEndNd == aFlyArr[ n + 1 ]->nSttNd )
{
- SwCntntNode* pCNd = rNds[ pFlySave->nEndNd ]->GetCntntNode();
+ SwCntntNode *const pCNd = pFlySave->nEndNd.GetNode().GetCntntNode();
if( pCNd )
{
SwPosition aPos( pFlySave->nEndNd,
@@ -308,7 +308,7 @@ void SwRTFParser::SetFlysInDoc()
// die Size muss noch korrigiert werden!
nAktPageDesc = 0; // Standart PageDesc
if( SFX_ITEM_SET != pFlySave->aFlySet.GetItemState(
- RES_FRM_SIZE, FALSE ) )
+ RES_FRM_SIZE, sal_False ) )
_SetPictureSize( *(SwNoTxtNode*)pNd, aRg.aStart,
pFlySave->aFlySet );
if( 0 != ( pNd = pNd->FindTableNode() ) )
@@ -324,7 +324,7 @@ void SwRTFParser::SetFlysInDoc()
if( bMakeEmptySection )
{
pNd = &aRg.aEnd.GetNode();
- ULONG nSectEnd = pNd->EndOfSectionIndex()+1;
+ sal_uLong nSectEnd = pNd->EndOfSectionIndex()+1;
if (!pNd->IsTableNode() && 0 !=(pNd = pNd->FindTableNode())
&& (pNd->GetIndex() >= aRg.aStart.GetNode().GetIndex()) )
@@ -346,7 +346,7 @@ void SwRTFParser::SetFlysInDoc()
else
{
// Tabelle ist noch groesser, also splitte sie hier.
- rNds.SplitTable( aRg.aEnd, TRUE );
+ rNds.SplitTable( aRg.aEnd, sal_True );
aRg.aEnd = pNd->EndOfSectionIndex() + 1;
}
}
@@ -413,7 +413,7 @@ void SwRTFParser::SetFlysInDoc()
SwCntntNode* pSrcNd = pDoc->GetNodes()[ pSttNd->GetIndex() + 1 ]->GetCntntNode();
SfxItemSet aTmpSet( pDoc->GetAttrPool(),
RES_BACKGROUND, RES_BOX );
- const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, FALSE);
+ const SvxBrushItem* pBackgroundBrush = (const SvxBrushItem*)pFlySave->aFlySet.GetItem(RES_BACKGROUND, sal_False);
if( pSrcNd && pSrcNd->HasSwAttrSet() )
aTmpSet.Put( *pSrcNd->GetpSwAttrSet() );
if (pBackgroundBrush)
@@ -422,7 +422,7 @@ void SwRTFParser::SetFlysInDoc()
}
else
{
- pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, FALSE);
+ pBackgroundBrush = (const SvxBrushItem*)aTmpSet.GetItem(RES_BACKGROUND, sal_False);
if (pBackgroundBrush)
{
Color& rBackgroundColor = const_cast<SvxBrushItem*>(pBackgroundBrush)->GetColor();
@@ -561,11 +561,11 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
SvxFrameDirectionItem aFrmDir( FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR );
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
- BOOL bChkDropCap = 0 == pSet;
- USHORT nDropCapLines = 0, nDropCapAnchor = 0;
+ sal_Bool bChkDropCap = 0 == pSet;
+ sal_uInt16 nDropCapLines = 0, nDropCapAnchor = 0;
int nNumOpenBrakets = GetOpenBrakets();
if( !pSet )
@@ -581,10 +581,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
// dann sammel mal alle Attribute zusammen
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nAppliedProps=0;
do {
- USHORT nVal = USHORT(nTokenValue);
+ sal_uInt16 nVal = sal_uInt16(nTokenValue);
/*
#i5263#
Assume that a property genuinely contributes towards creating a frame,
@@ -597,7 +597,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, nTokenValue, 0 );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetHeightSizeType( ((SwFmtFrmSize*)pItem)->GetHeightSizeType() );
@@ -611,7 +611,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
SwFmtFrmSize aSz( ATT_MIN_SIZE, 0, MINFLY );
const SfxPoolItem* pItem;
- if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, TRUE,
+ if( SFX_ITEM_SET == pSet->GetItemState( RES_FRM_SIZE, sal_True,
&pItem ))
{
aSz.SetWidth( ((SwFmtFrmSize*)pItem)->GetWidth() );
@@ -665,10 +665,10 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
break;
case RTF_POSXC: aHori.SetHoriOrient( text::HoriOrientation::CENTER ); break;
case RTF_POSXI: aHori.SetHoriOrient( text::HoriOrientation::LEFT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXO: aHori.SetHoriOrient( text::HoriOrientation::RIGHT );
- aHori.SetPosToggle( TRUE );
+ aHori.SetPosToggle( sal_True );
break;
case RTF_POSXL: aHori.SetHoriOrient( text::HoriOrientation::LEFT ); break;
case RTF_POSXR: aHori.SetHoriOrient( text::HoriOrientation::RIGHT ); break;
@@ -714,7 +714,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPLI: // Dropcaps !!
if( bChkDropCap )
{
- nDropCapLines = USHORT( nTokenValue );
+ nDropCapLines = sal_uInt16( nTokenValue );
if( !nDropCapAnchor )
nDropCapAnchor = 1;
}
@@ -722,7 +722,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_DROPCAPT:
if( bChkDropCap )
{
- nDropCapAnchor = USHORT( nTokenValue );
+ nDropCapAnchor = sal_uInt16( nTokenValue );
if( !nDropCapLines )
nDropCapLines = 3;
}
@@ -731,15 +731,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// fuer die "alten" Writer - haben die Spaltigkeit falsch heraus-
// geschrieben
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -773,24 +773,24 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
nCols = USHRT_MAX; // neu aufsetzen
nColSpace = USHRT_MAX;
do {
- nVal = USHORT(nTokenValue);
+ nVal = sal_uInt16(nTokenValue);
switch( nToken )
{
// Swg-Frame-Tokens
case RTF_FLYPRINT:
{
- pSet->Put( SvxPrintItem( RES_PRINT, FALSE ));
+ pSet->Put( SvxPrintItem( RES_PRINT, sal_False ));
}
break;
case RTF_FLYOPAQUE:
{
- pSet->Put( SvxOpaqueItem( RES_OPAQUE, FALSE ));
+ pSet->Put( SvxOpaqueItem( RES_OPAQUE, sal_False ));
}
break;
case RTF_FLYPRTCTD:
{
- RTFProtect aP( (BYTE)nTokenValue );
+ RTFProtect aP( (sal_uInt8)nTokenValue );
SvxProtectItem aProtectItem( RES_PROTECT );
aProtectItem.SetCntntProtect( aP.GetCntnt() );
aProtectItem.SetSizeProtect( aP.GetSize() );
@@ -801,7 +801,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
case RTF_FLYMAINCNT:
{
- RTFSurround aMC( (BYTE)nTokenValue );
+ RTFSurround aMC( (sal_uInt8)nTokenValue );
SwFmtSurround aSurr( (SwSurround)aMC.GetOrder());
if( aMC.GetGoldCut() )
aSurr.SetSurround( SURROUND_IDEAL );
@@ -831,7 +831,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
{
case RTF_FLY_PAGE:
aAnchor.SetType( FLY_AT_PAGE );
- aAnchor.SetPageNum( USHORT(nTokenValue));
+ aAnchor.SetPageNum( sal_uInt16(nTokenValue));
aAnchor.SetAnchor( 0 );
break;
@@ -849,15 +849,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// case RTF_FLY_COLUMN:
}
break;
- case RTF_COLS: nCols = USHORT( nTokenValue ); break;
- case RTF_COLSX: nColSpace = USHORT( nTokenValue ); break;
+ case RTF_COLS: nCols = sal_uInt16( nTokenValue ); break;
+ case RTF_COLSX: nColSpace = sal_uInt16( nTokenValue ); break;
case RTF_COLNO:
- nAktCol = USHORT( nTokenValue );
+ nAktCol = sal_uInt16( nTokenValue );
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -876,20 +876,20 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
ReadBackgroundAttr( nToken, aSet );
else if( RTF_IGNOREFLAG == nToken )
{
- int bSkipGrp = TRUE;
+ int bSkipGrp = sal_True;
switch( nToken = GetNextToken() )
{
case RTF_SHADOW:
case RTF_BRDBOX:
ReadAttr( SkipToken( -2 ), &aSet );
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
break;
case RTF_BRDRT:
case RTF_BRDRB:
case RTF_BRDRR:
case RTF_BRDRL:
- bSkipGrp = FALSE;
+ bSkipGrp = sal_False;
ReadBorderAttr( SkipToken( -2 ), aSet );
break;
}
@@ -927,14 +927,14 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( nSkip )
{
nToken = SkipToken( nSkip );
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
default:
--nAppliedProps; //Not sufficient to make a frame
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
if( bWeiter )
@@ -951,7 +951,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
text::WrapInfluenceOnPosition::ONCE_SUCCESSIVE ));
// <--
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
pSet->Put( aFollowTextFlow );
if( !( aFrmDir == pSet->Get( RES_FRAMEDIR )) )
@@ -963,17 +963,17 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
if( USHRT_MAX == nColSpace )
nColSpace = 720;
- ULONG nWidth = USHRT_MAX;
- aCol.Init( nCols, nColSpace, USHORT( nWidth ) );
+ sal_uLong nWidth = USHRT_MAX;
+ aCol.Init( nCols, nColSpace, sal_uInt16( nWidth ) );
if( nCols == ( aColumns.Count() / 2 ) )
{
- for( USHORT n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
+ for( sal_uInt16 n = 0, i = 0; n < aColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
- ULONG nTmp = aColumns[ n ];
+ sal_uLong nTmp = aColumns[ n ];
nTmp *= USHRT_MAX;
nTmp /= nWidth;
- pCol->SetWishWidth( USHORT(nTmp) );
+ pCol->SetWishWidth( sal_uInt16(nTmp) );
}
}
pSet->Put( aCol );
@@ -985,7 +985,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// ein neues FlyFormat anlegen oder das alte benutzen ?
// (teste ob es die selben Attribute besitzt!)
SwFlySave* pFlySave = 0;
- USHORT nFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nFlyArrCnt = aFlyArr.Count();
/*
#i5263#
There were not enough frame properties found to actually justify creating
@@ -1019,7 +1019,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
}
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
const SwTableNode* pTblNd = pPam->GetNode()->FindTableNode();
while( !IsPardTokenRead() && IsParserWorking() )
@@ -1034,7 +1034,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
// Added support for transparent frames.
if (nToken == RTF_CBPAT && nFlyArrCnt > 0)
{
- USHORT _index=USHORT(nTokenValue);
+ sal_uInt16 _index=sal_uInt16(nTokenValue);
const Color& rColor = GetColor(_index);
SvxBrushItem aBrush(rColor, RES_BACKGROUND);
SwFlySave* pFS = aFlyArr[nFlyArrCnt-1];
@@ -1101,7 +1101,7 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
}
else
{
- BOOL bMovePaM = 0 != pTblNd;
+ sal_Bool bMovePaM = 0 != pTblNd;
pFlySave->nEndNd = pPam->GetPoint()->nNode;
pFlySave->nEndCnt = pPam->GetPoint()->nContent.GetIndex();
@@ -1179,15 +1179,15 @@ void SwRTFParser::ReadFly( int nToken, SfxItemSet* pSet )
aDiffs.Differentiate( pFlySave->aFlySet );
pFlySave->aFlySet.Put( aDiffs );
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( aSz1.GetHeight() && !aSz2.GetHeight() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetHeight( aSz1.GetHeight() );
}
if( aSz1.GetWidth() && !aSz2.GetWidth() )
{
- bSet = TRUE;
+ bSet = sal_True;
aSz2.SetWidth( aSz1.GetWidth() );
}
if( bSet )
@@ -1264,7 +1264,7 @@ void SwRTFParser::InsPicture( const String& rGrfNm, const Graphic* pGrf,
if (pDoc->IsInHeaderFooter(pPos->nNode))
{
- SvxOpaqueItem aOpaqueItem(RES_OPAQUE, FALSE);
+ SvxOpaqueItem aOpaqueItem(RES_OPAQUE, sal_False);
SwFmtSurround aSurroundItem(SURROUND_THROUGHT);
aFlySet.Put(aOpaqueItem);
aFlySet.Put(aSurroundItem);
@@ -1351,7 +1351,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
}
//steht der Fly etwa in einer Tabelle ?
- const SwNode* pAnchorNd = pDoc->GetNodes()[ rAnchor ];
+ const SwNode* pAnchorNd = & rAnchor.GetNode();
const SwTableNode* pTblNd = pAnchorNd->FindTableNode();
if( pTblNd )
{
@@ -1370,7 +1370,7 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
SwGrfNode* pGrfNd;
if( !aSize.Width() && !aSize.Height() &&
0 != (pGrfNd = (SwGrfNode*)rNd.GetGrfNode() ) && pGrfNd->IsGrfLink() )
- pGrfNd->SetChgTwipSize( TRUE );
+ pGrfNd->SetChgTwipSize( sal_True );
// min. Werte einhalten !!
if( aSize.Width() < MINFLY )
@@ -1380,28 +1380,28 @@ void SwRTFParser::_SetPictureSize( const SwNoTxtNode& rNd,
if( pPicType )
{
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
SwCropGrf aCrop;
if( pPicType->nCropT )
{
aCrop.SetTop( pPicType->nCropT );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropB )
{
aCrop.SetBottom( pPicType->nCropB );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropL )
{
aCrop.SetLeft( pPicType->nCropL );
- bChg = TRUE;
+ bChg = sal_True;
}
if( pPicType->nCropR )
{
aCrop.SetRight( pPicType->nCropR );
- bChg = TRUE;
+ bChg = sal_True;
}
if( bChg )
@@ -1451,7 +1451,7 @@ void SwRTFParser::ReadOLEData()
Graphic aGrf;
SvxRTFPictureType aPicType, aOleType;
- int nToken, bValidOle = TRUE, bWeiter = TRUE;
+ int nToken, bValidOle = sal_True, bWeiter = sal_True;
int nOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
String* pStr = 0;
@@ -1460,7 +1460,7 @@ void SwRTFParser::ReadOLEData()
while( nOpenBrakets && IsParserWorking() && bWeiter && bValidOle )
{
nToken = GetNextToken();
- USHORT nVal = USHORT( nTokenValue );
+ sal_uInt16 nVal = sal_uInt16( nTokenValue );
switch( nToken )
{
case '}': --nOpenBrakets; pStr = 0; break;
@@ -1504,7 +1504,7 @@ void SwRTFParser::ReadOLEData()
case RTF_OBJHTML:
case RTF_OBJALIAS:
case RTF_OBJSECT:
- bValidOle = FALSE; // diese Typen koennen wir nicht
+ bValidOle = sal_False; // diese Typen koennen wir nicht
break;
case RTF_OBJCLASS:
@@ -1524,7 +1524,7 @@ void SwRTFParser::ReadOLEData()
case RTF_RESULT:
{
// hier weitermachen, wenn das OLE-Object ungueltig ist
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
case RTF_RSLTBMP: // diese sollten wir ignorieren
@@ -1550,7 +1550,7 @@ void SwRTFParser::ReadOLEData()
{
xub_StrLen nHexLen = HexToBin( aToken );
if( STRING_NOTFOUND != nHexLen )
- bValidOle = FALSE;
+ bValidOle = sal_False;
else
{
aTmpFile.Write( (sal_Char*)aToken.GetBuffer(), nHexLen );
@@ -1566,7 +1566,7 @@ void SwRTFParser::ReadOLEData()
if( bValidOle )
{
- bValidOle = FALSE; // erstmal
+ bValidOle = sal_False; // erstmal
}
if( !bWeiter ) // dann stehen wir noch im Result
@@ -1577,7 +1577,7 @@ void SwRTFParser::ReadOLEData()
// ansonsten alle Token verarbeiten, bis zur letzten
// schliessenden Klammer
- bWeiter = TRUE;
+ bWeiter = sal_True;
while( nOpenBrakets && IsParserWorking() && bWeiter )
{
switch( nToken = GetNextToken() )
diff --git a/sw/source/filter/rtf/rtfnum.cxx b/sw/source/filter/rtf/rtfnum.cxx
index ab935979b08c..5552ed7c5cb5 100644
--- a/sw/source/filter/rtf/rtfnum.cxx
+++ b/sw/source/filter/rtf/rtfnum.cxx
@@ -35,13 +35,10 @@
#define RTF_NUMRULE_NAME "RTF_Num"
-SV_IMPL_VARARR( SwListArr, SwListEntry )
-
-
void lcl_ExpandNumFmts( SwNumRule& rRule )
{
// dann noch das NumFormat in alle Ebenen setzen
- for( BYTE n = 1; n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 1; n < MAXLEVEL; ++n )
if( !rRule.GetNumFmt( n ) )
{
SwNumFmt aNumFmt( rRule.Get( 0 ));
@@ -50,7 +47,7 @@ void lcl_ExpandNumFmts( SwNumRule& rRule )
}
}
-SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
+SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, sal_uInt8 nNumLvl )
{
SwCharFmt* pChrFmt = rRule.Get( nNumLvl ).GetCharFmt();
if( !pChrFmt )
@@ -65,7 +62,7 @@ SfxItemSet& GetNumChrFmt( SwDoc& rDoc, SwNumRule& rRule, BYTE nNumLvl )
return (SfxItemSet&)pChrFmt->GetAttrSet();
}
-void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
+void SwRTFParser::ReadListLevel( SwNumRule& rRule, sal_uInt8 nNumLvl )
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
@@ -94,7 +91,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
{
if( DelCharAtEnd( sLvlText, ';' ).Len() &&
sLvlText.Len() && sLvlText.Len() ==
- (USHORT)(sLvlText.GetChar( 0 )) + 1 )
+ (sal_uInt16)(sLvlText.GetChar( 0 )) + 1 )
sLvlText.Erase( 0, 1 );
nLvlTxtLevel = 0;
}
@@ -160,7 +157,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
case RTF_LEVELSTARTAT:
if( pCurNumFmt && -1 != nTokenValue )
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_LEVELTEXT:
@@ -230,7 +227,7 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// values on the numrule format
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == aSet.GetItemState( RES_LR_SPACE,
- FALSE, &pItem ))
+ sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = *(SvxLRSpaceItem*)pItem;
pCurNumFmt->SetListtabPos( rLR.GetTxtLeft( ) );
@@ -264,11 +261,11 @@ void SwRTFParser::ReadListLevel( SwNumRule& rRule, BYTE nNumLvl )
// in sLvlText steht der Text, in sLvlNumber die Position
// der Ebenen in sLvlText
pCurNumFmt->SetPrefix(
- sLvlText.Copy( 0, USHORT( sLvlNumber.GetChar( 0 ))-1 ));
+ sLvlText.Copy( 0, sal_uInt16( sLvlNumber.GetChar( 0 ))-1 ));
pCurNumFmt->SetSuffix( sLvlText.Copy(
- USHORT( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
+ sal_uInt16( sLvlNumber.GetChar( sLvlNumber.Len()-1 )) ));
// wieviele Levels stehen im String?
- pCurNumFmt->SetIncludeUpperLevels( (BYTE)sLvlNumber.Len() );
+ pCurNumFmt->SetIncludeUpperLevels( (sal_uInt8)sLvlNumber.Len() );
}
else
{
@@ -292,9 +289,9 @@ void SwRTFParser::ReadListTable()
{
int nToken;
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- bNewNumList = TRUE;
+ bNewNumList = sal_True;
- BYTE nNumLvl = 0;
+ sal_uInt8 nNumLvl = 0;
SwNumRule* pCurRule = 0;
SwListEntry aEntry;
@@ -310,7 +307,7 @@ void SwRTFParser::ReadListTable()
if( 1 == nNumOpenBrakets )
{
if( aEntry.nListId )
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
aEntry.Clear();
}
}
@@ -344,14 +341,14 @@ void SwRTFParser::ReadListTable()
String sTmp( String::CreateFromAscii(
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
- aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, FALSE, SvxNumberFormat::LABEL_ALIGNMENT );
+ aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, 0, sal_False, SvxNumberFormat::LABEL_ALIGNMENT );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- pCurRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
+ pCurRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
}
break;
@@ -375,7 +372,7 @@ void SwRTFParser::ReadListTable()
break;
case RTF_LISTSIMPLE:
- pCurRule->SetContinusNum( TRUE );
+ pCurRule->SetContinusNum( sal_True );
break;
case RTF_LISTLEVEL:
@@ -394,16 +391,16 @@ void SwRTFParser::ReadListTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-BOOL lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
+sal_Bool lcl_IsEqual( SwNumRule* pOrigRule, SwNumRule* pRule )
{
- BOOL bRet = 0;
+ sal_Bool bRet = 0;
if( pOrigRule && pRule )
{
bRet = pOrigRule->GetRuleType() == pRule->GetRuleType() &&
pOrigRule->IsContinusNum() == pRule->IsContinusNum() &&
pOrigRule->IsAbsSpaces() == pRule->IsAbsSpaces();
if( bRet )
- for( BYTE n = 0; bRet && n < MAXLEVEL; ++n )
+ for( sal_uInt8 n = 0; bRet && n < MAXLEVEL; ++n )
{
const SwNumFmt* pOFmt = pOrigRule->GetNumFmt( n ),
* pFmt = pRule->GetNumFmt( n );
@@ -439,8 +436,8 @@ void SwRTFParser::ReadListOverrideTable()
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
SwListEntry aEntry;
SwNumRule* pRule = 0, *pOrigRule = 0;
- BYTE nNumLvl = 0;
- BOOL bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ sal_uInt8 nNumLvl = 0;
+ sal_Bool bOverrideFormat = sal_False, bOverrideStart = sal_False;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -455,7 +452,7 @@ void SwRTFParser::ReadListOverrideTable()
if( 1 == nNumOpenBrakets )
{
- bOverrideFormat = FALSE, bOverrideStart = FALSE;
+ bOverrideFormat = sal_False, bOverrideStart = sal_False;
if( pRule )
{
if( lcl_IsEqual( pOrigRule, pRule ))
@@ -473,7 +470,7 @@ void SwRTFParser::ReadListOverrideTable()
if( aEntry.nListId && aEntry.nListNo )
{
int nMatch=-1;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
if( aListArr[ --n ].nListId == aEntry.nListId)
{
@@ -483,7 +480,7 @@ void SwRTFParser::ReadListOverrideTable()
}
if(nMatch>=0)
{
- USHORT nMatch2 = static_cast< USHORT >(nMatch);
+ sal_uInt16 nMatch2 = static_cast< sal_uInt16 >(nMatch);
if (!aListArr[nMatch2].nListNo )
{
aListArr[nMatch2].nListNo = aEntry.nListNo;
@@ -492,7 +489,7 @@ void SwRTFParser::ReadListOverrideTable()
{
aEntry.nListDocPos=aListArr[nMatch2].nListDocPos;
aEntry.nListTemplateId=aListArr[nMatch2].nListTemplateId;
- aListArr.Insert(aEntry, aListArr.Count());
+ aListArr.push_back( aEntry );
}
if(pOrigRule)
aListArr[nMatch2].nListDocPos = aEntry.nListDocPos;
@@ -536,7 +533,7 @@ void SwRTFParser::ReadListOverrideTable()
// dann erzeugen wir mal schnell eine Kopie von der NumRule,
// denn diese wird jetzt mal kurz veraendert.
if( aEntry.nListId )
- for( USHORT n = 0; n < aListArr.Count(); ++n )
+ for( size_t n = 0; n < aListArr.size(); ++n )
if( aListArr[ n ].nListId == aEntry.nListId )
{
pRule = pDoc->GetNumRuleTbl()[
@@ -548,12 +545,12 @@ void SwRTFParser::ReadListOverrideTable()
aEntry.nListDocPos = pDoc->MakeNumRule( sTmp, pRule );
pRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ),
+ pRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ),
*pDoc );
- pRule->SetAutoRule( FALSE );
- nNumLvl = (BYTE)-1;
- aListArr.Insert( aEntry, aListArr.Count() );
+ pRule->SetAutoRule( sal_False );
+ nNumLvl = (sal_uInt8)-1;
+ aListArr.push_back( aEntry );
break;
}
@@ -576,11 +573,11 @@ void SwRTFParser::ReadListOverrideTable()
break;
case RTF_LISTOVERRIDESTART:
- bOverrideStart = TRUE;
+ bOverrideStart = sal_True;
break;
case RTF_LISTOVERRIDEFORMAT:
- bOverrideFormat = TRUE;
+ bOverrideFormat = sal_True;
break;
case RTF_LFOLEVEL:
@@ -597,17 +594,17 @@ void SwRTFParser::ReadListOverrideTable()
const SfxPoolItem* pItem( 0 );
const SwTxtFmtColl* pColl( 0 );
- USHORT nRulePos( USHRT_MAX );
+ sal_uInt16 nRulePos( USHRT_MAX );
const SwNumRule *pNumRule = 0;
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
if ( MAXLEVEL > pStyle->nOutlineNo )
{
- pColl = aTxtCollTbl.Get( (USHORT)GetStyleTbl().GetCurKey() );
+ pColl = aTxtCollTbl.Get( (sal_uInt16)GetStyleTbl().GetCurKey() );
if ( pColl )
{
const SfxItemState eItemState =
- pColl->GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem );
+ pColl->GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem );
if ( eItemState == SFX_ITEM_SET )
{
nRulePos = pDoc->FindNumRule( ((SwNumRuleItem*)pItem)->GetValue() );
@@ -623,11 +620,11 @@ void SwRTFParser::ReadListOverrideTable()
// now decrement all position in the listtable, which will
// behind the doc-rule position
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
{
SwListEntry& rEntry = aListArr[ --n ];
if( rEntry.nListDocPos == nRulePos )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else if( rEntry.nListDocPos > nRulePos )
--rEntry.nListDocPos;
}
@@ -647,18 +644,18 @@ void SwRTFParser::ReadListOverrideTable()
SkipToken( -1 ); // die schliesende Klammer wird "oben" ausgewertet
}
-SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, BOOL bRemoveFromList )
+SwNumRule* SwRTFParser::GetNumRuleOfListNo( long nListNo, sal_Bool bRemoveFromList )
{
SwNumRule* pRet = 0;
SwListEntry* pEntry;
- for( USHORT n = aListArr.Count(); n; )
+ for( size_t n = aListArr.size(); n; )
if( ( pEntry = &aListArr[ --n ])->nListNo == nListNo )
{
if( bRemoveFromList )
- aListArr.Remove( n );
+ aListArr.erase( aListArr.begin()+n );
else
{
- pEntry->bRuleUsed = TRUE;
+ pEntry->bRuleUsed = sal_True;
pRet = pDoc->GetNumRuleTbl()[ pEntry->nListDocPos ];
}
break;
@@ -670,7 +667,7 @@ void SwRTFParser::RemoveUnusedNumRule( SwNumRule* pRule )
{
if( pRule )
{
- for ( BYTE nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
+ for ( sal_uInt8 nLvl = 0; nLvl < MAXLEVEL; ++nLvl )
{
SwNumFmt& rNFmt = (SwNumFmt&)pRule->Get( nLvl );
SwCharFmt* pCFmt = rNFmt.GetCharFmt();
@@ -695,14 +692,14 @@ void SwRTFParser::RemoveUnusedNumRules()
{
SwListEntry* pEntry;
SvPtrarr aDelArr;
- USHORT n;
- for( n = aListArr.Count(); n; )
+ size_t n;
+ for( n = aListArr.size(); n; )
{
if( !( pEntry = &aListArr[ --n ])->bRuleUsed )
{
// really *NOT* used by anyone else?
- BOOL unused=TRUE;
- for(USHORT j = 0; j < aListArr.Count(); ++j)
+ sal_Bool unused=sal_True;
+ for(size_t j = 0; j < aListArr.size(); ++j)
{
if (aListArr[n].nListNo==aListArr[j].nListNo)
unused&=!aListArr[j].bRuleUsed;
@@ -749,27 +746,27 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
{
// lese die \pnseclvl - Gruppe
// nTokenValue gibt schon den richtigen Level vor 1 - 9!
- BYTE nLevel = 0;
+ sal_uInt8 nLevel = 0;
long nListNo = 0;
- BOOL bContinus = TRUE;
+ sal_Bool bContinus = sal_True;
if( RTF_PNSECLVL == nToken )
{
// suche die Rule - steht unter Nummer 3
nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue ? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue - 1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue - 1 ));
}
else
{
switch( nToken = GetNextToken() )
{
case RTF_PNLVL: nListNo = 3;
- bContinus = FALSE;
+ bContinus = sal_False;
nLevel = MAXLEVEL <= (unsigned long) nTokenValue
? MAXLEVEL - 1
- : (!nTokenValue ? 0 : BYTE( nTokenValue-1 ));
+ : (!nTokenValue ? 0 : sal_uInt8( nTokenValue-1 ));
break;
case RTF_PNLVLBODY:
@@ -788,7 +785,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
}
// suche die Rule - steht unter Nummer 3
- USHORT nNewFlag = static_cast< USHORT >(1 << nListNo);
+ sal_uInt16 nNewFlag = static_cast< sal_uInt16 >(1 << nListNo);
SwNumRule* pCurRule = GetNumRuleOfListNo( nListNo,
0 != ( nNewNumSectDef & nNewFlag ) );
if( !pCurRule )
@@ -799,12 +796,12 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
RTL_CONSTASCII_STRINGPARAM( RTF_NUMRULE_NAME " 1" )));
SwListEntry aEntry( nListNo, 0, pDoc->MakeNumRule( sTmp ));
aEntry.nListNo = nListNo;
- aListArr.Insert( aEntry, aListArr.Count() );
+ aListArr.push_back( aEntry );
pCurRule = pDoc->GetNumRuleTbl()[ aEntry.nListDocPos ];
// #i91400#
- pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, FALSE ), *pDoc );
+ pCurRule->SetName( pDoc->GetUniqueNumRuleName( &sTmp, sal_False ), *pDoc );
- pCurRule->SetAutoRule( FALSE );
+ pCurRule->SetAutoRule( sal_False );
pCurRule->SetContinusNum( bContinus );
}
@@ -822,10 +819,10 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
// dann den akt. Lvl und Rule am Absatz setzen.
// Dieses muss aber in den vorherigen "Kontext", sprich in den vor
// der Klammer offenen Attrset. Darum das SetNewGroup davor und dahinter
- SetNewGroup( FALSE );
+ SetNewGroup( sal_False );
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
GetAttrSet().Put( SwNumRuleItem( pCurRule->GetName() ));
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
}
FontUnderline eUnderline;
@@ -875,7 +872,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNF:
{
- const Font& rSVFont = GetFont( USHORT(nTokenValue) );
+ const Font& rSVFont = GetFont( sal_uInt16(nTokenValue) );
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
SvxFontItem( rSVFont.GetFamily(),
rSVFont.GetName(), rSVFont.GetStyleName(),
@@ -892,7 +889,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
else
nTokenValue *= 10;
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxFontHeightItem( (const USHORT)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
+ SvxFontHeightItem( (const sal_uInt16)nTokenValue, 100, RES_CHRATR_FONTSIZE ));
}
break;
@@ -928,7 +925,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNCF:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put( SvxColorItem(
- GetColor( USHORT(nTokenValue) ), RES_CHRATR_COLOR ));
+ GetColor( sal_uInt16(nTokenValue) ), RES_CHRATR_COLOR ));
}
break;
@@ -948,7 +945,7 @@ SwNumRule *SwRTFParser::ReadNumSecLevel( int nToken )
case RTF_PNULW:
{
GetNumChrFmt( *pDoc, *pCurRule, nLevel ).Put(
- SvxWordLineModeItem( TRUE, RES_CHRATR_WORDLINEMODE ));
+ SvxWordLineModeItem( sal_True, RES_CHRATR_WORDLINEMODE ));
}
eUnderline = UNDERLINE_SINGLE;
goto NUMATTR_SETUNDERLINE;
@@ -967,13 +964,13 @@ NUMATTR_SETUNDERLINE:
pCurNumFmt->SetIndentAt( (nLevel + 1 ) * nTokenValue );
break;
case RTF_PNSP:
- pCurNumFmt->SetCharTextDistance( USHORT( nTokenValue ));
+ pCurNumFmt->SetCharTextDistance( sal_uInt16( nTokenValue ));
break;
case RTF_PNPREV:
if( nLevel )
{
- BYTE nPrev = 2, nLast = nLevel;
+ sal_uInt8 nPrev = 2, nLast = nLevel;
while( nLast && 1 < pCurRule->Get( --nLast ).GetIncludeUpperLevels() )
++nPrev;
pCurNumFmt->SetIncludeUpperLevels( nPrev );
@@ -985,7 +982,7 @@ NUMATTR_SETUNDERLINE:
case RTF_PNQR: pCurNumFmt->SetNumAdjust( SVX_ADJUST_RIGHT ); break;
case RTF_PNSTART:
- pCurNumFmt->SetStart( USHORT( nTokenValue ));
+ pCurNumFmt->SetStart( sal_uInt16( nTokenValue ));
break;
case RTF_PNNUMONCE:
@@ -1040,7 +1037,7 @@ NUMATTR_SETUNDERLINE:
pCurNumFmt->SetPrefix( aEmptyStr );
// den Font oder sogar das gesamte CharFormat loeschen?
- if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, FALSE ))
+ if( SFX_ITEM_SET == pChFmt->GetItemState( RES_CHRATR_FONT, sal_False ))
{
if( 1 == pChFmt->GetAttrSet().Count() )
{
diff --git a/sw/source/filter/rtf/rtftbl.cxx b/sw/source/filter/rtf/rtftbl.cxx
index 09471636720c..d7dff9ab154c 100644
--- a/sw/source/filter/rtf/rtftbl.cxx
+++ b/sw/source/filter/rtf/rtftbl.cxx
@@ -56,13 +56,13 @@ SV_DECL_PTRARR( SwBoxFrmFmts, SwTableBoxFmtPtr, 25, 50 )
class SwShareBoxFmts;
extern void _DeleteBox( SwTable& rTbl, SwTableBox* pBox, SwUndo* = 0,
- BOOL = TRUE, const BOOL = TRUE, SwShareBoxFmts* = 0 );
+ sal_Bool = sal_True, const sal_Bool = sal_True, SwShareBoxFmts* = 0 );
struct Row
{
bool mbUseLeftRowPad, mbUseRightRowPad, mbUseTopRowPad, mbUseBottomRowPad;
long mnLeftRowPad, mnRightRowPad, mnTopRowPad, mnBottomRowPad;
- USHORT mnBrdDist;
+ sal_uInt16 mnBrdDist;
Row() :
mbUseLeftRowPad(false), mbUseRightRowPad(false),
mbUseTopRowPad(false), mbUseBottomRowPad(false),
@@ -75,22 +75,22 @@ static void SetRowBorder(SfxItemSet& rSet, const Row &rRow)
{
#if 1
SvxBoxItem aBox((const SvxBoxItem&)rSet.Get(RES_BOX, false));
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist),
BOX_LINE_LEFT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseRightRowPad ? rRow.mnRightRowPad : rRow.mnBrdDist),
BOX_LINE_RIGHT);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseTopRowPad ? rRow.mnTopRowPad : 0),
BOX_LINE_TOP);
- aBox.SetDistance( static_cast< USHORT >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
+ aBox.SetDistance( static_cast< sal_uInt16 >(rRow.mbUseBottomRowPad ? rRow.mnBottomRowPad : 0),
BOX_LINE_BOTTOM);
rSet.Put(aBox);
#else
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, FALSE, &pItem))
+ if (SFX_ITEM_SET == rSet.GetItemState(RES_BOX, sal_False, &pItem))
{
SvxBoxItem aBox( *(SvxBoxItem*)pItem );
aBox.SetDistance(rRow.mbUseLeftRowPad ? rRow.mnLeftRowPad : rRow.mnBrdDist,
@@ -158,7 +158,7 @@ void SwRTFParser::ReadTable( int nToken )
// verhinder Tabelle in Tabelle/Footnote
SwTwips nTblSz = 0;
- int bReadNewCell = FALSE, bChkExistTbl = FALSE;
+ int bReadNewCell = sal_False, bChkExistTbl = sal_False;
enum Limits {eMAXCELLS=64000};
@@ -172,28 +172,28 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_TROWD == nToken )
nToken = GetNextToken(); // RTF_TROWD ueberlesen
- // Flags fuer die gemergten Boxen loeschen
+ // Flag for delete merged boxes
aMergeBoxes.clear();
aMergeBoxes.push_back(false);
- nAktBox = 0;
+ m_nCurrentBox = 0;
// wenn schon in einer Tabellen, dann splitte oder benutze
// die bisherigen Boxen weiter
- bChkExistTbl = 0 != pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->FindTableNode();
+ bChkExistTbl = 0 != pPam->GetPoint()->nNode.GetNode().FindTableNode();
}
else
{
- bReadNewCell = TRUE;
+ bReadNewCell = sal_True;
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
// very robust to avoid crashes like bug 127425 + crash reports 118743
if( pLine )
{
- USHORT nTmpBox = nAktBox;
+ sal_uInt16 nTmpBox = m_nCurrentBox;
if( nTmpBox > pLine->GetTabBoxes().Count() )
nTmpBox = pLine->GetTabBoxes().Count();
- for( USHORT n = nTmpBox; n; )
+ for (sal_uInt16 n = nTmpBox; n; )
{
const SwTableBox *pTmp = pLine->GetTabBoxes()[ --n ];
if( pTmp )
@@ -223,7 +223,7 @@ void SwRTFParser::ReadTable( int nToken )
SvxFrameDirection eDir = FRMDIR_HORI_LEFT_TOP;
bool bCantSplit = false;
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
switch( nToken )
{
@@ -286,12 +286,13 @@ void SwRTFParser::ReadTable( int nToken )
// the first cell cannot be merged with earlier ones.
if (aMergeBoxes.size() > 1)
{
- aMergeBoxes.back() = TRUE;
+ aMergeBoxes.back() = sal_True;
}
break;
case RTF_CELLX:
- if (!bTrowdRead) {
+ if (!bTrowdRead && (aMergeBoxes.size() < (SAL_MAX_UINT16 - 1)))
+ {
SwTableBoxFmt* pFmt = pBoxFmt;
SwTwips nSize = nTokenValue - nTblSz;
if( aMergeBoxes.back() )
@@ -302,9 +303,12 @@ void SwRTFParser::ReadTable( int nToken )
{
SwTableLines& rLns = pTableNode->GetTable().GetTabLines();
SwTableLine* pLine = rLns[ rLns.Count()-1 ];
- if(nAktBox!=0)
- --nAktBox;
- pFmt = (SwTableBoxFmt*)pLine->GetTabBoxes()[ nAktBox ]->GetFrmFmt();
+ if (m_nCurrentBox != 0)
+ {
+ --m_nCurrentBox;
+ }
+ pFmt = static_cast<SwTableBoxFmt*>(
+ pLine->GetTabBoxes()[ m_nCurrentBox ]->GetFrmFmt());
}
else
pFmt = aBoxFmts[ aBoxFmts.Count()-1 ];
@@ -319,7 +323,7 @@ void SwRTFParser::ReadTable( int nToken )
//
if (nSize<=2*aRow.mnBrdDist) {
aRow.mnRightRowPad=0;
- aRow.mbUseRightRowPad=TRUE;
+ aRow.mbUseRightRowPad=sal_True;
}
SetRowBorder((SfxItemSet&)pBoxFmt->GetAttrSet(), aRow);
aBoxFmts.Insert( pBoxFmt, aBoxFmts.Count() );
@@ -330,21 +334,21 @@ void SwRTFParser::ReadTable( int nToken )
nSize = COL_DFLT_WIDTH;
pFmt->SetFmtAttr( SwFmtFrmSize( ATT_VAR_SIZE, nSize, 0 ));
nTblSz = nTokenValue;
- aMergeBoxes.push_back(FALSE);
+ aMergeBoxes.push_back(sal_False);
SvxBoxItem aBox(pFmt->GetBox());
if (bUseRightCellPad)
- aBox.SetDistance( static_cast< USHORT >(nRightCellPad), BOX_LINE_RIGHT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nRightCellPad), BOX_LINE_RIGHT);
if (bUseBottomCellPad)
- aBox.SetDistance( static_cast< USHORT >(nBottomCellPad), BOX_LINE_BOTTOM);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nBottomCellPad), BOX_LINE_BOTTOM);
//Yes, these are the wrong way around, there appears to
//be a bug in word where these are swapped.
if (bUseLeftCellPad)
- aBox.SetDistance( static_cast< USHORT >(nLeftCellPad), BOX_LINE_TOP);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nLeftCellPad), BOX_LINE_TOP);
if (bUseTopCellPad)
- aBox.SetDistance( static_cast< USHORT >(nTopCellPad), BOX_LINE_LEFT);
+ aBox.SetDistance( static_cast< sal_uInt16 >(nTopCellPad), BOX_LINE_LEFT);
pFmt->SetFmtAttr(aBox);
@@ -358,7 +362,7 @@ void SwRTFParser::ReadTable( int nToken )
case RTF_TRGAPH:
//$flr bug: RTF: wrong internal table cell margin imported (A13)
- aRow.mnBrdDist = (nTokenValue>0?(USHORT)nTokenValue:0); // filter out negative values of \trgaph
+ aRow.mnBrdDist = (nTokenValue>0?(sal_uInt16)nTokenValue:0); // filter out negative values of \trgaph
break;
case RTF_TRQL: eAdjust = text::HoriOrientation::LEFT; break;
@@ -412,7 +416,7 @@ void SwRTFParser::ReadTable( int nToken )
if( aMergeBoxes.back() )
break;
ReadBackgroundAttr( nToken,
- (SfxItemSet&)pBoxFmt->GetAttrSet(), TRUE );
+ (SfxItemSet&)pBoxFmt->GetAttrSet(), sal_True );
}
else if( ( nToken & ~(0xff | RTF_TABLEDEF) ) == RTF_BRDRDEF ||
IsBorderToken(nToken))
@@ -422,7 +426,7 @@ void SwRTFParser::ReadTable( int nToken )
SfxItemSet& rSet = (SfxItemSet&)pBoxFmt->GetAttrSet();
if(!IsBorderToken( nToken ))
- ReadBorderAttr( nToken, rSet, TRUE );
+ ReadBorderAttr( nToken, rSet, sal_True );
else
NextToken( nToken );
}
@@ -431,7 +435,7 @@ void SwRTFParser::ReadTable( int nToken )
if( RTF_UNKNOWNCONTROL == nToken )
NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
}
@@ -449,17 +453,16 @@ void SwRTFParser::ReadTable( int nToken )
// das letzte temp. BoxFmt loeschen
delete pBoxFmt;
- // es wurde keine einzige Box erkannt
- if( nAktBox == aMergeBoxes.size()-1 || ( bReadNewCell && !pTableNode ))
+ // It has been recognized as not single box
+ if( m_nCurrentBox == aMergeBoxes.size()-1 || ( bReadNewCell && !pTableNode ))
{
aMergeBoxes.insert(aMergeBoxes.begin(), aMergeBackup.begin(), aMergeBackup.end());
- SkipToken( -1 ); // zum Letzen gueltigen zurueck
return;
}
nTblSz -= nLSpace;
- int bNewTbl = TRUE;
+ int bNewTbl = sal_True;
SwTableLine* pNewLine;
bTrowdRead=true;
@@ -528,7 +531,7 @@ void SwRTFParser::ReadTable( int nToken )
pBox = (*pLns)[ 0 ]->GetTabBoxes()[ 0 ];
SwNodeIndex aTmpIdx( *pBox->GetSttNd() );
- pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, FALSE );
+ pDoc->GetNodes().SplitTable( aTmpIdx, HEADLINE_NONE, sal_False );
pTableNode = pPam->GetNode()->FindTableNode();
pFmt = pTableNode->GetTable().GetFrmFmt();
@@ -548,8 +551,8 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine = (*pLns)[ pLns->Count() - 1 ];
// jetzt die Boxen abgleichen
- USHORT nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
- USHORT n;
+ sal_uInt16 nBoxes = Min( pNewLine->GetTabBoxes().Count(), aBoxFmts.Count() );
+ sal_uInt16 n;
for( n = 0; n < nBoxes; ++n )
{
@@ -560,18 +563,20 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts.Remove( 0, n );
if( aBoxFmts.Count() ) // es muessen noch neue zugefuegt werden
- nAktBox = n;
+ {
+ m_nCurrentBox = n;
+ }
else // es mussen noch Boxen geloescht werden
{
// remove ContentIndex of other Bound
pPam->SetMark(); pPam->DeleteMark();
while( n < pNewLine->GetTabBoxes().Count() )
_DeleteBox( pTableNode->GetTable(),
- pNewLine->GetTabBoxes()[ n ], 0, FALSE, FALSE );
+ pNewLine->GetTabBoxes()[ n ], 0, sal_False, sal_False );
}
pOldTblNd = pTableNode;
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
{
//TabellenUmrandungen optimieren
@@ -632,7 +637,7 @@ void SwRTFParser::ReadTable( int nToken )
pNewLine->GetFrmFmt()->ResetFmtAttr( RES_FRM_SIZE );
rLns.C40_INSERT( SwTableLine, pNewLine, rLns.Count() );
}
- bNewTbl = FALSE;
+ bNewTbl = sal_False;
}
else
{
@@ -640,7 +645,7 @@ void SwRTFParser::ReadTable( int nToken )
const SwTable *pTable =
pDoc->InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, FALSE, FALSE );
+ *pPam->GetPoint(), 1, 1, eAdjust, 0, 0, sal_False, sal_False );
bContainsTablePara=true;
pTableNode = pTable ? pTable->GetTableNode() : 0;
@@ -670,7 +675,7 @@ void SwRTFParser::ReadTable( int nToken )
((SfxItemSet&)pFmt->GetAttrSet()).Put( aL );
}
- nAktBox = 0;
+ m_nCurrentBox = 0;
pOldTblNd = pTableNode;
{
@@ -700,7 +705,7 @@ void SwRTFParser::ReadTable( int nToken )
if( !pColl )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
- USHORT nStt = 0;
+ sal_uInt16 nStt = 0;
if( bNewTbl )
{
SwTableBox* pBox = pNewLine->GetTabBoxes()[0];
@@ -722,12 +727,14 @@ void SwRTFParser::ReadTable( int nToken )
aBoxFmts[ nStt ],
// Formate fuer den TextNode der Box
pColl, 0,
- nAktBox + nStt, 1 );
+ m_nCurrentBox + nStt, 1 );
}
}
if( bChkExistTbl )
- nAktBox = 0;
+ {
+ m_nCurrentBox = 0;
+ }
maInsertedTables.InsertTable(*pTableNode, *pPam);
@@ -739,7 +746,8 @@ void SwRTFParser::ReadTable( int nToken )
if (pNewLine)
{
SwTableBoxes &rBoxes = pNewLine->GetTabBoxes();
- if (SwTableBox* pBox = (nAktBox < rBoxes.Count() ? rBoxes[nAktBox] : 0))
+ if (SwTableBox* pBox = ((m_nCurrentBox < rBoxes.Count())
+ ? rBoxes[m_nCurrentBox] : 0))
{
if (const SwStartNode *pStart = pBox->GetSttNd())
{
@@ -785,7 +793,7 @@ void SwRTFParser::ReadTable( int nToken )
//which were intended to be inside the tablerow are now left outside
//the table after the row was placed before the current insertion point
SvxRTFItemStack& rAttrStk = GetAttrStack();
- for (USHORT n = 0; n < rAttrStk.Count(); ++n)
+ for (size_t n = 0; n < rAttrStk.size(); ++n)
{
SvxRTFItemStackType* pStk = rAttrStk[n];
pStk->MoveFullNode(aOldPos, aNewPos);
@@ -809,16 +817,16 @@ void SwRTFParser::GotoNextBox()
SwTableBoxes& rBoxes = pLine->GetTabBoxes();
SwTableBox* pBox = rBoxes[ rBoxes.Count()-1 ];
- if( ++nAktBox >= aMergeBoxes.size() )
- nAktBox = aMergeBoxes.size()-1;
+ if( ++m_nCurrentBox >= aMergeBoxes.size() )
+ m_nCurrentBox = aMergeBoxes.size()-1;
- if( !aMergeBoxes[ nAktBox ] )
+ if (!aMergeBoxes[ m_nCurrentBox ])
{
- int bMove = TRUE;
+ int bMove = sal_True;
if( pBox->GetSttIdx() > pPam->GetPoint()->nNode.GetIndex() )
{
- USHORT nRealBox = 0;
- for( USHORT nTmp = 0; nTmp < nAktBox; ++nTmp )
+ sal_uInt16 nRealBox = 0;
+ for (sal_uInt16 nTmp = 0; nTmp < m_nCurrentBox; ++nTmp)
if( !aMergeBoxes[ nTmp ] )
++nRealBox;
@@ -826,15 +834,15 @@ void SwRTFParser::GotoNextBox()
{
pPam->GetPoint()->nNode = *rBoxes[ nRealBox ]->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveBackward, fnGoCntnt );
- bMove = FALSE;
+ bMove = sal_False;
}
}
- if( bMove && nAktBox + 1U == aMergeBoxes.size() )
+ if( bMove && m_nCurrentBox + 1U == aMergeBoxes.size() )
// dann hinter die Tabelle
pPam->Move( fnMoveForward, fnGoNode );
}
- else if( !pDoc->GetNodes()[ pPam->GetPoint()->nNode ]->IsCntntNode() )
+ else if (pPam->GetPoint()->nNode.GetNode().IsCntntNode())
// dann in die vorherige ans Ende
pPam->Move( fnMoveBackward, fnGoCntnt );
}
@@ -845,7 +853,7 @@ void SwRTFParser::NewTblLine()
nInsTblRow = USHRT_MAX;
// erweiter die aktuelle um eine neue Line
- BOOL bMakeCopy = FALSE;
+ sal_Bool bMakeCopy = sal_False;
SwNode* pNd = pDoc->GetNodes()[ pPam->GetPoint()->nNode.GetIndex()-1 ];
if( !pNd->IsEndNode() ||
!(pNd = pNd->StartOfSectionNode())->IsTableNode() )
@@ -853,7 +861,7 @@ void SwRTFParser::NewTblLine()
if( !pOldTblNd )
return ;
- bMakeCopy = TRUE;
+ bMakeCopy = sal_True;
pNd = pOldTblNd;
}
pTableNode = (SwTableNode*)pNd;
@@ -869,7 +877,7 @@ void SwRTFParser::NewTblLine()
if( !bMakeCopy &&
64000 < pTableNode->GetTable().GetTabSortBoxes().Count() )
{
- bMakeCopy = TRUE; // spaetestens jetzt eine neue anfangen!
+ bMakeCopy = sal_True; // spaetestens jetzt eine neue anfangen!
}
if( bMakeCopy )
@@ -878,8 +886,8 @@ void SwRTFParser::NewTblLine()
SwSelBoxes aBoxes;
pTableNode->GetTable().SelLineFromBox( pBox, aBoxes );
pTableNode->GetTable().MakeCopy( pDoc, *pPam->GetPoint(),
- aBoxes, FALSE );
- ULONG nNd = pPam->GetPoint()->nNode.GetIndex()-1;
+ aBoxes, sal_False );
+ sal_uLong nNd = pPam->GetPoint()->nNode.GetIndex()-1;
pTableNode = pDoc->GetNodes()[ nNd ]->FindTableNode();
pOldTblNd = pTableNode;
@@ -892,10 +900,10 @@ void SwRTFParser::NewTblLine()
pBox = (*pLns)[ pLns->Count()-1 ]->GetTabBoxes()[0];
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
pPam->GetPoint()->nNode = *pBox->GetSttNd();
pPam->Move( fnMoveForward );
- nAktBox = 0;
+ m_nCurrentBox = 0;
// alle Nodes in den Boxen auf die "default" Vorlage setzten
{
@@ -925,12 +933,11 @@ void SwRTFParser::NewTblLine()
pPam->DeleteMark();
}
- // alle Attribute, die schon auf den nachfolgen zeigen auf die neue
- // Box umsetzen !!
+ // all attributes which will be displayed in new Box
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
- if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == ULONG(nOldPos) &&
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
+ if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == sal_uLong(nOldPos) &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
}
diff --git a/sw/source/filter/rtf/swparrtf.cxx b/sw/source/filter/rtf/swparrtf.cxx
index f1ec1ba43a11..ee40c39471ee 100644
--- a/sw/source/filter/rtf/swparrtf.cxx
+++ b/sw/source/filter/rtf/swparrtf.cxx
@@ -119,9 +119,9 @@ using namespace ::com::sun::star;
// einige Hilfs-Funktionen
// char
-inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxFontHeightItem& GetSize(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxFontHeightItem&)rSet.Get( RES_CHRATR_FONTSIZE,bInP); }
-inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,BOOL bInP=TRUE)
+inline const SvxLRSpaceItem& GetLRSpace(const SfxItemSet& rSet,sal_Bool bInP=sal_True)
{ return (const SvxLRSpaceItem&)rSet.Get( RES_LR_SPACE,bInP); }
/* */
@@ -132,11 +132,11 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportRTF()
}
// Aufruf fuer die allg. Reader-Schnittstelle
-ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
+sal_uLong RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String &)
{
if( !pStrm )
{
- OSL_ENSURE( FALSE, "RTF-Read ohne Stream" );
+ OSL_ENSURE( sal_False, "RTF-Read ohne Stream" );
return ERR_SWG_READ_ERROR;
}
@@ -151,7 +151,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
Reader::ResetFrmFmts( rDoc );
}
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
SwDocShell *pDocShell(rDoc.GetDocShell());
DBG_ASSERT(pDocShell, "no SwDocShell");
uno::Reference<document::XDocumentProperties> xDocProps;
@@ -178,7 +178,7 @@ ULONG RtfReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const S
return nRet;
}
-ULONG RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
+sal_uLong RtfReader::Read(SvStream* pStream, SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam)
{
pStrm = pStream;
return Read(rDoc, rBaseURL, rPam, rBaseURL);
@@ -203,13 +203,13 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pSttNdIdx(0),
pRegionEndIdx(0),
pDoc(pD),
- pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< BOOL >(bReadNewDoc))),
+ pRelNumRule(new SwRelNumRuleSpaces(*pD, static_cast< sal_Bool >(bReadNewDoc))),
pRedlineInsert(0),
pRedlineDelete(0),
sBaseURL( rBaseURL ),
nAktPageDesc(0),
nAktFirstPageDesc(0),
- nAktBox(0),
+ m_nCurrentBox(0),
nInsTblRow(USHRT_MAX),
nNewNumSectDef(USHRT_MAX),
nRowsToRepeat(0),
@@ -230,11 +230,11 @@ SwRTFParser::SwRTFParser(SwDoc* pD,
pPam = new SwPaM( *rCrsr.GetPoint() );
SetInsPos( SwxPosition( pPam ) );
SetChkStyleAttr( 0 != bReadNewDoc );
- SetCalcValue( FALSE );
- SetReadDocInfo( TRUE );
+ SetCalcValue( sal_False );
+ SetReadDocInfo( sal_True );
// diese sollen zusaetzlich ueber \pard zurueck gesetzt werden
- USHORT temp;
+ sal_uInt16 temp;
temp = RES_TXTATR_CHARFMT; AddPlainAttr( temp );
temp = RES_PAGEDESC; AddPardAttr( temp );
temp = RES_BREAK; AddPardAttr( temp );
@@ -263,8 +263,8 @@ bool lcl_UsedPara(SwPaM &rPam)
if( rPam.GetPoint()->nContent.GetIndex() ||
( 0 != ( pCNd = rPam.GetCntntNode()) &&
0 != ( pSet = pCNd->GetpSwAttrSet()) &&
- ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE ) ||
- SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE ))))
+ ( SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False ) ||
+ SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False ))))
return true;
return false;
}
@@ -273,7 +273,7 @@ void SwRTFParser::Continue( int nToken )
{
if( bFirstContinue )
{
- bFirstContinue = FALSE;
+ bFirstContinue = sal_False;
if (IsNewDoc())
{
@@ -331,14 +331,14 @@ void SwRTFParser::Continue( int nToken )
( RES_POOLCOLL_STANDARD, false ));
// verhinder das einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
mbReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
}
// Laufbalken anzeigen, aber nur bei synchronem Call
- ULONG nCurrPos = rInput.Tell();
+ sal_uLong nCurrPos = rInput.Tell();
rInput.Seek(STREAM_SEEK_TO_END);
rInput.ResetError();
::StartProgress( STR_STATSTR_W4WREAD, 0, rInput.Tell(), pDoc->GetDocShell());
@@ -381,19 +381,19 @@ void SwRTFParser::Continue( int nToken )
// !!! sollte nicht moeglich sein, oder ??
OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( TRUE ).nNode.GetIndex(),
"Pam.Bound1 steht noch im Node" );
- OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( FALSE ).nNode.GetIndex(),
+ OSL_ENSURE( pSttNdIdx->GetIndex()+1 != pPam->GetBound( sal_False ).nNode.GetIndex(),
"Pam.Bound2 steht noch im Node" );
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( TRUE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_True ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( TRUE ).nContent.GetIndex();
- pPam->GetBound( TRUE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_True ).nContent.GetIndex();
+ pPam->GetBound( sal_True ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
-if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
+if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( sal_False ).nNode.GetIndex() )
{
- xub_StrLen nCntPos = pPam->GetBound( FALSE ).nContent.GetIndex();
- pPam->GetBound( FALSE ).nContent.Assign( pTxtNode,
+ xub_StrLen nCntPos = pPam->GetBound( sal_False ).nContent.GetIndex();
+ pPam->GetBound( sal_False ).nContent.Assign( pTxtNode,
pTxtNode->GetTxt().Len() + nCntPos );
}
#endif
@@ -419,7 +419,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
StartOfSectionNode()->GetSectionNode();
if( pSectNd )
pSectNd->GetSection().GetFmt()->SetFmtAttr(
- SwFmtNoBalancedColumns( TRUE ) );
+ SwFmtNoBalancedColumns( sal_True ) );
}
DelLastNode();
@@ -445,7 +445,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pAktNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
if( IsNewDoc() )
{
SwNode* pTmp = pDoc->GetNodes()[ nNodeIdx -1 ];
@@ -456,7 +456,7 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
const SwSpzFrmFmts* pFrmFmts = pDoc->GetSpzFrmFmts();
if ( pFrmFmts && pFrmFmts->Count() )
{
- for ( USHORT nI = pFrmFmts->Count(); nI; --nI )
+ for ( sal_uInt16 nI = pFrmFmts->Count(); nI; --nI )
{
const SwFmtAnchor & rAnchor = (*pFrmFmts)[ nI - 1 ]->GetAnchor();
if ((FLY_AT_PARA == rAnchor.GetAnchorId()) ||
@@ -521,10 +521,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
if( pPrev->HasSwAttrSet() )
pTxtNode->SetAttr( *pPrev->GetpSwAttrSet() );
- if( &pPam->GetBound(TRUE).nNode.GetNode() == pPrev )
- pPam->GetBound(TRUE).nContent.Assign( pTxtNode, 0 );
- if( &pPam->GetBound(FALSE).nNode.GetNode() == pPrev )
- pPam->GetBound(FALSE).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_True).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_True).nContent.Assign( pTxtNode, 0 );
+ if( &pPam->GetBound(sal_False).nNode.GetNode() == pPrev )
+ pPam->GetBound(sal_False).nContent.Assign( pTxtNode, 0 );
pTxtNode->JoinPrev();
}
@@ -542,10 +542,10 @@ if( pSttNdIdx->GetIndex()+1 == pPam->GetBound( FALSE ).nNode.GetIndex() )
}
bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth)
+ sal_uInt16 nNettoWidth)
{
//sprmSCcolumns - Anzahl der Spalten - 1
- USHORT nCols = static_cast< USHORT >(rSection.NoCols());
+ sal_uInt16 nCols = static_cast< sal_uInt16 >(rSection.NoCols());
if (nCols < 2)
return false; // keine oder bloedsinnige Spalten
@@ -553,7 +553,7 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
SwFmtCol aCol; // Erzeuge SwFmtCol
//sprmSDxaColumns - Default-Abstand 1.25 cm
- USHORT nColSpace = static_cast< USHORT >(rSection.StandardColSeperation());
+ sal_uInt16 nColSpace = static_cast< sal_uInt16 >(rSection.StandardColSeperation());
aCol.Init( nCols, nColSpace, nNettoWidth );
@@ -561,15 +561,15 @@ bool rtfSections::SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
if (rSection.maPageInfo.maColumns.size())
{
aCol._SetOrtho(false);
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for(USHORT n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for(sal_uInt16 n=0, i=0; n < rSection.maPageInfo.maColumns.size() && i < nCols; n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = static_cast< USHORT >(rSection.maPageInfo.maColumns[ n+1 ]);
+ sal_uInt16 nSp = static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n+1 ]);
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
- pCol->SetWishWidth( static_cast< USHORT >(rSection.maPageInfo.maColumns[ n ]) +
+ pCol->SetWishWidth( static_cast< sal_uInt16 >(rSection.maPageInfo.maColumns[ n ]) +
pCol->GetLeft() + pCol->GetRight());
nWishWidth = nWishWidth + pCol->GetWishWidth();
}
@@ -597,7 +597,7 @@ void rtfSections::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
if (!bIgnoreCols)
{
- SetCols(rFmt, rSection, static_cast< USHORT >(rSection.GetPageWidth() -
+ SetCols(rFmt, rSection, static_cast< sal_uInt16 >(rSection.GetPageWidth() -
rSection.GetPageLeft() - rSection.GetPageRight()));
}
@@ -866,7 +866,7 @@ SwSectionFmt *rtfSections::InsertSection(SwPaM& rMyPaM, rtfSection &rSection)
OSL_ENSURE(pFmt, "impossible");
if (!pFmt)
return 0;
- SetCols(*pFmt, rSection, (USHORT)(nWidth - nLeft - nRight) );
+ SetCols(*pFmt, rSection, (sal_uInt16)(nWidth - nLeft - nRight) );
return pFmt;
}
@@ -916,7 +916,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc, ShellResource::NORMAL_PAGE)
, 0, false);
aIter->mpTitlePage = &mrReader.pDoc->_GetPageDesc(nPos);
@@ -937,7 +937,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
else
{
- USHORT nPos = mrReader.pDoc->MakePageDesc(
+ sal_uInt16 nPos = mrReader.pDoc->MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(nDesc,
aIter->HasTitlePage() ? ShellResource::FIRST_PAGE : ShellResource::NORMAL_PAGE),
aIter->mpTitlePage, false);
@@ -961,7 +961,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
if (aIter->PageRestartNo() ||
((aIter == aStart) && aIter->PageStartAt() != 1))
- aPgDesc.SetNumOffset( static_cast< USHORT >(aIter->PageStartAt()) );
+ aPgDesc.SetNumOffset( static_cast< sal_uInt16 >(aIter->PageStartAt()) );
/*
If its a table here, apply the pagebreak to the table
@@ -1004,8 +1004,7 @@ void rtfSections::InsertSegments(bool bNewDoc)
}
const SwPosition* pPos = aSectPaM.GetPoint();
- const SwTxtNode* pSttNd =
- mrReader.pDoc->GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
if (pTableNd)
{
@@ -1238,7 +1237,7 @@ void SwRTFParser::ReadDrawingObject()
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
SwFmtAnchor aAnchor( FLY_AT_PARA );
@@ -1268,7 +1267,7 @@ void SwRTFParser::InsertShpObject(SdrObject* pStroke, int _nZOrder)
aSur.SetContour( false );
aSur.SetOutside(true);
aFlySet.Put( aSur );
- SwFmtFollowTextFlow aFollowTextFlow( FALSE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_False );
aFlySet.Put( aFollowTextFlow );
SwFmtAnchor aAnchor( FLY_AT_PARA );
@@ -1508,14 +1507,14 @@ void SwRTFParser::ReadShapeObject()
}
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-USHORT SwRTFParser::ReadRevTbl()
+sal_uInt16 SwRTFParser::ReadRevTbl()
{
int nNumOpenBrakets = 1, nToken; // die erste wurde schon vorher erkannt !!
- USHORT nAuthorTableIndex = 0;
+ sal_uInt16 nAuthorTableIndex = 0;
while( nNumOpenBrakets && IsParserWorking() )
{
@@ -1543,7 +1542,7 @@ USHORT SwRTFParser::ReadRevTbl()
case RTF_TEXTTOKEN:
aToken.EraseTrailingChars(';');
- USHORT nSWId = pDoc->InsertRedlineAuthor(aToken);
+ sal_uInt16 nSWId = pDoc->InsertRedlineAuthor(aToken);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -1562,19 +1561,34 @@ USHORT SwRTFParser::ReadRevTbl()
void SwRTFParser::NextToken( int nToken )
{
- USHORT eDateFmt;
+ sal_uInt16 eDateFmt;
switch( nToken )
{
case RTF_FOOTNOTE:
+ {
//We can only insert a footnote if we're not inside a footnote. e.g.
//#i7713#
- if (!mbIsFootnote)
+
+ // in insert mode it's also possible to be inside of a footnote!
+ bool bInsertIntoFootnote = false;
+ if( !IsNewDoc() )
+ {
+ SwStartNode* pSttNode = pPam->GetNode()->StartOfSectionNode();
+ while(pSttNode && pSttNode->IsSectionNode())
+ {
+ pSttNode = pSttNode->StartOfSectionNode();
+ }
+ if( SwFootnoteStartNode == pSttNode->GetStartNodeType() )
+ bInsertIntoFootnote = true;
+ }
+ if (!mbIsFootnote && !bInsertIntoFootnote)
{
ReadHeaderFooter( nToken );
SkipToken( -1 ); // Klammer wieder zurueck
}
- break;
+ }
+ break;
case RTF_SWG_PRTDATA:
ReadPrtData();
break;
@@ -1622,12 +1636,12 @@ void SwRTFParser::NextToken( int nToken )
SkipGroup();
else
{
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
if (SwNumRule* pRule = ReadNumSecLevel( nToken ))
{
GetAttrSet().Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != GetAttrSet().GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
GetAttrSet().Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
}
@@ -1718,7 +1732,7 @@ void SwRTFParser::NextToken( int nToken )
if (!CantUseTables())
{
// aus der Line raus
- nAktBox = 0;
+ m_nCurrentBox = 0;
pTableNode = 0;
// noch in der Tabelle drin?
SwNodeIndex& rIdx = pPam->GetPoint()->nNode;
@@ -1735,8 +1749,8 @@ void SwRTFParser::NextToken( int nToken )
rIdx = *pBox->GetSttNd()->EndOfSectionNode();
pPam->Move( fnMoveForward, fnGoNode );
}
- nInsTblRow = static_cast< USHORT >(GetOpenBrakets());
- SetPardTokenRead( FALSE );
+ nInsTblRow = static_cast< sal_uInt16 >(GetOpenBrakets());
+ SetPardTokenRead( sal_False );
SwPaM aTmp(*pPam);
aTmp.Move( fnMoveBackward, fnGoNode );
}
@@ -1780,8 +1794,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTH:
{
- sw::util::AuthorInfo aEntry( static_cast< USHORT >(nTokenValue) );
- USHORT nPos;
+ sw::util::AuthorInfo aEntry( static_cast< sal_uInt16 >(nTokenValue) );
+ sal_uInt16 nPos;
if(pRedlineInsert)
{
@@ -1799,7 +1813,7 @@ void SwRTFParser::NextToken( int nToken )
case RTF_REVAUTHDEL:
{
sw::util::AuthorInfo aEntry( static_cast< short >(nTokenValue) );
- USHORT nPos;
+ sal_uInt16 nPos;
if(pRedlineDelete)
{
@@ -1831,17 +1845,17 @@ void SwRTFParser::NextToken( int nToken )
{
// Zeichengebundener Fly in Fly
ReadHeaderFooter( nToken );
- SetPardTokenRead( FALSE );
+ SetPardTokenRead( sal_False );
}
break;
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc =
&const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( USHORT(nTokenValue) );
+ ->GetPageDesc( sal_uInt16(nTokenValue) );
CheckInsNewTblLine();
pDoc->InsertPoolItem(*pPam, SwFmtPageDesc( pPgDsc ), 0);
}
@@ -1862,8 +1876,8 @@ void SwRTFParser::NextToken( int nToken )
case RTF_CHDATEL: eDateFmt = DF_LSYS; goto SETCHDATEFIELD;
SETCHDATEFIELD:
{
- USHORT nSubType = DATEFLD, nWhich = RES_DATEFLD;
- ULONG nFormat = eDateFmt;
+ sal_uInt16 nSubType = DATEFLD, nWhich = RES_DATEFLD;
+ sal_uLong nFormat = eDateFmt;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aDateFld( (SwDateTimeFieldType*)
@@ -1875,8 +1889,8 @@ SETCHDATEFIELD:
case RTF_CHTIME:
{
- USHORT nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
- ULONG nFormat = TF_SSMM_24;
+ sal_uInt16 nSubType = TIMEFLD, nWhich = RES_TIMEFLD;
+ sal_uLong nFormat = TF_SSMM_24;
sw3io_ConvertFromOldField( *pDoc, nWhich, nSubType, nFormat, 0x0110 );
SwDateTimeField aTimeFld( (SwDateTimeFieldType*)
pDoc->GetSysFldType( RES_DATETIMEFLD ), TIMEFLD, nFormat);
@@ -1896,21 +1910,21 @@ SETCHDATEFIELD:
break;
case RTF_CHFTN:
- bFootnoteAutoNum = TRUE;
+ bFootnoteAutoNum = sal_True;
break;
case RTF_NOFPAGES:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nPage = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nPage = (sal_uInt16)nTokenValue;
break;
case RTF_NOFWORDS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nWord = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nWord = (sal_uInt16)nTokenValue;
break;
case RTF_NOFCHARS:
if( IsNewDoc() && nTokenValue && -1 != nTokenValue )
- ((SwDocStat&)pDoc->GetDocStat()).nChar = (USHORT)nTokenValue;
+ ((SwDocStat&)pDoc->GetDocStat()).nChar = (sal_uInt16)nTokenValue;
break;
case RTF_LYTPRTMET:
if (IsNewDoc())
@@ -2053,7 +2067,7 @@ bool SwRTFParser::UncompressableStackEntry(const SvxRTFItemStackType &rSet)
{
if (SFX_ITEM_SET ==
- rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, FALSE))
+ rSet.GetAttrSet().GetItemState(RES_TXTATR_CHARFMT, sal_False))
{
bRet = true;
}
@@ -2067,7 +2081,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
SwCntntNode* pNode = pDoc->GetNodes().GoPrevious( &aIdx );
if( !pNode )
{
- OSL_ENSURE( FALSE, "keinen vorherigen ContentNode gefunden" );
+ OSL_ENSURE( sal_False, "keinen vorherigen ContentNode gefunden" );
}
rpNodePos = new SwNodeIdx( aIdx );
@@ -2076,7 +2090,7 @@ void SwRTFParser::SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos )
void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
{
- ULONG nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
+ sal_uLong nSNd = rSet.GetSttNodeIdx(), nENd = rSet.GetEndNodeIdx();
xub_StrLen nSCnt = rSet.GetSttCnt(), nECnt = rSet.GetEndCnt();
SwPaM aPam( *pPam->GetPoint() );
@@ -2122,7 +2136,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// aus dem Set loeschen. Sonst sind diese doppelt, was man ja
// nicht will.
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_TXTATR_CHARFMT, FALSE, &pCharFmt ) &&
+ RES_TXTATR_CHARFMT, sal_False, &pCharFmt ) &&
((SwFmtCharFmt*)pCharFmt)->GetCharFmt() )
{
const String& rName = ((SwFmtCharFmt*)pCharFmt)->GetCharFmt()->GetName();
@@ -2135,12 +2149,12 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
SfxItemSet &rAttrSet = rSet.GetAttrSet(),
&rStyleSet = pStyle->aAttrSet;
SfxItemIter aIter( rAttrSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
const SfxPoolItem* pI;
if( SFX_ITEM_SET == rStyleSet.GetItemState(
- nWhich, FALSE, &pI ) && *pI == *aIter.GetCurItem())
+ nWhich, sal_False, &pI ) && *pI == *aIter.GetCurItem())
rAttrSet.ClearItem( nWhich ); // loeschen
if( aIter.IsAtEnd() )
@@ -2164,22 +2178,22 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- FN_PARAM_NUM_LEVEL, FALSE, &pItem ))
+ FN_PARAM_NUM_LEVEL, sal_False, &pItem ))
{
// dann ueber den Bereich an den Nodes das NodeNum setzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
- pTxtNd->SetAttrListLevel((BYTE) ((SfxUInt16Item*)pItem)->GetValue());
+ pTxtNd->SetAttrListLevel((sal_uInt8) ((SfxUInt16Item*)pItem)->GetValue());
// Update vom LR-Space abschalten?
}
}
}
if( SFX_ITEM_SET == rSet.GetAttrSet().GetItemState(
- RES_PARATR_NUMRULE, FALSE, &pItem ))
+ RES_PARATR_NUMRULE, sal_False, &pItem ))
{
const SwNumRule* pRule = pDoc->FindNumRulePtr(
((SwNumRuleItem*)pItem)->GetValue() );
@@ -2188,13 +2202,13 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
// diese Rule hat keinen Level, also muss die Einrueckung
// erhalten bleiben!
// dann ueber den Bereich an den Nodes das Flag zuruecksetzen
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
{
// Update vom LR-Space abschalten
- pTxtNd->SetNumLSpace( FALSE );
+ pTxtNd->SetNumLSpace( sal_False );
}
}
}
@@ -2211,7 +2225,7 @@ void SwRTFParser::SetAttrInDoc( SvxRTFItemStackType &rSet )
if (bNoNum)
{
- for( ULONG n = nSNd; n <= nENd; ++n )
+ for( sal_uLong n = nSNd; n <= nENd; ++n )
{
SwTxtNode* pTxtNd = pDoc->GetNodes()[ n ]->GetTxtNode();
if( pTxtNd )
@@ -2288,8 +2302,8 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
{
SwFmtFrmSize aFrmSize(ATT_FIX_SIZE, rInfo.mnPaperw, rInfo.mnPaperh);
- SvxLRSpaceItem aLR( static_cast< USHORT >(rInfo.mnMargl), static_cast< USHORT >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
- SvxULSpaceItem aUL( static_cast< USHORT >(rInfo.mnMargt), static_cast< USHORT >(rInfo.mnMargb), RES_UL_SPACE );
+ SvxLRSpaceItem aLR( static_cast< sal_uInt16 >(rInfo.mnMargl), static_cast< sal_uInt16 >(rInfo.mnMargr), 0, 0, RES_LR_SPACE );
+ SvxULSpaceItem aUL( static_cast< sal_uInt16 >(rInfo.mnMargt), static_cast< sal_uInt16 >(rInfo.mnMargb), RES_UL_SPACE );
UseOnPage eUseOn;
if (rInfo.mbFacingp)
@@ -2297,7 +2311,7 @@ void SwRTFParser::SetPageInformationAsDefault(const DocPageInformation &rInfo)
else
eUseOn = UseOnPage(nsUseOnPage::PD_ALL | nsUseOnPage::PD_HEADERSHARE | nsUseOnPage::PD_FOOTERSHARE);
- USHORT nPgStart = static_cast< USHORT >(rInfo.mnPgnStart);
+ sal_uInt16 nPgStart = static_cast< sal_uInt16 >(rInfo.mnPgnStart);
SvxFrameDirectionItem aFrmDir(rInfo.mbRTLdoc ?
FRMDIR_HORI_RIGHT_TOP : FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
@@ -2331,7 +2345,7 @@ void SwRTFParser::SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine)
int bWeiter = true;
short nLineThickness = 1;
short nPageDistance = 0;
- BYTE nCol = 0;
+ sal_uInt8 nCol = 0;
short nIdx = 0;
int nToken = GetNextToken();
@@ -2444,10 +2458,10 @@ void SwRTFParser::ReadDocControls( int nToken )
SwEndNoteInfo aEndInfo;
bool bSetHyph = false;
- BOOL bEndInfoChgd = FALSE, bFtnInfoChgd = FALSE;
+ sal_Bool bEndInfoChgd = sal_False, bFtnInfoChgd = sal_False;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_RTLDOC:
@@ -2491,11 +2505,11 @@ void SwRTFParser::ReadDocControls( int nToken )
break;
case RTF_ENDDOC:
case RTF_ENDNOTES:
- aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNTJ:
case RTF_FTNBJ:
- aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.ePos = FTNPOS_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_AENDDOC:
@@ -2510,60 +2524,60 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nValue )
{
aFtnInfo.nFtnOffset = nValue-1;
- bFtnInfoChgd = TRUE;
+ bFtnInfoChgd = sal_True;
}
break;
case RTF_AFTNSTART:
if( nValue )
{
aEndInfo.nFtnOffset = nValue-1;
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
}
break;
case RTF_FTNRSTPG:
- aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_PAGE; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRESTART:
- aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_CHAPTER; bFtnInfoChgd = sal_True;
break;
case RTF_FTNRSTCONT:
- aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = TRUE;
+ aFtnInfo.eNum = FTNNUM_DOC; bFtnInfoChgd = sal_True;
break;
case RTF_FTNNAR:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bFtnInfoChgd = sal_True; break;
case RTF_FTNNALC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNAUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRLC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNRUC:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER); bFtnInfoChgd = sal_True; break;
case RTF_FTNNCHI:
- aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = TRUE; break;
+ aFtnInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL); bFtnInfoChgd = sal_True; break;
case RTF_AFTNNAR:
- aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = TRUE; break;
+ aEndInfo.aFmt.SetNumberingType(SVX_NUM_ARABIC); bEndInfoChgd = sal_True; break;
case RTF_AFTNNALC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_LOWER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNAUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHARS_UPPER_LETTER_N);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRLC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_LOWER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNRUC:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_ROMAN_UPPER);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_AFTNNCHI:
aEndInfo.aFmt.SetNumberingType(SVX_NUM_CHAR_SPECIAL);
- bEndInfoChgd = TRUE;
+ bEndInfoChgd = sal_True;
break;
case RTF_HYPHAUTO:
if (nTokenValue)
@@ -2603,7 +2617,7 @@ void SwRTFParser::ReadDocControls( int nToken )
if( nSkip )
{
SkipToken( nSkip ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
}
break;
@@ -2613,7 +2627,7 @@ void SwRTFParser::ReadDocControls( int nToken )
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
if( bWeiter )
@@ -2665,19 +2679,19 @@ void SwRTFParser::MakeStyleTab()
// dann erzeuge aus der SvxStyle-Tabelle die Swg-Collections
if( GetStyleTbl().Count() )
{
- USHORT nValidOutlineLevels = 0;
+ sal_uInt16 nValidOutlineLevels = 0;
if( !IsNewDoc() )
{
// search all outlined collections
const SwTxtFmtColls& rColls = *pDoc->GetTxtFmtColls();
- for( USHORT n = rColls.Count(); n; )
+ for( sal_uInt16 n = rColls.Count(); n; )
if( rColls[ --n ]->IsAssignedToListLevelOfOutlineStyle())
nValidOutlineLevels |= 1 << rColls[ n ]->GetAssignedOutlineStyleLevel();//<-end,zhaojianwei
}
SvxRTFStyleType* pStyle = GetStyleTbl().First();
do {
- USHORT nNo = USHORT( GetStyleTbl().GetCurKey() );
+ sal_uInt16 nNo = sal_uInt16( GetStyleTbl().GetCurKey() );
if( pStyle->bIsCharFmt )
{
if( !aCharFmtTbl.Get( nNo ) )
@@ -2691,14 +2705,14 @@ void SwRTFParser::MakeStyleTab()
}
} while( 0 != (pStyle = GetStyleTbl().Next()) );
- bStyleTabValid = TRUE;
+ bStyleTabValid = sal_True;
}
}
-BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
+sal_Bool lcl_SetFmtCol( SwFmt& rFmt, sal_uInt16 nCols, sal_uInt16 nColSpace,
const SvUShorts& rColumns )
{
- BOOL bSet = FALSE;
+ sal_Bool bSet = sal_False;
if( nCols && USHRT_MAX != nCols )
{
SwFmtCol aCol;
@@ -2708,13 +2722,13 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.Init( nCols, nColSpace, USHRT_MAX );
if( nCols == ( rColumns.Count() / 2 ) )
{
- aCol._SetOrtho( FALSE );
- USHORT nWishWidth = 0, nHalfPrev = 0;
- for( USHORT n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
+ aCol._SetOrtho( sal_False );
+ sal_uInt16 nWishWidth = 0, nHalfPrev = 0;
+ for( sal_uInt16 n = 0, i = 0; n < rColumns.Count(); n += 2, ++i )
{
SwColumn* pCol = aCol.GetColumns()[ i ];
pCol->SetLeft( nHalfPrev );
- USHORT nSp = rColumns[ n+1 ];
+ sal_uInt16 nSp = rColumns[ n+1 ];
nHalfPrev = nSp / 2;
pCol->SetRight( nSp - nHalfPrev );
pCol->SetWishWidth( rColumns[ n ] +
@@ -2724,14 +2738,14 @@ BOOL lcl_SetFmtCol( SwFmt& rFmt, USHORT nCols, USHORT nColSpace,
aCol.SetWishWidth( nWishWidth );
}
rFmt.SetFmtAttr( aCol );
- bSet = TRUE;
+ bSet = sal_True;
}
return bSet;
}
void SwRTFParser::DoHairyWriterPageDesc(int nToken)
{
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
do {
if( '{' == nToken )
{
@@ -2742,7 +2756,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
& ~(0xff | RTF_SWGDEFS)) )
{
SkipToken( -2 ); // Ignore und Token wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break, Gruppe ueberspringen
@@ -2762,7 +2776,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
default:
SkipToken( -1 ); // Ignore wieder zurueck
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
}
@@ -2770,7 +2784,7 @@ void SwRTFParser::DoHairyWriterPageDesc(int nToken)
RTF_UNKNOWNCONTROL == nToken )
SvxRTFParser::NextToken( nToken );
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( bWeiter )
nToken = GetNextToken();
} while( bWeiter && IsParserWorking() );
@@ -2806,7 +2820,7 @@ void SwRTFParser::ReadSectControls( int nToken )
int bWeiter = true;
bool bKeepFooter = false;
do {
- USHORT nValue = USHORT( nTokenValue );
+ sal_uInt16 nValue = sal_uInt16( nTokenValue );
switch( nToken )
{
case RTF_SECT:
@@ -3175,10 +3189,10 @@ void SwRTFParser::ReadPageDescTbl()
int nToken, bSaveChkStyleAttr = IsChkStyleAttr();
int nNumOpenBrakets = 1; // die erste wurde schon vorher erkannt !!
- SetChkStyleAttr(FALSE); // Attribute nicht gegen die Styles checken
+ SetChkStyleAttr(sal_False); // Attribute nicht gegen die Styles checken
bInPgDscTbl = true;
- USHORT nPos = 0;
+ sal_uInt16 nPos = 0;
SwPageDesc* pPg = 0;
SwFrmFmt* pPgFmt = 0;
@@ -3190,7 +3204,7 @@ void SwRTFParser::ReadPageDescTbl()
SvxFrameDirectionItem aFrmDir(FRMDIR_HORI_LEFT_TOP, RES_FRAMEDIR);
- USHORT nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
+ sal_uInt16 nCols = USHRT_MAX, nColSpace = USHRT_MAX, nAktCol = 0;
SvUShorts aColumns;
while( nNumOpenBrakets && IsParserWorking() )
@@ -3239,11 +3253,11 @@ void SwRTFParser::ReadPageDescTbl()
if (nPos != pDoc->MakePageDesc(
String::CreateFromInt32(nTokenValue)))
{
- OSL_ENSURE( FALSE, "PageDesc an falscher Position" );
+ OSL_ENSURE( sal_False, "PageDesc an falscher Position" );
}
}
pPg = &pDoc->_GetPageDesc(nPos);
- pPg->SetLandscape( FALSE );
+ pPg->SetLandscape( sal_False );
pPgFmt = &pPg->GetMaster();
SETPAGEDESC_DEFAULTS();
@@ -3298,24 +3312,24 @@ void SwRTFParser::ReadPageDescTbl()
// alt: LI/RI/SA/SB, neu: MARG?SXN
case RTF_MARGLSXN:
- case RTF_LI: aLR.SetLeft( (USHORT)nTokenValue ); break;
+ case RTF_LI: aLR.SetLeft( (sal_uInt16)nTokenValue ); break;
case RTF_MARGRSXN:
- case RTF_RI: aLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_RI: aLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_MARGTSXN:
- case RTF_SA: aUL.SetUpper( (USHORT)nTokenValue ); break;
+ case RTF_SA: aUL.SetUpper( (sal_uInt16)nTokenValue ); break;
case RTF_MARGBSXN:
- case RTF_SB: aUL.SetLower( (USHORT)nTokenValue ); break;
+ case RTF_SB: aUL.SetLower( (sal_uInt16)nTokenValue ); break;
case RTF_PGWSXN: aSz.SetWidth( nTokenValue ); break;
case RTF_PGHSXN: aSz.SetHeight( nTokenValue ); break;
- case RTF_HEADERY: aHUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_HEADER_YB: aHUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XL: aHLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_HEADER_XR: aHLR.SetRight( (USHORT)nTokenValue ); break;
- case RTF_FOOTERY: aFUL.SetLower( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_YT: aFUL.SetUpper( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XL: aFLR.SetLeft( (USHORT)nTokenValue ); break;
- case RTF_FOOTER_XR: aFLR.SetRight( (USHORT)nTokenValue ); break;
+ case RTF_HEADERY: aHUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_YB: aHUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XL: aHLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_HEADER_XR: aHLR.SetRight( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTERY: aFUL.SetLower( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_YT: aFUL.SetUpper( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XL: aFLR.SetLeft( (sal_uInt16)nTokenValue ); break;
+ case RTF_FOOTER_XR: aFLR.SetRight( (sal_uInt16)nTokenValue ); break;
case RTF_HEADER_YH:
if( 0 > nTokenValue )
@@ -3323,7 +3337,7 @@ void SwRTFParser::ReadPageDescTbl()
aHSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aHSz.SetHeight( (USHORT)nTokenValue );
+ aHSz.SetHeight( (sal_uInt16)nTokenValue );
break;
case RTF_FOOTER_YH:
@@ -3332,22 +3346,22 @@ void SwRTFParser::ReadPageDescTbl()
aFSz.SetHeightSizeType( ATT_FIX_SIZE );
nTokenValue = -nTokenValue;
}
- aFSz.SetHeight( (USHORT)nTokenValue );
+ aFSz.SetHeight( (sal_uInt16)nTokenValue );
break;
- case RTF_LNDSCPSXN: pPg->SetLandscape( TRUE ); break;
+ case RTF_LNDSCPSXN: pPg->SetLandscape( sal_True ); break;
- case RTF_COLS: nCols = (USHORT)nTokenValue; break;
- case RTF_COLSX: nColSpace = (USHORT)nTokenValue; break;
+ case RTF_COLS: nCols = (sal_uInt16)nTokenValue; break;
+ case RTF_COLSX: nColSpace = (sal_uInt16)nTokenValue; break;
case RTF_COLNO:
- nAktCol = (USHORT)nTokenValue;
+ nAktCol = (sal_uInt16)nTokenValue;
if( RTF_COLW == GetNextToken() )
{
- USHORT nWidth = USHORT( nTokenValue ), nSpace = 0;
+ sal_uInt16 nWidth = sal_uInt16( nTokenValue ), nSpace = 0;
if( RTF_COLSR == GetNextToken() )
- nSpace = USHORT( nTokenValue );
+ nSpace = sal_uInt16( nTokenValue );
else
SkipToken( -1 ); // wieder zurueck
@@ -3385,7 +3399,7 @@ void SwRTFParser::ReadPageDescTbl()
pPg->SetName(aToken);
// sollte es eine Vorlage aus dem Pool sein ??
- USHORT n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
+ sal_uInt16 n = SwStyleNameMapper::GetPoolIdFromUIName(aToken,
nsSwGetPoolIdFromName::GET_POOLID_PAGEDESC);
if (USHRT_MAX != n)
{
@@ -3426,9 +3440,9 @@ void SwRTFParser::ReadPageDescTbl()
for( nPos = 0; nPos < pDoc->GetPageDescCnt(); ++nPos )
{
SwPageDesc* pPgDsc = &pDoc->_GetPageDesc( nPos );
- if( (USHORT)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
+ if( (sal_uInt16)(long)pPgDsc->GetFollow() < pDoc->GetPageDescCnt() )
pPgDsc->SetFollow(& const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc((USHORT)(long)
+ ->GetPageDesc((sal_uInt16)(long)
pPgDsc->GetFollow()));
}
@@ -3453,7 +3467,7 @@ void SwRTFParser::ReadPrtData()
SkipToken( -1 ); // schliessende Klammer wieder zurueck!!
}
-static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
OSL_ENSURE(pHdFtFmt, "Impossible, no header");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3461,13 +3475,13 @@ static const SwNodeIndex* SetHeader(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No existing header, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtHeader(sal_True));
pExisting = pHdFtFmt->GetHeader().GetHeaderFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
}
-static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
+static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, sal_Bool bReuseOld)
{
OSL_ENSURE(pHdFtFmt, "Impossible, no footer");
const SwFrmFmt* pExisting = bReuseOld ?
@@ -3475,7 +3489,7 @@ static const SwNodeIndex* SetFooter(SwFrmFmt* pHdFtFmt, BOOL bReuseOld)
if (!pExisting)
{
//No exist footer, create a new one
- pHdFtFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pHdFtFmt->SetFmtAttr(SwFmtFooter(sal_True));
pExisting = pHdFtFmt->GetFooter().GetFooterFmt();
}
return pExisting->GetCntnt().GetCntntIdx();
@@ -3486,28 +3500,27 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
OSL_ENSURE( RTF_FOOTNOTE == nToken ||
RTF_FLY_INPARA == nToken ||
- pPageDesc, "PageDesc fehlt" );
+ pPageDesc, "PageDesc is missing" );
bool bContainsParaCache = bContainsPara;
- // alle wichtigen Sachen sichern
+ // backup all important data
SwPosition aSavePos( *pPam->GetPoint() );
- SvxRTFItemStack aSaveStack;
- aSaveStack.Insert( &GetAttrStack(), 0 );
- GetAttrStack().Remove( 0, GetAttrStack().Count() );
+ SvxRTFItemStack aSaveStack(GetAttrStack());
+ GetAttrStack().clear();
// save the fly array - after read, all flys may be set into
// the header/footer
SwFlySaveArr aSaveArray( 255 < aFlyArr.Count() ? aFlyArr.Count() : 255 );
aSaveArray.Insert( &aFlyArr, 0 );
aFlyArr.Remove( 0, aFlyArr.Count() );
- BOOL bSetFlyInDoc = TRUE;
+ sal_Bool bSetFlyInDoc = sal_True;
const SwNodeIndex* pSttIdx = 0;
SwFrmFmt* pHdFtFmt = 0;
SwTxtAttr* pTxtAttr = 0;
- int bDelFirstChar = FALSE;
+ int bDelFirstChar = sal_False;
bool bOldIsFootnote = mbIsFootnote;
- BOOL bOldGrpStt = sal::static_int_cast< BOOL, int >(IsNewGroup());
+ sal_Bool bOldGrpStt = sal::static_int_cast< sal_Bool, int >(IsNewGroup());
int nNumOpenBrakets = GetOpenBrakets() - 1;
@@ -3529,7 +3542,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
nPos--;
aFtnNote.SetNumStr( pTxtNd->GetTxt().GetChar( nPos ) );
((String&)pTxtNd->GetTxt()).SetChar( nPos, CH_TXTATR_INWORD );
- bDelFirstChar = TRUE;
+ bDelFirstChar = sal_True;
}
pTxtAttr = pTxtNd->InsertItem( aFtnNote, nPos, nPos,
@@ -3543,7 +3556,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
// wurde an der Position ein Escapement aufgespannt, so entferne
// das jetzt. Fussnoten sind bei uns immer hochgestellt.
- SvxRTFItemStackTypePtr pTmp = aSaveStack.Top();
+ SvxRTFItemStackTypePtr pTmp = aSaveStack.empty() ? 0 : aSaveStack.back();
if( pTmp && pTmp->GetSttNodeIdx() ==
pPam->GetPoint()->nNode.GetIndex() &&
pTmp->GetSttCnt() == nPos )
@@ -3565,7 +3578,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
OSL_ENSURE( pTxtAttr, "konnte den Fly nicht einfuegen/finden" );
pSttIdx = pHdFtFmt->GetCntnt().GetCntntIdx();
- bSetFlyInDoc = FALSE;
+ bSetFlyInDoc = sal_False;
}
break;
@@ -3573,50 +3586,50 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_HEADER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_HEADERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetHeader( pHdFtFmt, FALSE );
+ pSttIdx = SetHeader( pHdFtFmt, sal_False );
break;
case RTF_HEADERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetRightFmt(), TRUE );
+ SetHeader( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_HEADERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_HEADERSHARE) | nsUseOnPage::PD_ALL));
- SetHeader( pPageDesc->GetLeftFmt(), TRUE );
+ SetHeader( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetHeader(pHdFtFmt, FALSE );
+ pSttIdx = SetHeader(pHdFtFmt, sal_False );
break;
case RTF_FOOTERF:
case RTF_FOOTER:
pPageDesc->WriteUseOn( (UseOnPage)(pPageDesc->ReadUseOn() | nsUseOnPage::PD_FOOTERSHARE) );
pHdFtFmt = &pPageDesc->GetMaster();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERL:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetRightFmt(), TRUE );
+ SetFooter( pPageDesc->GetRightFmt(), sal_True );
pHdFtFmt = pPageDesc->GetLeftFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
case RTF_FOOTERR:
// we cannot have left or right, must have always both
pPageDesc->WriteUseOn( (UseOnPage)((pPageDesc->ReadUseOn() & ~nsUseOnPage::PD_FOOTERSHARE) | nsUseOnPage::PD_ALL));
- SetFooter( pPageDesc->GetLeftFmt(), TRUE );
+ SetFooter( pPageDesc->GetLeftFmt(), sal_True );
pHdFtFmt = pPageDesc->GetRightFmt();
- pSttIdx = SetFooter(pHdFtFmt, FALSE );
+ pSttIdx = SetFooter(pHdFtFmt, sal_False );
break;
}
- USHORT nOldFlyArrCnt = aFlyArr.Count();
+ sal_uInt16 nOldFlyArrCnt = aFlyArr.Count();
if( !pSttIdx )
SkipGroup();
else
@@ -3636,7 +3649,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
pColl = pDoc->GetTxtCollFromPool( RES_POOLCOLL_STANDARD, false );
pDoc->SetTxtFmtColl( *pPam, pColl );
- SetNewGroup( TRUE );
+ SetNewGroup( sal_True );
while( !( nNumOpenBrakets == GetOpenBrakets() && !GetStackPos()) && IsParserWorking() )
{
@@ -3645,7 +3658,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
case RTF_U:
if( bDelFirstChar )
{
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
nToken = 0;
}
break;
@@ -3655,7 +3668,7 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
{
if( !aToken.Erase( 0, 1 ).Len() )
nToken = 0;
- bDelFirstChar = FALSE;
+ bDelFirstChar = sal_False;
}
break;
}
@@ -3693,16 +3706,16 @@ void SwRTFParser::ReadHeaderFooter( int nToken, SwPageDesc* pPageDesc )
}
}
- bFootnoteAutoNum = FALSE; // default auf aus!
+ bFootnoteAutoNum = sal_False; // default auf aus!
// und alles wieder zurueck
*pPam->GetPoint() = aSavePos;
if (mbIsFootnote)
SetNewGroup( bOldGrpStt ); // Status wieder zurueck
else
- SetNewGroup( FALSE ); // { - Klammer war kein Group-Start!
+ SetNewGroup( sal_False ); // { - Klammer war kein Group-Start!
mbIsFootnote = bOldIsFootnote;
- GetAttrStack().Insert( &aSaveStack, 0 );
+ GetAttrStack() = aSaveStack;
aFlyArr.Insert( &aSaveArray, 0 );
aSaveArray.Remove( 0, aSaveArray.Count() );
@@ -3713,7 +3726,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
const SfxPoolItem* pItem;
// Escapement korrigieren
- if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_CHRATR_ESCAPEMENT, sal_False, &pItem ))
{
/* prozentuale Veraenderung errechnen !
* Formel : (FontSize * 1/20 ) pts Escapement * 2
@@ -3738,7 +3751,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
// TabStops anpassen
- if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, FALSE, &pItem ))
+ if( SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_TABSTOP, sal_False, &pItem ))
{
const SvxLRSpaceItem& rLR = GetLRSpace( rSet );
SvxTabStopItem aTStop( *(SvxTabStopItem*)pItem );
@@ -3748,7 +3761,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
{
// Tabs anpassen !!
SvxTabStop* pTabs = (SvxTabStop*)aTStop.GetStart();
- for( USHORT n = aTStop.Count(); n; --n, ++pTabs)
+ for( sal_uInt16 n = aTStop.Count(); n; --n, ++pTabs)
if( SVX_TAB_ADJUST_DEFAULT != pTabs->GetAdjustment() )
pTabs->GetTabPos() -= nOffset;
@@ -3766,7 +3779,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
rSet.Put( aTStop );
}
- else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, FALSE, &pItem )
+ else if( SFX_ITEM_SET == rSet.GetItemState( RES_LR_SPACE, sal_False, &pItem )
&& ((SvxLRSpaceItem*)pItem)->GetTxtFirstLineOfst() < 0 )
{
// negativer Einzug, dann auf 0 Pos einen Tab setzen
@@ -3775,7 +3788,7 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
// NumRules anpassen
if( !bStyleTabValid &&
- SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, FALSE, &pItem ))
+ SFX_ITEM_SET == rSet.GetItemState( RES_PARATR_NUMRULE, sal_False, &pItem ))
{
// dann steht im Namen nur ein Verweis in das ListArray
SwNumRule* pRule = GetNumRuleOfListNo( ((SwNumRuleItem*)pItem)->
@@ -3790,10 +3803,10 @@ void SwRTFParser::SetSwgValues( SfxItemSet& rSet )
}
-SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
- BYTE nOutlineLevel, bool& rbCollExist)
+SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, sal_uInt16 nPos,
+ sal_uInt8 nOutlineLevel, bool& rbCollExist)
{
- if( BYTE(-1) == nOutlineLevel )
+ if( sal_uInt8(-1) == nOutlineLevel )
nOutlineLevel = MAXLEVEL;
rbCollExist = false;
@@ -3839,10 +3852,10 @@ SwTxtFmtColl* SwRTFParser::MakeColl(const String& rName, USHORT nPos,
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, USHORT nPos,
+SwCharFmt* SwRTFParser::MakeCharFmt(const String& rName, sal_uInt16 nPos,
int& rbCollExist)
{
- rbCollExist = FALSE;
+ rbCollExist = sal_False;
SwCharFmt* pFmt;
String aNm( rName );
if( !aNm.Len() )
@@ -3876,10 +3889,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
// suche alle Attribute, die neu gesetzt werden:
const SfxPoolItem* pItem;
SfxItemIter aIter( rDerivedSet );
- USHORT nWhich = aIter.GetCurItem()->Which();
- while( TRUE )
+ sal_uInt16 nWhich = aIter.GetCurItem()->Which();
+ while( sal_True )
{
- switch( rStyleSet.GetItemState( nWhich, FALSE, &pItem ) )
+ switch( rStyleSet.GetItemState( nWhich, sal_False, &pItem ) )
{
case SFX_ITEM_DEFAULT:
// auf default zuruecksetzen
@@ -3902,10 +3915,10 @@ void SwRTFParser::SetStyleAttr( SfxItemSet& rCollSet,
SetSwgValues( rCollSet );
}
-SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
+SwTxtFmtColl* SwRTFParser::MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle)
{
bool bCollExist;
- SwTxtFmtColl* pColl = MakeColl( rStyle.sName, USHORT(nNo),
+ SwTxtFmtColl* pColl = MakeColl( rStyle.sName, sal_uInt16(nNo),
rStyle.nOutlineNo, bCollExist);
aTxtCollTbl.Insert( nNo, pColl );
@@ -3913,7 +3926,7 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
if( bCollExist )
return pColl;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -3964,17 +3977,17 @@ SwTxtFmtColl* SwRTFParser::MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle)
return pColl;
}
-SwCharFmt* SwRTFParser::MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle )
+SwCharFmt* SwRTFParser::MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle )
{
int bCollExist;
- SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, USHORT(nNo), bCollExist );
+ SwCharFmt* pFmt = MakeCharFmt( rStyle.sName, sal_uInt16(nNo), bCollExist );
aCharFmtTbl.Insert( nNo, pFmt );
// in bestehendes Dok einfuegen, dann keine Ableitung usw. setzen
if( bCollExist )
return pFmt;
- USHORT nStyleNo = rStyle.nBasedOn;
+ sal_uInt16 nStyleNo = rStyle.nBasedOn;
if( rStyle.bBasedOnIsSet && nStyleNo != nNo )
{
SvxRTFStyleType* pDerivedStyle = GetStyleTbl().Get( nStyleNo );
@@ -4018,10 +4031,10 @@ void SwRTFParser::DelLastNode()
if( !pPam->GetPoint()->nContent.GetIndex() )
{
- ULONG nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPam->GetPoint()->nNode.GetIndex();
SwCntntNode* pCNd = pDoc->GetNodes()[ nNodeIdx ]->GetCntntNode();
// paragraphs with page break information are not empty!)
- if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, FALSE)))
+ if(const SfxPoolItem* pItem=&(pCNd->GetAttr( RES_PAGEDESC, sal_False)))
{
SwFmtPageDesc* pPageDescItem = ((SwFmtPageDesc*)pItem);
if (pPageDescItem->GetPageDesc()!=NULL)
@@ -4031,12 +4044,12 @@ void SwRTFParser::DelLastNode()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- if( GetAttrStack().Count() )
+ if( !GetAttrStack().empty() )
{
// Attribut Stack-Eintraege, muessen ans Ende des vorherigen
// Nodes verschoben werden.
- BOOL bMove = FALSE;
- for( USHORT n = GetAttrStack().Count(); n; )
+ sal_Bool bMove = sal_False;
+ for( size_t n = GetAttrStack().size(); n; )
{
SvxRTFItemStackType* pStkEntry = (SvxRTFItemStackType*)
GetAttrStack()[ --n ];
@@ -4045,7 +4058,7 @@ void SwRTFParser::DelLastNode()
if( !bMove )
{
pPam->Move( fnMoveBackward );
- bMove = TRUE;
+ bMove = sal_True;
}
pStkEntry->SetStartPos( SwxPosition( pPam ) );
}
@@ -4077,7 +4090,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// Crsr nicht mehr in der Tabelle ?
if( !pPam->GetNode()->FindTableNode() && _do )
{
- ULONG nOldPos = pPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nOldPos = pPam->GetPoint()->nNode.GetIndex();
// dann wieder in die letzte Box setzen
// (kann durch einlesen von Flys geschehen!)
@@ -4088,7 +4101,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
// auf die neue Box umsetzen !!
SvxRTFItemStack& rAttrStk = GetAttrStack();
const SvxRTFItemStackType* pStk;
- for( USHORT n = 0; n < rAttrStk.Count(); ++n )
+ for( size_t n = 0; n < rAttrStk.size(); ++n )
if( ( pStk = rAttrStk[ n ])->GetSttNodeIdx() == nOldPos &&
!pStk->GetSttCnt() )
((SvxRTFItemStackType*)pStk)->SetStartPos( SwxPosition( pPam ) );
@@ -4112,10 +4125,10 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_PGDSCNO:
if( IsNewDoc() && bSwPageDesc &&
- USHORT(nTokenValue) < pDoc->GetPageDescCnt() )
+ sal_uInt16(nTokenValue) < pDoc->GetPageDescCnt() )
{
const SwPageDesc* pPgDsc = &const_cast<const SwDoc *>(pDoc)
- ->GetPageDesc( (USHORT)nTokenValue );
+ ->GetPageDesc( (sal_uInt16)nTokenValue );
pDoc->InsertPoolItem( *pPam, SwFmtPageDesc( pPgDsc ), 0);
}
break;
@@ -4138,7 +4151,7 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
if( pRule )
pSet->Put( SwNumRuleItem( pRule->GetName() ));
- if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, FALSE ))
+ if( SFX_ITEM_SET != pSet->GetItemState( FN_PARAM_NUM_LEVEL, sal_False ))
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, 0 ));
}
else
@@ -4154,8 +4167,8 @@ void SwRTFParser::UnknownAttrToken( int nToken, SfxItemSet* pSet )
case RTF_ILVL:
case RTF_SOUTLVL:
{
- BYTE nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
- : BYTE( nTokenValue );
+ sal_uInt8 nLevel = MAXLEVEL <= nTokenValue ? MAXLEVEL - 1
+ : sal_uInt8( nTokenValue );
pSet->Put( SfxUInt16Item( FN_PARAM_NUM_LEVEL, nLevel ));
}
break;
@@ -4257,7 +4270,7 @@ bool BookmarkPosition::operator==(const BookmarkPosition rhs)
return(maMkNode.GetIndex() == rhs.maMkNode.GetIndex() && mnMkCntnt == rhs.mnMkCntnt);
}
-ULONG SwNodeIdx::GetIdx() const
+sal_uLong SwNodeIdx::GetIdx() const
{
return aIdx.GetIndex();
}
@@ -4277,7 +4290,7 @@ SvxNodeIdx* SwxPosition::MakeNodeIdx() const
return new SwNodeIdx( pPam->GetPoint()->nNode );
}
-ULONG SwxPosition::GetNodeIdx() const
+sal_uLong SwxPosition::GetNodeIdx() const
{
return pPam->GetPoint()->nNode.GetIndex();
}
diff --git a/sw/source/filter/rtf/swparrtf.hxx b/sw/source/filter/rtf/swparrtf.hxx
index 25ae536133d5..fe87687554d5 100644
--- a/sw/source/filter/rtf/swparrtf.hxx
+++ b/sw/source/filter/rtf/swparrtf.hxx
@@ -29,7 +29,6 @@
#ifndef _SWPARRTF_HXX
#define _SWPARRTF_HXX
-#include <map>
#include <deque>
#include <vector>
@@ -37,15 +36,15 @@
#include <editeng/numitem.hxx>
#include <editeng/boxitem.hxx>
#include <redline.hxx>
-#include <algorithm>
+
#include <fltshell.hxx> // fuer den Attribut Stack
#include <ndindex.hxx>
#include "../inc/msfilter.hxx"
#include <svx/svdobj.hxx>
-extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize);
+extern void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize);
class Font;
class Graphic;
@@ -68,9 +67,9 @@ struct SvxRTFPictureType;
class RtfReader: public Reader
{
- virtual ULONG Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ virtual sal_uLong Read( SwDoc &, const String& rBaseURL, SwPaM &,const String &);
public:
- virtual ULONG Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
+ virtual sal_uLong Read( SvStream* pStrm, SwDoc &, const String& rBaseURL, SwPaM &);
};
class SwNodeIdx : public SvxNodeIdx
@@ -78,7 +77,7 @@ class SwNodeIdx : public SvxNodeIdx
SwNodeIndex aIdx;
public:
SwNodeIdx( const SwNodeIndex& rIdx ) : aIdx( rIdx ) {}
- virtual ULONG GetIdx() const;
+ virtual sal_uLong GetIdx() const;
virtual SvxNodeIdx* Clone() const;
};
@@ -103,7 +102,7 @@ class SwxPosition : public SvxPosition
public:
SwxPosition( SwPaM* pCrsr ) : pPam( pCrsr ) {}
- virtual ULONG GetNodeIdx() const;
+ virtual sal_uLong GetNodeIdx() const;
virtual xub_StrLen GetCntIdx() const;
// erzeuge von sich selbst eine Kopie
@@ -120,7 +119,7 @@ struct SwFlySave
SwNodeIndex nSttNd, nEndNd;
xub_StrLen nEndCnt;
SwTwips nPageWidth;
- USHORT nDropLines, nDropAnchor;
+ sal_uInt16 nDropLines, nDropAnchor;
SwFlySave( const SwPaM& rPam, SfxItemSet& rSet );
int IsEqualFly( const SwPaM& rPos, SfxItemSet& rSet );
@@ -130,27 +129,27 @@ struct SwFlySave
struct SwListEntry
{
long nListId, nListTemplateId, nListNo;
- USHORT nListDocPos;
- BOOL bRuleUsed;
+ sal_uInt16 nListDocPos;
+ sal_Bool bRuleUsed;
SwListEntry()
: nListId( 0 ), nListTemplateId( 0 ), nListNo( 0 ), nListDocPos( 0 ),
- bRuleUsed( FALSE )
+ bRuleUsed( sal_False )
{}
- SwListEntry( long nLstId, long nLstTmplId, USHORT nLstDocPos )
+ SwListEntry( long nLstId, long nLstTmplId, sal_uInt16 nLstDocPos )
: nListId( nLstId ), nListTemplateId( nLstTmplId ), nListNo( 0 ),
- nListDocPos( nLstDocPos ), bRuleUsed( FALSE )
+ nListDocPos( nLstDocPos ), bRuleUsed( sal_False )
{}
void Clear() { nListId = nListTemplateId = nListNo = 0, nListDocPos = 0;
- bRuleUsed = FALSE; }
+ bRuleUsed = sal_False; }
};
DECLARE_TABLE( SwRTFStyleTbl, SwTxtFmtColl* )
DECLARE_TABLE( SwRTFCharStyleTbl, SwCharFmt* )
typedef SwFlySave* SwFlySavePtr;
SV_DECL_PTRARR_DEL( SwFlySaveArr, SwFlySavePtr, 0, 20 )
-SV_DECL_VARARR( SwListArr, SwListEntry, 0, 20 )
+typedef std::deque< SwListEntry > SwListArr;
struct DocPageInformation
{
@@ -250,7 +249,7 @@ private:
wwULSpaceData& rData);
void SetPageULSpaceItems(SwFrmFmt &rFmt, wwULSpaceData& rData);
bool SetCols(SwFrmFmt &rFmt, const rtfSection &rSection,
- USHORT nNettoWidth);
+ sal_uInt16 nNettoWidth);
void SetHdFt(rtfSection &rSection);
void CopyFrom(const SwPageDesc &rFrom, SwPageDesc &rDest);
void MoveFrom(SwPageDesc &rFrom, SwPageDesc &rDest);
@@ -312,11 +311,11 @@ class SwRTFParser : public SvxRTFParser
String sBaseURL;
- USHORT nAktPageDesc, nAktFirstPageDesc;
- USHORT nAktBox; // akt. Box
- USHORT nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
- USHORT nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
- USHORT nRowsToRepeat;
+ sal_uInt16 nAktPageDesc, nAktFirstPageDesc;
+ sal_uInt16 m_nCurrentBox;
+ sal_uInt16 nInsTblRow; // beim nach \row kein \pard -> neue Line anlegen
+ sal_uInt16 nNewNumSectDef; // jeder SectionWechsel kann neue Rules definieren
+ sal_uInt16 nRowsToRepeat;
bool bSwPageDesc;
bool bReadSwFly; // lese Swg-Fly (wichtig fuer Bitmaps!)
@@ -345,7 +344,7 @@ class SwRTFParser : public SvxRTFParser
virtual void InsertPara();
virtual void InsertText();
- virtual void MovePos( int bForward = TRUE );
+ virtual void MovePos( int bForward = sal_True );
virtual void SetEndPrevPara( SvxNodeIdx*& rpNodePos, xub_StrLen& rCntPos );
void EnterEnvironment();
void LeaveEnvironment();
@@ -360,10 +359,10 @@ class SwRTFParser : public SvxRTFParser
void ReadUserProperties();
- void ReadListLevel( SwNumRule& rRule, BYTE nLvl );
+ void ReadListLevel( SwNumRule& rRule, sal_uInt8 nLvl );
void SetBorderLine(SvxBoxItem& rBox, sal_uInt16 nLine);
void ReadListTable();
- USHORT ReadRevTbl();
+ sal_uInt16 ReadRevTbl();
void ReadShpRslt();
void ReadShpTxt(String &shpTxt);
void ReadDrawingObject();
@@ -372,21 +371,21 @@ class SwRTFParser : public SvxRTFParser
void ReadListOverrideTable();
SwNumRule *ReadNumSecLevel( int nToken );
SwNumRule* GetNumRuleOfListNo( long nListNo,
- BOOL bRemoveFromList = FALSE );
+ sal_Bool bRemoveFromList = sal_False );
void RemoveUnusedNumRule( SwNumRule* );
void RemoveUnusedNumRules();
const Font* FindFontOfItem( const SvxFontItem& rItem ) const;
// 3 Methoden zum Aufbauen der Styles
- SwTxtFmtColl* MakeColl( const String&, USHORT nPos, BYTE nOutlineLevel,
+ SwTxtFmtColl* MakeColl( const String&, sal_uInt16 nPos, sal_uInt8 nOutlineLevel,
bool& rbCollExist );
- SwCharFmt* MakeCharFmt( const String& rName, USHORT nPos,
+ SwCharFmt* MakeCharFmt( const String& rName, sal_uInt16 nPos,
int& rbCollExist );
void SetStyleAttr( SfxItemSet& rCollSet,
const SfxItemSet& rStyleSet,
const SfxItemSet& rDerivedSet );
- SwTxtFmtColl* MakeStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
- SwCharFmt* MakeCharStyle( USHORT nNo, const SvxRTFStyleType& rStyle );
+ SwTxtFmtColl* MakeStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
+ SwCharFmt* MakeCharStyle( sal_uInt16 nNo, const SvxRTFStyleType& rStyle );
void MakeStyleTab();
int MakeFieldInst( String& rFieldStr );
@@ -452,7 +451,7 @@ public:
::com::sun::star::document::XDocumentProperties> i_xDocProps,
const SwPaM& rCrsr, SvStream& rIn,
const String& rBaseURL,
- int bReadNewDoc = TRUE );
+ int bReadNewDoc = sal_True );
virtual SvParserState CallParser(); // Aufruf des Parsers
virtual int IsEndPara( SvxNodeIdx* pNd, xub_StrLen nCnt ) const;
diff --git a/sw/source/filter/writer/makefile.mk b/sw/source/filter/writer/makefile.mk
deleted file mode 100644
index 1c11b8498b40..000000000000
--- a/sw/source/filter/writer/makefile.mk
+++ /dev/null
@@ -1,58 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=writer
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-# --- Files --------------------------------------------------------
-
-CXXFILES = \
- writer.cxx \
- wrt_fn.cxx \
- wrtswtbl.cxx
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-EXCEPTIONSFILES = \
- $(SLO)$/writer.obj \
- $(SLO)$/wrt_fn.obj \
- $(SLO)$/wrtswtbl.obj
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
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();
diff --git a/sw/source/filter/writer/wrt_fn.cxx b/sw/source/filter/writer/wrt_fn.cxx
index 17d30d422e07..13c848bc032e 100644
--- a/sw/source/filter/writer/wrt_fn.cxx
+++ b/sw/source/filter/writer/wrt_fn.cxx
@@ -41,7 +41,7 @@
Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
{
- USHORT nId = rHt.Which();
+ sal_uInt16 nId = rHt.Which();
OSL_ENSURE( nId < POOLATTR_END && nId >= POOLATTR_BEGIN, "SwAttrFnTab::Out()" );
FnAttrOut pOut;
if( 0 != ( pOut = pTab[ nId - RES_CHRATR_BEGIN] ))
@@ -51,8 +51,8 @@ Writer& Out( const SwAttrFnTab pTab, const SfxPoolItem& rHt, Writer & rWrt )
}
Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
- const SfxItemSet& rSet, BOOL bDeep,
- BOOL bTstForDefault )
+ const SfxItemSet& rSet, sal_Bool bDeep,
+ sal_Bool bTstForDefault )
{
// erst die eigenen Attribute ausgeben
const SfxItemPool& rPool = *rSet.GetPool();
@@ -81,7 +81,7 @@ Writer& Out_SfxItemSet( const SwAttrFnTab pTab, Writer& rWrt,
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
if( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
@@ -106,7 +106,7 @@ Writer& Out( const SwNodeFnTab pTab, SwNode& rNode, Writer & rWrt )
if( !pCNd )
return rWrt;
- USHORT nId = RES_TXTNODE;
+ sal_uInt16 nId = RES_TXTNODE;
switch (pCNd->GetNodeType())
{
case ND_TEXTNODE:
diff --git a/sw/source/filter/writer/wrtswtbl.cxx b/sw/source/filter/writer/wrtswtbl.cxx
index cae27d870455..ab080c8ac6f1 100644
--- a/sw/source/filter/writer/wrtswtbl.cxx
+++ b/sw/source/filter/writer/wrtswtbl.cxx
@@ -56,7 +56,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
{
const SfxItemSet& rItemSet = pBox->GetFrmFmt()->GetAttrSet();
const SfxPoolItem *pItem;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, FALSE, &pItem ) )
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_VERT_ORIENT, sal_False, &pItem ) )
{
sal_Int16 eBoxVertOri =
((const SwFmtVertOrient *)pItem)->GetVertOrient();
@@ -70,7 +70,7 @@ sal_Int16 SwWriteTableCell::GetVertOri() const
//-----------------------------------------------------------------------
-SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
+SwWriteTableRow::SwWriteTableRow( long nPosition, sal_Bool bUseLayoutHeights )
: pBackground(0), nPos(nPosition), mbUseLayoutHeights(bUseLayoutHeights),
nTopBorder(USHRT_MAX), nBottomBorder(USHRT_MAX), bTopBorder(true),
bBottomBorder(true)
@@ -78,8 +78,8 @@ SwWriteTableRow::SwWriteTableRow( long nPosition, BOOL bUseLayoutHeights )
}
SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
long nHeight,
const SvxBrushItem *pBackgroundBrush )
{
@@ -93,7 +93,7 @@ SwWriteTableCell *SwWriteTableRow::AddCell( const SwTableBox *pBox,
//-----------------------------------------------------------------------
-SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
+SwWriteTableCol::SwWriteTableCol(sal_uInt32 nPosition)
: nPos(nPosition), nWidthOpt(0), bRelWidthOpt(false), bOutWidth(true),
bLeftBorder(true), bRightBorder(true)
{
@@ -101,20 +101,20 @@ SwWriteTableCol::SwWriteTableCol(USHORT nPosition)
//-----------------------------------------------------------------------
-long SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
+sal_uInt32 SwWriteTable::GetBoxWidth( const SwTableBox *pBox )
{
const SwFrmFmt *pFmt = pBox->GetFrmFmt();
const SwFmtFrmSize& aFrmSize=
(const SwFmtFrmSize&)pFmt->GetFmtAttr( RES_FRM_SIZE );
- return aFrmSize.GetSize().Width();
+ return sal::static_int_cast<sal_uInt32>(aFrmSize.GetSize().Width());
}
long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
#if OSL_DEBUG_LEVEL > 1
- BOOL bOldGetLineHeightCalled = bGetLineHeightCalled;
- bGetLineHeightCalled = TRUE;
+ sal_Bool bOldGetLineHeightCalled = bGetLineHeightCalled;
+ bGetLineHeightCalled = sal_True;
#endif
long nHeight = 0;
@@ -130,7 +130,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
// #i60390# - in some cases we still want to continue
// to use the layout heights even if one of the rows has a height of 0
// ('hidden' rows)
- bUseLayoutHeights = bLayoutAvailable; /*FALSE;*/
+ bUseLayoutHeights = bLayoutAvailable; /*sal_False;*/
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( bLayoutAvailable || !bOldGetLineHeightCalled, "Layout ungueltig?" );
@@ -138,9 +138,9 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
}
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox* pBox = rBoxes[nBox];
if( pBox->GetSttNd() )
@@ -152,7 +152,7 @@ long SwWriteTable::GetLineHeight( const SwTableLine *pLine )
{
long nTmp = 0;
const SwTableLines &rLines = pBox->GetTabLines();
- for( USHORT nLine=0; nLine<rLines.Count(); nLine++ )
+ for( sal_uInt16 nLine=0; nLine<rLines.Count(); nLine++ )
{
nTmp += GetLineHeight( rLines[nLine] );
}
@@ -176,7 +176,7 @@ long SwWriteTable::GetLineHeight( const SwTableBox *pBox ) const
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
return nHeight;
@@ -193,7 +193,7 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
const SfxPoolItem* pItem;
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
if( !pLine->GetUpper() )
@@ -215,9 +215,9 @@ const SvxBrushItem *SwWriteTable::GetLineBrush( const SwTableBox *pBox,
void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
- BOOL bTable )
+ sal_Bool bTable )
{
- if( (UINT32)-1 == nBorderColor )
+ if( (sal_uInt32)-1 == nBorderColor )
{
Color aGrayColor( COL_GRAY );
if( !pBorderLine->GetColor().IsRGBEqual( aGrayColor ) )
@@ -227,7 +227,7 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
if( !bCollectBorderWidth )
return;
- USHORT nOutWidth = pBorderLine->GetOutWidth();
+ sal_uInt16 nOutWidth = pBorderLine->GetOutWidth();
if( bTable )
{
if( nOutWidth && (!nBorder || nOutWidth < nBorder) )
@@ -239,20 +239,20 @@ void SwWriteTable::MergeBorders( const SvxBorderLine* pBorderLine,
nInnerBorder = nOutWidth;
}
- USHORT nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
+ sal_uInt16 nDist = pBorderLine->GetInWidth() ? pBorderLine->GetDistance()
: 0;
if( nDist && (!nCellSpacing || nDist < nCellSpacing) )
nCellSpacing = nDist;
}
-USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
- USHORT nRow, USHORT nCol,
- USHORT nRowSpan, USHORT nColSpan,
- USHORT& rTopBorder,
- USHORT &rBottomBorder )
+sal_uInt16 SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
+ sal_uInt16 nRow, sal_uInt16 nCol,
+ sal_uInt16 nRowSpan, sal_uInt16 nColSpan,
+ sal_uInt16& rTopBorder,
+ sal_uInt16 &rBottomBorder )
{
- USHORT nBorderMask = 0;
+ sal_uInt16 nBorderMask = 0;
const SwFrmFmt *pFrmFmt = pBox->GetFrmFmt();
const SvxBoxItem& rBoxItem = (const SvxBoxItem&)pFrmFmt->GetFmtAttr( RES_BOX );
@@ -288,7 +288,7 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
// boxes.
if( bCollectBorderWidth )
{
- USHORT nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
+ sal_uInt16 nDist = rBoxItem.GetDistance( BOX_LINE_TOP );
if( nDist && (!nCellPadding || nDist < nCellPadding) )
nCellPadding = nDist;
nDist = rBoxItem.GetDistance( BOX_LINE_BOTTOM );
@@ -306,18 +306,18 @@ USHORT SwWriteTable::MergeBoxBorders( const SwTableBox *pBox,
}
-USHORT SwWriteTable::GetRawWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt32 SwWriteTable::GetRawWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- USHORT nWidth = aCols[nCol+nColSpan-1]->GetPos();
+ sal_uInt32 nWidth = aCols[nCol+nColSpan-1]->GetPos();
if( nCol > 0 )
nWidth = nWidth - aCols[nCol-1]->GetPos();
return nWidth;
}
-USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
+sal_uInt16 SwWriteTable::GetLeftSpace( sal_uInt16 nCol ) const
{
- USHORT nSpace = nCellPadding + nCellSpacing;
+ sal_uInt16 nSpace = nCellPadding + nCellSpacing;
// In der ersten Spalte auch noch die Liniendicke abziehen
if( nCol==0 )
@@ -332,9 +332,9 @@ USHORT SwWriteTable::GetLeftSpace( USHORT nCol ) const
return nSpace;
}
-USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRightSpace( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- USHORT nSpace = nCellPadding;
+ sal_uInt16 nSpace = nCellPadding;
// In der letzten Spalte noch einmal zusaetzlich CELLSPACING und
// und die Liniendicke abziehen
@@ -350,9 +350,9 @@ USHORT SwWriteTable::GetRightSpace( USHORT nCol, USHORT nColSpan ) const
return nSpace;
}
-USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetAbsWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
- long nWidth = GetRawWidth( nCol, nColSpan );
+ sal_uInt32 nWidth = GetRawWidth( nCol, nColSpan );
if( nBaseWidth != nTabWidth )
{
nWidth *= nTabWidth;
@@ -362,29 +362,29 @@ USHORT SwWriteTable::GetAbsWidth( USHORT nCol, USHORT nColSpan ) const
nWidth -= GetLeftSpace( nCol ) + GetRightSpace( nCol, nColSpan );
OSL_ENSURE( nWidth > 0, "Spaltenbreite <= 0. OK?" );
- return nWidth > 0 ? (USHORT)nWidth : 0;
+ return nWidth > 0 ? (sal_uInt16)nWidth : 0;
}
-USHORT SwWriteTable::GetRelWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetRelWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
- return (USHORT)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*256 + GetBaseWidth()/2,
GetBaseWidth() );
}
-USHORT SwWriteTable::GetPrcWidth( USHORT nCol, USHORT nColSpan ) const
+sal_uInt16 SwWriteTable::GetPrcWidth( sal_uInt16 nCol, sal_uInt16 nColSpan ) const
{
long nWidth = GetRawWidth( nCol, nColSpan );
// sieht komisch aus, ist aber nichts anderes als
// [(100 * nWidth) + .5] ohne Rundungsfehler
- return (USHORT)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
+ return (sal_uInt16)(long)Fraction( nWidth*100 + GetBaseWidth()/2,
GetBaseWidth() );
}
-long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
- USHORT nRowSpan ) const
+long SwWriteTable::GetAbsHeight( long nRawHeight, sal_uInt16 nRow,
+ sal_uInt16 nRowSpan ) const
{
nRawHeight -= (2*nCellPadding + nCellSpacing);
@@ -412,28 +412,28 @@ long SwWriteTable::GetAbsHeight( long nRawHeight, USHORT nRow,
return nRawHeight > 0 ? nRawHeight : 0;
}
-BOOL SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, BOOL /*bExpandedBefore*/,
- USHORT nDepth) const
+sal_Bool SwWriteTable::ShouldExpandSub(const SwTableBox *pBox, sal_Bool /*bExpandedBefore*/,
+ sal_uInt16 nDepth) const
{
return !pBox->GetSttNd() && nDepth > 0;
}
void SwWriteTable::CollectTableRowsCols( long nStartRPos,
- USHORT nStartCPos,
+ sal_uInt32 nStartCPos,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
- USHORT nDepth )
+ sal_uInt16 nDepth )
{
- BOOL bSubExpanded = FALSE;
- USHORT nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
+ sal_uInt16 nLines = rLines.Count();
#if OSL_DEBUG_LEVEL > 1
- USHORT nEndCPos = 0;
+ sal_uInt32 nEndCPos = 0;
#endif
long nRPos = nStartRPos;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
/*const*/ SwTableLine *pLine = rLines[nLine];
@@ -449,14 +449,14 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
layout, you may run into this robust code.
It's not allowed that subrows leaves their parentrow. If this would happen the line
height of subrow is reduced to a part of the remaining height */
- OSL_ENSURE( FALSE, "Corrupt line height I" );
+ OSL_ENSURE( sal_False, "Corrupt line height I" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
nRPos += nLineHeight;
}
SwWriteTableRow *pRow = new SwWriteTableRow( nRPos, bUseLayoutHeights);
- USHORT nRow;
+ sal_uInt16 nRow;
if( aRows.Seek_Entry( pRow, &nRow ) )
delete pRow;
else
@@ -482,21 +482,21 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
// Fuer alle Boxen der Zeile ggf. eine Spalte einfuegen
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
- USHORT nBoxes = rBoxes.Count();
+ sal_uInt16 nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ sal_uInt32 nCPos = nStartCPos;
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
SwWriteTableCol *pCol = new SwWriteTableCol( nCPos );
- USHORT nCol;
+ sal_uInt16 nCol;
if( aCols.Seek_Entry( pCol, &nCol ) )
delete pCol;
else
@@ -512,7 +512,7 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
else
{
#if OSL_DEBUG_LEVEL > 1
- USHORT nCheckPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos = nCPos + GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
@@ -542,30 +542,30 @@ void SwWriteTable::CollectTableRowsCols( long nStartRPos,
nCPos - nOldCPos,
pBox->GetTabLines(),
nDepth-1 );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
}
}
}
-void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
- USHORT nStartCPos, USHORT nStartCol,
+void SwWriteTable::FillTableRowsCols( long nStartRPos, sal_uInt16 nStartRow,
+ sal_uInt32 nStartCPos, sal_uInt16 nStartCol,
long nParentLineHeight,
- USHORT nParentLineWidth,
+ sal_uInt32 nParentLineWidth,
const SwTableLines& rLines,
const SvxBrushItem* pParentBrush,
- USHORT nDepth,
+ sal_uInt16 nDepth,
sal_uInt16 nNumOfHeaderRows )
{
- USHORT nLines = rLines.Count();
- BOOL bSubExpanded = FALSE;
+ sal_uInt16 nLines = rLines.Count();
+ sal_Bool bSubExpanded = sal_False;
// Festlegen der Umrandung
long nRPos = nStartRPos;
- USHORT nRow = nStartRow;
+ sal_uInt16 nRow = nStartRow;
- for( USHORT nLine = 0; nLine < nLines; nLine++ )
+ for( sal_uInt16 nLine = 0; nLine < nLines; nLine++ )
{
const SwTableLine *pLine = rLines[nLine];
@@ -578,7 +578,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( nParentLineHeight && nStartRPos + nParentLineHeight <= nRPos )
{
/* See comment in CollectTableRowCols */
- OSL_ENSURE( FALSE, "Corrupt line height II" );
+ OSL_ENSURE( sal_False, "Corrupt line height II" );
nRPos -= nLineHeight;
nLineHeight = nStartRPos + nParentLineHeight - nRPos; // remaining parent height
nLineHeight /= nLines - nLine; // divided through the number of remaining sub rows
@@ -589,10 +589,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nRPos = nStartRPos + nParentLineHeight;
// Und ihren Index
- USHORT nOldRow = nRow;
+ sal_uInt16 nOldRow = nRow;
SwWriteTableRow aRow( nRPos,bUseLayoutHeights );
#if OSL_DEBUG_LEVEL > 1
- BOOL bFound =
+ sal_Bool bFound =
#endif
aRows.Seek_Entry( &aRow, &nRow );
#if OSL_DEBUG_LEVEL > 1
@@ -620,12 +620,12 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
const SfxItemSet& rItemSet = pLineFrmFmt->GetAttrSet();
long nHeight = 0;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, TRUE, &pItem ))
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_FRM_SIZE, sal_True, &pItem ))
nHeight = ((SwFmtFrmSize*)pItem)->GetHeight();
const SvxBrushItem *pBrushItem, *pLineBrush = pParentBrush;
- if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, FALSE,
+ if( SFX_ITEM_SET == rItemSet.GetItemState( RES_BACKGROUND, sal_False,
&pItem ) )
{
pLineBrush = (const SvxBrushItem *)pItem;
@@ -633,10 +633,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
// Wenn die Zeile die gesamte Tabelle umspannt, koennen
// Wir den Hintergrund an der Zeile ausgeben. Sonst muessen
// wir in an den Zelle ausgeben.
- BOOL bOutAtRow = !nParentLineWidth;
+ sal_Bool bOutAtRow = !nParentLineWidth;
if( !bOutAtRow && nStartCPos==0 )
{
- USHORT nEndCol;
+ sal_uInt16 nEndCol;
SwWriteTableCol aCol( nParentLineWidth );
bOutAtRow = aCols.Seek_Entry(&aCol,&nEndCol) &&
nEndCol == aCols.Count()-1;
@@ -655,19 +655,19 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBrushItem = 0;
}
- USHORT nBoxes = rBoxes.Count();
- USHORT nCPos = nStartCPos;
- USHORT nCol = nStartCol;
+ sal_uInt16 nBoxes = rBoxes.Count();
+ sal_uInt32 nCPos = nStartCPos;
+ sal_uInt16 nCol = nStartCol;
- for( USHORT nBox=0; nBox<nBoxes; nBox++ )
+ for( sal_uInt16 nBox=0; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
// Position der letzten ueberdeckten Spalte ermitteln
- USHORT nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
if( nBox < nBoxes-1 || (nParentLineWidth==0 && nLine==0) )
{
- nCPos = nCPos + (USHORT)GetBoxWidth( pBox );
+ nCPos = nCPos + GetBoxWidth( pBox );
if( nBox==nBoxes-1 )
nParentLineWidth = nCPos - nStartCPos;
}
@@ -675,10 +675,10 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
nCPos = nStartCPos + nParentLineWidth;
// Und ihren Index
- USHORT nOldCol = nCol;
+ sal_uInt16 nOldCol = nCol;
SwWriteTableCol aCol( nCPos );
#if OSL_DEBUG_LEVEL > 1
- BOOL bFound2 =
+ sal_Bool bFound2 =
#endif
aCols.Seek_Entry( &aCol, &nCol );
#if OSL_DEBUG_LEVEL > 1
@@ -687,16 +687,16 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( !ShouldExpandSub( pBox, bSubExpanded, nDepth ) )
{
- USHORT nRowSpan = nRow - nOldRow + 1;
+ sal_uInt16 nRowSpan = nRow - nOldRow + 1;
// The new table model may have true row span attributes
const long nAttrRowSpan = pBox->getRowSpan();
if ( 1 < nAttrRowSpan )
- nRowSpan = (USHORT)nAttrRowSpan;
+ nRowSpan = (sal_uInt16)nAttrRowSpan;
else if ( nAttrRowSpan < 1 )
nRowSpan = 0;
- USHORT nColSpan = nCol - nOldCol + 1;
+ sal_uInt16 nColSpan = nCol - nOldCol + 1;
pRow->AddCell( pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nHeight,
pBrushItem );
@@ -704,8 +704,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
if( pBox->GetSttNd() )
{
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask = MergeBoxBorders(pBox, nOldRow, nOldCol,
nRowSpan, nColSpan, nTopBorder, nBottomBorder);
// #i30094# add a sanity check here to ensure that
@@ -716,7 +716,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nOldCol];
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
}
if (!(nBorderMask & 8))
@@ -724,16 +724,16 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
SwWriteTableCol *pCol = aCols[nCol];
OSL_ENSURE(pCol, "No TableCol found, panic!");
if (pCol)
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
}
if (!(nBorderMask & 1))
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
else if (!pRow->nTopBorder || nTopBorder < pRow->nTopBorder)
pRow->nTopBorder = nTopBorder;
if (!(nBorderMask & 2))
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
else if (
!pEndRow->nBottomBorder ||
nBottomBorder < pEndRow->nBottomBorder
@@ -750,7 +750,7 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
pBox->GetTabLines(),
pLineBrush, nDepth-1,
nNumOfHeaderRows );
- bSubExpanded = TRUE;
+ bSubExpanded = sal_True;
}
nCol++; // Die naechste Zelle faengt in der nachten Spalte an
@@ -761,8 +761,8 @@ void SwWriteTable::FillTableRowsCols( long nStartRPos, USHORT nStartRow,
}
SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
- USHORT nBWidth, BOOL bRel, USHORT nMaxDepth, USHORT nLSub, USHORT nRSub, sal_uInt32 nNumOfRowsToRepeat)
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ sal_uInt32 nBWidth, sal_Bool bRel, sal_uInt16 nMaxDepth, sal_uInt16 nLSub, sal_uInt16 nRSub, sal_uInt32 nNumOfRowsToRepeat)
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(nBWidth), nHeadEndRow(USHRT_MAX),
nLeftSub(nLSub), nRightSub(nRSub), nTabWidth(nWidth), bRelWidths(bRel),
bUseLayoutHeights(true),
@@ -772,7 +772,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
bColsOption(false), bColTags(true), bLayoutExport(false),
bCollectBorderWidth(true)
{
- USHORT nParentWidth = nBaseWidth + nLeftSub + nRightSub;
+ sal_uInt32 nParentWidth = nBaseWidth + nLeftSub + nRightSub;
// Erstmal die Tabellen-Struktur festlegen. Hinter der Tabelle ist in
// jedem Fall eine Spalte zu Ende
@@ -789,7 +789,7 @@ SwWriteTable::SwWriteTable(const SwTableLines& rLines, long nWidth,
}
SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
- : nBorderColor((UINT32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
+ : nBorderColor((sal_uInt32)-1), nCellSpacing(0), nCellPadding(0), nBorder(0),
nInnerBorder(0), nBaseWidth(pLayoutInfo->GetWidthOption()), nHeadEndRow(0),
nLeftSub(0), nRightSub(0), nTabWidth(pLayoutInfo->GetWidthOption()),
bRelWidths(pLayoutInfo->HasPrcWidthOption()), bUseLayoutHeights(false),
@@ -807,9 +807,9 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
nCellSpacing = pLayoutInfo->GetCellSpacing();
}
- USHORT nRow, nCol;
- USHORT nCols = pLayoutInfo->GetColCount();
- USHORT nRows = pLayoutInfo->GetRowCount();
+ sal_uInt16 nRow, nCol;
+ sal_uInt16 nCols = pLayoutInfo->GetColCount();
+ sal_uInt16 nRows = pLayoutInfo->GetRowCount();
// Erstmal die Tabellen-Struktur festlegen.
for( nCol=0; nCol<nCols; nCol++ )
@@ -842,7 +842,7 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
{
SwWriteTableRow *pRow = aRows[nRow];
- BOOL bHeightExported = FALSE;
+ sal_Bool bHeightExported = sal_False;
for( nCol=0; nCol<nCols; nCol++ )
{
const SwHTMLTableLayoutCell *pLayoutCell =
@@ -861,8 +861,8 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
continue;
}
- USHORT nRowSpan = pLayoutCell->GetRowSpan();
- USHORT nColSpan = pLayoutCell->GetColSpan();
+ sal_uInt16 nRowSpan = pLayoutCell->GetRowSpan();
+ sal_uInt16 nColSpan = pLayoutCell->GetColSpan();
const SwTableBox *pBox = pLayoutCnts->GetTableBox();
OSL_ENSURE( pBox,
"Tabelle in Tabelle kann nicht ueber Layout exportiert werden" );
@@ -876,29 +876,29 @@ SwWriteTable::SwWriteTable( const SwHTMLTableLayout *pLayoutInfo )
pCell->SetWidthOpt( pLayoutCell->GetWidthOption(),
pLayoutCell->IsPrcWidthOption() );
- USHORT nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
- USHORT nBorderMask =
+ sal_uInt16 nTopBorder = USHRT_MAX, nBottomBorder = USHRT_MAX;
+ sal_uInt16 nBorderMask =
MergeBoxBorders( pBox, nRow, nCol, nRowSpan, nColSpan,
nTopBorder, nBottomBorder );
SwWriteTableCol *pCol = aCols[nCol];
if( !(nBorderMask & 4) )
- pCol->bLeftBorder = FALSE;
+ pCol->bLeftBorder = sal_False;
pCol = aCols[nCol+nColSpan-1];
if( !(nBorderMask & 8) )
- pCol->bRightBorder = FALSE;
+ pCol->bRightBorder = sal_False;
if( !(nBorderMask & 1) )
- pRow->bTopBorder = FALSE;
+ pRow->bTopBorder = sal_False;
SwWriteTableRow *pEndRow = aRows[nRow+nRowSpan-1];
if( !(nBorderMask & 2) )
- pEndRow->bBottomBorder = FALSE;
+ pEndRow->bBottomBorder = sal_False;
// Die Hoehe braucht nur einmal geschieben werden
if( nHeight )
- bHeightExported = TRUE;
+ bHeightExported = sal_True;
}
}
diff --git a/sw/source/filter/ww1/fltshell.cxx b/sw/source/filter/ww1/fltshell.cxx
index 74e48d955920..668244a95383 100644
--- a/sw/source/filter/ww1/fltshell.cxx
+++ b/sw/source/filter/ww1/fltshell.cxx
@@ -77,9 +77,9 @@
using namespace com::sun::star;
-static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, BOOL bNext)
+static SwCntntNode* GetCntntNode(SwDoc* pDoc, SwNodeIndex& rIdx, sal_Bool bNext)
{
- SwCntntNode* pCNd = pDoc->GetNodes()[ rIdx ]->GetCntntNode();
+ SwCntntNode * pCNd = rIdx.GetNode().GetCntntNode();
if(!pCNd && 0 == (pCNd = bNext ? pDoc->GetNodes().GoNext(&rIdx)
: pDoc->GetNodes().GoPrevious(&rIdx)))
{
@@ -98,10 +98,10 @@ SwFltStackEntry::SwFltStackEntry(const SwPosition& rStartPos, SfxPoolItem* pHt )
// Anfang vom Bereich merken
nMkCntnt = rStartPos.nContent.GetIndex();
pAttr = pHt; // speicher eine Kopie vom Attribut
- bOld = FALSE; // used for marking Attributes *before* skipping field results
- bLocked = TRUE; // locke das Attribut --> darf erst
- bCopied = FALSE; // gesetzt werden, wenn es wieder geunlocked ist
- bConsumedByField = FALSE;
+ bOld = sal_False; // used for marking Attributes *before* skipping field results
+ bLocked = sal_True; // locke das Attribut --> darf erst
+ bCopied = sal_False; // gesetzt werden, wenn es wieder geunlocked ist
+ bConsumedByField = sal_False;
}
SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
@@ -111,7 +111,7 @@ SwFltStackEntry::SwFltStackEntry(const SwFltStackEntry& rEntry) :
pAttr = rEntry.pAttr->Clone();
nMkCntnt= rEntry.nMkCntnt;
bOld = rEntry.bOld;
- bLocked = bCopied = TRUE; // when rEntry were NOT bLocked we would never have been called
+ bLocked = bCopied = sal_True; // when rEntry were NOT bLocked we would never have been called
bConsumedByField = rEntry.bConsumedByField;
}
@@ -126,16 +126,16 @@ SwFltStackEntry::~SwFltStackEntry()
void SwFltStackEntry::SetEndPos(const SwPosition& rEndPos)
{
// Attribut freigeben und das Ende merken.
- // Alles mit USHORT's, weil sonst beim Einfuegen von neuem Text an der
+ // Alles mit sal_uInt16's, weil sonst beim Einfuegen von neuem Text an der
// Cursor-Position auch der Bereich vom Attribut weiter
// verschoben wird.
// Das ist aber nicht das gewollte!
- bLocked = FALSE; // freigeben und das ENDE merken
+ bLocked = sal_False; // freigeben und das ENDE merken
nPtNode = rEndPos.nNode.GetIndex()-1;
nPtCntnt = rEndPos.nContent.GetIndex();
}
-BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
+sal_Bool SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, sal_Bool bCheck )
{
// wird ueberhaupt ein Bereich umspannt ??
// - ist kein Bereich, dann nicht returnen wenn am Anfang vom Absatz
@@ -145,33 +145,33 @@ BOOL SwFltStackEntry::MakeRegion(SwDoc* pDoc, SwPaM& rRegion, BOOL bCheck )
nPtCntnt && RES_TXTATR_FIELD != pAttr->Which()
)
{
- return FALSE;
+ return sal_False;
}
// !!! Die Content-Indizies beziehen sich immer auf den Node !!!
rRegion.GetPoint()->nNode = nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, nMkCntnt);
rRegion.SetMark();
if( nMkNode != nPtNode )
{
rRegion.GetPoint()->nNode = nPtNode.GetIndex() + 1;
- pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, FALSE);
+ pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_False);
}
rRegion.GetPoint()->nContent.Assign(pCNd, nPtCntnt);
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE( CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE ),
+ rRegion.End()->nNode, sal_True ),
"Attribut oder AEhnliches ueber Bereichs-Grenzen" );
#endif
if( bCheck )
return CheckNodesRange( rRegion.Start()->nNode,
- rRegion.End()->nNode, TRUE );
+ rRegion.End()->nNode, sal_True );
else
- return TRUE;
+ return sal_True;
}
-SwFltControlStack::SwFltControlStack(SwDoc* pDo, ULONG nFieldFl)
+SwFltControlStack::SwFltControlStack(SwDoc* pDo, sal_uLong nFieldFl)
: nFieldFlags(nFieldFl), pDoc(pDo), bIsEndStack(false)
{
}
@@ -192,12 +192,12 @@ SwFltControlStack::~SwFltControlStack()
// nach rechts verschoben werden.
void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- ULONG nPosNd = rPos.nNode.GetIndex();
- USHORT nPosCt = rPos.nContent.GetIndex() - 1;
+ sal_uLong nPosNd = rPos.nNode.GetIndex();
+ sal_uInt16 nPosCt = rPos.nContent.GetIndex() - 1;
- for (USHORT i=0; i < nCnt; i++){
+ for (sal_uInt16 i=0; i < nCnt; i++){
pEntry = (*this)[ i ];
if(( pEntry->nMkNode.GetIndex() + 1 == nPosNd )
&&( pEntry->nMkCntnt >= nPosCt )){
@@ -218,15 +218,15 @@ void SwFltControlStack::MoveAttrs( const SwPosition& rPos )
void SwFltControlStack::MarkAllAttrsOld()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; i++)
- (*this)[ i ]->bOld = TRUE;
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
+ (*this)[ i ]->bOld = sal_True;
}
void SwFltControlStack::NewAttr(const SwPosition& rPos, const SfxPoolItem & rAttr )
{
SwFltStackEntry *pTmp = new SwFltStackEntry(rPos, rAttr.Clone() );
- USHORT nWhich = pTmp->pAttr->Which();
+ sal_uInt16 nWhich = pTmp->pAttr->Which();
SetAttr(rPos, nWhich);// Ende von evtl. gleichen Attributen auf dem Stack
// Setzen, damit sich die Attribute nicht auf
// dem Stack haeufen
@@ -249,9 +249,9 @@ void SwFltControlStack::DeleteAndDestroy(Entries::size_type nCnt)
// Damit erscheinen sie nicht in der Doc-Struktur. Dabei werden nur die
// Attribute entfernt, die im selben Absatz wie pPos stehen.
// Wird fuer Grafik-Apos -> Grafiken benutzt.
-void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0 */)
+void SwFltControlStack::StealAttr(const SwPosition* pPos, sal_uInt16 nAttrId /* = 0 */)
{
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
@@ -273,9 +273,9 @@ void SwFltControlStack::StealAttr(const SwPosition* pPos, USHORT nAttrId /* = 0
void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
{
SwNodeIndex aAktNode( pPos.nNode, -1 );
- USHORT nAktIdx = pPos.nContent.GetIndex();
+ sal_uInt16 nAktIdx = pPos.nContent.GetIndex();
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
while( nCnt )
{
@@ -297,19 +297,19 @@ void SwFltControlStack::KillUnlockedAttrs(const SwPosition& pPos)
// alle anderen im Document setzen und wieder aus dem Stack loeschen
// Returned, ob das gesuchte Attribut / die gesuchten Attribute
// ueberhaupt auf dem Stack standen
-void SwFltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL consumedByField )
+void SwFltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool consumedByField )
{
OSL_ENSURE(!nAttrId ||
(POOLATTR_BEGIN <= nAttrId && POOLATTR_END > nAttrId) ||
(RES_FLTRATTR_BEGIN <= nAttrId && RES_FLTRATTR_END > nAttrId),
"Falsche Id fuers Attribut");
- USHORT nCnt = static_cast< USHORT >(Count());
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
SwFltStackEntry* pEntry;
- for (USHORT i=0; i < nCnt; i++)
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
pEntry = (*this)[ i ];
if (pEntry->bLocked)
@@ -357,7 +357,7 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// gesetzt werden.
rRegion.DeleteMark();
rRegion.GetPoint()->nNode = pEntry->nMkNode.GetIndex() + 1;
- SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, TRUE);
+ SwCntntNode* pCNd = GetCntntNode(pDoc, rRegion.GetPoint()->nNode, sal_True);
rRegion.GetPoint()->nContent.Assign(pCNd, pEntry->nMkCntnt);
}
@@ -365,12 +365,13 @@ static void MakePoint(SwFltStackEntry* pEntry, SwDoc* pDoc, SwPaM& rRegion)
// Beschraenkungen von Bookmarks in Tabellen werden beachtet.
// ( Anfang und Ende muessen in selber Zelle sein )
static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
- SwPaM& rRegion, BOOL bCheck )
+ SwPaM& rRegion, sal_Bool bCheck )
{
if (pEntry->MakeRegion(pDoc, rRegion, bCheck )){
- const SwNodes& rNds = pDoc->GetNodes();
- if( rNds[rRegion.GetPoint()->nNode]->FindTableBoxStartNode()
- != rNds[rRegion.GetMark()->nNode]->FindTableBoxStartNode() ){
+// sal_Bool b1 = rNds[rRegion.GetPoint()->nNode]->FindTableNode() != 0;
+ if (rRegion.GetPoint()->nNode.GetNode().FindTableBoxStartNode()
+ != rRegion.GetMark()->nNode.GetNode().FindTableBoxStartNode())
+ {
rRegion.Exchange(); // Ungueltiger Bereich
rRegion.DeleteMark(); // -> beide auf Mark
}
@@ -380,8 +381,8 @@ static void MakeBookRegionOrPoint(SwFltStackEntry* pEntry, SwDoc* pDoc,
}
#if OSL_DEBUG_LEVEL > 1
-extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
- const SwNodeIndex& rEnd, BOOL bChkSection );
+extern sal_Bool CheckNodesRange( const SwNodeIndex& rStt,
+ const SwNodeIndex& rEnd, sal_Bool bChkSection );
#endif
// IterateNumrulePiece() sucht von rTmpStart bis rEnd den ersten
@@ -392,8 +393,8 @@ extern BOOL CheckNodesRange( const SwNodeIndex& rStt,
// rTmpStart ist ReinRaus-Parameter: Anfang des zu untersuchenden Bereiches rein,
// Anfang des gueltigen Bereichs raus
// rTmpEnd ist raus-Parameter
-// Return-Bool ist TRUE fuer gueltigen Bereich
-static BOOL IterateNumrulePiece( const SwNodeIndex& rEnd,
+// Return-Bool ist sal_True fuer gueltigen Bereich
+static sal_Bool IterateNumrulePiece( const SwNodeIndex& rEnd,
SwNodeIndex& rTmpStart, SwNodeIndex& rTmpEnd )
{
while( ( rTmpStart <= rEnd )
@@ -447,7 +448,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
SwNumRule* pRul = pDoc->FindNumRulePtr( rNumNm );
if( pRul )
{
- if( pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if( pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
SwNodeIndex aTmpStart( aRegion.Start()->nNode );
SwNodeIndex aTmpEnd( aTmpStart );
@@ -480,7 +481,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if (pB->IsPgRef() && !pB->IsRef())
{
// XRefs und Bookmarks sind bereits geUpcased
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->InsertPoolItem(aRegion, SwFmtRefMark(rName), 0);
}
else if( !pB->IsOnlyRef() )
@@ -502,7 +503,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( !pB->IsOnlyRef() &&
( !IsFlagSet(HYPO) || IsFlagSet(BOOK_AND_REF) ) && !pEntry->bConsumedByField)
{
- MakeBookRegionOrPoint(pEntry, pDoc, aRegion, TRUE);
+ MakeBookRegionOrPoint(pEntry, pDoc, aRegion, sal_True);
pDoc->getIDocumentMarkAccess()->makeMark( aRegion, rName, IDocumentMarkAccess::BOOKMARK);
}
}
@@ -529,13 +530,13 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
if( pSet )
{
if( !pTOXAttr->HadBreakItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_BREAK, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_BREAK );
}
if( !pTOXAttr->HadPageDescItem()
- && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, FALSE, &pItem ) )
+ && SFX_ITEM_SET == pSet->GetItemState( RES_PAGEDESC, sal_False, &pItem ) )
{
aBkSet.Put( *pItem );
pNd->ResetAttr( RES_PAGEDESC );
@@ -560,7 +561,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
break;
case RES_FLTR_REDLINE:
{
- if (pEntry->MakeRegion(pDoc, aRegion, TRUE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_True))
{
pDoc->SetRedlineMode((RedlineMode_t)( nsRedlineMode_t::REDLINE_ON
| nsRedlineMode_t::REDLINE_SHOW_INSERT
@@ -591,7 +592,7 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
break;
default:
- if (pEntry->MakeRegion(pDoc, aRegion, FALSE))
+ if (pEntry->MakeRegion(pDoc, aRegion, sal_False))
{
pDoc->InsertPoolItem(aRegion, *pEntry->pAttr, 0);
}
@@ -599,10 +600,10 @@ void SwFltControlStack::SetAttrInDoc(const SwPosition& rTmpPos, SwFltStackEntry*
}
}
-SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
+SfxPoolItem* SwFltControlStack::GetFmtStackAttr(sal_uInt16 nWhich, sal_uInt16 * pPos)
{
SwFltStackEntry* pEntry;
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
@@ -619,14 +620,14 @@ SfxPoolItem* SwFltControlStack::GetFmtStackAttr(USHORT nWhich, USHORT * pPos)
return 0;
}
-const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, USHORT nWhich)
+const SfxPoolItem* SwFltControlStack::GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich)
{
SfxPoolItem* pHt = GetFmtStackAttr(nWhich);
if (pHt)
return (const SfxPoolItem*)pHt;
// im Stack ist das Attribut nicht vorhanden, also befrage das Dokument
- SwCntntNode * pNd = pDoc->GetNodes()[ rPos.nNode ]->GetCntntNode();
+ SwCntntNode * pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd) // kein ContentNode, dann das dflt. Attribut
return &pDoc->GetAttrPool().GetDefaultItem(nWhich);
@@ -641,16 +642,16 @@ void SwFltControlStack::Delete(const SwPaM &rPam)
return;
SwNodeIndex aStartNode(pStt->nNode, -1);
- USHORT nStartIdx = pStt->nContent.GetIndex();
+ sal_uInt16 nStartIdx = pStt->nContent.GetIndex();
SwNodeIndex aEndNode(pEnd->nNode, -1);
- USHORT nEndIdx = pEnd->nContent.GetIndex();
+ sal_uInt16 nEndIdx = pEnd->nContent.GetIndex();
//We don't support deleting content that is over one node, or removing a node.
OSL_ENSURE(aEndNode == aStartNode, "nodes must be the same, or this method extended");
if (aEndNode != aStartNode)
return;
- for (USHORT nSize = static_cast< USHORT >(Count()); nSize > 0;)
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(Count()); nSize > 0;)
{
SwFltStackEntry* pEntry = (*this)[--nSize];
@@ -800,9 +801,9 @@ SfxPoolItem* SwFltRedline::Clone( SfxItemPool* ) const
//------ hier stehen die Methoden von SwFltBookmark -----------
SwFltBookmark::SwFltBookmark( const String& rNa, const String& rVa,
- long nHand, BOOL bOnlyR )
+ long nHand, sal_Bool bOnlyR )
: SfxPoolItem(RES_FLTR_BOOKMARK), nHandle(nHand), aName(rNa), aVal(rVa),
- bOnlyRef(bOnlyR), bRef(FALSE), bPgRef(FALSE)
+ bOnlyRef(bOnlyR), bRef(sal_False), bPgRef(sal_False)
{
// eSrc: CHARSET_DONTKNOW fuer keine UEbersetzung bei operator <<
// Upcase wird immer gemacht.
@@ -835,9 +836,9 @@ SfxPoolItem* SwFltBookmark::Clone(SfxItemPool*) const
//------ hier stehen die Methoden von SwFltTOX -----------
-SwFltTOX::SwFltTOX(SwTOXBase* pBase, USHORT _nCols)
+SwFltTOX::SwFltTOX(SwTOXBase* pBase, sal_uInt16 _nCols)
: SfxPoolItem(RES_FLTR_TOX), pTOXBase(pBase), nCols( _nCols ),
- bHadBreakItem( FALSE ), bHadPageDescItem( FALSE )
+ bHadBreakItem( sal_False ), bHadPageDescItem( sal_False )
{
}
@@ -890,7 +891,7 @@ SfxPoolItem* SwFltSection::Clone(SfxItemPool*) const
//
//////////////////////////////////////////////////////////// SwFltShell
-SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bNew, ULONG nFieldFl) :
+SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFl) :
pCurrentPageDesc(0),
pSavedPos(0),
eSubMode(None),
@@ -902,8 +903,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
nPageDescOffset(GetDoc().GetPageDescCnt()),
eSrcCharSet(RTL_TEXTENCODING_MS_1252),
bNewDoc(bNew),
- bStdPD(FALSE),
- bProtect(FALSE)
+ bStdPD(sal_False),
+ bProtect(sal_False)
{
memset( pColls, 0, sizeof( pColls ) );
pOutDoc = new SwFltOutDoc( *pDoc, pPaM, aStack, aEndStack );
@@ -914,7 +915,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
// evtl. Zeilen eingefuegt / aufgebrochen werden
const SwPosition* pPos = pPaM->GetPoint();
const SwTxtNode* pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
if( nCntPos && pSttNd->GetTxt().Len() )
// EinfuegePos nicht in leerer Zeile
pDoc->SplitNode( *pPos, false ); // neue Zeile erzeugen
@@ -924,8 +925,8 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
- BOOL bReadNoTbl = 0 != pSttNd->FindTableNode() ||
+ sal_uLong nNd = pPos->nNode.GetIndex();
+ sal_Bool bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < pDoc->GetNodes().GetEndOfInserts().GetIndex() &&
pDoc->GetNodes().GetEndOfInserts().StartOfSectionIndex() < nNd );
if( bReadNoTbl )
@@ -938,7 +939,7 @@ SwFltShell::SwFltShell(SwDoc* pDoc, SwPaM& rPaM, const String& rBaseURL, BOOL bN
SwFltShell::~SwFltShell()
{
- USHORT i;
+ sal_uInt16 i;
if (eSubMode == Style)
EndStyle();
@@ -948,11 +949,11 @@ SwFltShell::~SwFltShell()
EndFly();
GetDoc().SetUpdateExpFldStat(true);
- GetDoc().SetInitDBFields(TRUE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
- aEndStack.SetAttr(*pPaM->GetPoint(), 0, FALSE);
+ GetDoc().SetInitDBFields(sal_True);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
+ aEndStack.SetAttr(*pPaM->GetPoint(), 0, sal_False);
if( bProtect ){ // Das ganze Doc soll geschuetzt sein
SwDoc& rDoc = GetDoc();
@@ -974,7 +975,7 @@ SwFltShell::~SwFltShell()
if( !IsFlagSet(SwFltControlStack::DONT_HARD_PROTECT) ){
SwDocShell* pDocSh = rDoc.GetDocShell();
if( pDocSh )
- pDocSh->SetReadOnlyUI( TRUE );
+ pDocSh->SetReadOnlyUI( sal_True );
}
}
// Pagedescriptoren am Dokument updaten (nur so werden auch die
@@ -1013,7 +1014,7 @@ void SwFltShell::ConvertUStr( String& rInOut )
String SwFltShell::QuoteStr( const String& rIn )
{
String sOut( rIn );
- BOOL bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
+ sal_Bool bAllowCr = aStack.IsFlagSet( SwFltControlStack::ALLOW_FLD_CR );
for( xub_StrLen n = 0; n < sOut.Len(); ++n )
{
@@ -1108,7 +1109,7 @@ SwFltShell& SwFltShell::AddGraphic( const String& rPicName )
return *this;
}
-SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
+SwFltShell& SwFltShell::SetStyle( sal_uInt16 nStyle )
{
SwFltFormatCollection* p = pColls[ nStyle ];
@@ -1126,7 +1127,7 @@ SwFltShell& SwFltShell::SetStyle( USHORT nStyle )
}
else
{
- OSL_ENSURE( FALSE, "Ungueltiger SwFltStyleCode" );
+ OSL_ENSURE( sal_False, "Ungueltiger SwFltStyleCode" );
}
return *this;
}
@@ -1141,15 +1142,15 @@ SwFltShell& SwFltShell::operator << (SwFltBookmark& aBook)
void SwFltShell::SetBookEnd(long nHandle)
{
- aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, TRUE, nHandle );
+ aEndStack.SetAttr( *pPaM->GetPoint(), RES_FLTR_BOOKMARK, sal_True, nHandle );
}
-SwFltShell& SwFltShell::EndItem( USHORT nAttrId )
+SwFltShell& SwFltShell::EndItem( sal_uInt16 nAttrId )
{
switch( nAttrId )
{
case RES_FLTR_BOOKMARK:
- OSL_ENSURE( FALSE, "Falscher Aufruf fuer Bookmark-Ende" );
+ OSL_ENSURE( sal_False, "Falscher Aufruf fuer Bookmark-Ende" );
break;
case RES_FLTR_TOX:
@@ -1182,12 +1183,12 @@ SwFltShell& SwFltShell::operator << (const SwField& rField)
return *this;
}
-const SfxPoolItem& SwFltOutDoc::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetAttr(sal_uInt16 nWhich)
{
return *rStack.GetFmtAttr(*pPaM->GetPoint(), nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
@@ -1197,71 +1198,70 @@ const SfxPoolItem& SwFltFormatCollection::GetAttr(USHORT nWhich)
// sonst aus dem Node mit Parents
// Im Stack wird nicht nachgesehen
-const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
- SwCntntNode * pNd = GetDoc().GetNodes()[ pPaM->GetPoint()->nNode ]
- ->GetCntntNode();
+ SwCntntNode * pNd = pPaM->GetPoint()->nNode.GetNode().GetCntntNode();
if (pNd) // ContentNode: Attribut mit Parent
return pNd->GetAttr(nWhich);
else // kein ContentNode, dann das dflt. Attribut
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltFormatCollection::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return GetColl()->GetFmtAttr(nWhich); // mit Parents
}
-const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetNodeOrStyAttr(sal_uInt16 nWhich)
{
return pOut->GetNodeOrStyAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetAttr(sal_uInt16 nWhich)
{
return pOut->GetAttr( nWhich );
}
-const SfxPoolItem& SwFltShell::GetFlyFrmAttr(USHORT nWhich)
+const SfxPoolItem& SwFltShell::GetFlyFrmAttr(sal_uInt16 nWhich)
{
return pOut->GetFlyFrmAttr( nWhich );
}
-SwFieldType* SwFltShell::GetSysFldType(USHORT eWhich)
+SwFieldType* SwFltShell::GetSysFldType(sal_uInt16 eWhich)
{
return GetDoc().GetSysFldType(eWhich);
}
-BOOL SwFltShell::GetWeightBold()
+sal_Bool SwFltShell::GetWeightBold()
{
return ((SvxWeightItem&)GetNodeOrStyAttr(RES_CHRATR_WEIGHT)).GetWeight()
!= WEIGHT_NORMAL;
}
-BOOL SwFltShell::GetPostureItalic()
+sal_Bool SwFltShell::GetPostureItalic()
{
return ((SvxPostureItem&)GetNodeOrStyAttr(RES_CHRATR_POSTURE)).GetPosture()
!= ITALIC_NONE;
}
-BOOL SwFltShell::GetCrossedOut()
+sal_Bool SwFltShell::GetCrossedOut()
{
return ((SvxCrossedOutItem&)GetNodeOrStyAttr(RES_CHRATR_CROSSEDOUT))
.GetStrikeout() != STRIKEOUT_NONE;
}
-BOOL SwFltShell::GetContour()
+sal_Bool SwFltShell::GetContour()
{
return ((SvxContourItem&)GetNodeOrStyAttr(RES_CHRATR_CONTOUR)).GetValue();
}
-BOOL SwFltShell::GetCaseKapitaelchen()
+sal_Bool SwFltShell::GetCaseKapitaelchen()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_KAPITAELCHEN;
}
-BOOL SwFltShell::GetCaseVersalien()
+sal_Bool SwFltShell::GetCaseVersalien()
{
return ((SvxCaseMapItem&)GetNodeOrStyAttr(RES_CHRATR_CASEMAP))
.GetCaseMap() == SVX_CASEMAP_VERSALIEN;
@@ -1280,103 +1280,103 @@ SwFltOutBase::SwFltOutBase(SwDoc& rDocu)
{
}
-const SfxPoolItem& SwFltOutBase::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutBase::GetCellAttr(sal_uInt16 nWhich)
{
- OSL_ENSURE(FALSE, "GetCellAttr ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "GetCellAttr ausserhalb von normalem Text");
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltOutBase::BeginTable()
+sal_Bool SwFltOutBase::BeginTable()
{
- OSL_ENSURE(FALSE, "BeginTable ausserhalb von normalem Text");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginTable ausserhalb von normalem Text");
+ return sal_False;
}
void SwFltOutBase::NextTableCell()
{
- OSL_ENSURE(FALSE, "NextTableCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableCell ausserhalb von normalem Text");
}
void SwFltOutBase::NextTableRow()
{
- OSL_ENSURE(FALSE, "NextTableRow ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "NextTableRow ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableWidth(SwTwips /*nW*/)
{
- OSL_ENSURE(FALSE, "SetTableWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetTableOrient(sal_Int16 /*eOri*/)
{
- OSL_ENSURE(FALSE, "SetTableOrient ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetTableOrient ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellWidth(SwTwips /*nWidth*/, sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "SetCellWidth ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellWidth ausserhalb von normalem Text");
}
void SwFltOutBase::SetCellHeight(SwTwips /*nH*/)
{
- OSL_ENSURE(FALSE, "SetCellHeight ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellHeight ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, USHORT /*nCell*/)
+void SwFltOutBase::SetCellBorder(const SvxBoxItem& /*rFmtBox*/, sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "SetCellBorder ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellBorder ausserhalb von normalem Text");
}
-void SwFltOutBase::SetCellSpace(USHORT /*nSp*/)
+void SwFltOutBase::SetCellSpace(sal_uInt16 /*nSp*/)
{
- OSL_ENSURE(FALSE, "SetCellSpace ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "SetCellSpace ausserhalb von normalem Text");
}
-void SwFltOutBase::DeleteCell(USHORT /*nCell*/)
+void SwFltOutBase::DeleteCell(sal_uInt16 /*nCell*/)
{
- OSL_ENSURE(FALSE, "DeleteCell ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "DeleteCell ausserhalb von normalem Text");
}
void SwFltOutBase::EndTable()
{
- OSL_ENSURE(FALSE, "EndTable ausserhalb von normalem Text");
+ OSL_ENSURE(sal_False, "EndTable ausserhalb von normalem Text");
}
-/*virtual*/ BOOL SwFltOutDoc::IsInTable()
+/*virtual*/ sal_Bool SwFltOutDoc::IsInTable()
{
return pTable != 0;
};
-BOOL SwFltOutDoc::BeginTable()
+sal_Bool SwFltOutDoc::BeginTable()
{
if(bReadNoTbl)
- return FALSE;
+ return sal_False;
if (pTable){
- OSL_ENSURE(FALSE, "BeginTable in Table");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginTable in Table");
+ return sal_False;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create table:
OSL_ENSURE(pTabSavedPos == NULL, "SwFltOutDoc");
pTabSavedPos = new SwPosition(*pPaM->GetPoint());
pTable = GetDoc().InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 1 ),
- *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, FALSE, FALSE ); // TODO MULTIHEADER
+ *pTabSavedPos, 1, 1, text::HoriOrientation::LEFT, 0, 0, sal_False, sal_False ); // TODO MULTIHEADER
nTableWidth = 0;
((SwTable*)pTable)->LockModify(); // Nichts automatisch anpassen!
// set pam in 1. table cell
usTableX =
usTableY = 0;
- SeekCell(usTableY, usTableX, TRUE);
- return TRUE;
+ SeekCell(usTableY, usTableX, sal_True);
+ return sal_True;
}
-SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
+SwTableBox* SwFltOutDoc::GetBox(sal_uInt16 ny, sal_uInt16 nx /*= USHRT_MAX */)
{
if(!pTable){
OSL_ENSURE(pTable, "GetBox ohne Tabelle");
@@ -1388,25 +1388,25 @@ SwTableBox* SwFltOutDoc::GetBox(USHORT ny, USHORT nx /*= USHRT_MAX */)
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
if(!pTableLines){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableLines");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLines");
return 0;
}
if( ny >= pTableLines->Count() ){ // Notbremse
- OSL_ENSURE( FALSE, "SwFltOutDoc:GetBox:ny >= Count()");
+ OSL_ENSURE( sal_False, "SwFltOutDoc:GetBox:ny >= Count()");
ny = pTableLines->Count() - 1;
}
SwTableLine* pTableLine = (*pTableLines)[ny];
if(!pTableLine){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableLine");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableLine");
return 0;
}
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
if(!pTableBoxes){
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:pTableBoxes");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:pTableBoxes");
return 0;
}
if( nx >= pTableBoxes->Count() ){ // Notbremse
- OSL_ENSURE(FALSE, "SwFltOutDoc:GetBox:nx >= Count()");
+ OSL_ENSURE(sal_False, "SwFltOutDoc:GetBox:nx >= Count()");
nx = pTableBoxes->Count() - 1;
}
SwTableBox* pTableBox = (*pTableBoxes)[nx];
@@ -1438,7 +1438,7 @@ void SwFltOutDoc::NextTableCell()
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ),
0,
pTableBoxes->Count());
- SeekCell(usTableY, usTableX, TRUE);
+ SeekCell(usTableY, usTableX, sal_True);
pTableBox = (*pTableBoxes)[usTableX];
OSL_ENSURE(pTableBox != 0, "SwFltOutDoc:pTableBox");
if(pTableBox)
@@ -1455,7 +1455,7 @@ void SwFltOutDoc::NextTableRow()
aSelBoxes.Insert( pTableBox );
GetDoc().InsertRow(aSelBoxes);
usTableX = 0;
- SeekCell(++usTableY, usTableX, TRUE);
+ SeekCell(++usTableY, usTableX, sal_True);
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
@@ -1485,7 +1485,7 @@ void SwFltOutDoc::SetTableOrient(sal_Int16 eOri)
pTable->GetFrmFmt()->SetFmtAttr( SwFmtHoriOrient( 0, eOri ));
}
-void SwFltOutDoc::SetCellWidth(SwTwips nWidth, USHORT nCell /* = USHRT_MAX */ )
+void SwFltOutDoc::SetCellWidth(SwTwips nWidth, sal_uInt16 nCell /* = USHRT_MAX */ )
{
if(!pTable){
OSL_ENSURE(pTable, "SetCellWidth ohne Tabelle");
@@ -1519,7 +1519,7 @@ void SwFltOutDoc::SetCellHeight(SwTwips nHeight)
pTableLine->GetFrmFmt()->SetFmtAttr(aFmtFrmSize);
}
-const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
+const SfxPoolItem& SwFltOutDoc::GetCellAttr(sal_uInt16 nWhich)
{
if (!pTable){
OSL_ENSURE(pTable, "GetCellAttr ohne Table");
@@ -1533,7 +1533,7 @@ const SfxPoolItem& SwFltOutDoc::GetCellAttr(USHORT nWhich)
}
void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
- USHORT nCell /* = USHRT_MAX */ )
+ sal_uInt16 nCell /* = USHRT_MAX */ )
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox)
@@ -1541,7 +1541,7 @@ void SwFltOutDoc::SetCellBorder(const SvxBoxItem& rFmtBox,
}
// nicht aktiviert !!!
-void SwFltOutDoc::SetCellSpace(USHORT nDist)
+void SwFltOutDoc::SetCellSpace(sal_uInt16 nDist)
{
if(!pTable){
OSL_ENSURE(pTable, "SetCellSpace ohne Tabelle");
@@ -1564,7 +1564,7 @@ void SwFltOutDoc::SetCellSpace(USHORT nDist)
pTableBox->GetFrmFmt()->SetFmtAttr(aFmtBox);
}
-void SwFltOutDoc::DeleteCell(USHORT nCell /* = USHRT_MAX */)
+void SwFltOutDoc::DeleteCell(sal_uInt16 nCell /* = USHRT_MAX */)
{
SwTableBox* pTableBox = GetBox(usTableY, nCell);
if(pTableBox){
@@ -1597,8 +1597,8 @@ void SwFltOutDoc::EndTable()
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
if (GetDoc().GetRootFrm()){
SwTableNode* pTableNode = GetDoc().IsIdxInTbl(
@@ -1615,7 +1615,7 @@ void SwFltOutDoc::EndTable()
nTableWidth = 0;
}
-BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
+sal_Bool SwFltOutDoc::SeekCell(short nRow, short nCol, sal_Bool bPam)
{
// get structs to table cells
const SwTableLines* pTableLines = &pTable->GetTabLines();
@@ -1623,20 +1623,20 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
SwTableBoxes* pTableBoxes = &pTableLine->GetTabBoxes();
SwTableBox* pTableBox = (*pTableBoxes)[usTableX];
- if ((USHORT)nRow >= pTableLines->Count())
+ if ((sal_uInt16)nRow >= pTableLines->Count())
{
OSL_ENSURE((USHORT)nRow >= pTableLines->Count(), "SwFltOutDoc");
- return FALSE;
+ return sal_False;
}
pTableLine = (*pTableLines)[nRow];
pTableBoxes = &pTableLine->GetTabBoxes();
if (nCol >= pTableBoxes->Count())
- return FALSE;
+ return sal_False;
pTableBox = (*pTableBoxes)[nCol];
if( !pTableBox->GetSttNd() )
{
OSL_ENSURE(pTableBox->GetSttNd(), "SwFltOutDoc");
- return FALSE;
+ return sal_False;
}
if(bPam)
{
@@ -1650,7 +1650,7 @@ BOOL SwFltOutDoc::SeekCell(short nRow, short nCol, BOOL bPam)
GetDoc().SetTxtFmtColl(*pPaM,
GetDoc().GetTxtCollFromPool(RES_POOLCOLL_STANDARD, false ));
}
- return TRUE;
+ return sal_True;
}
@@ -1673,8 +1673,8 @@ SfxItemSet* SwFltOutBase::NewFlyDefaults()
return p;
}
-BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
- BOOL bAbsolutePos /*= FALSE*/,
+sal_Bool SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
+ sal_Bool bAbsolutePos /*= sal_False*/,
const SfxItemSet*
#if OSL_DEBUG_LEVEL > 1
pMoreAttrs /*= 0*/
@@ -1686,17 +1686,17 @@ BOOL SwFltOutBase::BeginFly( RndStdIds eAnchor /*= FLY_AT_PARA*/,
#endif
eFlyAnchor = eAnchor;
bFlyAbsPos = bAbsolutePos; // Bloedsinn eigentlich
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutBase::SetFlyAnchor( RndStdIds eAnchor )
{
if( !IsInFly() ){
- OSL_ENSURE( FALSE, "SetFlyAnchor() ohne Fly" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor() ohne Fly" );
return;
}
if ( eAnchor == FLY_AS_CHAR ){
- OSL_ENSURE( FALSE, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
+ OSL_ENSURE( sal_False, "SetFlyAnchor( FLY_AS_CHAR ) nicht implementiert" );
return;
}
SwFmtAnchor& rAnchor = (SwFmtAnchor&)GetFlyFrmAttr( RES_ANCHOR );
@@ -1715,7 +1715,7 @@ void SwFltOutBase::EndFly()
// Flys in SwFltDoc
//-----------------------------------------------------------------------------
-/* virtual */ BOOL SwFltOutDoc::IsInFly()
+/* virtual */ sal_Bool SwFltOutDoc::IsInFly()
{
return pFly != 0;
};
@@ -1727,8 +1727,8 @@ SwFrmFmt* SwFltOutDoc::MakeFly( RndStdIds eAnchor, SfxItemSet* pSet )
return pFly;
}
-BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos ,
+sal_Bool SwFltOutDoc::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos ,
const SfxItemSet* pMoreAttrs)
{
@@ -1737,8 +1737,8 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Flys reinragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// create Fly:
OSL_ENSURE(pFlySavedPos == NULL, "BeginFly in Fly"); // rekursiv geht noch nicht
@@ -1766,7 +1766,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
SwCntntNode *pNode = pPaM->GetCntntNode();
pPaM->GetPoint()->nContent.Assign( pNode, 0 );
- return TRUE;
+ return sal_True;
}
/*virtual*/ void SwFltOutDoc::SetFlyFrmAttr(const SfxPoolItem& rAttr)
@@ -1779,7 +1779,7 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
}
}
-/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltOutDoc::GetFlyFrmAttr(sal_uInt16 nWhich)
{
if (pFly){
return pFly->GetFmtAttr( nWhich );
@@ -1792,13 +1792,13 @@ BOOL SwFltOutDoc::BeginFly( RndStdIds eAnchor,
void SwFltOutDoc::EndFly()
{
if( pTable ){
- OSL_ENSURE( FALSE, "SwFltOutDoc::EndFly() in Table" );
+ OSL_ENSURE( sal_False, "SwFltOutDoc::EndFly() in Table" );
return;
}
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Flys rausragen
- rStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
- rEndStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ rStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
+ rEndStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
*pPaM->GetPoint() = *pFlySavedPos; // restore Cursor
delete pFlySavedPos;
@@ -1810,7 +1810,7 @@ void SwFltOutDoc::EndFly()
//-----------------------------------------------------------------------------
// Flys in SwFltFormatCollection
//-----------------------------------------------------------------------------
-/*virtual*/ BOOL SwFltFormatCollection::IsInFly()
+/*virtual*/ sal_Bool SwFltFormatCollection::IsInFly()
{
return bHasFly;
};
@@ -1823,57 +1823,56 @@ void SwFltOutDoc::EndFly()
pFlyAttrs->Put( rAttr );
}
-/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(USHORT nWhich)
+/*virtual*/ const SfxPoolItem& SwFltFormatCollection::GetFlyFrmAttr(sal_uInt16 nWhich)
{
if( pFlyAttrs )
- return pFlyAttrs->Get( nWhich, FALSE );
+ return pFlyAttrs->Get( nWhich, sal_False );
else
return GetDoc().GetAttrPool().GetDefaultItem(nWhich);
}
-BOOL SwFltFormatCollection::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos,
+sal_Bool SwFltFormatCollection::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos,
const SfxItemSet* pMoreAttrs)
{
SwFltOutBase::BeginFly( eAnchor, bAbsolutePos, pMoreAttrs );
- bHasFly = TRUE;
- return TRUE;
+ bHasFly = sal_True;
+ return sal_True;
}
void SwFltFormatCollection::EndFly() // Wird nie aufgerufen
{
}
-BOOL SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
+sal_Bool SwFltFormatCollection::BeginStyleFly( SwFltOutDoc* pOutDoc )
{
OSL_ENSURE( pOutDoc, "BeginStyleFly ohne pOutDoc" );
OSL_ENSURE( pOutDoc && !pOutDoc->IsInFly(), "BeginStyleFly in Fly" );
if( pOutDoc && !pOutDoc->IsInFly() )
return pOutDoc->BeginFly( eFlyAnchor, bFlyAbsPos, pFlyAttrs );
else
- return FALSE;
+ return sal_False;
}
//-----------------------------------------------------------------------------
// Flys in SwFltShell
//-----------------------------------------------------------------------------
-BOOL SwFltShell::BeginFly( RndStdIds eAnchor,
- BOOL bAbsolutePos)
-
+sal_Bool SwFltShell::BeginFly( RndStdIds eAnchor,
+ sal_Bool bAbsolutePos)
{
if (pOut->IsInFly()){
- OSL_ENSURE(FALSE, "BeginFly in Fly");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginFly in Fly");
+ return sal_False;
}
if (pOutDoc->IsInTable()){
- OSL_ENSURE(FALSE, "BeginFly in Table");
- return FALSE;
+ OSL_ENSURE(sal_False, "BeginFly in Table");
+ return sal_False;
}
pOut->BeginFly( eAnchor, bAbsolutePos, pColls[nAktStyle]->GetpFlyAttrs() );
eSubMode = Fly;
- return TRUE;
+ return sal_True;
}
void SwFltShell::SetFlyXPos( short nXPos, sal_Int16 eHRel,
@@ -1892,11 +1891,11 @@ void SwFltShell::SetFlyYPos( short nYPos, sal_Int16 eVRel,
void SwFltShell::EndFly()
{
if (!pOut->IsInFly()){
- OSL_ENSURE(FALSE, "EndFly ohne Fly");
+ OSL_ENSURE(sal_False, "EndFly ohne Fly");
return;
}
if (pOutDoc->IsInTable()){ // Table verschraenkt mit Fly macht keinen Sinn
- OSL_ENSURE(FALSE, "EndFly in Table ( verschraenkt )");
+ OSL_ENSURE(sal_False, "EndFly in Table ( verschraenkt )");
EndTable(); // -> Table beenden
}
pOut->EndFly();
@@ -1910,17 +1909,17 @@ void SwFltShell::EndFly()
void SwFltShell::BeginFootnote()
{
if( pOut->IsInFly() ){ // Passiert z.B. bei Fussnote in Fly
- OSL_ENSURE(FALSE, "Fussnote in Fly nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Fly nicht erlaubt");
return;
}
if( pOutDoc->IsInTable() ){
- OSL_ENSURE(FALSE, "Fussnote in Table z.Zt. nicht erlaubt");
+ OSL_ENSURE(sal_False, "Fussnote in Table z.Zt. nicht erlaubt");
return;
}
// Alle Attribute schliessen, da sonst Attribute entstehen koennen,
// die in Fussnoten reinragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1949,7 +1948,7 @@ void SwFltShell::EndFootnote()
return;
// Alle Attribute schliessen, da sonst Attribute
// entstehen koennen, die aus Fussnoten rausragen
- aStack.SetAttr( *pPaM->GetPoint(), 0, FALSE );
+ aStack.SetAttr( *pPaM->GetPoint(), 0, sal_False );
// EndStack erstmal nicht zwangs-Schliessen, damit Bookmarks ueber
// Fussnoten im PMW uebernommen werden
@@ -1962,7 +1961,7 @@ void SwFltShell::BeginHeader(SwPageDesc* /*pPD*/)
{
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtHeader(TRUE));
+ pFmt->SetFmtAttr(SwFmtHeader(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetHeader().GetHeaderFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -1978,7 +1977,7 @@ void SwFltShell::BeginFooter(SwPageDesc* /*pPD*/)
{
SwFrmFmt* pFmt = &pCurrentPageDesc->GetMaster();
SwFrmFmt* pHdFtFmt;
- pFmt->SetFmtAttr(SwFmtFooter(TRUE));
+ pFmt->SetFmtAttr(SwFmtFooter(sal_True));
pHdFtFmt = (SwFrmFmt*)pFmt->GetFooter().GetFooterFmt();
const SwNodeIndex* pStartIndex = pHdFtFmt->GetCntnt().GetCntntIdx();
if (!pStartIndex)
@@ -2002,9 +2001,9 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
if(bStdPD) // keine Neuen PageDescs
return pCurrentPageDesc;
- BOOL bFollow = (pFirstPageDesc != 0);
+ sal_Bool bFollow = (pFirstPageDesc != 0);
SwPageDesc* pNewPD;
- USHORT nPos;
+ sal_uInt16 nPos;
if (bFollow && pFirstPageDesc->GetFollow() != pFirstPageDesc)
return pFirstPageDesc; // Fehler: hat schon Follow
// Erkennung doppelter Namen fehlt noch (Wahrscheinlichkeit
@@ -2012,7 +2011,7 @@ SwPageDesc* SwFltShell::MakePageDesc(SwPageDesc* pFirstPageDesc)
nPos = GetDoc().MakePageDesc( ViewShell::GetShellRes()->GetPageDescName(
GetDoc().GetPageDescCnt(), bFollow ? ShellResource::FOLLOW_PAGE : ShellResource::NORMAL_PAGE),
- pFirstPageDesc, FALSE );
+ pFirstPageDesc, sal_False );
pNewPD = &((SwPageDesc&)const_cast<const SwDoc &>(GetDoc()).
GetPageDesc(nPos));
@@ -2036,7 +2035,7 @@ SwFltFormatCollection::SwFltFormatCollection(
SwFltOutBase(_rDoc),
pColl(_rDoc.GetTxtCollFromPool( static_cast< sal_uInt16 >(nType), false )),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
Reset(); // Default-Attrs loeschen und Auto-Flag
}
@@ -2045,13 +2044,13 @@ SwFltFormatCollection::SwFltFormatCollection(
SwDoc& _rDoc, const String& rName ) :
SwFltOutBase(_rDoc),
pFlyAttrs( 0 ),
- bHasFly( FALSE )
+ bHasFly( sal_False )
{
pColl = _rDoc.MakeTxtFmtColl(rName, (SwTxtFmtColl*)_rDoc.GetDfltTxtFmtColl());
Reset(); // Default-Attrs loeschen und Auto-Flag
}
-void SwFltShell::NextStyle(USHORT nWhich, USHORT nNext)
+void SwFltShell::NextStyle(sal_uInt16 nWhich, sal_uInt16 nNext)
{
OSL_ENSURE(pColls[nWhich], "Next style for noexistent style" );
OSL_ENSURE(pColls[nNext], "Next style to noexistent style" );
diff --git a/sw/source/filter/ww1/makefile.mk b/sw/source/filter/ww1/makefile.mk
deleted file mode 100644
index 58930bdca9c7..000000000000
--- a/sw/source/filter/ww1/makefile.mk
+++ /dev/null
@@ -1,93 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ww1
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES= \
- $(SLO)$/fltshell.obj \
- $(SLO)$/w1filter.obj \
- $(SLO)$/w1par.obj \
- $(SLO)$/w1sprm.obj
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/w1class.obj
-
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
-run: alltar
-
-#copy all relevant files to a backupdir
-bak:
- copy ..\inc\fltshell.hxx backup
- copy *.?xx backup
- copy makefile* backup
- copy vcs.cfg backup
- copy ..\..\..\dump1\src\dump1.cxx backup
- copy ..\..\..\dump1\src\makefile backup\makefile.dmp
- copy ..\..\..\WNTMSCI\bin\makefile backup\makefile.bin
- copy ..\..\..\UTIL\makefile backup\makefile.utl
- copy s:\solenv\inc\wnt.mak backup
-
-# remove this filter from libs to avoid annoying effects
-upgrade:
- attrib -r *.?xx
- attrib -r makefile.*
- del ..\..\..\WNMSCI\LIB\ww1.lib
- del ..\..\..\WNMSCI\DBO\w1*.obj
- del ..\..\..\WNMSCI\DBO\fltshell.obj
- del ..\..\..\WNMSCI\MISC
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\fltshell.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1sprm.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1filter.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1class.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- lib /nologo /REMOVE:..\..\..\WNTMSCI\obj\w1par.obj /out:..\..\..\WNTMSCI\LIB\filter.lib ..\..\..\WNTMSCI\LIB\filter.lib
- copy backup\makefile.bin ..\..\..\WNTMSCI\bin\makefile
- diff backup\makefile.utl ..\..\..\UTIL\makefile
- diff s:\solenv\inc\wnt.mak backup
-
-zip: bak
- pkzip c:\temp\ww1 backup\*.*
-
diff --git a/sw/source/filter/ww1/w1class.cxx b/sw/source/filter/ww1/w1class.cxx
index 5571f3199a7e..caf5b4d01652 100644
--- a/sw/source/filter/ww1/w1class.cxx
+++ b/sw/source/filter/ww1/w1class.cxx
@@ -58,13 +58,13 @@ Ww1Fib::Ww1Fib( SvStream& _rStream )
///////////////////////////////////////////////////////////// PlainText
-Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes)
+Ww1PlainText::Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes)
: rFib(rWwFib), ulFilePos(nFilePos), ulCountBytes(nCountBytes),
ulSeek(0), bOK(true)
{
}
-sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
+sal_Unicode Ww1PlainText::operator [] ( sal_uLong ulOffset )
{
DBG_ASSERT( ulOffset<Count(), "Ww1PlainText" );
sal_Unicode cRet;
@@ -79,7 +79,7 @@ sal_Unicode Ww1PlainText::operator [] ( ULONG ulOffset )
return cRet;
}
-String Ww1PlainText::GetText( ULONG ulOffset, ULONG nLen ) const
+String Ww1PlainText::GetText( sal_uLong ulOffset, sal_uLong nLen ) const
{
String sRet;
ByteString aStr;
@@ -101,7 +101,7 @@ Ww1Style::~Ww1Style()
delete pPapx;
}
-void Ww1Style::SetDefaults(BYTE stc)
+void Ww1Style::SetDefaults(sal_uInt8 stc)
{
if( 222 == stc )
{
@@ -111,9 +111,9 @@ void Ww1Style::SetDefaults(BYTE stc)
}
}
-USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
+sal_uInt16 Ww1Style::ReadName( sal_uInt8*&p, sal_uInt16& rnCountBytes, sal_uInt16 stc )
{
- BYTE nCountBytes = SVBT8ToByte(p);
+ sal_uInt8 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if( !nCountBytes ) // default
@@ -176,9 +176,9 @@ USHORT Ww1Style::ReadName( BYTE*&p, USHORT& rnCountBytes, USHORT stc )
return 0;
}
-USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
+sal_uInt16 Ww1Style::ReadChpx( sal_uInt8*&p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255 // unused
@@ -194,9 +194,9 @@ USHORT Ww1Style::ReadChpx( BYTE*&p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadPapx(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT8ToByte(p);
+ sal_uInt16 nCountBytes = SVBT8ToByte(p);
p++;
rnCountBytes--;
if (nCountBytes != 255)
@@ -211,7 +211,7 @@ USHORT Ww1Style::ReadPapx(BYTE*&p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
+sal_uInt16 Ww1Style::ReadEstcp(sal_uInt8*&p, sal_uInt16& rnCountBytes)
{
stcNext = SVBT8ToByte(p);
p++;
@@ -227,22 +227,22 @@ USHORT Ww1Style::ReadEstcp(BYTE*&p, USHORT& rnCountBytes)
Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
: cstcStd(0),
rFib(_rFib),
- bOK(FALSE)
+ bOK(sal_False)
{
- USHORT cbStshf = rFib.GetFIB().cbStshfGet();
+ sal_uInt16 cbStshf = rFib.GetFIB().cbStshfGet();
DBG_ASSERT(cbStshf>=17, "Ww1StyleSheet");
- for (USHORT stc=0;stc<Count();stc++)
+ for (sal_uInt16 stc=0;stc<Count();stc++)
{
aStyles[stc].SetParent(this);
- aStyles[stc].SetDefaults((BYTE)stc);
+ aStyles[stc].SetDefaults((sal_uInt8)stc);
}
- BYTE* del = NULL;
+ sal_uInt8* del = NULL;
if (rFib.GetStream().Seek(rFib.GetFIB().fcStshfGet())
- == (ULONG)rFib.GetFIB().fcStshfGet()
- && (del = new BYTE[cbStshf]) != NULL
- && rFib.GetStream().Read(del, cbStshf) == (ULONG)cbStshf)
+ == (sal_uLong)rFib.GetFIB().fcStshfGet()
+ && (del = new sal_uInt8[cbStshf]) != NULL
+ && rFib.GetStream().Read(del, cbStshf) == (sal_uLong)cbStshf)
{
- BYTE* p = del;
+ sal_uInt8* p = del;
cstcStd = SVBT16ToShort(p);
p += sizeof(SVBT16);
cbStshf -= sizeof(SVBT16);
@@ -256,17 +256,17 @@ Ww1StyleSheet::Ww1StyleSheet(Ww1Fib& _rFib)
delete [] del;
}
-USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
+sal_uInt16 Ww1StyleSheet::ReadNames( sal_uInt8*& p, sal_uInt16& rnCountBytes )
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadName(p, nCountBytes, stc);
stcp++;
}
@@ -274,17 +274,17 @@ USHORT Ww1StyleSheet::ReadNames( BYTE*& p, USHORT& rnCountBytes )
return 0;
}
-USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadChpx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadChpx(p, nCountBytes);
stcp++;
}
@@ -292,17 +292,17 @@ USHORT Ww1StyleSheet::ReadChpx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadPapx(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT nCountBytes = SVBT16ToShort(p);
+ sal_uInt16 nCountBytes = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=nCountBytes, "Ww1StyleSheet");
rnCountBytes = rnCountBytes - nCountBytes;
nCountBytes = nCountBytes - sizeof(SVBT16);
- USHORT stcp = 0;
+ sal_uInt16 stcp = 0;
while (nCountBytes > 0)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadPapx(p, nCountBytes);
stcp++;
}
@@ -310,15 +310,15 @@ USHORT Ww1StyleSheet::ReadPapx(BYTE*& p, USHORT& rnCountBytes)
return 0;
}
-USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
+sal_uInt16 Ww1StyleSheet::ReadEstcp(sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
- USHORT iMac = SVBT16ToShort(p);
+ sal_uInt16 iMac = SVBT16ToShort(p);
p += sizeof(SVBT16);
DBG_ASSERT(rnCountBytes>=sizeof(SVBT16), "Ww1StyleSheet");
rnCountBytes -= sizeof(SVBT16);
- for (USHORT stcp=0;stcp<iMac;stcp++)
+ for (sal_uInt16 stcp=0;stcp<iMac;stcp++)
{
- USHORT stc = (stcp - cstcStd) & 255;
+ sal_uInt16 stc = (stcp - cstcStd) & 255;
aStyles[stc].ReadEstcp(p, rnCountBytes);
}
DBG_ASSERT(rnCountBytes==0, "Ww1StyleSheet");
@@ -327,7 +327,7 @@ USHORT Ww1StyleSheet::ReadEstcp(BYTE*& p, USHORT& rnCountBytes)
///////////////////////////////////////////////////////////////// Fonts
-Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
+Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, sal_uLong nFieldFlgs)
: pFontA(0), rFib(rInFib), nFieldFlags(nFieldFlgs), nMax(0), bOK(false)
{
if(rFib.GetFIB().cbSttbfffnGet() > 2 ) // ueberhaupt fonts?
@@ -335,7 +335,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
SVBT16 nCountBytes;
DBG_ASSERT(rFib.GetFIB().cbSttbfffnGet() > sizeof(nCountBytes), "Ww1Fonts");
if (rFib.GetStream().Seek(rFib.GetFIB().fcSttbfffnGet())
- == (ULONG)rFib.GetFIB().fcSttbfffnGet())
+ == (sal_uLong)rFib.GetFIB().fcSttbfffnGet())
if (rFib.GetStream().Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -346,7 +346,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
- sizeof(nCountBytes)]; // Alloziere Font-Array
//~ Ww1: new-NULL
if (rFib.GetStream().Read(pA, rFib.GetFIB().cbSttbfffnGet()
- - sizeof(nCountBytes)) == (ULONG)rFib.GetFIB().cbSttbfffnGet()
+ - sizeof(nCountBytes)) == (sal_uLong)rFib.GetFIB().cbSttbfffnGet()
- sizeof(nCountBytes)) // lese alle Fonts
{} //nothing
@@ -355,7 +355,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
W1_FFN* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = p->cbFfnM1Get() + 1;
if(nNextSiz > nLeft)
break;
@@ -370,7 +370,7 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = new W1_FFN*[nMax]; // alloziere Index-Array
//~ Ww1: new-NULL
pFontA[0] = pA; // fuelle Index-Array
- USHORT i;
+ sal_uInt16 i;
for(i=1, p=pA; i<nMax; i++)
{
p = (W1_FFN*)(((char*)p) + p->cbFfnM1Get() + 1);
@@ -381,10 +381,10 @@ Ww1Fonts::Ww1Fonts(Ww1Fib& rInFib, ULONG nFieldFlgs)
pFontA = 0; // Keine Eintraege -> kein Array
}
}
- bOK = TRUE;
+ bOK = sal_True;
}
-W1_FFN* Ww1Fonts::GetFFN(USHORT nNum)
+W1_FFN* Ww1Fonts::GetFFN(sal_uInt16 nNum)
{
W1_FFN* pRet = NULL;
if (pFontA)
@@ -404,22 +404,22 @@ Ww1Dop::Ww1Dop(Ww1Fib& _rFib)
else
nRead = rFib.GetFIB().cbDopGet();
bOK = rFib.GetStream().Seek(rFib.GetFIB().fcDopGet()) ==
- (ULONG)rFib.GetFIB().fcDopGet() &&
- rFib.GetStream().Read(&aDop, nRead) == (ULONG)nRead;
+ (sal_uLong)rFib.GetFIB().fcDopGet() &&
+ rFib.GetStream().Read(&aDop, nRead) == (sal_uLong)nRead;
}
/////////////////////////////////////////////////////////////// Picture
-Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
+Ww1Picture::Ww1Picture(SvStream& rStream, sal_uLong ulFilePos)
: bOK(false), pPic(0)
{
ulFilePos &= 0xffffff; //~ ww1: warum auch immer - im highbyte steht eine 5?!?!
SVBT32 lcb;
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&lcb, sizeof(lcb)) == (ULONG)sizeof(lcb))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&lcb, sizeof(lcb)) == (sal_uLong)sizeof(lcb))
if (sizeof(int)>=4 || SVBT32ToUInt32(lcb) < 0x8000) //~ mdt: 64K & 16bit
- if ((pPic = (W1_PIC*)(new BYTE[SVBT32ToUInt32(lcb)])) != NULL)
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (ULONG)SVBT32ToUInt32(lcb))
+ if ((pPic = (W1_PIC*)(new sal_uInt8[SVBT32ToUInt32(lcb)])) != NULL)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(pPic, SVBT32ToUInt32(lcb)) == (sal_uLong)SVBT32ToUInt32(lcb))
{
DBG_ASSERT(pPic->cbHeaderGet()==sizeof(*pPic)-sizeof(pPic->rgb), "Ww1Picture");
bOK = true;
@@ -427,43 +427,43 @@ Ww1Picture::Ww1Picture(SvStream& rStream, ULONG ulFilePos)
}
////////////////////////////////////////////////////////////////// Sprm
-Ww1Sprm::Ww1Sprm(BYTE* x, USHORT _nCountBytes)
+Ww1Sprm::Ww1Sprm(sal_uInt8* x, sal_uInt16 _nCountBytes)
: p(NULL),
nCountBytes(_nCountBytes),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
if (nCountBytes == 0)
- bOK = TRUE;
+ bOK = sal_True;
else
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
memcpy(p, x, nCountBytes);
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
}
-Ww1Sprm::Ww1Sprm(SvStream& rStream, ULONG ulFilePos)
+Ww1Sprm::Ww1Sprm(SvStream& rStream, sal_uLong ulFilePos)
: p(NULL),
nCountBytes(0),
- bOK(FALSE),
+ bOK(sal_False),
pArr(NULL),
count(0)
{
SVBT8 x;
ByteToSVBT8(0, x);
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
- if (rStream.Read(&x, sizeof(x)) == (ULONG)sizeof(x))
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
+ if (rStream.Read(&x, sizeof(x)) == (sal_uLong)sizeof(x))
if ((nCountBytes = SVBT8ToByte(x)) == 255
|| !nCountBytes
- || (p = new BYTE[nCountBytes]) != NULL)
+ || (p = new sal_uInt8[nCountBytes]) != NULL)
if (nCountBytes == 255
|| !nCountBytes
- || rStream.Read(p, nCountBytes) == (ULONG)nCountBytes)
+ || rStream.Read(p, nCountBytes) == (sal_uLong)nCountBytes)
if (ReCalc())
- bOK = TRUE;
+ bOK = sal_True;
}
Ww1Sprm::~Ww1Sprm()
@@ -472,22 +472,22 @@ Ww1Sprm::~Ww1Sprm()
delete p;
}
-USHORT Ww1SingleSprm::Size(BYTE* /*pSprm*/)
+sal_uInt16 Ww1SingleSprm::Size(sal_uInt8* /*pSprm*/)
{
return nCountBytes;
}
-USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
+sal_uInt16 Ww1SingleSprmTab::Size(sal_uInt8* pSprm) // Doc 24/25, Fastsave-Sprm
{
DBG_ASSERT(nCountBytes==0, "Ww1SingleSprmTab");
- USHORT nRet = sizeof(SVBT8);
- USHORT nSize = SVBT8ToByte(pSprm);
+ sal_uInt16 nRet = sizeof(SVBT8);
+ sal_uInt16 nSize = SVBT8ToByte(pSprm);
if (nSize != 255)
nRet = nRet + nSize;
else
{
- USHORT nDel = SVBT8ToByte(pSprm+1) * 4;
- USHORT nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
+ sal_uInt16 nDel = SVBT8ToByte(pSprm+1) * 4;
+ sal_uInt16 nIns = SVBT8ToByte(pSprm + 3 + nDel) * 3;
nRet += nDel + nIns;
}
DBG_ASSERT(nRet <= 354, "Ww1SingleSprmTab");
@@ -496,58 +496,58 @@ USHORT Ww1SingleSprmTab::Size(BYTE* pSprm) // Doc 24/25, Fastsave-Sprm
return nRet;
}
-USHORT Ww1SingleSprmByteSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmByteSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT8ToByte(pSprm);
nRet += sizeof(SVBT8); // var. l. byte-size
nRet = nRet + nCountBytes;
return nRet;
}
-USHORT Ww1SingleSprmWordSized::Size(BYTE* pSprm)
+sal_uInt16 Ww1SingleSprmWordSized::Size(sal_uInt8* pSprm)
{
- USHORT nRet;
+ sal_uInt16 nRet;
nRet = SVBT16ToShort(pSprm);
nRet += sizeof(SVBT16); // var. l. word-size
nRet = nRet + nCountBytes;
return nRet;
}
-static BYTE nLast = 0;
-static BYTE nCurrent = 0;
-USHORT Ww1Sprm::GetSize(BYTE nId, BYTE* pSprm)
+static sal_uInt8 nLast = 0;
+static sal_uInt8 nCurrent = 0;
+sal_uInt16 Ww1Sprm::GetSize(sal_uInt8 nId, sal_uInt8* pSprm)
{
- USHORT nL = 0;
+ sal_uInt16 nL = 0;
nL = GetTab(nId).Size(pSprm);
nLast = nCurrent;
nCurrent = nId;
return nL;
}
-BOOL Ww1Sprm::Fill(USHORT index, BYTE& nId, USHORT& nL, BYTE*& pSprm)
+sal_Bool Ww1Sprm::Fill(sal_uInt16 index, sal_uInt8& nId, sal_uInt16& nL, sal_uInt8*& pSprm)
{
DBG_ASSERT(index < Count(), "Ww1Sprm");
pSprm = p + pArr[index];
nId = SVBT8ToByte(pSprm);
pSprm++;
nL = GetTab(nId).Size(pSprm);
- return TRUE;
+ return sal_True;
}
-BOOL Ww1Sprm::ReCalc()
+sal_Bool Ww1Sprm::ReCalc()
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
delete pArr;
pArr = NULL;
count = 0;
if (nCountBytes != 255) // not unused?
{
- USHORT cbsik = nCountBytes;
- BYTE* psik = p;
+ sal_uInt16 cbsik = nCountBytes;
+ sal_uInt8* psik = p;
while (cbsik > 0)
{
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
DBG_ASSERT(iLen<=cbsik, "Ww1Sprm");
if (iLen > cbsik)
cbsik = 0; // ignore the rest: we are wrong...
@@ -559,16 +559,16 @@ BOOL Ww1Sprm::ReCalc()
}
}
if (bRet
- && (pArr = new USHORT[count]) != NULL)
+ && (pArr = new sal_uInt16[count]) != NULL)
{
cbsik = nCountBytes;
- USHORT offset = 0;
- USHORT current = 0;
+ sal_uInt16 offset = 0;
+ sal_uInt16 current = 0;
psik = p;
while (current<count)
{
pArr[current++] = offset;
- USHORT iLen = GetSizeBrutto(psik);
+ sal_uInt16 iLen = GetSizeBrutto(psik);
psik += iLen;
if (iLen > cbsik)
cbsik = 0;
@@ -710,33 +710,33 @@ void Ww1Sprm::InitTab()
}
////////////////////////////////////////////////////////////// SprmPapx
-Ww1SprmPapx::Ww1SprmPapx(BYTE* pByte, USHORT nSize) :
+Ww1SprmPapx::Ww1SprmPapx(sal_uInt8* pByte, sal_uInt16 nSize) :
Ww1Sprm(Sprm(pByte, nSize), SprmSize(pByte, nSize))
{
memset(&aPapx, 0, sizeof(aPapx));
memcpy(&aPapx, pByte, nSize<sizeof(aPapx)?nSize:sizeof(aPapx));
}
-USHORT Ww1SprmPapx::SprmSize(BYTE*, USHORT nSize)
+sal_uInt16 Ww1SprmPapx::SprmSize(sal_uInt8*, sal_uInt16 nSize)
{
- USHORT nRet = 0;
+ sal_uInt16 nRet = 0;
if (nSize >= sizeof(W1_PAPX))
nRet = nSize - ( sizeof(W1_PAPX) - 1 ); // im W1_PAPX ist das
// 1. SprmByte enthalten
return nRet;
}
-BYTE* Ww1SprmPapx::Sprm(BYTE* pByte, USHORT nSize)
+sal_uInt8* Ww1SprmPapx::Sprm(sal_uInt8* pByte, sal_uInt16 nSize)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
if (nSize >= sizeof(W1_PAPX))
pRet = ((W1_PAPX*)(pByte))->grpprlGet();
return pRet;
}
/////////////////////////////////////////////////////////////////// Plc
-Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
- USHORT nInItemSize)
+Ww1Plc::Ww1Plc(Ww1Fib& rInFib, sal_uLong ulFilePos, sal_uInt16 nInCountBytes,
+ sal_uInt16 nInItemSize)
: p(0), nCountBytes(nInCountBytes), iMac(0), nItemSize(nInItemSize),
bOK(false), rFib(rInFib)
{
@@ -744,17 +744,17 @@ Ww1Plc::Ww1Plc(Ww1Fib& rInFib, ULONG ulFilePos, USHORT nInCountBytes,
bOK = true;
else
{
- if (rFib.GetStream().Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rFib.GetStream().Seek(ulFilePos) == (sal_uLong)ulFilePos)
{
- if ((p = new BYTE[nCountBytes]) != NULL)
+ if ((p = new sal_uInt8[nCountBytes]) != NULL)
{
- if (rFib.GetStream().Read(p, nCountBytes) == (ULONG)nCountBytes)
+ if (rFib.GetStream().Read(p, nCountBytes) == (sal_uLong)nCountBytes)
{
bOK = true;
iMac = (nCountBytes -
sizeof(SVBT32)) / (sizeof(SVBT32) + nItemSize);
- DBG_ASSERT(iMac * ((USHORT)sizeof(ULONG) + nItemSize) +
- (USHORT)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
+ DBG_ASSERT(iMac * ((sal_uInt16)sizeof(sal_uLong) + nItemSize) +
+ (sal_uInt16)sizeof(SVBT32) == nCountBytes, "Ww1Plc");
}
}
}
@@ -766,25 +766,25 @@ Ww1Plc::~Ww1Plc()
delete p;
}
-void Ww1Plc::Seek(ULONG ulSeek, USHORT& nIndex)
+void Ww1Plc::Seek(sal_uLong ulSeek, sal_uInt16& nIndex)
{
if (iMac)
for (;nIndex <= iMac && Where(nIndex) < ulSeek;nIndex++)
;
}
-ULONG Ww1Plc::Where(USHORT nIndex)
+sal_uLong Ww1Plc::Where(sal_uInt16 nIndex)
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
DBG_ASSERT(nIndex <= iMac, "index out of bounds");
if (iMac && nIndex <= iMac)
ulRet = SVBT32ToUInt32(p + sizeof(SVBT32) * nIndex);
return ulRet;
}
-BYTE* Ww1Plc::GetData(USHORT nIndex)
+sal_uInt8* Ww1Plc::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex < iMac, "index out of bounds");
if (nIndex < iMac)
pRet = p + (iMac + 1) * sizeof(SVBT32) +
@@ -798,14 +798,14 @@ BYTE* Ww1Plc::GetData(USHORT nIndex)
// Die Anzahl wird in nMax zurueckgeliefert.
// im Index 0 stehen alle Strings nacheinander, ab Index 1 werden
// die einzelnen Strings referenziert.
-Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
+Ww1StringList::Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb )
: pIdxA(0), nMax(0)
{
if( nCb > 2 ) // ueberhaupt Eintraege ?
{
SVBT16 nCountBytes;
DBG_ASSERT(nCb > sizeof(nCountBytes), "Ww1StringList");
- if (rSt.Seek(nFc) == (ULONG)nFc)
+ if (rSt.Seek(nFc) == (sal_uLong)nFc)
if (rSt.Read(nCountBytes, sizeof(nCountBytes))
== sizeof(nCountBytes)) // Laenge steht hier nochmal
{
@@ -816,14 +816,14 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
// Alloziere PString-Array
//~ Ww1: new-NULL
if (rSt.Read(pA, nCb - sizeof(nCountBytes))
- == (ULONG)nCb - sizeof(nCountBytes)) // lese alle
+ == (sal_uLong)nCb - sizeof(nCountBytes)) // lese alle
{}// do nothing
// Zaehle, wieviele Fonts enthalten
long nLeft = nCb - sizeof(nCountBytes);
sal_Char* p = pA;
while (1)
{
- USHORT nNextSiz;
+ sal_uInt16 nNextSiz;
nNextSiz = *p + 1;
if(nNextSiz > nLeft)
break;
@@ -839,9 +839,9 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
pIdxA[0] = pA; // Index 0 : alles
// ab Index 1 C-Strings
pIdxA[1] = pA + 1; // fuelle Index-Array
- USHORT i = 2;
+ sal_uInt16 i = 2;
p = pA;
- BYTE nL = *p;
+ sal_uInt8 nL = *p;
while(1)
{
p += nL + 1; // Neues Laengen-Byte
@@ -858,7 +858,7 @@ Ww1StringList::Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb )
}
}
}
-const String Ww1StringList::GetStr( USHORT nNum ) const
+const String Ww1StringList::GetStr( sal_uInt16 nNum ) const
{
String sRet;
if( nNum <= nMax )
@@ -870,10 +870,10 @@ Ww1Bookmarks::Ww1Bookmarks(Ww1Fib& rInFib)
: aNames(rInFib), rFib(rInFib), nIsEnd(0)
{
pPos[0] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbkfGet(),
- rFib.GetFIB().cbPlcfbkfGet(), FALSE);
+ rFib.GetFIB().cbPlcfbkfGet(), sal_False);
nPlcIdx[0] = 0;
pPos[1] = new Ww1PlcBookmarkPos(rFib, rFib.GetFIB().fcPlcfbklGet(),
- rFib.GetFIB().cbPlcfbklGet(), TRUE);
+ rFib.GetFIB().cbPlcfbklGet(), sal_True);
nPlcIdx[1] = 0;
bOK = !aNames.GetError() && !pPos[0]->GetError() && !pPos[1]->GetError();
}
@@ -895,8 +895,8 @@ void Ww1Bookmarks::operator ++( int )
{
nPlcIdx[nIsEnd]++;
- ULONG l0 = pPos[0]->Where(nPlcIdx[0]);
- ULONG l1 = pPos[1]->Where(nPlcIdx[1]);
+ sal_uLong l0 = pPos[0]->Where(nPlcIdx[0]);
+ sal_uLong l1 = pPos[1]->Where(nPlcIdx[1]);
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -913,7 +913,7 @@ long Ww1Bookmarks::GetHandle() const
if( nIsEnd )
return nPlcIdx[1];
- const BYTE* p = pPos[0]->GetData( nPlcIdx[0] );
+ const sal_uInt8* p = pPos[0]->GetData( nPlcIdx[0] );
if( p )
return SVBT16ToShort( p );
}
@@ -924,10 +924,10 @@ long Ww1Bookmarks::Len() const
{
if( nIsEnd )
{
- DBG_ASSERT( FALSE, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
+ DBG_ASSERT( sal_False, "Falscher Aufruf (1) von Ww1Bookmarks::Len()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
+ sal_uInt16 nEndIdx = SVBT16ToShort(pPos[0]->GetData(nPlcIdx[0]));
return pPos[1]->Where(nEndIdx) - pPos[0]->Where(nPlcIdx[0]);
}
@@ -939,27 +939,27 @@ const String Ww1Bookmarks::GetName() const
}
/////////////////////////////////////////////////////////////////// Fkp
-Ww1Fkp::Ww1Fkp(SvStream& rStream, ULONG ulFilePos, USHORT _nItemSize) :
+Ww1Fkp::Ww1Fkp(SvStream& rStream, sal_uLong ulFilePos, sal_uInt16 _nItemSize) :
nItemSize(_nItemSize),
- bOK(FALSE)
+ bOK(sal_False)
{
- if (rStream.Seek(ulFilePos) == (ULONG)ulFilePos)
+ if (rStream.Seek(ulFilePos) == (sal_uLong)ulFilePos)
if (rStream.Read(aFkp, sizeof(aFkp)) == sizeof(aFkp))
- bOK = TRUE;
+ bOK = sal_True;
}
-ULONG Ww1Fkp::Where(USHORT nIndex)
+sal_uLong Ww1Fkp::Where(sal_uInt16 nIndex)
{
- ULONG lRet = 0xffffffff;
+ sal_uLong lRet = 0xffffffff;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
lRet = SVBT32ToUInt32(aFkp+nIndex*sizeof(SVBT32));
return lRet;
}
-BYTE* Ww1Fkp::GetData(USHORT nIndex)
+sal_uInt8* Ww1Fkp::GetData(sal_uInt16 nIndex)
{
- BYTE* pRet = NULL;
+ sal_uInt8* pRet = NULL;
DBG_ASSERT(nIndex<=Count(), "index out of bounds");
if (nIndex<=Count())
pRet = aFkp + (Count()+1) * sizeof(SVBT32) +
@@ -968,13 +968,13 @@ BYTE* Ww1Fkp::GetData(USHORT nIndex)
}
//////////////////////////////////////////////////////////////// FkpPap
-BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
+sal_Bool Ww1FkpPap::Fill(sal_uInt16 nIndex, sal_uInt8*& p, sal_uInt16& rnCountBytes)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpPap::Fill() Index out of Range" );
- USHORT nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
+ sal_uInt16 nOffset = SVBT8ToByte(GetData(nIndex)) * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
rnCountBytes = SVBT8ToByte(aFkp+nOffset) * 2;
nOffset += sizeof(SVBT8);
if( nOffset + rnCountBytes < 511 ) // SH: Assert schlug 1 zu frueh zu
@@ -991,33 +991,33 @@ BOOL Ww1FkpPap::Fill(USHORT nIndex, BYTE*& p, USHORT& rnCountBytes)
p = NULL;
rnCountBytes = 0;
}
- return TRUE;
+ return sal_True;
}
//////////////////////////////////////////////////////////////// FkpChp
-BOOL Ww1FkpChp::Fill(USHORT nIndex, W1_CHP& aChp)
+sal_Bool Ww1FkpChp::Fill(sal_uInt16 nIndex, W1_CHP& aChp)
{
DBG_ASSERT( nIndex < Count(), "Ww1FkpChp::Fill() Index out of Range" );
memset(&aChp, 0, sizeof(aChp)); // Default, da verkuerzt gespeichert
- USHORT nOffset = GetData(nIndex)[0] * 2;
+ sal_uInt16 nOffset = GetData(nIndex)[0] * 2;
if (nOffset)
{
- DBG_ASSERT(nOffset>(USHORT)(Count()*sizeof(SVBT32)), "calc error");
- USHORT nCountBytes = aFkp[nOffset];
+ DBG_ASSERT(nOffset>(sal_uInt16)(Count()*sizeof(SVBT32)), "calc error");
+ sal_uInt16 nCountBytes = aFkp[nOffset];
nOffset += sizeof(SVBT8);
DBG_ASSERT(nCountBytes <= 511-nOffset, "calc error");
DBG_ASSERT(nCountBytes <= sizeof(aChp), "calc error");
memcpy(&aChp, aFkp+nOffset, nCountBytes);
}
- return TRUE;
+ return sal_True;
}
///////////////////////////////////////////////////////////////// Assoc
Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
- : rFib(_rFib), pBuffer(NULL), bOK(FALSE)
+ : rFib(_rFib), pBuffer(NULL), bOK(sal_False)
{
- USHORT cb = rFib.GetFIB().cbSttbfAssocGet();
- USHORT i;
+ sal_uInt16 cb = rFib.GetFIB().cbSttbfAssocGet();
+ sal_uInt16 i;
for ( i = 0; i < MaxFields; i++ )
pStrTbl[i] = NULL;
@@ -1026,23 +1026,23 @@ Ww1Assoc::Ww1Assoc(Ww1Fib& _rFib)
rFib.GetFIB().fcSttbfAssocGet()
&& rFib.GetStream().Read(pBuffer, cb) == cb)
{
- USHORT j;
+ sal_uInt16 j;
DBG_ASSERT( cb == SVBT16ToShort( *(SVBT16*)pBuffer ), "size missmatch");
for (i=0,j=sizeof(SVBT16);j<cb && i<Criteria1;i++)
{
pStrTbl[i] = pBuffer+j;
j += (*pBuffer + j) + 1;
}
- bOK = TRUE;
+ bOK = sal_True;
}
}
-String Ww1Assoc::GetStr(USHORT code)
+String Ww1Assoc::GetStr(sal_uInt16 code)
{
String sRet;
DBG_ASSERT(code<MaxFields, "out of range");
if (pStrTbl[code] != NULL)
- for( USHORT i=0;i<pStrTbl[code][0];i++ )
+ for( sal_uInt16 i=0;i<pStrTbl[code][0];i++ )
sRet += String( pStrTbl[code][i+1], RTL_TEXTENCODING_MS_1252 );
return sRet;
}
@@ -1054,7 +1054,7 @@ Ww1Pap::Ww1Pap(Ww1Fib& _rFib)
{
}
-void Ww1Pap::Seek(ULONG ulSeek)
+void Ww1Pap::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1064,9 +1064,9 @@ void Ww1Pap::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Pap::Where( BOOL bSetIndex )
+sal_uLong Ww1Pap::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pPap == NULL)
if (nPlcIndex < Count())
{
@@ -1094,46 +1094,46 @@ void Ww1Pap::operator++(int)
// SH: FindSprm sucht in grpprl nach Sprm nId
// Rueckgabe: Pointer oder 0
-BOOL Ww1Pap::FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd)
-{
- Ww1Sprm aSprm( pStart, static_cast< USHORT >(pEnd-pStart) );
- USHORT nC = aSprm.Count();
- USHORT i;
- BYTE nI;
- USHORT nLen;
- BYTE *pData;
+sal_Bool Ww1Pap::FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd)
+{
+ Ww1Sprm aSprm( pStart, static_cast< sal_uInt16 >(pEnd-pStart) );
+ sal_uInt16 nC = aSprm.Count();
+ sal_uInt16 i;
+ sal_uInt8 nI;
+ sal_uInt16 nLen;
+ sal_uInt8 *pData;
for( i = 0; i < nC; i++ ){
aSprm.Fill( i, nI, nLen, pData );
if( nI == nId )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-BOOL Ww1Pap::HasId0(USHORT nId)
+sal_Bool Ww1Pap::HasId0(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
UpdateIdx();
if( !pPap ){
- DBG_ASSERT( FALSE, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
- return FALSE;
+ DBG_ASSERT( sal_False, "Ww1Pap::HasId():: kann kein pPap erzeugen" );
+ return sal_False;
}
- BYTE* pByte;
- USHORT n;
+ sal_uInt8* pByte;
+ sal_uInt16 n;
if( pPap->Fill(nFkpIndex, pByte, n) ){
- BYTE* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
+ sal_uInt8* p2 = ((W1_PAPX*)(pByte))->grpprlGet(); // SH: Offset fehlte
bRet = FindSprm( nId, p2, pByte + n );
}
return bRet;
}
-BOOL Ww1Pap::HasId(USHORT nId)
+sal_Bool Ww1Pap::HasId(sal_uInt16 nId)
{
- BOOL bRet = FALSE;
- USHORT nPushedPlcIndex2 = nPlcIndex;
- USHORT nPushedFkpIndex2 = nFkpIndex;
+ sal_Bool bRet = sal_False;
+ sal_uInt16 nPushedPlcIndex2 = nPlcIndex;
+ sal_uInt16 nPushedFkpIndex2 = nFkpIndex;
bRet = HasId0( nId );
if (nPlcIndex != nPushedPlcIndex2)
{
@@ -1142,7 +1142,7 @@ BOOL Ww1Pap::HasId(USHORT nId)
}
nPlcIndex = nPushedPlcIndex2;
nFkpIndex = nPushedFkpIndex2;
- Where( FALSE );
+ Where( sal_False );
return bRet;
}
@@ -1153,7 +1153,7 @@ Ww1Chp::Ww1Chp(Ww1Fib& _rFib)
{
}
-void Ww1Chp::Seek(ULONG ulSeek)
+void Ww1Chp::Seek(sal_uLong ulSeek)
{
while (ulSeek > Where())
(*this)++;
@@ -1163,9 +1163,9 @@ void Ww1Chp::Seek(ULONG ulSeek)
// Fkps der zugehoerige Index auf 0 gesetzt werden soll
// ( darf fuer Push/Pop nicht passieren )
// Ein eleganterer Weg faellt mir auf die Schnelle nicht ein
-ULONG Ww1Chp::Where( BOOL bSetIndex )
+sal_uLong Ww1Chp::Where( sal_Bool bSetIndex )
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (pChp == NULL)
if (nPlcIndex < Count())
{
@@ -1193,8 +1193,8 @@ void Ww1Chp::operator++(int)
}
////////////////////////////////////////////////////////////// Manager
-Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
- : bOK(FALSE), bInTtp(FALSE), bInStyle(FALSE), bStopAll(FALSE), aFib(rStrm),
+Ww1Manager::Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs)
+ : bOK(sal_False), bInTtp(sal_False), bInStyle(sal_False), bStopAll(sal_False), aFib(rStrm),
aDop(aFib), aFonts(aFib, nFieldFlgs), aDoc(aFib), pDoc(&aDoc),
ulDocSeek(0), pSeek(&ulDocSeek), aFld(aFib), pFld(&aFld), aChp(aFib),
aPap(aFib), aFtn(aFib), aBooks(aFib),
@@ -1211,22 +1211,22 @@ Ww1Manager::Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs)
&& !aBooks.GetError();
}
-BOOL Ww1Manager::HasInTable()
+sal_Bool Ww1Manager::HasInTable()
{
return aPap.HasId(24); // Ww1SingleSprmPFInTable
}
-BOOL Ww1Manager::HasTtp()
+sal_Bool Ww1Manager::HasTtp()
{
return aPap.HasId(25); // Ww1SingleSprmPTtp
}
-BOOL Ww1Manager::HasPPc()
+sal_Bool Ww1Manager::HasPPc()
{
return aPap.HasId(29); // Ww1SingleSprmPPc
}
-BOOL Ww1Manager::HasPDxaAbs()
+sal_Bool Ww1Manager::HasPDxaAbs()
{
return aPap.HasId(26); // Ww1SingleSprmPDxaAbs
}
diff --git a/sw/source/filter/ww1/w1class.hxx b/sw/source/filter/ww1/w1class.hxx
index 55e1cf19964f..bb156851f8f0 100644
--- a/sw/source/filter/ww1/w1class.hxx
+++ b/sw/source/filter/ww1/w1class.hxx
@@ -108,13 +108,13 @@ class Ww1StyleSheet;
class Ww1Fib
{
W1_FIB aFib;
- BOOL bOK;
+ sal_Bool bOK;
SvStream& rStream;
public:
Ww1Fib(SvStream&);
friend ostream& operator <<(ostream&, Ww1Fib&);
W1_FIB& GetFIB() { return aFib; }
- BOOL GetError() { return !bOK; }
+ sal_Bool GetError() { return !bOK; }
SvStream& GetStream() { return rStream; }
};
@@ -126,10 +126,10 @@ class Ww1Dop
{
W1_DOP aDop;
Ww1Fib& rFib;
- BOOL bOK;
+ sal_Bool bOK;
public:
Ww1Dop(Ww1Fib&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
W1_DOP& GetDOP() {
return aDop; }
@@ -146,23 +146,23 @@ class Ww1PlainText
{
protected:
Ww1Fib& rFib;
- ULONG ulFilePos;
- ULONG ulCountBytes;
- ULONG ulSeek;
- BOOL bOK;
+ sal_uLong ulFilePos;
+ sal_uLong ulCountBytes;
+ sal_uLong ulSeek;
+ sal_Bool bOK;
public:
- Ww1PlainText(Ww1Fib& rWwFib, ULONG nFilePos, ULONG nCountBytes);
+ Ww1PlainText(Ww1Fib& rWwFib, sal_uLong nFilePos, sal_uLong nCountBytes);
// innerhalb des textes
- ULONG Where() const { return ulSeek; }
- void Seek( ULONG ulNew )
+ sal_uLong Where() const { return ulSeek; }
+ void Seek( sal_uLong ulNew )
{
DBG_ASSERT(ulNew < ulCountBytes, "Ww1PlainText");
if (ulNew < ulCountBytes)
ulSeek = ulNew;
}
- ULONG Count() const { return ulCountBytes; }
- void SetCount(ULONG ulNew)
+ sal_uLong Count() const { return ulCountBytes; }
+ void SetCount(sal_uLong ulNew)
{
ulNew += ulSeek;
if (ulCountBytes > ulNew)
@@ -173,17 +173,17 @@ public:
DBG_ASSERT(ulSeek+1<ulCountBytes, "Ww1PlainText");
ulSeek++;
}
- BOOL GetError() { return !bOK; }
- sal_Unicode Out( Ww1Shell&, ULONG& );
- sal_Unicode Out( String&, ULONG=0xffffffff);
+ sal_Bool GetError() { return !bOK; }
+ sal_Unicode Out( Ww1Shell&, sal_uLong& );
+ sal_Unicode Out( String&, sal_uLong=0xffffffff);
sal_Unicode Out( sal_Unicode& );
friend ostream& operator <<(ostream&, Ww1PlainText&);
- String& Fill( String&, ULONG=0, ULONG=0xffffffff );
- sal_Unicode operator []( ULONG );
- String GetText( ULONG ulOffset, ULONG nLen ) const;
+ String& Fill( String&, sal_uLong=0, sal_uLong=0xffffffff );
+ sal_Unicode operator []( sal_uLong );
+ String GetText( sal_uLong ulOffset, sal_uLong nLen ) const;
enum Consts { MinChar = 32 };
- static BOOL IsChar( sal_Unicode c ) { return c >= MinChar; }
+ static sal_Bool IsChar( sal_Unicode c ) { return c >= MinChar; }
};
/////////////////////////////////////////////////////////////// DocText
@@ -200,7 +200,7 @@ public:
class Ww1FtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet(); }
Ww1FtnText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -212,7 +212,7 @@ public:
class Ww1HddText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet(); }
Ww1HddText(Ww1Fib& rFibL) :
Ww1PlainText(rFibL, rFibL.GetFIB().fcMinGet() +
@@ -224,7 +224,7 @@ public:
class Ww1McrText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet(); }
Ww1McrText(Ww1Fib& rFibL) :
@@ -237,7 +237,7 @@ public:
class Ww1AtnText : public Ww1PlainText
{
public:
- ULONG Offset(Ww1Fib& rFibL) {
+ sal_uLong Offset(Ww1Fib& rFibL) {
return rFibL.GetFIB().ccpTextGet() + rFibL.GetFIB().ccpFtnGet()
+ rFibL.GetFIB().ccpHddGet() + rFibL.GetFIB().ccpMcrGet(); }
Ww1AtnText(Ww1Fib& rFibL) :
@@ -256,24 +256,24 @@ class Ww1Style
W1_CHP aChpx;
Ww1SprmPapx* pPapx;
Ww1StyleSheet* pParent;
- BYTE stcBase;
- BYTE stcNext;
- BOOL bUsed;
+ sal_uInt8 stcBase;
+ sal_uInt8 stcNext;
+ sal_Bool bUsed;
public:
Ww1Style();
~Ww1Style();
- BOOL IsUsed() const { return bUsed; }
- void SetDefaults(BYTE);
+ sal_Bool IsUsed() const { return bUsed; }
+ void SetDefaults(sal_uInt8);
void SetParent(Ww1StyleSheet* newParent) { pParent = newParent; }
- void SetName(const String& rName) { bUsed = TRUE; aName = rName; }
+ void SetName(const String& rName) { bUsed = sal_True; aName = rName; }
const String& GetName() const { return aName; }
Ww1Style& GetBase();
- USHORT GetnBase() const { return stcBase; }
- USHORT GetnNext() const { return stcNext; }
- USHORT ReadName(BYTE*&, USHORT&, USHORT stc);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_uInt16 GetnBase() const { return stcBase; }
+ sal_uInt16 GetnNext() const { return stcNext; }
+ sal_uInt16 ReadName(sal_uInt8*&, sal_uInt16&, sal_uInt16 stc);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
friend ostream& operator <<(ostream&, Ww1Style&);
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -285,28 +285,28 @@ public:
class Ww1StyleSheet
{
Ww1Style aStyles[256];
- USHORT cstcStd; // count style code standard
+ sal_uInt16 cstcStd; // count style code standard
Ww1Fib& rFib;
- BOOL bOK;
- USHORT ReadNames(BYTE*&, USHORT&);
- USHORT ReadChpx(BYTE*&, USHORT&);
- USHORT ReadPapx(BYTE*&, USHORT&);
- USHORT ReadEstcp(BYTE*&, USHORT&);
+ sal_Bool bOK;
+ sal_uInt16 ReadNames(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadChpx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadPapx(sal_uInt8*&, sal_uInt16&);
+ sal_uInt16 ReadEstcp(sal_uInt8*&, sal_uInt16&);
- void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc);
- void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc,
- BYTE* pbStopRecur );
+ void OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc);
+ void OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc,
+ sal_uInt8* pbStopRecur );
public:
Ww1StyleSheet(Ww1Fib& rFib);
- Ww1Style& GetStyle(USHORT stc) {
+ Ww1Style& GetStyle(sal_uInt16 stc) {
return aStyles[stc]; }
- USHORT Count() {
+ sal_uInt16 Count() {
return 256; }
friend ostream& operator <<(ostream&, Ww1StyleSheet&);
void Out(Ww1Shell&, Ww1Manager&);
friend class Ww1Style;
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -321,22 +321,22 @@ class Ww1Fonts
protected:
W1_FFN** pFontA; // Array of Pointers to Font Description
Ww1Fib& rFib;
- ULONG nFieldFlags;
- USHORT nMax; // Array-Groesse
- BOOL bOK;
+ sal_uLong nFieldFlags;
+ sal_uInt16 nMax; // Array-Groesse
+ sal_Bool bOK;
public:
- Ww1Fonts(Ww1Fib&, ULONG nFieldFlgs);
+ Ww1Fonts(Ww1Fib&, sal_uLong nFieldFlgs);
~Ww1Fonts() {
if (pFontA)
DELETEZ(pFontA[0]);
DELETEZ(pFontA); }
- W1_FFN* GetFFN(USHORT nNum);
- USHORT Count() {
+ W1_FFN* GetFFN(sal_uInt16 nNum);
+ sal_uInt16 Count() {
return nMax; }
friend ostream& operator <<(ostream&, Ww1Fonts&);
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
- SvxFontItem GetFont(USHORT);
+ SvxFontItem GetFont(sal_uInt16);
};
//////////////////////////////////////////////////////////// SingleSprm
@@ -366,19 +366,19 @@ public:
// stehen faellt dann auch nicht auf. Der Namensstring ist nur im
// Dumper noetig: weg damit im Filter.
//
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual ostream& Dump(ostream&, BYTE*, USHORT);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
const sal_Char* sName;
#else
- virtual void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- virtual void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- ostream& Dump(ostream&, BYTE*, USHORT);
+ virtual void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ virtual void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
#endif
- virtual USHORT Size(BYTE*);
- USHORT nCountBytes;
+ virtual sal_uInt16 Size(sal_uInt8*);
+ sal_uInt16 nCountBytes;
- Ww1SingleSprm(USHORT nBytes, const sal_Char* /*pName*/ = 0 )
+ Ww1SingleSprm(sal_uInt16 nBytes, const sal_Char* /*pName*/ = 0 )
: nCountBytes(nBytes)
#ifdef DUMP
, sName( pName)
@@ -389,23 +389,23 @@ public:
class Ww1SingleSprmByteSized : public Ww1SingleSprm {
public:
- USHORT Size(BYTE*);
- Ww1SingleSprmByteSized(USHORT nBytes, sal_Char* sName = 0) :
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmByteSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmWordSized : public Ww1SingleSprm {
public:
- USHORT Size(BYTE*);
- Ww1SingleSprmWordSized(USHORT nBytes, sal_Char* sName = 0) :
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmWordSized(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
class Ww1SingleSprmByte : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmByte(sal_Char* sName = 0) :
Ww1SingleSprm(1, sName) {
}
@@ -413,7 +413,7 @@ public:
class Ww1SingleSprmBool : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmBool(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -421,7 +421,7 @@ public:
class Ww1SingleSprm4State : public Ww1SingleSprmByte {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprm4State(sal_Char* sName = 0) :
Ww1SingleSprmByte(sName) {
}
@@ -429,14 +429,14 @@ public:
class Ww1SingleSprmWord : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmWord(sal_Char* sName = 0)
: Ww1SingleSprm(2, sName) {}
};
class Ww1SingleSprmLong : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
Ww1SingleSprmLong(sal_Char* sName = 0) :
Ww1SingleSprm(4, sName) {
}
@@ -444,9 +444,9 @@ public:
class Ww1SingleSprmTab : public Ww1SingleSprm {
public:
- ostream& Dump(ostream&, BYTE*, USHORT);
- USHORT Size(BYTE*);
- Ww1SingleSprmTab(USHORT nBytes, sal_Char* sName = 0) :
+ ostream& Dump(ostream&, sal_uInt8*, sal_uInt16);
+ sal_uInt16 Size(sal_uInt8*);
+ Ww1SingleSprmTab(sal_uInt16 nBytes, sal_Char* sName = 0) :
Ww1SingleSprm(nBytes, sName) {
}
};
@@ -456,8 +456,8 @@ public:
Ww1SingleSprmPJc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxa : public Ww1SingleSprmWord {
@@ -465,7 +465,7 @@ public:
Ww1SingleSprmPDxa(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaRight : public Ww1SingleSprmPDxa {
@@ -473,7 +473,7 @@ public:
Ww1SingleSprmPDxaRight(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft : public Ww1SingleSprmPDxa {
@@ -481,7 +481,7 @@ public:
Ww1SingleSprmPDxaLeft(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaLeft1 : public Ww1SingleSprmPDxa {
@@ -489,7 +489,7 @@ public:
Ww1SingleSprmPDxaLeft1(sal_Char* sName) :
Ww1SingleSprmPDxa(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeep : public Ww1SingleSprmBool {
@@ -497,8 +497,8 @@ public:
Ww1SingleSprmPFKeep(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFKeepFollow : public Ww1SingleSprmBool {
@@ -506,8 +506,8 @@ public:
Ww1SingleSprmPFKeepFollow(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPPageBreakBefore : public Ww1SingleSprmBool {
@@ -515,16 +515,16 @@ public:
Ww1SingleSprmPPageBreakBefore(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPBrc : public Ww1SingleSprmWord {
protected:
// spezielle start-routine, je nach sprm verschieden versorgt
// mit einem BoxItem.
- void Start(Ww1Shell&, BYTE, W1_BRC10*, USHORT, Ww1Manager&, SvxBoxItem&);
- void Start(Ww1Shell&, BYTE, W1_BRC*, USHORT, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC10*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
+ void Start(Ww1Shell&, sal_uInt8, W1_BRC*, sal_uInt16, Ww1Manager&, SvxBoxItem&);
using Ww1SingleSprm::Start;
@@ -532,16 +532,16 @@ public:
Ww1SingleSprmPBrc(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
// SetBorder() wird auch fuer Tabellen gebraucht, deshalb public
static SvxBorderLine* SetBorder(SvxBorderLine*, W1_BRC10*);
};
-#define BRC_TOP ((USHORT)0)
-#define BRC_LEFT ((USHORT)1)
-#define BRC_BOTTOM ((USHORT)2)
-#define BRC_RIGHT ((USHORT)3)
-#define BRC_ANZ ((USHORT)BRC_RIGHT-BRC_TOP+1)
+#define BRC_TOP ((sal_uInt16)0)
+#define BRC_LEFT ((sal_uInt16)1)
+#define BRC_BOTTOM ((sal_uInt16)2)
+#define BRC_RIGHT ((sal_uInt16)3)
+#define BRC_ANZ ((sal_uInt16)BRC_RIGHT-BRC_TOP+1)
// Die BRC-struktur fuer 1.0 versionen von word sind verschieden von
// denen der folgenden versionen. diese werden zum glueck aber auch
@@ -549,29 +549,29 @@ public:
// SH: Ab sofort alle 4 Umrandungen ueber nur 1 Klasse.
class Ww1SingleSprmPBrc10 : public Ww1SingleSprmPBrc
{
- USHORT nLine; // BRC_TOP, BRC_LEFT, ...
+ sal_uInt16 nLine; // BRC_TOP, BRC_LEFT, ...
using Ww1SingleSprmPBrc::Start;
public:
- Ww1SingleSprmPBrc10(USHORT nL, sal_Char* sName)
+ Ww1SingleSprmPBrc10(sal_uInt16 nL, sal_Char* sName)
: Ww1SingleSprmPBrc(sName), nLine(nL) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmParaSpace : public Ww1SingleSprmWord {
public:
Ww1SingleSprmParaSpace(sal_Char* sName)
: Ww1SingleSprmWord(sName) {}
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaBefore : public Ww1SingleSprmParaSpace {
public:
Ww1SingleSprmPDyaBefore(sal_Char* sName)
: Ww1SingleSprmParaSpace(sName) {}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAfter : public Ww1SingleSprmParaSpace {
@@ -579,7 +579,7 @@ public:
Ww1SingleSprmPDyaAfter(sal_Char* sName) :
Ww1SingleSprmParaSpace(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaLine : public Ww1SingleSprmWord {
@@ -587,8 +587,8 @@ public:
Ww1SingleSprmPDyaLine(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPChgTabsPapx : public Ww1SingleSprmByteSized {
@@ -597,8 +597,8 @@ public:
Ww1SingleSprmByteSized(0, sName) {
}
// Size() ist noch nicht aktiviert !!
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSGprfIhdt : public Ww1SingleSprmByte {
@@ -606,7 +606,7 @@ public:
Ww1SingleSprmSGprfIhdt(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmSColumns : public Ww1SingleSprmWord {
@@ -614,7 +614,7 @@ public:
Ww1SingleSprmSColumns(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFInTable : public Ww1SingleSprmBool {
@@ -622,8 +622,8 @@ public:
Ww1SingleSprmPFInTable(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPTtp : public Ww1SingleSprmBool {
@@ -631,8 +631,8 @@ public:
Ww1SingleSprmPTtp(sal_Char* sName) :
Ww1SingleSprmBool(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
- void Stop(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
+ void Stop(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTJc : public Ww1SingleSprmWord {
@@ -646,7 +646,7 @@ public:
Ww1SingleSprmTDxaGapHalf(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDefTable10 : public Ww1SingleSprmWordSized {
@@ -654,7 +654,7 @@ public:
Ww1SingleSprmTDefTable10(sal_Char* sName) :
Ww1SingleSprmWordSized(0, sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmTDyaRowHeight : public Ww1SingleSprmWord {
@@ -662,7 +662,7 @@ public:
Ww1SingleSprmTDyaRowHeight(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
// Klassendefinitionen fuer Tabellen-Fastsave-Attribute
@@ -675,7 +675,7 @@ public:
Ww1SingleSprmPpc(sal_Char* sName) :
Ww1SingleSprmByte(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaAbs : public Ww1SingleSprmWord {
@@ -683,7 +683,7 @@ public:
Ww1SingleSprmPDxaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDyaAbs : public Ww1SingleSprmWord {
@@ -691,7 +691,7 @@ public:
Ww1SingleSprmPDyaAbs(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPDxaWidth : public Ww1SingleSprmWord {
@@ -699,7 +699,7 @@ public:
Ww1SingleSprmPDxaWidth(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
class Ww1SingleSprmPFromText : public Ww1SingleSprmWord {
@@ -707,7 +707,7 @@ public:
Ww1SingleSprmPFromText(sal_Char* sName) :
Ww1SingleSprmWord(sName) {
}
- void Start(Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&);
+ void Start(Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&);
};
////////////////////////////////////////////////////////////////// Sprm
@@ -716,48 +716,48 @@ public:
//
class Ww1Sprm
{
- BOOL ReCalc();
+ sal_Bool ReCalc();
static Ww1SingleSprm* aTab[256];
static Ww1SingleSprm* pSingleSprm;
protected:
static void InitTab();
- Ww1SingleSprm& GetTab(USHORT nId)
+ Ww1SingleSprm& GetTab(sal_uInt16 nId)
{
if( !pSingleSprm )
InitTab();
return aTab[ nId ] ? *aTab[nId] : *pSingleSprm;
}
- BYTE* p;
- USHORT nCountBytes;
- BOOL bOK;
- USHORT* pArr;
- USHORT count;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_Bool bOK;
+ sal_uInt16* pArr;
+ sal_uInt16 count;
// ohne Token, mit laengen-byte/word
- USHORT GetSize(BYTE nId, BYTE* pSprm);
+ sal_uInt16 GetSize(sal_uInt8 nId, sal_uInt8* pSprm);
// mit Token und LaengenByte
- USHORT GetSizeBrutto(BYTE* pSprm) {
- BYTE nId = *pSprm++;
+ sal_uInt16 GetSizeBrutto(sal_uInt8* pSprm) {
+ sal_uInt8 nId = *pSprm++;
return GetSize(nId, pSprm) + 1; }
// gibt fuer nTh element id, size & zeiger auf daten:
-// BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+// sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
public:
// SH: brauche ich public
// gibt fuer nTh element id, size & zeiger auf daten:
- BOOL Fill(USHORT, BYTE&, USHORT&, BYTE*&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8&, sal_uInt16&, sal_uInt8*&);
- Ww1Sprm(BYTE*, USHORT);
- Ww1Sprm(SvStream&, ULONG);
+ Ww1Sprm(sal_uInt8*, sal_uInt16);
+ Ww1Sprm(SvStream&, sal_uLong);
~Ww1Sprm();
friend ostream& operator <<(ostream&, Ww1Sprm&);
void Start(Ww1Shell&, Ww1Manager&);
- void Start(Ww1Shell&, Ww1Manager&, USHORT);
+ void Start(Ww1Shell&, Ww1Manager&, sal_uInt16);
void Stop(Ww1Shell&, Ww1Manager&);
- BOOL IsUsed() {
+ sal_Bool IsUsed() {
return nCountBytes != 255; }
- USHORT Count() {
+ sal_uInt16 Count() {
return count; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
static void DeinitTab();
};
@@ -769,13 +769,13 @@ public:
//
class Ww1Picture
{
- BOOL bOK;
+ sal_Bool bOK;
W1_PIC* pPic;
public:
- Ww1Picture(SvStream&, ULONG);
+ Ww1Picture(SvStream&, sal_uLong);
~Ww1Picture() {
}
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
friend ostream& operator <<(ostream&, Ww1Picture&);
void Out(Ww1Shell&, Ww1Manager&);
@@ -790,26 +790,26 @@ public:
//
class Ww1Plc
{
- BYTE* p;
- USHORT nCountBytes;
- USHORT iMac;
- USHORT nItemSize;
- BOOL bOK;
+ sal_uInt8* p;
+ sal_uInt16 nCountBytes;
+ sal_uInt16 iMac;
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
protected:
Ww1Fib& rFib;
- BYTE* GetData(USHORT);
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Plc(Ww1Fib&, ULONG, USHORT, USHORT);
+ Ww1Plc(Ww1Fib&, sal_uLong, sal_uInt16, sal_uInt16);
~Ww1Plc();
friend ostream& operator <<(ostream&, Ww1Plc&);
- ULONG Where(USHORT); // wie im jeweiligen plc
- void Seek(ULONG, USHORT&);
- void Fill(USHORT nIndex, ULONG& begin, ULONG& end) {
+ sal_uLong Where(sal_uInt16); // wie im jeweiligen plc
+ void Seek(sal_uLong, sal_uInt16&);
+ void Fill(sal_uInt16 nIndex, sal_uLong& begin, sal_uLong& end) {
begin = Where(nIndex);
end = Where(nIndex+1); }
- USHORT Count() {
+ sal_uInt16 Count() {
return iMac; }
- BOOL GetError() {
+ sal_Bool GetError() {
return !bOK; }
};
@@ -919,12 +919,12 @@ public:
class Ww1PlcFields : public Ww1Plc
{
public:
- Ww1PlcFields(Ww1Fib& rFibL, ULONG start, USHORT nBytes)
+ Ww1PlcFields(Ww1Fib& rFibL, sal_uLong start, sal_uInt16 nBytes)
: Ww1Plc(rFibL, start, nBytes, 2)
{}
- W1_FLD* GetData(USHORT nIndex)
+ W1_FLD* GetData(sal_uInt16 nIndex)
{ return (W1_FLD*)Ww1Plc::GetData(nIndex); }
- ULONG Where(USHORT nIndex) // absolut im file
+ sal_uLong Where(sal_uInt16 nIndex) // absolut im file
{ return Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet(); }
friend ostream& operator <<(ostream&, Ww1PlcFields&);
};
@@ -933,14 +933,14 @@ public:
class Ww1StringList
{
sal_Char** pIdxA;
- USHORT nMax;
+ sal_uInt16 nMax;
public:
- Ww1StringList( SvStream& rSt, ULONG nFc, USHORT nCb );
+ Ww1StringList( SvStream& rSt, sal_uLong nFc, sal_uInt16 nCb );
~Ww1StringList()
{ if( pIdxA ) { delete pIdxA[0]; delete pIdxA; } }
- const String GetStr( USHORT nNum ) const;
- USHORT Count() const { return nMax; }
- BOOL GetError() const { return (nMax != 0) && !pIdxA; }
+ const String GetStr( sal_uInt16 nNum ) const;
+ sal_uInt16 Count() const { return nMax; }
+ sal_Bool GetError() const { return (nMax != 0) && !pIdxA; }
};
class Ww1PlcBookmarkTxt: public Ww1StringList
@@ -955,15 +955,15 @@ public:
class Ww1PlcBookmarkPos : public Ww1Plc
{
public:
- Ww1PlcBookmarkPos(Ww1Fib& _rFib, ULONG start, USHORT nBytes, BOOL bEnd)
+ Ww1PlcBookmarkPos(Ww1Fib& _rFib, sal_uLong start, sal_uInt16 nBytes, sal_Bool bEnd)
: Ww1Plc(_rFib, start, nBytes, (bEnd) ? 0 : 2)
{}
- BYTE* GetData(USHORT nIndex) { return Ww1Plc::GetData(nIndex); }
+ sal_uInt8* GetData(sal_uInt16 nIndex) { return Ww1Plc::GetData(nIndex); }
// Position als CP
- ULONG WhereCP(USHORT nIndex) { return Ww1Plc::Where(nIndex); }
+ sal_uLong WhereCP(sal_uInt16 nIndex) { return Ww1Plc::Where(nIndex); }
// absolut im file
- ULONG Where(USHORT nIndex)
+ sal_uLong Where(sal_uInt16 nIndex)
{
return ( nIndex < Count() )
? Ww1Plc::Where(nIndex) + rFib.GetFIB().fcMinGet()
@@ -989,26 +989,26 @@ public:
class Ww1Fkp
{
protected:
- BYTE aFkp[512];
- USHORT nItemSize;
- BOOL bOK;
- BYTE* GetData(USHORT);
+ sal_uInt8 aFkp[512];
+ sal_uInt16 nItemSize;
+ sal_Bool bOK;
+ sal_uInt8* GetData(sal_uInt16);
public:
- Ww1Fkp(SvStream&, ULONG, USHORT);
+ Ww1Fkp(SvStream&, sal_uLong, sal_uInt16);
friend ostream& operator <<(ostream&, Ww1Fkp&);
- USHORT Count() const { return SVBT8ToByte(aFkp+511); }
- ULONG Where(USHORT); // wie im entsprechenden fkp
+ sal_uInt16 Count() const { return SVBT8ToByte(aFkp+511); }
+ sal_uLong Where(sal_uInt16); // wie im entsprechenden fkp
};
//////////////////////////////////////////////////////////////// FkpPap
class Ww1FkpPap : public Ww1Fkp
{
public:
- Ww1FkpPap(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpPap(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
{}
friend ostream& operator <<(ostream&, Ww1FkpPap&);
- BOOL Fill(USHORT, BYTE*&, USHORT&);
+ sal_Bool Fill(sal_uInt16, sal_uInt8*&, sal_uInt16&);
};
//////////////////////////////////////////////////////////////// FkpChp
@@ -1019,7 +1019,7 @@ class Ww1FkpChp : public Ww1Fkp
SvStream& GetStream() { return rStream; }
#endif
public:
- Ww1FkpChp(SvStream& rStream, ULONG ulFilePos)
+ Ww1FkpChp(SvStream& rStream, sal_uLong ulFilePos)
: Ww1Fkp(rStream, ulFilePos, 1)
#ifdef DUMP
, rStream(rStream)
@@ -1027,17 +1027,17 @@ public:
{}
friend ostream& operator <<(ostream&, Ww1FkpChp&);
- BOOL Fill(USHORT, W1_CHP&);
+ sal_Bool Fill(sal_uInt16, W1_CHP&);
};
////////////////////////////////////////////////////////////// SprmPapx
class Ww1SprmPapx : public Ww1Sprm
{
W1_PAPX aPapx;
- BYTE* Sprm(BYTE* p, USHORT nSize);
- USHORT SprmSize(BYTE* p, USHORT nSize);
+ sal_uInt8* Sprm(sal_uInt8* p, sal_uInt16 nSize);
+ sal_uInt16 SprmSize(sal_uInt8* p, sal_uInt16 nSize);
public:
- Ww1SprmPapx(BYTE* p, USHORT nSize);
+ Ww1SprmPapx(sal_uInt8* p, sal_uInt16 nSize);
friend ostream& operator <<(ostream&, Ww1SprmPapx&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&);
@@ -1047,7 +1047,7 @@ public:
class Ww1SprmSep : public Ww1Sprm
{
public:
- Ww1SprmSep(Ww1Fib& rFib, ULONG ulFilePos)
+ Ww1SprmSep(Ww1Fib& rFib, sal_uLong ulFilePos)
: Ww1Sprm(rFib.GetStream(), ulFilePos)
{}
friend ostream& operator <<(ostream&, Ww1SprmSep&);
@@ -1063,14 +1063,14 @@ class Ww1Assoc
Ww1Fib& rFib;
sal_Char* pBuffer;
sal_Char* pStrTbl[ MaxFields ];
- BOOL bOK;
+ sal_Bool bOK;
- String GetStr(USHORT);
+ String GetStr(sal_uInt16);
public:
Ww1Assoc(Ww1Fib&);
~Ww1Assoc() { delete pBuffer; }
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
friend ostream& operator <<(ostream&, Ww1Assoc&);
void Out(Ww1Shell&);
};
@@ -1093,23 +1093,23 @@ public:
//
class Ww1HeaderFooter : public Ww1PlcHdd
{
- USHORT nextIhdd; // naechster textteil im HddText
- USHORT nFtnSep; // fusznoten trenner
- USHORT nFtnFollowSep; // folge fusznoten trenner
- USHORT nFtnNote; // folgefunsznotennotiz
- USHORT nEvenHeadL; // kopfzeilen grader seiten
- USHORT nOddHeadL; // kopfzeilen ungrader seiten
- USHORT nEvenFootL; // fuszzeilen grader seiten
- USHORT nOddFootL; // fuszzeilen ungerader seiten
- USHORT nFirstHeadL; // kopfzeilen der ersten seite
- USHORT nFirstFootL; // fuszzeilen der ersten seite
+ sal_uInt16 nextIhdd; // naechster textteil im HddText
+ sal_uInt16 nFtnSep; // fusznoten trenner
+ sal_uInt16 nFtnFollowSep; // folge fusznoten trenner
+ sal_uInt16 nFtnNote; // folgefunsznotennotiz
+ sal_uInt16 nEvenHeadL; // kopfzeilen grader seiten
+ sal_uInt16 nOddHeadL; // kopfzeilen ungrader seiten
+ sal_uInt16 nEvenFootL; // fuszzeilen grader seiten
+ sal_uInt16 nOddFootL; // fuszzeilen ungerader seiten
+ sal_uInt16 nFirstHeadL; // kopfzeilen der ersten seite
+ sal_uInt16 nFirstFootL; // fuszzeilen der ersten seite
enum HeaderFooterMode {
None, FtnSep, FtnFollowSep, FtnNote, EvenHeadL, OddHeadL,
EvenFootL, OddFootL, FirstHeadL, MaxHeaderFooterMode
} eHeaderFooterMode;
public:
- Ww1HeaderFooter(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1HeaderFooter(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcHdd(rFibL),
nextIhdd(0),
nFtnSep(0xffff),
@@ -1127,7 +1127,7 @@ public:
if (grpfIhdt & 0x0002) nFtnFollowSep = nextIhdd++;
if (grpfIhdt & 0x0004) nFtnNote = nextIhdd++;
}
- void SetGrpfIhdt(USHORT grpfIhdt)
+ void SetGrpfIhdt(sal_uInt16 grpfIhdt)
{
if (grpfIhdt & 0x0001) nEvenHeadL = nextIhdd++;
if (grpfIhdt & 0x0002) nOddHeadL = nextIhdd++;
@@ -1137,79 +1137,79 @@ public:
if (grpfIhdt & 0x0020) nFirstFootL = nextIhdd++;
DBG_ASSERT(nextIhdd<=Count(), "Ww1HeaderFooter");
}
- BOOL operator++(int)
+ sal_Bool operator++(int)
{
- BOOL bRet = TRUE;
+ sal_Bool bRet = sal_True;
eHeaderFooterMode = (HeaderFooterMode)((short)eHeaderFooterMode + 1);
if( eHeaderFooterMode == MaxHeaderFooterMode)
{
eHeaderFooterMode = None;
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
- BOOL FillFtnSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnFollowSep(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnFollowSep(sal_uLong& begin, sal_uLong& end)
{
if (nFtnFollowSep == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnFollowSep, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFtnNote(ULONG& begin, ULONG& end)
+ sal_Bool FillFtnNote(sal_uLong& begin, sal_uLong& end)
{
if (nFtnNote == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFtnNote, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nOddHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillEvenFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillEvenFootL(sal_uLong& begin, sal_uLong& end)
{
if (nEvenFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nEvenFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillOddFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillOddFootL(sal_uLong& begin, sal_uLong& end)
{
if (nOddFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nOddFootL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstHeadL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstHeadL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstHeadL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstHeadL, begin, end);
- return TRUE;
+ return sal_True;
}
- BOOL FillFirstFootL(ULONG& begin, ULONG& end)
+ sal_Bool FillFirstFootL(sal_uLong& begin, sal_uLong& end)
{
if (nFirstFootL == 0xffff)
- return FALSE;
+ return sal_False;
Fill(nFirstFootL, begin, end);
- return TRUE;
+ return sal_True;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
@@ -1218,34 +1218,34 @@ public:
//////////////////////////////////////////////////////////////// Fields
class Ww1Fields : public Ww1PlcFields
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
String sErgebnis; // das von word errechnete ergebniss
SwField* pField;
- ULONG Where(USHORT nIndex) // innerhalb des textes
+ sal_uLong Where(sal_uInt16 nIndex) // innerhalb des textes
{ return Ww1PlcFields::Where(nIndex) - rFib.GetFIB().fcMinGet(); }
public:
- Ww1Fields(Ww1Fib& rFibL, ULONG ulFilePos, USHORT nBytes)
+ Ww1Fields(Ww1Fib& rFibL, sal_uLong ulFilePos, sal_uInt16 nBytes)
: Ww1PlcFields(rFibL, ulFilePos, nBytes), nPlcIndex(0), pField(0)
{}
// innerhalb des textes
- ULONG Where() { return Where(nPlcIndex); }
+ sal_uLong Where() { return Where(nPlcIndex); }
void operator++(int)
{
DBG_ASSERT(nPlcIndex+1 <= Count(), "Ww1Fields");
nPlcIndex++;
}
- void Seek(ULONG ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
+ void Seek(sal_uLong ulNew) { Ww1PlcFields::Seek(ulNew, nPlcIndex); }
W1_FLD* GetData()
{
DBG_ASSERT(nPlcIndex < Count(), "Ww1Fields");
return Ww1PlcFields::GetData(nPlcIndex);
}
- ULONG GetLength();
+ sal_uLong GetLength();
friend ostream& operator <<(ostream&, Ww1Manager&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
class Ww1TextFields : public Ww1Fields
@@ -1291,9 +1291,9 @@ class Ww1Bookmarks
Ww1PlcBookmarkPos* pPos[2];
Ww1Fib& rFib;
- USHORT nPlcIdx[2];
- USHORT nIsEnd;
- BOOL bOK;
+ sal_uInt16 nPlcIdx[2];
+ sal_uInt16 nIsEnd;
+ sal_Bool bOK;
public:
Ww1Bookmarks(Ww1Fib& rFib);
~Ww1Bookmarks()
@@ -1301,33 +1301,33 @@ public:
delete pPos[1];
delete pPos[0];
}
- ULONG Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
+ sal_uLong Where() const { return pPos[nIsEnd]->WhereCP(nPlcIdx[nIsEnd]); }
void operator++(int);
- BOOL GetError() const { return !bOK; }
+ sal_Bool GetError() const { return !bOK; }
long GetHandle() const;
- BOOL GetIsEnd() const { return ( nIsEnd ) ? TRUE : FALSE; }
+ sal_Bool GetIsEnd() const { return ( nIsEnd ) ? sal_True : sal_False; }
const String GetName() const;
long Len() const;
friend ostream& operator <<(ostream&, Ww1Bookmarks&);
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Out(Ww1Shell&, Ww1Manager&, USHORT=0);
+ void Out(Ww1Shell&, Ww1Manager&, sal_uInt16=0);
};
///////////////////////////////////////////////////////////// Footnotes
class Ww1Footnotes : public Ww1PlcFootnoteRef
{
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
Ww1PlcFootnoteTxt aText;
- BOOL bStarted;
+ sal_Bool bStarted;
public:
Ww1Footnotes(Ww1Fib& rFibL)
- : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(FALSE)
+ : Ww1PlcFootnoteRef(rFibL), nPlcIndex(0), aText(rFibL), bStarted(sal_False)
{}
// innerhalb des textes
- ULONG Where()
+ sal_uLong Where()
{
- ULONG ulRet = 0xffffffff;
+ sal_uLong ulRet = 0xffffffff;
if (Count())
ulRet = Ww1PlcFootnoteRef::Where(nPlcIndex);
return ulRet;
@@ -1345,17 +1345,17 @@ public:
class Ww1Sep : public Ww1PlcSep
{
Ww1HeaderFooter aHdd;
- USHORT nPlcIndex;
+ sal_uInt16 nPlcIndex;
public:
- Ww1Sep(Ww1Fib& rFibL, USHORT grpfIhdt)
+ Ww1Sep(Ww1Fib& rFibL, sal_uInt16 grpfIhdt)
: Ww1PlcSep(rFibL), aHdd(rFibL, grpfIhdt), nPlcIndex(0) {}
Ww1HeaderFooter& GetHdd() { return aHdd; }
void operator++(int) { nPlcIndex++; }
- BYTE* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
+ sal_uInt8* GetData() { return Ww1PlcSep::GetData(nPlcIndex); }
// innerhalb des textes
- ULONG Where() { return Ww1PlcSep::Where(nPlcIndex); }
- void SetGrpfIhdt(BYTE grpfIhdt)
+ sal_uLong Where() { return Ww1PlcSep::Where(nPlcIndex); }
+ void SetGrpfIhdt(sal_uInt8 grpfIhdt)
{
GetHdd().SetGrpfIhdt(grpfIhdt);
}
@@ -1367,14 +1367,14 @@ public:
/////////////////////////////////////////////////////////////////// Pap
class Ww1Pap : public Ww1PlcPap
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpPap* pPap;
- BOOL FindSprm(USHORT nId, BYTE* pStart, BYTE* pEnd);
+ sal_Bool FindSprm(sal_uInt16 nId, sal_uInt8* pStart, sal_uInt8* pEnd);
void UpdateIdx()
{
if (pPap && nFkpIndex >= pPap->Count() )
@@ -1386,26 +1386,26 @@ class Ww1Pap : public Ww1PlcPap
if( !pPap )
Where();
}
- BOOL HasId0(USHORT nId);
+ sal_Bool HasId0(sal_uInt16 nId);
public:
Ww1Pap(Ww1Fib& rFib);
~Ww1Pap() { delete pPap; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStart(sal_uInt8*& pB, sal_uInt16& nSize)
{
UpdateIdx();
return pPap->Fill(nFkpIndex, pB, nSize);
}
- BOOL FillStop(BYTE*& pB, USHORT& nSize)
+ sal_Bool FillStop(sal_uInt8*& pB, sal_uInt16& nSize)
{
- return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : FALSE;
+ return nFkpIndex ? pPap->Fill(nFkpIndex-1, pB, nSize) : sal_False;
}
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Pap");
nPushedPlcIndex = nPlcIndex;
@@ -1415,7 +1415,7 @@ public:
delete pPap;
pPap = NULL;
}
- BOOL Pushed()
+ sal_Bool Pushed()
{
return nPushedPlcIndex != 0xffff;
}
@@ -1429,19 +1429,19 @@ public:
nPushedFkpIndex = 0xffff;
delete pPap;
pPap = NULL;
- Where( FALSE );
+ Where( sal_False );
}
- BOOL HasId(USHORT nId);
+ sal_Bool HasId(sal_uInt16 nId);
};
/////////////////////////////////////////////////////////////////// Chp
class Ww1Chp : public Ww1PlcChp
{
- USHORT nPlcIndex;
- USHORT nPushedPlcIndex;
- USHORT nFkpIndex;
- USHORT nPushedFkpIndex;
- ULONG ulOffset;
+ sal_uInt16 nPlcIndex;
+ sal_uInt16 nPushedPlcIndex;
+ sal_uInt16 nFkpIndex;
+ sal_uInt16 nPushedFkpIndex;
+ sal_uLong ulOffset;
Ww1FkpChp* pChp;
void UpdateIdx()
{
@@ -1458,19 +1458,19 @@ class Ww1Chp : public Ww1PlcChp
public:
Ww1Chp( Ww1Fib& rFib );
~Ww1Chp() { delete pChp; }
- ULONG Where( BOOL bSetIndex = TRUE ); // innerhalb des textes
+ sal_uLong Where( sal_Bool bSetIndex = sal_True ); // innerhalb des textes
void operator++(int);
- BOOL FillStart(W1_CHP& rChp)
+ sal_Bool FillStart(W1_CHP& rChp)
{
UpdateIdx();
return pChp->Fill(nFkpIndex, rChp);
}
- BOOL FillStop(W1_CHP& rChp)
- { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : FALSE; }
+ sal_Bool FillStop(W1_CHP& rChp)
+ { return nFkpIndex ? pChp->Fill(nFkpIndex-1, rChp) : sal_False; }
void Start(Ww1Shell&, Ww1Manager&);
void Stop(Ww1Shell&, Ww1Manager&, sal_Unicode&);
- void Seek(ULONG);
- void Push(ULONG ulOffsetTmp = 0)
+ void Seek(sal_uLong);
+ void Push(sal_uLong ulOffsetTmp = 0)
{
DBG_ASSERT(!Pushed(), "Ww1Chp");
nPushedPlcIndex = nPlcIndex;
@@ -1480,7 +1480,7 @@ public:
delete pChp;
pChp = NULL;
}
- BOOL Pushed() { return nPushedPlcIndex != 0xffff; }
+ sal_Bool Pushed() { return nPushedPlcIndex != 0xffff; }
void Pop()
{
DBG_ASSERT(Pushed(), "Ww1Chp");
@@ -1491,7 +1491,7 @@ public:
nPushedFkpIndex = 0xffff;
delete pChp;
pChp = NULL;
- Where( FALSE );
+ Where( sal_False );
}
};
@@ -1503,18 +1503,18 @@ public:
//
class Ww1Manager
{
- BOOL bOK;
- BOOL bInTtp;
- BOOL bInStyle;
- BOOL bStopAll;
+ sal_Bool bOK;
+ sal_Bool bInTtp;
+ sal_Bool bInStyle;
+ sal_Bool bStopAll;
Ww1Fib aFib;
Ww1Dop aDop;
Ww1Fonts aFonts;
// ab jetzt alles paarig, fuer 'pushed':
Ww1DocText aDoc;
Ww1PlainText* pDoc;
- ULONG ulDocSeek;
- ULONG* pSeek;
+ sal_uLong ulDocSeek;
+ sal_uLong* pSeek;
Ww1TextFields aFld;
Ww1Fields* pFld;
// selbst 'push'bar:
@@ -1530,43 +1530,43 @@ class Ww1Manager
void Out(Ww1Shell&, sal_Unicode );
public:
- Ww1Manager(SvStream& rStrm, ULONG nFieldFlgs);
- BOOL GetError() const { return !bOK; }
+ Ww1Manager(SvStream& rStrm, sal_uLong nFieldFlgs);
+ sal_Bool GetError() const { return !bOK; }
// Fuer Tabellen
- void SetInTtp(BOOL bSet = TRUE) { bInTtp = bSet; }
- BOOL IsInTtp() const { return bInTtp; }
- void SetInStyle(BOOL bSet = TRUE) { bInStyle = bSet; }
- BOOL IsInStyle() const { return bInStyle; }
- void SetStopAll(BOOL bSet = TRUE) { bStopAll = bSet; }
- BOOL IsStopAll() const { return bStopAll; }
- BOOL HasInTable();
- BOOL HasTtp();
- BOOL LastHasTtp();
+ void SetInTtp(sal_Bool bSet = sal_True) { bInTtp = bSet; }
+ sal_Bool IsInTtp() const { return bInTtp; }
+ void SetInStyle(sal_Bool bSet = sal_True) { bInStyle = bSet; }
+ sal_Bool IsInStyle() const { return bInStyle; }
+ void SetStopAll(sal_Bool bSet = sal_True) { bStopAll = bSet; }
+ sal_Bool IsStopAll() const { return bStopAll; }
+ sal_Bool HasInTable();
+ sal_Bool HasTtp();
+ sal_Bool LastHasTtp();
// Fuer Flys
- BOOL HasPPc();
- BOOL HasPDxaAbs();
+ sal_Bool HasPPc();
+ sal_Bool HasPDxaAbs();
Ww1Fib& GetFib() { return aFib; }
Ww1PlainText& GetText() { return *pDoc; }
Ww1Dop& GetDop() { return aDop; }
Ww1Sep& GetSep() { return aSep; }
// innerhalb des textes
- ULONG Where() { return pDoc->Where(); }
+ sal_uLong Where() { return pDoc->Where(); }
void Fill( sal_Unicode& rChr ) { pDoc->Out( rChr ); }
- BYTE Fill( String& rStr, ULONG ulLen)
+ sal_uInt8 Fill( String& rStr, sal_uLong ulLen)
{
ulLen += pDoc->Where();
- return sal::static_int_cast< BYTE >(pDoc->Out(rStr, ulLen));
+ return sal::static_int_cast< sal_uInt8 >(pDoc->Out(rStr, ulLen));
}
- SvxFontItem GetFont(USHORT nFCode);
+ SvxFontItem GetFont(sal_uInt16 nFCode);
friend Ww1Shell& operator <<(Ww1Shell&, Ww1Manager&);
friend ostream& operator <<(ostream&, Ww1Manager&);
- BOOL Pushed() { return pDoc != &aDoc; }
+ sal_Bool Pushed() { return pDoc != &aDoc; }
void Pop();
- void Push0(Ww1PlainText* pDoc, ULONG, Ww1Fields* = 0);
- void Push1(Ww1PlainText* pDoc, ULONG ulSeek, ULONG ulSeek2 = 0,
+ void Push0(Ww1PlainText* pDoc, sal_uLong, Ww1Fields* = 0);
+ void Push1(Ww1PlainText* pDoc, sal_uLong ulSeek, sal_uLong ulSeek2 = 0,
Ww1Fields* = 0);
};
diff --git a/sw/source/filter/ww1/w1filter.cxx b/sw/source/filter/ww1/w1filter.cxx
index c76b2a83e0bb..e0feb5bc1791 100644
--- a/sw/source/filter/ww1/w1filter.cxx
+++ b/sw/source/filter/ww1/w1filter.cxx
@@ -107,9 +107,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
if (!This.Pushed())
{
{ // der wird nur temporaer gebraucht:
- This.SetInStyle( TRUE );
+ This.SetInStyle( sal_True );
Ww1StyleSheet(This.aFib).Out(rOut, This);
- This.SetInStyle( FALSE );
+ This.SetInStyle( sal_False );
}
{ // dieser auch:
Ww1Assoc(This.aFib).Out(rOut);
@@ -139,9 +139,9 @@ Ww1Shell& operator <<(Ww1Shell& rOut, Ww1Manager& This)
// ist:
cUnknown = This.pDoc->Out(rOut, *This.pSeek);
}
- This.SetStopAll(TRUE);
+ This.SetStopAll(sal_True);
This.OutStop(rOut, cUnknown); // Damit die Attribute am Ende geschlossen
- This.SetStopAll(FALSE); // werden
+ This.SetStopAll(sal_False); // werden
return rOut;
}
@@ -176,7 +176,7 @@ void Ww1Manager::OutStart( Ww1Shell& rOut )
if (!Pushed())
aBooks.Start(rOut, *this);
// bestimmen, wo das naechste Ereigniss ist:
- ULONG ulEnd = pDoc->Count(); // spaetestens am textende
+ sal_uLong ulEnd = pDoc->Count(); // spaetestens am textende
if (!Pushed())
if (ulEnd > aSep.Where()) // naechster Sep vorher?
ulEnd = aSep.Where();
@@ -224,8 +224,8 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
// Optimierung: Sie werden nur auf sinnvolle Werte gesetzt, wenn
// das 0x07-Zeiche ansteht.
- BOOL bLIsTtp = FALSE;
- BOOL bLHasTtp = FALSE;
+ sal_Bool bLIsTtp = sal_False;
+ sal_Bool bLHasTtp = sal_False;
if( cUnknown == 0x07 )
{
bLIsTtp = IsInTtp();
@@ -273,16 +273,16 @@ void Ww1Manager::Out(Ww1Shell& rOut, sal_Unicode cUnknown)
OutStart( rOut ); // Attrs ggfs. starten und Naechste Pos berechnen
}
-SvxFontItem Ww1Manager::GetFont(USHORT nFCode)
+SvxFontItem Ww1Manager::GetFont(sal_uInt16 nFCode)
{
return aFonts.GetFont(nFCode);
}
-void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
+void Ww1Manager::Push0(Ww1PlainText* _pDoc, sal_uLong ulSeek, Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek);
aChp.Push(ulSeek);
@@ -292,12 +292,12 @@ void Ww1Manager::Push0(Ww1PlainText* _pDoc, ULONG ulSeek, Ww1Fields* _pFld)
// ulSeek ist der FC-Abstand zwischen Hauptest-Start und Sondertext-Start
// ulSeek2 ist der Offset dieses bestimmten Sondertextes im Sondertext-Bereich,
// also z.B. der Offset des speziellen K/F-Textes
-void Ww1Manager::Push1(Ww1PlainText* _pDoc, ULONG ulSeek, ULONG ulSeek2,
+void Ww1Manager::Push1(Ww1PlainText* _pDoc, sal_uLong ulSeek, sal_uLong ulSeek2,
Ww1Fields* _pFld)
{
DBG_ASSERT(!Pushed(), "Ww1Manager");
this->pDoc = _pDoc;
- pSeek = new ULONG;
+ pSeek = new sal_uLong;
*pSeek = pDoc->Where();
aPap.Push(ulSeek + ulSeek2);
aChp.Push(ulSeek + ulSeek2);
@@ -321,7 +321,7 @@ void Ww1Manager::Pop()
///////////////////////////////////////////////////////////// Bookmarks
-void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
+void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16)
{
if (GetIsEnd())
{
@@ -347,7 +347,7 @@ void Ww1Bookmarks::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT)
String aVal( rMan.GetText().GetText( Where(), nLen ) );
// in 2 Schritten, da OS/2 zu doof ist
- SwFltBookmark aBook( rName, aVal, GetHandle(), FALSE );
+ SwFltBookmark aBook( rName, aVal, GetHandle(), sal_False );
rOut << aBook;
}
@@ -373,10 +373,10 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
Ww1FtnText* pText = new Ww1FtnText(rMan.GetFib());
// beginn des textes dieser fusznote:
- ULONG start = aText.Where(nPlcIndex);
+ sal_uLong start = aText.Where(nPlcIndex);
pText->Seek(start);
// laenge des textes
- ULONG count = aText.Where(nPlcIndex+1) - start;
+ sal_uLong count = aText.Where(nPlcIndex+1) - start;
pText->SetCount(count);
// fusznotenkennung sollte das erste byte sein
pText->Out(c);
@@ -384,7 +384,7 @@ void Ww1Footnotes::Start(Ww1Shell& rOut, Ww1Manager& rMan)
count--; // fuer das eben gelesene kenn-byte
// fusznoten mode beginnen:
rOut.BeginFootnote();
- bStarted = TRUE;
+ bStarted = sal_True;
rMan.Push0(pText, pText->Offset(rMan.GetFib()),
new Ww1FootnoteFields(rMan.GetFib()));
rOut << rMan;
@@ -464,7 +464,7 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else // keine Zeit
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_TIME );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_TIME );
}
xub_StrLen nDPos = 0;
@@ -495,34 +495,34 @@ static WWDateTime GetTimeDatePara( const String& rForm,
DFF_DDDMMMY, DFF_DDDMMMY, DFF_DDDMMMYY, DFF_DDDMMMYY
};
- BOOL bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
+ sal_Bool bHasDay = STRING_NOTFOUND != rForm.Search( 't' ) ||
STRING_NOTFOUND != rForm.Search( 'T' ) ||
STRING_NOTFOUND != rForm.Search( 'd' ) ||
STRING_NOTFOUND != rForm.Search( 'D' );
- BOOL bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
+ sal_Bool bLongDayOfWeek= STRING_NOTFOUND != rForm.SearchAscii( "tttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "dddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDDD" );
- BOOL bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
+ sal_Bool bDayOfWeek = STRING_NOTFOUND != rForm.SearchAscii( "ttt" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "TTT" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "ddd" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "DDD" );
// M, MM -> numeric month
// MMM, MMMM -> text. month
- BOOL bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
+ sal_Bool bLitMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMM" );
// MMMM -> full month
- BOOL bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
+ sal_Bool bFullMonth = STRING_NOTFOUND != rForm.SearchAscii( "MMMM" );
// jj, JJ -> 2-col-year
// jjjj, JJJJ -> 4-col-year
- BOOL bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
+ sal_Bool bFullYear = STRING_NOTFOUND != rForm.SearchAscii( "jjj" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "JJJ" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "yyy" ) ||
STRING_NOTFOUND != rForm.SearchAscii( "YYY" );
- USHORT i = ( bLitMonth & 1 )
+ sal_uInt16 i = ( bLitMonth & 1 )
| ( ( bFullYear & 1 ) << 1 )
| ( ( bFullMonth & 1 ) << 2 )
| ( ( bDayOfWeek & 1 ) << 3 )
@@ -537,17 +537,17 @@ static WWDateTime GetTimeDatePara( const String& rForm,
}
else
{
- eDT = (WWDateTime)( eDT & ~(USHORT)WW_DATE );
+ eDT = (WWDateTime)( eDT & ~(sal_uInt16)WW_DATE );
}
return eDT;
}
-extern void sw3io_ConvertFromOldField( SwDoc& rDoc, USHORT& rWhich,
- USHORT& rSubType, ULONG &rFmt,
- USHORT nVersion );
+extern void sw3io_ConvertFromOldField( SwDoc& rDoc, sal_uInt16& rWhich,
+ sal_uInt16& rSubType, sal_uLong &rFmt,
+ sal_uInt16 nVersion );
-void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
+void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 nDepth)
{
String sType; // der typ als string
String sFormel; // die formel
@@ -571,7 +571,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
if ( pos != STRING_NOTFOUND )
aStr.Erase(0, 1);
sFormel += aStr;
- BYTE rbType = pData->fltGet();
+ sal_uInt8 rbType = pData->fltGet();
do {
// solange den formelteil einlesen, bis das feld entweder
// zuende ist oder der ergebnisteil beginnt. dabei koennen
@@ -614,7 +614,7 @@ void Ww1Fields::Out(Ww1Shell& rOut, Ww1Manager& rMan, USHORT nDepth)
pData = GetData();
}
DBG_ASSERT(pData->chGet()==21, "Ww1PlainText");
- BOOL bKnown = TRUE;
+ sal_Bool bKnown = sal_True;
DBG_ASSERT(pField==0, "Ww1PlainText");
if (pField != 0)
{
@@ -689,7 +689,7 @@ oncemore:
IS("anzzeichen", "numberofchars", 28)
IS("dateiname", "filename", 29)
IS("vorlage", "templatename", 30)
- bKnown = FALSE;
+ bKnown = sal_False;
#undef IS
if (rbType != 14)
goto oncemore;
@@ -723,8 +723,8 @@ oncemore:
case 22: // revision date
case 23: // print date
case 25:{// edit time
- USHORT nSub;
- USHORT nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
+ sal_uInt16 nSub;
+ sal_uInt16 nReg = 0; // RegInfoFormat, DefaultFormat fuer DocInfoFelder
switch( rbType )
{
@@ -782,9 +782,9 @@ oncemore:
if( eDT & WW_DATE )
{
- USHORT nWhich = RES_DATEFLD;
- USHORT nSubType = DATEFLD;
- ULONG nFormat = aDate;
+ sal_uInt16 nWhich = RES_DATEFLD;
+ sal_uInt16 nSubType = DATEFLD;
+ sal_uLong nFormat = aDate;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -796,9 +796,9 @@ oncemore:
}
if( eDT & WW_TIME )
{
- USHORT nWhich = RES_TIMEFLD;
- USHORT nSubType = TIMEFLD;
- ULONG nFormat = aTime;
+ sal_uInt16 nWhich = RES_TIMEFLD;
+ sal_uInt16 nSubType = TIMEFLD;
+ sal_uLong nFormat = aTime;
sw3io_ConvertFromOldField( rOut.GetDoc(),
nWhich, nSubType, nFormat, 0x0110 );
pField = new SwDateTimeField((SwDateTimeFieldType*)
@@ -879,7 +879,7 @@ oncemore:
SwFieldType* pFT = rOut.GetDoc().InsertFldType(
SwSetExpFieldType( &rOut.GetDoc(), aName, nsSwGetSetExpType::GSE_STRING ) );
pField = new SwSetExpField((SwSetExpFieldType*)pFT, aStr );
- ((SwSetExpField*)pField)->SetInputFlag( TRUE );
+ ((SwSetExpField*)pField)->SetInputFlag( sal_True );
((SwSetExpField*)pField)->SetSubType(nsSwExtendedSubType::SUB_INVISIBLE);
}
case 39: // fillin command
@@ -937,14 +937,14 @@ oncemore:
|| sExt.EqualsIgnoreCaseAscii( ".pic" ))
rOut.AddGraphic( sName );
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
else
- bKnown = FALSE;
+ bKnown = sal_False;
}
break;
default: // unknown
- DBG_ASSERT(FALSE, "Ww1PlainText");
+ DBG_ASSERT(sal_False, "Ww1PlainText");
// unsupported:
case 1: // unknown
case 2: // possible bookmark
@@ -978,7 +978,7 @@ oncemore:
case 52: // auto number outline
case 53: // auto number legal
case 54: // auto number arabic
- bKnown = FALSE;
+ bKnown = sal_False;
break;
}
if( bKnown || sErgebnis.EqualsAscii( "\270" ))
@@ -990,13 +990,13 @@ oncemore:
(*this)++;
}
-ULONG Ww1Fields::GetLength()
+sal_uLong Ww1Fields::GetLength()
{
// berechnet die laenge eines feldteiles. nicht mitgerechnet werden
// die terminierenden zeichen im text (19, 20, 21) die beginn, trenner
// und ende bedeuten.
- ULONG ulBeg = Where();
- ULONG ulEnd = Where(nPlcIndex+1);
+ sal_uLong ulBeg = Where();
+ sal_uLong ulEnd = Where(nPlcIndex+1);
DBG_ASSERT(ulBeg<ulEnd, "Ww1Fields");
return (ulEnd - ulBeg) - 1;
}
@@ -1023,7 +1023,7 @@ void Ww1Sep::Start(Ww1Shell& rOut, Ww1Manager& rMan)
// momentanes attribut beginnt, wird dieses attribut eingefuegt.
// diese methode ist bei den meisten start/stop methoden der
// memberklassen des managers identisch.
- BYTE* pByte = GetData();
+ sal_uInt8* pByte = GetData();
Ww1SprmSep aSprm(rFib, SVBT32ToUInt32(pByte + 2));
aSprm.Start(rOut, rMan);
aSprm.Stop(rOut, rMan);
@@ -1037,8 +1037,8 @@ void Ww1Pap::Start(Ww1Shell& rOut, Ww1Manager& rMan)
{
if (rMan.Where() >= Where())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
// bereitstellen der zu startenden attribute
if (FillStart(pByte, cb))
{
@@ -1054,8 +1054,8 @@ void Ww1Pap::Stop(Ww1Shell& rOut, Ww1Manager& rMan, sal_Unicode&)
{
if (rMan.Where() >= Where() || rMan.IsStopAll())
{
- BYTE* pByte;
- USHORT cb;
+ sal_uInt8* pByte;
+ sal_uInt16 cb;
if (FillStop(pByte, cb)){
Ww1SprmPapx aSprm(pByte, cb);
aSprm.Stop(rOut, rMan);
@@ -1095,15 +1095,15 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
switch (kulGet()) {
case 0: {
rOut << SvxUnderlineItem(UNDERLINE_NONE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(FALSE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_False, RES_CHRATR_WORDLINEMODE);
} break;
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 1: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE);
} break;
case 2: {
rOut << SvxUnderlineItem(UNDERLINE_SINGLE, RES_CHRATR_UNDERLINE) <<
- SvxWordLineModeItem(TRUE, RES_CHRATR_WORDLINEMODE);
+ SvxWordLineModeItem(sal_True, RES_CHRATR_WORDLINEMODE);
} break;
case 3: {
rOut << SvxUnderlineItem(UNDERLINE_DOUBLE, RES_CHRATR_UNDERLINE);
@@ -1115,7 +1115,7 @@ void W1_CHP::Out(Ww1Shell& rOut, Ww1Manager& rMan)
if (fsIcoGet())
switch(icoGet()) {
- default: DBG_ASSERT(FALSE, "Chpx");
+ default: DBG_ASSERT(sal_False, "Chpx");
case 0: { rOut.EndItem(RES_CHRATR_COLOR); } break;
case 1: { rOut << SvxColorItem(Color(COL_BLACK), RES_CHRATR_COLOR); } break;
case 2: { rOut << SvxColorItem(Color(COL_LIGHTBLUE), RES_CHRATR_COLOR); } break;
@@ -1241,7 +1241,7 @@ void Ww1Style::Out(Ww1Shell& rOut, Ww1Manager& rMan)
// umstaenden nicht erreicht wurde. dann wurde das kontrollzeichen
// zwar (weg-)gelesen, jedoch noch nicht ausgegeben.
//
-sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
+sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, sal_uLong& ulEnd )
{
// gibt die zeichen bis ulEnd aus, es sei den es kommen sonderzeichen
// die eine bedeutung haben wie absatzende oder seitenumbruch.
@@ -1259,7 +1259,7 @@ sal_Unicode Ww1PlainText::Out( Ww1Shell& rOut, ULONG& ulEnd )
return Ww1PlainText::MinChar;
}
-sal_Unicode Ww1PlainText::Out( String& rStr, ULONG ulEnd )
+sal_Unicode Ww1PlainText::Out( String& rStr, sal_uLong ulEnd )
{
// wie Out(Shell..., jedoch ausgabe auf einen string
rStr.Erase();
@@ -1325,7 +1325,7 @@ void Ww1SprmPapx::Stop(Ww1Shell& rOut, Ww1Manager& rMan)
}
///////////////////////////////////////////////////////////////// Fonts
-SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
+SvxFontItem Ww1Fonts::GetFont(sal_uInt16 nFCode)
{
// erzeugen eine fonts im sw-sinne aus den word-strukturen
FontFamily eFamily = FAMILY_DONTKNOW;
@@ -1376,7 +1376,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
|| aName.EqualsIgnoreCaseAscii("ITC Zapf Dingbats") )
eCharSet = RTL_TEXTENCODING_SYMBOL;
// FontFamily ........................................
- USHORT b = pF->ffGet();
+ sal_uInt16 b = pF->ffGet();
static FontFamily eFamilyA[] =
{
FAMILY_DONTKNOW, FAMILY_ROMAN, FAMILY_SWISS, FAMILY_MODERN,
@@ -1387,7 +1387,7 @@ SvxFontItem Ww1Fonts::GetFont(USHORT nFCode)
}
else
{
- DBG_ASSERT(FALSE, "WW1Fonts::GetFont: Nicht existenter Font !");
+ DBG_ASSERT(sal_False, "WW1Fonts::GetFont: Nicht existenter Font !");
eFamily = FAMILY_SWISS;
aName.AssignAscii( RTL_CONSTASCII_STRINGPARAM( "Helv" ));
ePitch = PITCH_VARIABLE;
@@ -1444,7 +1444,7 @@ void Ww1Dop::Out(Ww1Shell& rOut)
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab(1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
+ SvxTabStopItem aNewTab(1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rOut.GetDoc().GetAttrPool().SetPoolDefaultItem( aNewTab); //~ mdt: besser (GetDoc)
@@ -1507,7 +1507,7 @@ void Ww1Assoc::Out(Ww1Shell& rOut)
}
//////////////////////////////////////////////////////////// StyleSheet
-void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
switch (stc){
case 222: // Null
@@ -1618,7 +1618,7 @@ void Ww1StyleSheet::OutDefaults(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
}
}
-void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
+void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 stc)
{
const RES_POOL_COLLFMT_TYPE RES_NONE = RES_POOLCOLL_DOC_END;
RES_POOL_COLLFMT_TYPE aType = RES_NONE;
@@ -1707,13 +1707,13 @@ void Ww1StyleSheet::OutOne(Ww1Shell& rOut, Ww1Manager& rMan, USHORT stc)
// OutOneWithBase() liest einen Style mit OutOne() einen Style ein
// Jedoch liest er, wenn noch nicht geschehen, den Basisstyle rekursiv ein
void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
- USHORT stc, BYTE* pbStopRecur )
+ sal_uInt16 stc, sal_uInt8* pbStopRecur )
{
// SH: lineares Einlesen ist Scheisse, da dann BasedOn nicht gesetzt
// werden kann und ausserdem Toggle- und Modify-Attrs (z.B. Tabs ) nicht gehen.
Ww1Style& rSty = GetStyle(stc);
- USHORT nBase = rSty.GetnBase();
+ sal_uInt16 nBase = rSty.GetnBase();
if( nBase != stc
&& !rOut.IsStyleImported( nBase )
&& GetStyle(nBase).IsUsed()
@@ -1727,9 +1727,9 @@ void Ww1StyleSheet::OutOneWithBase(Ww1Shell& rOut, Ww1Manager& rMan,
void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
{
- USHORT stc;
- BYTE bStopRecur[256];
- memset( bStopRecur, FALSE, sizeof(bStopRecur) );
+ sal_uInt16 stc;
+ sal_uInt8 bStopRecur[256];
+ memset( bStopRecur, sal_False, sizeof(bStopRecur) );
// 1. Durchlauf: Styles mit Basisstyles rekursiv
for (stc=0;stc<Count();stc++)
@@ -1740,7 +1740,7 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
for (stc=0;stc<Count();stc++){
Ww1Style& rSty = GetStyle(stc);
if ( rSty.IsUsed() ){
- USHORT nNext = rSty.GetnNext();
+ sal_uInt16 nNext = rSty.GetnNext();
if( nNext != stc && GetStyle(nNext).IsUsed() )
rOut.NextStyle( stc, nNext );
}
@@ -1748,12 +1748,12 @@ void Ww1StyleSheet::Out(Ww1Shell& rOut, Ww1Manager& rMan)
}
////////////////////////////////////////////////////////////// Picture
-static ULONG GuessPicSize(W1_PIC* pPic)
+static sal_uLong GuessPicSize(W1_PIC* pPic)
{
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
- return 120L + (ULONG)padx * maxy;
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
+ return 120L + (sal_uLong)padx * maxy;
}
//
@@ -1764,30 +1764,30 @@ static ULONG GuessPicSize(W1_PIC* pPic)
void Ww1Picture::WriteBmp(SvStream& rOut)
{
long nSize = pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb));
- BYTE* p = pPic->rgbGet();
- USHORT maxx = pPic->mfp.xExtGet();
- USHORT padx = ((maxx + 7) / 8) * 8;
- USHORT maxy = pPic->mfp.yExtGet();
+ sal_uInt8* p = pPic->rgbGet();
+ sal_uInt16 maxx = pPic->mfp.xExtGet();
+ sal_uInt16 padx = ((maxx + 7) / 8) * 8;
+ sal_uInt16 maxy = pPic->mfp.yExtGet();
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT x = SVBT16ToShort(p);
+ sal_uInt16 x = SVBT16ToShort(p);
(void) x;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT y = SVBT16ToShort(p);
+ sal_uInt16 y = SVBT16ToShort(p);
(void) y;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT planes = SVBT16ToShort(p);
+ sal_uInt16 planes = SVBT16ToShort(p);
(void) planes;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
#if OSL_DEBUG_LEVEL > 1
- USHORT bitcount = SVBT16ToShort(p);
+ sal_uInt16 bitcount = SVBT16ToShort(p);
(void) bitcount;
#endif
p+= sizeof(SVBT16); nSize -= sizeof(SVBT16);
@@ -1828,40 +1828,40 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wLong(0);
wLong(16);
wLong(16);
- USHORT i;
+ sal_uInt16 i;
for (i=0;nSize>0&&i<16;i++)
{
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(*p);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
wByte(0);
}
DBG_ASSERT(padx*maxy/2==nSize, "Ww1Picture");
- USHORT j;
+ sal_uInt16 j;
#if 1
{
- BYTE* pBuf = new BYTE[padx];
+ sal_uInt8* pBuf = new sal_uInt8[padx];
for (j=0;nSize>0&&j<maxy;j++)
{
- BYTE* q = pBuf;
+ sal_uInt8* q = pBuf;
for (i=0;nSize>0&&i<maxx;i+=2)
{
*q++ = *p>>4;
*q++ = *p&0xf;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
*q++ = 0;
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
if(rOut.Write(pBuf, padx) != padx){
delete [] pBuf;
@@ -1878,13 +1878,13 @@ void Ww1Picture::WriteBmp(SvStream& rOut)
wByte(*p>>4);
wByte(*p&0xf);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
for (;i<padx;i+=2)
{
wByte(0);
p++;
- nSize -= sizeof(BYTE);
+ nSize -= sizeof(sal_uInt8);
}
}
#endif
@@ -1901,7 +1901,7 @@ error:
void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
{
Graphic* pGraphic = 0;
- USHORT mm;
+ sal_uInt16 mm;
switch (mm = pPic->mfp.mmGet())
{
case 8: // embedded metafile
@@ -1928,7 +1928,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
case 98: // TIFF-Name
{
String aDir( (sal_Char*)pPic->rgbGet(),
- (USHORT)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
+ (sal_uInt16)(pPic->lcbGet() - (sizeof(*pPic)-sizeof(pPic->rgb))),
RTL_TEXTENCODING_MS_1252 );
rOut.AddGraphic( aDir );
@@ -1936,7 +1936,7 @@ void Ww1Picture::Out(Ww1Shell& rOut, Ww1Manager& /*rMan*/)
break;
case 97: // embedded bitmap
{
- ULONG nSiz = GuessPicSize(pPic);
+ sal_uLong nSiz = GuessPicSize(pPic);
SvMemoryStream aOut(nSiz, 8192);
WriteBmp(aOut);
Bitmap aBmp;
@@ -1970,8 +1970,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddHeadL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddHeadL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
@@ -1991,8 +1991,8 @@ void Ww1HeaderFooter::Start(Ww1Shell& rOut, Ww1Manager& rMan)
break;
case OddFootL:
{
- ULONG begin = 0;
- ULONG end = 0;
+ sal_uLong begin = 0;
+ sal_uLong end = 0;
if (FillOddFootL(begin, end))
{
Ww1HddText* pText = new Ww1HddText(rMan.GetFib());
diff --git a/sw/source/filter/ww1/w1par.cxx b/sw/source/filter/ww1/w1par.cxx
index c90e39b173a7..0f0b1f4beaff 100644
--- a/sw/source/filter/ww1/w1par.cxx
+++ b/sw/source/filter/ww1/w1par.cxx
@@ -44,13 +44,13 @@
// Initialisieren der Feld-FilterFlags
//----------------------------------------
-static ULONG WW1_Read_FieldIniFlags()
+static sal_uLong WW1_Read_FieldIniFlags()
{
-// USHORT i;
+// sal_uInt16 i;
static const sal_Char* aNames[ 1 ] = { "WinWord/WW1F" };
sal_uInt32 aVal[ 1 ];
SwFilterOptions aOpt( 1, aNames, aVal );
- ULONG nFieldFlags = aVal[ 0 ];
+ sal_uLong nFieldFlags = aVal[ 0 ];
if ( SwFltGetFlag( nFieldFlags, SwFltControlStack::HYPO ) )
{
@@ -70,17 +70,17 @@ static ULONG WW1_Read_FieldIniFlags()
// Diese werden dann einfach per Pipe 'uebertragen'.
//
-ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
+sal_uLong WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const String& /*cName*/)
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE(pStrm!=NULL, "W1-Read ohne Stream");
if (pStrm != NULL)
{
- BOOL bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
+ sal_Bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
// erstmal eine shell konstruieren: die ist schnittstelle
// zum writer-dokument
- ULONG nFieldFlags = WW1_Read_FieldIniFlags();
+ sal_uLong nFieldFlags = WW1_Read_FieldIniFlags();
Ww1Shell* pRdr = new Ww1Shell( rDoc, rPam, rBaseURL, bNew, nFieldFlags );
if( pRdr )
{
@@ -130,7 +130,7 @@ ULONG WW1Reader::Read(SwDoc& rDoc, const String& rBaseURL, SwPaM& rPam, const St
// in einen Stream werden alle Informationen, die aus der Datei
// gelesen werden, in die shell ge'piped'.
//
-Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags)
+Ww1Shell::Ww1Shell( SwDoc& rD, SwPaM& rPam, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags)
: SwFltShell(&rD, rPam, rBaseURL, bNew, nFieldFlags)
{
}
diff --git a/sw/source/filter/ww1/w1par.hxx b/sw/source/filter/ww1/w1par.hxx
index 01f5d66a7d97..33c4c14b78dd 100644
--- a/sw/source/filter/ww1/w1par.hxx
+++ b/sw/source/filter/ww1/w1par.hxx
@@ -36,7 +36,7 @@
class Ww1Shell : public SwFltShell
{
public:
- Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, BOOL bNew, ULONG nFieldFlags);
+ Ww1Shell(SwDoc&, SwPaM&, const String& rBaseURL, sal_Bool bNew, sal_uLong nFieldFlags);
};
diff --git a/sw/source/filter/ww1/w1sprm.cxx b/sw/source/filter/ww1/w1sprm.cxx
index 88a22c97a2c8..584ca7a73291 100644
--- a/sw/source/filter/ww1/w1sprm.cxx
+++ b/sw/source/filter/ww1/w1sprm.cxx
@@ -66,20 +66,20 @@ void Ww1Sprm::Stop( Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
for(short i=Count()-1;i>=0;i--){ // rueckwaerts
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Stop(rOut, nId, pSprm, nSize, rMan);
}
}
void Ww1Sprm::Start(
- Ww1Shell& rOut, Ww1Manager& rMan, USHORT i)
+ Ww1Shell& rOut, Ww1Manager& rMan, sal_uInt16 i)
{
- BYTE nId;
- USHORT nSize;
- BYTE* pSprm;
+ sal_uInt8 nId;
+ sal_uInt16 nSize;
+ sal_uInt8* pSprm;
Fill(i, nId, nSize, pSprm);
GetTab(nId).Start(rOut, nId, pSprm, nSize, rMan);
}
@@ -88,18 +88,18 @@ void Ww1Sprm::Start(
Ww1Shell& rOut, Ww1Manager& rMan)
{
if(IsUsed())
- for(USHORT i=0;i<Count();i++)
+ for(sal_uInt16 i=0;i<Count();i++)
Start(rOut, rMan, i);
}
//////////////////////////////////////////////////////////// SingleSprm
void Ww1SingleSprm::Start(
- Ww1Shell&, BYTE /*nId*/, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8 /*nId*/, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
}
void Ww1SingleSprm::Stop(
- Ww1Shell&, BYTE, BYTE*, USHORT, Ww1Manager&)
+ Ww1Shell&, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&)
{
// OSL_ENSURE(FALSE, "Unknown Sprm");
}
@@ -112,11 +112,11 @@ void Ww1SingleSprm::Stop(
//
#define STOP1(Class, Code) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code); }
#define STOP2(Class, Code1, Code2) \
void Class::Stop( \
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager&) { \
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager&) { \
rOut.EndItem(Code1).EndItem(Code2); }
/////////////////////////////////////////////////////// SingleSprmXxxxx
@@ -128,7 +128,7 @@ void Ww1SingleSprm::Stop(
// virtualen methoden bei beginn und ende der formatierung gerufen.
//
void Ww1SingleSprmPDxaLeft::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -141,7 +141,7 @@ void Ww1SingleSprmPDxaLeft::Start(
}
void Ww1SingleSprmPDxaRight::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -152,7 +152,7 @@ void Ww1SingleSprmPDxaRight::Start(
}
void Ww1SingleSprmPDxaLeft1::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
SvxLRSpaceItem aLR((SvxLRSpaceItem&)rOut.GetAttr(RES_LR_SPACE));
short nPara = SVBT16ToShort(pSprm);
@@ -165,14 +165,14 @@ void Ww1SingleSprmPDxaLeft1::Start(
STOP1(Ww1SingleSprmPDxa, RES_LR_SPACE)
void Ww1SingleSprmPJc::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
static SvxAdjust const aAdj[] = {
SVX_ADJUST_LEFT,
SVX_ADJUST_CENTER,
SVX_ADJUST_RIGHT,
SVX_ADJUST_BLOCK };
- BYTE nPara = SVBT8ToByte(pSprm);
+ sal_uInt8 nPara = SVBT8ToByte(pSprm);
nPara %=(sizeof(aAdj)/sizeof(*aAdj));
rOut << SvxAdjustItem(aAdj[nPara], RES_PARATR_ADJUST);
}
@@ -180,7 +180,7 @@ void Ww1SingleSprmPJc::Start(
STOP1(Ww1SingleSprmPJc, RES_PARATR_ADJUST)
void Ww1SingleSprmPFKeep::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtSplitItem((SVBT8ToByte(pSprm) & 1) == 0, RES_PARATR_SPLIT);
}
@@ -188,7 +188,7 @@ void Ww1SingleSprmPFKeep::Start(
STOP1(Ww1SingleSprmPFKeep, RES_PARATR_SPLIT)
void Ww1SingleSprmPFKeepFollow::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtKeepItem((SVBT8ToByte(pSprm) & 1) != 0, RES_KEEP);
}
@@ -196,7 +196,7 @@ void Ww1SingleSprmPFKeepFollow::Start(
STOP1(Ww1SingleSprmPFKeepFollow, RES_KEEP)
void Ww1SingleSprmPPageBreakBefore::Start(
- Ww1Shell& rOut, BYTE, BYTE* pSprm, USHORT, Ww1Manager&)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8* pSprm, sal_uInt16, Ww1Manager&)
{
rOut << SvxFmtBreakItem(SVBT8ToByte(pSprm) & 1?
SVX_BREAK_PAGE_BEFORE:SVX_BREAK_NONE, RES_BREAK );
@@ -206,13 +206,13 @@ STOP1(Ww1SingleSprmPPageBreakBefore, RES_BREAK)
SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc)
{
- USHORT nCode;
+ sal_uInt16 nCode;
SvxBorderStyle eStyle = SOLID;
if(pBrc->dxpLine2WidthGet() == 0)
{
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 0: return 0; // keine Linie
case 1: nCode = DEF_LINE_WIDTH_0; break;
case 2: nCode = DEF_LINE_WIDTH_1; break;
@@ -236,20 +236,20 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
{
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_IN; break;
}
pLine->SetOutWidth(nCode);
switch(pBrc->dxpLine2WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown linewidth");
+ default: OSL_ENSURE(sal_False, "unknown linewidth");
case 1: nCode = DEF_DOUBLE_LINE0_OUT; break;
}
pLine->SetInWidth(nCode);
}
switch(pBrc->dxpLine1WidthGet())
{
- default: OSL_ENSURE(FALSE, "unknown space");
+ default: OSL_ENSURE(sal_False, "unknown space");
case 0: nCode = DEF_DOUBLE_LINE0_DIST; break;
case 1: nCode = DEF_DOUBLE_LINE1_DIST; break;
case 2: nCode = DEF_DOUBLE_LINE2_DIST; break;
@@ -260,9 +260,9 @@ SvxBorderLine* Ww1SingleSprmPBrc::SetBorder(SvxBorderLine* pLine, W1_BRC10* pBrc
}
void Ww1SingleSprmPBrc::Start(
- Ww1Shell& rOut, BYTE,
+ Ww1Shell& rOut, sal_uInt8,
W1_BRC10* pBrc,
- USHORT
+ sal_uInt16
#if OSL_DEBUG_LEVEL > 1
nSize
#endif
@@ -296,11 +296,11 @@ void Ww1SingleSprmPBrc::Start(
STOP2(Ww1SingleSprmPBrc, RES_BOX, RES_SHADOW)
-static USHORT const nBrcTrans[BRC_ANZ] =
+static sal_uInt16 nBrcTrans[BRC_ANZ] =
{ BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
void Ww1SingleSprmPBrc10::Start(
- Ww1Shell& rOut, BYTE nId, BYTE* pSprm, USHORT nSize, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 nId, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& rMan)
{
W1_BRC10* pBrc =(W1_BRC10*)pSprm;
@@ -316,7 +316,7 @@ void Ww1SingleSprmPBrc10::Start(
STOP1(Ww1SingleSprmParaSpace, RES_UL_SPACE)
void Ww1SingleSprmPDyaBefore::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -327,7 +327,7 @@ void Ww1SingleSprmPDyaBefore::Start(
}
void Ww1SingleSprmPDyaAfter::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nPara = SVBT16ToShort(pSprm);
if(nPara < 0)
@@ -340,39 +340,39 @@ void Ww1SingleSprmPDyaAfter::Start(
STOP1(Ww1SingleSprmPDyaLine, RES_PARATR_LINESPACING)
void Ww1SingleSprmPDyaLine::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
if(nSpace < 0)
nSpace = -nSpace;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
- if(TRUE)
+ if(sal_True)
{// MultilineSpace(proportional)
long n = nSpace * 100 / 240; // W1: 240 = 100%, SW: 100 = 100%
if(n>200)
n = 200; // SW_UI-Maximum
aLSpc.GetLineSpaceRule() = SVX_LINE_SPACE_AUTO;
- aLSpc.SetPropLineSpace((BYTE)n);
+ aLSpc.SetPropLineSpace((sal_uInt8)n);
}
else
{// Fixed / Minimum
- aLSpc.SetLineHeight((USHORT)nSpace);
+ aLSpc.SetLineHeight((sal_uInt16)nSpace);
aLSpc.GetInterLineSpaceRule() = SVX_INTER_LINE_SPACE_OFF;
}
rOut << aLSpc;
}
void Ww1SingleSprmPChgTabsPapx::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nLeftPMgn = 0; // Koordinaten etwa gleich ??
short i;
- BYTE nDel = pSprm[1];
- BYTE* pDel = pSprm + 2; // Del - Array
- BYTE nIns = pSprm[nDel*2+2];
- BYTE* pIns = pSprm + 2*nDel + 3; // Ins - Array
+ sal_uInt8 nDel = pSprm[1];
+ sal_uInt8* pDel = pSprm + 2; // Del - Array
+ sal_uInt8 nIns = pSprm[nDel*2+2];
+ sal_uInt8* pIns = pSprm + 2*nDel + 3; // Ins - Array
W1_TBD* pTyp = (W1_TBD*)(pSprm + 2*nDel + 2*nIns + 3);// Typ - Array
SvxTabStopItem aAttr( (SvxTabStopItem&)rOut.GetNodeOrStyAttr( RES_PARATR_TABSTOP ));
@@ -380,7 +380,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
SvxTabStop aTabStop;
for( i=0; i<nDel; i++ ){
- USHORT nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
+ sal_uInt16 nPos = aAttr.GetPos( SVBT16ToShort( pDel + i*2 ) - nLeftPMgn );
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -406,7 +406,7 @@ void Ww1SingleSprmPChgTabsPapx::Start(
case 4: aTabStop.GetFill() = '_'; break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if( nPos2 != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos2, 1 ); // sonst weigert sich das Insert()
@@ -418,13 +418,13 @@ void Ww1SingleSprmPChgTabsPapx::Start(
STOP1(Ww1SingleSprmPChgTabsPapx, RES_PARATR_TABSTOP)
void Ww1SingleSprmSGprfIhdt::Start(
- Ww1Shell& /*rOut*/, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
rMan.GetSep().SetGrpfIhdt(SVBT8ToByte(pSprm));
}
void Ww1SingleSprmSColumns::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nColSpace = 708; // default 1,25 cm
short nNettoWidth = -1; //~ mdt: dxaLeft/Right missing...
@@ -438,22 +438,22 @@ void Ww1SingleSprmSColumns::Start(
}
void Ww1SingleSprmPTtp::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
- rMan.SetInTtp( TRUE ); // Besonderheit: wird bei InTable::Stop und
+ rMan.SetInTtp( sal_True ); // Besonderheit: wird bei InTable::Stop und
// nicht bei InTtp::Stop zurueckgesetzt,
// da Auswertung in InTable
}
void Ww1SingleSprmPTtp::Stop(
- Ww1Shell& rOut, BYTE, BYTE*, USHORT, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8, sal_uInt8*, sal_uInt16, Ww1Manager& rMan)
{
if (rOut.IsInTable() && rMan.HasInTable())
rOut.NextTableRow();
}
void Ww1SingleSprmPFInTable::Start(
- Ww1Shell& /*rOut*/, BYTE, BYTE*, USHORT,
+ Ww1Shell& /*rOut*/, sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& /*rMan*/)
{
}
@@ -464,28 +464,27 @@ void Ww1SingleSprmPFInTable::Stop(
rOut
#endif
,
- BYTE, BYTE*, USHORT,
+ sal_uInt8, sal_uInt8*, sal_uInt16,
Ww1Manager& rMan)
{
#if OSL_DEBUG_LEVEL > 1
OSL_ENSURE(rOut.IsInTable(), "");
#endif
- rMan.SetInTtp( FALSE );
}
void Ww1SingleSprmTDxaGapHalf::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellSpace(nSpace);
}
void Ww1SingleSprmTDefTable10::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT nSize, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 nSize, Ww1Manager& /*rMan*/)
{
- USHORT i;
- BYTE *p = pSprm + 2; // LaengenWord ueberlesen
- BYTE nCount = *p;
+ sal_uInt16 i;
+ sal_uInt8 *p = pSprm + 2; // LaengenWord ueberlesen
+ sal_uInt8 nCount = *p;
p++;
nSize -= 3;
// Es fehlt noch:
@@ -500,7 +499,7 @@ void Ww1SingleSprmTDefTable10::Start(
{
short nWholeWidth = SVBT16ToShort( p + 2 * nCount ) - nPos;
- rOut.SetTableWidth( (USHORT)nWholeWidth ); // Tabellenbreite setzen
+ rOut.SetTableWidth( (sal_uInt16)nWholeWidth ); // Tabellenbreite setzen
// Pos der Tabelle setzen
long nMidTab = nPos + nWholeWidth / 2; // TabellenMitte
@@ -521,17 +520,17 @@ void Ww1SingleSprmTDefTable10::Start(
rOut.SetTableOrient( eOri );
}
- BYTE* pEndPos = p+2;
- BYTE* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
- USHORT nCellsDeleted = 0; // fuer gemergte Zellen
+ sal_uInt8* pEndPos = p+2;
+ sal_uInt8* pTc0 = ( nSize >= nCount * 10 ) ? pEndPos + 2 * nCount : 0;
+ sal_uInt16 nCellsDeleted = 0; // fuer gemergte Zellen
for( i = 0; i < nCount; i++ ){
// Info sammeln
W1_TC* pTc = (W1_TC*)pTc0;
- BOOL bMerged = (pTc) ? pTc->fMergedGet() : FALSE;
+ sal_Bool bMerged = (pTc) ? pTc->fMergedGet() : sal_False;
// Zellenbreiten setzen
- USHORT nPos1 = SVBT16ToShort( pEndPos );
+ sal_uInt16 nPos1 = SVBT16ToShort( pEndPos );
if( !bMerged )
rOut.SetCellWidth( nPos1 - nPos, i - nCellsDeleted );
// Zellenbreite setzen
@@ -542,13 +541,13 @@ void Ww1SingleSprmTDefTable10::Start(
if( pTc0 ){ // gibts TCs ueberhaupt ?
W1_TC* pTc2 = (W1_TC*)pTc0;
- BOOL bMerged2 = pTc2->fMergedGet();
+ sal_Bool bMerged2 = pTc2->fMergedGet();
if( !bMerged2 ){
// und nun die Umrandungen
SvxBoxItem aBox( (SvxBoxItem&)rOut.GetCellAttr( RES_BOX ));
SvxBorderLine aLine;
W1_BRC10* pBrc = pTc2->rgbrcGet();
- for( USHORT j=0; j<4; j++ ){
+ for( sal_uInt16 j=0; j<4; j++ ){
aBox.SetLine(Ww1SingleSprmPBrc::SetBorder(&aLine, pBrc),
nBrcTrans[j]);
pBrc++;
@@ -566,7 +565,7 @@ void Ww1SingleSprmTDefTable10::Start(
void Ww1SingleSprmTDyaRowHeight::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nSpace = SVBT16ToShort(pSprm);
rOut.SetCellHeight(nSpace);
@@ -575,9 +574,9 @@ void Ww1SingleSprmTDyaRowHeight::Start(
// Fastsave-Attribute brauche ich als Dymmys nicht
void Ww1SingleSprmPpc::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
- BYTE nPpc = SVBT8ToByte(pSprm);
+ sal_uInt8 nPpc = SVBT8ToByte(pSprm);
if (rOut.IsInTable()) // Flys in Tabellen kann PMW
return; // nicht
@@ -602,7 +601,7 @@ void Ww1SingleSprmPpc::Start(
}
void Ww1SingleSprmPDxaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& rMan)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& rMan)
{
short nXPos = SVBT16ToShort(pSprm);
@@ -627,7 +626,7 @@ void Ww1SingleSprmPDxaAbs::Start(
}
void Ww1SingleSprmPDyaAbs::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nYPos = SVBT16ToShort(pSprm);
sal_Int16 eVRel = text::RelOrientation::FRAME;
@@ -643,14 +642,14 @@ void Ww1SingleSprmPDyaAbs::Start(
}
void Ww1SingleSprmPDxaWidth::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
short nDxaWidth = SVBT16ToShort(pSprm);
rOut.SetFlyFrmAttr( SwFmtFrmSize( ATT_VAR_SIZE, nDxaWidth, MINFLY ) );
}
void Ww1SingleSprmPFromText::Start(
- Ww1Shell& rOut, BYTE /*nId*/, BYTE* pSprm, USHORT /*nSize*/, Ww1Manager& /*rMan*/)
+ Ww1Shell& rOut, sal_uInt8 /*nId*/, sal_uInt8* pSprm, sal_uInt16 /*nSize*/, Ww1Manager& /*rMan*/)
{
if( rOut.IsInFly() ){ // Kommt auch ausserhalb eines Flys vor, hat
// dann aber offensichtlich nichts zu bedeuten.
diff --git a/sw/source/filter/ww1/w1struct.hxx b/sw/source/filter/ww1/w1struct.hxx
index 0cc2d7cf8c62..d3560288caf5 100644
--- a/sw/source/filter/ww1/w1struct.hxx
+++ b/sw/source/filter/ww1/w1struct.hxx
@@ -39,343 +39,343 @@ class Ww1Manager;
struct W1_FIB /////////////////////////////////////////////////////////
{
SVBT16 wIdent;// 0x0 int magic number
- USHORT wIdentGet() {
+ sal_uInt16 wIdentGet() {
return SVBT16ToShort(wIdent); }
SVBT16 nFib;// 0x2 FIB version written
- USHORT nFibGet() {
+ sal_uInt16 nFibGet() {
return SVBT16ToShort(nFib); }
SVBT16 nProduct;// 0x4 product version written by
- USHORT nProductGet() {
+ sal_uInt16 nProductGet() {
return SVBT16ToShort(nProduct); }
SVBT16 nlocale;// 0x6 language stamp---localized version;
- USHORT nlocaleGet() {
+ sal_uInt16 nlocaleGet() {
return SVBT16ToShort(nlocale); }
SVBT16 pnNext;// 0x8
- USHORT pnNextGet() {
+ sal_uInt16 pnNextGet() {
return SVBT16ToShort(pnNext); }
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fDot :1;// 0xa 0001
- BOOL fDotGet() {
+ sal_Bool fDotGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fGlsy :1;// 0002
- BOOL fGlsyGet() {
+ sal_Bool fGlsyGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 fComplex :1;// 0004 when 1, file is in complex, fast-saved format.
- BOOL fComplexGet() {
+ sal_Bool fComplexGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT16 fHasPic :1;// 0008 file contains 1 or more pictures
- BOOL fHasPicGet() {
+ sal_Bool fHasPicGet() {
return 0 != ((fFlagsGet() >> 3) & 1); }
// SVBT16 cQuickSaves :4;// 00F0 count of times file was quicksaved
- USHORT cQuickSavesGet() {
- return (USHORT)((fFlagsGet() >> 4) & 0xf); }
+ sal_uInt16 cQuickSavesGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 0xf); }
// SVBT16 u1 :8;// FF00 unused
- USHORT u1Get() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 u1Get() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 nFibBack;// 0xc
- USHORT nFibBackGet() {
+ sal_uInt16 nFibBackGet() {
return SVBT16ToShort(nFibBack); }
SVBT16 u2[5];// 0xe reserved
SVBT32 fcMin;// 0x18 file offset of first character of text
- ULONG fcMinGet() {
+ sal_uLong fcMinGet() {
return SVBT32ToUInt32(fcMin); }
SVBT32 fcMac;// 0x1c file offset of last character of text + 1
- ULONG fcMacGet() {
+ sal_uLong fcMacGet() {
return SVBT32ToUInt32(fcMac); }
SVBT32 cbMac;// 0x20 file offset of last byte written to file + 1.
- ULONG cbMacGet() {
+ sal_uLong cbMacGet() {
return SVBT32ToUInt32(cbMac); }
SVBT32 u4[4];// 0x24 reserved
SVBT32 ccpText;// 0x34 length of main document text stream
- ULONG ccpTextGet() {
+ sal_uLong ccpTextGet() {
return SVBT32ToUInt32(ccpText); }
SVBT32 ccpFtn;// 0x38 length of footnote subdocument text stream
- ULONG ccpFtnGet() {
+ sal_uLong ccpFtnGet() {
return SVBT32ToUInt32(ccpFtn); }
SVBT32 ccpHdd;// 0x3c length of header subdocument text stream
- ULONG ccpHddGet() {
+ sal_uLong ccpHddGet() {
return SVBT32ToUInt32(ccpHdd); }
SVBT32 ccpMcr;// 0x40 length of macro subdocument text stream
- ULONG ccpMcrGet() {
+ sal_uLong ccpMcrGet() {
return SVBT32ToUInt32(ccpMcr); }
SVBT32 ccpAtn;// 0x44 length of annotation subdocument text stream
- ULONG ccpAtnGet() {
+ sal_uLong ccpAtnGet() {
return SVBT32ToUInt32(ccpAtn); }
SVBT32 cp5[4];// 0x48
SVBT32 fcStshfOrig;// 0x58 file offset of original allocation for STSH in file
- ULONG fcStshfOrigGet() {
+ sal_uLong fcStshfOrigGet() {
return SVBT32ToUInt32(fcStshfOrig); }
SVBT16 cbStshfOrig;// 0x5c count of bytes of original STSH allocation
- USHORT cbStshfOrigGet() {
+ sal_uInt16 cbStshfOrigGet() {
return SVBT16ToShort(cbStshfOrig); }
SVBT32 fcStshf;// 0x5e file offset of STSH in file.
- ULONG fcStshfGet() {
+ sal_uLong fcStshfGet() {
return SVBT32ToUInt32(fcStshf); }
SVBT16 cbStshf;// 0x62 count of bytes of current STSH allocation
- USHORT cbStshfGet() {
+ sal_uInt16 cbStshfGet() {
return SVBT16ToShort(cbStshf); }
SVBT32 fcPlcffndRef;// 0x64 file offset of footnote reference PLC.
- ULONG fcPlcffndRefGet() {
+ sal_uLong fcPlcffndRefGet() {
return SVBT32ToUInt32(fcPlcffndRef); }
SVBT16 cbPlcffndRef;// 0x68 count of bytes of footnote reference PLC
- USHORT cbPlcffndRefGet() {
+ sal_uInt16 cbPlcffndRefGet() {
return SVBT16ToShort(cbPlcffndRef); }
// == 0 if no footnotes defined in document.
SVBT32 fcPlcffndTxt;// 0x6a file offset of footnote text PLC.
- ULONG fcPlcffndTxtGet() {
+ sal_uLong fcPlcffndTxtGet() {
return SVBT32ToUInt32(fcPlcffndTxt); }
SVBT16 cbPlcffndTxt;// 0x6e count of bytes of footnote text PLC.
- USHORT cbPlcffndTxtGet() {
+ sal_uInt16 cbPlcffndTxtGet() {
return SVBT16ToShort(cbPlcffndTxt); }
// == 0 if no footnotes defined in document
SVBT32 fcPlcfandRef;// 0x70 file offset of annotation reference PLC.
- ULONG fcPlcfandRefGet() {
+ sal_uLong fcPlcfandRefGet() {
return SVBT32ToUInt32(fcPlcfandRef); }
SVBT16 cbPlcfandRef;// 0x74 count of bytes of annotation reference PLC.
- USHORT cbPlcfandRefGet() {
+ sal_uInt16 cbPlcfandRefGet() {
return SVBT16ToShort(cbPlcfandRef); }
SVBT32 fcPlcfandTxt;// 0x76 file offset of annotation text PLC.
- ULONG fcPlcfandTxtGet() {
+ sal_uLong fcPlcfandTxtGet() {
return SVBT32ToUInt32(fcPlcfandTxt); }
SVBT16 cbPlcfandTxt;// 0x7a count of bytes of the annotation text PLC
- USHORT cbPlcfandTxtGet() {
+ sal_uInt16 cbPlcfandTxtGet() {
return SVBT16ToShort(cbPlcfandTxt); }
SVBT32 fcPlcfsed;// 8x7c file offset of section descriptor PLC.
- ULONG fcPlcfsedGet() {
+ sal_uLong fcPlcfsedGet() {
return SVBT32ToUInt32(fcPlcfsed); }
SVBT16 cbPlcfsed;// 0x80 count of bytes of section descriptor PLC.
- USHORT cbPlcfsedGet() {
+ sal_uInt16 cbPlcfsedGet() {
return SVBT16ToShort(cbPlcfsed); }
SVBT32 fcPlcfpgd;// 0x82 file offset of paragraph descriptor PLC
- ULONG fcPlcfpgdGet() {
+ sal_uLong fcPlcfpgdGet() {
return SVBT32ToUInt32(fcPlcfpgd); }
SVBT16 cbPlcfpgd;// 0x86 count of bytes of paragraph descriptor PLC.
- USHORT cbPlcfpgdGet() {
+ sal_uInt16 cbPlcfpgdGet() {
return SVBT16ToShort(cbPlcfpgd); }
// ==0 if file was never repaginated
// Should not be written by third party creators
SVBT32 fcPlcfphe;// 0x88 file offset of PLC of paragraph heights.
- ULONG fcPlcfpheGet() {
+ sal_uLong fcPlcfpheGet() {
return SVBT32ToUInt32(fcPlcfphe); }
SVBT16 cbPlcfphe;// 0x8c count of bytes of paragraph height PLC.
- USHORT cbPlcfpheGet() {
+ sal_uInt16 cbPlcfpheGet() {
return SVBT16ToShort(cbPlcfphe); }
// ==0 when file is non-complex.
SVBT32 fcSttbfglsy;// 0x8e file offset of glossary string table.
- ULONG fcSttbfglsyGet() {
+ sal_uLong fcSttbfglsyGet() {
return SVBT32ToUInt32(fcSttbfglsy); }
SVBT16 cbSttbfglsy;// 0x92 count of bytes of glossary string table.
- USHORT cbSttbfglsyGet() {
+ sal_uInt16 cbSttbfglsyGet() {
return SVBT16ToShort(cbSttbfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfglsy;// 0x94 file offset of glossary PLC.
- ULONG fcPlcfglsyGet() {
+ sal_uLong fcPlcfglsyGet() {
return SVBT32ToUInt32(fcPlcfglsy); }
SVBT16 cbPlcfglsy;// 0x98 count of bytes of glossary PLC.
- USHORT cbPlcfglsyGet() {
+ sal_uInt16 cbPlcfglsyGet() {
return SVBT16ToShort(cbPlcfglsy); }
// == 0 for non-glossary documents.
// !=0 for glossary documents.
SVBT32 fcPlcfhdd;// 0x9a byte offset of header PLC.
- ULONG fcPlcfhddGet() {
+ sal_uLong fcPlcfhddGet() {
return SVBT32ToUInt32(fcPlcfhdd); }
SVBT16 cbPlcfhdd;// 0x9e count of bytes of header PLC.
- USHORT cbPlcfhddGet() {
+ sal_uInt16 cbPlcfhddGet() {
return SVBT16ToShort(cbPlcfhdd); }
// == 0 if document contains no headers
SVBT32 fcPlcfbteChpx;// 0xa0 file offset of character property bin table.PLC.
- ULONG fcPlcfbteChpxGet() {
+ sal_uLong fcPlcfbteChpxGet() {
return SVBT32ToUInt32(fcPlcfbteChpx); }
SVBT16 cbPlcfbteChpx;// 0xa4 count of bytes of character property bin table PLC.
- USHORT cbPlcfbteChpxGet() {
+ sal_uInt16 cbPlcfbteChpxGet() {
return SVBT16ToShort(cbPlcfbteChpx); }
SVBT32 fcPlcfbtePapx;// 0xa6 file offset of paragraph property bin table.PLC.
- ULONG fcPlcfbtePapxGet() {
+ sal_uLong fcPlcfbtePapxGet() {
return SVBT32ToUInt32(fcPlcfbtePapx); }
SVBT16 cbPlcfbtePapx;// 0xaa count of bytes of paragraph property bin table PLC.
- USHORT cbPlcfbtePapxGet() {
+ sal_uInt16 cbPlcfbtePapxGet() {
return SVBT16ToShort(cbPlcfbtePapx); }
SVBT32 fcPlcfsea;// 0xac file offset of PLC reserved for private use. The SEA is 6 bytes long.
- ULONG fcPlcfseaGet() {
+ sal_uLong fcPlcfseaGet() {
return SVBT32ToUInt32(fcPlcfsea); }
SVBT16 cbPlcfsea;// 0xb0 count of bytes of private use PLC.
- USHORT cbPlcfseaGet() {
+ sal_uInt16 cbPlcfseaGet() {
return SVBT16ToShort(cbPlcfsea); }
SVBT32 fcSttbfffn;// 0xb2 file offset of font information STTBF. See the FFN file structure definition.
- ULONG fcSttbfffnGet() {
+ sal_uLong fcSttbfffnGet() {
return SVBT32ToUInt32(fcSttbfffn); }
SVBT16 cbSttbfffn;// 0xb6 count of bytes in sttbfffn.
- USHORT cbSttbfffnGet() {
+ sal_uInt16 cbSttbfffnGet() {
return SVBT16ToShort(cbSttbfffn); }
SVBT32 fcPlcffldMom;// 0xb8 offset in doc stream to the PLC of field positions in the main document.
- ULONG fcPlcffldMomGet() {
+ sal_uLong fcPlcffldMomGet() {
return SVBT32ToUInt32(fcPlcffldMom); }
SVBT16 cbPlcffldMom;// 0xbc
- USHORT cbPlcffldMomGet() {
+ sal_uInt16 cbPlcffldMomGet() {
return SVBT16ToShort(cbPlcffldMom); }
SVBT32 fcPlcffldHdr;// 0xbe offset in doc stream to the PLC of field positions in the header subdocument.
- ULONG fcPlcffldHdrGet() {
+ sal_uLong fcPlcffldHdrGet() {
return SVBT32ToUInt32(fcPlcffldHdr); }
SVBT16 cbPlcffldHdr;// 0xc2
- USHORT cbPlcffldHdrGet() {
+ sal_uInt16 cbPlcffldHdrGet() {
return SVBT16ToShort(cbPlcffldHdr); }
SVBT32 fcPlcffldFtn;// 0xc4 offset in doc stream to the PLC of field positions in the footnote subdocument.
- ULONG fcPlcffldFtnGet() {
+ sal_uLong fcPlcffldFtnGet() {
return SVBT32ToUInt32(fcPlcffldFtn); }
SVBT16 cbPlcffldFtn;// 0xc8
- USHORT cbPlcffldFtnGet() {
+ sal_uInt16 cbPlcffldFtnGet() {
return SVBT16ToShort(cbPlcffldFtn); }
SVBT32 fcPlcffldAtn;// 0xca offset in doc stream to the PLC of field positions in the annotation subdocument.
- ULONG fcPlcffldAtnGet() {
+ sal_uLong fcPlcffldAtnGet() {
return SVBT32ToUInt32(fcPlcffldAtn); }
SVBT16 cbPlcffldAtn;// 0xce
- USHORT cbPlcffldAtnGet() {
+ sal_uInt16 cbPlcffldAtnGet() {
return SVBT16ToShort(cbPlcffldAtn); }
SVBT32 fcPlcffldMcr;// 0xd0 offset in doc stream to the PLC of field positions in the macro subdocument.
- ULONG fcPlcffldMcrGet() {
+ sal_uLong fcPlcffldMcrGet() {
return SVBT32ToUInt32(fcPlcffldMcr); }
SVBT16 cbPlcffldMcr;// 0xd4
- USHORT cbPlcffldMcrGet() {
+ sal_uInt16 cbPlcffldMcrGet() {
return SVBT16ToShort(cbPlcffldMcr); }
SVBT32 fcSttbfbkmk;// 0xd6 offset in document stream of the STTBF that records bookmark names in the main document
- ULONG fcSttbfbkmkGet() {
+ sal_uLong fcSttbfbkmkGet() {
return SVBT32ToUInt32(fcSttbfbkmk); }
SVBT16 cbSttbfbkmk;// 0xda
- USHORT cbSttbfbkmkGet() {
+ sal_uInt16 cbSttbfbkmkGet() {
return SVBT16ToShort(cbSttbfbkmk); }
SVBT32 fcPlcfbkf;// 0xdc offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- ULONG fcPlcfbkfGet() {
+ sal_uLong fcPlcfbkfGet() {
return SVBT32ToUInt32(fcPlcfbkf); }
SVBT16 cbPlcfbkf;// 0xe0
- USHORT cbPlcfbkfGet() {
+ sal_uInt16 cbPlcfbkfGet() {
return SVBT16ToShort(cbPlcfbkf); }
SVBT32 fcPlcfbkl;// 0xe2 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- ULONG fcPlcfbklGet() {
+ sal_uLong fcPlcfbklGet() {
return SVBT32ToUInt32(fcPlcfbkl); }
SVBT16 cbPlcfbkl;// 0xe6 SVBT16
- USHORT cbPlcfbklGet() {
+ sal_uInt16 cbPlcfbklGet() {
return SVBT16ToShort(cbPlcfbkl); }
SVBT32 fcCmds;// 0xe8 FC
- ULONG fcCmdsGet() {
+ sal_uLong fcCmdsGet() {
return SVBT32ToUInt32(fcCmds); }
SVBT16 cbCmds;// 0xec
- USHORT cbCmdsGet() {
+ sal_uInt16 cbCmdsGet() {
return SVBT16ToShort(cbCmds); }
SVBT32 fcPlcmcr;// 0xee FC
- ULONG fcPlcmcrGet() {
+ sal_uLong fcPlcmcrGet() {
return SVBT32ToUInt32(fcPlcmcr); }
SVBT16 cbPlcmcr;// 0xf2
- USHORT cbPlcmcrGet() {
+ sal_uInt16 cbPlcmcrGet() {
return SVBT16ToShort(cbPlcmcr); }
SVBT32 fcSttbfmcr;// 0xf4 FC
- ULONG fcSttbfmcrGet() {
+ sal_uLong fcSttbfmcrGet() {
return SVBT32ToUInt32(fcSttbfmcr); }
SVBT16 cbSttbfmcr;// 0xf8
- USHORT cbSttbfmcrGet() {
+ sal_uInt16 cbSttbfmcrGet() {
return SVBT16ToShort(cbSttbfmcr); }
SVBT32 fcPrEnv;// 0xfa
- ULONG fcPrEnvGet() {
+ sal_uLong fcPrEnvGet() {
return SVBT32ToUInt32(fcPrEnv); }
SVBT16 cbPrEnv;// 0xfe
- USHORT cbPrEnvGet() {
+ sal_uInt16 cbPrEnvGet() {
return SVBT16ToShort(cbPrEnv); }
SVBT32 fcWss;// 0x100 file offset of Window Save State data structure. See WSS.
- ULONG fcWssGet() {
+ sal_uLong fcWssGet() {
return SVBT32ToUInt32(fcWss); }
SVBT16 cbWss;// 0x100 count of bytes of WSS. ==0 if unable to store the window state.
- USHORT cbWssGet() {
+ sal_uInt16 cbWssGet() {
return SVBT16ToShort(cbWss); }
SVBT32 fcDop;// 0x106 file offset of document property data structure.
- ULONG fcDopGet() {
+ sal_uLong fcDopGet() {
return SVBT32ToUInt32(fcDop); }
SVBT16 cbDop;// 0x10a count of bytes of document properties.
- USHORT cbDopGet() {
+ sal_uInt16 cbDopGet() {
return SVBT16ToShort(cbDop); }
SVBT32 fcSttbfAssoc;// 0x10c offset to STTBF of associated strings. See STTBFASSOC.
- ULONG fcSttbfAssocGet() {
+ sal_uLong fcSttbfAssocGet() {
return SVBT32ToUInt32(fcSttbfAssoc); }
SVBT16 cbSttbfAssoc;// 0x110
- USHORT cbSttbfAssocGet() {
+ sal_uInt16 cbSttbfAssocGet() {
return SVBT16ToShort(cbSttbfAssoc); }
SVBT32 fcClx;// 0x112 file offset of beginning of information for complex files.
- ULONG fcClxGet() {
+ sal_uLong fcClxGet() {
return SVBT32ToUInt32(fcClx); }
SVBT16 cbClx;// 0x116 count of bytes of complex file information. 0 if file is non-complex.
- USHORT cbClxGet() {
+ sal_uInt16 cbClxGet() {
return SVBT16ToShort(cbClx); }
SVBT32 fcPlcfpgdFtn;// 0x118 file offset of page descriptor PLC for footnote subdocument.
- ULONG fcPlcfpgdFtnGet() {
+ sal_uLong fcPlcfpgdFtnGet() {
return SVBT32ToUInt32(fcPlcfpgdFtn); }
SVBT16 cbPlcfpgdFtn;// 0x11C count of bytes of page descriptor PLC for footnote subdocument.
- USHORT cbPlcfpgdFtnGet() {
+ sal_uInt16 cbPlcfpgdFtnGet() {
return SVBT16ToShort(cbPlcfpgdFtn); }
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
SVBT32 fcSpare1;// 0x11e file offset of the name of the original file.
- ULONG fcSpare1Get() {
+ sal_uLong fcSpare1Get() {
return SVBT32ToUInt32(fcSpare1); }
SVBT16 cbSpare1;// 0x122 count of bytes of the name of the original file.
- USHORT cbSpare1Get() {
+ sal_uInt16 cbSpare1Get() {
return SVBT16ToShort(cbSpare1); }
SVBT32 fcSpare2;// 0x124 file offset of the name of the original file.
- ULONG fcSpare2Get() {
+ sal_uLong fcSpare2Get() {
return SVBT32ToUInt32(fcSpare2); }
SVBT16 cbSpare2;// 0x128 count of bytes of the name of the original file.
- USHORT cbSpare2Get() {
+ sal_uInt16 cbSpare2Get() {
return SVBT16ToShort(cbSpare2); }
SVBT32 fcSpare3;// 0x12a file offset of the name of the original file.
- ULONG fcSpare3Get() {
+ sal_uLong fcSpare3Get() {
return SVBT32ToUInt32(fcSpare3); }
SVBT16 cbSpare3;// 0x12e count of bytes of the name of the original file.
- USHORT cbSpare3Get() {
+ sal_uInt16 cbSpare3Get() {
return SVBT16ToShort(cbSpare3); }
SVBT32 fcSpare4;// 0x130 file offset of the name of the original file.
- ULONG fcSpare4Get() {
+ sal_uLong fcSpare4Get() {
return SVBT32ToUInt32(fcSpare4); }
SVBT16 cbSpare4;// 0x134 count of bytes of the name of the original file.
- USHORT cbSpare4Get() {
+ sal_uInt16 cbSpare4Get() {
return SVBT16ToShort(cbSpare4); }
SVBT16 cpnBteChp;// 0x18E count of CHPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBteChpGet() {
+ sal_uInt16 cpnBteChpGet() {
return SVBT16ToShort(cpnBteChp); }
// entries in the plcfbteChpx is less than this, the plcfbteChpx is incomplete.
SVBT16 cpnBtePap;// 0x190 count of PAPX FKPs recorded in file. In non-complex files if the number of
- USHORT cpnBtePapGet() {
+ sal_uInt16 cpnBtePapGet() {
return SVBT16ToShort(cpnBtePap); }
// entries in the plcfbtePapx is less than this, the plcfbtePapx is incomplete.
};
@@ -383,124 +383,124 @@ struct W1_FIB /////////////////////////////////////////////////////////
struct W1_DOP ///////////////////////////////////// Document Properties
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
// SVBT16 fFacingPages : 1;// 1 when facing pages should be printed
- BOOL fFacingPagesGet() {
+ sal_Bool fFacingPagesGet() {
return 0 != ((fFlagsGet() >> 0) & 1); }
// SVBT16 fWidowControl : 1;// 1 when widow control is in effect. 0 when widow control disabled.
- BOOL fWidowControlGet() {
+ sal_Bool fWidowControlGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
// SVBT16 : 3;// unused
// SVBT16 fpc : 2;// 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- USHORT fpcGet() {
- return (USHORT)((fFlagsGet() >> 5) & 3); }
+ sal_uInt16 fpcGet() {
+ return (sal_uInt16)((fFlagsGet() >> 5) & 3); }
// SVBT16 fWide : 1;// Landscape
- BOOL fWideGet() {
+ sal_Bool fWideGet() {
return 0 != ((fFlagsGet() >> 7) & 1); }
// SVBT16 grpfIhdt : 8;// 0 specification of document headers and footers. See explanation under Headers and Footers topic.
- USHORT grpfIhdtGet() {
- return (USHORT)((fFlagsGet() >> 8) & 0xff); }
+ sal_uInt16 grpfIhdtGet() {
+ return (sal_uInt16)((fFlagsGet() >> 8) & 0xff); }
SVBT16 fFtnFlags;
- USHORT fFtnFlagsGet() {
+ sal_uInt16 fFtnFlagsGet() {
return SVBT16ToShort(fFtnFlags); }
// SVBT16 fFtnRestart : 1;
- BOOL fFtnRestartGet() {
+ sal_Bool fFtnRestartGet() {
return 0 != ((fFtnFlagsGet() >> 0) & 1); }
// SVBT16 nFtn : 15;// 1 initial footnote number for document
- USHORT nFtnGet() {
- return (USHORT)((fFtnFlagsGet() >> 1) & 0x7fff); }
+ sal_uInt16 nFtnGet() {
+ return (sal_uInt16)((fFtnFlagsGet() >> 1) & 0x7fff); }
SVBT16 fRvsFlags;
- USHORT fRvsFlagsGet() {
+ sal_uInt16 fRvsFlagsGet() {
return SVBT16ToShort(fRvsFlags); }
// SVBT16 irmBar : 8;
- USHORT irmBarGet() {
- return (USHORT)((fRvsFlagsGet() >> 0) & 0xff); }
+ sal_uInt16 irmBarGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 0) & 0xff); }
// SVBT16 irmProps : 7;
- USHORT irmPropsGet() {
- return (USHORT)((fRvsFlagsGet() >> 8) & 0x7f); }
+ sal_uInt16 irmPropsGet() {
+ return (sal_uInt16)((fRvsFlagsGet() >> 8) & 0x7f); }
// SVBT16 fRevMarking : 1;// when 1, Word will mark revisions as the document is edited
- BOOL fRevMarkingGet() {
+ sal_Bool fRevMarkingGet() {
return 0 != ((fRvsFlagsGet() >> 15) & 1); }
SVBT16 fSveFlags;
- USHORT fSveFlagsGet() {
+ sal_uInt16 fSveFlagsGet() {
return SVBT16ToShort(fSveFlags); }
// SVBT16 fBackup : 1;// always make backup when document saved when 1.
- BOOL fBackupGet() {
+ sal_Bool fBackupGet() {
return 0 != ((fSveFlagsGet() >> 0) & 1); }
// SVBT16 fExactCWords : 1;
- BOOL fExactCWordsGet() {
+ sal_Bool fExactCWordsGet() {
return 0 != ((fSveFlagsGet() >> 1) & 1); }
// SVBT16 fPagHidden : 1;//
- BOOL fPagHiddenGet() {
+ sal_Bool fPagHiddenGet() {
return 0 != ((fSveFlagsGet() >> 2) & 1); }
// SVBT16 fPagResults : 1;
- BOOL fPagResultsGet() {
+ sal_Bool fPagResultsGet() {
return 0 != ((fSveFlagsGet() >> 3) & 1); }
// SVBT16 fLockAtn : 1;// when 1, annotations are locked for editing
- BOOL fLockAtnGet() {
+ sal_Bool fLockAtnGet() {
return 0 != ((fSveFlagsGet() >> 4) & 1); }
// SVBT16 fMirrorMargins : 1;// swap margins on left/right pages when 1.
- BOOL fMirrorMarginsGet() {
+ sal_Bool fMirrorMarginsGet() {
return 0 != ((fSveFlagsGet() >> 5) & 1); }
// SVBT16 : 10;// unused
SVBT16 fSpares;
- USHORT fSparesGet() {
+ sal_uInt16 fSparesGet() {
return SVBT16ToShort(fSpares); }
SVBT16 yaPage;
- USHORT yaPageGet() {
+ sal_uInt16 yaPageGet() {
return SVBT16ToShort(yaPage); }
SVBT16 xaPage;
- USHORT xaPageGet() {
+ sal_uInt16 xaPageGet() {
return SVBT16ToShort(xaPage); }
SVBT16 dyaTop;
- USHORT dyaTopGet() {
+ sal_uInt16 dyaTopGet() {
return SVBT16ToShort(dyaTop); }
SVBT16 dxaLeft;
- USHORT dxaLeftGet() {
+ sal_uInt16 dxaLeftGet() {
return SVBT16ToShort(dxaLeft); }
SVBT16 dyaBottom;
- USHORT dyaBottomGet() {
+ sal_uInt16 dyaBottomGet() {
return SVBT16ToShort(dyaBottom); }
SVBT16 dxaRight;
- USHORT dxaRightGet() {
+ sal_uInt16 dxaRightGet() {
return SVBT16ToShort(dxaRight); }
SVBT16 dxaGutter;
- USHORT dxaGutterGet() {
+ sal_uInt16 dxaGutterGet() {
return SVBT16ToShort(dxaGutter); }
SVBT16 dxaTab;// 720 twips default tab width
- USHORT dxaTabGet() {
+ sal_uInt16 dxaTabGet() {
return SVBT16ToShort(dxaTab); }
SVBT16 wSpare;//
- USHORT wSpareGet() {
+ sal_uInt16 wSpareGet() {
return SVBT16ToShort(wSpare); }
SVBT16 dxaHotZ;// width of hyphenation hot zone measured in twips
- USHORT dxaHotZGet() {
+ sal_uInt16 dxaHotZGet() {
return SVBT16ToShort(dxaHotZ); }
SVBT16 rgwSpare[2];// reserved
SVBT32 dttmCreated;// DTTM date and time document was created
- ULONG dttmCreatedGet() {
+ sal_uLong dttmCreatedGet() {
return SVBT32ToUInt32(dttmCreated); }
SVBT32 dttmRevised;// DTTM date and time document was last revised
- ULONG dttmRevisedGet() {
+ sal_uLong dttmRevisedGet() {
return SVBT32ToUInt32(dttmRevised); }
SVBT32 dttmLastPrint;// DTTM date and time document was last printed
- ULONG dttmLastPrintGet() {
+ sal_uLong dttmLastPrintGet() {
return SVBT32ToUInt32(dttmLastPrint); }
SVBT16 nRevision;// number of times document has been revised since its creation
- USHORT nRevisionGet() {
+ sal_uInt16 nRevisionGet() {
return SVBT16ToShort(nRevision); }
SVBT32 tmEdited;// time document was last edited
- ULONG tmEditedGet() {
+ sal_uLong tmEditedGet() {
return SVBT32ToUInt32(tmEdited); }
SVBT32 cWords;// count of words tallied by last Word Count execution
- ULONG cWordsGet() {
+ sal_uLong cWordsGet() {
return SVBT32ToUInt32(cWords); }
SVBT32 cCh;// count of characters tallied by last Word Count execution
- ULONG cChGet() {
+ sal_uLong cChGet() {
return SVBT32ToUInt32(cCh); }
SVBT16 cPg;// count of pages tallied by last Word Count execution
- USHORT cPgGet() {
+ sal_uInt16 cPgGet() {
return SVBT16ToShort(cPg); }
SVBT16 rgwSpareDocSum[2];
};
@@ -519,29 +519,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
W1_CHP() { memset( this, 0, sizeof( *this)); }
- USHORT fCharGet() { return SVBT16ToShort(fChar); }
- void fCharSet(USHORT n) { ShortToSVBT16(n, fChar); }
- BOOL fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
- void fBoldSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
- BOOL fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
- void fItalicSet(BOOL b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
- BOOL fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
- BOOL fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
- BOOL fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
- BOOL fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
- BOOL fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
- BOOL fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
- BOOL fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
- BOOL fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
- BOOL fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
- BOOL fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
- void fsFtcSet(BOOL b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
- BOOL fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
- void fsHpsSet(BOOL b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
- BOOL fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
- void fsKulSet(BOOL b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
- BOOL fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
- BOOL fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
+ sal_uInt16 fCharGet() { return SVBT16ToShort(fChar); }
+ void fCharSet(sal_uInt16 n) { ShortToSVBT16(n, fChar); }
+ sal_Bool fBoldGet() { return 0 != ((fCharGet() >> 0) & 1); }
+ void fBoldSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffe ) | ( b << 0 ) ); }
+ sal_Bool fItalicGet() { return 0 != ((fCharGet() >> 1) & 1); }
+ void fItalicSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xfffd ) | ( b << 1 ) ); }
+ sal_Bool fStrikeGet() { return 0 != ((fCharGet() >> 2) & 1); }
+ sal_Bool fOutlineGet() { return 0 != ((fCharGet() >> 3) & 1); }
+ sal_Bool fFldVanishGet() { return 0 != ((fCharGet() >> 4) & 1); }
+ sal_Bool fSmallCapsGet() { return 0 != ((fCharGet() >> 5) & 1); }
+ sal_Bool fCapsGet() { return 0 != ((fCharGet() >> 6) & 1); }
+ sal_Bool fVanishGet() { return 0 != ((fCharGet() >> 7) & 1); }
+ sal_Bool fRMarkGet() { return 0 != ((fCharGet() >> 8) & 1); }
+ sal_Bool fSpecGet() { return 0 != ((fCharGet() >> 9) & 1); }
+ sal_Bool fsIcoGet() { return 0 != ((fCharGet() >> 10) & 1); }
+ sal_Bool fsFtcGet() { return 0 != ((fCharGet() >> 11) & 1); }
+ void fsFtcSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xf7ff ) | ( b << 11 ) ); }
+ sal_Bool fsHpsGet() { return 0 != ((fCharGet() >> 12) & 1); }
+ void fsHpsSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xefff ) | ( b << 12 ) ); }
+ sal_Bool fsKulGet() { return 0 != ((fCharGet() >> 13) & 1); }
+ void fsKulSet(sal_Bool b) { fCharSet( ( fCharGet() & 0xdfff ) | ( b << 13 ) ); }
+ sal_Bool fsPosGet() { return 0 != ((fCharGet() >> 14) & 1); }
+ sal_Bool fsSpaceGet() { return 0 != ((fCharGet() >> 15) & 1); }
// SVBT16 fBold :1;// 1 == opposite boldness of style
// SVBT16 fItalic :1;// 1 == opposite of style
// SVBT16 fStrike :1;// 1 == opposite of style
@@ -559,29 +559,29 @@ struct W1_CHP /////////////////////////////////////////////////////////
// SVBT16 fsPos :1;// 1 == Char position (hpsPos) different to style
// SVBT16 fsSpace :1;// 1 == Char Spacing (qpsSpace) different to style
- USHORT ftcGet() { return SVBT16ToShort(ftc); }
- void ftcSet(USHORT n) { ShortToSVBT16(n, ftc); }
- void hpsSet(BYTE n) { ByteToSVBT8(n, hps); }
- BYTE hpsGet() { return SVBT8ToByte(hps); }
-
- BYTE hpsPosGet() { return SVBT8ToByte(hpsPos); }
- USHORT fTextGet() { return SVBT16ToShort(fText); }
- void fTextSet(USHORT n) { ShortToSVBT16(n, fText); }
- USHORT qpsSpaceGet() { return (USHORT)((fTextGet() >> 0) & 0x3f); }
- USHORT wSpare2Get() { return (USHORT)((fTextGet() >> 6) & 3); }
- USHORT icoGet() { return (USHORT)((fTextGet() >> 8) & 0xf); }
- USHORT kulGet() { return (USHORT)((fTextGet() >> 12) & 7); }
- void kulSet(USHORT n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
- BOOL fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
+ sal_uInt16 ftcGet() { return SVBT16ToShort(ftc); }
+ void ftcSet(sal_uInt16 n) { ShortToSVBT16(n, ftc); }
+ void hpsSet(sal_uInt8 n) { ByteToSVBT8(n, hps); }
+ sal_uInt8 hpsGet() { return SVBT8ToByte(hps); }
+
+ sal_uInt8 hpsPosGet() { return SVBT8ToByte(hpsPos); }
+ sal_uInt16 fTextGet() { return SVBT16ToShort(fText); }
+ void fTextSet(sal_uInt16 n) { ShortToSVBT16(n, fText); }
+ sal_uInt16 qpsSpaceGet() { return (sal_uInt16)((fTextGet() >> 0) & 0x3f); }
+ sal_uInt16 wSpare2Get() { return (sal_uInt16)((fTextGet() >> 6) & 3); }
+ sal_uInt16 icoGet() { return (sal_uInt16)((fTextGet() >> 8) & 0xf); }
+ sal_uInt16 kulGet() { return (sal_uInt16)((fTextGet() >> 12) & 7); }
+ void kulSet(sal_uInt16 n) { fTextSet( ( fTextGet() & 0x8fff ) | ( ( n & 7 ) << 12 ) ); }
+ sal_Bool fSysVanishGet() { return 0 != ((fTextGet() >> 15) & 1); }
// SVBT16 qpsSpace :6;// Char Spacing, -7 .. 56; 57 = -7, 63 = -1
// SVBT16 wSpare2 : 2;// reserved
// SVBT16 ico :4;// color of Text: 0=black, 1=blue, 2=cyan, 3=green, 4=magenta, 5=red, 6=yellow, 7=white
// SVBT16 kul: 3;// Underline code: 0=none, 1=single, 2=by word, 3=double, 4=dotted
// SVBT16 fSysVanish: 1;// used internally
- ULONG fcPicGet() { return SVBT32ToUInt32(fcPic); }
- USHORT fnPicGet() { return SVBT8ToByte(fnPic); }
- USHORT hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
+ sal_uLong fcPicGet() { return SVBT32ToUInt32(fcPic); }
+ sal_uInt16 fnPicGet() { return SVBT8ToByte(fnPic); }
+ sal_uInt16 hpsLargeChpGet() { return SVBT16ToShort(hpsLargeChp); }
void Out(Ww1Shell&, Ww1Manager&);
};
@@ -589,157 +589,157 @@ struct W1_CHP /////////////////////////////////////////////////////////
struct W1_FFN ///////////////////////////////////////// Font Descriptor
{
SVBT8 cbFfnM1;// 0x0 total length of FFN - 1.
- USHORT cbFfnM1Get() {
+ sal_uInt16 cbFfnM1Get() {
return SVBT8ToByte(cbFfnM1); }
SVBT8 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT8ToByte(fFlags); }
// SVBT8 prg : 2;// 0x1:03 pitch request
- USHORT prgGet() {
- return (USHORT)((fFlagsGet() >> 0) & 3); }
+ sal_uInt16 prgGet() {
+ return (sal_uInt16)((fFlagsGet() >> 0) & 3); }
// SVBT8 fTrueType : 1;// 0x1:04 when 1, font is a TrueType font
- BOOL fTrueTypeGet() {
+ sal_Bool fTrueTypeGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
// SVBT8 : 1;// 0x1:08 reserved
// SVBT8 ff : 3;// 0x1:70 font family id
- USHORT ffGet() {
- return (USHORT)((fFlagsGet() >> 4) & 7); }
+ sal_uInt16 ffGet() {
+ return (sal_uInt16)((fFlagsGet() >> 4) & 7); }
// SVBT8 : 1;// 0x1:80 reserved
- BYTE szFfn[65];// 0x6 zero terminated string that records name of font.
+ sal_uInt8 szFfn[65];// 0x6 zero terminated string that records name of font.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
// Possibly followed by a second sz which records the name of an
// alternate font to use if the first named font does not exist
// on this system. Maximal size of szFfn is 65 characters.
- BYTE* szFfnGet() { return szFfn; }
+ sal_uInt8* szFfnGet() { return szFfn; }
};
struct W1_PHE /////////////////////////////////////// Paragraph Height
{
SVBT16 fFlags;
- USHORT fFlagsGet() {
+ sal_uInt16 fFlagsGet() {
return SVBT16ToShort(fFlags); }
- BOOL fSpareGet() {
+ sal_Bool fSpareGet() {
return 0 != (fFlagsGet() & 1); }
- BOOL fUnkGet() {
+ sal_Bool fUnkGet() {
return 0 != ((fFlagsGet() >> 1) & 1); }
- BOOL fDiffLinesGet() {
+ sal_Bool fDiffLinesGet() {
return 0 != ((fFlagsGet() >> 2) & 1); }
- BYTE clMacGet() {
+ sal_uInt8 clMacGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((fFlagsGet() >> 8) & 0xff); }
SVBT16 dxaCol;
- USHORT dxaColGet() {
+ sal_uInt16 dxaColGet() {
return SVBT16ToShort(dxaCol); }
SVBT16 xxx; // beachte die dreifachnutzung.... siehe doc.
- USHORT dylHeightGet() {
+ sal_uInt16 dylHeightGet() {
return SVBT16ToShort(xxx); }
- USHORT dylLineGet() {
+ sal_uInt16 dylLineGet() {
return SVBT16ToShort(xxx); }
- USHORT fStyleDirtyGet() {
+ sal_uInt16 fStyleDirtyGet() {
return SVBT16ToShort(xxx); }
};
struct W1_PAPX ///////////////////////// Paragraph Property Difference
{
SVBT8 stc;
- BYTE stcGet() {
+ sal_uInt8 stcGet() {
return SVBT8ToByte(stc); }
W1_PHE phe;
- BYTE grpprl[1];
- BYTE* grpprlGet() {
+ sal_uInt8 grpprl[1];
+ sal_uInt8* grpprlGet() {
return grpprl; }
};
struct W1_BRC //////////////////////////////////////////// Border Code
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
// SVBT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5,
// this field is the width of a single line of border
// in units of 0.75 points Must be nonzero when brcType
// is nonzero. 6 == dotted, 7 == dashed.
- BYTE dxpLineWidthGet() {
+ sal_uInt8 dxpLineWidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
// SVBT16 brcType : 2;// 0018 border type code: 0 == none, 1 == single, 2 == thick,
// 3 == double
- BYTE brcTypeGet() {
+ sal_uInt8 brcTypeGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0003); }
// SVBT16 fShadow : 1;// 0020 when 1, border is drawn with shadow. Must be 0
// when BRC is a substructure of the TC
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 5) & 0x0001); }
// SVBT16 ico : 5;// 07C0 color code (see chp.ico)
- BYTE icoGet() {
+ sal_uInt8 icoGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x001f); }
// SVBT16 dxpSpace : 5;// F800 width of space to maintain between border and
// text within border. Must be 0 when BRC is a
// substructure of the TC. Stored in points for Windows.
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 11) & 0x001f); }
};
struct W1_BRC10 ///////////////////////////////// Border Code Word 1.0
{
SVBT16 aBits;
- USHORT aBitsGet() {
+ sal_uInt16 aBitsGet() {
return SVBT16ToShort(aBits); }
- BYTE dxpLine2WidthGet() {
+ sal_uInt8 dxpLine2WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 0) & 0x0007); }
- BYTE dxpSpaceBetweenGet() {
+ sal_uInt8 dxpSpaceBetweenGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 3) & 0x0007); }
- BYTE dxpLine1WidthGet() {
+ sal_uInt8 dxpLine1WidthGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 6) & 0x0007); }
- BYTE dxpSpaceGet() {
+ sal_uInt8 dxpSpaceGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 9) & 0x001f); }
- BYTE fShadowGet() {
+ sal_uInt8 fShadowGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 14) & 0x0001); }
- BYTE fSpareGet() {
+ sal_uInt8 fSpareGet() {
return sal::static_int_cast< sal_uInt8, sal_uInt16 >((aBitsGet() >> 15) & 0x0001); }
};
struct W1_FLD //////////////////////////////////////// FieldDescriptor
{
SVBT8 ch; // boundary-type (begin(19), separator (20), end (21))
- BYTE chGet() {
+ sal_uInt8 chGet() {
return SVBT8ToByte(ch); }
SVBT8 flt; // field type / flags
- BYTE fltGet() {
+ sal_uInt8 fltGet() {
return SVBT8ToByte(flt); }
// variant, when ch==21:
- BOOL fDifferGet() {
+ sal_Bool fDifferGet() {
return (fltGet() >> 0) & 1; }
- BOOL fResultDirtyGet() {
+ sal_Bool fResultDirtyGet() {
return (fltGet() >> 2) & 1; }
- BOOL ResultEditedGet() {
+ sal_Bool ResultEditedGet() {
return (fltGet() >> 3) & 1; }
- BOOL fLockedGet() {
+ sal_Bool fLockedGet() {
return (fltGet() >> 4) & 1; }
- BOOL fPrivateResultGet() {
+ sal_Bool fPrivateResultGet() {
return (fltGet() >> 5) & 1; }
- BOOL fNestedGet() {
+ sal_Bool fNestedGet() {
return (fltGet() >> 6) & 1; }
};
struct W1_PIC /////////////////////////////////////// PictureStructure
{
SVBT32 lcb;// 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- ULONG lcbGet() {
+ sal_uLong lcbGet() {
return SVBT32ToUInt32(lcb); }
SVBT16 cbHeader;// 0x4 number of bytes in the PIC (to allow for future expansion).
- USHORT cbHeaderGet() {
+ sal_uInt16 cbHeaderGet() {
return SVBT16ToShort(cbHeader); }
struct MFP {
SVBT16 mm;// 0x6 int
- USHORT mmGet() {
+ sal_uInt16 mmGet() {
return SVBT16ToShort(mm); }
SVBT16 xExt;// 0x8 int
- USHORT xExtGet() {
+ sal_uInt16 xExtGet() {
return SVBT16ToShort(xExt); }
SVBT16 yExt;// 0xa int
- USHORT yExtGet() {
+ sal_uInt16 yExtGet() {
return SVBT16ToShort(yExt); }
SVBT16 hMF;// 0xc int
- USHORT hMFGet() {
+ sal_uInt16 hMFGet() {
return SVBT16ToShort(hMF); }
} mfp;
union W1_MFP_BMP {
@@ -747,80 +747,80 @@ struct W1_PIC /////////////////////////////////////// PictureStructure
SVBT8 rcWinMF[14];// 0xe rc (rectangle - 8 bytes) rect for window origin and extents when metafile is stored -- ignored if 0
} MFP_BMP;
SVBT16 dxaGoal;// 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- USHORT dxaGoalGet() {
+ sal_uInt16 dxaGoalGet() {
return SVBT16ToShort(dxaGoal); }
SVBT16 dyaGoal;// 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- USHORT dyaGoalGet() {
+ sal_uInt16 dyaGoalGet() {
return SVBT16ToShort(dyaGoal); }
SVBT16 mx;// 0x20 horizontal scaling factor supplied by user in .1% units.
- USHORT mxGet() {
+ sal_uInt16 mxGet() {
return SVBT16ToShort(mx); }
SVBT16 my;// 0x22 vertical scaling factor supplied by user in .1% units.
- USHORT myGet() {
+ sal_uInt16 myGet() {
return SVBT16ToShort(my); }
SVBT16 dxaCropLeft;// 0x24 the amount the picture has been cropped on the left in twips.
- USHORT dxaCropLeftGet() {
+ sal_uInt16 dxaCropLeftGet() {
return SVBT16ToShort(dxaCropLeft); }
SVBT16 dyaCropTop;// 0x26 the amount the picture has been cropped on the top in twips.
- USHORT dyaCropTopGet() {
+ sal_uInt16 dyaCropTopGet() {
return SVBT16ToShort(dyaCropTop); }
SVBT16 dxaCropRight;// 0x28 the amount the picture has been cropped on the right in twips.
- USHORT dxaCropRightGet() {
+ sal_uInt16 dxaCropRightGet() {
return SVBT16ToShort(dxaCropRight); }
SVBT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- USHORT dyaCropBottomGet() {
+ sal_uInt16 dyaCropBottomGet() {
return SVBT16ToShort(dyaCropBottom); }
SVBT16 flags;
- USHORT flagsGet() {
+ sal_uInt16 flagsGet() {
return SVBT16ToShort(flags); }
// brcl : 4;// 000F Obsolete, superseded by brcTop, etc. In
- BYTE brclGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >(flagsGet() & 0xf); }
+ sal_uInt8 brclGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >(flagsGet() & 0xf); }
// fFrameEmpty : 1;// 0010 picture consists of a single frame
- BOOL fFrameEmptyGet() {
- return sal::static_int_cast< BYTE, sal_uInt16 >((flagsGet() >> 4) & 1); }
+ sal_Bool fFrameEmptyGet() {
+ return sal::static_int_cast< sal_uInt8, sal_uInt16 >((flagsGet() >> 4) & 1); }
// win6 stuff:
// fBitmap : 1;// 0020 ==1, when picture is just a bitmap
-// BOOL fBitmapGet() {
+// sal_Bool fBitmapGet() {
// return (flagsGet() >> 5) & 1; }
// fDrawHatch : 1;// 0040 ==1, when picture is an active OLE object
-// BOOL fDrawHatchGet() {
+// sal_Bool fDrawHatchGet() {
// return (flagsGet() >> 6) & 1; }
// fError : 1;// 0080 ==1, when picture is just an error message
-// BOOL fErrorGet() {
+// sal_Bool fErrorGet() {
// return (flagsGet() >> 7) & 1; }
// bpp : 8;// FF00 bits per pixel, 0 = unknown
-// BYTE bppGet() {
+// sal_uInt8 bppGet() {
// return (flagsGet() >> 8) & 0xff; }
// SVBT16 rgbrc[4];
-// USHORT rgbrcGet(USHORT nIndex) {
+// sal_uInt16 rgbrcGet(sal_uInt16 nIndex) {
// return SVBT16ToShort(rgbrc[nIndex]); }
// W1_BRC brcTop;// 0x2e specification for border above picture
// W1_BRC brcLeft;// 0x30 specification for border to the left
// W1_BRC brcBottom;// 0x32 specification for border below picture
// W1_BRC brcRight;// 0x34 specification for border to the right
// SVBT16 dxaOrigin;// 0x36 horizontal offset of hand annotation origin
-// USHORT dxaOriginGet() {
+// sal_uInt16 dxaOriginGet() {
// return SVBT16ToShort(dxaOrigin); }
// SVBT16 dyaOrigin;// 0x38 vertical offset of hand annotation origin
-// USHORT dyaOriginGet() {
+// sal_uInt16 dyaOriginGet() {
// return SVBT16ToShort(dyaOrigin); }
SVBT8 rgb;// 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
- BYTE* rgbGet() {
+ sal_uInt8* rgbGet() {
return rgb; }
};
struct W1_TBD /////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
// SVBT8 jc : 3;// 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
- BYTE jcGet() {
+ sal_uInt8 jcGet() {
return aBits1Get() & 0x07; }
// SVBT8 tlc : 3;// 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
- BYTE tlcGet() {
+ sal_uInt8 tlcGet() {
return (aBits1Get() >> 3 ) & 0x07; }
// * int :2 C0 reserved
};
@@ -828,11 +828,11 @@ struct W1_TBD /////////////////////////////////////////////////////////
struct W1_TC //////////////////////////////////////////////////////////
{
SVBT8 aBits1;
- BYTE aBits1Get() {
+ sal_uInt8 aBits1Get() {
return SVBT8ToByte(aBits1); }
- BYTE fFirstMergedGet() {
+ sal_uInt8 fFirstMergedGet() {
return aBits1Get() & 0x01; }
- BYTE fMergedGet() {
+ sal_uInt8 fMergedGet() {
return (aBits1Get() >> 1 ) & 0x01; }
SVBT8 aBits2;
// SVBT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
diff --git a/sw/source/filter/ww8/README-rtf.txt b/sw/source/filter/ww8/README-rtf.txt
index 661813abc95a..6acddaa61eee 100644
--- a/sw/source/filter/ww8/README-rtf.txt
+++ b/sw/source/filter/ww8/README-rtf.txt
@@ -35,7 +35,7 @@ Table of Contents
---------------------------------------------------------------------
-1. Introduction
+1.�Introduction
---------------------------------------------------------------------
@@ -45,7 +45,7 @@ this way much less code can achieve the same set of features,
reducing the amount of duplicated code.
-1.1. Terminology
+1.1.�Terminology
--------------
@@ -56,7 +56,7 @@ reducing the amount of duplicated code.
to the old built-in one.
-1.2. General
+1.2.�General
--------------
@@ -72,7 +72,7 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-2. List if fixed bugs
+2.�List if fixed bugs
---------------------------------------------------------------------
@@ -101,12 +101,12 @@ the bug will pop up less frequently.
---------------------------------------------------------------------
-3. List of new features
+3.�List of new features
---------------------------------------------------------------------
-3.1. Nested tables
+3.1.�Nested tables
--------------
@@ -114,7 +114,7 @@ This was new in Word2000 and it?s now supported by RtfExport (MSO OK,
OOo KO)
-3.2. Character properties
+3.2.�Character properties
--------------
@@ -125,7 +125,7 @@ The followings are now supported:
* pair kerning (MSO OK, OOo OK)
-3.3. Sections
+3.3.�Sections
--------------
@@ -141,7 +141,7 @@ RtfExport writes:
* line numbering (MSO OK, OOo KO)
-3.4. Graphics
+3.4.�Graphics
--------------
@@ -150,7 +150,7 @@ and OOo can display graphics from the output document, but Wordpad as
well.
-3.5. Bookmarks
+3.5.�Bookmarks
--------------
@@ -160,7 +160,7 @@ the result), this now works as expected. (MSO OK - the importer
previously autocorrected this as well, OO OK)
-3.6. Fields
+3.6.�Fields
--------------
@@ -169,7 +169,7 @@ previously autocorrected this as well, OO OK)
* Postit comments are now exported. (MSO OK, OOo KO)
-3.7. Drawing
+3.7.�Drawing
--------------
@@ -184,7 +184,7 @@ implemented:
(MSO OK, OOo KO)
-3.8. Form fields
+3.8.�Form fields
--------------
@@ -197,7 +197,7 @@ All types supported by the RTF format are exported, namely:
(MSO OK, OOo KO)
-3.9. OLE objects
+3.9.�OLE objects
--------------
@@ -210,7 +210,7 @@ object, too. (MSO OK, OOo KO)
---------------------------------------------------------------------
-4. Changes in the source code outside RTF
+4.�Changes in the source code outside RTF
---------------------------------------------------------------------
@@ -224,3 +224,4 @@ not change the output of other filters from a user?s point of view.
* wwFontHelper::InitFontTable can really load all fonts
* An obvious typo in WW8AttributeOutput::CharTwoLines has been
fixed
+
diff --git a/sw/source/filter/ww8/WW8FFData.cxx b/sw/source/filter/ww8/WW8FFData.cxx
index 6d2f1e8d793b..65fa2b6b6cd7 100644
--- a/sw/source/filter/ww8/WW8FFData.cxx
+++ b/sw/source/filter/ww8/WW8FFData.cxx
@@ -89,7 +89,7 @@ void WW8FFData::WriteOUString(SvStream * pDataStrm, const ::rtl::OUString & rStr
void WW8FFData::Write(SvStream * pDataStrm)
{
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
static const sal_uInt8 aHeader[] =
{
diff --git a/sw/source/filter/ww8/WW8Sttbf.cxx b/sw/source/filter/ww8/WW8Sttbf.cxx
index 07271945430a..3b411a9b4cc9 100644
--- a/sw/source/filter/ww8/WW8Sttbf.cxx
+++ b/sw/source/filter/ww8/WW8Sttbf.cxx
@@ -42,7 +42,7 @@ namespace ww8
{
rSt.Seek(nPos);
- mp_data.reset(new BYTE[nSize]);
+ mp_data.reset(new sal_uInt8[nSize]);
rSt.Read(mp_data.get(), nSize);
}
diff --git a/sw/source/filter/ww8/WW8Sttbf.hxx b/sw/source/filter/ww8/WW8Sttbf.hxx
index 0741a221a248..f4c2e6b08bf6 100644
--- a/sw/source/filter/ww8/WW8Sttbf.hxx
+++ b/sw/source/filter/ww8/WW8Sttbf.hxx
@@ -36,7 +36,7 @@
namespace ww8
{
- typedef boost::shared_array<BYTE> DataArray_t;
+ typedef boost::shared_array<sal_uInt8> DataArray_t;
class WW8Struct : public ::sw::ExternalData
{
@@ -73,7 +73,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
ExtrasVector_t m_Extras;
public:
- WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize);
+ WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize);
virtual ~WW8Sttb();
sal_uInt32 getCount() const;
@@ -94,7 +94,7 @@ typedef ::std::vector<rtl::OUString> StringVector_t;
};
template <class T>
- WW8Sttb<T>::WW8Sttb(SvStream& rSt, INT32 nPos, sal_uInt32 nSize)
+ WW8Sttb<T>::WW8Sttb(SvStream& rSt, sal_Int32 nPos, sal_uInt32 nSize)
: WW8Struct(rSt, nPos, nSize), bDoubleByteCharacters(false)
{
sal_uInt32 nOffset = 0;
diff --git a/sw/source/filter/ww8/WW8TableInfo.cxx b/sw/source/filter/ww8/WW8TableInfo.cxx
index ce82774132c9..665a73f2721f 100644
--- a/sw/source/filter/ww8/WW8TableInfo.cxx
+++ b/sw/source/filter/ww8/WW8TableInfo.cxx
@@ -659,7 +659,7 @@ void WW8TableInfo::processSwTable(const SwTable * pTable)
{
const SwTableLines & rLines = pTable->GetTabLines();
- for (USHORT n = 0; n < rLines.Count(); n++)
+ for (sal_uInt16 n = 0; n < rLines.Count(); n++)
{
const SwTableLine * pLine = rLines[n];
@@ -695,7 +695,7 @@ WW8TableInfo::processTableLine(const SwTable * pTable,
WW8TableNodeInfo::Pointer_t pTextNodeInfo;
- for (USHORT n = 0; n < rBoxes.Count(); n++)
+ for (sal_uInt16 n = 0; n < rBoxes.Count(); n++)
{
const SwTableBox * pBox = rBoxes[n];
@@ -732,7 +732,7 @@ WW8TableInfo::processTableBoxLines(const SwTableBox * pBox,
const SwTableLine * pLine = rLines[n];
const SwTableBoxes & rBoxes = pLine->GetTabBoxes();
- for (USHORT nBox = 0; nBox < rBoxes.Count(); nBox++)
+ for (sal_uInt16 nBox = 0; nBox < rBoxes.Count(); nBox++)
pNodeInfo = processTableBoxLines(rBoxes[nBox], pTable, pBoxToSet, nRow, nCell, nDepth);
}
}
diff --git a/sw/source/filter/ww8/attributeoutputbase.hxx b/sw/source/filter/ww8/attributeoutputbase.hxx
index d31b66bd450e..25fc96566def 100644
--- a/sw/source/filter/ww8/attributeoutputbase.hxx
+++ b/sw/source/filter/ww8/attributeoutputbase.hxx
@@ -133,8 +133,8 @@ class MSWordExportBase;
namespace sw { class Frame; }
namespace msword {
- const BYTE ColumnBreak = 0xE;
- const BYTE PageBreak = 0xC;
+ const sal_uInt8 ColumnBreak = 0xE;
+ const sal_uInt8 PageBreak = 0xC;
}
class AttributeOutputBase
@@ -202,7 +202,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline ) = 0;
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner ) = 0;
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -210,7 +210,7 @@ public:
virtual void OutputFKP() {}
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle ) = 0;
+ virtual void ParagraphStyle( sal_uInt16 nStyle ) = 0;
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo ) = 0;
@@ -244,27 +244,27 @@ public:
virtual void StartStyles() = 0;
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles ) = 0;
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles ) = 0;
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle ) = 0;
+ virtual void DefaultStyle( sal_uInt16 nStyle ) = 0;
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate ) = 0;
/// End of a style in the styles table.
virtual void EndStyle() = 0;
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle ) = 0;
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle ) = 0;
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp ) = 0;
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& rNFmt, const SwFmt& rFmt ) = 0;
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -272,7 +272,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL ) = 0;
/// Start of the section properties.
virtual void StartSection() = 0;
@@ -284,7 +284,7 @@ public:
virtual void SectionFormProtection( bool bProtected ) = 0;
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo ) = 0;
/// Has different headers/footers for the title page.
virtual void SectionTitlePage() = 0;
@@ -298,30 +298,30 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber ) = 0;
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber ) = 0;
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode ) = 0;
+ virtual void SectionType( sal_uInt8 nBreakCode ) = 0;
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE /*nHeadFootFlags*/ ) {}
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 /*nHeadFootFlags*/ ) {}
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule ) = 0;
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule ) = 0;
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT /*nId*/ ) {}
+ virtual void StartAbstractNumbering( sal_uInt16 /*nId*/ ) {}
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering() {}
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -534,7 +534,7 @@ protected:
/// Sfx item RES_COL
void FormatColumns( const SwFmtCol& );
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize ) = 0;
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& ) = 0;
@@ -575,7 +575,7 @@ public:
void OutputItem( const SfxPoolItem& rHt );
/// Use OutputItem() on an item set - for styles.
- void OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault );
+ void OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault );
/// Output frames.
void OutputFlyFrame( const sw::Frame& rFmt );
diff --git a/sw/source/filter/ww8/docxattributeoutput.cxx b/sw/source/filter/ww8/docxattributeoutput.cxx
index 4d3aba513a19..443483f36c59 100644
--- a/sw/source/filter/ww8/docxattributeoutput.cxx
+++ b/sw/source/filter/ww8/docxattributeoutput.cxx
@@ -41,7 +41,7 @@
#include "charfmt.hxx"
#include "breakit.hxx"
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/utils.hxx>
#include <oox/export/vmlexport.hxx>
@@ -146,6 +146,7 @@ using rtl::OUString;
using rtl::OUStringBuffer;
using rtl::OUStringToOString;
+using namespace oox;
using namespace docx;
using namespace sax_fastparser;
using namespace nsSwDocInfoSubType;
@@ -307,8 +308,8 @@ void DocxAttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pT
const SwFrmFmt& rFrmFmt = m_pParentFrame->GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
@@ -330,7 +331,7 @@ void DocxAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointe
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
// HACK
// msoffice seems to have an internal limitation of 63 columns for tables
// and refuses to load .docx with more, even though the spec seems to allow that;
@@ -596,7 +597,7 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Output the bookmark
- USHORT nId = m_nNextMarkId++;
+ sal_uInt16 nId = m_nNextMarkId++;
m_rOpenedMarksIds[rName] = nId;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkStart,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
@@ -612,10 +613,10 @@ void DocxAttributeOutput::DoWriteBookmarks()
const OString& rName = *it;
// Get the id of the bookmark
- std::map< OString, USHORT >::iterator pPos = m_rOpenedMarksIds.find( rName );
+ std::map< OString, sal_uInt16 >::iterator pPos = m_rOpenedMarksIds.find( rName );
if ( pPos != m_rOpenedMarksIds.end( ) )
{
- USHORT nId = ( *pPos ).second;
+ sal_uInt16 nId = ( *pPos ).second;
m_pSerializer->singleElementNS( XML_w, XML_bookmarkEnd,
FSNS( XML_w, XML_id ), OString::valueOf( sal_Int32( nId ) ).getStr( ),
FSEND );
@@ -674,7 +675,7 @@ void DocxAttributeOutput::StartField_Impl( FieldInfos& rInfos, sal_Bool bWriteRu
if ( rInfos.pField && rInfos.eType == ww::eUNKNOWN )
{
// Expand unsupported fields
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
}
else if ( rInfos.eType != ww::eNONE ) // HYPERLINK fields are just commands
{
@@ -788,7 +789,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
m_pSerializer->startElementNS( XML_w, XML_r, FSEND );
// Find another way for hyperlinks
- RunText( rInfos.pField->GetCntnt() );
+ RunText( rInfos.pField->GetFieldName() );
m_pSerializer->endElementNS( XML_w, XML_r );
}
@@ -815,7 +816,7 @@ void DocxAttributeOutput::EndField_Impl( FieldInfos& rInfos )
// should be visible
if ( rInfos.pField )
{
- USHORT nSubType = rInfos.pField->GetSubType( );
+ sal_uInt16 nSubType = rInfos.pField->GetSubType( );
bool bIsSetField = rInfos.pField->GetTyp( )->Which( ) == RES_SETEXPFLD;
bool bShowRef = ( !bIsSetField || ( nSubType & nsSwExtendedSubType::SUB_INVISIBLE ) ) ? false : true;
@@ -1090,7 +1091,7 @@ void DocxAttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen nPos, co
StartRunProperties( );
SwWW8AttrIter aAttrIt( m_rExport, rNode );
aAttrIt.OutAttr( nPos, true );
- USHORT nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rRuby.GetTxtRuby()->GetCharFmt() );
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
m_pSerializer->singleElementNS( XML_w, XML_rStyle,
@@ -1314,12 +1315,12 @@ void DocxAttributeOutput::EndRedline()
m_pRedlineData = NULL;
}
-void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
+void DocxAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t )
{
- OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle )\n" );
+ OSL_TRACE( "TODO DocxAttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle )\n" );
}
-void DocxAttributeOutput::ParagraphStyle( USHORT nStyle )
+void DocxAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OString aStyleId( "style" );
aStyleId += OString::valueOf( sal_Int32( nStyle ) );
@@ -1347,13 +1348,13 @@ static OString impl_ConvertColor( const Color &rColor )
return color;
}
-static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, USHORT nDist )
+static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, const SvxBorderLine* pBorderLine, sal_uInt16 nDist )
{
FastAttributeList* pAttr = pSerializer->createAttrList();
- USHORT inW = pBorderLine->GetInWidth();
- USHORT outW = pBorderLine->GetOutWidth();
- USHORT nWidth = inW + outW;
+ sal_uInt16 inW = pBorderLine->GetInWidth();
+ sal_uInt16 outW = pBorderLine->GetOutWidth();
+ sal_uInt16 nWidth = inW + outW;
// Compute val attribute value
// Can be one of:
@@ -1397,8 +1398,8 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
// The unit is the 8th of point
nWidth = sal_Int32( nWidth / 2.5 );
- USHORT nMinWidth = 2;
- USHORT nMaxWidth = 96;
+ sal_uInt16 nMinWidth = 2;
+ sal_uInt16 nMaxWidth = 96;
if ( nWidth > nMaxWidth )
nWidth = nMaxWidth;
@@ -1420,7 +1421,7 @@ static void impl_borderLine( FSHelperPtr pSerializer, sal_Int32 elementToken, co
static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, bool bUseStartEnd = false )
{
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1432,7 +1433,7 @@ static void impl_pageBorders( FSHelperPtr pSerializer, const SvxBoxItem& rBox, b
XML_bottom,
bUseStartEnd ? XML_end : XML_right
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -1461,7 +1462,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
SwWriteTableRow *pRow = aRows[ pTableTextNodeInfoInner->getRow( ) ];
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
- USHORT nColSpan = pCell->GetColSpan();
+ sal_uInt16 nColSpan = pCell->GetColSpan();
if ( nColSpan > 1 )
m_pSerializer->singleElementNS( XML_w, XML_gridSpan,
FSNS( XML_w, XML_val ), OString::valueOf( sal_Int32( nColSpan ) ).getStr(),
@@ -1493,7 +1494,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
// Cell margins
m_pSerializer->startElementNS( XML_w, XML_tcMar, FSEND );
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -1505,7 +1506,7 @@ void DocxAttributeOutput::TableCellProperties( ww8::WW8TableNodeInfoInner::Point
XML_bottom,
bEcma ? XML_right : XML_end
};
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
sal_Int32 nDist = sal_Int32( rBox.GetDistance( *pBrd ) );
@@ -1538,8 +1539,8 @@ void DocxAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void DocxAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner )
@@ -1830,16 +1831,16 @@ void DocxAttributeOutput::StartStyles()
FSEND );
}
-void DocxAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void DocxAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
m_pSerializer->endElementNS( XML_w, XML_styles );
}
-void DocxAttributeOutput::DefaultStyle( USHORT nStyle )
+void DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
// are these the values of enum ww::sti (see ../inc/wwstyles.hxx)?
#if OSL_DEBUG_LEVEL > 1
- OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( USHORT nStyle )- %d\n", nStyle );
+ OSL_TRACE( "TODO DocxAttributeOutput::DefaultStyle( sal_uInt16 nStyle )- %d\n", nStyle );
#else
(void) nStyle; // to quiet the warning
#endif
@@ -2227,7 +2228,7 @@ void DocxAttributeOutput::OutputFlyFrame_Impl( const sw::Frame &rFrame, const Po
}
void DocxAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool bAutoUpdate )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId, bool bAutoUpdate )
{
OString aStyle( "style" );
@@ -2260,7 +2261,7 @@ void DocxAttributeOutput::EndStyle()
m_pSerializer->endElementNS( XML_w, XML_style );
}
-void DocxAttributeOutput::StartStyleProperties( bool bParProp, USHORT /*nStyle*/ )
+void DocxAttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 /*nStyle*/ )
{
if ( bParProp )
{
@@ -2288,7 +2289,7 @@ void DocxAttributeOutput::EndStyleProperties( bool bParProp )
}
}
-void DocxAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void DocxAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel - 1;
@@ -2308,7 +2309,7 @@ void DocxAttributeOutput::PageBreakBefore( bool bBreak )
FSEND );
}
-void DocxAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void DocxAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
switch ( nC )
{
@@ -2420,7 +2421,7 @@ void DocxAttributeOutput::SectionFormProtection( bool bProtected )
FSNS( XML_w, XML_val ), "false", FSEND );
}
-void DocxAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
+void DocxAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& /*rLnNumInfo*/ )
{
// see 2.6.8 lnNumType (Line Numbering Settings)
OSL_TRACE( "TODO DocxAttributeOutput::SectionLineNumbering()\n" );
@@ -2463,7 +2464,7 @@ void DocxAttributeOutput::SectionBiDi( bool bBiDi )
m_pSerializer->singleElementNS( XML_w, XML_bidi, FSEND );
}
-static OString impl_NumberingType( USHORT nNumberingType )
+static OString impl_NumberingType( sal_uInt16 nNumberingType )
{
OString aType;
@@ -2487,7 +2488,7 @@ static OString impl_NumberingType( USHORT nNumberingType )
return aType;
}
-void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void DocxAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// FIXME Not called properly with page styles like "First Page"
@@ -2509,7 +2510,7 @@ void DocxAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRes
OSL_TRACE( "TODO DocxAttributeOutput::SectionPageNumbering()\n" );
}
-void DocxAttributeOutput::SectionType( BYTE nBreakCode )
+void DocxAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
/* break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
@@ -2602,7 +2603,7 @@ void DocxAttributeOutput::FontPitchType( FontPitch ePitch ) const
FSEND );
}
-void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void DocxAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
// nId is the same both for abstract numbering definition as well as the
// numbering definition itself
@@ -2628,7 +2629,7 @@ void DocxAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRul
m_pSerializer->endElementNS( XML_w, XML_num );
}
-void DocxAttributeOutput::StartAbstractNumbering( USHORT nId )
+void DocxAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
m_pSerializer->startElementNS( XML_w, XML_abstractNum,
FSNS( XML_w, XML_abstractNumId ), OString::valueOf( sal_Int32( nId ) ).getStr(),
@@ -2640,12 +2641,12 @@ void DocxAttributeOutput::EndAbstractNumbering()
m_pSerializer->endElementNS( XML_w, XML_abstractNum );
}
-void DocxAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void DocxAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * /*pNumLvlPos*/,
- BYTE nFollow,
+ const sal_uInt8 * /*pNumLvlPos*/,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -3153,7 +3154,7 @@ void DocxAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
void DocxAttributeOutput::RefField( const SwField& rFld, const String& rRef )
{
- USHORT nType = rFld.GetTyp( )->Which( );
+ sal_uInt16 nType = rFld.GetTyp( )->Which( );
if ( nType == RES_GETEXPFLD )
{
String sCmd = FieldString( ww::eREF );
@@ -3201,7 +3202,7 @@ void DocxAttributeOutput::WriteExpand( const SwField* pFld )
m_rExport.OutputField( pFld, ww::eUNKNOWN, sCmd );
}
-void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode )
+void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode )
{
struct FieldInfos infos;
infos.pField = pFld;
@@ -3213,8 +3214,8 @@ void DocxAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField eType
if ( pFld )
{
- USHORT nType = pFld->GetTyp( )->Which( );
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nType = pFld->GetTyp( )->Which( );
+ sal_uInt16 nSubType = pFld->GetSubType();
// TODO Any other field types here ?
if ( ( nType == RES_SETEXPFLD ) && ( nSubType & nsSwGetSetExpType::GSE_STRING ) )
@@ -3531,7 +3532,7 @@ void DocxAttributeOutput::ParaNumRule_Impl( const SwTxtNode* /*pTxtNd*/, sal_Int
void DocxAttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nXmlElement = 0;
+ sal_uInt16 nXmlElement = 0;
switch ( rScriptSpace.Which( ) )
{
@@ -3648,7 +3649,7 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
if ( !m_pSectionSpacingAttrList )
m_pSectionSpacingAttrList = m_pSerializer->createAttrList();
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rExport.HasItem( RES_BOX );
if ( pItem )
{
@@ -3657,8 +3658,8 @@ void DocxAttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLRSpace )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLRSpace.GetLeft();
- nRDist = nRDist + (USHORT)rLRSpace.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLRSpace.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLRSpace.GetRight();
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_left ), OString::valueOf( sal_Int32( nLDist ) ) );
m_pSectionSpacingAttrList->add( FSNS( XML_w, XML_right ), OString::valueOf( sal_Int32( nRDist ) ) );
@@ -3918,7 +3919,7 @@ void DocxAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
-void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void DocxAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
// Get the columns attributes
FastAttributeList *pColsAttrList = m_pSerializer->createAttrList();
@@ -3929,7 +3930,7 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const char* pEquals = "false";
if ( bEven )
{
- USHORT nWidth = rCol.GetGutterWidth( true );
+ sal_uInt16 nWidth = rCol.GetGutterWidth( true );
pColsAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
@@ -3948,16 +3949,16 @@ void DocxAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol
const SwColumns & rColumns = rCol.GetColumns( );
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
FastAttributeList *pColAttrList = m_pSerializer->createAttrList();
- USHORT nWidth = rCol.CalcPrtColWidth( n, ( USHORT ) nPageSize );
+ sal_uInt16 nWidth = rCol.CalcPrtColWidth( n, ( sal_uInt16 ) nPageSize );
pColAttrList->add( FSNS( XML_w, XML_w ),
OString::valueOf( sal_Int32( nWidth ) ).getStr( ) );
if ( n + 1 != nCols )
{
- USHORT nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
+ sal_uInt16 nSpacing = rColumns[n]->GetRight( ) + rColumns[n + 1]->GetLeft( );
pColAttrList->add( FSNS( XML_w, XML_space ),
OString::valueOf( sal_Int32( nSpacing ) ).getStr( ) );
}
@@ -3997,7 +3998,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
pGridAttrList->add( FSNS( XML_w, XML_type ), sGridType.getStr( ) );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
pGridAttrList->add( FSNS( XML_w, XML_linePitch ),
OString::valueOf( sal_Int32( nHeight ) ).getStr( ) );
@@ -4014,7 +4015,7 @@ void DocxAttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
pGridAttrList->add( FSNS( XML_w, XML_charSpace ),
OString::valueOf( sal_Int32( nCharSpace ) ).getStr( ) );
diff --git a/sw/source/filter/ww8/docxattributeoutput.hxx b/sw/source/filter/ww8/docxattributeoutput.hxx
index 748b7060fdd9..8eee66c51ad6 100644
--- a/sw/source/filter/ww8/docxattributeoutput.hxx
+++ b/sw/source/filter/ww8/docxattributeoutput.hxx
@@ -138,10 +138,10 @@ public:
/// End of the tag that encloses the run.
void EndRedline();
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -162,27 +162,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwId, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -190,7 +190,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -202,7 +202,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -216,10 +216,10 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Start the font.
void StartFont( const String& rFamilyName ) const;
@@ -240,21 +240,21 @@ public:
void FontPitchType( FontPitch ePitch ) const;
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -262,7 +262,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteFormData_Impl( const ::sw::mark::IFieldmark& rFieldmark );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
@@ -485,7 +485,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -560,7 +560,7 @@ private:
std::vector<rtl::OString> m_rMarksEnd;
/// Maps of the bookmarks ids
- std::map<rtl::OString, USHORT> m_rOpenedMarksIds;
+ std::map<rtl::OString, sal_uInt16> m_rOpenedMarksIds;
/// The current table helper
SwWriteTable *m_pTableWrt;
diff --git a/sw/source/filter/ww8/docxexport.cxx b/sw/source/filter/ww8/docxexport.cxx
index fd837264cd56..0bd0908ed9e5 100644
--- a/sw/source/filter/ww8/docxexport.cxx
+++ b/sw/source/filter/ww8/docxexport.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/i18n/ScriptType.hdl>
#include <com/sun/star/frame/XModel.hpp>
-#include <oox/core/tokens.hxx>
+#include <oox/token/tokens.hxx>
#include <oox/export/drawingml.hxx>
#include <oox/export/vmlexport.hxx>
#include <oox/export/chartexport.hxx>
@@ -67,6 +67,7 @@
using namespace sax_fastparser;
using namespace ::comphelper;
using namespace ::com::sun::star;
+using namespace ::oox;
using oox::vml::VMLExport;
@@ -87,7 +88,7 @@ MSWordSections& DocxExport::Sections() const
return *m_pSections;
}
-bool DocxExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool DocxExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// TODO FIXME is this actually true for docx? - this is ~copied from WW8
if ( nScript == i18n::ScriptType::ASIAN )
@@ -191,8 +192,8 @@ bool DocxExport::DisallowInheritingOutlineNumbering( const SwFmt& rFmt )
return bRet;
}
-void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void DocxExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
// headers
if ( nHeadFootFlags & nsHdFtFlags::WW8_HEADER_EVEN )
@@ -219,7 +220,7 @@ void DocxExport::WriteHeadersFooters( BYTE nHeadFootFlags,
#endif
}
-void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void DocxExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
m_pAttrOutput->WriteField_Impl( pFld, eFldType, rFldCmd, nMode );
}
@@ -348,7 +349,7 @@ void DocxExport::OutputPageSectionBreaks( const SwTxtNode& )
}
-void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void DocxExport::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
m_pSections->AppendSection( pPageDesc, pFmt, nLnNum );
@@ -378,7 +379,7 @@ void DocxExport::OutputEndNode( const SwEndNode& rEndNode )
if( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if( rNd.IsCntntNode() )
nRstLnNum = const_cast< SwCntntNode* >( rNd.GetCntntNode() )->GetSwAttrSet().GetLineNumber().GetStartValue();
else
@@ -410,7 +411,7 @@ void DocxExport::OutputLinkedOLE( const OUString& )
// Nothing to implement here: WW8 only
}
-ULONG DocxExport::ReplaceCr( BYTE )
+sal_uLong DocxExport::ReplaceCr( sal_uInt8 )
{
// Completely unused for Docx export... only here for code sharing
// purpose with binary export
@@ -426,7 +427,7 @@ void DocxExport::PrepareNewPageDesc( const SfxItemSet* pSet,
AttrOutput().SectionBreak( msword::PageBreak, m_pSections->CurrentSectionInfo() );
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -681,7 +682,7 @@ XFastAttributeListRef DocxExport::MainXmlNamespaces( FSHelperPtr serializer )
return XFastAttributeListRef( pAttr );
}
-bool DocxExport::ignoreAttributeForStyles( USHORT nWhich ) const
+bool DocxExport::ignoreAttributeForStyles( sal_uInt16 nWhich ) const
{
if( nWhich == RES_TEXTGRID )
return true; // w:docGrid is written only to document.xml, not to styles.xml
diff --git a/sw/source/filter/ww8/docxexport.hxx b/sw/source/filter/ww8/docxexport.hxx
index 411346d3c927..4838d55868c4 100644
--- a/sw/source/filter/ww8/docxexport.hxx
+++ b/sw/source/filter/ww8/docxexport.hxx
@@ -99,10 +99,10 @@ public:
/// Determines if the format is expected to support unicode.
virtual bool SupportsUnicode() const { return true; }
- virtual bool ignoreAttributeForStyles( USHORT nWhich ) const;
+ virtual bool ignoreAttributeForStyles( sal_uInt16 nWhich ) const;
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -118,12 +118,12 @@ public:
virtual bool DisallowInheritingOutlineNumbering( const SwFmt &rFmt );
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -137,7 +137,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
/// Returns the relationd id
rtl::OString OutputChart( com::sun::star::uno::Reference< com::sun::star::frame::XModel >& xModel, sal_Int32 nCount );
@@ -163,7 +163,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
virtual void SectionBreaksAndFrames( const SwTxtNode& /*rNode*/ ) {}
diff --git a/sw/source/filter/ww8/docxexportfilter.cxx b/sw/source/filter/ww8/docxexportfilter.cxx
index ed3d29a08c72..b784e8404b8f 100644
--- a/sw/source/filter/ww8/docxexportfilter.cxx
+++ b/sw/source/filter/ww8/docxexportfilter.cxx
@@ -35,7 +35,7 @@
#include <pam.hxx>
#include <unotxdoc.hxx>
-#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
using namespace ::comphelper;
using namespace ::com::sun::star;
@@ -43,8 +43,8 @@ using ::rtl::OUString;
#define S( x ) OUString( RTL_CONSTASCII_USTRINGPARAM( x ) )
-DocxExportFilter::DocxExportFilter( const uno::Reference< lang::XMultiServiceFactory >& rMSF )
- : oox::core::XmlFilterBase( rMSF )
+DocxExportFilter::DocxExportFilter( const uno::Reference< uno::XComponentContext >& xContext )
+ : oox::core::XmlFilterBase( xContext )
{
}
@@ -115,121 +115,48 @@ uno::Sequence< OUString > SAL_CALL DocxExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL DocxExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new DocxExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new DocxExportFilter( xCtx );
}
-#ifdef __cplusplus
extern "C"
{
-#endif
SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment( const sal_Char ** ppEnvTypeName, uno_Environment ** /* ppEnv */ )
{
*ppEnvTypeName = CPPU_CURRENT_LANGUAGE_BINDING_NAME;
}
-SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /* pServiceManager */, void* pRegistryKey )
-{
- sal_Bool bRet = sal_False;
-
- if( pRegistryKey )
- {
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME "/UNO/SERVICES/" ))) );
- xNewKey1->createKey( DocxExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (docx)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfexport)!" );
- }
-
- try
- {
- uno::Reference< registry::XRegistryKey > xNewKey1(
- static_cast< registry::XRegistryKey* >( pRegistryKey )->createKey(
- OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT "/UNO/SERVICES/" )) ) );
- xNewKey1->createKey( RtfExport_getSupportedServiceNames().getConstArray()[0] );
-
- bRet = sal_True;
- }
- catch( registry::InvalidRegistryException& )
- {
- OSL_ENSURE( sal_False, "### InvalidRegistryException (rtfimport)!" );
- }
- }
-
- return bRet;
-}
-
// ------------------------
// - component_getFactory -
// ------------------------
-SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* /* pRegistryKey */ )
+::cppu::ImplementationEntry entries [] =
{
- OSL_TRACE("%s, pImplName is '%s'", OSL_THIS_FUNC, pImplName);
- uno::Reference< lang::XSingleServiceFactory > xFactory;
- void* pRet = 0;
-
- if ( rtl_str_compare( pImplName, IMPL_NAME ) == 0 )
{
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM(IMPL_NAME)) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- DocxExport_getImplementationName(),
- DocxExport_createInstance,
- DocxExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFEXPORT ) == 0 ) {
- const OUString aServiceName(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFEXPORT));
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfExport_getImplementationName(),
- RtfExport_createInstance,
- RtfExport_getSupportedServiceNames() ) );
- } else if ( rtl_str_compare( pImplName, IMPL_NAME_RTFIMPORT ) == 0 ) {
- const OUString aServiceName( OUString(RTL_CONSTASCII_USTRINGPARAM( IMPL_NAME_RTFIMPORT )) );
-
- xFactory = uno::Reference< lang::XSingleServiceFactory >( ::cppu::createSingleFactory(
- reinterpret_cast< lang::XMultiServiceFactory* >( pServiceManager ),
- RtfImport_getImplementationName(),
- RtfImport_createInstance,
- RtfImport_getSupportedServiceNames() ) );
- }
-
- if ( xFactory.is() )
+ DocxExport_createInstance, DocxExport_getImplementationName,
+ DocxExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
{
- xFactory->acquire();
- pRet = xFactory.get();
- }
-
- return pRet;
+ RtfExport_createInstance, RtfExport_getImplementationName,
+ RtfExport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ {
+ RtfImport_createInstance, RtfImport_getImplementationName,
+ RtfImport_getSupportedServiceNames, ::cppu::createSingleComponentFactory,
+ 0, 0
+ },
+ { 0, 0, 0, 0, 0, 0 }
+};
+
+SAL_DLLPUBLIC_EXPORT void* SAL_CALL component_getFactory( const sal_Char* pImplName, void* pServiceManager, void* pRegistryKey )
+{
+ return ::cppu::component_getFactoryHelper( pImplName, pServiceManager, pRegistryKey, entries );
}
-#ifdef __cplusplus
-}
-#endif
+} // extern "C"
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/docxexportfilter.hxx b/sw/source/filter/ww8/docxexportfilter.hxx
index 0d6432a79805..68c11242ea0b 100644
--- a/sw/source/filter/ww8/docxexportfilter.hxx
+++ b/sw/source/filter/ww8/docxexportfilter.hxx
@@ -39,7 +39,7 @@
class DocxExportFilter : public oox::core::XmlFilterBase
{
public:
- DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rMSF );
+ DocxExportFilter( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xContext );
// FIXME these should not even exist for the export-only filter!
// For now, let's just do empty implementations of those.
@@ -57,6 +57,11 @@ private:
/// Implementatio of the filter abstract method.
virtual ::rtl::OUString implGetImplementationName() const;
+
+ virtual ::oox::ole::VbaProject* implCreateVbaProject() const
+ {
+ return NULL; // FIXME: implement me !
+ }
};
#endif // _DOCXEXPORTFILTER_HXX_
diff --git a/sw/source/filter/ww8/docxfootnotes.hxx b/sw/source/filter/ww8/docxfootnotes.hxx
index 1d715e7ff260..300f50b34da8 100644
--- a/sw/source/filter/ww8/docxfootnotes.hxx
+++ b/sw/source/filter/ww8/docxfootnotes.hxx
@@ -31,7 +31,6 @@
#include <fmtftn.hxx>
-#include <oox/core/tokens.hxx>
#include <rtl/string.hxx>
#include <rtl/ustring.hxx>
#include <sax/fshelper.hxx>
diff --git a/sw/source/filter/ww8/escher.hxx b/sw/source/filter/ww8/escher.hxx
index 9d5ace7a05a0..55de32d362b2 100644
--- a/sw/source/filter/ww8/escher.hxx
+++ b/sw/source/filter/ww8/escher.hxx
@@ -106,7 +106,7 @@ protected:
SvStream* pEscherStrm;
long mnEmuMul, mnEmuDiv;
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
void WriteBrushAttr(const SvxBrushItem &rBrush,
EscherPropertyContainer& rPropOpt);
@@ -115,19 +115,19 @@ protected:
sal_uInt32 nShapeId, const com::sun::star::awt::Rectangle* pVisArea );
void WriteGrfAttr(const SwNoTxtNode& rNd,EscherPropertyContainer& rPropOpt);
- INT32 DrawModelToEmu(INT32 nVal) const
+ sal_Int32 DrawModelToEmu(sal_Int32 nVal) const
{ return BigMulDiv(nVal, mnEmuMul, mnEmuDiv); }
- INT32 ToFract16(INT32 nVal, UINT32 nMax) const;
+ sal_Int32 ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const;
- virtual void SetPicId(const SdrObject &, UINT32, EscherPropertyContainer &);
+ virtual void SetPicId(const SdrObject &, sal_uInt32, EscherPropertyContainer &);
SdrLayerID GetInvisibleHellId() const;
public:
SwBasicEscherEx(SvStream* pStrm, WW8Export& rWrt);
- INT32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- INT32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
- void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId);
+ sal_Int32 WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ sal_Int32 WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
+ void WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId);
virtual void WriteFrmExtraData(const SwFrmFmt&);
virtual void WritePictures();
virtual ~SwBasicEscherEx();
@@ -145,23 +145,23 @@ private:
WinwordAnchoring aWinwordAnchoring;
WW8_WrPlcTxtBoxes *pTxtBxs;
- UINT32 GetFlyShapeId(const SwFrmFmt& rFmt,
+ sal_uInt32 GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rPVec);
void MakeZOrderArrAndFollowIds(std::vector<DrawObj>& rSrcArr,
DrawObjPointerVector& rDstArr);
- INT32 WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+ sal_Int32 WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec);
- INT32 WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec);
- void WriteOCXControl(const SwFrmFmt& rFmt,UINT32 nShapeId);
- virtual INT32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+ sal_Int32 WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec);
+ void WriteOCXControl(const SwFrmFmt& rFmt,sal_uInt32 nShapeId);
+ virtual sal_Int32 WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt);
- virtual UINT32 QueryTextID(
+ virtual sal_uInt32 QueryTextID(
const com::sun::star::uno::Reference<
- com::sun::star::drawing::XShape > &,UINT32);
- virtual void SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+ com::sun::star::drawing::XShape > &,sal_uInt32);
+ virtual void SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt);
public:
SwEscherEx( SvStream* pStrm, WW8Export& rWW8Wrt );
diff --git a/sw/source/filter/ww8/makefile.mk b/sw/source/filter/ww8/makefile.mk
deleted file mode 100644
index 9c9455be8b41..000000000000
--- a/sw/source/filter/ww8/makefile.mk
+++ /dev/null
@@ -1,91 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=ww8
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-MAKING_LIBMSWORD=TRUE
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-EXCEPTIONSFILES = \
- $(SLO)$/WW8FFData.obj \
- $(SLO)$/WW8FibData.obj \
- $(SLO)$/WW8Sttbf.obj \
- $(SLO)$/WW8TableInfo.obj \
- $(SLO)$/docxattributeoutput.obj \
- $(SLO)$/docxexport.obj \
- $(SLO)$/docxexportfilter.obj \
- $(SLO)$/fields.obj \
- $(SLO)$/rtfattributeoutput.obj \
- $(SLO)$/rtfexport.obj \
- $(SLO)$/rtfexportfilter.obj \
- $(SLO)$/rtfimportfilter.obj \
- $(SLO)$/rtfsdrexport.obj \
- $(SLO)$/styles.obj \
- $(SLO)$/tracer.obj \
- $(SLO)$/writerhelper.obj \
- $(SLO)$/writerwordglue.obj \
- $(SLO)$/wrtw8esh.obj \
- $(SLO)$/wrtw8nds.obj \
- $(SLO)$/wrtw8num.obj \
- $(SLO)$/wrtw8sty.obj \
- $(SLO)$/wrtww8.obj \
- $(SLO)$/wrtww8gr.obj \
- $(SLO)$/ww8atr.obj \
- $(SLO)$/ww8glsy.obj \
- $(SLO)$/ww8graf.obj \
- $(SLO)$/ww8graf2.obj \
- $(SLO)$/ww8par.obj \
- $(SLO)$/ww8par2.obj \
- $(SLO)$/ww8par3.obj \
- $(SLO)$/ww8par4.obj \
- $(SLO)$/ww8par5.obj \
- $(SLO)$/ww8par6.obj \
- $(SLO)$/ww8scan.obj \
- $(SLO)$/ww8toolbar.obj
-
-
-SLOFILES = \
- $(EXCEPTIONSFILES)
-
-
-# --- Tagets -------------------------------------------------------
-
-.INCLUDE : target.mk
-
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx
index 64f5aa81f3a9..4b7c86925779 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.cxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -203,7 +204,7 @@ static OString OutTBLBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
}
static OString OutBorderLine(RtfExport &rExport, const SvxBorderLine* pLine,
- const sal_Char* pStr, USHORT nDist)
+ const sal_Char* pStr, sal_uInt16 nDist)
{
OStringBuffer aRet;
aRet.append(OutTBLBorderLine(rExport, pLine, pStr));
@@ -535,12 +536,12 @@ void RtfAttributeOutput::Redline( const SwRedlineData* pRedline )
m_aRun.append(' ');
}
-void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, USHORT /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
+void RtfAttributeOutput::FormatDrop( const SwTxtNode& /*rNode*/, const SwFmtDrop& /*rSwFmtDrop*/, sal_uInt16 /*nStyle*/, ww8::WW8TableNodeInfo::Pointer_t /*pTextNodeInfo*/, ww8::WW8TableNodeInfoInner::Pointer_t /*pTextNodeInfoInner*/ )
{
OSL_TRACE("TODO: %s", OSL_THIS_FUNC);
}
-void RtfAttributeOutput::ParagraphStyle( USHORT nStyle )
+void RtfAttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -594,7 +595,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
// Cell margins
const SvxBoxItem& rBox = pFmt->GetBox( );
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -638,7 +639,7 @@ void RtfAttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
rLR.GetLeft() - rLR.GetRight();
}
SwTwips nTblSz = pFmt->GetFrmSize().GetWidth();
- for( USHORT i = 0; i < pRow->GetCells().Count(); i++ )
+ for( sal_uInt16 i = 0; i < pRow->GetCells().Count(); i++ )
{
SwWriteTableCell *pCell = pRow->GetCells( )[ i ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
@@ -676,10 +677,10 @@ void RtfAttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
SwWriteTableCell *pCell = pRow->GetCells( )[ pTableTextNodeInfoInner->getCell( ) ];
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
- if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, TRUE, &pItem))
+ if (SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(RES_BOX, sal_True, &pItem))
{
const SvxBoxItem& rBox = (SvxBoxItem&)*pItem;
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -723,7 +724,7 @@ void RtfAttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
const SwFrmFmt *pCellFmt = pCell->GetBox()->GetFrmFmt();
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_BACKGROUND, TRUE, &pItem ))
+ RES_BACKGROUND, sal_True, &pItem ))
{
const SvxBrushItem& rBack = (SvxBrushItem&)*pItem;
if( !rBack.GetColor().GetTransparency() )
@@ -807,7 +808,7 @@ void RtfAttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
// vertical alignment
if( SFX_ITEM_SET == pCellFmt->GetAttrSet().GetItemState(
- RES_VERT_ORIENT, TRUE, &pItem ) )
+ RES_VERT_ORIENT, sal_True, &pItem ) )
switch( ((SwFmtVertOrient*)pItem)->GetVertOrient() )
{
case text::VertOrientation::CENTER: m_aRowDefs.append(OOO_STRING_SVTOOLS_RTF_CLVERTALC); break;
@@ -898,8 +899,8 @@ void RtfAttributeOutput::InitTableHelper( ww8::WW8TableNodeInfoInner::Pointer_t
if( pLayout && pLayout->IsExportable() )
m_pTableWrt = new SwWriteTable( pLayout );
else
- m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (USHORT)nPageSize,
- (USHORT)nTblSz, false);
+ m_pTableWrt = new SwWriteTable( pTable->GetTabLines(), (sal_uInt16)nPageSize,
+ (sal_uInt16)nTblSz, false);
}
void RtfAttributeOutput::StartTable( ww8::WW8TableNodeInfoInner::Pointer_t /*pTableTextNodeInfoInner*/ )
@@ -1017,7 +1018,7 @@ void RtfAttributeOutput::FinishTableRowCell( ww8::WW8TableNodeInfoInner::Pointer
const SwTable *pTable = pInner->getTable( );
const SwTableLines& rLines = pTable->GetTabLines( );
- USHORT nLinesCount = rLines.Count( );
+ sal_uInt16 nLinesCount = rLines.Count( );
if ( pInner->isEndOfCell() )
EndTableCell();
@@ -1043,7 +1044,7 @@ void RtfAttributeOutput::StartStyles()
m_aStylesheet.append(OOO_STRING_SVTOOLS_RTF_STYLESHEET);
}
-void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
+void RtfAttributeOutput::EndStyles( sal_uInt16 /*nNumberOfStyles*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
m_rExport.Strm() << '}';
@@ -1051,7 +1052,7 @@ void RtfAttributeOutput::EndStyles( USHORT /*nNumberOfStyles*/ )
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
+void RtfAttributeOutput::DefaultStyle( sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1059,7 +1060,8 @@ void RtfAttributeOutput::DefaultStyle( USHORT /*nStyle*/ )
}
void RtfAttributeOutput::StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT /*nWwId*/, USHORT nId, bool /*bAutoUpdate*/ )
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 /*nWwId*/, sal_uInt16 nId,
+ bool /* bAutoUpdate */ )
{
OSL_TRACE("%s, rName = '%s'", OSL_THIS_FUNC,
OUStringToOString( OUString( rName ), m_rExport.eCurrentEncoding ).getStr());
@@ -1097,7 +1099,7 @@ void RtfAttributeOutput::EndStyle()
m_aStylesheet.append(m_rExport.sNewLine);
}
-void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, USHORT /*nStyle*/ )
+void RtfAttributeOutput::StartStyleProperties( bool /*bParProp*/, sal_uInt16 /*nStyle*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
/* noop */
@@ -1109,7 +1111,7 @@ void RtfAttributeOutput::EndStyleProperties( bool /*bParProp*/ )
/* noop */
}
-void RtfAttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
+void RtfAttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt& /*rNFmt*/, const SwFmt& /*rFmt*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1132,7 +1134,7 @@ void RtfAttributeOutput::PageBreakBefore( bool bBreak )
}
}
-void RtfAttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo )
+void RtfAttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1175,7 +1177,7 @@ void RtfAttributeOutput::SectionFormProtection( bool bProtected )
m_aSectionBreaks.append((sal_Int32)!bProtected);
}
-void RtfAttributeOutput::SectionLineNumbering( ULONG /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
+void RtfAttributeOutput::SectionLineNumbering( sal_uLong /*nRestartNo*/, const SwLineNumberInfo& rLnNumInfo )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1230,7 +1232,7 @@ void RtfAttributeOutput::SectionBiDi( bool bBiDi )
m_rExport.Strm() << (bBiDi ? OOO_STRING_SVTOOLS_RTF_RTLSECT : OOO_STRING_SVTOOLS_RTF_LTRSECT);
}
-void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void RtfAttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1257,7 +1259,7 @@ void RtfAttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
m_aSectionBreaks.append(pStr);
}
-void RtfAttributeOutput::SectionType( BYTE nBreakCode )
+void RtfAttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
OSL_TRACE("%s, nBreakCode = %d", OSL_THIS_FUNC, nBreakCode);
@@ -1279,7 +1281,7 @@ void RtfAttributeOutput::SectionType( BYTE nBreakCode )
m_rExport.Strm() << m_aSectionBreaks.makeStringAndClear();
}
-void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRule*/ )
+void RtfAttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &/*rRule*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1291,7 +1293,7 @@ void RtfAttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &/*rRu
m_rExport.OutULong(nId) << '}';
}
-void RtfAttributeOutput::StartAbstractNumbering( USHORT nId )
+void RtfAttributeOutput::StartAbstractNumbering( sal_uInt16 nId )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1308,12 +1310,12 @@ void RtfAttributeOutput::EndAbstractNumbering()
m_rExport.OutULong( m_nListId ) << '}' << m_rExport.sNewLine;
}
-void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+void RtfAttributeOutput::NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE * pNumLvlPos,
- BYTE /*nFollow*/,
+ const sal_uInt8 * pNumLvlPos,
+ sal_uInt8 /*nFollow*/,
const wwFont * pFont,
const SfxItemSet * pOutSet,
sal_Int16 nIndentAt,
@@ -1329,7 +1331,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '{' << OOO_STRING_SVTOOLS_RTF_LISTLEVEL;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch( nNumberingType )
{
case SVX_NUM_ROMAN_UPPER: nVal = 1; break;
@@ -1381,7 +1383,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
// write the levelnumbers
m_rExport.Strm() << "{" << OOO_STRING_SVTOOLS_RTF_LEVELNUMBERS;
- for( BYTE i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
+ for( sal_uInt8 i = 0; i <= nLevel && pNumLvlPos[ i ]; ++i )
{
m_rExport.Strm() << "\\'" << m_rExport.OutHex(pNumLvlPos[ i ], 2).getStr();
}
@@ -1407,7 +1409,7 @@ void RtfAttributeOutput::NumberingLevel( BYTE nLevel,
m_rExport.Strm() << '}';
}
-void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, BYTE /*nMode*/ )
+void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eType*/, const String& rFldCmd, sal_uInt8 /*nMode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -1417,7 +1419,7 @@ void RtfAttributeOutput::WriteField_Impl( const SwField* pFld, ww::eField /*eTyp
m_aRunText.append(m_rExport.OutString(rFldCmd, m_rExport.eCurrentEncoding));
m_aRunText.append("}{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if (pFld)
- m_aRunText.append(m_rExport.OutString(pFld->GetCntnt(), m_rExport.eDefaultEncoding));
+ m_aRunText.append(m_rExport.OutString(pFld->ExpandField(true), m_rExport.eDefaultEncoding));
m_aRunText.append("}}");
}
@@ -1494,8 +1496,8 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
const SwFrmFmt& rFrmFmt = rFrame.GetFrmFmt( );
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
m_rExport.SaveData( nStt, nEnd );
m_rExport.mpParentFrame = &rFrame;
m_rExport.WriteText( );
@@ -1524,7 +1526,7 @@ void RtfAttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFrame, const Poi
}
if ( pGrfNode )
- FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode);
+ FlyFrameGraphic( dynamic_cast<const SwFlyFrmFmt*>( &rFrame.GetFrmFmt() ), *pGrfNode );
break;
case sw::Frame::eDrawing:
{
@@ -2196,7 +2198,7 @@ void RtfAttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
- USHORT nType;
+ sal_uInt16 nType;
if( !cStart && !cEnd )
nType = 0;
else if( '{' == cStart || '}' == cEnd )
@@ -2264,7 +2266,7 @@ void RtfAttributeOutput::TextINetFormat( const SwFmtINetFmt& rURL )
m_aStyles.append("{" OOO_STRING_SVTOOLS_RTF_FLDRSLT " ");
if( pTxtAtr && 0 != ( pFmt = pTxtAtr->GetCharFmt() ))
{
- USHORT nStyle = m_rExport.GetId( *pFmt );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2276,7 +2278,7 @@ void RtfAttributeOutput::TextCharFormat( const SwFmtCharFmt& rCharFmt )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- USHORT nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *rCharFmt.GetCharFmt() );
m_aStyles.append(OOO_STRING_SVTOOLS_RTF_IGNORE OOO_STRING_SVTOOLS_RTF_CS);
m_aStyles.append((sal_Int32)nStyle);
OString* pString = m_rExport.GetStyle(nStyle);
@@ -2384,7 +2386,7 @@ void RtfAttributeOutput::ParaTabStop( const SvxTabStopItem& rTabStop )
OSL_TRACE("%s", OSL_THIS_FUNC);
long nOffset = ((SvxLRSpaceItem&)m_rExport.GetItem( RES_LR_SPACE )).GetTxtLeft();
- for( USHORT n = 0; n < rTabStop.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTabStop.Count(); n++ )
{
const SvxTabStop & rTS = rTabStop[ n ];
if( SVX_TAB_ADJUST_DEFAULT != rTS.GetAdjustment() )
@@ -2486,7 +2488,7 @@ void RtfAttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
aLR.SetTxtLeft( aLR.GetTxtLeft() + pFmt->GetIndentAt() );
aLR.SetTxtFirstLineOfst( pFmt->GetFirstLineOffset() );
- USHORT nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
+ sal_uInt16 nStyle = m_rExport.GetId( *pFmt->GetCharFmt() );
OString* pString = m_rExport.GetStyle(nStyle);
if (pString)
m_aStyles.append(*pString);
@@ -2713,10 +2715,10 @@ void RtfAttributeOutput::FormatSurround( const SwFmtSurround& rSurround )
if ( m_rExport.bOutFlyFrmAttrs && !m_rExport.bRTFFlySyntax )
{
SwSurround eSurround = rSurround.GetSurround();
- BOOL bGold = SURROUND_IDEAL == eSurround;
+ sal_Bool bGold = SURROUND_IDEAL == eSurround;
if( bGold )
eSurround = SURROUND_PARALLEL;
- RTFSurround aMC( bGold, static_cast< BYTE >(eSurround) );
+ RTFSurround aMC( bGold, static_cast< sal_uInt8 >(eSurround) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYMAINCNT);
m_aRunText.append( (sal_Int32) aMC.GetValue() );
}
@@ -2754,7 +2756,7 @@ void RtfAttributeOutput::FormatVertOrientation( const SwFmtVertOrient& rFlyVert
}
else if ( !m_rExport.bRTFFlySyntax )
{
- RTFVertOrient aVO( static_cast< USHORT >(rFlyVert.GetVertOrient()), static_cast< USHORT >(rFlyVert.GetRelationOrient()) );
+ RTFVertOrient aVO( static_cast< sal_uInt16 >(rFlyVert.GetVertOrient()), static_cast< sal_uInt16 >(rFlyVert.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYVERT);
m_aRunText.append((sal_Int32)aVO.GetValue());
}
@@ -2791,8 +2793,8 @@ void RtfAttributeOutput::FormatHorizOrientation( const SwFmtHoriOrient& rFlyHori
m_aRunText.append(pS);
} else if ( !m_rExport.bRTFFlySyntax )
{
- RTFHoriOrient aHO( static_cast< USHORT >(rFlyHori.GetHoriOrient()),
- static_cast< USHORT >(rFlyHori.GetRelationOrient()) );
+ RTFHoriOrient aHO( static_cast< sal_uInt16 >(rFlyHori.GetHoriOrient()),
+ static_cast< sal_uInt16 >(rFlyHori.GetRelationOrient()) );
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYHORZ);
m_aRunText.append((sal_Int32)aHO.GetValue());
}
@@ -2804,7 +2806,7 @@ void RtfAttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( !m_rExport.bRTFFlySyntax )
{
- USHORT nId = static_cast< USHORT >(rAnchor.GetAnchorId());
+ sal_uInt16 nId = static_cast< sal_uInt16 >(rAnchor.GetAnchorId());
m_aRunText.append(OOO_STRING_SVTOOLS_RTF_FLYANCHOR);
m_aRunText.append((sal_Int32)nId);
switch( nId )
@@ -2836,12 +2838,12 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
- static USHORT const aBorders[] = {
+ static sal_uInt16 aBorders[] = {
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
static const sal_Char* aBorderNames[] = {
OOO_STRING_SVTOOLS_RTF_BRDRT, OOO_STRING_SVTOOLS_RTF_BRDRL, OOO_STRING_SVTOOLS_RTF_BRDRB, OOO_STRING_SVTOOLS_RTF_BRDRR };
- USHORT nDist = rBox.GetDistance();
+ sal_uInt16 nDist = rBox.GetDistance();
if ( m_rExport.bRTFFlySyntax )
return;
@@ -2858,7 +2860,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aSectionBreaks.append(OutBorderLine( m_rExport, rBox.GetTop(), OOO_STRING_SVTOOLS_RTF_BOX, nDist ));
else
{
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for(int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms)
{
@@ -2870,7 +2872,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
}
}
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
const sal_Char** pBrdNms = (const sal_Char**)aBorderNames;
for( int i = 0; i < 4; ++i, ++pBrd, ++pBrdNms )
{
@@ -2888,7 +2890,7 @@ void RtfAttributeOutput::FormatBox( const SvxBoxItem& rBox )
m_aStyles.append(m_aSectionBreaks.makeStringAndClear());
}
-void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
+void RtfAttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol& rCol, bool bEven, SwTwips nPageSize )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -2898,12 +2900,12 @@ void RtfAttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol& rCol,
if( bEven )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLSX;
- m_rExport.OutLong( rCol.GetGutterWidth( TRUE ) );
+ m_rExport.OutLong( rCol.GetGutterWidth( sal_True ) );
}
else
{
const SwColumns & rColumns = rCol.GetColumns( );
- for( USHORT n = 0; n < nCols; )
+ for( sal_uInt16 n = 0; n < nCols; )
{
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_COLNO;
m_rExport.OutLong( n+1 );
@@ -3024,7 +3026,7 @@ RtfAttributeOutput::~RtfAttributeOutput()
OSL_TRACE("%s", OSL_THIS_FUNC);
}
-RtfExport& RtfAttributeOutput::GetExport()
+MSWordExportBase& RtfAttributeOutput::GetExport()
{
return m_rExport;
}
@@ -3104,7 +3106,7 @@ void RtfAttributeOutput::FontPitchType( FontPitch ePitch ) const
m_rExport.Strm() << OOO_STRING_SVTOOLS_RTF_FPRQ;
- USHORT nVal = 0;
+ sal_uInt16 nVal = 0;
switch (ePitch)
{
case PITCH_FIXED:
diff --git a/sw/source/filter/ww8/rtfattributeoutput.hxx b/sw/source/filter/ww8/rtfattributeoutput.hxx
index adb0cbc4db4d..fcf43b765543 100644
--- a/sw/source/filter/ww8/rtfattributeoutput.hxx
+++ b/sw/source/filter/ww8/rtfattributeoutput.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -110,10 +111,10 @@ public:
/// The common attribute that can be among the run properties.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop& rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner );
@@ -134,27 +135,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwId, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -162,7 +163,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -174,7 +175,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -188,27 +189,27 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// Start of the abstract numbering definition instance.
- virtual void StartAbstractNumbering( USHORT nId );
+ virtual void StartAbstractNumbering( sal_uInt16 nId );
/// End of the abstract numbering definition instance.
virtual void EndAbstractNumbering();
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -216,7 +217,7 @@ public:
sal_Int16 nListTabPos,
const String &rNumberingString );
- void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, BYTE nMode );
+ void WriteField_Impl( const SwField* pFld, ww::eField eType, const String& rFldCmd, sal_uInt8 nMode );
void WriteBookmarks_Impl( std::vector< rtl::OUString >& rStarts, std::vector< rtl::OUString >& rEnds );
void WriteHeaderFooter_Impl( const SwFrmFmt& rFmt, bool bHeader, const sal_Char* pStr );
@@ -390,7 +391,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -444,11 +445,11 @@ private:
* Current style name and its ID.
*/
String m_rStyleName;
- USHORT m_nStyleId;
+ sal_uInt16 m_nStyleId;
/*
* Current list ID.
*/
- USHORT m_nListId;
+ sal_uInt16 m_nListId;
/*
* This is needed because the call order is: run text, run properties, paragraph properties.
* What we need is the opposite.
@@ -542,8 +543,7 @@ public:
virtual ~RtfAttributeOutput();
/// Return the right export class.
- virtual RtfExport& GetExport();
- const RtfExport& GetExport() const { return const_cast< RtfAttributeOutput* >( this )->GetExport(); }
+ virtual MSWordExportBase& GetExport();
rtl::OStringBuffer m_aTabStop;
diff --git a/sw/source/filter/ww8/rtfexport.cxx b/sw/source/filter/ww8/rtfexport.cxx
index cc2fd5cc5d30..17dc1c03bb2f 100644
--- a/sw/source/filter/ww8/rtfexport.cxx
+++ b/sw/source/filter/ww8/rtfexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -119,7 +120,7 @@ RtfSdrExport& RtfExport::SdrExporter() const
return *m_pSdrExport;
}
-bool RtfExport::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool RtfExport::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
// FIXME is this actually true for rtf? - this is copied from DOCX
if ( nScript == i18n::ScriptType::ASIAN )
@@ -201,15 +202,15 @@ void RtfExport::WriteChar( sal_Unicode )
/* WriteChar() has nothing to do for rtf. */
}
-static bool IsExportNumRule( const SwNumRule& rRule, BYTE* pEnd = 0 )
+static bool IsExportNumRule( const SwNumRule& rRule, sal_uInt8* pEnd = 0 )
{
- BYTE nEnd = MAXLEVEL;
+ sal_uInt8 nEnd = MAXLEVEL;
while( nEnd-- && !rRule.GetNumFmt( nEnd ))
;
++nEnd;
const SwNumFmt* pNFmt;
- BYTE nLvl;
+ sal_uInt8 nLvl;
for( nLvl = 0; nLvl < nEnd; ++nLvl )
if( SVX_NUM_NUMBER_NONE != ( pNFmt = &rRule.Get( nLvl ))
@@ -226,7 +227,7 @@ void RtfExport::BuildNumbering()
{
const SwNumRuleTbl& rListTbl = pDoc->GetNumRuleTbl();
- for( USHORT n = rListTbl.Count()+1; n; )
+ for( sal_uInt16 n = rListTbl.Count()+1; n; )
{
SwNumRule* pRule;
--n;
@@ -275,7 +276,7 @@ void RtfExport::WriteRevTab()
String sUnknown(RTL_CONSTASCII_USTRINGPARAM("Unknown"));
GetRedline(sUnknown);
- for( USHORT i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
+ for( sal_uInt16 i = 0; i < pDoc->GetRedlineTbl().Count(); ++i )
{
const SwRedline* pRedl = pDoc->GetRedlineTbl()[ i ];
@@ -284,7 +285,7 @@ void RtfExport::WriteRevTab()
// Now write the table
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_REVTBL << ' ';
- for(USHORT i = 0; i < m_aRedlineTbl.size(); ++i)
+ for(sal_uInt16 i = 0; i < m_aRedlineTbl.size(); ++i)
{
const String* pAuthor = GetRedline(i);
Strm() << '{';
@@ -295,8 +296,8 @@ void RtfExport::WriteRevTab()
Strm() << '}' << sNewLine;
}
-void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE /*nBreakCode*/ )
+void RtfExport::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 /*nBreakCode*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -321,7 +322,7 @@ void RtfExport::WriteHeadersFooters( BYTE nHeadFootFlags,
WriteHeaderFooter( rFirstPageFmt, false, OOO_STRING_SVTOOLS_RTF_FOOTERF );
}
-void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, BYTE nMode )
+void RtfExport::OutputField( const SwField* pFld, ww::eField eFldType, const String& rFldCmd, sal_uInt8 nMode )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -376,7 +377,7 @@ void RtfExport::DoFormText(const SwInputField* pFld )
m_pAttrOutput->RunText().append( OutString( sResult, eDefaultEncoding )).append( "}}" );
}
-ULONG RtfExport::ReplaceCr( BYTE )
+sal_uLong RtfExport::ReplaceCr( sal_uInt8 )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -451,14 +452,14 @@ void RtfExport::WritePageDescTable()
OSL_TRACE("%s", OSL_THIS_FUNC);
// Write page descriptions (page styles)
- USHORT nSize = pDoc->GetPageDescCnt();
+ sal_uInt16 nSize = pDoc->GetPageDescCnt();
if( !nSize )
return;
Strm() << sNewLine; // a separator
- bOutPageDescs = TRUE;
+ bOutPageDescs = sal_True;
Strm() << '{' << OOO_STRING_SVTOOLS_RTF_IGNORE << OOO_STRING_SVTOOLS_RTF_PGDSCTBL;
- for( USHORT n = 0; n < nSize; ++n )
+ for( sal_uInt16 n = 0; n < nSize; ++n )
{
const SwPageDesc& rPageDesc =
const_cast<const SwDoc*>(pDoc)->GetPageDesc( n );
@@ -467,10 +468,10 @@ void RtfExport::WritePageDescTable()
OutULong( n ) << OOO_STRING_SVTOOLS_RTF_PGDSCUSE;
OutULong( rPageDesc.ReadUseOn() );
- OutPageDescription( rPageDesc, FALSE, FALSE );
+ OutPageDescription( rPageDesc, sal_False, sal_False );
// search for the next page description
- USHORT i = nSize;
+ sal_uInt16 i = nSize;
while( i )
if( rPageDesc.GetFollow() ==
&const_cast<const SwDoc *>(pDoc)->GetPageDesc( --i ) )
@@ -480,7 +481,7 @@ void RtfExport::WritePageDescTable()
Strm() << OutString( rPageDesc.GetName(), eDefaultEncoding) << ";}";
}
Strm() << '}' << sNewLine;
- bOutPageDescs = FALSE;
+ bOutPageDescs = sal_False;
// reset table infos, otherwise the depth of the cells will be incorrect,
// in case the page style (header or footer) had tables
@@ -530,10 +531,10 @@ void RtfExport::ExportDocument_Impl()
// protected section in the document.
{
const SfxItemPool& rPool = pDoc->GetAttrPool();
- USHORT nMaxItem = rPool.GetItemCount(RES_PROTECT);
- for( USHORT n = 0; n < nMaxItem; ++n )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2(RES_PROTECT);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem(RES_PROTECT, n);
+ const SvxProtectItem* pProtect = (const SvxProtectItem*)rPool.GetItem2(RES_PROTECT, n);
if (pProtect && pProtect->IsCntntProtected())
{
Strm() << OOO_STRING_SVTOOLS_RTF_FORMPROT;
@@ -566,7 +567,7 @@ void RtfExport::ExportDocument_Impl()
if( pSet )
{
- USHORT nPosInDoc;
+ sal_uInt16 nPosInDoc;
pSttPgDsc = (SwFmtPageDesc*)&pSet->Get( RES_PAGEDESC );
if( !pSttPgDsc->GetPageDesc() )
pSttPgDsc = 0;
@@ -622,7 +623,7 @@ void RtfExport::ExportDocument_Impl()
// All sections are unlocked by default
Strm() << OOO_STRING_SVTOOLS_RTF_SECTUNLOCKED;
OutLong(1);
- OutPageDescription( rPageDesc, FALSE, TRUE ); // Changed bCheckForFirstPage to TRUE so headers
+ OutPageDescription( rPageDesc, sal_False, sal_True ); // Changed bCheckForFirstPage to sal_True so headers
// following title page are correctly added - i13107
if( pSttPgDsc )
{
@@ -707,7 +708,7 @@ void RtfExport::PrepareNewPageDesc( const SfxItemSet* pSet,
{
OSL_TRACE("%s", OSL_THIS_FUNC);
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -767,7 +768,7 @@ void RtfExport::OutputTextNode( const SwTxtNode& rNode )
MSWordExportBase::OutputTextNode( rNode );
}
-void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void RtfExport::AppendSection( const SwPageDesc* pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -814,7 +815,7 @@ SvStream& RtfExport::Strm()
return m_pWriter->Strm();
}
-SvStream& RtfExport::OutULong( ULONG nVal )
+SvStream& RtfExport::OutULong( sal_uLong nVal )
{
return m_pWriter->OutULong( Strm(), nVal );
}
@@ -834,7 +835,7 @@ void RtfExport::OutUnicode(const sal_Char *pToken, const String &rContent)
}
}
-OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
+OString RtfExport::OutHex(sal_uLong nHex, sal_uInt8 nLen)
{
sal_Char aNToABuf[] = "0000000000000000";
@@ -844,7 +845,7 @@ OString RtfExport::OutHex(ULONG nHex, BYTE nLen)
// Set pointer to the buffer end
sal_Char* pStr = aNToABuf + (sizeof(aNToABuf)-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' )
@@ -963,20 +964,20 @@ void RtfExport::OutDateTime(const sal_Char* pStr, const util::DateTime& rDT )
OutULong( rDT.Minutes ) << '}';
}
-USHORT RtfExport::GetColor( const Color& rColor ) const
+sal_uInt16 RtfExport::GetColor( const Color& rColor ) const
{
for (RtfColorTbl::const_iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rColor) {
OSL_TRACE("%s returning %d (%d,%d,%d)", OSL_THIS_FUNC, (*it).first, rColor.GetRed(), rColor.GetGreen(), rColor.GetBlue());
return (*it).first;
}
- OSL_ENSURE( FALSE, "No such Color in m_aColTbl!" );
+ OSL_ENSURE( sal_False, "No such Color in m_aColTbl!" );
return 0;
}
void RtfExport::InsColor( const Color& rCol )
{
- USHORT n;
+ sal_uInt16 n;
bool bContainsAuto = false;
for (RtfColorTbl::iterator it=m_aColTbl.begin() ; it != m_aColTbl.end(); ++it )
if ((*it).second == rCol)
@@ -997,7 +998,7 @@ void RtfExport::InsColor( const Color& rCol )
else if (!bContainsAuto)
n++;
}
- m_aColTbl.insert(std::pair<USHORT,Color>( n, rCol ));
+ m_aColTbl.insert(std::pair<sal_uInt16,Color>( n, rCol ));
}
void RtfExport::InsColorLine( const SvxBoxItem& rBox )
@@ -1017,7 +1018,7 @@ void RtfExport::OutColorTable()
{
// Build the table from rPool since the colors provided to
// RtfAttributeOutput callbacks are too late.
- USHORT n, nMaxItem;
+ sal_uInt32 nMaxItem;
const SfxItemPool& rPool = pDoc->GetAttrPool();
// char color
@@ -1028,30 +1029,30 @@ void RtfExport::OutColorTable()
if( 0 != ( pCol = (const SvxColorItem*)rPool.GetPoolDefaultItem(
RES_CHRATR_COLOR ) ))
InsColor( pCol->GetValue() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_COLOR);
- for( n = 0; n < nMaxItem; ++n )
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_COLOR);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem(
+ if( 0 != (pCol = (const SvxColorItem*)rPool.GetItem2(
RES_CHRATR_COLOR, n ) ) )
InsColor( pCol->GetValue() );
}
const SvxUnderlineItem* pUnder = (const SvxUnderlineItem*)GetDfltAttr( RES_CHRATR_UNDERLINE );
InsColor( pUnder->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_UNDERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_UNDERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem( RES_CHRATR_UNDERLINE, n ) ) )
+ if( 0 != (pUnder = (const SvxUnderlineItem*)rPool.GetItem2( RES_CHRATR_UNDERLINE, n ) ) )
InsColor( pUnder->GetColor() );
}
const SvxOverlineItem* pOver = (const SvxOverlineItem*)GetDfltAttr( RES_CHRATR_OVERLINE );
InsColor( pOver->GetColor() );
- nMaxItem = rPool.GetItemCount(RES_CHRATR_OVERLINE);
- for( n = 0; n < nMaxItem;n++)
+ nMaxItem = rPool.GetItemCount2(RES_CHRATR_OVERLINE);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
{
- if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem( RES_CHRATR_OVERLINE, n ) ) )
+ if( 0 != (pOver = (const SvxOverlineItem*)rPool.GetItem2( RES_CHRATR_OVERLINE, n ) ) )
InsColor( pOver->GetColor() );
}
@@ -1059,10 +1060,10 @@ void RtfExport::OutColorTable()
}
// background color
- static const USHORT aBrushIds[] = {
+ static const sal_uInt16 aBrushIds[] = {
RES_BACKGROUND, RES_CHRATR_BACKGROUND, 0 };
- for( const USHORT* pIds = aBrushIds; *pIds; ++pIds )
+ for( const sal_uInt16* pIds = aBrushIds; *pIds; ++pIds )
{
const SvxBrushItem* pBkgrd = (const SvxBrushItem*)GetDfltAttr( *pIds );
InsColor( pBkgrd->GetColor() );
@@ -1071,14 +1072,16 @@ void RtfExport::OutColorTable()
{
InsColor( pBkgrd->GetColor() );
}
- nMaxItem = rPool.GetItemCount( *pIds );
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2( *pIds );
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBkgrd = (const SvxBrushItem*)rPool.GetItem2(
*pIds , n ) ))
{
InsColor( pBkgrd->GetColor() );
}
}
+ }
// shadow color
{
@@ -1090,14 +1093,16 @@ void RtfExport::OutColorTable()
{
InsColor( pShadow->GetColor() );
}
- nMaxItem = rPool.GetItemCount(RES_SHADOW);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem(
+ nMaxItem = rPool.GetItemCount2(RES_SHADOW);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pShadow = (const SvxShadowItem*)rPool.GetItem2(
RES_SHADOW, n ) ) )
{
InsColor( pShadow->GetColor() );
}
}
+ }
// frame border color
{
@@ -1105,13 +1110,15 @@ void RtfExport::OutColorTable()
if( 0 != ( pBox = (const SvxBoxItem*)rPool.GetPoolDefaultItem(
RES_BOX ) ))
InsColorLine( *pBox );
- nMaxItem = rPool.GetItemCount(RES_BOX);
- for( n = 0; n < nMaxItem; ++n )
- if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem( RES_BOX, n ) ))
+ nMaxItem = rPool.GetItemCount2(RES_BOX);
+ for (sal_uInt32 n = 0; n < nMaxItem; ++n)
+ {
+ if( 0 != (pBox = (const SvxBoxItem*)rPool.GetItem2( RES_BOX, n ) ))
InsColorLine( *pBox );
}
+ }
- for( n = 0; n < m_aColTbl.size(); n++ )
+ for (size_t n = 0; n < m_aColTbl.size(); ++n)
{
const Color& rCol = m_aColTbl[ n ];
if( n || COL_AUTO != rCol.GetColor() )
@@ -1125,41 +1132,41 @@ void RtfExport::OutColorTable()
}
}
-void RtfExport::InsStyle( USHORT nId, const OString& rStyle )
+void RtfExport::InsStyle( sal_uInt16 nId, const OString& rStyle )
{
- m_aStyTbl.insert(std::pair<USHORT,OString>(nId, rStyle) );
+ m_aStyTbl.insert(std::pair<sal_uInt16,OString>(nId, rStyle) );
}
-OString* RtfExport::GetStyle( USHORT nId )
+OString* RtfExport::GetStyle( sal_uInt16 nId )
{
- std::map<USHORT,OString>::iterator i = m_aStyTbl.find(nId);
+ std::map<sal_uInt16,OString>::iterator i = m_aStyTbl.find(nId);
if (i != m_aStyTbl.end())
return &i->second;
return NULL;
}
-USHORT RtfExport::GetRedline( const String& rAuthor )
+sal_uInt16 RtfExport::GetRedline( const String& rAuthor )
{
- std::map<String,USHORT>::iterator i = m_aRedlineTbl.find(rAuthor);
+ std::map<String,sal_uInt16>::iterator i = m_aRedlineTbl.find(rAuthor);
if (i != m_aRedlineTbl.end())
return i->second;
else
{
int nId = m_aRedlineTbl.size();
- m_aRedlineTbl.insert(std::pair<String,USHORT>(rAuthor,nId));
+ m_aRedlineTbl.insert(std::pair<String,sal_uInt16>(rAuthor,nId));
return nId;
}
}
-const String* RtfExport::GetRedline( USHORT nId )
+const String* RtfExport::GetRedline( sal_uInt16 nId )
{
- for(std::map<String,USHORT>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
+ for(std::map<String,sal_uInt16>::iterator aIter = m_aRedlineTbl.begin(); aIter != m_aRedlineTbl.end(); ++aIter)
if ((*aIter).second == nId)
return &(*aIter).first;
return NULL;
}
-void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage )
+void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage )
{
OSL_TRACE("%s start", OSL_THIS_FUNC);
const SwPageDesc *pSave = pAktPageDesc;
@@ -1187,10 +1194,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
// normal header / footer (without a style)
const SfxPoolItem* pItem;
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_HEADER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, true);
- if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, FALSE,
+ if( pAktPageDesc->GetLeft().GetAttrSet().GetItemState( RES_FOOTER, sal_False,
&pItem ) == SFX_ITEM_SET)
WriteHeaderFooter(*pItem, false);
@@ -1200,10 +1207,10 @@ void RtfExport::OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset,
pAktPageDesc = &rPgDsc;
Strm() << OOO_STRING_SVTOOLS_RTF_TITLEPG;
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_HEADER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, true);
if( pAktPageDesc->GetMaster().GetAttrSet().GetItemState( RES_FOOTER,
- FALSE, &pItem ) == SFX_ITEM_SET )
+ sal_False, &pItem ) == SFX_ITEM_SET )
WriteHeaderFooter(*pItem, false);
}
@@ -1263,7 +1270,7 @@ class SwRTFWriter : public Writer
public:
SwRTFWriter( const String& rFilterName, const String& rBaseURL );
virtual ~SwRTFWriter();
- virtual ULONG WriteStream();
+ virtual sal_uLong WriteStream();
};
SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
@@ -1276,7 +1283,7 @@ SwRTFWriter::SwRTFWriter( const String& rFltName, const String & rBaseURL )
SwRTFWriter::~SwRTFWriter()
{}
-ULONG SwRTFWriter::WriteStream()
+sal_uLong SwRTFWriter::WriteStream()
{
OSL_TRACE("%s", OSL_THIS_FUNC);
RtfExport aExport( NULL, pDoc, new SwPaM( *pCurPam->End(), *pCurPam->Start() ), pCurPam, this, bOutOutlineOnly );
diff --git a/sw/source/filter/ww8/rtfexport.hxx b/sw/source/filter/ww8/rtfexport.hxx
index 5b14c1d3f436..60b6c347ae0c 100644
--- a/sw/source/filter/ww8/rtfexport.hxx
+++ b/sw/source/filter/ww8/rtfexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,9 +41,9 @@
class RtfAttributeOutput;
class RtfExportFilter;
class RtfSdrExport;
-typedef std::map<USHORT,Color> RtfColorTbl;
-typedef std::map<USHORT,rtl::OString> RtfStyleTbl;
-typedef std::map<String,USHORT> RtfRedlineTbl;
+typedef std::map<sal_uInt16,Color> RtfColorTbl;
+typedef std::map<sal_uInt16,rtl::OString> RtfStyleTbl;
+typedef std::map<String,sal_uInt16> RtfRedlineTbl;
class SwNode;
class SwEndNode;
class SwTableNode;
@@ -86,7 +87,7 @@ public:
virtual bool SupportsUnicode() const { return true; }
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
virtual void AppendBookmarks( const SwTxtNode& rNode, xub_StrLen nAktPos, xub_StrLen nLen );
@@ -102,12 +103,12 @@ public:
virtual void WriteRevTab();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode );
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode );
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark );
@@ -121,7 +122,7 @@ public:
virtual void DoFormText(const SwInputField * pFld);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
protected:
/// Format-dependant part of the actual export.
@@ -149,7 +150,7 @@ protected:
virtual void OutputLinkedOLE(const rtl::OUString&);
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
public:
/// Pass the pDocument, pCurrentPam and pOriginalPam to the base class.
@@ -171,26 +172,26 @@ public:
/// This is used by OutputFlyFrame_Impl() to control the written syntax
bool bRTFFlySyntax;
- BOOL m_bOutStyleTab : 1;
+ sal_Bool m_bOutStyleTab : 1;
SvStream& Strm();
- SvStream& OutULong( ULONG nVal );
+ SvStream& OutULong( sal_uLong nVal );
SvStream& OutLong( long nVal );
void OutUnicode(const sal_Char *pToken, const String &rContent);
void OutDateTime(const sal_Char* pStr, const util::DateTime& rDT );
static rtl::OString OutChar(sal_Unicode c, int *pUCMode, rtl_TextEncoding eDestEnc);
static rtl::OString OutString(const String &rStr, rtl_TextEncoding eDestEnc);
- static rtl::OString OutHex(ULONG nHex, BYTE nLen);
- void OutPageDescription( const SwPageDesc& rPgDsc, BOOL bWriteReset, BOOL bCheckForFirstPage );
+ static rtl::OString OutHex(sal_uLong nHex, sal_uInt8 nLen);
+ void OutPageDescription( const SwPageDesc& rPgDsc, sal_Bool bWriteReset, sal_Bool bCheckForFirstPage );
- USHORT GetColor( const Color& rColor ) const;
+ sal_uInt16 GetColor( const Color& rColor ) const;
void InsColor( const Color& rCol );
void InsColorLine( const SvxBoxItem& rBox );
void OutColorTable();
- USHORT GetRedline( const String& rAuthor );
- const String* GetRedline( USHORT nId );
+ sal_uInt16 GetRedline( const String& rAuthor );
+ const String* GetRedline( sal_uInt16 nId );
- void InsStyle( USHORT nId, const rtl::OString& rStyle );
- rtl::OString* GetStyle( USHORT nId );
+ void InsStyle( sal_uInt16 nId, const rtl::OString& rStyle );
+ rtl::OString* GetStyle( sal_uInt16 nId );
private:
/// No copying.
diff --git a/sw/source/filter/ww8/rtfexportfilter.cxx b/sw/source/filter/ww8/rtfexportfilter.cxx
index 891542908425..0aedd4add7f8 100644
--- a/sw/source/filter/ww8/rtfexportfilter.cxx
+++ b/sw/source/filter/ww8/rtfexportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,8 +44,8 @@ using namespace ::comphelper;
using namespace ::com::sun::star;
using ::rtl::OUString;
-RtfExportFilter::RtfExportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfExportFilter::RtfExportFilter( const uno::Reference< uno::XComponentContext >& xCtx) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +130,9 @@ uno::Sequence< OUString > SAL_CALL RtfExport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfExport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfExportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfExportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfexportfilter.hxx b/sw/source/filter/ww8/rtfexportfilter.hxx
index 2a8705e399c1..de7c94cf80ac 100644
--- a/sw/source/filter/ww8/rtfexportfilter.hxx
+++ b/sw/source/filter/ww8/rtfexportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +41,7 @@
class RtfWriter : public Writer
{
protected:
- ULONG WriteStream() { return 0; }
+ sal_uLong WriteStream() { return 0; }
};
/// The physical access to the RTF document (for writing).
@@ -51,11 +52,11 @@ class RtfExportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xSrcDoc;
SvStream* m_pStream;
public:
- RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfExportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfExportFilter();
// XFilter
@@ -76,7 +77,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfExport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFEXPORT "com.sun.star.comp.Writer.RtfExport"
diff --git a/sw/source/filter/ww8/rtfimportfilter.cxx b/sw/source/filter/ww8/rtfimportfilter.cxx
index 52b4ae845710..980c96fd8974 100644
--- a/sw/source/filter/ww8/rtfimportfilter.cxx
+++ b/sw/source/filter/ww8/rtfimportfilter.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,6 +41,7 @@
#include <unotools/ucbstreamhelper.hxx>
#include <com/sun/star/frame/XDesktop.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
using namespace ::comphelper;
@@ -47,8 +49,8 @@ using namespace ::com::sun::star;
using ::rtl::OUString;
using rtl::OUStringToOString;
-RtfImportFilter::RtfImportFilter( const uno::Reference< lang::XMultiServiceFactory >& xMSF) :
- m_xMSF( xMSF )
+RtfImportFilter::RtfImportFilter( const uno::Reference< uno::XComponentContext > &xCtx ) :
+ m_xCtx( xCtx )
{
}
@@ -129,9 +131,9 @@ uno::Sequence< OUString > SAL_CALL RtfImport_getSupportedServiceNames() throw()
return aSeq;
}
-uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< lang::XMultiServiceFactory > & rSMgr ) throw( uno::Exception )
+uno::Reference< uno::XInterface > SAL_CALL RtfImport_createInstance(const uno::Reference< uno::XComponentContext > & xCtx ) throw( uno::Exception )
{
- return (cppu::OWeakObject*) new RtfImportFilter( rSMgr );
+ return (cppu::OWeakObject*) new RtfImportFilter( xCtx );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/rtfimportfilter.hxx b/sw/source/filter/ww8/rtfimportfilter.hxx
index 60532895f9ef..9782dae31300 100644
--- a/sw/source/filter/ww8/rtfimportfilter.hxx
+++ b/sw/source/filter/ww8/rtfimportfilter.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,10 +45,10 @@ class RtfImportFilter : public cppu::WeakImplHelper2
>
{
protected:
- ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xCtx;
::com::sun::star::uno::Reference< ::com::sun::star::lang::XComponent > m_xDstDoc;
public:
- RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
+ RtfImportFilter( const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& xCtx );
virtual ~RtfImportFilter();
// XFilter
@@ -66,7 +67,7 @@ public:
throw();
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL RtfImport_createInstance(
const ::com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > &xMSF)
+ com::sun::star::uno::XComponentContext > &xCtx)
throw( ::com::sun::star::uno::Exception );
#define IMPL_NAME_RTFIMPORT "com.sun.star.comp.Writer.RtfImport"
diff --git a/sw/source/filter/ww8/rtfsdrexport.cxx b/sw/source/filter/ww8/rtfsdrexport.cxx
index f18ebfd3c25b..99a166196d09 100644
--- a/sw/source/filter/ww8/rtfsdrexport.cxx
+++ b/sw/source/filter/ww8/rtfsdrexport.cxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -89,7 +90,7 @@ RtfSdrExport::~RtfSdrExport()
delete[] m_pShapeTypeWritten, m_pShapeTypeWritten = NULL;
}
-void RtfSdrExport::OpenContainer( UINT16 nEscherContainer, int nRecInstance )
+void RtfSdrExport::OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -122,7 +123,7 @@ void RtfSdrExport::CloseContainer()
EscherEx::CloseContainer();
}
-UINT32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
+sal_uInt32 RtfSdrExport::EnterGroup( const String& /*rShapeName*/, const Rectangle* /*pRect*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -136,7 +137,7 @@ void RtfSdrExport::LeaveGroup()
/* noop */
}
-void RtfSdrExport::AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 /*nShapeId*/ )
+void RtfSdrExport::AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 /*nShapeId*/ )
{
OSL_TRACE("%s", OSL_THIS_FUNC);
@@ -521,10 +522,10 @@ void RtfSdrExport::WriteOutliner(const OutlinerParaObject& rParaObj)
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( m_rExport, rEditObj, TXT_HFTXTBOX );
- USHORT nPara = rEditObj.GetParagraphCount();
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
m_rAttrOutput.RunText().append('{').append(OOO_STRING_SVTOOLS_RTF_SHPTXT).append(' ');
- for (USHORT n = 0; n < nPara; ++n)
+ for (sal_uInt16 n = 0; n < nPara; ++n)
{
if( n )
aAttrIter.NextPara( n );
@@ -578,7 +579,7 @@ void RtfSdrExport::EndShape( sal_Int32 nShapeElement )
}
}
-UINT32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
+sal_uInt32 RtfSdrExport::AddSdrObject( const SdrObject& rObj )
{
m_pSdrObject = &rObj;
return EscherEx::AddSdrObject(rObj);
diff --git a/sw/source/filter/ww8/rtfsdrexport.hxx b/sw/source/filter/ww8/rtfsdrexport.hxx
index b25f5196de4c..f461357e5c61 100644
--- a/sw/source/filter/ww8/rtfsdrexport.hxx
+++ b/sw/source/filter/ww8/rtfsdrexport.hxx
@@ -3,6 +3,7 @@
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
+ * Copyright 2000, 2010 Oracle and/or its affiliates.
* Copyright 2010 Miklos Vajna.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -68,7 +69,7 @@ public:
/// Export the sdr object as Sdr.
///
/// Call this when you need to export the object as Sdr in RTF.
- UINT32 AddSdrObject( const SdrObject& rObj );
+ sal_uInt32 AddSdrObject( const SdrObject& rObj );
protected:
/// Add an attribute to the generated shape element.
@@ -93,14 +94,14 @@ protected:
private:
- virtual void OpenContainer( UINT16 nEscherContainer, int nRecInstance = 0 );
+ virtual void OpenContainer( sal_uInt16 nEscherContainer, int nRecInstance = 0 );
virtual void CloseContainer();
using EscherEx::EnterGroup;
- virtual UINT32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
+ virtual sal_uInt32 EnterGroup( const String& rShapeName, const Rectangle* pBoundRect = 0 );
virtual void LeaveGroup();
- virtual void AddShape( UINT32 nShapeType, UINT32 nShapeFlags, UINT32 nShapeId = 0 );
+ virtual void AddShape( sal_uInt32 nShapeType, sal_uInt32 nShapeFlags, sal_uInt32 nShapeId = 0 );
private:
/// Add starting and ending point of a line to the m_pShapeAttrList.
diff --git a/sw/source/filter/ww8/writerhelper.cxx b/sw/source/filter/ww8/writerhelper.cxx
index 97f6316c9be4..cb1471fa88ab 100644
--- a/sw/source/filter/ww8/writerhelper.cxx
+++ b/sw/source/filter/ww8/writerhelper.cxx
@@ -117,7 +117,7 @@ namespace
};
// <--
- bool IsValidSlotWhich(USHORT nSlotId, USHORT nWhichId)
+ bool IsValidSlotWhich(sal_uInt16 nSlotId, sal_uInt16 nWhichId)
{
return (nSlotId != 0 && nWhichId != 0 && nSlotId != nWhichId);
}
@@ -132,8 +132,8 @@ namespace
sw::Frames SwPosFlyFrmsToFrames(const SwPosFlyFrms &rFlys)
{
sw::Frames aRet;
- USHORT nEnd = rFlys.Count();
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = rFlys.Count();
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
{
const SwFrmFmt &rEntry = rFlys[nI]->GetFmt();
if (const SwPosition* pAnchor = rEntry.GetAnchor().GetCntntAnchor())
@@ -153,9 +153,9 @@ namespace
class anchoredto: public std::unary_function<const sw::Frame&, bool>
{
private:
- ULONG mnNode;
+ sal_uLong mnNode;
public:
- anchoredto(ULONG nNode) : mnNode(nNode) {}
+ anchoredto(sal_uLong nNode) : mnNode(nNode) {}
bool operator()(const sw::Frame &rFrame) const
{
return (mnNode == rFrame.GetPosition().nNode.GetNode().GetIndex());
@@ -252,10 +252,10 @@ namespace sw
namespace hack
{
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich)
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich)
{
- USHORT nSlotId = rSrcPool.GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rSrcPool.GetSlotId(nWhich);
if (IsValidSlotWhich(nSlotId, nWhich))
nWhich = rDestPool.GetWhich(nSlotId);
else
@@ -263,8 +263,8 @@ namespace sw
return nWhich;
}
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich)
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich)
{
if (RES_WHICHHINT_END < *(rSet.GetRanges()))
{
@@ -404,8 +404,8 @@ namespace sw
{
if( bExportParentItemSet )
{
- USHORT nTotal = rSet.TotalCount();
- for( USHORT nItem =0; nItem < nTotal; ++nItem )
+ sal_uInt16 nTotal = rSet.TotalCount();
+ for( sal_uInt16 nItem =0; nItem < nTotal; ++nItem )
{
const SfxPoolItem* pItem = 0;
if( SFX_ITEM_SET == rSet.GetItemState( rSet.GetWhichByPos( nItem ), true, &pItem ) )
@@ -459,7 +459,7 @@ namespace sw
mysizet nCount = pColls ? pColls->Count() : 0;
aStyles.reserve(nCount);
for (mysizet nI = 0; nI < nCount; ++nI)
- aStyles.push_back((*pColls)[ static_cast< USHORT >(nI) ]);
+ aStyles.push_back((*pColls)[ static_cast< sal_uInt16 >(nI) ]);
return aStyles;
}
@@ -507,7 +507,7 @@ namespace sw
SwPosFlyFrms aFlys;
rDoc.GetAllFlyFmts(aFlys, pPaM, true);
sw::Frames aRet(SwPosFlyFrmsToFrames(aFlys));
- for (USHORT i = aFlys.Count(); i > 0;)
+ for (sal_uInt16 i = aFlys.Count(); i > 0;)
delete aFlys[--i];
return aRet;
}
@@ -528,7 +528,7 @@ namespace sw
0 != (pRule = rTxtNode.GetNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
OSL_ENSURE(rTxtNode.GetDoc(), "No document for node?, suspicious");
@@ -540,7 +540,7 @@ namespace sw
0 != (pRule = rTxtNode.GetDoc()->GetOutlineNumRule())
)
{
- return &(pRule->Get( static_cast< USHORT >(rTxtNode.GetActualListLevel()) ));
+ return &(pRule->Get( static_cast< sal_uInt16 >(rTxtNode.GetActualListLevel()) ));
}
return 0;
@@ -764,16 +764,16 @@ namespace sw
std::for_each(maStack.begin(), maStack.end(), SetInDocAndDelete(mrDoc));
}
- USHORT WrtRedlineAuthor::AddName( const String& rNm )
+ sal_uInt16 WrtRedlineAuthor::AddName( const String& rNm )
{
- USHORT nRet;
+ sal_uInt16 nRet;
typedef std::vector<String>::iterator myiter;
myiter aIter = std::find(maAuthors.begin(), maAuthors.end(), rNm);
if (aIter != maAuthors.end())
- nRet = static_cast< USHORT >(aIter - maAuthors.begin());
+ nRet = static_cast< sal_uInt16 >(aIter - maAuthors.begin());
else
{
- nRet = static_cast< USHORT >(maAuthors.size());
+ nRet = static_cast< sal_uInt16 >(maAuthors.size());
maAuthors.push_back(rNm);
}
return nRet;
diff --git a/sw/source/filter/ww8/writerhelper.hxx b/sw/source/filter/ww8/writerhelper.hxx
index efbc231ffb3f..2f16b06f770f 100644
--- a/sw/source/filter/ww8/writerhelper.hxx
+++ b/sw/source/filter/ww8/writerhelper.hxx
@@ -819,8 +819,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT TransformWhichBetweenPools(const SfxItemPool &rDestPool,
- const SfxItemPool &rSrcPool, USHORT nWhich);
+ sal_uInt16 TransformWhichBetweenPools(const SfxItemPool &rDestPool,
+ const SfxItemPool &rSrcPool, sal_uInt16 nWhich);
/** Map a SwDoc WhichId to the equivalent Id for a given SfxItemSet
@@ -849,8 +849,8 @@ namespace sw
@author
<a href="mailto:cmc@openoffice.org">Caol&aacute;n McNamara</a>
*/
- USHORT GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
- const SwDoc &rDoc, USHORT nWhich);
+ sal_uInt16 GetSetWhichFromSwDocWhich(const SfxItemSet &rSet,
+ const SwDoc &rDoc, sal_uInt16 nWhich);
/** Make inserting an OLE object into a Writer document easy
diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx
index bdd3b705c663..878286ccbb23 100644
--- a/sw/source/filter/ww8/writerwordglue.cxx
+++ b/sw/source/filter/ww8/writerwordglue.cxx
@@ -757,26 +757,26 @@ namespace sw
DateTime aDateTime(Date( 0 ), Time( 0 ));
if( lDTTM )
{
- USHORT lMin = (USHORT)(lDTTM & 0x0000003F);
+ sal_uInt16 lMin = (sal_uInt16)(lDTTM & 0x0000003F);
lDTTM >>= 6;
- USHORT lHour= (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lHour= (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lDay = (USHORT)(lDTTM & 0x0000001F);
+ sal_uInt16 lDay = (sal_uInt16)(lDTTM & 0x0000001F);
lDTTM >>= 5;
- USHORT lMon = (USHORT)(lDTTM & 0x0000000F);
+ sal_uInt16 lMon = (sal_uInt16)(lDTTM & 0x0000000F);
lDTTM >>= 4;
- USHORT lYear= (USHORT)(lDTTM & 0x000001FF) + 1900;
+ sal_uInt16 lYear= (sal_uInt16)(lDTTM & 0x000001FF) + 1900;
aDateTime = DateTime(Date(lDay, lMon, lYear), Time(lHour, lMin));
}
return aDateTime;
}
- ULONG MSDateTimeFormatToSwFormat(String& rParams,
- SvNumberFormatter *pFormatter, USHORT &rLang, bool bHijri,
- USHORT nDocLang)
+ sal_uLong MSDateTimeFormatToSwFormat(String& rParams,
+ SvNumberFormatter *pFormatter, sal_uInt16 &rLang, bool bHijri,
+ sal_uInt16 nDocLang)
{
// tell the Formatter about the new entry
- UINT16 nCheckPos = 0;
+ sal_uInt16 nCheckPos = 0;
short nType = NUMBERFORMAT_DEFINED;
sal_uInt32 nKey = 0;
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index e3cd3c0424c2..336ef5cee40d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -202,19 +202,19 @@ void WW8Export::DoComboBox(const rtl::OUString &rName,
OutputField(0, ww::eFORMDROPDOWN, FieldString(ww::eFORMDROPDOWN),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(), sizeof(aArr1), aArr1);
@@ -249,18 +249,18 @@ void WW8Export::DoCheckBox(uno::Reference<beans::XPropertySet> xPropSet)
OutputField(0, ww::eFORMCHECKBOX, FieldString(ww::eFORMCHECKBOX),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -309,18 +309,18 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, FieldString(ww::eFORMTEXT),
WRITEFIELD_START | WRITEFIELD_CMD_START);
// write the refence to the "picture" structure
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry( Strm().Tell() );
WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x02, 0x08, 0x81, // sprmCFFldVanish
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01 // sprmCFSpec
};
- BYTE* pDataAdr = aArr1 + 5;
+ sal_uInt8* pDataAdr = aArr1 + 5;
Set_UInt32( pDataAdr, nDataStt );
pChpPlc->AppendFkpEntry(Strm().Tell(),
@@ -336,9 +336,10 @@ void WW8Export::DoFormText(const SwInputField * pFld)
OutputField(0, ww::eFORMTEXT, aEmptyStr, WRITEFIELD_CMD_END);
- SwWW8Writer::WriteString16(Strm(), pFld->Expand(), false);
+ String const fieldStr( pFld->ExpandField(true) );
+ SwWW8Writer::WriteString16(Strm(), fieldStr, false);
- static BYTE aArr2[] = {
+ static sal_uInt8 aArr2[] = {
0x03, 0x6a, 0x00, 0x00, 0x00, 0x00, // sprmCPicLocation
0x55, 0x08, 0x01, // sprmCFSpec
0x75, 0x08, 0x01 // ???
@@ -542,7 +543,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
}
// <--
- INT32 nThick = aIter->mnThick;
+ sal_Int32 nThick = aIter->mnThick;
//If we are being exported as an inline hack, set
//corner to 0 and forget about border thickness for positioning
@@ -570,7 +571,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
SwWW8Writer::WriteLong(*rWrt.pTableStrm,aRect.Bottom() - nThick);
//fHdr/bx/by/wr/wrk/fRcaSimple/fBelowText/fAnchorLock
- USHORT nFlags=0;
+ sal_uInt16 nFlags=0;
//If nFlags isn't 0x14 its overridden by the escher properties
if (FLY_AT_PAGE == rFmt.GetAnchor().GetAnchorId())
nFlags = 0x0000;
@@ -578,7 +579,7 @@ void PlcDrawObj::WritePlc( WW8Export& rWrt ) const
nFlags = 0x0014; // x-rel to text, y-rel to text
const SwFmtSurround& rSurr = rFmt.GetSurround();
- USHORT nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
+ sal_uInt16 nContour = rSurr.IsContour() ? 0x0080 : 0x0040;
SwSurround eSurround = rSurr.GetSurround();
/*
@@ -699,7 +700,7 @@ bool PlcDrawObj::Append( WW8Export& rWrt, WW8_CP nCp, const sw::Frame& rFmt,
return bRet;
}
-void DrawObj::SetShapeDetails(UINT32 nId, INT32 nThick)
+void DrawObj::SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick)
{
mnShapeId = nId;
mnThick = nThick;
@@ -725,7 +726,7 @@ bool WW8_WrPlcTxtBoxes::WriteTxt( WW8Export& rWrt )
return bRet;
}
-void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, UINT32 nShapeId )
+void WW8_WrPlcTxtBoxes::Append( const SdrObject& rObj, sal_uInt32 nShapeId )
{
void* p = (void*)&rObj;
aCntnt.Insert( p, aCntnt.Count() );
@@ -739,9 +740,9 @@ const SvULongs* WW8_WrPlcTxtBoxes::GetShapeIdArr() const
/* */
-UINT32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
+sal_uInt32 WW8Export::GetSdrOrdNum( const SwFrmFmt& rFmt ) const
{
- UINT32 nOrdNum;
+ sal_uInt32 nOrdNum;
const SdrObject* pObj = rFmt.FindRealSdrObject();
if( pObj )
nOrdNum = pObj->GetOrdNum();
@@ -805,7 +806,7 @@ void WW8Export::AppendFlyInFlys(const sw::Frame& rFrmFmt,
}
MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
- const EditTextObject& rEditObj, BYTE nTyp )
+ const EditTextObject& rEditObj, sal_uInt8 nTyp )
: MSWordAttrIter( rWr ), pEditObj(&rEditObj), pEditPool(0),
aTxtAtrArr( 0, 4 ), aChrTxtAtrArr( 0, 4 ), aChrSetArr( 0, 4 ),
mnTyp(nTyp)
@@ -813,7 +814,7 @@ MSWord_SdrAttrIter::MSWord_SdrAttrIter( MSWordExportBase& rWr,
NextPara( 0 );
}
-void MSWord_SdrAttrIter::NextPara( USHORT nPar )
+void MSWord_SdrAttrIter::NextPara( sal_uInt16 nPar )
{
nPara = nPar;
// Attributwechsel an Pos 0 wird ignoriert, da davon ausgegangen
@@ -888,7 +889,7 @@ void MSWord_SdrAttrIter::SetCharSet(const EECharAttrib& rAttr, bool bStart)
if( p )
{
- USHORT nPos;
+ sal_uInt16 nPos;
if( bStart )
{
nPos = aChrSetArr.Count();
@@ -909,7 +910,7 @@ void MSWord_SdrAttrIter::OutEEField(const SfxPoolItem& rHt)
const SvxFieldData *pFld = rField.GetField();
if (pFld && pFld->ISA(SvxURLField))
{
- BYTE nOldTxtTyp = m_rExport.nTxtTyp;
+ sal_uInt8 nOldTxtTyp = m_rExport.nTxtTyp;
m_rExport.nTxtTyp = mnTyp;
const SvxURLField *pURL = (const SvxURLField *)pFld;
m_rExport.AttrOutput().StartURL( pURL->GetURL(), pURL->GetTargetFrame() );
@@ -935,7 +936,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
const SfxItemPool& rDstPool = m_rExport.pDoc->GetAttrPool();
nTmpSwPos = nSwPos;
- USHORT i, nWhich, nSlotId;
+ sal_uInt16 i, nWhich, nSlotId;
for( i = 0; i < aTxtAtrArr.Count(); i++ )
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
@@ -981,7 +982,7 @@ void MSWord_SdrAttrIter::OutAttr( xub_StrLen nSwPos )
bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[ i ];
if (nSwPos >= rHt.nStart && nSwPos < rHt.nEnd)
@@ -1004,14 +1005,14 @@ bool MSWord_SdrAttrIter::IsTxtAttr(xub_StrLen nSwPos)
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
+const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = 0;
nWhich = sw::hack::TransformWhichBetweenPools(*pEditPool,
m_rExport.pDoc->GetAttrPool(), nWhich);
if (nWhich)
{
- for (USHORT i = 0; i < aTxtAtrArr.Count(); ++i)
+ for (sal_uInt16 i = 0; i < aTxtAtrArr.Count(); ++i)
{
const EECharAttrib& rHt = aTxtAtrArr[i];
if (
@@ -1029,7 +1030,7 @@ const SfxPoolItem* MSWord_SdrAttrIter::HasTextItem(USHORT nWhich) const
return pRet;
}
-const SfxPoolItem& MSWord_SdrAttrIter::GetItem( USHORT nWhich ) const
+const SfxPoolItem& MSWord_SdrAttrIter::GetItem( sal_uInt16 nWhich ) const
{
using sw::hack::GetSetWhichFromSwDocWhich;
const SfxPoolItem* pRet = HasTextItem(nWhich);
@@ -1058,7 +1059,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
* pDstPool = &m_rExport.pDoc->GetAttrPool();
do {
- USHORT nWhich = pItem->Which(),
+ sal_uInt16 nWhich = pItem->Which(),
nSlotId = pSrcPool->GetSlotId( nWhich );
if ( nSlotId && nWhich != nSlotId &&
@@ -1079,7 +1080,7 @@ void MSWord_SdrAttrIter::OutParaAttr(bool bCharAttr)
}
}
-void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
+void WW8Export::WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp)
{
const SdrTextObj* pTxtObj = PTR_CAST(SdrTextObj, &rObj);
OSL_ENSURE(pTxtObj, "That is no SdrTextObj!");
@@ -1112,15 +1113,15 @@ void WW8Export::WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp)
}
}
-void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
+void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, sal_uInt8 nTyp)
{
bool bAnyWrite = false;
const EditTextObject& rEditObj = rParaObj.GetTextObject();
MSWord_SdrAttrIter aAttrIter( *this, rEditObj, nTyp );
- USHORT nPara = rEditObj.GetParagraphCount();
- BYTE bNul = 0;
- for( USHORT n = 0; n < nPara; ++n )
+ sal_uInt16 nPara = rEditObj.GetParagraphCount();
+ sal_uInt8 bNul = 0;
+ for( sal_uInt16 n = 0; n < nPara; ++n )
{
if( n )
aAttrIter.NextPara( n );
@@ -1171,7 +1172,7 @@ void WW8Export::WriteOutliner(const OutlinerParaObject& rParaObj, BYTE nTyp)
aAttrIter.OutParaAttr(false);
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( Strm().Tell(),
pO->Count(), pO->GetData() );
pO->Remove( 0, pO->Count() ); // leeren
@@ -1194,19 +1195,19 @@ void WinwordAnchoring::WriteData( EscherEx& rEx ) const
if (mbInline)
{
rEx.AddAtom(18, DFF_msofbtUDefProp, 3, 3); //Prop id is 0xF122
- rSt << (UINT16)0x0390 << sal_uInt32(3);
- rSt << (UINT16)0x0392 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0390 << sal_uInt32(3);
+ rSt << (sal_uInt16)0x0392 << sal_uInt32(3);
//This sub property is required to be in the dummy inline frame as
//well
- rSt << (UINT16)0x053F << nInlineHack;
+ rSt << (sal_uInt16)0x053F << nInlineHack;
}
else
{
rEx.AddAtom(24, DFF_msofbtUDefProp, 3, 4 ); //Prop id is 0xF122
- rSt << (UINT16)0x038F << mnXAlign;
- rSt << (UINT16)0x0390 << mnXRelTo;
- rSt << (UINT16)0x0391 << mnYAlign;
- rSt << (UINT16)0x0392 << mnYRelTo;
+ rSt << (sal_uInt16)0x038F << mnXAlign;
+ rSt << (sal_uInt16)0x0390 << mnXRelTo;
+ rSt << (sal_uInt16)0x0391 << mnYAlign;
+ rSt << (sal_uInt16)0x0392 << mnYRelTo;
}
}
}
@@ -1231,7 +1232,7 @@ void WW8Export::WriteEscher()
{
if (pEscher)
{
- ULONG nStart = pTableStrm->Tell();
+ sal_uLong nStart = pTableStrm->Tell();
pEscher->WritePictures();
pEscher->FinishEscher();
@@ -1247,7 +1248,7 @@ void SwEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = rWrt.Strm().Tell();
+ sal_Int32 nEndPos = rWrt.Strm().Tell();
mxGlobal->SetNewBlipStreamOffset( nEndPos );
pPicStrm->Seek( 0 );
@@ -1292,7 +1293,7 @@ void SwBasicEscherEx::WriteFrmExtraData(const SwFrmFmt&)
GetStream() << (sal_uInt32)0x80000000;
}
-void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
OpenContainer(ESCHER_SpContainer);
AddShape(ESCHER_ShpInst_PictureFrame, 0xa00, nShapeId);
@@ -1300,12 +1301,12 @@ void SwBasicEscherEx::WriteEmptyFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
WriteFrmExtraData(rFmt);
AddAtom(6, DFF_msofbtUDefProp, 3, 1); //Prop id is 0xF122
- GetStream() << (UINT16)0x053F << nInlineHack;
+ GetStream() << (sal_uInt16)0x053F << nInlineHack;
CloseContainer(); // ESCHER_SpContainer
}
-UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
+sal_uInt32 AddMirrorFlags(sal_uInt32 nFlags, const SwMirrorGrf &rMirror)
{
switch (rMirror.GetValue())
{
@@ -1327,9 +1328,9 @@ UINT32 AddMirrorFlags(UINT32 nFlags, const SwMirrorGrf &rMirror)
return nFlags;
}
-INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
SwNoTxtNode *pNd = GetNoTxtNodeFromSwFrmFmt(rFmt);
SwGrfNode *pGrfNd = pNd ? pNd->GetGrfNode() : 0;
OSL_ENSURE(pGrfNd, "No SwGrfNode ?, suspicious");
@@ -1344,7 +1345,7 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
EscherPropertyContainer aPropOpt;
- UINT32 nFlags = ESCHER_BlipFlagDefault;
+ sal_uInt32 nFlags = ESCHER_BlipFlagDefault;
if (pGrfNd->IsLinkedFile())
{
@@ -1355,8 +1356,8 @@ INT32 SwBasicEscherEx::WriteGrfFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
SwWW8Writer::InsAsString16( aBuf, sURL );
SwWW8Writer::InsUInt16( aBuf, 0 );
- USHORT nArrLen = aBuf.Count();
- BYTE* pArr = new BYTE[ nArrLen ];
+ sal_uInt16 nArrLen = aBuf.Count();
+ sal_uInt8* pArr = new sal_uInt8[ nArrLen ];
memcpy( pArr, aBuf.GetData(), nArrLen );
aPropOpt.AddOpt(ESCHER_Prop_pibName, true, nArrLen, pArr, nArrLen);
@@ -1486,7 +1487,7 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
true, &pItem))
{
const Size aSz( rNd.GetTwipSize() );
- INT32 nVal;
+ sal_Int32 nVal;
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetLeft() ) )
rPropOpt.AddOpt( ESCHER_Prop_cropFromLeft, ToFract16( nVal, aSz.Width()) );
if( 0 != ( nVal = ((SwCropGrf*)pItem )->GetRight() ) )
@@ -1498,23 +1499,23 @@ void SwBasicEscherEx::WriteGrfAttr(const SwNoTxtNode& rNd,
}
}
-void SwBasicEscherEx::SetPicId(const SdrObject &, UINT32,
+void SwBasicEscherEx::SetPicId(const SdrObject &, sal_uInt32,
EscherPropertyContainer &)
{
}
-void SwEscherEx::SetPicId(const SdrObject &rSdrObj, UINT32 nShapeId,
+void SwEscherEx::SetPicId(const SdrObject &rSdrObj, sal_uInt32 nShapeId,
EscherPropertyContainer &rPropOpt)
{
pTxtBxs->Append(rSdrObj, nShapeId);
- UINT32 nPicId = pTxtBxs->Count();
+ sal_uInt32 nPicId = pTxtBxs->Count();
nPicId *= 0x10000;
rPropOpt.AddOpt( ESCHER_Prop_pictureId, nPicId );
}
-INT32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, UINT32 nShapeId)
+sal_Int32 SwBasicEscherEx::WriteOLEFlyFrame(const SwFrmFmt& rFmt, sal_uInt32 nShapeId)
{
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
SwNodeIndex aIdx(*rFmt.GetCntnt().GetCntntIdx(), 1);
@@ -1613,7 +1614,7 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
else
{
- UINT32 nFillColor = GetColor(rBrush.GetColor(), false);
+ sal_uInt32 nFillColor = GetColor(rBrush.GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_fillColor, nFillColor );
rPropOpt.AddOpt( ESCHER_Prop_fillBackColor, nFillColor ^ 0xffffff );
rPropOpt.AddOpt( ESCHER_Prop_fNoFillHitTest, 0x100010 );
@@ -1630,27 +1631,27 @@ void SwBasicEscherEx::WriteBrushAttr(const SvxBrushItem &rBrush,
}
}
-INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
+sal_Int32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
MSO_SPT eShapeType, EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth=0;
+ sal_Int32 nLineWidth=0;
const SfxPoolItem* pItem;
bool bFirstLine = true;
if (SFX_ITEM_SET == rFmt.GetItemState(RES_BOX, true, &pItem))
{
- static const UINT16 aExhperProp[4] =
+ static const sal_uInt16 aExhperProp[4] =
{
ESCHER_Prop_dyTextTop, ESCHER_Prop_dyTextBottom,
ESCHER_Prop_dxTextLeft, ESCHER_Prop_dxTextRight
};
const SvxBorderLine* pLine;
- for( USHORT n = 0; n < 4; ++n )
+ for( sal_uInt16 n = 0; n < 4; ++n )
if( 0 != ( pLine = ((SvxBoxItem*)pItem)->GetLine( n )) )
{
if( bFirstLine )
{
- UINT32 nLineColor = GetColor(pLine->GetColor(), false);
+ sal_uInt32 nLineColor = GetColor(pLine->GetColor(), false);
rPropOpt.AddOpt( ESCHER_Prop_lineColor, nLineColor );
rPropOpt.AddOpt( ESCHER_Prop_lineBackColor,
nLineColor ^ 0xffffff );
@@ -1730,10 +1731,10 @@ INT32 SwBasicEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt,
return nLineWidth;
}
-INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
+sal_Int32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
EscherPropertyContainer& rPropOpt)
{
- INT32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
+ sal_Int32 nLineWidth = SwBasicEscherEx::WriteFlyFrameAttr(rFmt, eShapeType,
rPropOpt);
/*
@@ -1815,7 +1816,7 @@ INT32 SwEscherEx::WriteFlyFrameAttr(const SwFrmFmt& rFmt, MSO_SPT eShapeType,
//PropOpt wants to own the buffer
aPolyDump.ObjectOwnsMemory(false);
rPropOpt.AddOpt(DFF_Prop_pWrapPolygonVertices, false,
- nArrLen, static_cast<BYTE *>(pArr), nArrLen);
+ nArrLen, static_cast<sal_uInt8 *>(pArr), nArrLen);
}
}
}
@@ -1845,11 +1846,11 @@ void SwBasicEscherEx::Init()
SetHellLayerId(rWrt.pDoc->GetHellId());
}
-INT32 SwBasicEscherEx::ToFract16(INT32 nVal, UINT32 nMax) const
+sal_Int32 SwBasicEscherEx::ToFract16(sal_Int32 nVal, sal_uInt32 nMax) const
{
if (nMax)
{
- INT32 nMSVal = (nVal / 65536) * nMax;
+ sal_Int32 nMSVal = (nVal / 65536) * nMax;
nMSVal += (nVal * 65536 ) / nMax;
return nMSVal;
}
@@ -1866,7 +1867,7 @@ void SwBasicEscherEx::WritePictures()
if( SvStream* pPicStrm = static_cast< SwEscherExGlobal& >( *mxGlobal ).GetPictureStream() )
{
// set the blip - entries to the correct stream pos
- INT32 nEndPos = pPicStrm->Tell();
+ sal_Int32 nEndPos = pPicStrm->Tell();
mxGlobal->WriteBlibStoreEntry(*pEscherStrm, 1, sal_True, nEndPos);
pPicStrm->Seek(0);
@@ -1892,7 +1893,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
CloseContainer(); // ESCHER_DggContainer
- BYTE i = 2; // for header/footer and the other
+ sal_uInt8 i = 2; // for header/footer and the other
PlcDrawObj *pSdrObjs = rWrt.pHFSdrObjs;
pTxtBxs = rWrt.pHFTxtBxs;
@@ -1913,7 +1914,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
EnterGroup( 0 );
- ULONG nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
+ sal_uLong nSecondShapeId = pSdrObjs == rWrt.pSdrObjs ? GenerateShapeId() : 0;
// write now all Writer-/DrawObjects
DrawObjPointerVector aSorted;
@@ -1923,7 +1924,7 @@ SwEscherEx::SwEscherEx(SvStream* pStrm, WW8Export& rWW8Wrt)
DrawObjPointerIter aEnd = aSorted.end();
for (DrawObjPointerIter aIter = aSorted.begin(); aIter != aEnd; ++aIter)
{
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
DrawObj *pObj = (*aIter);
OSL_ENSURE(pObj, "impossible");
if (!pObj)
@@ -2480,13 +2481,13 @@ void SwEscherEx::WriteFrmExtraData( const SwFrmFmt& rFmt )
GetStream() << 1L;
}
-INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
+sal_Int32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, sal_uInt32 &rShapeId,
DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
// check for textflyframe and if it is the first in a Chain
- INT32 nBorderThick = 0;
+ sal_Int32 nBorderThick = 0;
const SwNodeIndex* pNdIdx = rFmt.GetCntnt().GetCntntIdx();
if( pNdIdx )
{
@@ -2503,8 +2504,8 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
if (const SdrObject* pObj = rFmt.FindRealSdrObject())
{
// check for the first in a Chain
- UINT32 nTxtId;
- USHORT nOff = 0;
+ sal_uInt32 nTxtId;
+ sal_uInt16 nOff = 0;
const SwFrmFmt* pFmt = &rFmt, *pPrev;
while( 0 != ( pPrev = pFmt->GetChain().GetPrev() ))
{
@@ -2532,7 +2533,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
nTxtId = pTxtBxs->GetPos( p );
if( USHRT_MAX == nTxtId )
{
- UINT32 nPrevShapeId =
+ sal_uInt32 nPrevShapeId =
GetFlyShapeId(*pFmt, rObj.mnHdFtIndex, rPVec);
pTxtBxs->Append( *pPrevObj, nPrevShapeId );
nTxtId = pTxtBxs->Count();
@@ -2550,7 +2551,7 @@ INT32 SwEscherEx::WriteFlyFrm(const DrawObj &rObj, UINT32 &rShapeId,
return nBorderThick;
}
-USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
+sal_uInt16 FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
DrawObjPointerVector &rPVec)
{
DrawObjPointerIter aEnd = rPVec.end();
@@ -2565,19 +2566,19 @@ USHORT FindPos(const SwFrmFmt &rFmt, unsigned int nHdFtIndex,
&rFmt == (&pObj->maCntnt.GetFrmFmt())
)
{
- return static_cast< USHORT >(aIter - rPVec.begin());
+ return static_cast< sal_uInt16 >(aIter - rPVec.begin());
}
}
return USHRT_MAX;
}
-INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
- UINT32 nTxtBox, DrawObjPointerVector &rPVec)
+sal_Int32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, sal_uInt32 nShapeId,
+ sal_uInt32 nTxtBox, DrawObjPointerVector &rPVec)
{
const SwFrmFmt &rFmt = rObj.maCntnt.GetFrmFmt();
short nDirection = rObj.mnDirection;
- INT32 nBorderThick=0;
+ sal_Int32 nBorderThick=0;
OpenContainer( ESCHER_SpContainer );
AddShape( ESCHER_ShpInst_TextBox, 0xa00, nShapeId );
@@ -2585,7 +2586,7 @@ INT32 SwEscherEx::WriteTxtFlyFrame(const DrawObj &rObj, UINT32 nShapeId,
aPropOpt.AddOpt(ESCHER_Prop_lTxid, nTxtBox);
if (const SwFrmFmt *pNext = rFmt.GetChain().GetNext())
{
- USHORT nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
+ sal_uInt16 nPos = FindPos(*pNext, rObj.mnHdFtIndex, rPVec);
if (USHRT_MAX != nPos && aFollowShpIds[nPos])
aPropOpt.AddOpt(ESCHER_Prop_hspNext, aFollowShpIds[nPos]);
}
@@ -2646,7 +2647,7 @@ void SwBasicEscherEx::WriteOLEPicture(EscherPropertyContainer &rPropOpt,
rPropOpt.AddOpt( ESCHER_Prop_pictureActive, 0x10000 );
}
-void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
+void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, sal_uInt32 nShapeId )
{
if (const SdrObject* pSdrObj = rFmt.FindRealSdrObject())
{
@@ -2679,15 +2680,15 @@ void SwEscherEx::WriteOCXControl( const SwFrmFmt& rFmt, UINT32 nShapeId )
void SwEscherEx::MakeZOrderArrAndFollowIds(
std::vector<DrawObj>& rSrcArr, std::vector<DrawObj*>&rDstArr)
{
- USHORT n, nCnt = static_cast< USHORT >(rSrcArr.size());
+ sal_uInt16 n, nCnt = static_cast< sal_uInt16 >(rSrcArr.size());
SvULongsSort aSort( 255 < nCnt ? 255 : nCnt, 255 );
rDstArr.clear();
rDstArr.reserve(nCnt);
for (n = 0; n < nCnt; ++n)
{
const SwFrmFmt &rFmt = rSrcArr[n].maCntnt.GetFrmFmt();
- ULONG nOrdNum = rWrt.GetSdrOrdNum(rFmt);
- USHORT nPos;
+ sal_uLong nOrdNum = rWrt.GetSdrOrdNum(rFmt);
+ sal_uInt16 nPos;
//returns what will be the index in rDstArr of p as nPos
aSort.Insert(nOrdNum, nPos);
DrawObj &rObj = rSrcArr[n];
@@ -2709,17 +2710,17 @@ void SwEscherEx::MakeZOrderArrAndFollowIds(
bNeedsShapeId = true;
}
- ULONG nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
+ sal_uLong nShapeId = bNeedsShapeId ? GenerateShapeId() : 0;
aFollowShpIds.Insert(nShapeId, n);
}
}
-UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
+sal_uInt32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
unsigned int nHdFtIndex, DrawObjPointerVector &rpVec)
{
- USHORT nPos = FindPos(rFmt, nHdFtIndex, rpVec);
- UINT32 nShapeId;
+ sal_uInt16 nPos = FindPos(rFmt, nHdFtIndex, rpVec);
+ sal_uInt32 nShapeId;
if (USHRT_MAX != nPos)
{
if (0 == (nShapeId = aFollowShpIds[nPos]))
@@ -2733,10 +2734,10 @@ UINT32 SwEscherEx::GetFlyShapeId(const SwFrmFmt& rFmt,
return nShapeId;
}
-UINT32 SwEscherEx::QueryTextID(
- const uno::Reference< drawing::XShape>& xXShapeRef, UINT32 nShapeId )
+sal_uInt32 SwEscherEx::QueryTextID(
+ const uno::Reference< drawing::XShape>& xXShapeRef, sal_uInt32 nShapeId )
{
- UINT32 nId = 0;
+ sal_uInt32 nId = 0;
if (SdrObject* pObj = GetSdrObjectFromXShape(xXShapeRef))
{
pTxtBxs->Append( *pObj, nShapeId );
@@ -2783,7 +2784,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
if (!WriteOCXStream(xOleStg,xControlModel,aSize,sName))
return false;
- BYTE aSpecOLE[] =
+ sal_uInt8 aSpecOLE[] =
{
0x03, 0x6a, 0xFF, 0xFF, 0xFF, 0xFF, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
@@ -2791,7 +2792,7 @@ bool SwMSConvertControls::ExportControl(WW8Export &rWW8Wrt, const SdrObject *pOb
0x56, 0x08, 1 // sprmCFObj
};
//Set the obj id into the sprmCPicLocation
- BYTE *pData = aSpecOLE+2;
+ sal_uInt8 *pData = aSpecOLE+2;
Set_UInt32(pData,(sal_uInt32)(sal_uIntPtr)pObj);
String sFld(FieldString(ww::eCONTROL));
diff --git a/sw/source/filter/ww8/wrtw8nds.cxx b/sw/source/filter/ww8/wrtw8nds.cxx
index 1cd6be0f80c8..d9f8c318ba0a 100644
--- a/sw/source/filter/ww8/wrtw8nds.cxx
+++ b/sw/source/filter/ww8/wrtw8nds.cxx
@@ -415,7 +415,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
//The hard formatting properties that affect the entire paragraph
if (rNd.HasSwAttrSet())
{
- BOOL bDeep = FALSE;
+ sal_Bool bDeep = sal_False;
// only copy hard attributes - bDeep = false
aExportSet.Set(rNd.GetSwAttrSet(), bDeep);
// get the current font item. Use rNd.GetSwAttrSet instead of aExportSet:
@@ -449,7 +449,7 @@ void SwWW8AttrIter::OutAttr( xub_StrLen nSwPos, bool bRuby )
sal_uInt16 nWhichId = aIter.FirstWhich();
while( nWhichId )
{
- if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, FALSE, &pItem ))
+ if( SFX_ITEM_SET == pSet->GetItemState( nWhichId, sal_False, &pItem ))
{
if (nWhichId == nFontId)
pFont = &(item_cast<SvxFontItem>(*pItem));
@@ -550,7 +550,7 @@ bool SwWW8AttrIter::IsTxtAttr( xub_StrLen nSwPos )
// search for attrs with CH_TXTATR
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
if ( pHt->HasDummyChar() && (*pHt->GetStart() == nSwPos) )
@@ -585,7 +585,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
SwImplBookmarksIter bkmkIterEnd = m_rExport.maImplicitBookmarks.end();
for ( SwImplBookmarksIter aIter = m_rExport.maImplicitBookmarks.begin(); aIter != bkmkIterEnd; ++aIter )
{
- ULONG sample = aIter->second;
+ sal_uLong sample = aIter->second;
if ( sample == rNd.GetIndex() )
return true;
@@ -599,7 +599,7 @@ bool SwWW8AttrIter::RequiresImplicitBookmark()
// Attribut-Anfangposition fragen kann.
// Es koennen nur Attribute mit Ende abgefragt werden.
// Es wird mit bDeep gesucht
-const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
+const SfxPoolItem* SwWW8AttrIter::HasTextItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pRet = 0;
const SwpHints* pTxtAttrs = rNd.GetpSwpHints();
@@ -607,7 +607,7 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
if (pTxtAttrs && m_rExport.m_aCurrentCharPropStarts.size())
{
xub_StrLen nTmpSwPos = m_rExport.m_aCurrentCharPropStarts.top();
- for (USHORT i = 0; i < pTxtAttrs->Count(); ++i)
+ for (sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i)
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -628,12 +628,12 @@ const SfxPoolItem* SwWW8AttrIter::HasTextItem( USHORT nWhich ) const
void WW8Export::GetCurrentItems(WW8Bytes& rItems) const
{
- USHORT nEnd = pO ? pO->Count() : 0;
- for (USHORT nI = 0; nI < nEnd; ++nI)
+ sal_uInt16 nEnd = pO ? pO->Count() : 0;
+ for (sal_uInt16 nI = 0; nI < nEnd; ++nI)
rItems.Insert((*pO)[nI], rItems.Count());
}
-const SfxPoolItem& SwWW8AttrIter::GetItem(USHORT nWhich) const
+const SfxPoolItem& SwWW8AttrIter::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pRet = HasTextItem(nWhich);
return pRet ? *pRet : rNd.SwCntntNode::GetAttr(nWhich);
@@ -679,7 +679,7 @@ void WW8AttributeOutput::StartRuby( const SwTxtNode& rNode, xub_StrLen /*nPos*/,
other, so we make a guess based upon the first character of the text,
defaulting to asian.
*/
- USHORT nRubyScript;
+ sal_uInt16 nRubyScript;
if( pBreakIt->GetBreakIter().is() )
nRubyScript = pBreakIt->GetBreakIter()->getScriptType( rRuby.GetText(), 0);
else
@@ -869,20 +869,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
m_rWW8Export.OutputField( 0, ww::eHYPERLINK, sURL, WRITEFIELD_START | WRITEFIELD_CMD_START );
// write the refence to the "picture" structure
- ULONG nDataStt = m_rWW8Export.pDataStrm->Tell();
+ sal_uLong nDataStt = m_rWW8Export.pDataStrm->Tell();
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell() );
// WinWord 2000 doesn't write this - so its a temp solution by W97 ?
m_rWW8Export.WriteChar( 0x01 );
- static BYTE aArr1[] = {
+ static sal_uInt8 aArr1[] = {
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
0x06, 0x08, 0x01, // sprmCFData
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32( pDataAdr, nDataStt );
m_rWW8Export.pChpPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -895,7 +895,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
//all links end up in the data stream as absolute references.
bool bAbsolute = !bBookMarkOnly;
- static BYTE const aURLData1[] = {
+ static sal_uInt8 aURLData1[] = {
0,0,0,0, // len of struct
0x44,0, // the start of "next" data
0,0,0,0,0,0,0,0,0,0, // PIC-Structure!
@@ -904,20 +904,20 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, // |
0,0,0,0, // /
};
- static BYTE const MAGIC_A[] = {
+ static sal_uInt8 MAGIC_A[] = {
// start of "next" data
0xD0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
m_rWW8Export.pDataStrm->Write( aURLData1, sizeof( aURLData1 ) );
- BYTE nAnchor = 0x00;
+ sal_uInt8 nAnchor = 0x00;
if ( sMark.Len() )
nAnchor = 0x08;
m_rWW8Export.pDataStrm->Write( &nAnchor, 1 );
m_rWW8Export.pDataStrm->Write( MAGIC_A, sizeof(MAGIC_A) );
SwWW8Writer::WriteLong( *m_rWW8Export.pDataStrm, 0x00000002);
- UINT32 nFlag = bBookMarkOnly ? 0 : 0x01;
+ sal_uInt32 nFlag = bBookMarkOnly ? 0 : 0x01;
if ( bAbsolute )
nFlag |= 0x02;
if ( sMark.Len() )
@@ -929,13 +929,13 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
{
// version 1 (for a document)
- static BYTE const MAGIC_C[] = {
+ static sal_uInt8 MAGIC_C[] = {
0x03, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0xC0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46,
0x00, 0x00
};
- static BYTE const MAGIC_D[] = {
+ static sal_uInt8 MAGIC_D[] = {
0xFF, 0xFF, 0xAD, 0xDE, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00
@@ -984,7 +984,7 @@ bool WW8AttributeOutput::StartURL( const String &rUrl, const String &rTarget )
// what the data mean, except for the URL.
// The First piece is the WW8_PIC structure.
//
- static BYTE const MAGIC_B[] = {
+ static sal_uInt8 MAGIC_B[] = {
0xE0,0xC9,0xEA,0x79,0xF9,0xBA,0xCE,0x11,
0x8C,0x82,0x00,0xAA,0x00,0x4B,0xA9,0x0B
};
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::FieldVanish( const String& rTxt, ww::eField /*eType*/ )
aItems.Insert( 67, aItems.Count() );
aItems.Insert( 1, aItems.Count() );
- USHORT nStt_sprmCFSpec = aItems.Count();
+ sal_uInt16 nStt_sprmCFSpec = aItems.Count();
// sprmCFSpec -- fSpec-Attribut true
if ( m_rWW8Export.bWrtWW8 )
@@ -1113,7 +1113,7 @@ void AttributeOutputBase::TOXMark( const SwTxtNode& rNode, const SwTOXMark& rAtt
{
eType = ww::eTC;
sTxt.InsertAscii( " TC \"", 0 );
- USHORT nLvl = rAttr.GetLevel();
+ sal_uInt16 nLvl = rAttr.GetLevel();
if (nLvl > WW8ListManager::nMaxLevel)
nLvl = WW8ListManager::nMaxLevel;
@@ -1137,7 +1137,7 @@ int SwWW8AttrIter::OutAttrWithRange(xub_StrLen nPos)
{
m_rExport.m_aCurrentCharPropStarts.push( nPos );
const xub_StrLen* pEnd;
- for ( USHORT i = 0; i < pTxtAttrs->Count(); ++i )
+ for ( sal_uInt16 i = 0; i < pTxtAttrs->Count(); ++i )
{
const SwTxtAttr* pHt = (*pTxtAttrs)[i];
const SfxPoolItem* pItem = &pHt->GetAttr();
@@ -1195,7 +1195,7 @@ bool SwWW8AttrIter::IsRedlineAtEnd( xub_StrLen nEnd ) const
{
bool bRet = false;
// search next Redline
- for( USHORT nPos = nCurRedlinePos;
+ for( sal_uInt16 nPos = nCurRedlinePos;
nPos < m_rExport.pDoc->GetRedlineTbl().Count(); ++nPos )
{
const SwPosition* pEnd = m_rExport.pDoc->GetRedlineTbl()[ nPos ]->End();
@@ -1474,8 +1474,8 @@ String SwWW8AttrIter::GetSnippet(const String &rStr, xub_StrLen nAktPos,
*/
static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const SwTxtNode* pTxtNode )
{
- USHORT nPos = 0;
- USHORT nMax = rExport.pDoc->GetRedlineTbl().Count();
+ sal_uInt16 nPos = 0;
+ sal_uInt16 nMax = rExport.pDoc->GetRedlineTbl().Count();
while( nPos < nMax )
{
const SwRedline* pRedl = rExport.pDoc->GetRedlineTbl()[ nPos++ ];
@@ -1496,7 +1496,7 @@ static SwTxtFmtColl& lcl_getFormatCollection( MSWordExportBase& rExport, const S
return static_cast<SwTxtFmtColl&>( pTxtNode->GetAnyFmtColl() );
}
-void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle,
+void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle,
ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner )
{
short nDropLines = rSwFmtDrop.GetLines();
@@ -1505,7 +1505,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1517,7 +1517,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.InsUInt16( NS_sprm::LN_PDcs ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaFromText ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1525,7 +1525,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if ( rNode.GetDropSize( rFontHeight, rDropHeight, rDropDescent ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PDyaLine ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1539,7 +1539,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
m_rWW8Export.pO->Insert( 46, m_rWW8Export.pO->Count() ); // Dropcap (sprmPDcs)
int nDCS = ( nDropLines << 3 ) | 0x01;
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( nDCS ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( nDCS ) );
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() ); // Distance from text (sprmPDxaFromText)
m_rWW8Export.InsUInt16( nDistance );
@@ -1547,7 +1547,7 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
if (rNode.GetDropSize(rFontHeight, rDropHeight, rDropDescent))
{
m_rWW8Export.pO->Insert( 20, m_rWW8Export.pO->Count() ); // Line spacing
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -rDropHeight ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -rDropHeight ) );
m_rWW8Export.InsUInt16( 0 );
}
}
@@ -1578,10 +1578,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.InsUInt16( NS_sprm::LN_CHpsPos ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.InsUInt16( NS_sprm::LN_CHps ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
else
{
@@ -1593,10 +1593,10 @@ void WW8AttributeOutput::FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rS
}
m_rWW8Export.pO->Insert( 101, m_rWW8Export.pO->Count() ); // Lower the chars
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( -((nDropLines - 1)*rDropDescent) / 10 ) );
m_rWW8Export.pO->Insert( 99, m_rWW8Export.pO->Count() ); // Font Size
- m_rWW8Export.InsUInt16( static_cast< UINT16 >( rFontHeight / 10 ) );
+ m_rWW8Export.InsUInt16( static_cast< sal_uInt16 >( rFontHeight / 10 ) );
}
}
@@ -1631,7 +1631,7 @@ bool MSWordExportBase::GetBookmarks( const SwTxtNode& rNd, xub_StrLen nStt,
xub_StrLen nEnd, IMarkVector& rArr )
{
IDocumentMarkAccess* const pMarkAccess = pDoc->getIDocumentMarkAccess();
- ULONG nNd = rNd.GetIndex( );
+ sal_uLong nNd = rNd.GetIndex( );
const sal_Int32 nMarks = pMarkAccess->getMarksCount();
for ( sal_Int32 i = 0; i < nMarks; i++ )
@@ -1753,7 +1753,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// nStyleBeforeFly may change when we recurse into another node, so we
// have to remember it in nStyle
- USHORT nStyle = nStyleBeforeFly;
+ sal_uInt16 nStyle = nStyleBeforeFly;
SwWW8AttrIter aAttrIter( *this, rNode );
rtl_TextEncoding eChrSet = aAttrIter.GetCharSet();
@@ -1924,9 +1924,9 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( isDropdownOrCheckbox )
AppendBookmark( pFieldmark->GetName(), false );
}
- nLen -= static_cast< USHORT >( ofs );
+ nLen -= static_cast< sal_uInt16 >( ofs );
- String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< USHORT >( ofs ), nLen ) );
+ String aSnippet( aAttrIter.GetSnippet( aStr, nAktPos + static_cast< sal_uInt16 >( ofs ), nLen ) );
if ( ( nTxtTyp == TXT_EDN || nTxtTyp == TXT_FTN ) && nAktPos == 0 && nLen > 0 )
{
// Insert tab for aesthetic puposes #i24762#
@@ -2045,7 +2045,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !bFlyInTable )
{
SfxItemSet* pTmpSet = 0;
- const BYTE nPrvNxtNd = rNode.HasPrevNextLayNode();
+ const sal_uInt8 nPrvNxtNd = rNode.HasPrevNextLayNode();
if( (ND_HAS_PREV_LAYNODE|ND_HAS_NEXT_LAYNODE ) != nPrvNxtNd )
{
@@ -2075,16 +2075,16 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
}
}
- BOOL bParaRTL = FALSE;
+ sal_Bool bParaRTL = sal_False;
const SvxFrameDirectionItem* pItem = (const SvxFrameDirectionItem*)
rNode.GetSwAttrSet().GetItem(RES_FRAMEDIR);
if ( aAttrIter.IsParaRTL())
- bParaRTL = TRUE;
+ bParaRTL = sal_True;
if( rNode.IsNumbered())
{
const SwNumRule* pRule = rNode.GetNumRule();
- BYTE nLvl = static_cast< BYTE >( rNode.GetActualListLevel() );
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >( rNode.GetActualListLevel() );
const SwNumFmt* pFmt = pRule->GetNumFmt( nLvl );
if( !pFmt )
pFmt = &pRule->Get( nLvl );
@@ -2191,7 +2191,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// create new LRSpace item, based on the current (if present)
const SfxPoolItem* pPoolItem = NULL;
- pTmpSet->GetItemState(RES_LR_SPACE, TRUE, &pPoolItem);
+ pTmpSet->GetItemState(RES_LR_SPACE, sal_True, &pPoolItem);
SvxLRSpaceItem aLRSpace(
( pPoolItem == NULL )
? SvxLRSpaceItem(0, 0, 0, 0, RES_LR_SPACE)
@@ -2199,7 +2199,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
// new left margin = old left + label space
const SwNumRule* pRule = rNode.GetNumRule();
- const SwNumFmt& rNumFmt = pRule->Get( static_cast< USHORT >(rNode.GetActualListLevel()) );
+ const SwNumFmt& rNumFmt = pRule->Get( static_cast< sal_uInt16 >(rNode.GetActualListLevel()) );
// #i86652#
if ( rNumFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
@@ -2296,7 +2296,7 @@ void MSWordExportBase::OutputTextNode( const SwTxtNode& rNode )
if ( !pTmpSet )
pTmpSet = new SfxItemSet(rNode.GetSwAttrSet());
- const SvxFmtKeepItem aKeepItem( TRUE, RES_KEEP );
+ const SvxFmtKeepItem aKeepItem( sal_True, RES_KEEP );
pTmpSet->Put( aKeepItem );
}
}
@@ -2355,7 +2355,7 @@ void WW8AttributeOutput::TableNodeInfo( ww8::WW8TableNodeInfo::Pointer_t pNodeIn
{
TableRowEnd( pInner->getDepth() );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -2427,7 +2427,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
// Bug 74245 - if the first Node inside the section has an own
// PageDesc or PageBreak attribut, then dont write
// here the section break
- ULONG nRstLnNum = 0;
+ sal_uLong nRstLnNum = 0;
const SfxItemSet* pSet;
if ( rNd.IsTableNode() )
pSet = &rNd.GetTableNode()->GetTable().GetFrmFmt()->GetAttrSet();
@@ -2465,7 +2465,7 @@ void MSWordExportBase::OutputSectionNode( const SwSectionNode& rSectionNode )
}
-void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum )
+void WW8Export::AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum )
{
pSepx->AppendSep(Fc2Cp(Strm().Tell()), pPageDesc, pFmt, nLnNum);
}
@@ -2484,7 +2484,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if (const SwpHints* pTxtAttrs = rNd.GetpSwpHints())
{
- for( USHORT n=0; n < pTxtAttrs->Count(); ++n )
+ for( sal_uInt16 n=0; n < pTxtAttrs->Count(); ++n )
{
const SwTxtAttr* pAttr = (*pTxtAttrs)[ n ];
if( RES_TXTATR_FLYCNT == pAttr->Which() )
@@ -2496,7 +2496,7 @@ void WW8Export::OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd )
if( pNodeIndex )
{
- ULONG nStt = pNodeIndex->GetIndex()+1,
+ sal_uLong nStt = pNodeIndex->GetIndex()+1,
nEnd = pNodeIndex->GetNode().EndOfSectionIndex();
if( (nStt < nEnd) && !pDoc->GetNodes()[ nStt ]->IsNoTxtNode() )
@@ -2566,8 +2566,8 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
// Hole vom Node und vom letzten Node die Position in der Section
const SwNodeIndex* pNodeIndex = rFrmFmt.GetCntnt().GetCntntIdx();
- ULONG nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
- ULONG nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
+ sal_uLong nStt = pNodeIndex ? pNodeIndex->GetIndex()+1 : 0;
+ sal_uLong nEnd = pNodeIndex ? pNodeIndex->GetNode().EndOfSectionIndex() : 0;
if( nStt >= nEnd ) // kein Bereich, also kein gueltiger Node
return;
@@ -2589,7 +2589,7 @@ void WW8AttributeOutput::OutputFlyFrame_Impl( const sw::Frame& rFmt, const Point
{
/* Munge flys in fly into absolutely positioned elements for word 6 */
const SwTxtNode* pParTxtNode = rAnch.GetCntntAnchor()->nNode.GetNode().GetTxtNode();
- const SwRect aPageRect = pParTxtNode->FindPageFrmRect( FALSE, 0, FALSE );
+ const SwRect aPageRect = pParTxtNode->FindPageFrmRect( sal_False, 0, sal_False );
aOffset = rFrmFmt.FindLayoutRect().Pos();
aOffset -= aPageRect.Pos();
@@ -2666,7 +2666,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
if ( pRedline->Next() )
Redline( pRedline->Next() );
- static USHORT const aSprmIds[ 2 * 2 * 3 ] =
+ static sal_uInt16 aSprmIds[ 2 * 2 * 3 ] =
{
// Ids for insert
NS_sprm::LN_CFRMark, NS_sprm::LN_CIbstRMark, NS_sprm::LN_CDttmRMark, // for WW8
@@ -2676,7 +2676,7 @@ void WW8AttributeOutput::Redline( const SwRedlineData* pRedline )
0x0041, 0x0045, 0x0046 // for WW6
};
- const USHORT* pSprmIds = 0;
+ const sal_uInt16* pSprmIds = 0;
switch( pRedline->GetType() )
{
case nsRedlineType_t::REDLINE_INSERT:
diff --git a/sw/source/filter/ww8/wrtw8num.cxx b/sw/source/filter/ww8/wrtw8num.cxx
index 8e61e2c1dc5f..5afc0075ca4e 100644
--- a/sw/source/filter/ww8/wrtw8num.cxx
+++ b/sw/source/filter/ww8/wrtw8num.cxx
@@ -53,9 +53,9 @@ using namespace ::com::sun::star;
using namespace sw::types;
using namespace sw::util;
-USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal )
+sal_uInt16 MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal )
{
- USHORT nNumId = USHRT_MAX;
+ sal_uInt16 nNumId = USHRT_MAX;
String sPrefix( CREATE_CONST_ASC( "WW8TempExport" ) );
sPrefix += String::CreateFromInt32( nUniqueList++ );
SwNumRule* pMyNumRule =
@@ -63,7 +63,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
SvxNumberFormat::LABEL_WIDTH_AND_POSITION );
pUsedNumTbl->Insert( pMyNumRule, pUsedNumTbl->Count() );
- for ( USHORT i = 0; i < MAXLEVEL; i++ )
+ for ( sal_uInt16 i = 0; i < MAXLEVEL; i++ )
{
const SwNumFmt& rSubRule = pRule->Get(i);
pMyNumRule->Set( i, rSubRule );
@@ -81,7 +81,7 @@ USHORT MSWordExportBase::DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel,
return nNumId;
}
-USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
+sal_uInt16 MSWordExportBase::GetId( const SwNumRule& rNumRule )
{
if ( !pUsedNumTbl )
{
@@ -90,7 +90,7 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// Check, if the outline rule is already inserted into <pUsedNumTbl>.
// If yes, do not insert it again.
bool bOutlineRuleAdded( false );
- for ( USHORT n = pUsedNumTbl->Count(); n; )
+ for ( sal_uInt16 n = pUsedNumTbl->Count(); n; )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( --n );
if ( !pDoc->IsUsed( rRule ) )
@@ -112,11 +112,11 @@ USHORT MSWordExportBase::GetId( const SwNumRule& rNumRule )
// <--
}
SwNumRule* p = (SwNumRule*)&rNumRule;
- USHORT nRet = pUsedNumTbl->GetPos(p);
+ sal_uInt16 nRet = pUsedNumTbl->GetPos(p);
//Is this list now duplicated into a new list which we should use
// #i77812# - perform 'deep' search in duplication map
- ::std::map<USHORT,USHORT>::const_iterator aResult = aRuleDuplicates.end();
+ ::std::map<sal_uInt16,sal_uInt16>::const_iterator aResult = aRuleDuplicates.end();
do {
aResult = aRuleDuplicates.find(nRet);
if ( aResult != aRuleDuplicates.end() )
@@ -166,7 +166,7 @@ void WW8Export::WriteNumbering()
OutListNamesTab();
}
-void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule )
+void WW8AttributeOutput::NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule )
{
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
SwWW8Writer::WriteLong( *m_rWW8Export.pTableStrm, nId );
@@ -175,7 +175,7 @@ void WW8AttributeOutput::NumberingDefinition( USHORT nId, const SwNumRule &rRule
for ( int i = 0; i < WW8ListManager::nMaxLevel; ++i )
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0xFFF );
- BYTE nFlags = 0, nDummy = 0;
+ sal_uInt8 nFlags = 0, nDummy = 0;
if ( rRule.IsContinusNum() )
nFlags |= 0x1;
@@ -187,10 +187,10 @@ void MSWordExportBase::NumberingDefinitions()
if ( !pUsedNumTbl )
return; // no numbering is used
- USHORT nCount = pUsedNumTbl->Count();
+ sal_uInt16 nCount = pUsedNumTbl->Count();
// Write static data of SwNumRule - LSTF
- for ( USHORT n = 0; n < nCount; ++n )
+ for ( sal_uInt16 n = 0; n < nCount; ++n )
{
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
@@ -198,12 +198,12 @@ void MSWordExportBase::NumberingDefinitions()
}
}
-void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
- USHORT nStart,
- USHORT nNumberingType,
+void WW8AttributeOutput::NumberingLevel( sal_uInt8 /*nLevel*/,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -219,7 +219,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
*m_rWW8Export.pTableStrm << WW8Export::GetNumId( nNumberingType );
// Justification
- BYTE nAlign;
+ sal_uInt8 nAlign;
switch ( eAdjust )
{
case SVX_ADJUST_CENTER: nAlign = 1; break;
@@ -246,7 +246,7 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = &aCharAtrs;
if ( pFont )
{
- USHORT nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
+ sal_uInt16 nFontID = m_rWW8Export.maFontHelper.GetId( *pFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -263,21 +263,21 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
m_rWW8Export.pO = pOldpO;
}
- *m_rWW8Export.pTableStrm << BYTE( aCharAtrs.Count() );
+ *m_rWW8Export.pTableStrm << sal_uInt8( aCharAtrs.Count() );
// cbGrpprlPapx
- BYTE aPapSprms [] = {
+ sal_uInt8 aPapSprms [] = {
0x5e, 0x84, 0, 0, // sprmPDxaLeft
0x60, 0x84, 0, 0, // sprmPDxaLeft1
0x15, 0xc6, 0x05, 0x00, 0x01, 0, 0, 0x06
};
- *m_rWW8Export.pTableStrm << BYTE( sizeof( aPapSprms ) );
+ *m_rWW8Export.pTableStrm << sal_uInt8( sizeof( aPapSprms ) );
// reserved
SwWW8Writer::WriteShort( *m_rWW8Export.pTableStrm, 0 );
// pap sprms
- BYTE* pData = aPapSprms + 2;
+ sal_uInt8* pData = aPapSprms + 2;
Set_UInt16( pData, nIndentAt );
pData += 2;
Set_UInt16( pData, nFirstLineIndex );
@@ -297,8 +297,8 @@ void WW8AttributeOutput::NumberingLevel( BYTE /*nLevel*/,
void MSWordExportBase::AbstractNumberingDefinitions()
{
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
// prepare the NodeNum to generate the NumString
SwNumberTree::tNumberVector aNumVector;
@@ -311,17 +311,17 @@ void MSWordExportBase::AbstractNumberingDefinitions()
AttrOutput().StartAbstractNumbering( n + 1 );
const SwNumRule& rRule = *pUsedNumTbl->GetObject( n );
- BYTE nLvl;
- BYTE nLevels = static_cast< BYTE >(rRule.IsContinusNum() ?
+ sal_uInt8 nLvl;
+ sal_uInt8 nLevels = static_cast< sal_uInt8 >(rRule.IsContinusNum() ?
WW8ListManager::nMinLevel : WW8ListManager::nMaxLevel);
for( nLvl = 0; nLvl < nLevels; ++nLvl )
{
// write the static data of the SwNumFmt of this level
- BYTE aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
+ sal_uInt8 aNumLvlPos[WW8ListManager::nMaxLevel] = { 0,0,0,0,0,0,0,0,0 };
const SwNumFmt& rFmt = rRule.Get( nLvl );
- BYTE nFollow = 0;
+ sal_uInt8 nFollow = 0;
// #i86652#
if ( rFmt.GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_WIDTH_AND_POSITION )
{
@@ -400,20 +400,20 @@ void MSWordExportBase::AbstractNumberingDefinitions()
{
if (SVX_NUM_NUMBER_NONE != rFmt.GetNumberingType())
{
- BYTE* pLvlPos = aNumLvlPos;
+ sal_uInt8* pLvlPos = aNumLvlPos;
// the numbering string has to be restrict
// to the level currently working on.
sNumStr = rRule.MakeNumString(aNumVector, false, true, nLvl);
// <--
// now search the nums in the string
- for( BYTE i = 0; i <= nLvl; ++i )
+ for( sal_uInt8 i = 0; i <= nLvl; ++i )
{
String sSrch( String::CreateFromInt32( i ));
xub_StrLen nFnd = sNumStr.Search( sSrch );
if( STRING_NOTFOUND != nFnd )
{
- *pLvlPos = (BYTE)(nFnd + rFmt.GetPrefix().Len() + 1 );
+ *pLvlPos = (sal_uInt8)(nFnd + rFmt.GetPrefix().Len() + 1 );
++pLvlPos;
sNumStr.SetChar( nFnd, (char)i );
}
@@ -505,8 +505,8 @@ void WW8Export::OutOverrideListTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nCount = pUsedNumTbl->Count();
- USHORT n;
+ sal_uInt16 nCount = pUsedNumTbl->Count();
+ sal_uInt16 n;
pFib->fcPlfLfo = pTableStrm->Tell();
SwWW8Writer::WriteLong( *pTableStrm, nCount );
@@ -529,7 +529,7 @@ void WW8Export::OutListNamesTab()
return ; // no numbering is used
// write the "list format override" - LFO
- USHORT nNms = 0, nCount = pUsedNumTbl->Count();
+ sal_uInt16 nNms = 0, nCount = pUsedNumTbl->Count();
pFib->fcSttbListNames = pTableStrm->Tell();
SwWW8Writer::WriteShort( *pTableStrm, -1 );
@@ -561,52 +561,52 @@ void WW8Export::OutputOlst( const SwNumRule& rRule )
if ( bWrtWW8 )
return;
- static BYTE const aAnlvBase[] = { // Defaults
+ static sal_uInt8 aAnlvBase[] = { // Defaults
1,0,0, // Upper Roman
0x0C, // Hanging Indent, fPrev
0,0,1,0x80,0,0,1,0,0x1b,1,0,0 };
- static BYTE const aSprmOlstHdr[] = { 133, 212 };
+ static sal_uInt8 aSprmOlstHdr[] = { 133, 212 };
pO->Insert( aSprmOlstHdr, sizeof( aSprmOlstHdr ), pO->Count() );
WW8_OLST aOlst;
memset( &aOlst, 0, sizeof(aOlst) );
- BYTE* pC = aOlst.rgch;
- BYTE* pChars = (BYTE*)pC;
- USHORT nCharLen = 64;
+ sal_uInt8* pC = aOlst.rgch;
+ sal_uInt8* pChars = (sal_uInt8*)pC;
+ sal_uInt16 nCharLen = 64;
- for (USHORT j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
+ for (sal_uInt16 j = 0; j < WW8ListManager::nMaxLevel; j++ ) // 9 variable ANLVs
{
memcpy( &aOlst.rganlv[j], aAnlvBase, sizeof( WW8_ANLV ) ); // Defaults
const SwNumFmt* pFmt = rRule.GetNumFmt( j );
if( pFmt )
BuildAnlvBase( aOlst.rganlv[j], pChars, nCharLen, rRule,
- *pFmt, (BYTE)j );
+ *pFmt, (sal_uInt8)j );
}
- pO->Insert( (BYTE*)&aOlst, sizeof( aOlst ), pO->Count() );
+ pO->Insert( (sal_uInt8*)&aOlst, sizeof( aOlst ), pO->Count() );
}
-void WW8Export::Out_WwNumLvl( BYTE nWwLevel )
+void WW8Export::Out_WwNumLvl( sal_uInt8 nWwLevel )
{
pO->Insert( 13, pO->Count() );
pO->Insert( nWwLevel, pO->Count() );
}
-void WW8Export::Out_SwNumLvl( BYTE nSwLevel )
+void WW8Export::Out_SwNumLvl( sal_uInt8 nSwLevel )
{
OSL_ENSURE( nSwLevel < MAXLEVEL, "numbered?");
Out_WwNumLvl( nSwLevel + 1 );
}
-void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumFmt& rFmt)
+void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumFmt& rFmt)
{
ByteToSVBT8(11, rAnlv.nfc);
- BYTE nb = 0; // Zahlentyp
+ sal_uInt8 nb = 0; // Zahlentyp
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -642,7 +642,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
rtl_TextEncoding eChrSet = rFont.GetCharSet();
String sFontName = rFont.GetName();
- USHORT nFontId;
+ sal_uInt16 nFontId;
if (sw::util::IsStarSymbol(sFontName))
{
/*
@@ -671,7 +671,7 @@ void WW8Export::BuildAnlvBulletBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
if ( (eChrSet == RTL_TEXTENCODING_SYMBOL) && (cChar >= 0xF000) && (
cChar <= 0xF0FF) )
{
- *rpCh = static_cast< BYTE >(cChar - 0xF000);
+ *rpCh = static_cast< sal_uInt8 >(cChar - 0xF000);
}
else
*rpCh = ByteString::ConvertFromUnicode(cChar, eChrSet);
@@ -703,6 +703,9 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
if (!bSubstituteBullets)
return;
+ if (!bSubstituteBullets)
+ return;
+
if (!pConvert)
{
pConvert = CreateStarSymbolToMSMultiFont();
@@ -741,17 +744,17 @@ void MSWordExportBase::SubstituteBullet( String& rNumStr,
delete pConvert;
}
-static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
- USHORT& rCharLen, SVBT8& r8Len )
+static void SwWw8_InsertAnlText( const String& rStr, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, SVBT8& r8Len )
{
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
WW8Bytes aO;
SwWW8Writer::InsAsString8( aO, rStr, RTL_TEXTENCODING_MS_1252 );
- USHORT nCnt = aO.Count();
+ sal_uInt16 nCnt = aO.Count();
if( nCnt && nCnt < rCharLen )
{
- nb = (BYTE)nCnt;
+ nb = (sal_uInt8)nCnt;
memcpy( rpCh, aO.GetData(), nCnt );
rpCh += nCnt;
rCharLen = rCharLen - nCnt;
@@ -759,13 +762,13 @@ static void SwWw8_InsertAnlText( const String& rStr, BYTE*& rpCh,
ByteToSVBT8( nb, r8Len );
}
-void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
- USHORT& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel)
+void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, sal_uInt8*& rpCh,
+ sal_uInt16& rCharLen, const SwNumRule& rRul, const SwNumFmt& rFmt,
+ sal_uInt8 nSwLevel)
{
ByteToSVBT8(WW8Export::GetNumId(rFmt.GetNumberingType()), rAnlv.nfc);
- BYTE nb = 0;
+ sal_uInt8 nb = 0;
switch (rFmt.GetNumAdjust())
{
case SVX_ADJUST_RIGHT:
@@ -797,7 +800,7 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
&& (nSwLevel<= WW8ListManager::nMaxLevel )
&& (rFmt.GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // UEberhaupt Nummerierung ?
{ // -> suche, ob noch Zahlen davor
- BYTE nUpper = rFmt.GetIncludeUpperLevels();
+ sal_uInt8 nUpper = rFmt.GetIncludeUpperLevels();
if( (nUpper <= WW8ListManager::nMaxLevel) &&
(rRul.Get(nUpper).GetNumberingType() != SVX_NUM_NUMBER_NONE ) ) // Nummerierung drueber ?
{
@@ -832,21 +835,21 @@ void WW8Export::BuildAnlvBase(WW8_ANLV& rAnlv, BYTE*& rpCh,
}
void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel )
+ sal_uInt8 nSwLevel )
{
- static BYTE const aSprmAnldDefault[54] = {
+ static sal_uInt8 aSprmAnldDefault[54] = {
12, 52,
1,0,0,0x0c,0,0,1,0x80,0,0,1,0,0x1b,1,0,0,0x2e,
0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
- BYTE aSprmAnld[54];
+ sal_uInt8 aSprmAnld[54];
memcpy( aSprmAnld, aSprmAnldDefault, sizeof( aSprmAnld ) );
WW8_ANLD* pA = (WW8_ANLD*)(aSprmAnld + 2); // handlicher Pointer
- BYTE* pChars = (BYTE*)(pA->rgchAnld);
- USHORT nCharLen = 31;
+ sal_uInt8* pChars = (sal_uInt8*)(pA->rgchAnld);
+ sal_uInt16 nCharLen = 31;
if( nSwLevel == 11 )
BuildAnlvBulletBase( pA->eAnlv, pChars, nCharLen, rFmt );
@@ -854,7 +857,7 @@ void WW8Export::Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
BuildAnlvBase( pA->eAnlv, pChars, nCharLen, rRul, rFmt, nSwLevel );
// ... und raus damit
- OutSprmBytes( (BYTE*)&aSprmAnld, sizeof( aSprmAnld ) );
+ OutSprmBytes( (sal_uInt8*)&aSprmAnld, sizeof( aSprmAnld ) );
}
@@ -865,12 +868,12 @@ bool WW8Export::Out_SwNum(const SwTxtNode* pNd)
if (nLevel < 0 || nLevel >= MAXLEVEL)
{
- OSL_ENSURE(FALSE, "Invalid level");
+ OSL_ENSURE(sal_False, "Invalid level");
return false;
}
- BYTE nSwLevel = static_cast< BYTE >(nLevel);
+ sal_uInt8 nSwLevel = static_cast< sal_uInt8 >(nLevel);
const SwNumRule* pRul = pNd->GetNumRule();
if( !pRul || nSwLevel == WW8ListManager::nMaxLevel)
diff --git a/sw/source/filter/ww8/wrtw8sty.cxx b/sw/source/filter/ww8/wrtw8sty.cxx
index b6822d915e52..83cece4881dc 100644
--- a/sw/source/filter/ww8/wrtw8sty.cxx
+++ b/sw/source/filter/ww8/wrtw8sty.cxx
@@ -101,15 +101,15 @@ class WW8_WrPlc0
{
private:
SvULongs aPos; // PTRARR von CPs / FCs
- ULONG nOfs;
+ sal_uLong nOfs;
//No copying
WW8_WrPlc0(const WW8_WrPlc0&);
WW8_WrPlc0 &operator=(const WW8_WrPlc0&);
public:
- WW8_WrPlc0( ULONG nOffset );
- USHORT Count() const { return aPos.Count(); }
- void Append( ULONG nStartCpOrFc );
+ WW8_WrPlc0( sal_uLong nOffset );
+ sal_uInt16 Count() const { return aPos.Count(); }
+ void Append( sal_uLong nStartCpOrFc );
void Write( SvStream& rStrm );
};
@@ -121,17 +121,17 @@ public:
// GetId( SwCharFmt ) zur Benutzung im Text -> nil verboten,
// "Default Char Style" stattdessen
-USHORT MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
+sal_uInt16 MSWordExportBase::GetId( const SwCharFmt& rFmt ) const
{
- USHORT nRet = pStyles->GetSlot( rFmt );
+ sal_uInt16 nRet = pStyles->GetSlot( rFmt );
return ( nRet != 0x0fff ) ? nRet : 10; // Default Char Style
}
// GetId( SwTxtFmtColl ) zur Benutzung an TextNodes -> nil verboten,
// "Standard" stattdessen
-USHORT MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
+sal_uInt16 MSWordExportBase::GetId( const SwTxtFmtColl& rColl ) const
{
- USHORT nRet = pStyles->GetSlot( rColl );
+ sal_uInt16 nRet = pStyles->GetSlot( rColl );
return ( nRet != 0xfff ) ? nRet : 0; // Default TxtFmtColl
}
@@ -150,7 +150,7 @@ MSWordStyles::MSWordStyles( MSWordExportBase& rExport )
m_rExport.pDoc->GetFtnInfo().GetAnchorCharFmt( *m_rExport.pDoc );
m_rExport.pDoc->GetFtnInfo().GetCharFmt( *m_rExport.pDoc );
}
- USHORT nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
+ sal_uInt16 nAlloc = WW8_RESERVED_SLOTS + m_rExport.pDoc->GetCharFmts()->Count() - 1 +
m_rExport.pDoc->GetTxtFmtColls()->Count() - 1;
// etwas grosszuegig ( bis zu 15 frei )
@@ -166,18 +166,18 @@ MSWordStyles::~MSWordStyles()
}
// Sty_SetWWSlot() fuer Abhaengigkeiten der Styles -> nil ist erlaubt
-USHORT MSWordStyles::GetSlot( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetSlot( const SwFmt& rFmt ) const
{
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
if ( pFmtA[n] == &rFmt )
return n;
return 0xfff; // 0xfff: WW: nil
}
-USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
+sal_uInt16 MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
{
- USHORT nRet;
+ sal_uInt16 nRet;
switch ( nRet = rFmt.GetPoolFmtId() )
{
case RES_POOLCOLL_STANDARD:
@@ -203,24 +203,24 @@ USHORT MSWordStyles::BuildGetSlot( const SwFmt& rFmt )
return nRet;
}
-USHORT MSWordStyles::GetWWId( const SwFmt& rFmt ) const
+sal_uInt16 MSWordStyles::GetWWId( const SwFmt& rFmt ) const
{
- USHORT nRet = ww::stiUser; // User-Style als default
- USHORT nPoolId = rFmt.GetPoolFmtId();
+ sal_uInt16 nRet = ww::stiUser; // User-Style als default
+ sal_uInt16 nPoolId = rFmt.GetPoolFmtId();
if( nPoolId == RES_POOLCOLL_STANDARD )
nRet = 0;
else if( nPoolId >= RES_POOLCOLL_HEADLINE1 &&
nPoolId <= RES_POOLCOLL_HEADLINE9 )
- nRet = static_cast< USHORT >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 1 - RES_POOLCOLL_HEADLINE1);
else if( nPoolId >= RES_POOLCOLL_TOX_IDX1 &&
nPoolId <= RES_POOLCOLL_TOX_IDX3 )
- nRet = static_cast< USHORT >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 10 - RES_POOLCOLL_TOX_IDX1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT1 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT5 )
- nRet = static_cast< USHORT >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 19 - RES_POOLCOLL_TOX_CNTNT1);
else if( nPoolId >= RES_POOLCOLL_TOX_CNTNT6 &&
nPoolId <= RES_POOLCOLL_TOX_CNTNT9 )
- nRet = static_cast< USHORT >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
+ nRet = static_cast< sal_uInt16 >(nPoolId + 24 - RES_POOLCOLL_TOX_CNTNT6);
else
switch( nPoolId )
{
@@ -277,7 +277,7 @@ void MSWordStyles::BuildStylesTable()
nUsedSlots = WW8_RESERVED_SLOTS; // soviele sind reserviert fuer
// Standard und HeadingX u.a.
SwFmt* pFmt;
- USHORT n;
+ sal_uInt16 n;
const SvPtrarr& rArr = *m_rExport.pDoc->GetCharFmts(); // erst CharFmt
// das Default-ZeichenStyle ( 0 ) wird nicht mit ausgegeben !
for( n = 1; n < rArr.Count(); n++ )
@@ -299,7 +299,7 @@ void MSWordStyles::BuildStylesTable()
static void impl_SkipOdd( WW8Bytes* pO, sal_Size nTableStrmTell )
{
if ( ( nTableStrmTell + pO->Count() ) & 1 ) // Start auf gerader
- pO->Insert( (BYTE)0, pO->Count() ); // Adresse
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Adresse
}
void WW8AttributeOutput::EndStyle()
@@ -307,23 +307,23 @@ void WW8AttributeOutput::EndStyle()
impl_SkipOdd( m_rWW8Export.pO, m_rWW8Export.pTableStrm->Tell() );
short nLen = m_rWW8Export.pO->Count() - 2; // Laenge des Styles
- BYTE* p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
+ sal_uInt8* p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen1;
ShortToSVBT16( nLen, p ); // nachtragen
- p = (BYTE*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
+ p = (sal_uInt8*)m_rWW8Export.pO->GetData() + nPOPosStdLen2;
ShortToSVBT16( nLen, p ); // dito
m_rWW8Export.pTableStrm->Write( m_rWW8Export.pO->GetData(), m_rWW8Export.pO->Count() ); // ins File damit
m_rWW8Export.pO->Remove( 0, m_rWW8Export.pO->Count() ); // leeren fuer naechsten
}
-void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT nWwBase,
- USHORT nWwNext, USHORT nWwId, USHORT /*nId*/, bool bAutoUpdate )
+void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, sal_uInt16 nWwBase,
+ sal_uInt16 nWwNext, sal_uInt16 nWwId, sal_uInt16 /*nId*/, bool bAutoUpdate )
{
- BYTE aWW8_STD[ sizeof( WW8_STD ) ];
- BYTE* pData = aWW8_STD;
+ sal_uInt8 aWW8_STD[ sizeof( WW8_STD ) ];
+ sal_uInt8* pData = aWW8_STD;
memset( &aWW8_STD, 0, sizeof( WW8_STD ) );
- UINT16 nBit16 = 0x1000; // fInvalHeight
+ sal_uInt16 nBit16 = 0x1000; // fInvalHeight
nBit16 |= (ww::stiNil & nWwId);
Set_UInt16( pData, nBit16 );
@@ -335,7 +335,7 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
nBit16 |= bPapFmt ? 2 : 1; // cupx
Set_UInt16( pData, nBit16 );
- pData += sizeof( UINT16 ); // bchUpe
+ pData += sizeof( sal_uInt16 ); // bchUpe
if( m_rWW8Export.bWrtWW8 )
{
@@ -343,19 +343,19 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
Set_UInt16( pData, nBit16 );
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- //UINT16 fHidden : 1; /* hidden from UI? */
- //UINT16 : 14; /* unused bits */
+ //sal_uInt16 fHidden : 1; /* hidden from UI? */
+ //sal_uInt16 : 14; /* unused bits */
}
- UINT16 nLen = static_cast< UINT16 >( ( pData - aWW8_STD ) + 1 +
+ sal_uInt16 nLen = static_cast< sal_uInt16 >( ( pData - aWW8_STD ) + 1 +
((m_rWW8Export.bWrtWW8 ? 2 : 1 ) * (rName.Len() + 1)) ); // vorlaeufig
WW8Bytes* pO = m_rWW8Export.pO;
nPOPosStdLen1 = pO->Count(); // Adr1 zum nachtragen der Laenge
SwWW8Writer::InsUInt16( *pO, nLen );
- pO->Insert( aWW8_STD, static_cast< USHORT >( pData - aWW8_STD ), pO->Count() );
+ pO->Insert( aWW8_STD, static_cast< sal_uInt16 >( pData - aWW8_STD ), pO->Count() );
nPOPosStdLen2 = nPOPosStdLen1 + 8; // Adr2 zum nachtragen von "end of upx"
@@ -367,18 +367,18 @@ void WW8AttributeOutput::StartStyle( const String& rName, bool bPapFmt, USHORT n
}
else
{
- pO->Insert( (BYTE)rName.Len(), pO->Count() ); // Laenge
+ pO->Insert( (sal_uInt8)rName.Len(), pO->Count() ); // Laenge
SwWW8Writer::InsAsString8( *pO, rName, RTL_TEXTENCODING_MS_1252 );
}
- pO->Insert( (BYTE)0, pO->Count() ); // Trotz P-String 0 am Ende!
+ pO->Insert( (sal_uInt8)0, pO->Count() ); // Trotz P-String 0 am Ende!
}
void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
{
const SwModify* pOldMod = m_rExport.pOutFmtNode;
m_rExport.pOutFmtNode = &rFmt;
- bool aFlags[ static_cast< USHORT >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
- USHORT nStt, nEnd, n;
+ bool aFlags[ static_cast< sal_uInt16 >(RES_FRMATR_END) - RES_CHRATR_BEGIN ];
+ sal_uInt16 nStt, nEnd, n;
if( bPap )
nStt = RES_PARATR_BEGIN, nEnd = RES_FRMATR_END;
else
@@ -392,8 +392,8 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
// static defaults, that differs between WinWord and SO
if( bPap )
{
- aFlags[ static_cast< USHORT >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
- aFlags[ static_cast< USHORT >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_WIDOWS) - RES_CHRATR_BEGIN ] = 1;
+ aFlags[ static_cast< sal_uInt16 >(RES_PARATR_HYPHENZONE) - RES_CHRATR_BEGIN ] = 1;
}
else
{
@@ -425,13 +425,13 @@ void MSWordStyles::SetStyleDefaults( const SwFmt& rFmt, bool bPap )
m_rExport.pOutFmtNode = pOldMod;
}
-void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
+void WW8AttributeOutput::StartStyleProperties( bool bParProp, sal_uInt16 nStyle )
{
WW8Bytes* pO = m_rWW8Export.pO;
impl_SkipOdd( pO, m_rWW8Export.pTableStrm->Tell() );
- UINT16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
+ sal_uInt16 nLen = ( bParProp ) ? 2 : 0; // Default-Laenge
m_nStyleLenPos = pO->Count(); // Laenge zum Nachtragen
// Keinen Pointer merken, da sich bei
// _grow der Pointer aendert !
@@ -444,7 +444,7 @@ void WW8AttributeOutput::StartStyleProperties( bool bParProp, USHORT nStyle )
SwWW8Writer::InsUInt16( *pO, nStyle ); // Style-Nummer
}
-void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, USHORT nPos,
+void MSWordStyles::WriteProperties( const SwFmt* pFmt, bool bParProp, sal_uInt16 nPos,
bool bInsDefCharSiz )
{
m_rExport.AttrOutput().StartStyleProperties( bParProp, nPos );
@@ -468,12 +468,12 @@ void WW8AttributeOutput::EndStyleProperties( bool /*bParProp*/ )
{
WW8Bytes* pO = m_rWW8Export.pO;
- UINT16 nLen = pO->Count() - m_nStyleStartSize;
- BYTE* pUpxLen = (BYTE*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
+ sal_uInt16 nLen = pO->Count() - m_nStyleStartSize;
+ sal_uInt8* pUpxLen = (sal_uInt8*)pO->GetData() + m_nStyleLenPos; // Laenge zum Nachtragen
ShortToSVBT16( nLen, pUpxLen ); // Default-Laenge eintragen
}
-void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext )
+void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext )
{
bFmtColl = pFmt->Which() == RES_TXTFMTCOLL || pFmt->Which() == RES_CONDTXTFMTCOLL;
@@ -493,13 +493,13 @@ void MSWordStyles::GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USH
nNext = GetSlot( *pNext );
}
-void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
+void WW8AttributeOutput::DefaultStyle( sal_uInt16 nStyle )
{
if ( nStyle == 10 ) // Default Char-Style ( nur WW )
{
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x42, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x42, 0x00,
0x00, 0x00, 0x19, 0x00, 0x41, 0x00, 0x62, 0x00,
@@ -514,7 +514,7 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- static BYTE const aDefCharSty[] = {
+ static sal_uInt8 aDefCharSty[] = {
0x26, 0x00,
0x41, 0x40, 0xF2, 0xFF, 0xA1, 0x00, 0x26, 0x00,
0x19, 0x41, 0x62, 0x73, 0x61, 0x74, 0x7A, 0x2D,
@@ -526,20 +526,20 @@ void WW8AttributeOutput::DefaultStyle( USHORT nStyle )
}
else
{
- UINT16 n = 0;
+ sal_uInt16 n = 0;
m_rWW8Export.pTableStrm->Write( &n , 2 ); // leerer Style
}
}
// OutputStyle geht fuer TxtFmtColls und CharFmts
-void MSWordStyles::OutputStyle( SwFmt* pFmt, USHORT nPos )
+void MSWordStyles::OutputStyle( SwFmt* pFmt, sal_uInt16 nPos )
{
if ( !pFmt )
m_rExport.AttrOutput().DefaultStyle( nPos );
else
{
bool bFmtColl;
- USHORT nBase, nWwNext;
+ sal_uInt16 nBase, nWwNext;
GetStyleData( pFmt, bFmtColl, nBase, nWwNext );
@@ -564,7 +564,7 @@ void WW8AttributeOutput::StartStyles()
{
WW8Fib& rFib = *m_rWW8Export.pFib;
- ULONG nCurPos = m_rWW8Export.pTableStrm->Tell();
+ sal_uLong nCurPos = m_rWW8Export.pTableStrm->Tell();
if ( nCurPos & 1 ) // Start auf gerader
{
*m_rWW8Export.pTableStrm << (char)0; // Adresse
@@ -575,7 +575,7 @@ void WW8AttributeOutput::StartStyles()
if ( m_rWW8Export.bWrtWW8 )
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x12, 0x00,
0x0F, 0x00, 0x0A, 0x00, 0x01, 0x00, 0x5B, 0x00,
0x0F, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,
@@ -585,7 +585,7 @@ void WW8AttributeOutput::StartStyles()
}
else
{
- static BYTE const aStShi[] = {
+ static sal_uInt8 aStShi[] = {
0x0E, 0x00,
0x0F, 0x00, 0x08, 0x00, 0x01, 0x00, 0x4B, 0x00,
0x0F, 0x00, 0x00, 0x00, 0x00, 0x00 };
@@ -593,7 +593,7 @@ void WW8AttributeOutput::StartStyles()
}
}
-void WW8AttributeOutput::EndStyles( USHORT nNumberOfStyles )
+void WW8AttributeOutput::EndStyles( sal_uInt16 nNumberOfStyles )
{
WW8Fib& rFib = *m_rWW8Export.pFib;
@@ -607,7 +607,7 @@ void MSWordStyles::OutputStylesTable()
m_rExport.AttrOutput().StartStyles();
- USHORT n;
+ sal_uInt16 n;
for ( n = 0; n < nUsedSlots; n++ )
OutputStyle( pFmtA[n], n );
@@ -636,18 +636,18 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
if (bWrtWW8)
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 0x22 + ( 2 * ( 1 + msFamilyNm.Len() ) ));
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 2 * ( 1 + msAltNm.Len()));
}
else
{
- maWW8_FFN[0] = (BYTE)( 6 - 1 + 1 + msFamilyNm.Len() );
+ maWW8_FFN[0] = (sal_uInt8)( 6 - 1 + 1 + msFamilyNm.Len() );
if (mbAlt)
- maWW8_FFN[0] = static_cast< BYTE >(maWW8_FFN[0] + 1 + msAltNm.Len());
+ maWW8_FFN[0] = static_cast< sal_uInt8 >(maWW8_FFN[0] + 1 + msAltNm.Len());
}
- BYTE aB = 0;
+ sal_uInt8 aB = 0;
switch(ePitch)
{
case PITCH_VARIABLE:
@@ -695,7 +695,7 @@ wwFont::wwFont(const String &rFamilyName, FontPitch ePitch, FontFamily eFamily,
rtl_getBestWindowsCharsetFromTextEncoding(eChrSet);
if (mbAlt)
- maWW8_FFN[5] = static_cast< BYTE >(msFamilyNm.Len() + 1);
+ maWW8_FFN[5] = static_cast< sal_uInt8 >(msFamilyNm.Len() + 1);
}
bool wwFont::Write(SvStream *pTableStrm) const
@@ -765,15 +765,15 @@ bool operator<(const wwFont &r1, const wwFont &r2)
}
-USHORT wwFontHelper::GetId(const wwFont &rFont)
+sal_uInt16 wwFontHelper::GetId(const wwFont &rFont)
{
- USHORT nRet;
- ::std::map<wwFont, USHORT>::const_iterator aIter = maFonts.find(rFont);
+ sal_uInt16 nRet;
+ ::std::map<wwFont, sal_uInt16>::const_iterator aIter = maFonts.find(rFont);
if (aIter != maFonts.end())
nRet = aIter->second;
else
{
- nRet = static_cast< USHORT >(maFonts.size());
+ nRet = static_cast< sal_uInt16 >(maFonts.size());
maFonts[rFont] = nRet;
}
return nRet;
@@ -807,28 +807,30 @@ void wwFontHelper::InitFontTable(bool bWrtWW8,const SwDoc& rDoc)
if (!bLoadAllFonts)
return;
- const USHORT aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
- for (const USHORT* pId = aTypes; *pId; ++pId)
+ const sal_uInt16 aTypes[] = { RES_CHRATR_FONT, RES_CHRATR_CJK_FONT, RES_CHRATR_CTL_FONT, 0 };
+ for (const sal_uInt16* pId = aTypes; *pId; ++pId)
{
- USHORT nMaxItem = rPool.GetItemCount( *pId );
- for( USHORT nGet = 0; nGet < nMaxItem; ++nGet )
- if( 0 != (pFont = (const SvxFontItem*)rPool.GetItem(
- *pId, nGet )) )
+ sal_uInt32 const nMaxItem = rPool.GetItemCount2( *pId );
+ for (sal_uInt32 nGet = 0; nGet < nMaxItem; ++nGet)
+ {
+ pFont = (const SvxFontItem*)rPool.GetItem2( *pId, nGet );
+ if (0 != pFont)
{
GetId(wwFont(pFont->GetFamilyName(), pFont->GetPitch(),
pFont->GetFamily(), pFont->GetCharSet(),bWrtWW8));
}
+ }
}
}
-USHORT wwFontHelper::GetId(const Font& rFont)
+sal_uInt16 wwFontHelper::GetId(const Font& rFont)
{
wwFont aFont(rFont.GetName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
return GetId(aFont);
}
-USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
+sal_uInt16 wwFontHelper::GetId(const SvxFontItem& rFont)
{
wwFont aFont(rFont.GetFamilyName(), rFont.GetPitch(), rFont.GetFamily(),
rFont.GetCharSet(), mbWrtWW8);
@@ -839,7 +841,7 @@ USHORT wwFontHelper::GetId(const SvxFontItem& rFont)
{
::std::vector<const wwFont *> aFontList( maFonts.size() );
- typedef ::std::map<wwFont, USHORT>::const_iterator myiter;
+ typedef ::std::map<wwFont, sal_uInt16>::const_iterator myiter;
myiter aEnd = maFonts.end();
for ( myiter aIter = maFonts.begin(); aIter != aEnd; ++aIter )
aFontList[aIter->second] = &aIter->first;
@@ -879,7 +881,7 @@ void wwFontHelper::WriteFontTable(SvStream *pTableStream, WW8Fib& rFib)
else
{
SwWW8Writer::WriteShort( *pTableStream, rFib.fcSttbfffn,
- (INT16)rFib.lcbSttbfffn );
+ (sal_Int16)rFib.lcbSttbfffn );
}
}
@@ -899,20 +901,21 @@ void wwFontHelper::WriteFontTable( const RtfAttributeOutput& rAttrOutput )
::std::bind2nd( ::std::mem_fun( &wwFont::WriteRtf ), &rAttrOutput ) );
}
-WW8_WrPlc0::WW8_WrPlc0( ULONG nOffset )
+
+WW8_WrPlc0::WW8_WrPlc0( sal_uLong nOffset )
: aPos( 4, 4 ), nOfs( nOffset )
{
}
-void WW8_WrPlc0::Append( ULONG nStartCpOrFc )
+void WW8_WrPlc0::Append( sal_uLong nStartCpOrFc )
{
aPos.Insert( nStartCpOrFc - nOfs, aPos.Count() );
}
void WW8_WrPlc0::Write( SvStream& rStrm )
{
- USHORT nLen = aPos.Count();
- for( USHORT i = 0; i < nLen; ++i )
+ sal_uInt16 nLen = aPos.Count();
+ for( sal_uInt16 i = 0; i < nLen; ++i )
{
SVBT32 nP;
UInt32ToSVBT32( aPos[i], nP );
@@ -938,7 +941,7 @@ MSWordSections::MSWordSections( MSWordExportBase& rExport )
const SwNode* pNd = rExport.pCurPam->GetCntntNode();
const SfxItemSet* pSet = pNd ? &((SwCntntNode*)pNd)->GetSwAttrSet() : 0;
- ULONG nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
+ sal_uLong nRstLnNum = pSet ? ((SwFmtLineNumber&)pSet->Get( RES_LINENUMBER )).GetStartValue() : 0;
const SwTableNode* pTblNd = rExport.pCurPam->GetNode()->FindTableNode();
const SwSectionNode* pSectNd;
@@ -985,7 +988,7 @@ WW8_WrPlcSepx::WW8_WrPlcSepx( MSWordExportBase& rExport )
{
// to be in sync with the AppendSection() call in the MSWordSections
// constructor
- aCps.Insert( ULONG( 0 ), aCps.Count() );
+ aCps.Insert( sal_uLong( 0 ), aCps.Count() );
}
MSWordSections::~MSWordSections()
@@ -994,7 +997,7 @@ MSWordSections::~MSWordSections()
WW8_WrPlcSepx::~WW8_WrPlcSepx()
{
- USHORT nLen = aSects.Count();
+ sal_uInt16 nLen = aSects.Count();
if( pAttrs )
{
while( nLen )
@@ -1047,7 +1050,7 @@ const WW8_SepInfo* MSWordSections::CurrentSectionInfo()
}
void MSWordSections::AppendSection( const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
aSects.Insert( WW8_SepInfo( pPd, pSectionFmt, nLnNumRestartNo ),
aSects.Count() );
@@ -1055,7 +1058,7 @@ void MSWordSections::AppendSection( const SwPageDesc* pPd,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
- const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1066,7 +1069,7 @@ void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwPageDesc* pPd,
}
void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
WW8_SepInfo aI( rPD.GetPageDesc(), pSectionFmt, nLnNumRestartNo,
rPD.GetNumOffset(), &rNd );
@@ -1075,7 +1078,7 @@ void MSWordSections::AppendSection( const SwFmtPageDesc& rPD,
}
void WW8_WrPlcSepx::AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPD,
- const SwNode& rNd, const SwSectionFmt* pSectionFmt, ULONG nLnNumRestartNo )
+ const SwNode& rNd, const SwSectionFmt* pSectionFmt, sal_uLong nLnNumRestartNo )
{
if ( !bNoMoreSections )
{
@@ -1096,14 +1099,14 @@ void MSWordSections::SetNum( const SwTxtNode* pNumNd )
rInfo.pNumNd = pNumNd;
}
-void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
+void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt )
{
- BYTE nInfoFlags = 0;
+ sal_uInt8 nInfoFlags = 0;
const SwFtnInfo& rInfo = rWrt.pDoc->GetFtnInfo();
if( rInfo.aErgoSum.Len() ) nInfoFlags |= 0x02;
if( rInfo.aQuoVadis.Len() ) nInfoFlags |= 0x04;
- BYTE nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
+ sal_uInt8 nEmptyStt = rWrt.bWrtWW8 ? 0 : 6;
if( nInfoFlags )
{
if( rWrt.bWrtWW8 )
@@ -1159,8 +1162,8 @@ void WW8_WrPlcSepx::WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt )
rDop.epc = rWrt.bEndAtTxtEnd ? 3 : 0;
}
-void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_HEADER, true, &pItem)
@@ -1169,8 +1172,8 @@ void MSWordSections::SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
rHeadFootFlags |= nFlag;
}
-void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag )
+void MSWordSections::SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag )
{
const SfxPoolItem* pItem;
if( SFX_ITEM_SET == rFmt.GetItemState(RES_FOOTER, true, &pItem)
@@ -1180,8 +1183,8 @@ void MSWordSections::SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
}
void WW8_WrPlcSepx::OutHeaderFooter( WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags,
- BYTE nFlag, BYTE nBreakCode)
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags,
+ sal_uInt8 nFlag, sal_uInt8 nBreakCode)
{
if ( nFlag & nHFFlags )
{
@@ -1231,7 +1234,7 @@ void MSWordSections::CheckForFacinPg( WW8Export& rWrt ) const
// 2 Werte werden gesetzt
// Dop.fFacingPages == Kopf-/Fusszeilen unterschiedlich
// Dop.fSwapBordersFacingPgs == gespiegelte Raender
- for( USHORT i = 0, nEnde = 0; i < aSects.Count(); ++i )
+ for( sal_uInt16 i = 0, nEnde = 0; i < aSects.Count(); ++i )
{
WW8_SepInfo& rSepInfo = aSects[i];
if( !rSepInfo.pSectionFmt )
@@ -1307,21 +1310,21 @@ void WW8AttributeOutput::SectionFormProtection( bool bProtected )
}
}
-void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo )
+void WW8AttributeOutput::SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo )
{
// sprmSNLnnMod - activate Line Numbering and define Modulo
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNLnnMod );
else
m_rWW8Export.pO->Insert( 154, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetCountBy() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetCountBy() );
// sprmSDxaLnn - xPosition of Line Number
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SDxaLnn );
else
m_rWW8Export.pO->Insert( 155, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)rLnNumInfo.GetPosFromLeft() );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)rLnNumInfo.GetPosFromLeft() );
// sprmSLnc - restart number: 0 per page, 1 per section, 2 never restart
if ( nRestartNo || !rLnNumInfo.IsRestartEachPage() )
@@ -1340,7 +1343,7 @@ void WW8AttributeOutput::SectionLineNumbering( ULONG nRestartNo, const SwLineNum
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SLnnMin );
else
m_rWW8Export.pO->Insert( 160, m_rWW8Export.pO->Count() );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (UINT16)nRestartNo - 1 );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, (sal_uInt16)nRestartNo - 1 );
}
}
@@ -1358,7 +1361,7 @@ void WW8AttributeOutput::SectionPageBorders( const SwFrmFmt* pPdFmt, const SwFrm
{
if ( m_rWW8Export.bWrtWW8 ) // Seitenumrandung schreiben
{
- USHORT nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
+ sal_uInt16 nPgBorder = MSWordSections::HasBorderItem( *pPdFmt ) ? 0 : USHRT_MAX;
if ( pPdFmt != pPdFirstPgFmt )
{
if ( MSWordSections::HasBorderItem( *pPdFirstPgFmt ) )
@@ -1394,10 +1397,10 @@ void WW8AttributeOutput::SectionBiDi( bool bBiDi )
}
}
-void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber )
+void WW8AttributeOutput::SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber )
{
// sprmSNfcPgn
- BYTE nb = WW8Export::GetNumId( nNumType );
+ sal_uInt8 nb = WW8Export::GetNumId( nNumType );
if ( m_rWW8Export.bWrtWW8 )
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_SNfcPgn );
else
@@ -1422,7 +1425,7 @@ void WW8AttributeOutput::SectionPageNumbering( USHORT nNumType, USHORT nPageRest
}
}
-void WW8AttributeOutput::SectionType( BYTE nBreakCode )
+void WW8AttributeOutput::SectionType( sal_uInt8 nBreakCode )
{
if ( 2 != nBreakCode ) // new page is the default
{
@@ -1434,11 +1437,11 @@ void WW8AttributeOutput::SectionType( BYTE nBreakCode )
}
}
-void WW8AttributeOutput::SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags )
+void WW8AttributeOutput::SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags )
{
if ( nHeadFootFlags && !m_rWW8Export.bWrtWW8 )
{
- BYTE nTmpFlags = nHeadFootFlags;
+ sal_uInt8 nTmpFlags = nHeadFootFlags;
if ( m_rWW8Export.pDop->fFacingPages )
{
if ( !(nTmpFlags & WW8_FOOTER_EVEN) && (nTmpFlags & WW8_FOOTER_ODD ) )
@@ -1462,7 +1465,7 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
if ( pO->Count() )
{ // waren Attrs vorhanden ?
pA->nLen = pO->Count();
- pA->pData = new BYTE [pO->Count()];
+ pA->pData = new sal_uInt8 [pO->Count()];
memcpy( pA->pData, pO->GetData(), pO->Count() ); // -> merken
pO->Remove( 0, pO->Count() ); // leeren fuer HdFt-Text
}
@@ -1473,10 +1476,10 @@ void WW8Export::SetupSectionPositions( WW8_PdAttrDesc* pA )
}
}
-void WW8Export::WriteHeadersFooters( BYTE nHeadFootFlags,
- const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, BYTE nBreakCode )
+void WW8Export::WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
+ const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt, sal_uInt8 nBreakCode )
{
- ULONG nCpPos = Fc2Cp( Strm().Tell() );
+ sal_uLong nCpPos = Fc2Cp( Strm().Tell() );
IncrementHdFtIndex();
if ( !(nHeadFootFlags & WW8_HEADER_EVEN) && pDop->fFacingPages )
@@ -1529,7 +1532,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
/* sprmSBkc, break code: 0 No break, 1 New column
2 New page, 3 Even page, 4 Odd page
*/
- BYTE nBreakCode = 2; // default neue Seite beginnen
+ sal_uInt8 nBreakCode = 2; // default neue Seite beginnen
bool bOutPgDscSet = true, bLeftRightPgChain = false;
const SwFrmFmt* pPdFmt = &pPd->GetMaster();
const SwFrmFmt* pPdFirstPgFmt = pPdFmt;
@@ -1687,7 +1690,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
}
// Header oder Footer
- BYTE nHeadFootFlags = 0;
+ sal_uInt8 nHeadFootFlags = 0;
const SwFrmFmt* pPdLeftFmt = bLeftRightPgChain
? &pPd->GetFollow()->GetMaster()
@@ -1747,7 +1750,7 @@ void MSWordExportBase::SectionProperties( const WW8_SepInfo& rSepInfo, WW8_PdAtt
bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
{
pAttrs = new WW8_PdAttrDesc[ aSects.Count() ];
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
OSL_ENSURE( !pTxtPos, "wer hat den Pointer gesetzt?" );
pTxtPos = new WW8_WrPlc0( nCpStart );
@@ -1757,7 +1760,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
unsigned int nOldIndex = rWrt.GetHdFtIndex();
rWrt.SetHdFtIndex( 0 );
- for ( USHORT i = 0; i < aSects.Count(); ++i )
+ for ( sal_uInt16 i = 0; i < aSects.Count(); ++i )
{
WW8_PdAttrDesc* pA = pAttrs + i;
pA->pData = 0;
@@ -1774,7 +1777,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
if ( pTxtPos->Count() )
{
// HdFt vorhanden ?
- ULONG nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpEnd = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos->Append( nCpEnd ); // Ende letzter Hd/Ft fuer PlcfHdd
if ( nCpEnd > nCpStart )
@@ -1795,7 +1798,7 @@ bool WW8_WrPlcSepx::WriteKFTxt( WW8Export& rWrt )
void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aSects.Count(); i++ ) // ueber alle Sections
{
WW8_PdAttrDesc* pA = pAttrs + i;
@@ -1813,13 +1816,13 @@ void WW8_WrPlcSepx::WriteSepx( SvStream& rStrm ) const
void WW8_WrPlcSepx::WritePlcSed( WW8Export& rWrt ) const
{
OSL_ENSURE( aCps.Count() == aSects.Count() + 1, "WrPlcSepx: DeSync" );
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uInt16 i;
// ( ueber alle Sections )
for( i = 0; i <= aSects.Count(); i++ )
{
- UINT32 nP = aCps[i];
+ sal_uInt32 nP = aCps[i];
SVBT32 nPos;
UInt32ToSVBT32( nP, nPos );
rWrt.pTableStrm->Write( nPos, 4 );
@@ -1874,8 +1877,8 @@ void MSWordExportBase::WriteHeaderFooterText( const SwFmt& rFmt, bool bHeader )
{
SwNodeIndex aIdx( *pSttIdx, 1 ),
aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
// Bereich also gueltiger Node
if ( nStart < nEnd )
@@ -1957,20 +1960,20 @@ bool WW8_WrPlcAnnotations::IsNewRedlineComment( const SwRedlineData *pRedline )
WW8_WrPlcAnnotations::~WW8_WrPlcAnnotations()
{
- for( USHORT n=0; n < aCntnt.Count(); n++ )
+ for( sal_uInt16 n=0; n < aCntnt.Count(); n++ )
delete (WW8_Annotation*)aCntnt[n];
}
-bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
+bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_CP& rCount )
{
- USHORT nLen = aCntnt.Count();
+ sal_uInt16 nLen = aCntnt.Count();
if ( !nLen )
return false;
- ULONG nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
+ sal_uLong nCpStart = rWrt.Fc2Cp( rWrt.Strm().Tell() );
pTxtPos = new WW8_WrPlc0( nCpStart );
- USHORT i;
+ sal_uInt16 i;
switch ( nTTyp )
{
@@ -2006,7 +2009,7 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
const SdrObject& rObj = *(SdrObject*)aCntnt[ i ];
if (rObj.GetObjInventor() == FmFormInventor)
{
- BYTE nOldTyp = rWrt.nTxtTyp;
+ sal_uInt8 nOldTyp = rWrt.nTxtTyp;
rWrt.nTxtTyp = nTTyp;
rWrt.GetOCXExp().ExportControl(rWrt,&rObj);
rWrt.nTxtTyp = nOldTyp;
@@ -2087,13 +2090,13 @@ bool WW8_WrPlcSubDoc::WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp,
return ( rCount != 0 );
}
-void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
+void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp,
WW8_FC& rTxtStart, sal_Int32& rTxtCount, WW8_FC& rRefStart, sal_Int32& rRefCount ) const
{
typedef ::std::vector<String>::iterator myiter;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT nLen = aCps.Count();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 nLen = aCps.Count();
if ( !nLen )
return;
@@ -2101,7 +2104,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
::std::vector<String> aStrArr;
WW8Fib& rFib = *rWrt.pFib; // n+1-te CP-Pos nach Handbuch
- USHORT i;
+ sal_uInt16 i;
bool bWriteCP = true;
switch ( nTTyp )
@@ -2135,7 +2138,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
for ( i = 0; i < aStrArr.size(); ++i )
{
const String& rStr = aStrArr[i];
- *rWrt.pTableStrm << (BYTE)rStr.Len();
+ *rWrt.pTableStrm << (sal_uInt8)rStr.Len();
SwWW8Writer::WriteString8(*rWrt.pTableStrm, rStr, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -2181,7 +2184,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
// write textbox story - FTXBXS
// is it an writer or sdr - textbox?
const SdrObject* pObj = (SdrObject*)aCntnt[ i ];
- INT32 nCnt = 1;
+ sal_Int32 nCnt = 1;
if ( !pObj->ISA( SdrTextObj ) )
{
// find the "highest" SdrObject of this
@@ -2240,7 +2243,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
"Impossible");
sal_uInt16 nFndPos = static_cast< sal_uInt16 >(aIter - aStrArr.begin());
String sAuthor(*aIter);
- BYTE nNameLen = (BYTE)sAuthor.Len();
+ sal_uInt8 nNameLen = (sal_uInt8)sAuthor.Len();
if ( nNameLen > 9 )
{
sAuthor.Erase( 9 );
@@ -2274,7 +2277,7 @@ void WW8_WrPlcSubDoc::WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp,
}
else
{
- USHORT nNo = 0;
+ sal_uInt16 nNo = 0;
for ( i = 0; i < nLen; ++i ) // Schreibe Flags
{
const SwFmtFtn* pFtn = (SwFmtFtn*)aCntnt[ i ];
diff --git a/sw/source/filter/ww8/wrtww8.cxx b/sw/source/filter/ww8/wrtww8.cxx
index 0619a8185166..9f63574adfd5 100644
--- a/sw/source/filter/ww8/wrtww8.cxx
+++ b/sw/source/filter/ww8/wrtww8.cxx
@@ -111,6 +111,8 @@
#include "dbgoutsw.hxx"
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <svl/stritem.hxx>
#include <unotools/tempfile.hxx>
#include <filter/msfilter/mscodec.hxx>
@@ -127,42 +129,42 @@ using namespace sw::types;
*/
class WW8_WrFkp
{
- BYTE* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
- BYTE* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
+ sal_uInt8* pFkp; // gesamter Fkp ( zuerst nur FCs und Sprms )
+ sal_uInt8* pOfs; // Pointer auf Offset-Bereich, spaeter nach pFkp kopiert
ePLCFT ePlc;
short nStartGrp; // ab hier grpprls
short nOldStartGrp;
- BYTE nItemSize;
- BYTE nIMax; // Anzahl der Eintrags-Paare
- BYTE nOldVarLen;
- BYTE nMark;
+ sal_uInt8 nItemSize;
+ sal_uInt8 nIMax; // Anzahl der Eintrags-Paare
+ sal_uInt8 nOldVarLen;
+ sal_uInt8 nMark;
bool bCombined; // true : Einfuegen verboten
- BYTE SearchSameSprm( USHORT nVarLen, const BYTE* pSprms );
+ sal_uInt8 SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms );
public:
WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8);
~WW8_WrFkp();
- bool Append( WW8_FC nEndFc, USHORT nVarLen = 0, const BYTE* pSprms = 0 );
+ bool Append( WW8_FC nEndFc, sal_uInt16 nVarLen = 0, const sal_uInt8* pSprms = 0 );
bool Combine();
void Write( SvStream& rStrm, SwWW8WrGrf& rGrf );
bool IsEqualPos(WW8_FC nEndFc) const
- { return !bCombined && nIMax && nEndFc == ((INT32*)pFkp)[nIMax]; }
- void MergeToNew( short& rVarLen, BYTE *& pNewSprms );
+ { return !bCombined && nIMax && nEndFc == ((sal_Int32*)pFkp)[nIMax]; }
+ void MergeToNew( short& rVarLen, sal_uInt8 *& pNewSprms );
bool IsEmptySprm() const
{ return !bCombined && nIMax && !nOldVarLen; }
void SetNewEnd( WW8_FC nEnd )
- { ((INT32*)pFkp)[nIMax] = nEnd; }
+ { ((sal_Int32*)pFkp)[nIMax] = nEnd; }
#ifdef __WW8_NEEDS_COPY
WW8_FC GetStartFc() const;
WW8_FC GetEndFc() const;
#else
- WW8_FC GetStartFc() const { return ((INT32*)pFkp)[0]; };
- WW8_FC GetEndFc() const { return ((INT32*)pFkp)[nIMax]; };
+ WW8_FC GetStartFc() const { return ((sal_Int32*)pFkp)[0]; };
+ WW8_FC GetEndFc() const { return ((sal_Int32*)pFkp)[nIMax]; };
#endif // defined __WW8_NEEDS_COPY
- BYTE *CopyLastSprms(BYTE &rLen, bool bVer8);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen, bool bVer8);
};
@@ -174,7 +176,7 @@ class WW8_WrPc
{
WW8_CP nStartCp; // Start ZeichenPosition vom Text
WW8_FC nStartFc; // Start File Position vom Text
- USHORT nStatus; // Absatzende im Piece ?
+ sal_uInt16 nStatus; // Absatzende im Piece ?
public:
WW8_WrPc(WW8_FC nSFc, WW8_CP nSCp )
@@ -182,7 +184,7 @@ public:
{}
void SetStatus() { nStatus = 0x0050; }
- USHORT GetStatus() const { return nStatus; }
+ sal_uInt16 GetStatus() const { return nStatus; }
WW8_CP GetStartCp() const { return nStartCp; }
WW8_FC GetStartFc() const { return nStartFc; }
};
@@ -192,11 +194,11 @@ class WW8_WrtBookmarks
private:
//! Holds information about a single bookmark.
struct BookmarkInfo {
- ULONG startPos; //!< Starting character position.
- ULONG endPos; //!< Ending character position.
+ sal_uLong startPos; //!< Starting character position.
+ sal_uLong endPos; //!< Ending character position.
bool isField; //!< True if the bookmark is in a field result.
String name; //!< Name of this bookmark.
- inline BookmarkInfo(ULONG start, ULONG end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
+ inline BookmarkInfo(sal_uLong start, sal_uLong end, bool isFld, const String& bkName) : startPos(start), endPos(end), isField(isFld), name(bkName) {};
//! Operator < is defined purely for sorting.
inline bool operator<(const BookmarkInfo &other) const { return startPos < other.startPos; }
};
@@ -218,7 +220,7 @@ public:
//! Write out bookmarks to file.
void Write( WW8Export& rWrt );
//! Move existing field marks from one position to another.
- void MoveFieldMarks(ULONG nFrom,ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom,sal_uLong nTo);
};
@@ -229,7 +231,7 @@ public:
#define sCompObj CREATE_CONST_ASC("\1CompObj")
-SV_IMPL_VARARR( WW8Bytes, BYTE )
+SV_IMPL_VARARR( WW8Bytes, sal_uInt8 )
SV_IMPL_PTRARR( WW8_WrFkpPtrs, WW8_FkpPtr )
typedef WW8_WrPc* WW8_WrPcPtr;
@@ -250,7 +252,7 @@ static void WriteDop( WW8Export& rWrt )
// default TabStop schreiben
const SvxTabStopItem& rTabStop =
DefaultItemGet<SvxTabStopItem>(*rWrt.pDoc, RES_PARATR_TABSTOP);
- rDop.dxaTab = (USHORT)rTabStop[0].GetTabPos();
+ rDop.dxaTab = (sal_uInt16)rTabStop[0].GetTabPos();
// Werte aus der DocStatistik (werden aufjedenfall fuer die
@@ -260,7 +262,7 @@ static void WriteDop( WW8Export& rWrt )
const SwDocStat& rDStat = rWrt.pDoc->GetDocStat();
rDop.cWords = rDStat.nWord;
rDop.cCh = rDStat.nChar;
- rDop.cPg = static_cast< INT16 >(rDStat.nPage);
+ rDop.cPg = static_cast< sal_Int16 >(rDStat.nPage);
rDop.cParas = rDStat.nPara;
rDop.cLines = rDStat.nPara;
@@ -316,7 +318,7 @@ static void WriteDop( WW8Export& rWrt )
// und noch fuer die Header und Footers
rDop.cWordsFtnEnd = rDStat.nWord;
rDop.cChFtnEdn = rDStat.nChar;
- rDop.cPgFtnEdn = (INT16)rDStat.nPage;
+ rDop.cPgFtnEdn = (sal_Int16)rDStat.nPage;
rDop.cParasFtnEdn = rDStat.nPara;
rDop.cLinesFtnEdn = rDStat.nPara;
@@ -450,7 +452,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
const i18n::ForbiddenCharacters *pForbidden = 0;
const i18n::ForbiddenCharacters *pUseMe = 0;
- BYTE nUseReserved=0;
+ sal_uInt8 nUseReserved=0;
int nNoNeeded=0;
/*
Now we have some minor difficult issues, to wit...
@@ -553,7 +555,7 @@ void WW8Export::ExportDopTypography(WW8DopTypography &rTypo)
// Es kann nur etwas gefunden werden, wenn diese Methode innerhalb
// der aufgerufenen Methoden WW8_SwAttrIter::OutAttr() und
// WW8Export::OutputItemSet() benutzt wird.
-const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
+const SfxPoolItem* MSWordExportBase::HasItem( sal_uInt16 nWhich ) const
{
const SfxPoolItem* pItem=0;
if (pISet)
@@ -575,7 +577,7 @@ const SfxPoolItem* MSWordExportBase::HasItem( USHORT nWhich ) const
return pItem;
}
-const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
+const SfxPoolItem& MSWordExportBase::GetItem(sal_uInt16 nWhich) const
{
const SfxPoolItem* pItem;
if (pISet)
@@ -599,11 +601,11 @@ const SfxPoolItem& MSWordExportBase::GetItem(USHORT nWhich) const
//------------------------------------------------------------------------------
-WW8_WrPlc1::WW8_WrPlc1( USHORT nStructSz )
+WW8_WrPlc1::WW8_WrPlc1( sal_uInt16 nStructSz )
: aPos( 16, 16 ), nStructSiz( nStructSz )
{
nDataLen = 16 * nStructSz;
- pData = new BYTE[ nDataLen ];
+ pData = new sal_uInt8[ nDataLen ];
}
WW8_WrPlc1::~WW8_WrPlc1()
@@ -613,18 +615,18 @@ WW8_WrPlc1::~WW8_WrPlc1()
WW8_CP WW8_WrPlc1::Prev() const
{
- USHORT nLen = aPos.Count();
+ sal_uInt16 nLen = aPos.Count();
OSL_ENSURE(nLen,"Prev called on empty list");
return nLen ? aPos[nLen-1] : 0;
}
void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
{
- ULONG nInsPos = aPos.Count() * nStructSiz;
+ sal_uLong nInsPos = aPos.Count() * nStructSiz;
aPos.Insert( nCp, aPos.Count() );
if( nDataLen < nInsPos + nStructSiz )
{
- BYTE* pNew = new BYTE[ 2 * nDataLen ];
+ sal_uInt8* pNew = new sal_uInt8[ 2 * nDataLen ];
memmove( pNew, pData, nDataLen );
delete[] pData;
pData = pNew;
@@ -633,13 +635,13 @@ void WW8_WrPlc1::Append( WW8_CP nCp, const void* pNewData )
memcpy( pData + nInsPos, pNewData, nStructSiz );
}
-void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
+void WW8_WrPlc1::Finish( sal_uLong nLastCp, sal_uLong nSttCp )
{
if( aPos.Count() )
{
aPos.Insert( nLastCp, aPos.Count() );
if( nSttCp )
- for( USHORT n = 0; n < aPos.Count(); ++n )
+ for( sal_uInt16 n = 0; n < aPos.Count(); ++n )
aPos[ n ] -= nSttCp;
}
}
@@ -647,7 +649,7 @@ void WW8_WrPlc1::Finish( ULONG nLastCp, ULONG nSttCp )
void WW8_WrPlc1::Write( SvStream& rStrm )
{
- USHORT i;
+ sal_uInt16 i;
for( i = 0; i < aPos.Count(); ++i )
SwWW8Writer::WriteLong( rStrm, aPos[i] );
if( i )
@@ -709,7 +711,7 @@ bool WW8_WrPlcFld::Write( WW8Export& rWrt )
if( pfc && plc )
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
*pfc = nFcStart;
*plc = rWrt.pTableStrm->Tell() - nFcStart;
@@ -721,14 +723,14 @@ bool WW8_WrMagicTable::Write( WW8Export& rWrt )
{
if( WW8_WrPlc1::Count() <= 1 )
return false;
- ULONG nFcStart = rWrt.pTableStrm->Tell();
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
WW8_WrPlc1::Write( *rWrt.pTableStrm );
rWrt.pFib->fcPlcfTch = nFcStart;
rWrt.pFib->lcbPlcfTch = rWrt.pTableStrm->Tell() - nFcStart;
return true;
}
-void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
+void WW8_WrMagicTable::Append( WW8_CP nCp, sal_uLong nData)
{
SVBT32 nLittle;
/*
@@ -745,9 +747,9 @@ void WW8_WrMagicTable::Append( WW8_CP nCp, ULONG nData)
//--------------------------------------------------------------------------
-void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
+void SwWW8Writer::FillCount( SvStream& rStrm, sal_uLong nCount )
{
- static const UINT32 aNulls[16] =
+ static const sal_uInt32 aNulls[16] =
{
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 // 64 Byte
};
@@ -760,9 +762,9 @@ void SwWW8Writer::FillCount( SvStream& rStrm, ULONG nCount )
rStrm.Write( aNulls, nCount ); // Rest ( 0 .. 64 Bytes ) schreiben
}
-ULONG SwWW8Writer::FillUntil( SvStream& rStrm, ULONG nEndPos )
+sal_uLong SwWW8Writer::FillUntil( SvStream& rStrm, sal_uLong nEndPos )
{
- ULONG nCurPos = rStrm.Tell();
+ sal_uLong nCurPos = rStrm.Tell();
if( !nEndPos ) // nEndPos == 0 -> next Page
nEndPos = (nCurPos + 0x1ff) & ~0x1ffUL;
@@ -791,22 +793,22 @@ WW8_WrPlcPn::~WW8_WrPlcPn()
aFkps.DeleteAndDestroy( 0, aFkps.Count() );
}
-BYTE *WW8_WrPlcPn::CopyLastSprms(BYTE &rLen)
+sal_uInt8 *WW8_WrPlcPn::CopyLastSprms(sal_uInt8 &rLen)
{
WW8_FkpPtr pF = aFkps.GetObject(aFkps.Count() - 1);
return pF->CopyLastSprms(rLen, rWrt.bWrtWW8);
}
-void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
+void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const sal_uInt8* pSprms)
{
WW8_FkpPtr pF = aFkps.GetObject( aFkps.Count() - 1 );
// big sprm? build the sprmPHugePapx
- BYTE* pNewSprms = (BYTE*)pSprms;
- BYTE aHugePapx[ 8 ];
+ sal_uInt8* pNewSprms = (sal_uInt8*)pSprms;
+ sal_uInt8 aHugePapx[ 8 ];
if( rWrt.bWrtWW8 && PAP == ePlc && 488 < nVarLen )
{
- BYTE* p = aHugePapx;
+ sal_uInt8* p = aHugePapx;
*p++ = *pSprms++; // set style Id
*p++ = *pSprms++;
nVarLen -= 2;
@@ -850,9 +852,9 @@ void WW8_WrPlcPn::AppendFkpEntry(WW8_FC nEndFc,short nVarLen,const BYTE* pSprms)
void WW8_WrPlcPn::WriteFkps()
{
- nFkpStartPage = (USHORT) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
+ nFkpStartPage = (sal_uInt16) ( SwWW8Writer::FillUntil( rWrt.Strm() ) >> 9 );
- for( USHORT i = 0; i < aFkps.Count(); i++ )
+ for( sal_uInt16 i = 0; i < aFkps.Count(); i++ )
aFkps.GetObject( i )->Write( rWrt.Strm(), *rWrt.pGrf );
if( CHP == ePlc )
@@ -869,8 +871,8 @@ void WW8_WrPlcPn::WriteFkps()
void WW8_WrPlcPn::WritePlc()
{
- ULONG nFcStart = rWrt.pTableStrm->Tell();
- USHORT i;
+ sal_uLong nFcStart = rWrt.pTableStrm->Tell();
+ sal_uInt16 i;
for( i = 0; i < aFkps.Count(); i++ )
SwWW8Writer::WriteLong( *rWrt.pTableStrm,
@@ -907,25 +909,25 @@ WW8_WrFkp::WW8_WrFkp(ePLCFT ePl, WW8_FC nStartFc, bool bWrtWW8)
nItemSize( ( CHP == ePl ) ? 1 : ( bWrtWW8 ? 13 : 7 )),
nIMax(0), nOldVarLen(0), nMark(0), bCombined(false)
{
- pFkp = (BYTE*)new INT32[128]; // 512 Byte
- pOfs = (BYTE*)new INT32[128]; // 512 Byte
+ pFkp = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
+ pOfs = (sal_uInt8*)new sal_Int32[128]; // 512 Byte
memset( pFkp, 0, 4 * 128 );
memset( pOfs, 0, 4 * 128 );
- ( (INT32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
+ ( (sal_Int32*)pFkp )[0] = nStartFc; // 0. FC-Eintrag auf nStartFc
}
WW8_WrFkp::~WW8_WrFkp()
{
- delete[] (INT32 *)pFkp;
- delete[] (INT32 *)pOfs;
+ delete[] (sal_Int32 *)pFkp;
+ delete[] (sal_Int32 *)pOfs;
}
-BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
+sal_uInt8 WW8_WrFkp::SearchSameSprm( sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
if( 3 < nVarLen )
{
// if the sprms contained picture-references then never equal!
- for( BYTE n = static_cast< BYTE >(nVarLen - 1); 3 < n; --n )
+ for( sal_uInt8 n = static_cast< sal_uInt8 >(nVarLen - 1); 3 < n; --n )
if( pSprms[ n ] == GRF_MAGIC_3 &&
pSprms[ n-1 ] == GRF_MAGIC_2 &&
pSprms[ n-2 ] == GRF_MAGIC_1 )
@@ -935,13 +937,13 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
short i;
for( i = 0; i < nIMax; i++ )
{
- BYTE nStart = pOfs[i * nItemSize];
+ sal_uInt8 nStart = pOfs[i * nItemSize];
if( nStart )
{ // Hat Sprms
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if( ( CHP == ePlc
? (*p++ == nVarLen)
- : (((USHORT)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
+ : (((sal_uInt16)*p++ << 1 ) == (( nVarLen+1) & 0xfffe)) )
&& !memcmp( p, pSprms, nVarLen ) )
return nStart; // gefunden
}
@@ -949,19 +951,19 @@ BYTE WW8_WrFkp::SearchSameSprm( USHORT nVarLen, const BYTE* pSprms )
return 0; // nicht gefunden
}
-BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
+sal_uInt8 *WW8_WrFkp::CopyLastSprms(sal_uInt8 &rLen, bool bVer8)
{
rLen=0;
- BYTE *pStart=0,*pRet=0;
+ sal_uInt8 *pStart=0,*pRet=0;
if (!bCombined)
pStart = pOfs;
else
pStart = pFkp + ( nIMax + 1 ) * 4;
- BYTE nStart = *(pStart + (nIMax-1) * nItemSize);
+ sal_uInt8 nStart = *(pStart + (nIMax-1) * nItemSize);
- const BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ const sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
if (!*p && bVer8)
p++;
@@ -971,13 +973,13 @@ BYTE *WW8_WrFkp::CopyLastSprms(BYTE &rLen, bool bVer8)
rLen = *p++;
if (PAP == ePlc)
rLen *= 2;
- pRet = new BYTE[rLen];
+ pRet = new sal_uInt8[rLen];
memcpy(pRet,p,rLen);
}
return pRet;
}
-bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
+bool WW8_WrFkp::Append( WW8_FC nEndFc, sal_uInt16 nVarLen, const sal_uInt8* pSprms )
{
OSL_ENSURE( !nVarLen || pSprms, "Item-Pointer fehlt" );
OSL_ENSURE( nVarLen < ( ( ePlc == PAP ) ? 497U : 502U ), "Sprms zu lang !" );
@@ -987,7 +989,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
OSL_ENSURE( !this, "Fkp::Append: Fkp is already combined" );
return false;
}
- INT32 n = ((INT32*)pFkp)[nIMax]; // letzter Eintrag
+ sal_Int32 n = ((sal_Int32*)pFkp)[nIMax]; // letzter Eintrag
if( nEndFc <= n )
{
OSL_ENSURE( nEndFc >= n, "+Fkp: FC rueckwaerts" );
@@ -998,7 +1000,7 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
return true; // ignorieren, keinen neuen Fkp anlegen
}
- BYTE nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
+ sal_uInt8 nOldP = ( nVarLen ) ? SearchSameSprm( nVarLen, pSprms ) : 0;
// Kombinieren gleicher Eintraege
short nOffset=0, nPos = nStartGrp;
if (nVarLen && !nOldP)
@@ -1014,22 +1016,22 @@ bool WW8_WrFkp::Append( WW8_FC nEndFc, USHORT nVarLen, const BYTE* pSprms )
nPos &= 0xFFFE; // Pos fuer Sprms ( gerade Pos )
}
- if( (USHORT)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
+ if( (sal_uInt16)nPos <= ( nIMax + 2U ) * 4U + ( nIMax + 1U ) * nItemSize )
// Passt hinter CPs und Offsets ?
return false; // Nein
- ((INT32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
+ ((sal_Int32*)pFkp)[nIMax + 1] = nEndFc; // FC eintragen
- nOldVarLen = (BYTE)nVarLen;
+ nOldVarLen = (sal_uInt8)nVarLen;
if( nVarLen && !nOldP )
{ // echt eintragen
nOldStartGrp = nStartGrp;
nStartGrp = nPos;
- pOfs[nIMax * nItemSize] = (BYTE)( nStartGrp >> 1 );
+ pOfs[nIMax * nItemSize] = (sal_uInt8)( nStartGrp >> 1 );
// ( DatenAnfg >> 1 ) eintragen
- BYTE nCnt = static_cast< BYTE >(CHP == ePlc
- ? ( nVarLen < 256 ) ? (BYTE) nVarLen : 255
+ sal_uInt8 nCnt = static_cast< sal_uInt8 >(CHP == ePlc
+ ? ( nVarLen < 256 ) ? (sal_uInt8) nVarLen : 255
: ( ( nVarLen + 1 ) >> 1 ));
pFkp[ nOffset ] = nCnt; // DatenLaenge eintragen
@@ -1053,14 +1055,14 @@ bool WW8_WrFkp::Combine()
memcpy( pFkp + ( nIMax + 1 ) * 4, pOfs, nIMax * nItemSize );
delete[] pOfs;
pOfs = 0;
- ((BYTE*)pFkp)[511] = nIMax;
+ ((sal_uInt8*)pFkp)[511] = nIMax;
bCombined = true;
#if defined OSL_BIGENDIAN // Hier werden nur die FCs gedreht, die
- USHORT i; // Sprms muessen an anderer Stelle gedreht
+ sal_uInt16 i; // Sprms muessen an anderer Stelle gedreht
// werden
- UINT32* p;
- for( i = 0, p = (UINT32*)pFkp; i <= nIMax; i++, p++ )
+ sal_uInt32* p;
+ for( i = 0, p = (sal_uInt32*)pFkp; i <= nIMax; i++, p++ )
*p = SWAPLONG( *p );
#endif // ifdef OSL_BIGENDIAN
@@ -1071,8 +1073,8 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
{
Combine(); // Falls noch nicht Combined
- BYTE* p; // Suche Magic fuer nPicLocFc
- BYTE* pEnd = pFkp + nStartGrp;
+ sal_uInt8* p; // Suche Magic fuer nPicLocFc
+ sal_uInt8* pEnd = pFkp + nStartGrp;
for( p = pFkp + 511 - 4; p >= pEnd; p-- )
{
if( *p != GRF_MAGIC_1 ) // Suche nach Signatur 0x12 0x34 0x56 0xXX
@@ -1089,23 +1091,23 @@ void WW8_WrFkp::Write( SvStream& rStrm, SwWW8WrGrf& rGrf )
rStrm.Write( pFkp, 512 );
}
-void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
+void WW8_WrFkp::MergeToNew( short& rVarLen, sal_uInt8 *& rpNewSprms )
{
- BYTE nStart = pOfs[ (nIMax-1) * nItemSize ];
+ sal_uInt8 nStart = pOfs[ (nIMax-1) * nItemSize ];
if( nStart )
{ // Hat Sprms
- BYTE* p = pFkp + ( (USHORT)nStart << 1 );
+ sal_uInt8* p = pFkp + ( (sal_uInt16)nStart << 1 );
// old and new equal? Then copy only one into the new sprms
if( nOldVarLen == rVarLen && !memcmp( p+1, rpNewSprms, nOldVarLen ))
{
- BYTE* pNew = new BYTE[ nOldVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen ];
memcpy( pNew, p+1, nOldVarLen );
rpNewSprms = pNew;
}
else
{
- BYTE* pNew = new BYTE[ nOldVarLen + rVarLen ];
+ sal_uInt8* pNew = new sal_uInt8[ nOldVarLen + rVarLen ];
memcpy( pNew, p+1, nOldVarLen );
memcpy( pNew + nOldVarLen, rpNewSprms, rVarLen );
@@ -1115,7 +1117,7 @@ void WW8_WrFkp::MergeToNew( short& rVarLen, BYTE *& rpNewSprms )
--nIMax;
// if this sprms dont used from others, remove it
bool bFnd = false;
- for (USHORT n = 0; n < nIMax; ++n)
+ for (sal_uInt16 n = 0; n < nIMax; ++n)
{
if (nStart == pOfs[n * nItemSize])
{
@@ -1140,14 +1142,14 @@ WW8_FC WW8_WrFkp::GetStartFc() const
// zurueckgedreht werden.
if( bCombined )
return SVBT32ToUInt32( pFkp ); // 0. Element
- return ((INT32*)pFkp)[0];
+ return ((sal_Int32*)pFkp)[0];
}
WW8_FC WW8_WrFkp::GetEndFc() const
{
if( bCombined )
return SVBT32ToUInt32( &(pFkp[nIMax*4]) ); // nIMax-tes SVBT32-Element
- return ((INT32*)pFkp)[nIMax];
+ return ((sal_Int32*)pFkp)[nIMax];
}
#endif // defined __WW8_NEEDS_COPY
@@ -1206,9 +1208,9 @@ void WW8_WrPct::AppendPc(WW8_FC nStartFc, bool bIsUnicode)
void WW8_WrPct::WritePc( WW8Export& rWrt )
{
- ULONG nPctStart;
- ULONG nOldPos, nEndPos;
- USHORT i;
+ sal_uLong nPctStart;
+ sal_uLong nOldPos, nEndPos;
+ sal_uInt16 i;
nPctStart = rWrt.pTableStrm->Tell(); // Beginn Piece-Table
*rWrt.pTableStrm << ( char )0x02; // Statusbyte PCT
@@ -1220,7 +1222,7 @@ void WW8_WrPct::WritePc( WW8Export& rWrt )
// die letzte Pos noch errechnen
- ULONG nStartCp = rWrt.pFib->fcMac - nOldFc;
+ sal_uLong nStartCp = rWrt.pFib->fcMac - nOldFc;
if( bIsUni )
nStartCp >>= 1; // Bei Unicode Anzahl der Zeichen / 2
nStartCp += pPcts->GetObject( i-1 )->GetStartCp();
@@ -1253,9 +1255,9 @@ void WW8_WrPct::SetParaBreak()
pPcts->GetObject( pPcts->Count() - 1)->SetStatus();
}
-WW8_CP WW8_WrPct::Fc2Cp( ULONG nFc ) const
+WW8_CP WW8_WrPct::Fc2Cp( sal_uLong nFc ) const
{
- OSL_ENSURE( nFc >= (ULONG)nOldFc, "FilePos liegt vorm letzten Piece" );
+ OSL_ENSURE( nFc >= (sal_uLong)nOldFc, "FilePos liegt vorm letzten Piece" );
OSL_ENSURE( pPcts->Count(), "Fc2Cp noch kein Piece vorhanden" );
nFc -= nOldFc;
@@ -1323,7 +1325,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//before that we need a lookup table (sorted by start position) to link
//start and end positions.
// Start by sorting the end positions.
- std::vector<ULONG> aEndSortTab;
+ std::vector<sal_uLong> aEndSortTab;
aEndSortTab.reserve(aBookmarks.size());
for (BkmIter bIt = aBookmarks.begin(); bIt < aBookmarks.end(); ++bIt)
aEndSortTab.push_back(bIt->endPos);
@@ -1331,10 +1333,10 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
//Now write out the lookups.
//Note that in most cases, the positions in both vectors will be very close.
- for( ULONG i = 0; i < aBookmarks.size(); ++i )
+ for( sal_uLong i = 0; i < aBookmarks.size(); ++i )
{
- ULONG nEndCP = aBookmarks[ i ].endPos;
- USHORT nPos = i;
+ sal_uLong nEndCP = aBookmarks[ i ].endPos;
+ sal_uInt16 nPos = i;
if( aEndSortTab[ nPos ] > nEndCP )
{
while( aEndSortTab[ --nPos ] != nEndCP )
@@ -1349,7 +1351,7 @@ void WW8_WrtBookmarks::Write( WW8Export& rWrt )
// Finally, the actual Bookmark end positions.
rWrt.pFib->fcPlcfbkl = rStrm.Tell();
- for(ULONG i = 0; i < aEndSortTab.size(); ++i )
+ for(sal_uLong i = 0; i < aEndSortTab.size(); ++i )
SwWW8Writer::WriteLong( rStrm, aEndSortTab[ i ] );
SwWW8Writer::WriteLong(rStrm, rWrt.pFib->ccpText + rWrt.pFib->ccpTxbx);
rWrt.pFib->lcbPlcfbkl = rStrm.Tell() - rWrt.pFib->fcPlcfbkl;
@@ -1365,7 +1367,7 @@ WW8_WrtBookmarks::BkmIter WW8_WrtBookmarks::GetPos( const String& rNm )
return aBookmarks.end();
}
-void WW8_WrtBookmarks::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8_WrtBookmarks::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
for (BkmIter i = aBookmarks.begin(); i < aBookmarks.end(); ++i)
{
@@ -1385,12 +1387,12 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
xub_StrLen nAktPos, xub_StrLen nLen )
{
SvPtrarr aArr( 8, 8 );
- USHORT nCntnt;
+ sal_uInt16 nCntnt;
xub_StrLen nAktEnd = nAktPos + nLen;
if( GetWriter().GetBookmarks( rNd, nAktPos, nAktEnd, aArr ))
{
- ULONG nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
- for( USHORT n = 0; n < aArr.Count(); ++n )
+ sal_uLong nNd = rNd.GetIndex(), nSttCP = Fc2Cp( Strm().Tell() );
+ for( sal_uInt16 n = 0; n < aArr.Count(); ++n )
{
::sw::mark::IMark& rBkmk = *(::sw::mark::IMark*)aArr[ n ];
if(dynamic_cast< ::sw::mark::IFieldmark *>(&rBkmk))
@@ -1411,28 +1413,28 @@ void WW8Export::AppendBookmarks( const SwTxtNode& rNd,
( nCntnt = pPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd ) )
{
- ULONG nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
if( pOPos && nNd == pOPos->nNode.GetIndex() &&
( nCntnt = pOPos->nContent.GetIndex() ) >= nAktPos &&
nCntnt < nAktEnd )
{
- ULONG nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
+ sal_uLong nCp = nSttCP + pOPos->nContent.GetIndex() - nAktPos;
pBkmks->Append(nCp, BookmarkToWord(rBkmk.GetName()), &rBkmk);
}
}
}
}
-void WW8Export::MoveFieldMarks(ULONG nFrom, ULONG nTo)
+void WW8Export::MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo)
{
pBkmks->MoveFieldMarks(nFrom, nTo);
}
void WW8Export::AppendBookmark( const rtl::OUString& rName, bool bSkip )
{
- ULONG nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
+ sal_uLong nSttCP = Fc2Cp( Strm().Tell() ) + ( bSkip? 1: 0 );
pBkmks->Append( nSttCP, rName );
}
@@ -1452,7 +1454,7 @@ void WW8_WrtRedlineAuthor::Write( Writer& rWrt )
rWW8Wrt.pFib->lcbSttbfRMark, rWW8Wrt.bWrtWW8 ? 0 : 2);
}
-USHORT WW8Export::AddRedlineAuthor( USHORT nId )
+sal_uInt16 WW8Export::AddRedlineAuthor( sal_uInt16 nId )
{
if( !pRedlAuthors )
{
@@ -1466,9 +1468,9 @@ USHORT WW8Export::AddRedlineAuthor( USHORT nId )
/* */
void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
- INT32& rfcSttbf, INT32& rlcbSttbf, USHORT nExtraLen)
+ sal_Int32& rfcSttbf, sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen)
{
- USHORT n, nCount = static_cast< USHORT >(rStrings.size());
+ sal_uInt16 n, nCount = static_cast< sal_uInt16 >(rStrings.size());
if( nCount )
{
// we have some Redlines found in the document -> the
@@ -1494,7 +1496,7 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
for( n = 0; n < nCount; ++n )
{
const String aNm(rStrings[n].Copy(0, 255));
- rStrm << (BYTE)aNm.Len();
+ rStrm << (sal_uInt8)aNm.Len();
SwWW8Writer::WriteString8(rStrm, aNm, false,
RTL_TEXTENCODING_MS_1252);
if (nExtraLen)
@@ -1503,23 +1505,23 @@ void WW8Export::WriteAsStringTable(const std::vector<String>& rStrings,
}
rlcbSttbf = rStrm.Tell() - rfcSttbf;
if( !bWrtWW8 )
- SwWW8Writer::WriteShort( rStrm, rfcSttbf, (USHORT)rlcbSttbf );
+ SwWW8Writer::WriteShort( rStrm, rfcSttbf, (sal_uInt16)rlcbSttbf );
}
}
// WriteShort() traegt an FilePos nPos den Wert nVal ein und seekt auf die
// alte FilePos zurueck. Benutzt zum Nachtragen von Laengen.
-void SwWW8Writer::WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal )
+void SwWW8Writer::WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteShort( rStrm, nVal );
rStrm.Seek( nOldPos );
}
-void SwWW8Writer::WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal )
+void SwWW8Writer::WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal )
{
- ULONG nOldPos = rStrm.Tell(); // Pos merken
+ sal_uLong nOldPos = rStrm.Tell(); // Pos merken
rStrm.Seek( nPos );
SwWW8Writer::WriteLong( rStrm, nVal );
rStrm.Seek( nOldPos );
@@ -1563,13 +1565,13 @@ void SwWW8Writer::InsAsString8(ww::bytes &rO, const String& rStr,
#ifdef __WW8_NEEDS_COPY
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
SVBT16 nL;
ShortToSVBT16( n, nL );
rO.Insert( nL, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
SVBT32 nL;
UInt32ToSVBT32( n, nL );
@@ -1578,13 +1580,13 @@ void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
#else
-void SwWW8Writer::InsUInt16( WW8Bytes& rO, UINT16 n )
+void SwWW8Writer::InsUInt16( WW8Bytes& rO, sal_uInt16 n )
{
- rO.Insert( (BYTE*)&n, 2, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 2, rO.Count() );
}
-void SwWW8Writer::InsUInt32( WW8Bytes& rO, UINT32 n )
+void SwWW8Writer::InsUInt32( WW8Bytes& rO, sal_uInt32 n )
{
- rO.Insert( (BYTE*)&n, 4, rO.Count() );
+ rO.Insert( (sal_uInt8*)&n, 4, rO.Count() );
}
#endif // defined __WW8_NEEDS_COPY
@@ -1600,7 +1602,7 @@ void SwWW8Writer::InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet )
{
ByteString sTmp( rStr, eCodeSet );
- rO.Insert( (BYTE*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
+ rO.Insert( (sal_uInt8*)sTmp.GetBuffer(), sTmp.Len(), rO.Count() );
}
void SwWW8Writer::WriteString16(SvStream& rStrm, const String& rStr,
@@ -1640,7 +1642,7 @@ void SwWW8Writer::WriteString8(SvStream& rStrm, const String& rStr,
rStrm.Write(&aBytes[0], aBytes.size());
}
-void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
+void WW8Export::WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId )
{
if( rTxt.Len() )
OutSwString( rTxt, 0, rTxt.Len(), IsUnicode(), RTL_TEXTENCODING_MS_1252 );
@@ -1658,14 +1660,14 @@ void WW8Export::WriteStringAsPara( const String& rTxt, USHORT nStyleId )
aArr.Insert( 1, aArr.Count() );
}
- ULONG nPos = Strm().Tell();
+ sal_uLong nPos = Strm().Tell();
pPapPlc->AppendFkpEntry( nPos, aArr.Count(), aArr.GetData() );
pChpPlc->AppendFkpEntry( nPos );
}
-void MSWordExportBase::WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp )
+void MSWordExportBase::WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp )
{
- BYTE nOldTyp = nTxtTyp;
+ sal_uInt8 nOldTyp = nTxtTyp;
nTxtTyp = nTTyp;
SwPaM* pOldPam = pCurPam; //!! Einfaches Umsetzen des PaM ohne
SwPaM* pOldEnd = pOrigPam; // Wiederherstellen muesste es auch tun
@@ -1752,10 +1754,10 @@ void WW8Export::WriteChar( sal_Unicode c )
if( pPiece->IsUnicode() )
Strm() << c;
else
- Strm() << (BYTE)c;
+ Strm() << (sal_uInt8)c;
}
-void MSWordExportBase::SaveData( ULONG nStt, ULONG nEnd )
+void MSWordExportBase::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordSaveData aData;
@@ -1823,7 +1825,7 @@ void MSWordExportBase::RestoreData()
maSaveData.pop();
}
-void WW8Export::SaveData( ULONG nStt, ULONG nEnd )
+void WW8Export::SaveData( sal_uLong nStt, sal_uLong nEnd )
{
MSWordExportBase::SaveData( nStt, nEnd );
@@ -1876,14 +1878,14 @@ void WW8AttributeOutput::TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pT
{
/* Cell */
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
m_rWW8Export.InsUInt32( nDepth );
if ( nDepth > 1 && pTableTextNodeInfoInner->isEndOfCell() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
}
}
@@ -1898,12 +1900,12 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( pTableTextNodeInfoInner->isEndOfLine() )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFInTable );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
if ( nDepth == 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PFTtp );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
m_rWW8Export.InsUInt16( NS_sprm::LN_PTableDepth );
@@ -1912,9 +1914,9 @@ void WW8AttributeOutput::TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTa
if ( nDepth > 1 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_PCell );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_PRow );
- m_rWW8Export.pO->Insert( (BYTE)0x1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x1, m_rWW8Export.pO->Count() );
}
TableDefinition( pTableTextNodeInfoInner );
@@ -1973,8 +1975,8 @@ void WW8AttributeOutput::TableVerticalCell( ww8::WW8TableNodeInfoInner::Pointer_
if ( FRMDIR_VERT_TOP_RIGHT == m_rWW8Export.TrueFrameDirection( *pFrmFmt ) )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TTextFlow );
- m_rWW8Export.pO->Insert( BYTE(n), m_rWW8Export.pO->Count() ); //start range
- m_rWW8Export.pO->Insert( BYTE(n + 1), m_rWW8Export.pO->Count() ); //end range
+ m_rWW8Export.pO->Insert( sal_uInt8(n), m_rWW8Export.pO->Count() ); //start range
+ m_rWW8Export.pO->Insert( sal_uInt8(n + 1), m_rWW8Export.pO->Count() ); //end range
m_rWW8Export.InsUInt16( 5 ); //Equals vertical writing
}
}
@@ -1993,7 +1995,7 @@ void WW8AttributeOutput::TableCanSplit( ww8::WW8TableNodeInfoInner::Pointer_t pT
*/
const SwFmtRowSplit& rSplittable = pLineFmt->GetRowSplit();
- BYTE nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
+ sal_uInt8 nCantSplit = (!rSplittable.GetValue()) ? 1 : 0;
if ( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_TFCantSplit );
@@ -2045,7 +2047,7 @@ void WW8AttributeOutput::TableHeight( ww8::WW8TableNodeInfoInner::Pointer_t pTab
m_rWW8Export.InsUInt16( NS_sprm::LN_TDyaRowHeight );
else
m_rWW8Export.pO->Insert( 189, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)nHeight );
+ m_rWW8Export.InsUInt16( (sal_uInt16)nHeight );
}
}
@@ -2146,7 +2148,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nSprmSize ); // length
// number of boxes
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes), m_rWW8Export.pO->Count() );
/* cellxs */
/*
@@ -2195,7 +2197,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
for ( ww8::GridCols::const_iterator it = pGridCols->begin(),
end = pGridCols->end(); it != end; ++it )
{
- m_rWW8Export.InsUInt16( static_cast<USHORT>( *it ) + nTblOffset );
+ m_rWW8Export.InsUInt16( static_cast<sal_uInt16>( *it ) + nTblOffset );
}
/* TCs */
@@ -2229,7 +2231,7 @@ void WW8AttributeOutput::TableDefinition( ww8::WW8TableNodeInfoInner::Pointer_t
m_rWW8Export.InsUInt16( nFlags );
}
- static BYTE aNullBytes[] = { 0x0, 0x0 };
+ static sal_uInt8 aNullBytes[] = { 0x0, 0x0 };
m_rWW8Export.pO->Insert( aNullBytes, 2, m_rWW8Export.pO->Count() ); // dummy
if (pBoxFmt != NULL)
@@ -2328,7 +2330,7 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
//Set Default, just taken from the first cell of the first
//row
- static USHORT aBorders[] =
+ static sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT
@@ -2337,11 +2339,11 @@ void WW8AttributeOutput::TableDefaultBorders( ww8::WW8TableNodeInfoInner::Pointe
for ( int i = 0; i < 4; ++i )
{
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, 0xD634 );
- m_rWW8Export.pO->Insert( BYTE(6), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(0), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(1 << i), m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( BYTE(3), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(6), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(0), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(1 << i), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( sal_uInt8(3), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO,
pFrmFmt->GetBox().GetDistance( aBorders[i] ) );
@@ -2358,8 +2360,8 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_TDefTableShd );
else
- m_rWW8Export.pO->Insert( (BYTE)191, m_rWW8Export.pO->Count() );
- m_rWW8Export.pO->Insert( (BYTE)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
+ m_rWW8Export.pO->Insert( (sal_uInt8)191, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)(nBoxes * 2), m_rWW8Export.pO->Count() ); // Len
for ( sal_uInt8 n = 0; n < nBoxes; n++ )
{
@@ -2390,7 +2392,7 @@ void WW8AttributeOutput::TableBackgrounds( ww8::WW8TableNodeInfoInner::Pointer_t
for (sal_uInt32 m = 0; m < 2; m++)
{
m_rWW8Export.InsUInt16( aSprmIds[m] );
- m_rWW8Export.pO->Insert( static_cast<BYTE>(nBoxes0 * 10),
+ m_rWW8Export.pO->Insert( static_cast<sal_uInt8>(nBoxes0 * 10),
m_rWW8Export.pO->Count() );
for ( sal_uInt8 n = 0; n < nBoxes0; n++ )
@@ -2494,7 +2496,7 @@ void MSWordExportBase::WriteText()
if ( !pParentFmt )
pParentFmt = (SwSectionFmt*)0xFFFFFFFF;
- ULONG nRstLnNum;
+ sal_uLong nRstLnNum;
if ( aIdx.GetNode().IsCntntNode() )
nRstLnNum = ((SwCntntNode&)aIdx.GetNode()).GetSwAttrSet().
GetLineNumber().GetStartValue();
@@ -2524,7 +2526,7 @@ void MSWordExportBase::WriteText()
else
pCurPam->GetPoint()->nNode++;
- ULONG nPos = pCurPam->GetPoint()->nNode.GetIndex();
+ sal_uLong nPos = pCurPam->GetPoint()->nNode.GetIndex();
::SetProgressState( nPos, pCurPam->GetDoc()->GetDocShell() );
}
@@ -2571,7 +2573,7 @@ void WW8Export::WriteFkpPlcUsw()
{
if( !bWrtWW8 )
{
- static const BYTE aSpec[2] =
+ static const sal_uInt8 aSpec[2] =
{
117, 1
};
@@ -2733,8 +2735,8 @@ void WW8Export::StoreDoc1()
SwWW8Writer::FillUntil( Strm(), pFib->fcMin );
WriteMainText(); // HauptText
- BYTE nSprmsLen;
- BYTE *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
+ sal_uInt8 nSprmsLen;
+ sal_uInt8 *pLastSprms = pPapPlc->CopyLastSprms(nSprmsLen);
bNeedsFinalPara |= pFtn->WriteTxt( *this ); // Footnote-Text
bNeedsFinalPara |= pSepx->WriteKFTxt( *this ); // K/F-Text
@@ -2790,7 +2792,7 @@ void MSWordExportBase::AddLinkTarget(const String& rURL)
// node index number of where it points to
if( pDoc->GotoOutline( aPos, aOutline ) )
{
- ULONG nIdx = aPos.nNode.GetIndex();
+ sal_uLong nIdx = aPos.nNode.GetIndex();
aBookmarkPair aImplicitBookmark;
aImplicitBookmark.first = aOutline;
aImplicitBookmark.second = nIdx;
@@ -2805,10 +2807,10 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
const SwTxtINetFmt* pTxtAttr;
const SwTxtNode* pTxtNd;
- USHORT n, nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_TXTATR_INETFMT );
+ sal_uInt32 n, nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_TXTATR_INETFMT );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pINetFmt = (SwFmtINetFmt*)rDoc.GetAttrPool().GetItem2(
RES_TXTATR_INETFMT, n ) ) &&
0 != ( pTxtAttr = pINetFmt->GetTxtINetFmt()) &&
0 != ( pTxtNd = pTxtAttr->GetpTxtNode() ) &&
@@ -2819,17 +2821,17 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
}
const SwFmtURL *pURL;
- nMaxItems = rDoc.GetAttrPool().GetItemCount( RES_URL );
+ nMaxItems = rDoc.GetAttrPool().GetItemCount2( RES_URL );
for( n = 0; n < nMaxItems; ++n )
{
- if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem(
+ if( 0 != (pURL = (SwFmtURL*)rDoc.GetAttrPool().GetItem2(
RES_URL, n ) ) )
{
AddLinkTarget( pURL->GetURL() );
const ImageMap *pIMap = pURL->GetMap();
if( pIMap )
{
- for( USHORT i=0; i<pIMap->GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0; i<pIMap->GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = pIMap->GetIMapObject( i );
if( pObj )
@@ -2844,18 +2846,18 @@ void MSWordExportBase::CollectOutlineBookmarks(const SwDoc &rDoc)
namespace
{
- const ULONG WW_BLOCKSIZE = 0x200;
+ const sal_uLong WW_BLOCKSIZE = 0x200;
void EncryptRC4(msfilter::MSCodec_Std97& rCtx, SvStream &rIn, SvStream &rOut)
{
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(0);
sal_uInt8 in[WW_BLOCKSIZE];
- for (ULONG nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
+ for (sal_uLong nI = 0, nBlock = 0; nI < nLen; nI += WW_BLOCKSIZE, ++nBlock)
{
- ULONG nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
+ sal_uLong nBS = (nLen - nI > WW_BLOCKSIZE) ? WW_BLOCKSIZE : nLen - nI;
rIn.Read(in, nBS);
rCtx.InitCipher(nBlock);
rCtx.Encode(in, nBS, in, nBS);
@@ -2891,7 +2893,7 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
if ( !pOLEExp )
{
- UINT32 nSvxMSDffOLEConvFlags = 0;
+ sal_uInt32 nSvxMSDffOLEConvFlags = 0;
const SvtFilterOptions* pOpt = SvtFilterOptions::Get();
if ( pOpt->IsMath2MathType() )
nSvxMSDffOLEConvFlags |= OLE_STARMATH_2_MATHTYPE;
@@ -2936,20 +2938,54 @@ void MSWordExportBase::ExportDocument( bool bWriteAll )
pDoc->SetRedlineMode( (RedlineMode_t)(mnRedlineMode) );
}
-String SwWW8Writer::GetPassword()
+bool SwWW8Writer::InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec )
{
- String sUniPassword;
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+
if ( mpMedium )
{
- SfxItemSet* pSet = mpMedium->GetItemSet();
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pEncryptionDataItem, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionDataItem && ( pEncryptionDataItem->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ {
+ OSL_ENSURE( false, "Unexpected EncryptionData!" );
+ aEncryptionData.realloc( 0 );
+ }
+
+ if ( !aEncryptionData.getLength() )
+ {
+ // try to generate the encryption data based on password
+ SFX_ITEMSET_ARG( mpMedium->GetItemSet(), pPasswordItem, SfxStringItem, SID_PASSWORD, sal_False );
+ if ( pPasswordItem && pPasswordItem->GetValue().Len() && pPasswordItem->GetValue().Len() <= 15 )
+ {
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool ();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
- const SfxPoolItem* pPasswordItem = NULL;
- if ( pSet && SFX_ITEM_SET == pSet->GetItemState( SID_PASSWORD, sal_True, &pPasswordItem ) )
- if( pPasswordItem != NULL )
- sUniPassword = ( (const SfxStringItem*)pPasswordItem )->GetValue();
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_Unicode aPassword[16];
+ memset( aPassword, 0, sizeof( aPassword ) );
+ for ( xub_StrLen nChar = 0; nChar < pPasswordItem->GetValue().Len(); ++nChar )
+ aPassword[nChar] = pPasswordItem->GetValue().GetChar(nChar);
+
+ rCodec.InitKey( aPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ mpMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
+ }
+ }
+
+ if ( aEncryptionData.getLength() )
+ mpMedium->GetItemSet()->ClearItem( SID_PASSWORD );
}
- return sUniPassword;
+ // nonempty encryption data means hier that the codec was successfuly initialized
+ return ( aEncryptionData.getLength() != 0 );
}
void WW8Export::ExportDocument_Impl()
@@ -2983,8 +3019,6 @@ void WW8Export::ExportDocument_Impl()
Strm().SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- String sUniPassword( GetWriter().GetPassword() );
-
utl::TempFile aTempMain;
aTempMain.EnableKillingFile();
utl::TempFile aTempTable;
@@ -2992,13 +3026,10 @@ void WW8Export::ExportDocument_Impl()
utl::TempFile aTempData;
aTempData.EnableKillingFile();
- bool bEncrypt = false;
-
- xub_StrLen nLen = sUniPassword.Len();
- if ( nLen > 0 && nLen <= 15) // Password has been set
+ msfilter::MSCodec_Std97 aCtx;
+ bool bEncrypt = m_pWriter ? m_pWriter->InitStd97CodecUpdateMedium( aCtx ) : false;
+ if ( bEncrypt )
{
- bEncrypt =true;
-
GetWriter().SetStream(
aTempMain.GetStream( STREAM_READWRITE | STREAM_SHARE_DENYWRITE ) );
@@ -3062,24 +3093,6 @@ void WW8Export::ExportDocument_Impl()
if ( bEncrypt )
{
- // Generate random number with a seed of time as salt.
- TimeValue aTime;
- osl_getSystemTime( &aTime );
- rtlRandomPool aRandomPool = rtl_random_createPool ();
- rtl_random_addBytes ( aRandomPool, &aTime, 8 );
-
- sal_uInt8 aDocId[ 16 ] = {0};
- rtl_random_getBytes( aRandomPool, aDocId, 16 );
-
- rtl_random_destroyPool( aRandomPool );
-
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
-
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
-
SvStream *pStrmTemp, *pTableStrmTemp, *pDataStrmTemp;
pStrmTemp = &xWwStrm;
pTableStrmTemp = &xTableStrm;
@@ -3096,11 +3109,14 @@ void WW8Export::ExportDocument_Impl()
sal_uInt32 nEncType = 0x10001;
*pTableStrmTemp << nEncType;
- sal_uInt8 pSaltData[16] = {0};
- sal_uInt8 pSaltDigest[16] = {0};
- aCtx.GetEncryptKey( aDocId, pSaltData, pSaltDigest );
+ sal_uInt8 pDocId[16];
+ aCtx.GetDocId( pDocId );
+
+ sal_uInt8 pSaltData[16];
+ sal_uInt8 pSaltDigest[16];
+ aCtx.GetEncryptKey( pDocId, pSaltData, pSaltDigest );
- pTableStrmTemp->Write( aDocId, 16 );
+ pTableStrmTemp->Write( pDocId, 16 );
pTableStrmTemp->Write( pSaltData, 16 );
pTableStrmTemp->Write( pSaltDigest, 16 );
@@ -3172,15 +3188,15 @@ void WW8Export::ExportDocument_Impl()
void WW8Export::PrepareStorage()
{
- ULONG nLen;
- const BYTE* pData;
+ sal_uLong nLen;
+ const sal_uInt8* pData;
const char* pName;
- UINT32 nId1;
+ sal_uInt32 nId1;
if (bWrtWW8)
{
static const char aUserName[] = "Microsoft Word-Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x06, 0x09, 0x02, 0x00,
@@ -3206,7 +3222,7 @@ void WW8Export::PrepareStorage()
else
{
static const char aUserName[] = "Microsoft Word 6.0 Document";
- static const BYTE aCompObj[] =
+ static const sal_uInt8 aCompObj[] =
{
0x01, 0x00, 0xFE, 0xFF, 0x03, 0x0A, 0x00, 0x00,
0xFF, 0xFF, 0xFF, 0xFF, 0x00, 0x09, 0x02, 0x00,
@@ -3261,7 +3277,7 @@ void WW8Export::PrepareStorage()
}
}
-ULONG SwWW8Writer::WriteStorage()
+sal_uLong SwWW8Writer::WriteStorage()
{
// #i34818# - update layout (if present), for SwWriteTable
ViewShell* pViewShell = NULL;
@@ -3292,16 +3308,16 @@ ULONG SwWW8Writer::WriteStorage()
return 0;
}
-ULONG SwWW8Writer::WriteMedium( SfxMedium& )
+sal_uLong SwWW8Writer::WriteMedium( SfxMedium& )
{
return WriteStorage();
}
-ULONG SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwWW8Writer::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
mpMedium = &rMed;
- ULONG nRet = StgWriter::Write( rPaM, rMed, pFileName );
+ sal_uLong nRet = StgWriter::Write( rPaM, rMed, pFileName );
mpMedium = NULL;
return nRet;
}
@@ -3372,7 +3388,7 @@ SwWW8Writer::~SwWW8Writer()
{
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, BOOL bSaveInto, const String& rStorageName )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL SaveOrDelMSVBAStorage_ww8( SfxObjectShell& rDoc, SotStorage& rStor, sal_Bool bSaveInto, const String& rStorageName )
{
SvxImportMSVBasic aTmp( rDoc, rStor );
return aTmp.SaveOrDelMSVBAStorage( bSaveInto, rStorageName );
@@ -3384,7 +3400,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL ExportDOC( const String& rFltName,
}
-extern "C" SAL_DLLPUBLIC_EXPORT ULONG SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
+extern "C" SAL_DLLPUBLIC_EXPORT sal_uLong SAL_CALL GetSaveWarningOfMSVBAStorage_ww8( SfxObjectShell &rDocS )
{
return SvxImportMSVBasic::GetSaveWarningOfMSVBAStorage( rDocS );
}
@@ -3527,11 +3543,11 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
if(pNameParameter != rFieldmark.GetParameters()->end())
pNameParameter->second >>= ffname;
- ULONG nDataStt = pDataStrm->Tell();
+ sal_uLong nDataStt = pDataStrm->Tell();
pChpPlc->AppendFkpEntry(Strm().Tell());
WriteChar(0x01);
- static BYTE aArr1[] =
+ static sal_uInt8 aArr1[] =
{
0x03, 0x6a, 0,0,0,0, // sprmCPicLocation
@@ -3539,7 +3555,7 @@ void WW8Export::WriteFormData( const ::sw::mark::IFieldmark& rFieldmark )
0x55, 0x08, 0x01, // sprmCFSpec
0x02, 0x08, 0x01 // sprmCFFldVanish
};
- BYTE* pDataAdr = aArr1 + 2;
+ sal_uInt8* pDataAdr = aArr1 + 2;
Set_UInt32(pDataAdr, nDataStt);
pChpPlc->AppendFkpEntry( Strm().Tell(), sizeof( aArr1 ), aArr1 );
@@ -3685,7 +3701,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2,
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2,
m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry
@@ -3703,7 +3719,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
#endif
m_rWW8Export.WriteCR(pNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3724,7 +3740,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
{
m_rWW8Export.WriteCR(pTmpNodeInfoInner);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoCell(pTmpNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -3741,7 +3757,7 @@ void WW8AttributeOutput::TableNodeInfoInner( ww8::WW8TableNodeInfoInner::Pointer
TableRowEnd(pNodeInfoInner->getDepth());
ShortToSVBT16(0, nStyle);
- m_rWW8Export.pO->Insert( (BYTE*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nStyle, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow(pNodeInfoInner);
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
diff --git a/sw/source/filter/ww8/wrtww8.hxx b/sw/source/filter/ww8/wrtww8.hxx
index 0676f51e0610..a3a42d923386 100644
--- a/sw/source/filter/ww8/wrtww8.hxx
+++ b/sw/source/filter/ww8/wrtww8.hxx
@@ -54,6 +54,11 @@
// einige Forward Deklarationen
class SwWW8AttrIter;
+namespace msfilter
+{
+ class MSCodec_Std97;
+}
+
class AttributeOutputBase;
class DocxAttributeOutput;
class RtfAttributeOutput;
@@ -131,7 +136,7 @@ class SvxBrushItem;
#define OLE_PREVIEW_AS_EMF //If we want to export ole2 previews as emf in ww8+
-typedef BYTE FieldFlags;
+typedef sal_uInt8 FieldFlags;
namespace nsFieldFlags // for InsertField- Method
{
const FieldFlags WRITEFIELD_START = 0x01;
@@ -148,7 +153,7 @@ enum TxtTypes //enums for TextTypes
TXT_EDN = 4, TXT_ATN = 5, TXT_TXTBOX = 6, TXT_HFTXTBOX= 7
};
-SV_DECL_VARARR( WW8Bytes, BYTE, 128, 128 )
+SV_DECL_VARARR( WW8Bytes, sal_uInt8, 128, 128 )
struct WW8_SepInfo
{
@@ -156,8 +161,8 @@ struct WW8_SepInfo
const SwSectionFmt* pSectionFmt;
const SwNode* pPDNd;
const SwTxtNode* pNumNd;
- ULONG nLnNumRestartNo;
- USHORT nPgRestartNo;
+ sal_uLong nLnNumRestartNo;
+ sal_uInt16 nPgRestartNo;
WW8_SepInfo()
: pPageDesc(0), pSectionFmt(0), pPDNd(0), pNumNd(0), nLnNumRestartNo(0), nPgRestartNo(0)
@@ -165,7 +170,7 @@ struct WW8_SepInfo
{}
WW8_SepInfo( const SwPageDesc* pPD, const SwSectionFmt* pFmt,
- ULONG nLnRestart, USHORT nPgRestart = 0, const SwNode* pNd = NULL )
+ sal_uLong nLnRestart, sal_uInt16 nPgRestart = 0, const SwNode* pNd = NULL )
: pPageDesc( pPD ), pSectionFmt( pFmt ), pPDNd( pNd ), pNumNd( 0 ),
nLnNumRestartNo( nLnRestart ), nPgRestartNo( nPgRestart )
{}
@@ -196,11 +201,11 @@ public:
void AppendSection( const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSection( const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void SetNum( const SwTxtNode* pNumNd );
/// Number of columns based on the most recent WW8_SepInfo.
@@ -214,10 +219,10 @@ public:
/// The most recent WW8_SepInfo.
const WW8_SepInfo* CurrentSectionInfo();
- static void SetHeaderFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
- static void SetFooterFlag( BYTE& rHeadFootFlags, const SwFmt& rFmt,
- BYTE nFlag );
+ static void SetHeaderFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
+ static void SetFooterFlag( sal_uInt8& rHeadFootFlags, const SwFmt& rFmt,
+ sal_uInt8 nFlag );
/// Should we output borders?
static int HasBorderItem( const SwFmt& rFmt );
@@ -241,11 +246,11 @@ public:
void AppendSep( WW8_CP nStartCp,
const SwPageDesc* pPd,
const SwSectionFmt* pSectionFmt = 0,
- ULONG nLnNumRestartNo = 0 );
+ sal_uLong nLnNumRestartNo = 0 );
void AppendSep( WW8_CP nStartCp, const SwFmtPageDesc& rPd,
const SwNode& rNd,
const SwSectionFmt* pSectionFmt,
- ULONG nLnNumRestartNo );
+ sal_uLong nLnNumRestartNo );
void Finish( WW8_CP nEndCp ) { aCps.Insert( nEndCp, aCps.Count() ); }
bool WriteKFTxt( WW8Export& rWrt );
@@ -254,10 +259,10 @@ public:
void WritePlcHdd( WW8Export& rWrt ) const;
private:
- void WriteFtnEndTxt( WW8Export& rWrt, ULONG nCpStt );
+ void WriteFtnEndTxt( WW8Export& rWrt, sal_uLong nCpStt );
public:
void OutHeaderFooter(WW8Export& rWrt, bool bHeader,
- const SwFmt& rFmt, ULONG& rCpPos, BYTE nHFFlags, BYTE nFlag, BYTE nBreakCode);
+ const SwFmt& rFmt, sal_uLong& rCpPos, sal_uInt8 nHFFlags, sal_uInt8 nFlag, sal_uInt8 nBreakCode);
};
//--------------------------------------------------------------------------
@@ -275,7 +280,7 @@ public:
void WritePc( WW8Export& rWrt );
void SetParaBreak();
bool IsUnicode() const { return bIsUni; }
- WW8_CP Fc2Cp( ULONG nFc ) const;
+ WW8_CP Fc2Cp( sal_uLong nFc ) const;
};
/// Collects and outputs fonts.
@@ -284,7 +289,7 @@ class wwFont
//In some future land the stream could be converted to a nice stream interface
//and we could have harmony
private:
- BYTE maWW8_FFN[6];
+ sal_uInt8 maWW8_FFN[6];
String msFamilyNm;
String msAltNm;
bool mbAlt;
@@ -306,7 +311,7 @@ class wwFontHelper
{
private:
/// Keep track of fonts that need to be exported.
- ::std::map<wwFont, USHORT> maFonts;
+ ::std::map<wwFont, sal_uInt16> maFonts;
bool mbWrtWW8;
/// Convert from fast insertion map to linear vector in the order that we want to write.
@@ -316,25 +321,25 @@ public:
wwFontHelper() : mbWrtWW8(false), bLoadAllFonts(false) {}
/// rDoc used only to get the initial standard font(s) in use.
void InitFontTable(bool bWrtWW8, const SwDoc& rDoc);
- USHORT GetId(const Font& rFont);
- USHORT GetId(const SvxFontItem& rFont);
- USHORT GetId(const wwFont& rFont);
+ sal_uInt16 GetId(const Font& rFont);
+ sal_uInt16 GetId(const SvxFontItem& rFont);
+ sal_uInt16 GetId(const wwFont& rFont);
void WriteFontTable( SvStream *pTableStream, WW8Fib& pFib );
void WriteFontTable( const DocxAttributeOutput& rAttrOutput );
void WriteFontTable( const RtfAttributeOutput& rAttrOutput );
/// If true, all fonts are loaded before processing the document.
- BYTE bLoadAllFonts: 1;
+ sal_uInt8 bLoadAllFonts: 1;
};
class DrawObj
{
public:
WW8_CP mnCp; // CP-Pos der Verweise
- UINT32 mnShapeId; // ShapeId for the SwFrmFmts
+ sal_uInt32 mnShapeId; // ShapeId for the SwFrmFmts
sw::Frame maCntnt; // the frame itself
Point maParentPos; // Points
- INT32 mnThick; // Border Thicknesses
+ sal_Int32 mnThick; // Border Thicknesses
short mnDirection; // If BiDi or not
unsigned int mnHdFtIndex; // 0 for main text, +1 for each subsequent
// msword hd/ft
@@ -343,7 +348,7 @@ public:
unsigned int nHdFtIndex)
: mnCp(nCp), mnShapeId(0), maCntnt(rCntnt), maParentPos(aParentPos),
mnThick(0), mnDirection(nDir), mnHdFtIndex(nHdFtIndex) {}
- void SetShapeDetails(UINT32 nId, INT32 nThick);
+ void SetShapeDetails(sal_uInt32 nId, sal_Int32 nThick);
DrawObj& operator=(const DrawObj &rOther);
};
@@ -404,7 +409,7 @@ private:
HdFtPlcDrawObj& operator=(const HdFtPlcDrawObj&);
};
-typedef ::std::pair<String, ULONG> aBookmarkPair;
+typedef ::std::pair<String, sal_uLong> aBookmarkPair;
typedef std::vector<aBookmarkPair> SwImplBookmarks;
typedef std::vector<aBookmarkPair>::iterator SwImplBookmarksIter;
@@ -436,12 +441,12 @@ struct MSWordSaveData
const sw::Frame* pOldFlyFmt;
const SwPageDesc* pOldPageDesc;
- BYTE bOldWriteAll : 1; ///< WW8Export only
- BYTE bOldOutTable : 1;
- BYTE bOldIsInTable: 1;
- BYTE bOldFlyFrmAttrs : 1;
- BYTE bOldStartTOX : 1;
- BYTE bOldInWriteTOX : 1;
+ sal_uInt8 bOldWriteAll : 1; ///< WW8Export only
+ sal_uInt8 bOldOutTable : 1;
+ sal_uInt8 bOldIsInTable: 1;
+ sal_uInt8 bOldFlyFrmAttrs : 1;
+ sal_uInt8 bOldStartTOX : 1;
+ sal_uInt8 bOldInWriteTOX : 1;
// bOutPageDesc muss nicht gesichert werden, da es nur nicht waehrend der
// Ausgabe von Spezial-Texten veraendert wird.
};
@@ -451,15 +456,15 @@ class MSWordExportBase
{
public:
wwFontHelper maFontHelper;
- std::vector<ULONG> maChapterFieldLocs;
- typedef std::vector<ULONG>::const_iterator mycCFIter;
+ std::vector<sal_uLong> maChapterFieldLocs;
+ typedef std::vector<sal_uLong>::const_iterator mycCFIter;
String aMainStg;
SvPtrarr aTOXArr;
const SfxItemSet* pISet; // fuer Doppel-Attribute
WW8_WrPct* pPiece; // Pointer auf Piece-Table
SwNumRuleTbl* pUsedNumTbl; // alle used NumRules
const SwTxtNode *mpTopNodeOfHdFtPage; ///< Top node of host page when in hd/ft
- std::map< USHORT, USHORT > aRuleDuplicates; //map to Duplicated numrules
+ std::map< sal_uInt16, sal_uInt16 > aRuleDuplicates; //map to Duplicated numrules
std::stack< xub_StrLen > m_aCurrentCharPropStarts; ///< To remember the position in a run.
WW8_WrtBookmarks* pBkmks;
WW8_WrtRedlineAuthor* pRedlAuthors;
@@ -470,15 +475,15 @@ public:
WW8OleMaps* pOleMap;
ww8::WW8TableInfo::Pointer_t mpTableInfo;
- USHORT nCharFmtStart;
- USHORT nFmtCollStart;
- USHORT nStyleBeforeFly; ///< Style-Nummer des Nodes,
+ sal_uInt16 nCharFmtStart;
+ sal_uInt16 nFmtCollStart;
+ sal_uInt16 nStyleBeforeFly; ///< Style-Nummer des Nodes,
///< in/an dem ein Fly verankert ist
- USHORT nLastFmtId; ///< Style of last TxtNode in normal range
- USHORT nUniqueList; ///< current number for creating unique list names
+ sal_uInt16 nLastFmtId; ///< Style of last TxtNode in normal range
+ sal_uInt16 nUniqueList; ///< current number for creating unique list names
unsigned int mnHdFtIndex;
- USHORT mnRedlineMode; ///< Remember the original redline mode
+ sal_uInt16 mnRedlineMode; ///< Remember the original redline mode
public:
/* implicit bookmark vector containing pairs of node indexes and bookmark names */
@@ -523,27 +528,27 @@ public:
// SwTwips nFlyWidth, nFlyHeight; // Fuer Anpassung Graphic
// <--
- BYTE nTxtTyp;
+ sal_uInt8 nTxtTyp;
- BYTE bStyDef : 1; // wird Style geschrieben ?
- BYTE bBreakBefore : 1; // Breaks werden 2mal ausgegeben
- BYTE bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
- BYTE bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
- BYTE bOutPageDescs : 1; ///< PageDescs (section properties) are being written
- BYTE bOutFirstPage : 1; // write Attrset of FirstPageDesc
- BYTE bOutTable : 1; // Tabelle wird ausgegeben
+ sal_uInt8 bStyDef : 1; // wird Style geschrieben ?
+ sal_uInt8 bBreakBefore : 1; // Breaks werden 2mal ausgegeben
+ sal_uInt8 bOutKF : 1; // Kopf/Fusstexte werden ausgegeben
+ sal_uInt8 bOutFlyFrmAttrs : 1; // Rahmen-Attr von Flys werden ausgegeben
+ sal_uInt8 bOutPageDescs : 1; ///< PageDescs (section properties) are being written
+ sal_uInt8 bOutFirstPage : 1; // write Attrset of FirstPageDesc
+ sal_uInt8 bOutTable : 1; // Tabelle wird ausgegeben
// ( wird zB bei Flys in Tabelle zurueckgesetzt )
- BYTE bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
+ sal_uInt8 bIsInTable : 1; // wird sind innerhalb der Ausgabe einer Tabelle
// ( wird erst nach der Tabelle zurueckgesetzt )
- BYTE bOutGrf : 1; // Grafik wird ausgegeben
- BYTE bInWriteEscher : 1; // in write textboxes
- BYTE bStartTOX : 1; // true: a TOX is startet
- BYTE bInWriteTOX : 1; // true: all content are in a TOX
- BYTE bFtnAtTxtEnd : 1; // true: all FTN at Textend
- BYTE bEndAtTxtEnd : 1; // true: all END at Textend
- BYTE bHasHdr : 1;
- BYTE bHasFtr : 1;
- BYTE bSubstituteBullets : 1; // true: SubstituteBullet() gets called
+ sal_uInt8 bOutGrf : 1; // Grafik wird ausgegeben
+ sal_uInt8 bInWriteEscher : 1; // in write textboxes
+ sal_uInt8 bStartTOX : 1; // true: a TOX is startet
+ sal_uInt8 bInWriteTOX : 1; // true: all content are in a TOX
+ sal_uInt8 bFtnAtTxtEnd : 1; // true: all FTN at Textend
+ sal_uInt8 bEndAtTxtEnd : 1; // true: all END at Textend
+ sal_uInt8 bHasHdr : 1;
+ sal_uInt8 bHasFtr : 1;
+ sal_uInt8 bSubstituteBullets : 1; // true: SubstituteBullet() gets called
bool mbExportModeRTF;
@@ -568,47 +573,46 @@ public:
/// Set the pCurPam appropriately and call WriteText().
///
/// Used to export paragraphs in footnotes/endnotes/etc.
- void WriteSpecialText( ULONG nStart, ULONG nEnd, BYTE nTTyp );
+ void WriteSpecialText( sal_uLong nStart, sal_uLong nEnd, sal_uInt8 nTTyp );
/// Export the pool items to attributes (through an attribute output class).
- void ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript );
+ void ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript );
/// Return the numeric id of the numbering rule
- USHORT GetId( const SwNumRule& rNumRule );
+ sal_uInt16 GetId( const SwNumRule& rNumRule );
/// Return the numeric id of the style.
- USHORT GetId( const SwTxtFmtColl& rColl ) const;
+ sal_uInt16 GetId( const SwTxtFmtColl& rColl ) const;
/// Return the numeric id of the style.
- USHORT GetId( const SwCharFmt& rFmt ) const;
+ sal_uInt16 GetId( const SwCharFmt& rFmt ) const;
- USHORT GetId( const SwTOXType& rTOXType );
+ sal_uInt16 GetId( const SwTOXType& rTOXType );
/// Return the numeric id of the font (and add it to the font list if needed)
- USHORT GetId( const SvxFontItem& rFont)
+ sal_uInt16 GetId( const SvxFontItem& rFont)
{
return maFontHelper.GetId(rFont);
}
/// @overload
- USHORT GetId( const wwFont& rFont)
+ sal_uInt16 GetId( const wwFont& rFont)
{
return maFontHelper.GetId(rFont);
}
-
- const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
/// Find the reference.
- bool HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ bool HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Find the bookmark name.
- String GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo );
+ String GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo );
/// Add a bookmark converted to a Word name.
void AppendWordBookmark( const String& rName );
/// Use OutputItem() on an item set according to the parameters.
- void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript, bool bExportParentItemSet );
+ void OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript, bool bExportParentItemSet );
short GetDefaultFrameDirection( ) const;
@@ -623,7 +627,7 @@ public:
/// List is set to restart at a particular value so for export make a
/// completely new list based on this one and export that instead,
/// which duplicates words behaviour in this respect.
- USHORT DuplicateNumRule( const SwNumRule *pRule, BYTE nLevel, USHORT nVal );
+ sal_uInt16 DuplicateNumRule( const SwNumRule *pRule, sal_uInt8 nLevel, sal_uInt16 nVal );
/// Access to the attribute output class.
virtual AttributeOutputBase& AttrOutput() const = 0;
@@ -635,7 +639,7 @@ public:
virtual bool SupportsUnicode() const = 0;
/// Used to filter out attributes that can be e.g. written to .doc but not to .docx
- virtual bool ignoreAttributeForStyles( USHORT /*nWhich*/ ) const { return false; }
+ virtual bool ignoreAttributeForStyles( sal_uInt16 /*nWhich*/ ) const { return false; }
/// Guess the script (asian/western).
///
@@ -647,7 +651,7 @@ public:
///
/// In addition WW7- has only one character language identifier while WW8+
/// has two
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich ) = 0;
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich ) = 0;
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen ) = 0;
@@ -670,7 +674,7 @@ public:
void SetCurItemSet( const SfxItemSet* pS ) { pISet = pS; }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
@@ -686,7 +690,7 @@ public:
const SwSectionFmt* GetSectionFormat( const SwNode& rNd ) const;
/// Line number of the section start.
- ULONG GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
+ sal_uLong GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const;
/// Start new section.
void OutputSectionBreaks( const SfxItemSet *pSet, const SwNode& rNd );
@@ -722,13 +726,13 @@ public:
const SwTxtNode *GetHdFtPageRoot() const { return mpTopNodeOfHdFtPage; }
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode) = 0;
+ sal_uInt8 nBreakCode) = 0;
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL ) = 0;
/// Write the data of the form field
virtual void WriteFormData( const ::sw::mark::IFieldmark& rFieldmark ) = 0;
@@ -747,9 +751,9 @@ public:
// Compute the number format for WW dates
bool GetNumberFmt(const SwField& rFld, String& rStr);
- virtual ULONG ReplaceCr( BYTE nChar ) = 0;
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar ) = 0;
- const SfxPoolItem* HasItem( USHORT nWhich ) const;
+ const SfxPoolItem* HasItem( sal_uInt16 nWhich ) const;
protected:
@@ -807,7 +811,7 @@ protected:
/// Output SwSectionNode
virtual void OutputSectionNode( const SwSectionNode& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum ) = 0;
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum ) = 0;
/// Call the right (virtual) function according to the type of the item.
///
@@ -831,7 +835,7 @@ public:
// TODO move as much as possible here from WW8Export! ;-)
- static void CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft );
+ static void CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft );
private:
/// No copying.
@@ -856,8 +860,8 @@ public:
SwWW8Writer( const String& rFltName, const String& rBaseURL );
virtual ~SwWW8Writer();
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& );
// TODO most probably we want to be able to get these in
// MSExportFilterBase
@@ -873,20 +877,20 @@ public:
rtl_TextEncoding eCodeSet);
#endif
- static void InsUInt16( WW8Bytes& rO, UINT16 );
- static void InsUInt32( WW8Bytes& rO, UINT32 );
+ static void InsUInt16( WW8Bytes& rO, sal_uInt16 );
+ static void InsUInt32( WW8Bytes& rO, sal_uInt32 );
static void InsAsString16( WW8Bytes& rO, const String& );
static void InsAsString8( WW8Bytes& rO, const String& rStr,
rtl_TextEncoding eCodeSet );
- static ULONG FillUntil( SvStream& rStrm, ULONG nEndPos = 0 );
- static void FillCount( SvStream& rStrm, ULONG nCount );
+ static sal_uLong FillUntil( SvStream& rStrm, sal_uLong nEndPos = 0 );
+ static void FillCount( SvStream& rStrm, sal_uLong nCount );
- static void WriteShort( SvStream& rStrm, INT16 nVal ) { rStrm << nVal; }
- static void WriteShort( SvStream& rStrm, ULONG nPos, INT16 nVal );
+ static void WriteShort( SvStream& rStrm, sal_Int16 nVal ) { rStrm << nVal; }
+ static void WriteShort( SvStream& rStrm, sal_uLong nPos, sal_Int16 nVal );
- static void WriteLong( SvStream& rStrm, INT32 nVal ) { rStrm << nVal; }
- static void WriteLong( SvStream& rStrm, ULONG nPos, INT32 nVal );
+ static void WriteLong( SvStream& rStrm, sal_Int32 nVal ) { rStrm << nVal; }
+ static void WriteLong( SvStream& rStrm, sal_uLong nPos, sal_Int32 nVal );
static void WriteString16(SvStream& rStrm, const String& rStr,
bool bAddZero);
@@ -895,10 +899,10 @@ public:
static void WriteString_xstz(SvStream& rStrm, const String& rStr, bool bAddZero);
- String GetPassword();
+ bool InitStd97CodecUpdateMedium( ::msfilter::MSCodec_Std97& rCodec );
using StgWriter::Write;
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
/// No copying.
@@ -923,7 +927,7 @@ public:
WW8_WrPlcFtnEdn *pEdn; ///< Endnotes - structure to remember them, and output
WW8_WrPlcSepx* pSepx; ///< Sections/headers/footers
- BYTE bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
+ sal_uInt8 bWrtWW8 : 1; ///< Write WW95 (false) or WW97 (true) file format
protected:
SwWW8Writer *m_pWriter; ///< Pointer to the writer
@@ -947,14 +951,14 @@ private:
void WriteFkpPlcUsw();
void WriteMainText();
void StoreDoc1();
- void Out_WwNumLvl( BYTE nWwLevel );
- void BuildAnlvBulletBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
+ void Out_WwNumLvl( sal_uInt8 nWwLevel );
+ void BuildAnlvBulletBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
const SwNumFmt& rFmt );
- static void BuildAnlvBase( WW8_ANLV& rAnlv, BYTE*& rpCh, USHORT& rCharLen,
- const SwNumRule& rRul, const SwNumFmt& rFmt, BYTE nSwLevel );
+ static void BuildAnlvBase( WW8_ANLV& rAnlv, sal_uInt8*& rpCh, sal_uInt16& rCharLen,
+ const SwNumRule& rRul, const SwNumFmt& rFmt, sal_uInt8 nSwLevel );
void Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow);
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow);
/// Output the numbering table.
virtual void WriteNumbering();
@@ -975,9 +979,9 @@ public:
/// Setup the pA's info.
virtual void SetupSectionPositions( WW8_PdAttrDesc* pA );
- void Out_SwNumLvl( BYTE nSwLevel );
+ void Out_SwNumLvl( sal_uInt8 nSwLevel );
void Out_NumRuleAnld( const SwNumRule& rRul, const SwNumFmt& rFmt,
- BYTE nSwLevel );
+ sal_uInt8 nSwLevel );
bool MiserableFormFieldExportHack(const SwFrmFmt& rFrmFmt);
@@ -986,7 +990,7 @@ public:
WW8OleMaps& GetOLEMap() { return *pOleMap; }
void ExportDopTypography(WW8DopTypography &rTypo);
- USHORT AddRedlineAuthor( USHORT nId );
+ sal_uInt16 AddRedlineAuthor( sal_uInt16 nId );
void WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pO = 0 );
void WritePostItBegin( WW8Bytes* pO = 0 );
@@ -997,10 +1001,10 @@ public:
void OutWW6FlyFrmsInCntnt( const SwTxtNode& rNd );
void AppendFlyInFlys(const sw::Frame& rFrmFmt, const Point& rNdTopLeft);
- void WriteOutliner(const OutlinerParaObject& rOutliner, BYTE nTyp);
- void WriteSdrTextObj(const SdrObject& rObj, BYTE nTyp);
+ void WriteOutliner(const OutlinerParaObject& rOutliner, sal_uInt8 nTyp);
+ void WriteSdrTextObj(const SdrObject& rObj, sal_uInt8 nTyp);
- UINT32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
+ sal_uInt32 GetSdrOrdNum( const SwFrmFmt& rFmt ) const;
void CreateEscher();
void WriteEscher();
@@ -1008,7 +1012,7 @@ public:
/// Write the field
virtual void OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode = nsFieldFlags::WRITEFIELD_ALL );
+ const String& rFldCmd, sal_uInt8 nMode = nsFieldFlags::WRITEFIELD_ALL );
void StartCommentOutput( const String& rName );
void EndCommentOutput( const String& rName );
@@ -1018,12 +1022,12 @@ public:
virtual void AppendBookmarks( const SwTxtNode& rNd, xub_StrLen nAktPos, xub_StrLen nLen );
virtual void AppendBookmark( const rtl::OUString& rName, bool bSkip = false );
- void MoveFieldMarks(ULONG nFrom, ULONG nTo);
+ void MoveFieldMarks(sal_uLong nFrom, sal_uLong nTo);
- void WriteAsStringTable(const ::std::vector<String>&, INT32& rfcSttbf,
- INT32& rlcbSttbf, USHORT nExtraLen = 0);
+ void WriteAsStringTable(const ::std::vector<String>&, sal_Int32& rfcSttbf,
+ sal_Int32& rlcbSttbf, sal_uInt16 nExtraLen = 0);
- virtual ULONG ReplaceCr( BYTE nChar );
+ virtual sal_uLong ReplaceCr( sal_uInt8 nChar );
virtual void WriteCR( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfoInner = ww8::WW8TableNodeInfoInner::Pointer_t() );
void WriteChar( sal_Unicode c );
@@ -1031,11 +1035,11 @@ public:
void OutSwString(const String&, xub_StrLen nStt, xub_StrLen nLen,
bool bUnicode, rtl_TextEncoding eChrSet);
- WW8_CP Fc2Cp( ULONG nFc ) const { return pPiece->Fc2Cp( nFc ); }
+ WW8_CP Fc2Cp( sal_uLong nFc ) const { return pPiece->Fc2Cp( nFc ); }
// einige z.T. static halb-interne Funktions-Deklarationen
- void OutSprmBytes( BYTE* pBytes, USHORT nSiz )
+ void OutSprmBytes( sal_uInt8* pBytes, sal_uInt16 nSiz )
{ pO->Insert( pBytes, nSiz, pO->Count() ); }
inline bool IsUnicode() const { return pPiece->IsUnicode(); }
@@ -1051,10 +1055,10 @@ public:
void Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow);
void Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * rBox );
- BYTE TransCol( const Color& rCol );
+ sal_uInt8 TransCol( const Color& rCol );
bool TransBrush(const Color& rCol, WW8_SHD& rShd);
WW8_BRC TranslateBorderLine(const SvxBorderLine& pLine,
- USHORT nDist, bool bShadow);
+ sal_uInt16 nDist, bool bShadow);
// #i77805# - new return value indicates, if an inherited outline numbering is suppressed
virtual bool DisallowInheritingOutlineNumbering(const SwFmt &rFmt);
@@ -1066,12 +1070,12 @@ public:
static long GetDTTM( const DateTime& rDT );
/// Convert the SVX numbering type to id
- static BYTE GetNumId( USHORT eNumType );
+ static sal_uInt8 GetNumId( sal_uInt16 eNumType );
/// Guess the script (asian/western).
- virtual bool CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich );
+ virtual bool CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich );
- USHORT DupNumRuleWithLvlStart(const SwNumRule *pRule,BYTE nLvl,USHORT nVal);
+ sal_uInt16 DupNumRuleWithLvlStart(const SwNumRule *pRule,sal_uInt8 nLvl,sal_uInt16 nVal);
SwTwips CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const;
@@ -1079,13 +1083,13 @@ public:
bool MiserableRTLFrmFmtHack(SwTwips &rLeft, SwTwips &rRight,
const sw::Frame &rFrmFmt);
- void InsUInt16( UINT16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
- void InsUInt32( UINT32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
+ void InsUInt16( sal_uInt16 n ) { SwWW8Writer::InsUInt16( *pO, n ); }
+ void InsUInt32( sal_uInt32 n ) { SwWW8Writer::InsUInt32( *pO, n ); }
void InsAsString16( const String& rStr )
{ SwWW8Writer::InsAsString16( *pO, rStr ); }
void InsAsString8( const String& rStr, rtl_TextEncoding eCodeSet )
{ SwWW8Writer::InsAsString8( *pO, rStr, eCodeSet ); }
- void WriteStringAsPara( const String& rTxt, USHORT nStyleId = 0 );
+ void WriteStringAsPara( const String& rTxt, sal_uInt16 nStyleId = 0 );
/// Setup the exporter.
WW8Export( SwWW8Writer *pWriter,
@@ -1114,15 +1118,15 @@ public:
SvStream& Strm() const { return m_pWriter->Strm(); }
/// Remember some of the memebers so that we can recurse in WriteText().
- virtual void SaveData( ULONG nStt, ULONG nEnd );
+ virtual void SaveData( sal_uLong nStt, sal_uLong nEnd );
/// Restore what was saved in SaveData().
virtual void RestoreData();
/// Output the actual headers and footers.
- virtual void WriteHeadersFooters( BYTE nHeadFootFlags,
+ virtual void WriteHeadersFooters( sal_uInt8 nHeadFootFlags,
const SwFrmFmt& rFmt, const SwFrmFmt& rLeftFmt, const SwFrmFmt& rFirstPageFmt,
- BYTE nBreakCode);
+ sal_uInt8 nBreakCode);
protected:
/// Output SwGrfNode
@@ -1133,7 +1137,7 @@ protected:
virtual void OutputLinkedOLE( const rtl::OUString& );
- virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, ULONG nLnNum );
+ virtual void AppendSection( const SwPageDesc *pPageDesc, const SwSectionFmt* pFmt, sal_uLong nLnNum );
private:
/// No copying.
@@ -1156,8 +1160,8 @@ protected:
WW8_WrPlcSubDoc();
virtual ~WW8_WrPlcSubDoc();
- bool WriteGenericTxt( WW8Export& rWrt, BYTE nTTyp, WW8_CP& rCount );
- void WriteGenericPlc( WW8Export& rWrt, BYTE nTTyp, WW8_FC& rTxtStt,
+ bool WriteGenericTxt( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_CP& rCount );
+ void WriteGenericPlc( WW8Export& rWrt, sal_uInt8 nTTyp, WW8_FC& rTxtStt,
sal_Int32& rTxtCnt, WW8_FC& rRefStt, sal_Int32& rRefCnt ) const;
virtual const SvULongs* GetShapeIdArr() const;
@@ -1167,13 +1171,13 @@ protected:
class WW8_WrPlcFtnEdn : public WW8_WrPlcSubDoc
{
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
//No copying
WW8_WrPlcFtnEdn(const WW8_WrPlcFtnEdn&);
WW8_WrPlcFtnEdn& operator=(WW8_WrPlcFtnEdn &);
public:
- WW8_WrPlcFtnEdn( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcFtnEdn( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
@@ -1212,7 +1216,7 @@ public:
class WW8_WrPlcTxtBoxes : public WW8_WrPlcSubDoc // Doppel-Plc fuer Textboxen
{ // Rahmen/DrawTextboxes!
private:
- BYTE nTyp;
+ sal_uInt8 nTyp;
SvULongs aShapeIds; // VARARR of ShapeIds for the SwFrmFmts
virtual const SvULongs* GetShapeIdArr() const;
@@ -1220,13 +1224,13 @@ private:
WW8_WrPlcTxtBoxes(const WW8_WrPlcTxtBoxes&);
WW8_WrPlcTxtBoxes& operator=(WW8_WrPlcTxtBoxes&);
public:
- WW8_WrPlcTxtBoxes( BYTE nTTyp ) : nTyp( nTTyp ) {}
+ WW8_WrPlcTxtBoxes( sal_uInt8 nTTyp ) : nTyp( nTTyp ) {}
bool WriteTxt( WW8Export& rWrt );
void WritePlc( WW8Export& rWrt ) const;
- void Append( const SdrObject& rObj, UINT32 nShapeId );
- USHORT Count() const { return aCntnt.Count(); }
- USHORT GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
+ void Append( const SdrObject& rObj, sal_uInt32 nShapeId );
+ sal_uInt16 Count() const { return aCntnt.Count(); }
+ sal_uInt16 GetPos( const VoidPtr& p ) const { return aCntnt.GetPos( p ); }
};
typedef WW8_WrFkp* WW8_FkpPtr; // Plc fuer Chpx und Papx ( incl PN-Plc )
@@ -1237,10 +1241,10 @@ class WW8_WrPlcPn // Plc fuer Page Numbers
private:
WW8Export& rWrt;
WW8_WrFkpPtrs aFkps; // PTRARR
- USHORT nFkpStartPage;
+ sal_uInt16 nFkpStartPage;
ePLCFT ePlc;
bool bWrtWW8; // Fuer Writererkennung
- USHORT nMark;
+ sal_uInt16 nMark;
//No copying
WW8_WrPlcPn(const WW8_WrPlcPn&);
@@ -1248,10 +1252,10 @@ private:
public:
WW8_WrPlcPn( WW8Export& rWrt, ePLCFT ePl, WW8_FC nStartFc );
~WW8_WrPlcPn();
- void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const BYTE* pSprms = 0);
+ void AppendFkpEntry(WW8_FC nEndFc,short nVarLen = 0,const sal_uInt8* pSprms = 0);
void WriteFkps();
void WritePlc();
- BYTE *CopyLastSprms(BYTE &rLen);
+ sal_uInt8 *CopyLastSprms(sal_uInt8 &rLen);
};
// class WW8_WrPlc1 ist erstmal nur fuer Felder
@@ -1259,41 +1263,41 @@ class WW8_WrPlc1
{
private:
SvULongs aPos; // PTRARR von CPs
- BYTE* pData; // Inhalte ( Strukturen )
- ULONG nDataLen;
- USHORT nStructSiz;
+ sal_uInt8* pData; // Inhalte ( Strukturen )
+ sal_uLong nDataLen;
+ sal_uInt16 nStructSiz;
//No copying
WW8_WrPlc1(const WW8_WrPlc1&);
WW8_WrPlc1& operator=(const WW8_WrPlc1&);
protected:
- USHORT Count() const { return aPos.Count(); }
+ sal_uInt16 Count() const { return aPos.Count(); }
void Write( SvStream& rStrm );
WW8_CP Prev() const;
public:
- WW8_WrPlc1( USHORT nStructSz );
+ WW8_WrPlc1( sal_uInt16 nStructSz );
~WW8_WrPlc1();
void Append( WW8_CP nCp, const void* pData );
- void Finish( ULONG nLastCp, ULONG nStartCp );
+ void Finish( sal_uLong nLastCp, sal_uLong nStartCp );
};
// class WW8_WrPlcFld ist fuer Felder
class WW8_WrPlcFld : public WW8_WrPlc1
{
private:
- BYTE nTxtTyp;
- USHORT nResults;
+ sal_uInt8 nTxtTyp;
+ sal_uInt16 nResults;
//No copying
WW8_WrPlcFld(const WW8_WrPlcFld&);
WW8_WrPlcFld& operator=(const WW8_WrPlcFld&);
public:
- WW8_WrPlcFld( USHORT nStructSz, BYTE nTTyp )
+ WW8_WrPlcFld( sal_uInt16 nStructSz, sal_uInt8 nTTyp )
: WW8_WrPlc1( nStructSz ), nTxtTyp( nTTyp ), nResults(0)
{}
bool Write( WW8Export& rWrt );
void ResultAdded() { ++nResults; }
- USHORT ResultCount() const { return nResults; }
+ sal_uInt16 ResultCount() const { return nResults; }
};
class WW8_WrMagicTable : public WW8_WrPlc1
@@ -1304,7 +1308,7 @@ private:
WW8_WrMagicTable& operator=(const WW8_WrMagicTable&);
public:
WW8_WrMagicTable() : WW8_WrPlc1( 4 ) {Append(0,0);}
- void Append( WW8_CP nCp, ULONG nData );
+ void Append( WW8_CP nCp, sal_uLong nData );
bool Write( WW8Export& rWrt );
};
@@ -1312,11 +1316,11 @@ class GraphicDetails
{
public:
sw::Frame maFly; // Umgebende FlyFrms dazu
- ULONG mnPos; // FilePos der Grafiken
- UINT16 mnWid; // Breite der Grafiken
- UINT16 mnHei; // Hoehe der Grafiken
+ sal_uLong mnPos; // FilePos der Grafiken
+ sal_uInt16 mnWid; // Breite der Grafiken
+ sal_uInt16 mnHei; // Hoehe der Grafiken
- GraphicDetails(const sw::Frame &rFly, UINT16 nWid, UINT16 nHei)
+ GraphicDetails(const sw::Frame &rFly, sal_uInt16 nWid, sal_uInt16 nHei)
: maFly(rFly), mnPos(0), mnWid(nWid), mnHei(nHei)
{}
GraphicDetails& operator=(const GraphicDetails& rOther);
@@ -1339,14 +1343,14 @@ private:
std::vector<GraphicDetails> maDetails;
typedef std::vector<GraphicDetails>::iterator myiter;
- USHORT mnIdx; // Index in File-Positionen
+ sal_uInt16 mnIdx; // Index in File-Positionen
void WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight,
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight,
const SwAttrSet* pAttrSet = 0);
void WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem);
void WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight);
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight);
//No copying
SwWW8WrGrf(const SwWW8WrGrf&);
@@ -1355,7 +1359,7 @@ public:
SwWW8WrGrf( WW8Export& rW ) : rWrt( rW ), mnIdx( 0 ) {}
void Insert(const sw::Frame &rFly);
void Write();
- ULONG GetFPos()
+ sal_uLong GetFPos()
{ return (mnIdx < maDetails.size()) ? maDetails[mnIdx++].mnPos : 0; }
};
@@ -1376,8 +1380,8 @@ public:
MSWordAttrIter( MSWordExportBase& rExport );
virtual ~MSWordAttrIter();
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const = 0;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const = 0;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const = 0;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const = 0;
};
/// Used to export formatted text associated to drawings.
@@ -1389,12 +1393,12 @@ private:
EECharAttribArray aTxtAtrArr;
SvPtrarr aChrTxtAtrArr;
SvUShorts aChrSetArr;
- USHORT nPara;
+ sal_uInt16 nPara;
xub_StrLen nAktSwPos;
xub_StrLen nTmpSwPos; // for HasItem()
rtl_TextEncoding eNdChrSet;
- USHORT nScript;
- BYTE mnTyp;
+ sal_uInt16 nScript;
+ sal_uInt8 mnTyp;
xub_StrLen SearchNext( xub_StrLen nStartPos );
void SetCharSet(const EECharAttrib& rTxtAttr, bool bStart);
@@ -1404,8 +1408,8 @@ private:
MSWord_SdrAttrIter& operator=(const MSWord_SdrAttrIter&);
public:
MSWord_SdrAttrIter( MSWordExportBase& rWr, const EditTextObject& rEditObj,
- BYTE nType );
- void NextPara( USHORT nPar );
+ sal_uInt8 nType );
+ void NextPara( sal_uInt16 nPar );
void OutParaAttr(bool bCharAttr);
void OutEEField(const SfxPoolItem& rHt);
@@ -1414,8 +1418,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
bool OutAttrWithRange(xub_StrLen nPos);
xub_StrLen WhereNext() const { return nAktSwPos; }
rtl_TextEncoding GetNextCharSet() const;
@@ -1445,7 +1449,7 @@ private:
const SwRedline* pCurRedline;
xub_StrLen nAktSwPos;
- USHORT nCurRedlinePos;
+ sal_uInt16 nCurRedlinePos;
bool mbParaIsRTL;
@@ -1475,8 +1479,8 @@ public:
void NextPos() { if ( nAktSwPos < STRING_NOTFOUND ) nAktSwPos = SearchNext( nAktSwPos + 1 ); }
void OutAttr( xub_StrLen nSwPos, bool bRuby = false );
- virtual const SfxPoolItem* HasTextItem( USHORT nWhich ) const;
- virtual const SfxPoolItem& GetItem( USHORT nWhich ) const;
+ virtual const SfxPoolItem* HasTextItem( sal_uInt16 nWhich ) const;
+ virtual const SfxPoolItem& GetItem( sal_uInt16 nWhich ) const;
int OutAttrWithRange(xub_StrLen nPos);
const SwRedlineData* GetRedline( xub_StrLen nPos );
void OutFlys(xub_StrLen nSwPos);
@@ -1496,26 +1500,26 @@ class MSWordStyles
{
MSWordExportBase& m_rExport;
SwFmt** pFmtA;
- USHORT nUsedSlots;
+ sal_uInt16 nUsedSlots;
/// Create the style table, called from the constructor.
void BuildStylesTable();
/// Get slot number during building the style table.
- USHORT BuildGetSlot( const SwFmt& rFmt );
+ sal_uInt16 BuildGetSlot( const SwFmt& rFmt );
/// Return information about one style.
- void GetStyleData( SwFmt* pFmt, bool& bFmtColl, USHORT& nBase, USHORT& nNext );
+ void GetStyleData( SwFmt* pFmt, bool& bFmtColl, sal_uInt16& nBase, sal_uInt16& nNext );
/// Outputs attributes of one style.
- void WriteProperties( const SwFmt* pFmt, bool bPap, USHORT nPos, bool bInsDefCharSiz );
+ void WriteProperties( const SwFmt* pFmt, bool bPap, sal_uInt16 nPos, bool bInsDefCharSiz );
- USHORT GetWWId( const SwFmt& rFmt ) const;
+ sal_uInt16 GetWWId( const SwFmt& rFmt ) const;
void SetStyleDefaults( const SwFmt& rFmt, bool bPap );
/// Outputs one style - called (in a loop) from OutputStylesTable().
- void OutputStyle( SwFmt* pFmt, USHORT nPos );
+ void OutputStyle( SwFmt* pFmt, sal_uInt16 nPos );
// No copying
MSWordStyles( const MSWordStyles& );
@@ -1529,7 +1533,7 @@ public:
void OutputStylesTable();
/// Get id of the style (rFmt).
- USHORT GetSlot( const SwFmt& rFmt ) const;
+ sal_uInt16 GetSlot( const SwFmt& rFmt ) const;
SwFmt* GetSwFmt() { return (*pFmtA); }
};
@@ -1558,8 +1562,8 @@ public:
/// For the output of sections.
struct WW8_PdAttrDesc
{
- BYTE* pData;
- USHORT nLen;
+ sal_uInt8* pData;
+ sal_uInt16 nLen;
WW8_FC nSepxFcPos;
};
diff --git a/sw/source/filter/ww8/wrtww8gr.cxx b/sw/source/filter/ww8/wrtww8gr.cxx
index ef45bbedaf8c..e5898a607300 100644
--- a/sw/source/filter/ww8/wrtww8gr.cxx
+++ b/sw/source/filter/ww8/wrtww8gr.cxx
@@ -89,7 +89,7 @@ using namespace nsFieldFlags;
// 5. Die MapModes, die Win nicht kann, umrechnen
// OutGrf() wird fuer jeden GrafNode im Doc gerufen. Es wird ein PicLocFc-Sprm
-// eingefuegt, der statt Adresse ein Magic ULONG enthaelt. Ausserdem wird
+// eingefuegt, der statt Adresse ein Magic sal_uLong enthaelt. Ausserdem wird
// in der Graf-Klasse der GrfNode-Ptr gemerkt ( fuers spaetere Ausgeben der
// Grafiken und Patchen der PicLocFc-Attribute )
@@ -212,15 +212,15 @@ bool WW8Export::TestOleNeedsGraphic(const SwAttrSet& rSet,
void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
{
OSL_TRACE("WW8Export::OutputOLENode( const SwOLENode& rOLENode )\n" );
- BYTE *pSpecOLE;
- BYTE *pDataAdr;
+ sal_uInt8 *pSpecOLE;
+ sal_uInt8 *pDataAdr;
short nSize;
- static BYTE aSpecOLE_WW8[] = {
+ static sal_uInt8 aSpecOLE_WW8[] = {
0x03, 0x6a, 0, 0, 0, 0, // sprmCPicLocation
0x0a, 0x08, 1, // sprmCFOLE2
0x56, 0x08, 1 // sprmCFObj
};
- static BYTE aSpecOLE_WW6[] = {
+ static sal_uInt8 aSpecOLE_WW6[] = {
68, 4, 0, 0, 0, 0, // sprmCPicLocation (len is 4)
75, 1, // sprmCFOLE2
118, 1 // sprmCFObj
@@ -254,7 +254,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
WW8OleMap *pMap = new WW8OleMap(nPictureId);
bool bDuplicate = false;
WW8OleMaps &rOleMap = GetOLEMap();
- USHORT nPos;
+ sal_uInt16 nPos;
if ( rOleMap.Seek_Entry(pMap, &nPos) )
{
bDuplicate = true;
@@ -283,7 +283,7 @@ void WW8Export::OutputOLENode( const SwOLENode& rOLENode )
::rtl::OUString aObjInfo( RTL_CONSTASCII_USTRINGPARAM( "\3ObjInfo" ) );
if ( !xOleStg->IsStream( aObjInfo ) )
{
- const BYTE pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
+ const sal_uInt8 pObjInfoData[] = { 0x40, 0x00, 0x03, 0x00 };
SvStorageStreamRef rObjInfoStream = xOleStg->OpenSotStream( aObjInfo );
if ( rObjInfoStream.Is() && !rObjInfoStream->GetError() )
{
@@ -431,8 +431,8 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
WriteChar( (char)1 ); // Grafik-Sonderzeichen in Haupttext einfuegen
- BYTE aArr[ 18 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 18 ];
+ sal_uInt8* pArr = aArr;
const SwFrmFmt &rFlyFmt = rFrame.GetFrmFmt();
const RndStdIds eAn = rFlyFmt.GetAttrSet().GetAnchor(false).GetAnchorId();
@@ -463,7 +463,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
Set_UInt16( pArr, NS_sprm::LN_CHpsPos );
else
Set_UInt8( pArr, 101 );
- Set_UInt16( pArr, -((INT16)nHeight));
+ Set_UInt16( pArr, -((sal_Int16)nHeight));
}
}
}
@@ -487,7 +487,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
// Magic variieren, damit verschiedene Grafik-Attribute nicht
// gemerged werden
- static BYTE nAttrMagicIdx = 0;
+ static sal_uInt8 nAttrMagicIdx = 0;
--pArr;
Set_UInt8( pArr, nAttrMagicIdx++ );
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
@@ -503,7 +503,7 @@ void WW8Export::OutGrf(const sw::Frame &rFrame)
{
WriteChar( (char)0x0d ); // umgebenden Rahmen mit CR abschliessen
- static BYTE const nSty[2] = { 0, 0 };
+ static sal_uInt8 nSty[2] = { 0, 0 };
pO->Insert( nSty, 2, pO->Count() ); // Style #0
bool bOldGrf = bOutGrf;
bOutGrf = true;
@@ -535,16 +535,16 @@ GraphicDetails& GraphicDetails::operator=(const GraphicDetails &rOther)
void SwWW8WrGrf::Insert(const sw::Frame &rFly)
{
const Size aSize( rFly.GetLayoutSize() );
- const UINT16 nWidth = static_cast< UINT16 >(aSize.Width());
- const UINT16 nHeight = static_cast< UINT16 >(aSize.Height());
+ const sal_uInt16 nWidth = static_cast< sal_uInt16 >(aSize.Width());
+ const sal_uInt16 nHeight = static_cast< sal_uInt16 >(aSize.Height());
maDetails.push_back(GraphicDetails(rFly, nWidth, nHeight));
}
void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
- UINT16 mm, UINT16 nWidth, UINT16 nHeight, const SwAttrSet* pAttrSet)
+ sal_uInt16 mm, sal_uInt16 nWidth, sal_uInt16 nHeight, const SwAttrSet* pAttrSet)
{
- INT16 nXSizeAdd = 0, nYSizeAdd = 0;
- INT16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
+ sal_Int16 nXSizeAdd = 0, nYSizeAdd = 0;
+ sal_Int16 nCropL = 0, nCropR = 0, nCropT = 0, nCropB = 0;
// Crop-AttributInhalt in Header schreiben ( falls vorhanden )
const SfxPoolItem* pItem;
@@ -552,21 +552,21 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
== pAttrSet->GetItemState(RES_GRFATR_CROPGRF, false, &pItem)))
{
const SwCropGrf& rCr = *(SwCropGrf*)pItem;
- nCropL = (INT16)rCr.GetLeft();
- nCropR = (INT16)rCr.GetRight();
- nCropT = (INT16)rCr.GetTop();
- nCropB = (INT16)rCr.GetBottom();
- nXSizeAdd = nXSizeAdd - (INT16)( rCr.GetLeft() + rCr.GetRight() );
- nYSizeAdd = nYSizeAdd - (INT16)( rCr.GetTop() + rCr.GetBottom() );
+ nCropL = (sal_Int16)rCr.GetLeft();
+ nCropR = (sal_Int16)rCr.GetRight();
+ nCropT = (sal_Int16)rCr.GetTop();
+ nCropB = (sal_Int16)rCr.GetBottom();
+ nXSizeAdd = nXSizeAdd - (sal_Int16)( rCr.GetLeft() + rCr.GetRight() );
+ nYSizeAdd = nYSizeAdd - (sal_Int16)( rCr.GetTop() + rCr.GetBottom() );
}
Size aGrTwipSz(rFly.GetSize());
bool bWrtWW8 = rWrt.bWrtWW8;
- UINT16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
+ sal_uInt16 nHdrLen = bWrtWW8 ? 0x44 : 0x3A;
- BYTE aArr[ 0x44 ] = { 0 };
+ sal_uInt8 aArr[ 0x44 ] = { 0 };
- BYTE* pArr = aArr + 0x2E; //Do borders first
+ sal_uInt8* pArr = aArr + 0x2E; //Do borders first
const SwAttrSet& rAttrSet = rFly.GetFrmFmt().GetAttrSet();
if (SFX_ITEM_ON == rAttrSet.GetItemState(RES_BOX, false, &pItem))
@@ -583,9 +583,9 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
(pSI->GetWidth() != 0);
}
- BYTE aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
+ sal_uInt8 aLnArr[4] = { BOX_LINE_TOP, BOX_LINE_LEFT,
BOX_LINE_BOTTOM, BOX_LINE_RIGHT };
- for( BYTE i = 0; i < 4; ++i )
+ for( sal_uInt8 i = 0; i < 4; ++i )
{
const SvxBorderLine* pLn = pBox->GetLine( aLnArr[ i ] );
WW8_BRC aBrc;
@@ -655,7 +655,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Width() + nXSizeAdd ) // set mx
{
double fVal = nWidth * 1000.0 / (aGrTwipSz.Width() + nXSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -663,7 +663,7 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
if( aGrTwipSz.Height() + nYSizeAdd ) // set my
{
double fVal = nHeight * 1000.0 / (aGrTwipSz.Height() + nYSizeAdd);
- Set_UInt16( pArr, (USHORT)::rtl::math::round(fVal) );
+ Set_UInt16( pArr, (sal_uInt16)::rtl::math::round(fVal) );
}
else
pArr += 2;
@@ -677,18 +677,18 @@ void SwWW8WrGrf::WritePICFHeader(SvStream& rStrm, const sw::Frame &rFly,
}
void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
- const sw::Frame &rFly, UINT16 nWidth, UINT16 nHeight)
+ const sw::Frame &rFly, sal_uInt16 nWidth, sal_uInt16 nHeight)
{
if (rGrfNd.IsLinkedFile()) // Linked File
{
String aFileN;
rGrfNd.GetFileFilterNms( &aFileN, 0 );
- UINT16 mm = 94; // 94 = BMP, GIF
+ sal_uInt16 mm = 94; // 94 = BMP, GIF
WritePICFHeader(rStrm, rFly, mm, nWidth, nHeight,
rGrfNd.GetpSwAttrSet());
- rStrm << (BYTE)aFileN.Len(); // Pascal-String schreiben
+ rStrm << (sal_uInt8)aFileN.Len(); // Pascal-String schreiben
SwWW8Writer::WriteString8(rStrm, aFileN, false,
RTL_TEXTENCODING_MS_1252);
}
@@ -742,9 +742,9 @@ void SwWW8WrGrf::WriteGrfFromGrfNode(SvStream& rStrm, const SwGrfNode &rGrfNd,
void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
{
- UINT16 nWidth = rItem.mnWid;
- UINT16 nHeight = rItem.mnHei;
- UINT32 nPos = rStrm.Tell(); // Grafik-Anfang merken
+ sal_uInt16 nWidth = rItem.mnWid;
+ sal_uInt16 nHeight = rItem.mnHei;
+ sal_uInt32 nPos = rStrm.Tell(); // Grafik-Anfang merken
const sw::Frame &rFly = rItem.maFly;
switch (rFly.GetWriterType())
@@ -858,7 +858,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
break;
}
- UINT32 nPos2 = rStrm.Tell(); // Ende merken
+ sal_uInt32 nPos2 = rStrm.Tell(); // Ende merken
rStrm.Seek( nPos );
SVBT32 nLen;
UInt32ToSVBT32( nPos2 - nPos, nLen ); // Grafik-Laenge ausrechnen
@@ -870,7 +870,7 @@ void SwWW8WrGrf::WriteGraphicNode(SvStream& rStrm, const GraphicDetails &rItem)
// Grafiken raus und merkt sich die File-Positionen der Grafiken, damit
// beim Schreiben der Attribute die Positionen in die PicLocFc-Sprms
// eingepatcht werden koennen.
-// Das Suchen in den Attributen nach dem Magic ULONG und das Patchen
+// Das Suchen in den Attributen nach dem Magic sal_uLong und das Patchen
// passiert beim Schreiben der Attribute. Die SwWW8WrGrf-Klasse liefert
// hierfuer nur mit GetFPos() sequentiell die Positionen.
void SwWW8WrGrf::Write()
@@ -879,7 +879,7 @@ void SwWW8WrGrf::Write()
myiter aEnd = maDetails.end();
for (myiter aIter = maDetails.begin(); aIter != aEnd; ++aIter)
{
- UINT32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
+ sal_uInt32 nPos = rStrm.Tell(); // auf 4 Bytes alignen
if( nPos & 0x3 )
SwWW8Writer::FillCount( rStrm, 4 - ( nPos & 0x3 ) );
diff --git a/sw/source/filter/ww8/ww8atr.cxx b/sw/source/filter/ww8/ww8atr.cxx
index ab05538128a9..10cc74d8d88b 100644
--- a/sw/source/filter/ww8/ww8atr.cxx
+++ b/sw/source/filter/ww8/ww8atr.cxx
@@ -166,7 +166,7 @@ using namespace nsSwDocInfoSubType;
using namespace sw::util;
using namespace sw::types;
-bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
+bool WW8Export::CollapseScriptsforWordOk( sal_uInt16 nScript, sal_uInt16 nWhich )
{
bool bRet = true;
if ( nScript == i18n::ScriptType::ASIAN )
@@ -252,13 +252,13 @@ bool WW8Export::CollapseScriptsforWordOk( USHORT nScript, USHORT nWhich )
// Hilfsroutinen fuer Styles
//------------------------------------------------------------
-void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScript )
+void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, sal_uInt16 nScript )
{
sw::cPoolItemIter aEnd = rItems.end();
for ( sw::cPoolItemIter aI = rItems.begin(); aI != aEnd; ++aI )
{
const SfxPoolItem *pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( ( isCHRATR( nWhich ) || isTXTATR( nWhich ) ) && CollapseScriptsforWordOk( nScript, nWhich ) )
{
AttrOutput().OutputItem( *pItem );
@@ -271,7 +271,7 @@ void MSWordExportBase::ExportPoolItemsToCHP( sw::PoolItems &rItems, USHORT nScri
* - gebe die Attribute aus; ohne Parents!
*/
-void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, USHORT nScript,
+void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool bChpFmt, sal_uInt16 nScript,
bool bExportParentItemSet )
{
if( bExportParentItemSet || rSet.Count() )
@@ -318,7 +318,7 @@ void MSWordExportBase::OutputItemSet( const SfxItemSet& rSet, bool bPapFmt, bool
for ( sw::cPoolItemIter aI = aItems.begin(); aI != aEnd; ++aI )
{
pItem = aI->second;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if ( nWhich >= RES_PARATR_BEGIN && nWhich < RES_FRMATR_END && nWhich != RES_PARATR_NUMRULE)
AttrOutput().OutputItem( *pItem );
}
@@ -351,8 +351,8 @@ bool MSWordExportBase::CntntContainsChapterField(const SwFmtCntnt &rCntnt) const
{
SwNodeIndex aIdx( *pSttIdx, 1 );
SwNodeIndex aEnd( *pSttIdx->GetNode().EndOfSectionNode() );
- ULONG nStart = aIdx.GetIndex();
- ULONG nEnd = aEnd.GetIndex();
+ sal_uLong nStart = aIdx.GetIndex();
+ sal_uLong nEnd = aEnd.GetIndex();
//If the header/footer contains a chapter field
mycCFIter aIEnd = maChapterFieldLocs.end();
for ( mycCFIter aI = maChapterFieldLocs.begin(); aI != aIEnd; ++aI )
@@ -573,7 +573,7 @@ const SwSectionFmt* MSWordExportBase::GetSectionFormat( const SwNode& rNd ) cons
return pFmt;
}
-ULONG MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
+sal_uLong MSWordExportBase::GetSectionLineNo( const SfxItemSet* pSet, const SwNode& rNd ) const
{
const SwFmtLineNumber* pNItem = 0;
if ( pSet )
@@ -598,7 +598,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
// Aufbauen und die Ausgabe der am PageDesc haengenden Attribute und
// Kopf/Fusszeilen passiert nach dem Haupttext und seinen Attributen.
- ULONG nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
+ sal_uLong nFcPos = ReplaceCr( msword::PageBreak ); // Page/Section-Break
// tatsaechlich wird hier NOCH NICHTS ausgegeben, sondern
// nur die Merk-Arrays aCps, aSects entsprechend ergaenzt
@@ -606,7 +606,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
return;
const SwSectionFmt* pFmt = GetSectionFormat( rNd );
- const ULONG nLnNm = GetSectionLineNo( pSet, rNd );
+ const sal_uLong nLnNm = GetSectionLineNo( pSet, rNd );
OSL_ENSURE( pNewPgDescFmt || pNewPgDesc, "Neither page desc format nor page desc provided." );
@@ -620,7 +620,7 @@ void WW8Export::PrepareNewPageDesc( const SfxItemSet*pSet,
}
}
-void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
+void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, sal_uInt16 nAbsLeft )
{
const SvxTabStopItem *pItem =
sw::util::HasItem<SvxTabStopItem>( rSet, RES_PARATR_TABSTOP );
@@ -629,7 +629,7 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
{
// dann muss das fuer die Ausgabe korrigiert werden
SvxTabStopItem aTStop(*pItem);
- for ( USHORT nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
+ for ( sal_uInt16 nCnt = 0; nCnt < aTStop.Count(); ++nCnt )
{
SvxTabStop& rTab = (SvxTabStop&)aTStop[ nCnt ];
if ( SVX_TAB_ADJUST_DEFAULT != rTab.GetAdjustment() &&
@@ -647,9 +647,9 @@ void MSWordExportBase::CorrectTabStopInSet( SfxItemSet& rSet, USHORT nAbsLeft )
}
}
-BYTE WW8Export::GetNumId( USHORT eNumType )
+sal_uInt8 WW8Export::GetNumId( sal_uInt16 eNumType )
{
- BYTE nRet = 0;
+ sal_uInt8 nRet = 0;
switch( eNumType )
{
case SVX_NUM_CHARS_UPPER_LETTER:
@@ -668,7 +668,7 @@ BYTE WW8Export::GetNumId( USHORT eNumType )
return nRet;
}
-void WW8AttributeOutput::OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
+void WW8AttributeOutput::OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt )
{
if ( nLvl >= WW8ListManager::nMaxLevel )
nLvl = WW8ListManager::nMaxLevel-1;
@@ -726,7 +726,7 @@ bool WW8Export::DisallowInheritingOutlineNumbering(const SwFmt &rFmt)
if (bWrtWW8)
{
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_POutLvl);
- pO->Insert(BYTE(9), pO->Count());
+ pO->Insert(sal_uInt8(9), pO->Count());
SwWW8Writer::InsUInt16(*pO, NS_sprm::LN_PIlfo);
SwWW8Writer::InsUInt16(*pO, 0);
@@ -759,9 +759,9 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
//if outline numbered
// if Write StyleDefinition then write the OutlineRule
- const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<USHORT>( nLvl ) );
+ const SwNumFmt& rNFmt = pDoc->GetOutlineNumRule()->Get( static_cast<sal_uInt16>( nLvl ) );
if ( bStyDef )
- AttrOutput().OutlineNumbering( static_cast< BYTE >( nLvl ), rNFmt, rFmt );
+ AttrOutput().OutlineNumbering( static_cast< sal_uInt8 >( nLvl ), rNFmt, rFmt );
if ( rNFmt.GetPositionAndSpaceMode() ==
SvxNumberFormat::LABEL_WIDTH_AND_POSITION &&
@@ -853,7 +853,7 @@ void MSWordExportBase::OutputFormat( const SwFmt& rFmt, bool bPapFmt, bool bChpF
pOutFmtNode = pOldMod;
}
-bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT nSeqNo )
+bool MSWordExportBase::HasRefToObject( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
const SwTxtNode* pNd;
SwClientIter aIter( *pDoc->GetSysFldType( RES_GETREFFLD ) );
@@ -889,7 +889,7 @@ bool MSWordExportBase::HasRefToObject( USHORT nTyp, const String* pName, USHORT
return false;
}
-String MSWordExportBase::GetBookmarkName( USHORT nTyp, const String* pName, USHORT nSeqNo )
+String MSWordExportBase::GetBookmarkName( sal_uInt16 nTyp, const String* pName, sal_uInt16 nSeqNo )
{
String sRet;
switch ( nTyp )
@@ -929,14 +929,14 @@ void WW8AttributeOutput::RTLAndCJKState( bool bIsRTL, sal_uInt16 nScript )
if ( m_rWW8Export.bWrtWW8 && bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CFBiDi );
- m_rWW8Export.pO->Insert( (BYTE)1, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)1, m_rWW8Export.pO->Count() );
}
// #i46087# patch from james_clark; complex texts needs the undocumented SPRM CComplexScript with param 0x81.
if ( m_rWW8Export.bWrtWW8 && nScript == i18n::ScriptType::COMPLEX && !bIsRTL )
{
m_rWW8Export.InsUInt16( NS_sprm::LN_CComplexScript );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
m_rWW8Export.pDop->bUseThaiLineBreakingRules = true;
}
}
@@ -954,7 +954,7 @@ void WW8AttributeOutput::EndParagraph( ww8::WW8TableNodeInfoInner::Pointer_t pTe
SVBT16 nSty;
ShortToSVBT16( 0, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
TableInfoRow( pTextNodeInfoInner );
m_rWW8Export.pPapPlc->AppendFkpEntry( m_rWW8Export.Strm().Tell(), m_rWW8Export.pO->Count(),
m_rWW8Export.pO->GetData() );
@@ -992,7 +992,7 @@ void WW8AttributeOutput::EndRunProperties( const SwRedlineData* pRedlineData )
Redline( pRedlineData );
WW8_WrPlcFld* pCurrentFields = m_rWW8Export.CurrentFieldPlc();
- USHORT nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
+ sal_uInt16 nNewFieldResults = pCurrentFields ? pCurrentFields->ResultCount() : 0;
bool bExportedFieldResult = ( m_nFieldResults != nNewFieldResults );
@@ -1028,16 +1028,16 @@ void WW8AttributeOutput::OutputFKP()
}
}
-void WW8AttributeOutput::ParagraphStyle( USHORT nStyle )
+void WW8AttributeOutput::ParagraphStyle( sal_uInt16 nStyle )
{
OSL_ENSURE( !m_rWW8Export.pO->Count(), " pO ist am ZeilenEnde nicht leer" );
SVBT16 nSty;
ShortToSVBT16( nStyle, nSty );
- m_rWW8Export.pO->Insert( (BYTE*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
+ m_rWW8Export.pO->Insert( (sal_uInt8*)&nSty, 2, m_rWW8Export.pO->Count() ); // Style #
}
-void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8Attribute( sal_uInt8 nId, bool bVal )
{
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( 8 == nId ? NS_sprm::LN_CFDStrike : NS_sprm::LN_CFBold + nId );
@@ -1049,7 +1049,7 @@ void WW8AttributeOutput::OutputWW8Attribute( BYTE nId, bool bVal )
m_rWW8Export.pO->Insert( bVal ? 1 : 0, m_rWW8Export.pO->Count() );
}
-void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
+void WW8AttributeOutput::OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal )
{
OSL_ENSURE( nId <= 1, "out of range" );
if ( !m_rWW8Export.bWrtWW8 || nId > 1 )
@@ -1061,7 +1061,7 @@ void WW8AttributeOutput::OutputWW8AttributeCTL( BYTE nId, bool bVal )
void WW8AttributeOutput::CharFont( const SvxFontItem& rFont )
{
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
{
@@ -1079,7 +1079,7 @@ void WW8AttributeOutput::CharFontCTL( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CFtcBi );
else
@@ -1091,7 +1091,7 @@ void WW8AttributeOutput::CharFontCJK( const SvxFontItem& rFont )
{
//Can only export in 8+, in 7- export as normal varient and expect that
//upperlevel code has blocked exporting clobbering attributes
- USHORT nFontID = m_rWW8Export.GetId( rFont );
+ sal_uInt16 nFontID = m_rWW8Export.GetId( rFont );
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_CRgFtc1 );
else
@@ -1199,7 +1199,7 @@ void WW8AttributeOutput::CharCrossedOut( const SvxCrossedOutItem& rCrossed )
void WW8AttributeOutput::CharCaseMap( const SvxCaseMapItem& rCaseMap )
{
- USHORT eSt = rCaseMap.GetValue();
+ sal_uInt16 eSt = rCaseMap.GetValue();
switch ( eSt )
{
case SVX_CASEMAP_KAPITAELCHEN:
@@ -1241,7 +1241,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
// WW97 - additional parameters:
// 6 = thick, 7 = dash, 8 = dot(not used)
// 9 = dotdash 10 = dotdotdash, 11 = wave
- BYTE b = 0;
+ sal_uInt8 b = 0;
switch ( rUnderline.GetLineStyle() )
{
case UNDERLINE_SINGLE:
@@ -1306,7 +1306,7 @@ void WW8AttributeOutput::CharUnderline( const SvxUnderlineItem& rUnderline )
void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rLanguage.Which() )
@@ -1330,7 +1330,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
if ( m_rWW8Export.bWrtWW8 ) // use sprmCRgLid0_80 rather than sprmCLid
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rLanguage.GetLanguage() );
// Word 2000 and above apparently require both old and new versions of
@@ -1350,7 +1350,7 @@ void WW8AttributeOutput::CharLanguage( const SvxLanguageItem& rLanguage )
void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
{
- BYTE b = 0xFF;
+ sal_uInt8 b = 0xFF;
short nEsc = rEscapement.GetEsc(), nProp = rEscapement.GetProp();
if ( !nEsc )
{
@@ -1402,7 +1402,7 @@ void WW8AttributeOutput::CharEscapement( const SvxEscapementItem& rEscapement )
void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
{
switch ( rHeight.Which() )
@@ -1424,9 +1424,9 @@ void WW8AttributeOutput::CharFontSize( const SvxFontHeightItem& rHeight )
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (UINT16)(( rHeight.GetHeight() + 5 ) / 10 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16)(( rHeight.GetHeight() + 5 ) / 10 ) );
}
}
@@ -1443,7 +1443,7 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
{
if ( m_rWW8Export.bWrtWW8 )
{
- USHORT nId;
+ sal_uInt16 nId;
switch ( rRelief.GetValue() )
{
case RELIEF_EMBOSSED: nId = NS_sprm::LN_CFEmboss; break;
@@ -1454,15 +1454,15 @@ void WW8AttributeOutput::CharRelief( const SvxCharReliefItem& rRelief )
if( nId )
{
m_rWW8Export.InsUInt16( nId );
- m_rWW8Export.pO->Insert( (BYTE)0x81, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x81, m_rWW8Export.pO->Count() );
}
else
{
// switch both flags off
m_rWW8Export.InsUInt16( NS_sprm::LN_CFEmboss );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( NS_sprm::LN_CFImprint );
- m_rWW8Export.pO->Insert( (BYTE)0x0, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x0, m_rWW8Export.pO->Count() );
}
}
}
@@ -1480,11 +1480,11 @@ void WW8AttributeOutput::CharRotate( const SvxCharRotateItem& rRotate )
// here corrupts the table, hence !m_rWW8Export.bIsInTable
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x01, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x01, m_rWW8Export.pO->Count() );
m_rWW8Export.InsUInt16( rRotate.IsFitToLine() ? 1 : 0 );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -1493,7 +1493,7 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
{
if ( m_rWW8Export.bWrtWW8 )
{
- BYTE nVal;
+ sal_uInt8 nVal;
switch ( rEmphasisMark.GetValue() )
{
case EMPHASISMARK_NONE: nVal = 0; break;
@@ -1514,9 +1514,9 @@ void WW8AttributeOutput::CharEmphasisMark( const SvxEmphasisMarkItem& rEmphasisM
// Gibt es keine direkte Entsprechung, dann wird versucht, eine moeglichst
// aehnliche WW-Farbe zu finden.
// return: 5-Bit-Wert ( 0..16 )
-BYTE WW8Export::TransCol( const Color& rCol )
+sal_uInt8 WW8Export::TransCol( const Color& rCol )
{
- BYTE nCol = 0; // ->Auto
+ sal_uInt8 nCol = 0; // ->Auto
switch( rCol.GetColor() )
{
case COL_BLACK: nCol = 1; break;
@@ -1548,10 +1548,10 @@ BYTE WW8Export::TransCol( const Color& rCol )
COL_RED, COL_BROWN, COL_GRAY, COL_LIGHTGRAY
};
- for( USHORT i = 0; i < 16; ++i )
+ for( sal_uInt16 i = 0; i < 16; ++i )
pBmpPal->operator[]( i ) = Color( aColArr[ i ] );
}
- nCol = static_cast< BYTE >(pBmpPal->GetBestIndex( rCol ) + 1);
+ nCol = static_cast< sal_uInt8 >(pBmpPal->GetBestIndex( rCol ) + 1);
break;
}
return nCol;
@@ -1590,7 +1590,7 @@ void WW8AttributeOutput::CharColor( const SvxColorItem& rColor )
else
m_rWW8Export.pO->Insert( 98, m_rWW8Export.pO->Count() );
- BYTE nColor = m_rWW8Export.TransCol( rColor.GetValue() );
+ sal_uInt8 nColor = m_rWW8Export.TransCol( rColor.GetValue() );
m_rWW8Export.pO->Insert( nColor, m_rWW8Export.pO->Count() );
if ( m_rWW8Export.bWrtWW8 && nColor )
@@ -1625,7 +1625,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
{
if ( rINet.GetValue().Len() )
{
- USHORT nId;
+ sal_uInt16 nId;
const String& rStr = rINet.GetINetFmt();
if ( rStr.Len() )
nId = rINet.GetINetFmtId();
@@ -1650,7 +1650,7 @@ void WW8AttributeOutput::TextINetFormat( const SwFmtINetFmt& rINet )
// - it contains the name of the link target, which is a bookmark.
// add optional parameter <bIncludeEmptyPicLocation>
// It is needed to write an empty picture location for page number field separators
-static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
+static void InsertSpecialChar( WW8Export& rWrt, sal_uInt8 c,
String* pLinkStr = 0L,
bool bIncludeEmptyPicLocation = false )
{
@@ -1679,15 +1679,15 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write hyperlink data to data stream
SvStream& rStrm = *rWrt.pDataStrm;
// position of hyperlink data
- const UINT32 nLinkPosInDataStrm = rStrm.Tell();
+ const sal_uInt32 nLinkPosInDataStrm = rStrm.Tell();
// write empty header
- const UINT16 nEmptyHdrLen = 0x44;
- BYTE aEmptyHeader[ nEmptyHdrLen ] = { 0 };
+ const sal_uInt16 nEmptyHdrLen = 0x44;
+ sal_uInt8 aEmptyHeader[ nEmptyHdrLen ] = { 0 };
aEmptyHeader[ 4 ] = 0x44;
rStrm.Write( aEmptyHeader, nEmptyHdrLen );
// writer fixed header
- const UINT16 nFixHdrLen = 0x19;
- BYTE aFixHeader[ nFixHdrLen ] =
+ const sal_uInt16 nFixHdrLen = 0x19;
+ sal_uInt8 aFixHeader[ nFixHdrLen ] =
{
0x08, 0xD0, 0xC9, 0xEA, 0x79, 0xF9, 0xBA, 0xCE,
0x11, 0x8C, 0x82, 0x00, 0xAA, 0x00, 0x4B, 0xA9,
@@ -1696,13 +1696,13 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
};
rStrm.Write( aFixHeader, nFixHdrLen );
// write reference string including length+1
- UINT32 nStrLen( pLinkStr->Len() + 1 );
+ sal_uInt32 nStrLen( pLinkStr->Len() + 1 );
SwWW8Writer::WriteLong( rStrm, nStrLen );
SwWW8Writer::WriteString16( rStrm, *(pLinkStr), false );
// write additional two NULL Bytes
SwWW8Writer::WriteLong( rStrm, 0 );
// write length of hyperlink data
- const UINT32 nCurrPos = rStrm.Tell();
+ const sal_uInt32 nCurrPos = rStrm.Tell();
rStrm.Seek( nLinkPosInDataStrm );
SVBT32 nLen;
UInt32ToSVBT32( nCurrPos - nLinkPosInDataStrm, nLen );
@@ -1711,11 +1711,11 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
// write attributes of hyperlink character 0x01
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFFldVanish );
- aItems.Insert( (BYTE)0x81, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x81, aItems.Count() );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CPicLocation );
SwWW8Writer::InsUInt32( aItems, nLinkPosInDataStrm );
SwWW8Writer::InsUInt16( aItems, NS_sprm::LN_CFData );
- aItems.Insert( (BYTE)0x01, aItems.Count() );
+ aItems.Insert( (sal_uInt8)0x01, aItems.Count() );
}
//Technically we should probably Remove all attribs
@@ -1738,9 +1738,9 @@ static void InsertSpecialChar( WW8Export& rWrt, BYTE c,
aItems.GetData());
}
-String lcl_GetExpandedField(const SwField &rFld, SwDoc const& rDoc)
+String lcl_GetExpandedField(const SwField &rFld)
{
- String sRet(rFld.ExpandField(rDoc.IsClipBoard()));
+ String sRet(rFld.ExpandField(true));
//replace LF 0x0A with VT 0x0B
sRet.SearchAndReplaceAll(0x0A, 0x0B);
@@ -1781,7 +1781,7 @@ WW8_WrPlcFld* WW8Export::CurrentFieldPlc() const
}
void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
- const String& rFldCmd, BYTE nMode )
+ const String& rFldCmd, sal_uInt8 nMode )
{
bool bUnicode = IsUnicode();
WW8_WrPlcFld* pFldP = CurrentFieldPlc();
@@ -1790,11 +1790,11 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (WRITEFIELD_START & nMode)
{
- BYTE aFld13[2] = { 0x13, 0x00 }; // will change
+ sal_uInt8 aFld13[2] = { 0x13, 0x00 }; // will change
//#i3958#, Needed to make this field work correctly in Word 2000
if (eFldType == ww::eSHAPE)
aFld13[0] |= 0x80;
- aFld13[1] = static_cast< BYTE >(eFldType); // Typ nachtragen
+ aFld13[1] = static_cast< sal_uInt8 >(eFldType); // Typ nachtragen
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld13 );
InsertSpecialChar( *this, 0x13, 0, bIncludeEmptyPicLocation );
}
@@ -1824,7 +1824,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
// retrieve reference destionation - the name of the bookmark
String aLinkStr;
- const USHORT nSubType = pFld->GetSubType();
+ const sal_uInt16 nSubType = pFld->GetSubType();
const SwGetRefField& rRFld = *(static_cast<const SwGetRefField*>(pFld));
if ( nSubType == REF_SETREFATTR ||
nSubType == REF_BOOKMARK )
@@ -1847,7 +1847,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CMD_END & nMode)
{
- static const BYTE aFld14[2] = { 0x14, 0xff };
+ static const sal_uInt8 aFld14[2] = { 0x14, 0xff };
pFldP->Append( Fc2Cp( Strm().Tell() ), aFld14 );
pFldP->ResultAdded();
InsertSpecialChar( *this, 0x14, 0, bIncludeEmptyPicLocation );
@@ -1856,7 +1856,7 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
{
String sOut;
if( pFld )
- sOut = lcl_GetExpandedField(*pFld, *pDoc);
+ sOut = lcl_GetExpandedField(*pFld);
else
sOut = rFldCmd;
if( sOut.Len() )
@@ -1874,8 +1874,8 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- BYTE aArr[12];
- BYTE *pArr = aArr;
+ sal_uInt8 aArr[12];
+ sal_uInt8 *pArr = aArr;
if ( bWrtWW8 )
{
@@ -1903,14 +1903,14 @@ void WW8Export::OutputField( const SwField* pFld, ww::eField eFldType,
}
if (WRITEFIELD_CLOSE & nMode)
{
- BYTE aFld15[2] = { 0x15, 0x80 };
+ sal_uInt8 aFld15[2] = { 0x15, 0x80 };
if (pFld)
{
if (pFld->GetTyp()->Which() == RES_INPUTFLD &&
eFldType == ww::eFORMTEXT)
{
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
if (nSubType == REF_SEQUENCEFLD)
aFld15[0] |= (0x4 << 5);
@@ -1940,10 +1940,10 @@ void WW8Export::EndCommentOutput(const String& rName)
WRITEFIELD_CLOSE);
}
-USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
+sal_uInt16 MSWordExportBase::GetId( const SwTOXType& rTOXType )
{
void* p = (void*)&rTOXType;
- USHORT nRet = aTOXArr.GetPos( p );
+ sal_uInt16 nRet = aTOXArr.GetPos( p );
if( USHRT_MAX == nRet )
aTOXArr.Insert( p, nRet = aTOXArr.Count() );
return nRet;
@@ -1953,7 +1953,7 @@ USHORT MSWordExportBase::GetId( const SwTOXType& rTOXType )
// 2 - TabStop before PageNum,
// 3 - Text before PageNum - rTxt hold the text
// 4 - no Text and no TabStop before PageNum
-int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
+int lcl_CheckForm( const SwForm& rForm, sal_uInt8 nLvl, String& rText )
{
int nRet = 4;
rText.Erase();
@@ -2003,10 +2003,10 @@ int lcl_CheckForm( const SwForm& rForm, BYTE nLvl, String& rText )
return nRet;
}
-bool lcl_IsHyperlinked(const SwForm& rForm, USHORT nTOXLvl)
+bool lcl_IsHyperlinked(const SwForm& rForm, sal_uInt16 nTOXLvl)
{
bool bRes = false;
- for (USHORT nI = 1; nI < nTOXLvl; ++nI)
+ for (sal_uInt16 nI = 1; nI < nTOXLvl; ++nI)
{
// #i21237#
SwFormTokens aPattern = rForm.GetPattern(nI);
@@ -2058,7 +2058,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- for (BYTE n = 1; n <= 3; ++n)
+ for (sal_uInt8 n = 1; n <= 3; ++n)
{
String aTxt;
int nRet = ::lcl_CheckForm(pTOX->GetTOXForm(), n, aTxt);
@@ -2105,7 +2105,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
sStr = FieldString(eCode);
String sTOption;
- USHORT n, nTOXLvl = pTOX->GetLevel();
+ sal_uInt16 n, nTOXLvl = pTOX->GetLevel();
if( !nTOXLvl )
++nTOXLvl;
@@ -2161,12 +2161,12 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
// what is the minimum outline level (if any) filled by a
// non-standard style for that level, i.e. ignore headline
// styles 1-9 and find the lowest valid outline level
- BYTE nPosOfLowestNonStandardLvl = MAXLEVEL;
+ sal_uInt8 nPosOfLowestNonStandardLvl = MAXLEVEL;
const SwTxtFmtColls& rColls = *GetExport().pDoc->GetTxtFmtColls();
for( n = rColls.Count(); n; )
{
const SwTxtFmtColl* pColl = rColls[ --n ];
- USHORT nPoolId = pColl->GetPoolFmtId();
+ sal_uInt16 nPoolId = pColl->GetPoolFmtId();
if (
//Is a Non-Standard Outline Style
(RES_POOLCOLL_HEADLINE1 > nPoolId || RES_POOLCOLL_HEADLINE9 < nPoolId) &&
@@ -2176,11 +2176,11 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
(pColl->GetAssignedOutlineStyleLevel() < nPosOfLowestNonStandardLvl)
)
{
- nPosOfLowestNonStandardLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ nPosOfLowestNonStandardLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
}
}
- BYTE nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (BYTE)nTOXLvl;
+ sal_uInt8 nMaxMSAutoEvaluate = nPosOfLowestNonStandardLvl < nTOXLvl ? nPosOfLowestNonStandardLvl : (sal_uInt8)nTOXLvl;
//output \o 1-X where X is the highest normal outline style to be included in the toc
if ( nMaxMSAutoEvaluate )
@@ -2204,7 +2204,7 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
const SwTxtFmtColl* pColl = rColls[ --n ];
if (!pColl->IsAssignedToListLevelOfOutlineStyle())
continue;
- BYTE nTestLvl = ::sal::static_int_cast<BYTE>(pColl->GetAssignedOutlineStyleLevel());
+ sal_uInt8 nTestLvl = ::sal::static_int_cast<sal_uInt8>(pColl->GetAssignedOutlineStyleLevel());
if (nTestLvl < nTOXLvl && nTestLvl >= nMaxMSAutoEvaluate)
{
if( sTOption.Len() )
@@ -2245,24 +2245,24 @@ void AttributeOutputBase::StartTOX( const SwSection& rSect )
{
String aFillTxt;
- BYTE nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
+ sal_uInt8 nNoPgStt = MAXLEVEL, nNoPgEnd = MAXLEVEL;
bool bFirstFillTxt = true, bOnlyText = true;
for( n = 0; n < nTOXLvl; ++n )
{
String aTxt;
int nRet = ::lcl_CheckForm( pTOX->GetTOXForm(),
- static_cast< BYTE >(n+1), aTxt );
+ static_cast< sal_uInt8 >(n+1), aTxt );
if( 1 == nRet )
{
bOnlyText = false;
if( MAXLEVEL == nNoPgStt )
- nNoPgStt = static_cast< BYTE >(n+1);
+ nNoPgStt = static_cast< sal_uInt8 >(n+1);
}
else
{
if( MAXLEVEL != nNoPgStt &&
MAXLEVEL == nNoPgEnd )
- nNoPgEnd = BYTE(n);
+ nNoPgEnd = sal_uInt8(n);
bOnlyText = bOnlyText && 3 == nRet;
if( 3 == nRet || 4 == nRet )
@@ -2334,7 +2334,7 @@ bool MSWordExportBase::GetNumberFmt(const SwField& rFld, String& rStr)
// Returns a date or time format string by using the US NfKeywordTable
bool bHasFmt = false;
SvNumberFormatter* pNFmtr = pDoc->GetNumberFormatter();
- UINT32 nFmtIdx = rFld.GetFormat();
+ sal_uInt32 nFmtIdx = rFld.GetFormat();
const SvNumberformat* pNumFmt = pNFmtr->GetEntry( nFmtIdx );
if( pNumFmt )
{
@@ -2395,8 +2395,8 @@ void AttributeOutputBase::GetNumberPara( String& rStr, const SwField& rFld )
void WW8Export::WritePostItBegin( WW8Bytes* pOut )
{
- BYTE aArr[ 3 ];
- BYTE* pArr = aArr;
+ sal_uInt8 aArr[ 3 ];
+ sal_uInt8* pArr = aArr;
// sprmCFSpec true
if( bWrtWW8 )
@@ -2409,7 +2409,7 @@ void WW8Export::WritePostItBegin( WW8Bytes* pOut )
WriteChar( 0x05 ); // Annotation reference
if( pOut )
- pOut->Insert( aArr, static_cast< USHORT >(pArr - aArr), pOut->Count() );
+ pOut->Insert( aArr, static_cast< sal_uInt16 >(pArr - aArr), pOut->Count() );
else
pChpPlc->AppendFkpEntry( Strm().Tell(), static_cast< short >(pArr - aArr), aArr );
}
@@ -2432,7 +2432,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
if (m_rWW8Export.IsUnicode())
{
SwWW8Writer::WriteString16(m_rWW8Export.Strm(), sExpand, false);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
0x3C, 0x08, 0x1
};
@@ -2442,7 +2442,7 @@ void WW8AttributeOutput::HiddenField( const SwField& rFld )
{
SwWW8Writer::WriteString8(m_rWW8Export.Strm(), sExpand, false,
RTL_TEXTENCODING_MS_1252);
- static BYTE aArr[] =
+ static sal_uInt8 aArr[] =
{
92, 0x1
};
@@ -2455,7 +2455,7 @@ void WW8AttributeOutput::SetField( const SwField& rFld, ww::eField eType, const
const SwSetExpField* pSet=(const SwSetExpField*)(&rFld);
const String &rVar = pSet->GetPar2();
- ULONG nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
+ sal_uLong nFrom = m_rWW8Export.Fc2Cp(m_rWW8Export.Strm().Tell());
GetExport().OutputField(&rFld, eType, rCmd, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END);
@@ -2515,7 +2515,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
sStr.APPEND_CONST_ASC( "\" " );
m_rWW8Export.OutputField( &rFld, ww::eREF, sStr, WRITEFIELD_START |
WRITEFIELD_CMD_START | WRITEFIELD_CMD_END );
- String sVar = lcl_GetExpandedField( rFld, *GetExport().pDoc );
+ String sVar = lcl_GetExpandedField( rFld );
if ( sVar.Len() )
{
if ( m_rWW8Export.IsUnicode() )
@@ -2531,7 +2531,7 @@ void WW8AttributeOutput::RefField( const SwField &rFld, const String &rRef)
void WW8AttributeOutput::WriteExpand( const SwField* pFld )
{
- String sExpand( lcl_GetExpandedField( *pFld, *GetExport().pDoc ) );
+ String sExpand( lcl_GetExpandedField( *pFld ) );
if ( m_rWW8Export.IsUnicode() )
SwWW8Writer::WriteString16( m_rWW8Export.Strm(), sExpand, false );
else
@@ -2546,7 +2546,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
const SwField* pFld = rField.GetFld();
String sStr; // fuer optionale Parameter
bool bWriteExpand = false;
- USHORT nSubType = pFld->GetSubType();
+ sal_uInt16 nSubType = pFld->GetSubType();
switch (pFld->GetTyp()->Which())
{
@@ -2693,7 +2693,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
if (pDocInfoField != NULL)
{
- String sFieldname = pDocInfoField->GetCntnt(TRUE);
+ String sFieldname = pDocInfoField->GetFieldName();
xub_StrLen nIndex = sFieldname.Search(':');
if (nIndex != sFieldname.Len())
@@ -2889,7 +2889,7 @@ void AttributeOutputBase::TextField( const SwFmtFld& rField )
asian or western text based up on the first character and use the
font size of that script as our default.
*/
- USHORT nScript;
+ sal_uInt16 nScript;
if( pBreakIt->GetBreakIter().is() )
nScript = pBreakIt->GetBreakIter()->getScriptType( pFld->GetPar1(), 0);
else
@@ -2999,7 +2999,7 @@ void WW8AttributeOutput::ParaHyphenZone( const SvxHyphenZoneItem& rHyphenZone )
void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
{
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if ( m_rWW8Export.bWrtWW8 )
switch ( rScriptSpace.Which() )
{
@@ -3013,7 +3013,7 @@ void WW8AttributeOutput::ParaScriptSpace( const SfxBoolItem& rScriptSpace )
if( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( nId );
else
- m_rWW8Export.pO->Insert( (BYTE)nId, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)nId, m_rWW8Export.pO->Count() );
m_rWW8Export.pO->Insert( rScriptSpace.GetValue() ? 1 : 0,
m_rWW8Export.pO->Count() );
@@ -3040,7 +3040,7 @@ void WW8AttributeOutput::ParaVerticalAlign( const SvxParaVertAlignItem& rAlign )
m_rWW8Export.InsUInt16( NS_sprm::LN_PWAlignFont );
- INT16 nVal = rAlign.GetValue();
+ sal_Int16 nVal = rAlign.GetValue();
switch ( nVal )
{
case SvxParaVertAlignItem::BASELINE:
@@ -3080,7 +3080,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
{
if( bWrtWW8 )
{
- static const BYTE aSpec[] =
+ static const sal_uInt8 aSpec[] =
{
0x03, 0x6a, 0, 0, 0, 0, // sprmCObjLocation
0x55, 0x08, 1 // sprmCFSpec
@@ -3090,7 +3090,7 @@ void WW8Export::WriteFtnBegin( const SwFmtFtn& rFtn, WW8Bytes* pOutArr )
}
else
{
- static BYTE const aSpec[] =
+ static sal_uInt8 const aSpec[] =
{
117, 1, // sprmCFSpec
68, 4, 0, 0, 0, 0 // sprmCObjLocation
@@ -3167,7 +3167,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
bool bRet = true;
if( rFtn.GetTxtFtn() )
{
- USHORT nWh = static_cast< USHORT >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
+ sal_uInt16 nWh = static_cast< sal_uInt16 >(rFtn.IsEndNote() ? RES_END_AT_TXTEND
: RES_FTN_AT_TXTEND);
const SwSectionNode* pSectNd = rFtn.GetTxtFtn()->GetTxtNode().
FindSectionNode();
@@ -3185,7 +3185,7 @@ static bool lcl_IsAtTxtEnd(const SwFmtFtn& rFtn)
void AttributeOutputBase::TextFootnote( const SwFmtFtn& rFtn )
{
- USHORT nTyp;
+ sal_uInt16 nTyp;
if ( rFtn.IsEndNote() )
{
nTyp = REF_ENDNOTE;
@@ -3253,8 +3253,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
return;
m_rWW8Export.InsUInt16( NS_sprm::LN_CEastAsianLayout );
- m_rWW8Export.pO->Insert( (BYTE)0x06, m_rWW8Export.pO->Count() ); //len 6
- m_rWW8Export.pO->Insert( (BYTE)0x02, m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x06, m_rWW8Export.pO->Count() ); //len 6
+ m_rWW8Export.pO->Insert( (sal_uInt8)0x02, m_rWW8Export.pO->Count() );
sal_Unicode cStart = rTwoLines.GetStartBracket();
sal_Unicode cEnd = rTwoLines.GetEndBracket();
@@ -3273,7 +3273,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
ill effects.
*/
- USHORT nType;
+ sal_uInt16 nType;
if (!cStart && !cEnd)
nType = 0;
else if ((cStart == '{') || (cEnd == '}'))
@@ -3285,7 +3285,7 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
else
nType = 1;
m_rWW8Export.InsUInt16( nType );
- static const BYTE aZeroArr[ 3 ] = { 0, 0, 0 };
+ static const sal_uInt8 aZeroArr[ 3 ] = { 0, 0, 0 };
m_rWW8Export.pO->Insert( aZeroArr, 3, m_rWW8Export.pO->Count() );
}
}
@@ -3293,8 +3293,8 @@ void WW8AttributeOutput::CharTwoLines( const SvxTwoLinesItem& rTwoLines )
void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtNode* pTxtNd = 0;
- USHORT nNumId;
- BYTE nLvl = 0;
+ sal_uInt16 nNumId;
+ sal_uInt8 nLvl = 0;
if ( rNumRule.GetValue().Len() )
{
const SwNumRule* pRule = GetExport().pDoc->FindNumRulePtr(
@@ -3310,11 +3310,11 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
if( pTxtNd->IsCountedInList())
{
- nLvl = static_cast< BYTE >(pTxtNd->GetActualListLevel());
+ nLvl = static_cast< sal_uInt8 >(pTxtNd->GetActualListLevel());
if ( pTxtNd->IsListRestart() )
{
- USHORT nStartWith = static_cast< USHORT >( pTxtNd->GetActualListStartValue() );
+ sal_uInt16 nStartWith = static_cast< sal_uInt16 >( pTxtNd->GetActualListStartValue() );
nNumId = GetExport().DuplicateNumRule( pRule, nLvl, nStartWith );
if ( USHRT_MAX != nNumId )
++nNumId;
@@ -3333,7 +3333,7 @@ void AttributeOutputBase::ParaNumRule( const SwNumRuleItem& rNumRule )
{
const SwTxtFmtColl* pC = (SwTxtFmtColl*)GetExport().pOutFmtNode;
if ( pC && pC->IsAssignedToListLevelOfOutlineStyle() )
- nLvl = static_cast< BYTE >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
+ nLvl = static_cast< sal_uInt8 >( pC->GetAssignedOutlineStyleLevel() ); //<-end,zhaojianwei
}
}
}
@@ -3358,9 +3358,9 @@ void WW8AttributeOutput::ParaNumRule_Impl( const SwTxtNode* pTxtNd, sal_Int32 nL
{
// write sprmPIlvl and sprmPIlfo
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlvl );
- m_rWW8Export.pO->Insert( ::sal::static_int_cast<BYTE>(nLvl), m_rWW8Export.pO->Count() );
+ m_rWW8Export.pO->Insert( ::sal::static_int_cast<sal_uInt8>(nLvl), m_rWW8Export.pO->Count() );
SwWW8Writer::InsUInt16( *m_rWW8Export.pO, NS_sprm::LN_PIlfo );
- SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<UINT16>(nNumId) );
+ SwWW8Writer::InsUInt16( *m_rWW8Export.pO, ::sal::static_int_cast<sal_uInt16>(nNumId) );
}
else if ( pTxtNd && m_rWW8Export.Out_SwNum( pTxtNd ) ) // NumRules
m_rWW8Export.pSepx->SetNum( pTxtNd );
@@ -3383,7 +3383,7 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
m_rWW8Export.InsUInt16( NS_sprm::LN_PDxaWidth );
else
m_rWW8Export.pO->Insert( 28, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rSize.GetWidth() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rSize.GetWidth() );
}
if ( rSize.GetHeight() )
@@ -3394,12 +3394,12 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
else
m_rWW8Export.pO->Insert( 45, m_rWW8Export.pO->Count() );
- USHORT nH = 0;
+ sal_uInt16 nH = 0;
switch ( rSize.GetHeightSizeType() )
{
case ATT_VAR_SIZE: break;
- case ATT_FIX_SIZE: nH = (USHORT)rSize.GetHeight() & 0x7fff; break;
- default: nH = (USHORT)rSize.GetHeight() | 0x8000; break;
+ case ATT_FIX_SIZE: nH = (sal_uInt16)rSize.GetHeight() & 0x7fff; break;
+ default: nH = (sal_uInt16)rSize.GetHeight() | 0x8000; break;
}
m_rWW8Export.InsUInt16( nH );
}
@@ -3441,18 +3441,18 @@ void WW8AttributeOutput::FormatFrameSize( const SwFmtFrmSize& rSize )
// direkt nach Schreiben des CR gerufen werden.
// Rueckgabe: FilePos des ersetzten CRs + 1 oder 0 fuer nicht ersetzt
-ULONG WW8Export::ReplaceCr( BYTE nChar )
+sal_uLong WW8Export::ReplaceCr( sal_uInt8 nChar )
{
OSL_ENSURE( nChar, "gegen 0 ersetzt bringt WW97/95 zum Absturz" );
bool bReplaced = false;
SvStream& rStrm = Strm();
- ULONG nRetPos = 0, nPos = rStrm.Tell();
+ sal_uLong nRetPos = 0, nPos = rStrm.Tell();
//If there is at least two characters already output
- if (nPos - (IsUnicode() ? 2 : 1) >= ULONG(pFib->fcMin))
+ if (nPos - (IsUnicode() ? 2 : 1) >= sal_uLong(pFib->fcMin))
{
- BYTE nBCode=0;
- UINT16 nUCode=0;
+ sal_uInt8 nBCode=0;
+ sal_uInt16 nUCode=0;
rStrm.SeekRel(IsUnicode() ? -2 : -1);
if (IsUnicode())
@@ -3466,7 +3466,7 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
if (nUCode == 0x0d) // CR ?
{
if ((nChar == 0x0c) &&
- (nPos - (IsUnicode() ? 4 : 2) >= ULONG(pFib->fcMin)))
+ (nPos - (IsUnicode() ? 4 : 2) >= sal_uLong(pFib->fcMin)))
{
rStrm.SeekRel( IsUnicode() ? -4 : -2 );
if (IsUnicode())
@@ -3517,9 +3517,9 @@ ULONG WW8Export::ReplaceCr( BYTE nChar )
void WW8AttributeOutput::TableRowEnd(sal_uInt32 nDepth)
{
if ( nDepth == 1 )
- m_rWW8Export.WriteChar( (BYTE)0x07 );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x07 );
else if ( nDepth > 1 )
- m_rWW8Export.WriteChar( (BYTE)0x0d );
+ m_rWW8Export.WriteChar( (sal_uInt8)0x0d );
//Technically in a word document this is a different value for a row ends
//that are not row ends directly after a cell with a graphic. But it
@@ -3568,7 +3568,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
else if ( !GetExport().mpParentFrame )
{
- BYTE nC = 0;
+ sal_uInt8 nC = 0;
bool bBefore = false;
// #i76300# - Note: Can only be <true>, if <bBefore> equals <false>.
bool bCheckForFollowPageDesc = false;
@@ -3635,7 +3635,7 @@ void AttributeOutputBase::FormatBreak( const SvxFmtBreakItem& rBreak )
}
}
-void WW8AttributeOutput::SectionBreak( BYTE nC, const WW8_SepInfo* /*pSectionInfo*/ )
+void WW8AttributeOutput::SectionBreak( sal_uInt8 nC, const WW8_SepInfo* /*pSectionInfo*/ )
{
m_rWW8Export.ReplaceCr( nC );
}
@@ -3644,7 +3644,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
{
if ( m_rWW8Export.bOutPageDescs && m_rWW8Export.bWrtWW8 )
{
- UINT16 nGridType = 0;
+ sal_uInt16 nGridType = 0;
switch ( rGrid.GetGridType() )
{
default:
@@ -3665,7 +3665,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
m_rWW8Export.InsUInt16( NS_sprm::LN_SClm );
m_rWW8Export.InsUInt16( nGridType );
- UINT16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
+ sal_uInt16 nHeight = rGrid.GetBaseHeight() + rGrid.GetRubyHeight();
m_rWW8Export.InsUInt16( NS_sprm::LN_SDyaLinePitch );
m_rWW8Export.InsUInt16( nHeight );
@@ -3681,7 +3681,7 @@ void WW8AttributeOutput::FormatTextGrid( const SwTextGridItem& rGrid )
}
sal_uInt16 nPitch = rGrid.IsSquaredMode() ? rGrid.GetBaseHeight() :
rGrid.GetBaseWidth( );
- INT32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
+ sal_Int32 nCharSpace = ( nPitch - nPageCharSize ) * 4096 / 20;
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxtCharSpace );
m_rWW8Export.InsUInt32( nCharSpace );
@@ -3692,7 +3692,7 @@ void WW8AttributeOutput::FormatPaperBin( const SvxPaperBinItem& rPaperBin )
{
if ( m_rWW8Export.bOutPageDescs )
{
- USHORT nVal;
+ sal_uInt16 nVal;
switch ( rPaperBin.GetValue() )
{
case 0: nVal = 15; break; // Automatically select
@@ -3725,11 +3725,11 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
else
m_rWW8Export.pO->Insert( 49, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rLR.GetLeft() + rLR.GetRight() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // PageDescs
{
- USHORT nLDist, nRDist;
+ sal_uInt16 nLDist, nRDist;
const SfxPoolItem* pItem = m_rWW8Export.HasItem( RES_BOX );
if ( pItem )
{
@@ -3738,8 +3738,8 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
}
else
nLDist = nRDist = 0;
- nLDist = nLDist + (USHORT)rLR.GetLeft();
- nRDist = nRDist + (USHORT)rLR.GetRight();
+ nLDist = nLDist + (sal_uInt16)rLR.GetLeft();
+ nRDist = nRDist + (sal_uInt16)rLR.GetRight();
// sprmSDxaLeft
if( m_rWW8Export.bWrtWW8 )
@@ -3761,24 +3761,24 @@ void WW8AttributeOutput::FormatLRSpace( const SvxLRSpaceItem& rLR )
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845E ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
else
{
m_rWW8Export.pO->Insert( 17, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetTxtLeft() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetTxtLeft() );
}
// sprmPDxaRight
if( m_rWW8Export.bWrtWW8 )
{
m_rWW8Export.InsUInt16( 0x845D ); //asian version ?
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
else
{
m_rWW8Export.pO->Insert( 16, m_rWW8Export.pO->Count() );
- m_rWW8Export.InsUInt16( (USHORT)rLR.GetRight() );
+ m_rWW8Export.InsUInt16( (sal_uInt16)rLR.GetRight() );
}
// sprmPDxaLeft1
@@ -3807,7 +3807,7 @@ void WW8AttributeOutput::FormatULSpace( const SvxULSpaceItem& rUL )
else
m_rWW8Export.pO->Insert( 48, m_rWW8Export.pO->Count() );
// Mittelwert nehmen, da WW nur 1 Wert kennt
- m_rWW8Export.InsUInt16( (USHORT) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
+ m_rWW8Export.InsUInt16( (sal_uInt16) ( ( rUL.GetUpper() + rUL.GetLower() ) / 2 ) );
}
else if ( m_rWW8Export.bOutPageDescs ) // Page-UL
{
@@ -3969,7 +3969,7 @@ void WW8AttributeOutput::FormatAnchor( const SwFmtAnchor& rAnchor )
if ( m_rWW8Export.bOutFlyFrmAttrs )
{
- BYTE nP = 0;
+ sal_uInt8 nP = 0;
switch ( rAnchor.GetAnchorId() )
{
case FLY_AT_PAGE:
@@ -4026,14 +4026,14 @@ void WW8AttributeOutput::FormatBackground( const SvxBrushItem& rBrush )
}
WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
- USHORT nDist, bool bShadow)
+ sal_uInt16 nDist, bool bShadow)
{
// M.M. This function writes out border lines to the word format similar to
// what SwRTFWriter::OutRTFBorder does in the RTF filter Eventually it
// would be nice if all this functionality was in the one place
WW8_BRC aBrc;
- UINT16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
- BYTE brcType = 0, nColCode = 0;
+ sal_uInt16 nWidth = rLine.GetInWidth() + rLine.GetOutWidth();
+ sal_uInt8 brcType = 0, nColCode = 0;
if( nWidth ) // Linie ?
{
@@ -4094,17 +4094,17 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
// BRC.dxpSpace
- USHORT nLDist = nDist;
+ sal_uInt16 nLDist = nDist;
nLDist /= 20; // Masseinheit : pt
if( nLDist > 0x1f )
nLDist = 0x1f;
if( bWrtWW8 )
{
- aBrc.aBits1[0] = BYTE(nWidth);
+ aBrc.aBits1[0] = sal_uInt8(nWidth);
aBrc.aBits1[1] = brcType;
aBrc.aBits2[0] = nColCode;
- aBrc.aBits2[1] = BYTE(nLDist);
+ aBrc.aBits2[1] = sal_uInt8(nLDist);
// fShadow, keine weiteren Einstellungen im WW moeglich
if( bShadow )
@@ -4112,7 +4112,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
}
else
{
- USHORT aBits = nWidth + ( brcType << 3 );
+ sal_uInt16 aBits = nWidth + ( brcType << 3 );
aBits |= (nColCode & 0x1f) << 6;
aBits |= nLDist << 11;
// fShadow, keine weiteren Einstellungen im WW moeglich
@@ -4129,7 +4129,7 @@ WW8_BRC WW8Export::TranslateBorderLine(const SvxBorderLine& rLine,
// Wenn nSprmNo == 0, dann wird der Opcode nicht ausgegeben.
// bShadow darf bei Tabellenzellen *nicht* gesetzt sein !
void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
- USHORT nDist, sal_uInt16 nSprmNo, bool bShadow)
+ sal_uInt16 nDist, sal_uInt16 nSprmNo, bool bShadow)
{
OSL_ENSURE( ( nSprmNo == 0 ) ||
( nSprmNo >= 38 && nSprmNo <= 41 ) ||
@@ -4155,7 +4155,7 @@ void WW8Export::Out_BorderLine(WW8Bytes& rO, const SvxBorderLine* pLine,
{
// WW95-SprmIds
if ( nSprmNo != 0 )
- rO.Insert( (BYTE)( nSprmNo ), rO.Count() );
+ rO.Insert( (sal_uInt8)( nSprmNo ), rO.Count() );
rO.Insert( aBrc.aBits1, 2, rO.Count() );
}
}
@@ -4167,7 +4167,7 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
if ( bOutPageDescs && !bWrtWW8 )
return; // no page ouline in WW6
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
@@ -4184,8 +4184,8 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
38, 39, 40, 41
};
- const USHORT* pBrd = aBorders;
- for( USHORT i = 0; i < 4; ++i, ++pBrd )
+ const sal_uInt16* pBrd = aBorders;
+ for( sal_uInt16 i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn = rBox.GetLine( *pBrd );
@@ -4210,13 +4210,13 @@ void WW8Export::Out_SwFmtBox(const SvxBoxItem& rBox, bool bShadow)
void WW8Export::Out_SwFmtTableBox( WW8Bytes& rO, const SvxBoxItem * pBox )
{
// moeglich und vielleicht besser waere 0xffff
- static const USHORT aBorders[] =
+ static const sal_uInt16 aBorders[] =
{
BOX_LINE_TOP, BOX_LINE_LEFT, BOX_LINE_BOTTOM, BOX_LINE_RIGHT
};
static const SvxBorderLine aBorderLine;
- const USHORT* pBrd = aBorders;
+ const sal_uInt16* pBrd = aBorders;
for( int i = 0; i < 4; ++i, ++pBrd )
{
const SvxBorderLine* pLn;
@@ -4260,7 +4260,7 @@ SwTwips WW8Export::CurrentPageWidth(SwTwips &rLeft, SwTwips &rRight) const
return nPageSize;
}
-void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
+void WW8AttributeOutput::FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize )
{
// CColumns
if ( m_rWW8Export.bWrtWW8 )
@@ -4295,17 +4295,17 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
if ( !bEven )
{
- for ( USHORT n = 0; n < nCols; ++n )
+ for ( sal_uInt16 n = 0; n < nCols; ++n )
{
//sprmSDxaColWidth
if ( m_rWW8Export.bWrtWW8 )
m_rWW8Export.InsUInt16( NS_sprm::LN_SDxaColWidth );
else
m_rWW8Export.pO->Insert( 136, m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n, m_rWW8Export.pO->Count( ) );
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n, m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rCol.
CalcPrtColWidth( n,
- ( USHORT ) nPageSize ) );
+ ( sal_uInt16 ) nPageSize ) );
if ( n + 1 != nCols )
{
@@ -4315,7 +4315,7 @@ void WW8AttributeOutput::FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol
else
m_rWW8Export.pO->Insert( 137,
m_rWW8Export.pO->Count( ) );
- m_rWW8Export.pO->Insert( ( BYTE ) n,
+ m_rWW8Export.pO->Insert( ( sal_uInt8 ) n,
m_rWW8Export.pO->Count( ) );
m_rWW8Export.InsUInt16( rColumns[n]->GetRight( ) +
rColumns[n + 1]->GetLeft( ) );
@@ -4328,7 +4328,7 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
{
const SwColumns& rColumns = rCol.GetColumns();
- USHORT nCols = rColumns.Count();
+ sal_uInt16 nCols = rColumns.Count();
if ( 1 < nCols && !GetExport( ).bOutFlyFrmAttrs )
{
// dann besorge mal die Seitenbreite ohne Raender !!
@@ -4370,12 +4370,12 @@ void AttributeOutputBase::FormatColumns( const SwFmtCol& rCol )
// Nachsehen, ob alle Spalten gleich sind
bool bEven = true;
- USHORT n;
- USHORT nColWidth = rCol.CalcPrtColWidth( 0, (USHORT)nPageSize );
+ sal_uInt16 n;
+ sal_uInt16 nColWidth = rCol.CalcPrtColWidth( 0, (sal_uInt16)nPageSize );
for ( n = 1; n < nCols; n++ )
{
short nDiff = nColWidth -
- rCol.CalcPrtColWidth( n, (USHORT)nPageSize );
+ rCol.CalcPrtColWidth( n, (sal_uInt16)nPageSize );
if ( nDiff > 10 || nDiff < -10 ) // Toleranz: 10 tw
{
@@ -4495,8 +4495,8 @@ void AttributeOutputBase::ParaLineSpacing( const SvxLineSpacingItem& rSpacing )
void WW8AttributeOutput::ParaAdjust( const SvxAdjustItem& rAdjust )
{
// sprmPJc
- BYTE nAdj = 255;
- BYTE nAdjBiDi = 255;
+ sal_uInt8 nAdj = 255;
+ sal_uInt8 nAdjBiDi = 255;
switch ( rAdjust.GetAdjust() )
{
case SVX_ADJUST_LEFT:
@@ -4573,7 +4573,7 @@ void WW8AttributeOutput::FormatFrameDirection( const SvxFrameDirectionItem& rDir
if ( !m_rWW8Export.bWrtWW8 ) //8+ only
return;
- UINT16 nTextFlow=0;
+ sal_uInt16 nTextFlow=0;
bool bBiDi = false;
short nDir = rDirection.GetValue();
@@ -4662,9 +4662,9 @@ void WW8AttributeOutput::ParaWidows( const SvxWidowsItem& rWidows )
class SwWW8WrTabu
{
- BYTE* pDel; // DelArray
- BYTE* pAddPos; // AddPos-Array
- BYTE* pAddTyp; // AddTyp-Array
+ sal_uInt8* pDel; // DelArray
+ sal_uInt8* pAddPos; // AddPos-Array
+ sal_uInt8* pAddTyp; // AddTyp-Array
sal_uInt16 nAdd; // so viele Tabs kommen hinzu
sal_uInt16 nDel; // so viele Tabs fallen weg
public:
@@ -4679,9 +4679,9 @@ public:
SwWW8WrTabu::SwWW8WrTabu(sal_uInt16 nDelMax, sal_uInt16 nAddMax)
: nAdd(0), nDel(0)
{
- pDel = nDelMax ? new BYTE[nDelMax * 2] : 0;
- pAddPos = new BYTE[nAddMax * 2];
- pAddTyp = new BYTE[nAddMax];
+ pDel = nDelMax ? new sal_uInt8[nDelMax * 2] : 0;
+ pAddPos = new sal_uInt8[nAddMax * 2];
+ pAddTyp = new sal_uInt8[nAddMax];
}
SwWW8WrTabu::~SwWW8WrTabu()
@@ -4699,7 +4699,7 @@ void SwWW8WrTabu::Add(const SvxTabStop & rTS, long nAdjustment)
pAddPos + (nAdd * 2));
// Tab-Typ eintragen
- BYTE nPara = 0;
+ sal_uInt8 nPara = 0;
switch (rTS.GetAdjustment())
{
case SVX_TAB_ADJUST_RIGHT:
@@ -4788,7 +4788,7 @@ static void ParaTabStopAdd( WW8Export& rWrt, const SvxTabStopItem& rTStops,
{
SwWW8WrTabu aTab( 0, rTStops.Count());
- for( USHORT n = 0; n < rTStops.Count(); n++ )
+ for( sal_uInt16 n = 0; n < rTStops.Count(); n++ )
{
const SvxTabStop& rTS = rTStops[n];
// Def-Tabs ignorieren
@@ -4814,8 +4814,8 @@ static void ParaTabStopDelAdd( WW8Export& rWrt, const SvxTabStopItem& rTStyle,
{
SwWW8WrTabu aTab(rTStyle.Count(), rTNew.Count());
- USHORT nO = 0; // rTStyle Index
- USHORT nN = 0; // rTNew Index
+ sal_uInt16 nO = 0; // rTStyle Index
+ sal_uInt16 nN = 0; // rTNew Index
do {
const SvxTabStop* pTO;
@@ -5159,7 +5159,7 @@ void AttributeOutputBase::OutputItem( const SfxPoolItem& rHt )
}
}
-void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep, BOOL bTestForDefault )
+void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, sal_Bool bDeep, sal_Bool bTestForDefault )
{
// based on OutputItemSet() from wrt_fn.cxx
@@ -5190,7 +5190,7 @@ void AttributeOutputBase::OutputStyleItemSet( const SfxItemSet& rSet, BOOL bDeep
else
{
SfxWhichIter aIter( *pSet );
- USHORT nWhich = aIter.FirstWhich();
+ sal_uInt16 nWhich = aIter.FirstWhich();
while ( nWhich )
{
if ( SFX_ITEM_SET == pSet->GetItemState( nWhich, bDeep, &pItem ) &&
diff --git a/sw/source/filter/ww8/ww8attributeoutput.hxx b/sw/source/filter/ww8/ww8attributeoutput.hxx
index cfced61d6371..fa9c1703e3b7 100644
--- a/sw/source/filter/ww8/ww8attributeoutput.hxx
+++ b/sw/source/filter/ww8/ww8attributeoutput.hxx
@@ -91,7 +91,7 @@ public:
/// Output redlining.
virtual void Redline( const SwRedlineData* pRedline );
- virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, USHORT nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
+ virtual void FormatDrop( const SwTxtNode& rNode, const SwFmtDrop &rSwFmtDrop, sal_uInt16 nStyle, ww8::WW8TableNodeInfo::Pointer_t pTextNodeInfo, ww8::WW8TableNodeInfoInner::Pointer_t pTextNodeInfoInner );
/// Output FKP (Formatted disK Page) - necessary for binary formats only.
/// FIXME having it in AttributeOutputBase is probably a hack, it
@@ -99,7 +99,7 @@ public:
virtual void OutputFKP();
/// Output style.
- virtual void ParagraphStyle( USHORT nStyle );
+ virtual void ParagraphStyle( sal_uInt16 nStyle );
virtual void TableInfoCell( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
virtual void TableInfoRow( ww8::WW8TableNodeInfoInner::Pointer_t pTableTextNodeInfo );
@@ -120,27 +120,27 @@ public:
virtual void StartStyles();
/// End of the styles table.
- virtual void EndStyles( USHORT nNumberOfStyles );
+ virtual void EndStyles( sal_uInt16 nNumberOfStyles );
/// Write default style.
- virtual void DefaultStyle( USHORT nStyle );
+ virtual void DefaultStyle( sal_uInt16 nStyle );
/// Start of a style in the styles table.
virtual void StartStyle( const String& rName, bool bPapFmt,
- USHORT nBase, USHORT nNext, USHORT nWwIdi, USHORT nId,
+ sal_uInt16 nBase, sal_uInt16 nNext, sal_uInt16 nWwIdi, sal_uInt16 nId,
bool bAutoUpdate );
/// End of a style in the styles table.
virtual void EndStyle();
/// Start of (paragraph or run) properties of a style.
- virtual void StartStyleProperties( bool bParProp, USHORT nStyle );
+ virtual void StartStyleProperties( bool bParProp, sal_uInt16 nStyle );
/// End of (paragraph or run) properties of a style.
virtual void EndStyleProperties( bool bParProp );
/// Numbering rule and Id.
- virtual void OutlineNumbering( BYTE nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
+ virtual void OutlineNumbering( sal_uInt8 nLvl, const SwNumFmt &rNFmt, const SwFmt &rFmt );
/// Page break
/// As a paragraph property - the paragraph should be on the next page.
@@ -148,7 +148,7 @@ public:
/// Write a section break
/// msword::ColumnBreak or msword::PageBreak
- virtual void SectionBreak( BYTE nC, const WW8_SepInfo* pSectionInfo = NULL );
+ virtual void SectionBreak( sal_uInt8 nC, const WW8_SepInfo* pSectionInfo = NULL );
/// Start of the section properties.
virtual void StartSection();
@@ -162,7 +162,7 @@ public:
virtual void SectionFormProtection( bool bProtected );
/// Numbering of the lines in the document.
- virtual void SectionLineNumbering( ULONG nRestartNo, const SwLineNumberInfo& rLnNumInfo );
+ virtual void SectionLineNumbering( sal_uLong nRestartNo, const SwLineNumberInfo& rLnNumInfo );
/// Has different headers/footers for the title page.
virtual void SectionTitlePage();
@@ -176,24 +176,24 @@ public:
/// The style of the page numbers.
///
/// nPageRestartNumberr being 0 means no restart.
- virtual void SectionPageNumbering( USHORT nNumType, USHORT nPageRestartNumber );
+ virtual void SectionPageNumbering( sal_uInt16 nNumType, sal_uInt16 nPageRestartNumber );
/// The type of breaking.
- virtual void SectionType( BYTE nBreakCode );
+ virtual void SectionType( sal_uInt8 nBreakCode );
/// Special header/footer flags, needed for old versions only.
- virtual void SectionWW6HeaderFooterFlags( BYTE nHeadFootFlags );
+ virtual void SectionWW6HeaderFooterFlags( sal_uInt8 nHeadFootFlags );
/// Definition of a numbering instance.
- virtual void NumberingDefinition( USHORT nId, const SwNumRule &rRule );
+ virtual void NumberingDefinition( sal_uInt16 nId, const SwNumRule &rRule );
/// All the numbering level information.
- virtual void NumberingLevel( BYTE nLevel,
- USHORT nStart,
- USHORT nNumberingType,
+ virtual void NumberingLevel( sal_uInt8 nLevel,
+ sal_uInt16 nStart,
+ sal_uInt16 nNumberingType,
SvxAdjust eAdjust,
- const BYTE *pNumLvlPos,
- BYTE nFollow,
+ const sal_uInt8 *pNumLvlPos,
+ sal_uInt8 nFollow,
const wwFont *pFont,
const SfxItemSet *pOutSet,
sal_Int16 nIndentAt,
@@ -371,7 +371,7 @@ protected:
virtual void FormatBox( const SvxBoxItem& );
/// Sfx item RES_COL
- virtual void FormatColumns_Impl( USHORT nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
+ virtual void FormatColumns_Impl( sal_uInt16 nCols, const SwFmtCol & rCol, bool bEven, SwTwips nPageSize );
/// Sfx item RES_KEEP
virtual void FormatKeep( const SvxFmtKeepItem& );
@@ -403,24 +403,24 @@ protected:
///
/// We have to remember these positions between the StartStyle() and
/// EndStyle().
- USHORT nPOPosStdLen1, nPOPosStdLen2;
+ sal_uInt16 nPOPosStdLen1, nPOPosStdLen2;
/// For output of styles.
///
/// We have to remember this position between StartStyleProperties() and
/// EndStyleProperties().
- USHORT m_nStyleStartSize, m_nStyleLenPos;
+ sal_uInt16 m_nStyleStartSize, m_nStyleLenPos;
/// For output of styles.
///
/// Used between StartStyles() and EndStyles().
- ULONG m_nStyAnzPos;
+ sal_uLong m_nStyAnzPos;
/// For output of run properties.
///
/// We have to remember the number of field results, and do not export end
/// of the field results if we were forced to split text.
- USHORT m_nFieldResults;
+ sal_uInt16 m_nFieldResults;
public:
WW8AttributeOutput( WW8Export &rWW8Export ) : AttributeOutputBase(), m_rWW8Export( rWW8Export ) {}
@@ -432,10 +432,10 @@ public:
protected:
/// Output the bold etc. attributes
- void OutputWW8Attribute( BYTE nId, bool bVal );
+ void OutputWW8Attribute( sal_uInt8 nId, bool bVal );
/// Output the bold etc. attributes, the Complex Text Layout version
- void OutputWW8AttributeCTL( BYTE nId, bool bVal );
+ void OutputWW8AttributeCTL( sal_uInt8 nId, bool bVal );
};
diff --git a/sw/source/filter/ww8/ww8glsy.cxx b/sw/source/filter/ww8/ww8glsy.cxx
index 3dc151feb782..380b38a34411 100644
--- a/sw/source/filter/ww8/ww8glsy.cxx
+++ b/sw/source/filter/ww8/ww8glsy.cxx
@@ -45,7 +45,7 @@
#include "ww8par.hxx"
-WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
+WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, sal_uInt8 nVersion,
SvStorage *pStg)
: pGlossary(0), rStrm(refStrm), xStg(pStg), nStrings(0)
{
@@ -69,7 +69,7 @@ WW8Glossary::WW8Glossary(SvStorageStreamRef &refStrm, BYTE nVersion,
bool WW8Glossary::HasBareGraphicEnd(SwDoc *pDoc,SwNodeIndex &rIdx)
{
bool bRet=false;
- for( USHORT nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
+ for( sal_uInt16 nCnt = pDoc->GetSpzFrmFmts()->Count(); nCnt; )
{
SwFrmFmt* pFrmFmt = (*pDoc->GetSpzFrmFmts())[ --nCnt ];
if ( RES_FLYFRMFMT != pFrmFmt->Which() &&
@@ -120,7 +120,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
{
SwTxtFmtColl* pColl = pD->GetTxtCollFromPool
(RES_POOLCOLL_STANDARD, false);
- USHORT nGlosEntry = 0;
+ sal_uInt16 nGlosEntry = 0;
SwCntntNode* pCNd = 0;
do {
SwPaM aPam( aStart );
@@ -154,7 +154,7 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// sttbfglsystyle list that this entry belongs to. Unused at the
// moment
const ww::bytes &rData = rExtra[nGlosEntry];
- USHORT n = SVBT16ToShort( &(rData[2]) );
+ sal_uInt16 n = SVBT16ToShort( &(rData[2]) );
if(n != 0xFFFF)
{
rBlocks.ClearDoc();
@@ -164,9 +164,9 @@ bool WW8Glossary::MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks,
// Need to check make sure the shortcut is not already being used
xub_StrLen nStart = 0;
- USHORT nCurPos = rBlocks.GetIndex( sShortcut );
+ sal_uInt16 nCurPos = rBlocks.GetIndex( sShortcut );
xub_StrLen nLen = sShortcut.Len();
- while( (USHORT)-1 != nCurPos )
+ while( (sal_uInt16)-1 != nCurPos )
{
sShortcut.Erase( nLen ) +=
String::CreateFromInt32( ++nStart ); // add an Number to it
@@ -217,9 +217,9 @@ bool WW8Glossary::Load( SwTextBlocks &rBlocks, bool bSaveRelFile )
rStrm->Seek(0);
- if ( 0 != (nStrings = static_cast< USHORT >(aStrings.size())))
+ if ( 0 != (nStrings = static_cast< sal_uInt16 >(aStrings.size())))
{
- SfxObjectShellRef xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
+ SfxObjectShellLock xDocSh(new SwDocShell(SFX_CREATE_MODE_INTERNAL));
if (xDocSh->DoInitNew(0))
{
SwDoc *pD = ((SwDocShell*)(&xDocSh))->GetDoc();
@@ -256,11 +256,11 @@ bool WW8GlossaryFib::IsGlossaryFib()
return fGlsy;
}
-UINT32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
+sal_uInt32 WW8GlossaryFib::FindGlossaryFibOffset(SvStream & /* rTableStrm */,
SvStream & /* rStrm */,
const WW8Fib &rFib)
{
- UINT32 nGlossaryFibOffset = 0;
+ sal_uInt32 nGlossaryFibOffset = 0;
if ( rFib.fDot ) // its a template
{
if ( rFib.pnNext )
diff --git a/sw/source/filter/ww8/ww8glsy.hxx b/sw/source/filter/ww8/ww8glsy.hxx
index c2d0a6ca64c5..fe7b4a33bf63 100644
--- a/sw/source/filter/ww8/ww8glsy.hxx
+++ b/sw/source/filter/ww8/ww8glsy.hxx
@@ -43,12 +43,12 @@ class SwNodeIndex;
class WW8GlossaryFib : public WW8Fib
{
public:
- WW8GlossaryFib( SvStream& rStrm, BYTE nWantedVersion ,
+ WW8GlossaryFib( SvStream& rStrm, sal_uInt8 nWantedVersion ,
SvStream& rTableStrm, const WW8Fib &rFib) : WW8Fib(rStrm,
nWantedVersion,FindGlossaryFibOffset(rTableStrm,rStrm,rFib)) {}
bool IsGlossaryFib();
private:
- UINT32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
+ sal_uInt32 FindGlossaryFibOffset(SvStream &rTableStrm,SvStream &rStrm,
const WW8Fib &rFib);
};
@@ -65,18 +65,18 @@ private:
class WW8Glossary
{
public:
- WW8Glossary( SvStorageStreamRef &refStrm, BYTE nVersion, SvStorage *pStg=0);
+ WW8Glossary( SvStorageStreamRef &refStrm, sal_uInt8 nVersion, SvStorage *pStg=0);
bool Load( SwTextBlocks &rBlocks, bool bSaveRelFile );
~WW8Glossary() { delete pGlossary; }
WW8GlossaryFib *GetFib() { return pGlossary; }
- USHORT GetNoStrings() const { return nStrings; }
+ sal_uInt16 GetNoStrings() const { return nStrings; }
private:
WW8GlossaryFib *pGlossary;
SvStorageStreamRef xTableStream;
SvStorageStreamRef &rStrm;
SvStorageRef xStg;
- USHORT nStrings;
+ sal_uInt16 nStrings;
bool MakeEntries(SwDoc *pD, SwTextBlocks &rBlocks, bool bSaveRelFile,
const ::std::vector<String>& rStrings,
diff --git a/sw/source/filter/ww8/ww8graf.cxx b/sw/source/filter/ww8/ww8graf.cxx
index 8f02c97302b5..047b3ace270c 100644
--- a/sw/source/filter/ww8/ww8graf.cxx
+++ b/sw/source/filter/ww8/ww8graf.cxx
@@ -152,7 +152,7 @@ Color WW8TransCol(SVBT32 nWC)
if (nWC[3] & 0x1)
{
//Special colour gray
- BYTE u = (BYTE)( (ULONG)( 200 - nWC[0] ) * 256 / 200 );
+ sal_uInt8 u = (sal_uInt8)( (sal_uLong)( 200 - nWC[0] ) * 256 / 200 );
return Color(u, u, u);
}
@@ -221,7 +221,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
if( SVBT16ToShort( rL.lnps ) >= 1
&& SVBT16ToShort(rL.lnps ) <= 4 ){ // LinienStil
rSet.Put( XLineStyleItem( XLINE_DASH ) );
- INT16 nLen = SVBT16ToShort( rL.lnpw );
+ sal_Int16 nLen = SVBT16ToShort( rL.lnpw );
XDash aD( XDASH_RECT, 1, 2 * nLen, 1, 5 * nLen, 5 * nLen );
switch( SVBT16ToShort( rL.lnps ) ){
case 1: aD.SetDots( 0 ); // Dash
@@ -253,7 +253,7 @@ static void SetStdAttr( SfxItemSet& rSet, WW8_DP_LINETYPE& rL,
static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{
- static BYTE nPatA[] =
+ static sal_uInt8 nPatA[] =
{
0, 0, 5, 10, 20, 25, 30, 40, 50, 60, 70, 75, 80,
90, 50, 50, 50, 50, 50, 50, 33, 33, 33, 33, 33, 33
@@ -274,12 +274,12 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
{ // Brush -> Farbmischung
Color aB( WW8TransCol( rFill.dlpcBg ) );
Color aF( WW8TransCol( rFill.dlpcFg ) );
- aB.SetRed( (BYTE)( ( (ULONG)aF.GetRed() * nPatA[nPat]
- + (ULONG)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetGreen( (BYTE)( ( (ULONG)aF.GetGreen() * nPatA[nPat]
- + (ULONG)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
- aB.SetBlue( (BYTE)( ( (ULONG)aF.GetBlue() * nPatA[nPat]
- + (ULONG)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetRed( (sal_uInt8)( ( (sal_uLong)aF.GetRed() * nPatA[nPat]
+ + (sal_uLong)aB.GetRed() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetGreen( (sal_uInt8)( ( (sal_uLong)aF.GetGreen() * nPatA[nPat]
+ + (sal_uLong)aB.GetGreen() * ( 100 - nPatA[nPat] ) ) / 100 ) );
+ aB.SetBlue( (sal_uInt8)( ( (sal_uLong)aF.GetBlue() * nPatA[nPat]
+ + (sal_uLong)aB.GetBlue() * ( 100 - nPatA[nPat] ) ) / 100 ) );
rSet.Put( XFillColorItem( aEmptyStr, aB ) );
}
}
@@ -288,7 +288,7 @@ static void SetFill( SfxItemSet& rSet, WW8_DP_FILL& rFill )
static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
WW8_DP_LINETYPE& rLt )
{
- UINT16 aSB = SVBT16ToShort( rLe.aStartBits );
+ sal_uInt16 aSB = SVBT16ToShort( rLe.aStartBits );
if( aSB & 0x3 )
{
::basegfx::B2DPolygon aPolygon;
@@ -297,14 +297,14 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineEndItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aSB >> 2 & 0x3 ) + ( aSB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineEndWidthItem(nSiz));
rSet.Put(XLineEndCenterItem(false));
}
- UINT16 aEB = SVBT16ToShort( rLe.aEndBits );
+ sal_uInt16 aEB = SVBT16ToShort( rLe.aEndBits );
if( aEB & 0x3 ){
::basegfx::B2DPolygon aPolygon;
aPolygon.append(::basegfx::B2DPoint(0.0, 330.0));
@@ -312,7 +312,7 @@ static void SetLineEndAttr( SfxItemSet& rSet, WW8_DP_LINEEND& rLe,
aPolygon.append(::basegfx::B2DPoint(200.0, 330.0));
aPolygon.setClosed(true);
rSet.Put( XLineStartItem( aEmptyStr, ::basegfx::B2DPolyPolygon(aPolygon) ) );
- USHORT nSiz = SVBT16ToShort( rLt.lnpw )
+ sal_uInt16 nSiz = SVBT16ToShort( rLt.lnpw )
* ( ( aEB >> 2 & 0x3 ) + ( aEB >> 4 & 0x3 ) );
if( nSiz < 220 ) nSiz = 220;
rSet.Put(XLineStartWidthItem(nSiz));
@@ -334,13 +334,13 @@ SdrObject* SwWW8ImplReader::ReadLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
Point& rP0 = aP[0];
Point& rP1 = aP[1];
- rP0.X() = (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
- rP0.Y() = (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
+ rP0.X() = (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2;
+ rP0.Y() = (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2;
rP1 = rP0;
- rP0.X() += (INT16)SVBT16ToShort( aLine.xaStart );
- rP0.Y() += (INT16)SVBT16ToShort( aLine.yaStart );
- rP1.X() += (INT16)SVBT16ToShort( aLine.xaEnd );
- rP1.Y() += (INT16)SVBT16ToShort( aLine.yaEnd );
+ rP0.X() += (sal_Int16)SVBT16ToShort( aLine.xaStart );
+ rP0.Y() += (sal_Int16)SVBT16ToShort( aLine.yaStart );
+ rP1.X() += (sal_Int16)SVBT16ToShort( aLine.xaEnd );
+ rP1.Y() += (sal_Int16)SVBT16ToShort( aLine.yaEnd );
}
::basegfx::B2DPolygon aPolygon;
@@ -362,11 +362,11 @@ SdrObject* SwWW8ImplReader::ReadRect( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aRect, sizeof( aRect ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( Rectangle( aP0, aP1 ) );
@@ -384,11 +384,11 @@ SdrObject* SwWW8ImplReader::ReadElipse( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aElipse, sizeof( aElipse ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrCircObj( OBJ_CIRC, Rectangle( aP0, aP1 ) );
@@ -406,22 +406,22 @@ SdrObject* SwWW8ImplReader::ReadArc( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aArc, sizeof( aArc ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa ) * 2;
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya ) * 2;
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa ) * 2;
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya ) * 2;
short nA[] = { 2, 3, 1, 0 };
short nW = nA[ ( ( SVBT8ToByte( aArc.fLeft ) & 1 ) << 1 )
+ ( SVBT8ToByte( aArc.fUp ) & 1 ) ];
if( !SVBT8ToByte( aArc.fLeft ) ){
- aP0.Y() -= (INT16)SVBT16ToShort( pHd->dya );
- aP1.Y() -= (INT16)SVBT16ToShort( pHd->dya );
+ aP0.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
+ aP1.Y() -= (sal_Int16)SVBT16ToShort( pHd->dya );
}
if( SVBT8ToByte( aArc.fUp ) ){
- aP0.X() -= (INT16)SVBT16ToShort( pHd->dxa );
- aP1.X() -= (INT16)SVBT16ToShort( pHd->dxa );
+ aP0.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.X() -= (sal_Int16)SVBT16ToShort( pHd->dxa );
}
SdrObject* pObj = new SdrCircObj( OBJ_SECT, Rectangle( aP0, aP1 ),
@@ -441,18 +441,18 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aPoly, sizeof( aPoly ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aPoly.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
Polygon aP( nCount );
Point aPt;
- USHORT i;
+ sal_uInt16 i;
for( i=0; i<nCount; i++ ){
aPt.X() = SVBT16ToShort( pP[i << 1] ) + nDrawXOfs2
- + (INT16)SVBT16ToShort( pHd->xa );
+ + (sal_Int16)SVBT16ToShort( pHd->xa );
aPt.Y() = SVBT16ToShort( pP[( i << 1 ) + 1] ) + nDrawYOfs2
- + (INT16)SVBT16ToShort( pHd->ya );
+ + (sal_Int16)SVBT16ToShort( pHd->ya );
aP[i] = aPt;
}
delete[] pP;
@@ -466,9 +466,9 @@ SdrObject* SwWW8ImplReader::ReadPolyLine( WW8_DPHEAD* pHd, const WW8_DO* pDo,
ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
{
- USHORT nPCnt = mpDrawEditEngine->GetParagraphCount();
- USHORT nSP = 0;
- USHORT nEP = 0;
+ sal_uInt16 nPCnt = mpDrawEditEngine->GetParagraphCount();
+ sal_uInt16 nSP = 0;
+ sal_uInt16 nEP = 0;
while( (nSP < nPCnt)
&& (nCpStart >= mpDrawEditEngine->GetTextLen( nSP ) + 1) )
{
@@ -483,7 +483,7 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
nCpEnd -= mpDrawEditEngine->GetTextLen( nEP ) + 1;
nEP++;
}
- return ESelection( nSP, (USHORT)nCpStart, nEP, (USHORT)nCpEnd );
+ return ESelection( nSP, (sal_uInt16)nCpStart, nEP, (sal_uInt16)nCpEnd );
}
// InsertTxbxStyAttrs() setzt die Style-Attribute in den uebergebenen ItemSet.
@@ -496,13 +496,13 @@ ESelection SwWW8ImplReader::GetESelection( long nCpStart, long nCpEnd )
// ignoriert.
// Es werden hierbei sowohl Para- wie auch Zeichen-Attribute in den
// ItemSet gestopft.
-void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
+void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl )
{
SwWW8StyInf * pStyInf = GetStyle(nColl);
if( pStyInf != NULL && pStyInf->pFmt && pStyInf->bColl )
{
const SfxPoolItem* pItem;
- for( USHORT i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
+ for( sal_uInt16 i = POOLATTR_BEGIN; i < POOLATTR_END; i++ )
{
//If we are set in the source and not set in the destination
//then add it in.
@@ -510,8 +510,8 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
i, true, &pItem ) )
{
SfxItemPool *pEditPool = rS.GetPool();
- USHORT nWhich = i;
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nWhich = i;
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -532,7 +532,7 @@ void SwWW8ImplReader::InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl )
static void lcl_StripFields(String &rString, long &rNewStartCp)
{
- for(USHORT i=0; i < rString.Len(); i++)
+ for(sal_uInt16 i=0; i < rString.Len(); i++)
{
if( 0x13 == rString.GetChar( i ) )
{
@@ -626,7 +626,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
std::deque<Chunk> aChunks;
//Here store stack location
- USHORT nCurrentCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCurrentCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
while (nStart < nEndCp)
{
//nStart is the beginning of the attributes for this range, and
@@ -684,14 +684,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
{
if (bStartAttr)
{
- USHORT nCount = static_cast< USHORT >(pCtrlStck->Count());
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(pCtrlStck->Count());
if (maFieldStack.empty() && Read_Field(&aRes))
{
String sURL;
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCount; --nI)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[nI-1])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if (nWhich == RES_TXTATR_INETFMT)
{
const SwFmtINetFmt *pURL =
@@ -724,14 +724,14 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//to draw attributes
if (pCtrlStck->Count() - nCurrentCount)
{
- for (USHORT i = nCurrentCount; i < pCtrlStck->Count(); i++)
+ for (sal_uInt16 i = nCurrentCount; i < pCtrlStck->Count(); i++)
{
const SfxPoolItem *pItem = ((*pCtrlStck)[i])->pAttr;
- USHORT nWhich = pItem->Which();
+ sal_uInt16 nWhich = pItem->Which();
if( nWhich < RES_FLTRATTR_BEGIN ||
nWhich >= RES_FLTRATTR_END )
{
- USHORT nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
+ sal_uInt16 nSlotId = rDoc.GetAttrPool().GetSlotId(nWhich);
if (
nSlotId && nWhich != nSlotId &&
0 != (nWhich = pEditPool->GetWhich(nSlotId)) &&
@@ -763,7 +763,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
//pop off as far as recorded location just in case there were some left
//unclosed
- for (USHORT nI = static_cast< USHORT >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
+ for (sal_uInt16 nI = static_cast< sal_uInt16 >(pCtrlStck->Count()); nI > nCurrentCount; --nI)
pCtrlStck->DeleteAndDestroy(nI-1);
typedef std::deque<Chunk>::iterator myIter;
@@ -802,7 +802,7 @@ void SwWW8ImplReader::InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp,
}
bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
- USHORT nTxBxS, USHORT nSequence)
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence)
{
// rasch den TextBox-PLCF greifen
WW8PLCFspecial* pT = pPlcxMan ? pPlcxMan->GetTxbx() : 0;
@@ -867,7 +867,7 @@ bool SwWW8ImplReader::GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp,
return false;
}
// ggfs. entsprechende Anzahl Eintraege weitergehen
- for(USHORT iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
+ for(sal_uInt16 iSequence = 0; iSequence < nSequence; iSequence++) (*pT)++;
// dann die tatsaechlichen Start und Ende ermitteln
if( (!pT->Get( rStartCp, pT0 ))
|| ( nMinStartCp > rStartCp ) )
@@ -910,7 +910,7 @@ bool SwWW8ImplReader::GetRangeAsDrawingString(String& rString, long nStartCp, lo
else if (nStartCp < nEndCp)
{
// den Text einlesen: kann sich ueber mehrere Pieces erstrecken!!!
- USHORT nLen = pSBase->WW8ReadString(*pStrm, rString,
+ sal_uInt16 nLen = pSBase->WW8ReadString(*pStrm, rString,
nStartCp + nOffset, nEndCp - nStartCp, GetCurrentCharSet());
OSL_ENSURE(nLen, "+Wo ist der Grafik-Text (8) ?");
if (nLen)
@@ -971,13 +971,13 @@ OutlinerParaObject* SwWW8ImplReader::ImportAsOutliner(String &rString, WW8_CP nS
// InsertTxbxText() fuegt fuer TextBoxen und CaptionBoxen den Text
// und die Attribute ein
SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
- Size* pObjSiz, USHORT nTxBxS, USHORT nSequence, long nPosCp,
+ Size* pObjSiz, sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp,
SwFrmFmt* pOldFlyFmt, bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText, long* pnStartCp, long* pnEndCp,
bool* pbContainsGraphics, SvxMSDffImportRec* pRecord)
{
SwFrmFmt* pFlyFmt = 0;
- ULONG nOld = pStrm->Tell();
+ sal_uLong nOld = pStrm->Tell();
ManTypes eType = pPlcxMan->GetManType() == MAN_HDFT ? MAN_TXBX_HDFT : MAN_TXBX;
@@ -1029,13 +1029,13 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen,
*mpSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for( int nLoop = 0; nLoop < 2; ++nLoop )
{
while( aSprmIter.GetSprms()
&& (0 != (pParams = aSprmIter.GetAktParams())) )
{
- USHORT nAktId = aSprmIter.GetAktId();
+ sal_uInt16 nAktId = aSprmIter.GetAktId();
switch( nAktId )
{
case 75:
@@ -1184,7 +1184,7 @@ SwFrmFmt* SwWW8ImplReader::InsertTxbxText(SdrTextObj* pTextObj,
}
-bool SwWW8ImplReader::TxbxChainContainsRealText(USHORT nTxBxS, long& rStartCp,
+bool SwWW8ImplReader::TxbxChainContainsRealText(sal_uInt16 nTxBxS, long& rStartCp,
long& rEndCp)
{
bool bErase, bContainsText;
@@ -1204,17 +1204,17 @@ SdrObject* SwWW8ImplReader::ReadTxtBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aTxtB, sizeof( aTxtB ), pHd, pDo, rSet ) )
return 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( pHd->dxa );
- aP1.Y() += (INT16)SVBT16ToShort( pHd->dya );
+ aP1.X() += (sal_Int16)SVBT16ToShort( pHd->dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( pHd->dya );
SdrObject* pObj = new SdrRectObj( OBJ_TEXT, Rectangle( aP0, aP1 ) );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( pHd->dxa ) ,
- (INT16)SVBT16ToShort( pHd->dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( pHd->dxa ) ,
+ (sal_Int16)SVBT16ToShort( pHd->dya ) );
long nStartCpFly,nEndCpFly;
bool bContainsGraphics;
@@ -1246,33 +1246,33 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
if( !ReadGrafStart( (void*)&aCallB, sizeof( aCallB ), pHd, pDo, rSet ) )
return 0;
- UINT16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
+ sal_uInt16 nCount = SVBT16ToShort( aCallB.dpPolyLine.aBits1 ) >> 1 & 0x7fff;
SVBT16 *pP = new SVBT16[nCount * 2];
pStrm->Read( pP, nCount * 4 ); // Punkte einlesen
- BYTE nTyp = (BYTE)nCount - 1;
+ sal_uInt8 nTyp = (sal_uInt8)nCount - 1;
if( nTyp == 1 && SVBT16ToShort( pP[0] ) == SVBT16ToShort( pP[2] ) )
nTyp = 0;
- Point aP0( (INT16)SVBT16ToShort( pHd->xa ) +
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
+ Point aP0( (sal_Int16)SVBT16ToShort( pHd->xa ) +
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.xa ) + nDrawXOfs2,
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.ya ) + nDrawYOfs2 );
Point aP1( aP0 );
- aP1.X() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
- aP1.Y() += (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
- Point aP2( (INT16)SVBT16ToShort( pHd->xa )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
- + nDrawXOfs2 + (INT16)SVBT16ToShort( pP[0] ),
- (INT16)SVBT16ToShort( pHd->ya )
- + (INT16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
- + nDrawYOfs2 + (INT16)SVBT16ToShort( pP[1] ) );
+ aP1.X() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa );
+ aP1.Y() += (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya );
+ Point aP2( (sal_Int16)SVBT16ToShort( pHd->xa )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.xa )
+ + nDrawXOfs2 + (sal_Int16)SVBT16ToShort( pP[0] ),
+ (sal_Int16)SVBT16ToShort( pHd->ya )
+ + (sal_Int16)SVBT16ToShort( aCallB.dpheadPolyLine.ya )
+ + nDrawYOfs2 + (sal_Int16)SVBT16ToShort( pP[1] ) );
delete[] pP;
SdrCaptionObj* pObj = new SdrCaptionObj( Rectangle( aP0, aP1 ), aP2 );
pObj->SetModel( pDrawModel );
pObj->NbcSetSnapRect(Rectangle(aP0, aP1));
- Size aSize( (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
- (INT16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
+ Size aSize( (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dxa ),
+ (sal_Int16)SVBT16ToShort( aCallB.dpheadTxbx.dya ) );
bool bEraseThisObject;
InsertTxbxText(pObj, &aSize, 0, 0, 0, 0, false, bEraseThisObject );
@@ -1291,21 +1291,21 @@ SdrObject* SwWW8ImplReader::ReadCaptionBox( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet)
{
- INT16 nGrouped;
+ sal_Int16 nGrouped;
if( !ReadGrafStart( (void*)&nGrouped, sizeof( nGrouped ), pHd, pDo, rSet ) )
return 0;
#ifdef OSL_BIGENDIAN
- nGrouped = (INT16)SWAPSHORT( nGrouped );
+ nGrouped = (sal_Int16)SWAPSHORT( nGrouped );
#endif
- nDrawXOfs = nDrawXOfs + (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs + (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs + (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs + (sal_Int16)SVBT16ToShort( pHd->ya );
SdrObject* pObj = new SdrObjGroup;
- short nLeft = (INT16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
+ short nLeft = (sal_Int16)SVBT16ToShort( pHd->cb ) - sizeof( WW8_DPHEAD );
for (int i = 0; i < nGrouped; i++)
{
SfxAllItemSet aSet(pDrawModel->GetItemPool());
@@ -1320,8 +1320,8 @@ SdrObject *SwWW8ImplReader::ReadGroup( WW8_DPHEAD* pHd, const WW8_DO* pDo,
}
}
- nDrawXOfs = nDrawXOfs - (INT16)SVBT16ToShort( pHd->xa );
- nDrawYOfs = nDrawYOfs - (INT16)SVBT16ToShort( pHd->ya );
+ nDrawXOfs = nDrawXOfs - (sal_Int16)SVBT16ToShort( pHd->xa );
+ nDrawYOfs = nDrawYOfs - (sal_Int16)SVBT16ToShort( pHd->ya );
return pObj;
}
@@ -1500,10 +1500,10 @@ const WW8_BordersSO &WW8_BordersSO::Get0x01LineMatch(eBorderCode eCode)
return aLineTabVer8[eCode];
}
-INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
- MSO_SPT eShapeType, INT32 &rThick)
+sal_Int32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
+ MSO_SPT eShapeType, sal_Int32 &rThick)
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
/*
Beachte: im Gegensatz zu den Winword-ueblichen Tabellen- und
Rahmen-Randbreiten-Angaben, bei denen jeweils aus der Staerke *einer*
@@ -1559,17 +1559,17 @@ INT32 SwMSDffManager::GetEscherLineMatch(MSO_LineStyle eStyle,
//Returns the thickness of the line outside the frame, the logic of
//words positioning of borders around floating objects is that of a
//disturbed mind.
-INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineThick,
+sal_Int32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineThick,
SvxBoxItem& rBox )
{
- INT32 nOutsideThick = 0;
+ sal_Int32 nOutsideThick = 0;
if( !rLineThick )
return nOutsideThick;
WW8_BordersSO::eBorderCode nIdx = WW8_BordersSO::none;
- INT32 nLineThick=rLineThick;
+ sal_Int32 nLineThick=rLineThick;
nOutsideThick = SwMSDffManager::GetEscherLineMatch(eLineStyle,
eShapeType, rLineThick);
@@ -1679,7 +1679,7 @@ INT32 SwWW8ImplReader::MatchSdrBoxIntoFlyBoxItem(const Color& rLineColor,
aLine.SetDistance(rBorders.mnDist);
aLine.SetStyle( rBorders.mnType );
- for(USHORT nLine = 0; nLine < 4; ++nLine)
+ for(sal_uInt16 nLine = 0; nLine < 4; ++nLine)
rBox.SetLine(new SvxBorderLine( aLine ), nLine);
}
@@ -1714,16 +1714,16 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const SfxItemSet& rOldSet = pSdrObj->GetMergedItemSet();
// einige Items koennen direkt so uebernommen werden
- const USHORT nDirectMatch = 2;
+ const sal_uInt16 nDirectMatch = 2;
static RES_FRMATR const aDirectMatch[ nDirectMatch ] =
{
RES_LR_SPACE, // Aussenabstand links/rechts: SvxLRSpaceItem
RES_UL_SPACE // Aussenabstand Oben/unten: SvxULSpaceItem
};
const SfxPoolItem* pPoolItem;
- for(USHORT nItem = 0; nItem < nDirectMatch; ++nItem)
+ for(sal_uInt16 nItem = 0; nItem < nDirectMatch; ++nItem)
if( SFX_ITEM_SET == rOldSet.GetItemState(
- static_cast< USHORT >(aDirectMatch[ nItem ]), false, &pPoolItem) )
+ static_cast< sal_uInt16 >(aDirectMatch[ nItem ]), false, &pPoolItem) )
{
rFlySet.Put( *pPoolItem );
}
@@ -1733,7 +1733,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// Rahmen-GROESSE benoetigt!
SvxBoxItem aBox(sw::util::ItemGet<SvxBoxItem>(rFlySet, RES_BOX));
// dashed oder solid wird zu solid
- INT32 nLineThick = 0, nOutside=0;
+ sal_Int32 nLineThick = 0, nOutside=0;
// check if LineStyle is *really* set!
const SfxPoolItem* pItem;
@@ -1786,13 +1786,13 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
// set distances from box's border to text contained within the box
if( 0 < rInnerDist.Left() )
- aBox.SetDistance( (USHORT)rInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Left(), BOX_LINE_LEFT );
if( 0 < rInnerDist.Top() )
- aBox.SetDistance( (USHORT)rInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Top(), BOX_LINE_TOP );
if( 0 < rInnerDist.Right() )
- aBox.SetDistance( (USHORT)rInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Right(), BOX_LINE_RIGHT );
if( 0 < rInnerDist.Bottom() )
- aBox.SetDistance( (USHORT)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)rInnerDist.Bottom(), BOX_LINE_BOTTOM );
bool bFixSize = !(WW8ITEMVALUE(rOldSet, SDRATTR_TEXT_AUTOGROWHEIGHT,
SdrTextAutoGrowHeightItem));
@@ -1843,14 +1843,14 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
const Color aShdColor = static_cast< SdrShadowColorItem const & >(
rOldSet.Get(SDRATTR_SHADOWCOLOR)).GetColorValue();
- const INT32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
+ const sal_Int32 nShdDistX = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWXDIST,
SdrShadowXDistItem);
- const INT32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
+ const sal_Int32 nShdDistY = WW8ITEMVALUE(rOldSet, SDRATTR_SHADOWYDIST,
SdrShadowYDistItem);
aShadow.SetColor( Color( aShdColor ) );
- aShadow.SetWidth(writer_cast<USHORT>((Abs( nShdDistX) +
+ aShadow.SetWidth(writer_cast<sal_uInt16>((Abs( nShdDistX) +
Abs( nShdDistY )) / 2 ));
SvxShadowLocation eShdPosi;
@@ -1958,7 +1958,7 @@ void SwWW8ImplReader::MatchSdrItemsIntoFlySet( SdrObject* pSdrObj,
void SwWW8ImplReader::AdjustLRWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxLRSpaceItem &rLR)
{
- UINT32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nXRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pXRelTo )
{
nXRelTo = *(rRecord.pXRelTo);
@@ -1969,7 +1969,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 1)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
// Right adjustments - if horizontally aligned to right of
@@ -1977,19 +1977,19 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
if (rRecord.nXAlign == 3)
{
if ((nXRelTo == 0) || (nXRelTo == 2))
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
//Inside margin, remove left wrapping
if ((rRecord.nXAlign == 4) && (nXRelTo == 0))
{
- rLR.SetLeft((USHORT)0);
+ rLR.SetLeft((sal_uInt16)0);
}
//Outside margin, remove left wrapping
if ((rRecord.nXAlign == 5) && (nXRelTo == 0))
{
- rLR.SetRight((USHORT)0);
+ rLR.SetRight((sal_uInt16)0);
}
}
@@ -1997,7 +1997,7 @@ void SwWW8ImplReader::AdjustLRWrapForWordMargins(
void SwWW8ImplReader::AdjustULWrapForWordMargins(
const SvxMSDffImportRec &rRecord, SvxULSpaceItem &rUL)
{
- UINT32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
+ sal_uInt32 nYRelTo = SvxMSDffImportRec::RELTO_DEFAULT;
if ( rRecord.pYRelTo )
{
nYRelTo = *(rRecord.pYRelTo);
@@ -2008,7 +2008,7 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 1)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
// Bottom adjustment - remove bottom wrapping if aligned to page or
@@ -2016,12 +2016,12 @@ void SwWW8ImplReader::AdjustULWrapForWordMargins(
if (rRecord.nYAlign == 3)
{
if ((nYRelTo == 0) || (nYRelTo == 1))
- rUL.SetLower((USHORT)0);
+ rUL.SetLower((sal_uInt16)0);
}
//Remove top margin if aligned vertically inside margin
if ((rRecord.nYAlign == 4) && (nYRelTo == 0))
- rUL.SetUpper((USHORT)0);
+ rUL.SetUpper((sal_uInt16)0);
}
void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
@@ -2032,15 +2032,15 @@ void SwWW8ImplReader::MapWrapIntoFlyFmt(SvxMSDffImportRec* pRecord,
if (pRecord->nDxWrapDistLeft || pRecord->nDxWrapDistRight)
{
- SvxLRSpaceItem aLR(writer_cast<USHORT>(pRecord->nDxWrapDistLeft),
- writer_cast<USHORT>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
+ SvxLRSpaceItem aLR(writer_cast<sal_uInt16>(pRecord->nDxWrapDistLeft),
+ writer_cast<sal_uInt16>(pRecord->nDxWrapDistRight), 0, 0, RES_LR_SPACE);
AdjustLRWrapForWordMargins(*pRecord, aLR);
pFlyFmt->SetFmtAttr(aLR);
}
if (pRecord->nDyWrapDistTop || pRecord->nDyWrapDistBottom)
{
- SvxULSpaceItem aUL(writer_cast<USHORT>(pRecord->nDyWrapDistTop),
- writer_cast<USHORT>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(pRecord->nDyWrapDistTop),
+ writer_cast<sal_uInt16>(pRecord->nDyWrapDistBottom), RES_UL_SPACE);
AdjustULWrapForWordMargins(*pRecord, aUL);
pFlyFmt->SetFmtAttr(aUL);
}
@@ -2136,11 +2136,10 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
if( pIdx && 0 != (pGrfNd = rDoc.GetNodes()[pIdx->GetIndex() + 1]->GetGrfNode() ))
{
Size aSz(pGrfNd->GetTwipSize());
- // use type <sal_uInt64> instead of <ULONG> to get correct results
+ // use type <sal_uInt64> instead of sal_uLong to get correct results
// in the following calculations.
sal_uInt64 rHeight = aSz.Height();
sal_uInt64 rWidth = aSz.Width();
- // <--
if( !rWidth && pF)
rWidth = pF->nXaRight - pF->nXaLeft;
else if( !rHeight && pF)
@@ -2203,7 +2202,7 @@ void SwWW8ImplReader::SetAttributesAtGrfNode( SvxMSDffImportRec* pRecord,
//drawmode
if (WW8ITEMVALUE(rOldSet, SDRATTR_GRAFMODE, SdrGrafModeItem))
{
- SwDrawModeGrf aDrawMode( static_cast< USHORT >(WW8ITEMVALUE(rOldSet,
+ SwDrawModeGrf aDrawMode( static_cast< sal_uInt16 >(WW8ITEMVALUE(rOldSet,
SDRATTR_GRAFMODE, SdrGrafModeItem)) );
pGrfNd->SetAttr( aDrawMode );
}
@@ -2254,12 +2253,12 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
pRecord = &aRecordFromFSPA;
if (!(pRecord->pXRelTo) && pFSPA)
{
- pRecord->pXRelTo = new UINT32;
+ pRecord->pXRelTo = new sal_uInt32;
*(pRecord->pXRelTo) = pFSPA->nbx;
}
if (!(pRecord->pYRelTo) && pFSPA)
{
- pRecord->pYRelTo = new UINT32;
+ pRecord->pYRelTo = new sal_uInt32;
*(pRecord->pYRelTo) = pFSPA->nby;
}
@@ -2269,13 +2268,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
// nXRelTo - Page printable area, Page, Column, Character
// nYRelTo - Page printable area, Page, Paragraph, Line
- const UINT32 nCntXAlign = 6;
- const UINT32 nCntYAlign = 6;
+ const sal_uInt32 nCntXAlign = 6;
+ const sal_uInt32 nCntYAlign = 6;
- const UINT32 nCntRelTo = 4;
+ const sal_uInt32 nCntRelTo = 4;
- UINT32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
- UINT32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
+ sal_uInt32 nXAlign = nCntXAlign > pRecord->nXAlign ? pRecord->nXAlign : 1;
+ sal_uInt32 nYAlign = nCntYAlign > pRecord->nYAlign ? pRecord->nYAlign : 1;
if (pFSPA)
{
@@ -2297,11 +2296,10 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
*(pRecord->pYRelTo) = pFSPA->nby;
}
}
- // <--
}
- UINT32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
- UINT32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
+ sal_uInt32 nXRelTo = nCntRelTo > *(pRecord->pXRelTo) ? *(pRecord->pXRelTo) : 1;
+ sal_uInt32 nYRelTo = nCntRelTo > *(pRecord->pYRelTo) ? *(pRecord->pYRelTo) : 1;
RndStdIds eAnchor = IsInlineEscherHack() ? FLY_AS_CHAR : FLY_AT_CHAR; // #i43718#
@@ -2473,13 +2471,13 @@ RndStdIds SwWW8ImplReader::ProcessEscherAlign(SvxMSDffImportRec* pRecord,
}
// #i84783#
-bool SwWW8ImplReader::IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const
+bool SwWW8ImplReader::IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const
{
bool bIsObjectLayoutInTableCell = false;
if ( bVer8 )
{
- const UINT16 nWWVersion = pWwFib->nProduct & 0xE000;
+ const sal_uInt16 nWWVersion = pWwFib->nProduct & 0xE000;
switch ( nWWVersion )
{
case 0x0000: // version 8 aka Microsoft Word 97
@@ -2689,8 +2687,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
Get the record for top level object, so we can get the word anchoring
and wrapping information for it.
*/
- USHORT nRecCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nRecCount; ++nTxbx )
+ sal_uInt16 nRecCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nRecCount; ++nTxbx )
{
pRecord = aData.GetRecord( nTxbx );
if (pRecord && pRecord->pObj == pObject)
@@ -2711,7 +2709,7 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
// inside table cell and its wrapping isn't 'SURROUND_THROUGH'
if (bLayoutInTableCell && eSurround != SURROUND_THROUGHT)
{
- SwFmtFollowTextFlow aFollowTextFlow( TRUE );
+ SwFmtFollowTextFlow aFollowTextFlow( sal_True );
aFlySet.Put( aFollowTextFlow );
}
@@ -2793,8 +2791,8 @@ SwFrmFmt* SwWW8ImplReader::Read_GrafLayer( long nGrafAnchorCp )
*/
if (aData.HasRecords())
{
- USHORT nCount = aData.GetRecCount();
- for (USHORT nTxbx=0; nTxbx < nCount; ++nTxbx)
+ sal_uInt16 nCount = aData.GetRecCount();
+ for (sal_uInt16 nTxbx=0; nTxbx < nCount; ++nTxbx)
{
pRecord = aData.GetRecord(nTxbx);
if (pRecord && pRecord->pObj && pRecord->aTextId.nTxBxS)
@@ -2888,7 +2886,7 @@ SwFrmFmt* SwWW8ImplReader::MungeTextIntoDrawBox(SdrObject* pTrueObject,
// Objekt ist Bestandteil einer Gruppe?
SdrObject* pGroupObject = pSdrTextObj->GetUpGroup();
- UINT32 nOrdNum = pSdrTextObj->GetOrdNum();
+ sal_uInt32 nOrdNum = pSdrTextObj->GetOrdNum();
bool bEraseThisObject;
InsertTxbxText( pSdrTextObj, &aObjSize, pRecord->aTextId.nTxBxS,
pRecord->aTextId.nSequence, nGrafAnchorCp, pRetFrmFmt,
@@ -3008,7 +3006,7 @@ SwFlyFrmFmt* SwWW8ImplReader::ConvertDrawTextToFly(SdrObject* &rpObject,
deleted and useless.
*/
pMSDffManager->StoreShapeOrder(pF->nSpId,
- (((ULONG)pRecord->aTextId.nTxBxS) << 16) +
+ (((sal_uLong)pRecord->aTextId.nTxBxS) << 16) +
pRecord->aTextId.nSequence, 0, pRetFrmFmt);
// The Kontakt object has to be inserted into the draw page, so
@@ -3210,8 +3208,8 @@ void SwWW8FltAnchorStack::AddAnchor(const SwPosition& rPos, SwFrmFmt *pFmt)
void SwWW8FltAnchorStack::Flush()
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry *pEntry = (*this)[i];
SwPosition aDummy(pEntry->nMkNode);
diff --git a/sw/source/filter/ww8/ww8graf.hxx b/sw/source/filter/ww8/ww8graf.hxx
index c0f7affeb352..516660a5defa 100644
--- a/sw/source/filter/ww8/ww8graf.hxx
+++ b/sw/source/filter/ww8/ww8graf.hxx
@@ -35,11 +35,11 @@
struct EscherShape
{
- ULONG mnEscherShapeOrder;
- ULONG mnNoInlines;
+ sal_uLong mnEscherShapeOrder;
+ sal_uLong mnNoInlines;
// new member <mbInHeaderFooter>
bool mbInHeaderFooter;
- EscherShape( ULONG nEscherShapeOrder,
+ EscherShape( sal_uLong nEscherShapeOrder,
bool _bInHeaderFooter )
: mnEscherShapeOrder(nEscherShapeOrder),
mnNoInlines(0),
@@ -64,24 +64,24 @@ private:
std::vector<short> maDrawHeight;
typedef std::vector<short>::iterator myditer;
- std::stack<USHORT> maIndexes;
+ std::stack<sal_uInt16> maIndexes;
sw::util::SetLayer maSetLayer;
- ULONG mnNoInitialObjects;
- ULONG mnInlines;
+ sal_uLong mnNoInitialObjects;
+ sal_uLong mnInlines;
SdrPage* mpDrawPg;
const SvxMSDffShapeOrders *mpShapeOrders;
- USHORT GetEscherObjectIdx(ULONG nSpId);
- myeiter MapEscherIdxToIter(ULONG nIdx);
+ sal_uInt16 GetEscherObjectIdx(sal_uLong nSpId);
+ myeiter MapEscherIdxToIter(sal_uLong nIdx);
// new parameter <_bInHeaderFooter>, indicating
// that object is in header or footer
- ULONG GetEscherObjectPos( ULONG nSpId,
+ sal_uLong GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- ULONG GetDrawingObjectPos(short nWwHeight);
- bool InsertObject(SdrObject *pObject, ULONG nPos);
+ sal_uLong GetDrawingObjectPos(short nWwHeight);
+ bool InsertObject(SdrObject *pObject, sal_uLong nPos);
public:
wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
const SvxMSDffShapeOrders *pShapeOrders);
@@ -93,10 +93,10 @@ public:
void InsertDrawingObject(SdrObject* pObj, short nWwHeight);
// new parameter <_bInHeaderFooter>, indicating that object is in header or footer
void InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter );
// <--
- void InsideEscher(ULONG nIndex);
+ void InsideEscher(sal_uLong nIndex);
void OutsideEscher();
};
diff --git a/sw/source/filter/ww8/ww8graf2.cxx b/sw/source/filter/ww8/ww8graf2.cxx
index 3476226955ef..2bd9ab8b5681 100644
--- a/sw/source/filter/ww8/ww8graf2.cxx
+++ b/sw/source/filter/ww8/ww8graf2.cxx
@@ -71,7 +71,7 @@ wwZOrderer::wwZOrderer(const sw::util::SetLayer &rSetLayer, SdrPage* pDrawPg,
OSL_ENSURE(mpDrawPg,"Missing draw page impossible!");
}
-void wwZOrderer::InsideEscher(ULONG nSpId)
+void wwZOrderer::InsideEscher(sal_uLong nSpId)
{
maIndexes.push(GetEscherObjectIdx(nSpId));
}
@@ -83,15 +83,15 @@ void wwZOrderer::OutsideEscher()
// consider new parameter <_bInHeaderFooter>
void wwZOrderer::InsertEscherObject( SdrObject* pObject,
- ULONG nSpId,
+ sal_uLong nSpId,
const bool _bInHeaderFooter )
{
- ULONG nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
+ sal_uLong nInsertPos = GetEscherObjectPos( nSpId, _bInHeaderFooter );
// <--
InsertObject(pObject, nInsertPos + mnNoInitialObjects + mnInlines);
}
-wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
+wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(sal_uLong nIdx)
{
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
@@ -104,12 +104,12 @@ wwZOrderer::myeiter wwZOrderer::MapEscherIdxToIter(ULONG nIdx)
return aIter;
}
-USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
+sal_uInt16 wwZOrderer::GetEscherObjectIdx(sal_uLong nSpId)
{
- USHORT nFound=0;
- USHORT nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
+ sal_uInt16 nFound=0;
+ sal_uInt16 nShapeCount = mpShapeOrders ? mpShapeOrders->Count() : 0;
// First, find out what position this shape is in in the Escher order.
- for (USHORT nShapePos=0; nShapePos < nShapeCount; nShapePos++)
+ for (sal_uInt16 nShapePos=0; nShapePos < nShapeCount; nShapePos++)
{
const SvxMSDffShapeOrder *pOrder = mpShapeOrders->GetObject(nShapePos);
if (pOrder->nShapeId == nSpId)
@@ -122,7 +122,7 @@ USHORT wwZOrderer::GetEscherObjectIdx(ULONG nSpId)
}
// consider new parameter <_bInHeaderFooter>
-ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
+sal_uLong wwZOrderer::GetEscherObjectPos( sal_uLong nSpId,
const bool _bInHeaderFooter )
{
/*
@@ -130,12 +130,12 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
the actual ordering that should be used when inserting them into the
document.
*/
- USHORT nFound = GetEscherObjectIdx(nSpId);
+ sal_uInt16 nFound = GetEscherObjectIdx(nSpId);
// Match the ordering position from the ShapeOrders to the ordering of all
// objects in the document, there is a complexity when escherobjects
// contain inlines objects, we need to consider thsose as part of the
// escher count
- ULONG nRet=0;
+ sal_uLong nRet=0;
myeiter aIter = maEscherLayer.begin();
myeiter aEnd = maEscherLayer.end();
// skip objects in page header|footer,
@@ -176,7 +176,7 @@ ULONG wwZOrderer::GetEscherObjectPos( ULONG nSpId,
// einem VarArr
void wwZOrderer::InsertDrawingObject(SdrObject* pObj, short nWwHeight)
{
- ULONG nPos = GetDrawingObjectPos(nWwHeight);
+ sal_uLong nPos = GetDrawingObjectPos(nWwHeight);
if (nWwHeight & 0x2000) // Heaven ?
maSetLayer.SendObjectToHeaven(*pObj);
else
@@ -197,10 +197,10 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
{
//If we are inside an escher objects, place us just after that
//escher obj, and increment its inline count
- USHORT nIdx = maIndexes.top();
+ sal_uInt16 nIdx = maIndexes.top();
myeiter aEnd = MapEscherIdxToIter(nIdx);
- ULONG nInsertPos=0;
+ sal_uLong nInsertPos=0;
myeiter aIter = maEscherLayer.begin();
while (aIter != aEnd)
{
@@ -225,7 +225,7 @@ void wwZOrderer::InsertTextLayerObject(SdrObject* pObject)
// Der Offset bei Datei in bestehendes Dokument mit Grafiklayer einfuegen
// muss der Aufrufer den Index um mnNoInitialObjects erhoeht werden, damit die
// neuen Objekte am Ende landen ( Einfuegen ist dann schneller )
-ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
+sal_uLong wwZOrderer::GetDrawingObjectPos(short nWwHeight)
{
myditer aIter = maDrawHeight.begin();
myditer aEnd = maDrawHeight.end();
@@ -241,7 +241,7 @@ ULONG wwZOrderer::GetDrawingObjectPos(short nWwHeight)
return std::distance(maDrawHeight.begin(), aIter);
}
-bool wwZOrderer::InsertObject(SdrObject* pObject, ULONG nPos)
+bool wwZOrderer::InsertObject(SdrObject* pObject, sal_uLong nPos)
{
if (!pObject->IsInserted())
{
@@ -262,11 +262,11 @@ bool SwWW8ImplReader::GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc)
}
bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pbInDoc)
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pbInDoc)
{ // Grafik in File schreiben
*pbInDoc = true; // default
- ULONG nPosFc = nFilePos + rPic.cbHeader;
+ sal_uLong nPosFc = nFilePos + rPic.cbHeader;
switch (rPic.MFP.mm)
{
@@ -313,7 +313,7 @@ bool SwWW8ImplReader::ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
struct WW8PicDesc
{
- INT16 nCL, nCR, nCT, nCB;
+ sal_Int16 nCL, nCR, nCT, nCB;
long nWidth, nHeight;
WW8PicDesc( const WW8_PIC& rPic );
@@ -367,14 +367,14 @@ SwFlyFrmFmt* SwWW8ImplReader::MakeGrafNotInCntnt(const WW8PicDesc& rPD,
const Graphic* pGraph, const String& rFileName, const SfxItemSet& rGrfSet)
{
- UINT32 nWidth = rPD.nWidth;
- UINT32 nHeight = rPD.nHeight;
+ sal_uInt32 nWidth = rPD.nWidth;
+ sal_uInt32 nHeight = rPD.nHeight;
// Vertikale Verschiebung durch Zeilenabstand
- INT32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
+ sal_Int32 nNetHeight = nHeight + rPD.nCT + rPD.nCB;
if( pSFlyPara->nLineSpace && pSFlyPara->nLineSpace > nNetHeight )
pSFlyPara->nYPos =
- (USHORT)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
+ (sal_uInt16)( pSFlyPara->nYPos + pSFlyPara->nLineSpace - nNetHeight );
WW8FlySet aFlySet(*this, pWFlyPara, pSFlyPara, true);
@@ -424,7 +424,7 @@ SwFrmFmt* SwWW8ImplReader::MakeGrafInCntnt(const WW8_PIC& rPic,
}
SwFrmFmt* SwWW8ImplReader::ImportGraf1(WW8_PIC& rPic, SvStream* pSt,
- ULONG nFilePos )
+ sal_uLong nFilePos )
{
SwFrmFmt* pRet = 0;
if( pSt->IsEof() || rPic.fError || rPic.MFP.mm == 99 )
@@ -499,7 +499,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
Wir mappen ansonsten die Variable pDataStream auf pStream.
*/
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nPicLocFc );
PicRead( pDataStream, &aPic, bVer67);
@@ -563,7 +563,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
if (0x66 == aPic.MFP.mm)
{
//These ones have names prepended
- BYTE nNameLen=0;
+ sal_uInt8 nNameLen=0;
*pDataStream >> nNameLen;
pDataStream->SeekRel( nNameLen );
}
@@ -653,7 +653,7 @@ SwFrmFmt* SwWW8ImplReader::ImportGraf(SdrTextObj* pTextObj,
ReplaceObj(*pTextObj, *pObject);
else
{
- if (UINT16(OBJ_OLE2) == pObject->GetObjIdentifier())
+ if (sal_uInt16(OBJ_OLE2) == pObject->GetObjIdentifier())
{
// the size from BLIP, if there is any, should be already set
pRet = InsertOle(*((SdrOle2Obj*)pObject), aAttrSet, aGrSet);
@@ -743,7 +743,7 @@ void WW8PicShadowToReal( WW8_PIC_SHADOW * pPicS, WW8_PIC * pPic )
pPic->MFP.xExt = SVBT16ToShort( pPicS->MFP.xExt );
pPic->MFP.yExt = SVBT16ToShort( pPicS->MFP.yExt );
pPic->MFP.hMF = SVBT16ToShort( pPicS->MFP.hMF );
- for( USHORT i = 0; i < 14 ; i++ )
+ for( sal_uInt16 i = 0; i < 14 ; i++ )
pPic->rcWinMF[i] = SVBT8ToByte( pPicS->rcWinMF[i] );
pPic->dxaGoal = SVBT16ToShort( pPicS->dxaGoal );
pPic->dyaGoal = SVBT16ToShort( pPicS->dyaGoal );
@@ -769,7 +769,7 @@ void WW8FSPAShadowToReal( WW8_FSPA_SHADOW * pFSPAS, WW8_FSPA * pFSPA )
pFSPA->nXaRight = SVBT32ToUInt32( pFSPAS->nXaRight );
pFSPA->nYaBottom = SVBT32ToUInt32( pFSPAS->nYaBottom );
- USHORT nBits = SVBT16ToShort( pFSPAS->aBits1 );
+ sal_uInt16 nBits = SVBT16ToShort( pFSPAS->aBits1 );
pFSPA->bHdr = 0 != ( nBits & 0x0001 );
pFSPA->nbx = ( nBits & 0x0006 ) >> 1;
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index a2bae2ab3ca6..7bccdd6b027b 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -32,13 +32,17 @@
#include <boost/unordered_set.hpp>
#include <com/sun/star/embed/ElementModes.hpp>
#include <com/sun/star/embed/XStorage.hpp>
+
#include <unotools/ucbstreamhelper.hxx>
#include <tools/solar.h>
#include <rtl/tencinfo.h>
+#include <rtl/random.h>
#include <sot/storage.hxx>
#include <sfx2/docinf.hxx>
#include <sfx2/docfile.hxx>
+#include <sfx2/request.hxx>
+#include <sfx2/frame.hxx>
#include <tools/urlobj.hxx>
#include <unotools/tempfile.hxx>
#include <svtools/sfxecode.hxx>
@@ -108,6 +112,7 @@
#include <com/sun/star/i18n/ForbiddenCharacters.hpp>
#include <comphelper/extract.hxx>
+#include <comphelper/sequenceashashmap.hxx>
#include <fltini.hxx>
#include <algorithm>
@@ -249,9 +254,9 @@ SwMSDffManager::SwMSDffManager( SwWW8ImplReader& rRdr )
nSvxMSDffOLEConvFlags = SwMSDffManager::GetFilterFlags();
}
-UINT32 SwMSDffManager::GetFilterFlags()
+sal_uInt32 SwMSDffManager::GetFilterFlags()
{
- UINT32 nFlags(0);
+ sal_uInt32 nFlags(0);
if (const SvtFilterOptions* pOpt = SvtFilterOptions::Get())
{
if (pOpt->IsMathType2Math())
@@ -333,23 +338,23 @@ void SwMSDffManager::EnableFallbackStream()
pFallbackStream = 0;
}
-USHORT SwWW8ImplReader::GetToggleAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleAttrFlags() : 0;
}
-USHORT SwWW8ImplReader::GetToggleBiDiAttrFlags() const
+sal_uInt16 SwWW8ImplReader::GetToggleBiDiAttrFlags() const
{
return pCtrlStck ? pCtrlStck->GetToggleBiDiAttrFlags() : 0;
}
-void SwWW8ImplReader::SetToggleAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleAttrFlags(nFlags);
}
-void SwWW8ImplReader::SetToggleBiDiAttrFlags(USHORT nFlags)
+void SwWW8ImplReader::SetToggleBiDiAttrFlags(sal_uInt16 nFlags)
{
if (pCtrlStck)
pCtrlStck->SetToggleBiDiAttrFlags(nFlags);
@@ -398,9 +403,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
SEEK_FROM_CURRENT_AND_RESTART )
&& maShapeRecords.Current()->nRecLen )
{
- UINT32 nBytesLeft = maShapeRecords.Current()->nRecLen;
- UINT32 nUDData;
- UINT16 nPID;
+ sal_uInt32 nBytesLeft = maShapeRecords.Current()->nRecLen;
+ sal_uInt32 nUDData;
+ sal_uInt16 nPID;
while( 5 < nBytesLeft )
{
rSt >> nPID;
@@ -413,27 +418,27 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
case 0x0390:
if (pImpRec->pXRelTo)
delete pImpRec->pXRelTo;
- pImpRec->pXRelTo = new UINT32;
+ pImpRec->pXRelTo = new sal_uInt32;
*(pImpRec->pXRelTo) = nUDData;
break;
case 0x0391: pImpRec->nYAlign = nUDData; break;
case 0x0392:
if (pImpRec->pYRelTo)
delete pImpRec->pYRelTo;
- pImpRec->pYRelTo = new UINT32;
+ pImpRec->pYRelTo = new sal_uInt32;
*(pImpRec->pYRelTo) = nUDData;
break;
case 0x03BF: pImpRec->nLayoutInTableCell = nUDData; break;
}
if ( rSt.GetError() != 0 )
break;
- pImpRec->bHasUDefProp = TRUE;
+ pImpRec->bHasUDefProp = sal_True;
nBytesLeft -= 6;
}
}
// Textrahmen, auch Title oder Outline
- UINT32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
+ sal_uInt32 nTextId = GetPropertyValue( DFF_Prop_lTxid, 0 );
if( nTextId )
{
SfxItemSet aSet( pSdrModel->GetItemPool() );
@@ -442,7 +447,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//textbox, this was changed for #88277# to be created as a simple
//rect to keep impress happy. For the rest of us we'd like to turn
//it back into a textbox again.
- BOOL bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
+ sal_Bool bIsSimpleDrawingTextBox = (pImpRec->eShapeType == mso_sptTextBox);
if (!bIsSimpleDrawingTextBox)
{
//Either
@@ -459,17 +464,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
// Distance of Textbox to it's surrounding Autoshape
- INT32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
- INT32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
- INT32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
- INT32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
+ sal_Int32 nTextLeft = GetPropertyValue( DFF_Prop_dxTextLeft, 91440L);
+ sal_Int32 nTextRight = GetPropertyValue( DFF_Prop_dxTextRight, 91440L );
+ sal_Int32 nTextTop = GetPropertyValue( DFF_Prop_dyTextTop, 45720L );
+ sal_Int32 nTextBottom = GetPropertyValue( DFF_Prop_dyTextBottom, 45720L );
ScaleEmu( nTextLeft );
ScaleEmu( nTextRight );
ScaleEmu( nTextTop );
ScaleEmu( nTextBottom );
- INT32 nTextRotationAngle=0;
+ sal_Int32 nTextRotationAngle=0;
bool bVerticalText = false;
if ( IsProperty( DFF_Prop_txflTextFlow ) )
{
@@ -508,10 +513,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextBottom;
nTextRight = nOldTextTop;
@@ -525,10 +530,10 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
rTextRect.Right() = rTextRect.Left() + rTextRect.GetHeight();
rTextRect.Bottom() = rTextRect.Top() + nWidth;
- INT32 nOldTextLeft = nTextLeft;
- INT32 nOldTextRight = nTextRight;
- INT32 nOldTextTop = nTextTop;
- INT32 nOldTextBottom = nTextBottom;
+ sal_Int32 nOldTextLeft = nTextLeft;
+ sal_Int32 nOldTextRight = nTextRight;
+ sal_Int32 nOldTextTop = nTextTop;
+ sal_Int32 nOldTextBottom = nTextBottom;
nTextLeft = nOldTextTop;
nTextRight = nOldTextBottom;
@@ -558,9 +563,9 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if( bIsSimpleDrawingTextBox )
{
SvxMSDffShapeInfo aTmpRec( 0, pImpRec->nShapeId );
- aTmpRec.bSortByShapeId = TRUE;
+ aTmpRec.bSortByShapeId = sal_True;
- USHORT nFound;
+ sal_uInt16 nFound;
if( GetShapeInfos()->Seek_Entry( &aTmpRec, &nFound ) )
{
SvxMSDffShapeInfo& rInfo = *GetShapeInfos()->GetObject(nFound);
@@ -574,7 +579,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
if (GetPropertyValue(DFF_Prop_FitTextToShape) & 2)
{
- aSet.Put( SdrTextAutoGrowHeightItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_True ) );
aSet.Put( SdrTextMinFrameHeightItem(
aNewRect.Bottom() - aNewRect.Top() ) );
aSet.Put( SdrTextMinFrameWidthItem(
@@ -582,19 +587,19 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
}
else
{
- aSet.Put( SdrTextAutoGrowHeightItem( FALSE ) );
- aSet.Put( SdrTextAutoGrowWidthItem( FALSE ) );
+ aSet.Put( SdrTextAutoGrowHeightItem( sal_False ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_False ) );
}
switch ( (MSO_WrapMode)
GetPropertyValue( DFF_Prop_WrapText, mso_wrapSquare ) )
{
case mso_wrapNone :
- aSet.Put( SdrTextAutoGrowWidthItem( TRUE ) );
+ aSet.Put( SdrTextAutoGrowWidthItem( sal_True ) );
pImpRec->bAutoWidth = true;
break;
case mso_wrapByPoints :
- aSet.Put( SdrTextContourFrameItem( TRUE ) );
+ aSet.Put( SdrTextContourFrameItem( sal_True ) );
break;
default:
;
@@ -736,7 +741,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
const SfxPoolItem* pPoolItem=NULL;
SfxItemState eState = aSet.GetItemState( XATTR_FILLCOLOR,
- FALSE, &pPoolItem );
+ sal_False, &pPoolItem );
if( SFX_ITEM_DEFAULT == eState )
aSet.Put( XFillColorItem( String(),
Color( mnDefaultColor ) ) );
@@ -745,17 +750,17 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
//Means that fBehindDocument is set
if (GetPropertyValue(DFF_Prop_fPrint) & 0x20)
- pImpRec->bDrawHell = TRUE;
+ pImpRec->bDrawHell = sal_True;
else
- pImpRec->bDrawHell = FALSE;
+ pImpRec->bDrawHell = sal_False;
if (GetPropertyValue(DFF_Prop_fPrint) & 0x02)
- pImpRec->bHidden = TRUE;
+ pImpRec->bHidden = sal_True;
pImpRec->nNextShapeId = GetPropertyValue( DFF_Prop_hspNext, 0 );
if ( nTextId )
{
- pImpRec->aTextId.nTxBxS = (UINT16)( nTextId >> 16 );
- pImpRec->aTextId.nSequence = (UINT16)nTextId;
+ pImpRec->aTextId.nTxBxS = (sal_uInt16)( nTextId >> 16 );
+ pImpRec->aTextId.nSequence = (sal_uInt16)nTextId;
}
pImpRec->nDxWrapDistLeft = GetPropertyValue(
@@ -803,7 +808,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
pImpRec->nCropFromRight = GetPropertyValue(
DFF_Prop_cropFromRight, 0 );
- UINT32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
+ sal_uInt32 nLineFlags = GetPropertyValue( DFF_Prop_fNoLineDrawDash );
if ( !IsHardAttribute( DFF_Prop_fLine ) &&
pImpRec->eShapeType == mso_sptPictureFrame )
@@ -835,7 +840,7 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
&& (rObjData.nCalledByGroup < 2) )
)
StoreShapeOrder( pImpRec->nShapeId,
- ( ( (ULONG)pImpRec->aTextId.nTxBxS ) << 16 )
+ ( ( (sal_uLong)pImpRec->aTextId.nTxBxS ) << 16 )
+ pImpRec->aTextId.nSequence, pObj );
}
else
@@ -849,14 +854,14 @@ SdrObject* SwMSDffManager::ProcessObj(SvStream& rSt,
# Spezial FastSave - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_StyleCode( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
{
bCpxStyle = false;
return;
}
- USHORT nColl = 0;
+ sal_uInt16 nColl = 0;
if (pWwFib->GetFIBVersion() <= ww::eWW2)
nColl = *pData;
else
@@ -869,7 +874,7 @@ void SwWW8ImplReader::Read_StyleCode( USHORT, const BYTE* pData, short nLen )
}
// Read_Majority ist fuer Majority ( 103 ) und Majority50 ( 108 )
-void SwWW8ImplReader::Read_Majority( USHORT, const BYTE* , short )
+void SwWW8ImplReader::Read_Majority( sal_uInt16, const sal_uInt8* , short )
{
}
@@ -886,16 +891,16 @@ void SwWW8FltControlStack::NewAttr(const SwPosition& rPos,
SwFltControlStack::NewAttr(rPos, rAttr);
}
-void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, USHORT nAttrId,
- BOOL bTstEnde, long nHand, BOOL )
+void SwWW8FltControlStack::SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId,
+ sal_Bool bTstEnde, long nHand, sal_Bool )
{
//Doing a textbox, and using the control stack only as a temporary
//collection point for properties which will are not to be set into
//the real document
if (rReader.pPlcxMan && rReader.pPlcxMan->GetDoingDrawTextBox())
{
- USHORT nCnt = static_cast< USHORT >(Count());
- for (USHORT i=0; i < nCnt; ++i)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(Count());
+ for (sal_uInt16 i=0; i < nCnt; ++i)
{
SwFltStackEntry* pEntry = (*this)[i];
if (nAttrId == pEntry->pAttr->Which())
@@ -983,7 +988,7 @@ const SwNumFmt* SwWW8FltControlStack::GetNumFmtFromStack(const SwPosition &rPos,
if (rTxtNode.IsCountedInList())
{
const SwNumRule *pRule = pDoc->FindNumRulePtr(sName);
- BYTE nLvl = static_cast< BYTE >(rTxtNode.GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(rTxtNode.GetActualListLevel());
pRet = &(pRule->Get(nLvl));
}
}
@@ -1009,8 +1014,8 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
if (pEntry->MakeRegion(pDoc, aRegion, false))
{
SvxLRSpaceItem aNewLR( *(SvxLRSpaceItem*)pEntry->pAttr );
- ULONG nStart = aRegion.Start()->nNode.GetIndex();
- ULONG nEnd = aRegion.End()->nNode.GetIndex();
+ sal_uLong nStart = aRegion.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aRegion.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = pDoc->GetNodes()[ nStart ];
@@ -1092,12 +1097,12 @@ void SwWW8FltControlStack::SetAttrInDoc(const SwPosition& rTmpPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
const SfxPoolItem *pItem = GetStackAttr(rPos, nWhich);
if (!pItem)
{
- const SwCntntNode *pNd = pDoc->GetNodes()[ rPos.nNode ]->GetCntntNode();
+ SwCntntNode const*const pNd = rPos.nNode.GetNode().GetCntntNode();
if (!pNd)
pItem = &pDoc->GetAttrPool().GetDefaultItem(nWhich);
else
@@ -1137,12 +1142,12 @@ const SfxPoolItem* SwWW8FltControlStack::GetFmtAttr(const SwPosition& rPos,
}
const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
- USHORT nWhich)
+ sal_uInt16 nWhich)
{
SwNodeIndex aNode( rPos.nNode, -1 );
- USHORT nIdx = rPos.nContent.GetIndex();
+ sal_uInt16 nIdx = rPos.nContent.GetIndex();
- USHORT nSize = static_cast< USHORT >(Count());
+ sal_uInt16 nSize = static_cast< sal_uInt16 >(Count());
while (nSize)
{
const SwFltStackEntry* pEntry = (*this)[ --nSize ];
@@ -1163,10 +1168,10 @@ const SfxPoolItem* SwWW8FltControlStack::GetStackAttr(const SwPosition& rPos,
return 0;
}
-bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo)
+bool SwWW8FltRefStack::IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo)
{
const SwField* pFld = rFmtFld.GetFld();
- USHORT nSubType;
+ sal_uInt16 nSubType;
if(pFld && (RES_GETREFFLD == pFld->Which())
&& ((REF_FOOTNOTE == (nSubType = pFld->GetSubType())) || (REF_ENDNOTE == nSubType))
&& ((SwGetRefField*)pFld)->GetSetRefName().Len())
@@ -1205,7 +1210,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
// <NOT> got lost from revision 1.128 to 1.129
if (!RefToVar(pFld,pEntry))
{
- USHORT nBkmNo;
+ sal_uInt16 nBkmNo;
if( IsFtnEdnBkmField(rFmtFld, nBkmNo) )
{
::sw::mark::IMark const * const pMark = (pDoc->getIDocumentMarkAccess()->getMarksBegin() + nBkmNo)->get();
@@ -1219,7 +1224,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
rBkMrkPos.nContent.GetIndex()-1, RES_TXTATR_FTN );
if( pFtn )
{
- USHORT nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
+ sal_uInt16 nRefNo = ((SwTxtFtn*)pFtn)->GetSeqRefNo();
((SwGetRefField*)pFld)->SetSeqNo( nRefNo );
@@ -1255,7 +1260,7 @@ void SwWW8FltRefStack::SetAttrInDoc(const SwPosition& rTmpPos,
into the document. If explicit left indent exist which affects them, then this
is handled when the explict left indent is set into the document
*/
-void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Tab(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
{
@@ -1264,16 +1269,16 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
}
short i;
- const BYTE* pDel = pData + 1; // Del - Array
- BYTE nDel = pData[0];
- const BYTE* pIns = pData + 2*nDel + 2; // Ins - Array
- BYTE nIns = pData[nDel*2+1];
+ const sal_uInt8* pDel = pData + 1; // Del - Array
+ sal_uInt8 nDel = pData[0];
+ const sal_uInt8* pIns = pData + 2*nDel + 2; // Ins - Array
+ sal_uInt8 nIns = pData[nDel*2+1];
WW8_TBD* pTyp = (WW8_TBD*)(pData + 2*nDel + 2*nIns + 2);// Typ - Array
SvxTabStopItem aAttr(0, 0, SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP);
const SwTxtFmtColl* pSty = 0;
- USHORT nTabBase;
+ sal_uInt16 nTabBase;
if (pAktColl) // StyleDef
{
nTabBase = pCollA[nAktColl].nBase;
@@ -1298,7 +1303,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
else
{
- USHORT nOldTabBase = nTabBase;
+ sal_uInt16 nOldTabBase = nTabBase;
// If based on another
if (nTabBase < nColls)
nTabBase = pCollA[nTabBase].nBase;
@@ -1326,7 +1331,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
SvxTabStop aTabStop;
for (i=0; i < nDel; ++i)
{
- USHORT nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
+ sal_uInt16 nPos = aAttr.GetPos(SVBT16ToShort(pDel + i*2));
if( nPos != SVX_TAB_NOTFOUND )
aAttr.Remove( nPos, 1 );
}
@@ -1370,7 +1375,7 @@ void SwWW8ImplReader::Read_Tab(USHORT , const BYTE* pData, short nLen)
break;
}
- USHORT nPos2 = aAttr.GetPos( nPos );
+ sal_uInt16 nPos2 = aAttr.GetPos( nPos );
if (nPos2 != SVX_TAB_NOTFOUND)
aAttr.Remove(nPos2, 1); // sonst weigert sich das Insert()
aAttr.Insert(aTabStop);
@@ -1442,7 +1447,7 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::TABS_RELATIVE_TO_INDENT, false);
maTracer.Log(sw::log::eTabStopDistance);
// #i18732# - adjust default of option 'FollowTextFlow'
- rDoc.SetDefault( SwFmtFollowTextFlow( FALSE ) );
+ rDoc.SetDefault( SwFmtFollowTextFlow( sal_False ) );
// Import Default-Tabs
long nDefTabSiz = pWDop->dxaTab;
@@ -1450,7 +1455,7 @@ void SwWW8ImplReader::ImportDop()
nDefTabSiz = 709;
// wir wollen genau einen DefaultTab
- SvxTabStopItem aNewTab( 1, USHORT(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
+ SvxTabStopItem aNewTab( 1, sal_uInt16(nDefTabSiz), SVX_TAB_ADJUST_DEFAULT, RES_PARATR_TABSTOP );
((SvxTabStop&)aNewTab[0]).GetAdjustment() = SVX_TAB_ADJUST_DEFAULT;
rDoc.GetAttrPool().SetPoolDefaultItem( aNewTab );
@@ -1476,11 +1481,11 @@ void SwWW8ImplReader::ImportDop()
rDoc.set(IDocumentSettingAccess::ADD_PARA_SPACING_TO_TABLE_CELLS, true);
// #i11860# - set new compatibility option
- // 'Use former object positioning' to <FALSE>
+ // 'Use former object positioning' to <sal_False>
rDoc.set(IDocumentSettingAccess::USE_FORMER_OBJECT_POS, false);
// #i27767# - set new compatibility option
- // 'Conder Wrapping mode when positioning object' to <TRUE>
+ // 'Conder Wrapping mode when positioning object' to <sal_True>
rDoc.set(IDocumentSettingAccess::CONSIDER_WRAP_ON_OBJECT_POSITION, true);
rDoc.set(IDocumentSettingAccess::USE_FORMER_TEXT_WRAPPING, false); // #i13832#, #i24135#
@@ -1740,9 +1745,9 @@ long SwWW8ImplReader::Read_And(WW8PLCFManResult* pRes)
sal_uInt32 nDateTime = 0;
- if (BYTE * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
+ if (sal_uInt8 * pExtended = pPlcxMan->GetExtendedAtrds()) // Word < 2002 has no date data for comments
{
- ULONG nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
+ sal_uLong nIndex = pSD->GetIdx() & 0xFFFF; //Index is (stupidly) multiplexed for WW8PLCFx_SubDocs
if (pWwFib->lcbAtrdExtra/18 > nIndex)
nDateTime = SVBT32ToUInt32(*(SVBT32*)(pExtended+(nIndex*18)));
}
@@ -1823,16 +1828,16 @@ bool SwWW8ImplReader::isValid_HdFt_CP(WW8_CP nHeaderCP) const
return (nHeaderCP < pWwFib->ccpHdr) ? true : false;
}
-bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
+bool SwWW8ImplReader::HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt,
int nSect)
{
if (pHdFt)
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -1856,7 +1861,7 @@ bool SwWW8ImplReader::HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt,
void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
const SwPageDesc *pPrev, const wwSection &rSection)
{
- BYTE nWhichItems = 0;
+ sal_uInt8 nWhichItems = 0;
SwPageDesc *pPD = 0;
if (!bIsTitle)
{
@@ -1872,16 +1877,16 @@ void SwWW8ImplReader::Read_HdFt(bool bIsTitle, int nSect,
pPD = rSection.mpTitlePage;
}
- BYTE grpfIhdt = rSection.maSep.grpfIhdt;
+ sal_uInt8 grpfIhdt = rSection.maSep.grpfIhdt;
if( pHdFt )
{
WW8_CP start;
long nLen;
- BYTE nNumber = 5;
+ sal_uInt8 nNumber = 5;
- for( BYTE nI = 0x20; nI; nI >>= 1, nNumber-- )
+ for( sal_uInt8 nI = 0x20; nI; nI >>= 1, nNumber-- )
{
if (nI & nWhichItems)
{
@@ -2072,9 +2077,9 @@ bool SwWW8ImplReader::SetSpacing(SwPaM &rMyPam, int nSpace, bool bIsUpper )
SvxULSpaceItem aUL(*pULSpaceItem);
if(bIsUpper)
- aUL.SetUpper( static_cast< USHORT >(nSpace) );
+ aUL.SetUpper( static_cast< sal_uInt16 >(nSpace) );
else
- aUL.SetLower( static_cast< USHORT >(nSpace) );
+ aUL.SetLower( static_cast< sal_uInt16 >(nSpace) );
xub_StrLen nEnd = pSpacingPos->nContent.GetIndex();
rMyPam.GetPoint()->nContent.Assign(rMyPam.GetCntntNode(), 0);
@@ -2096,7 +2101,7 @@ bool SwWW8ImplReader::SetUpperSpacing(SwPaM &rMyPam, int nSpace)
return SetSpacing(rMyPam, nSpace, true);
}
-USHORT SwWW8ImplReader::TabRowSprm(int nLevel) const
+sal_uInt16 SwWW8ImplReader::TabRowSprm(int nLevel) const
{
if (bVer67)
return 25;
@@ -2163,7 +2168,7 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
// 1st look for in-table flag, for 2000+ there is a subtable flag to
// be considered, the sprm 6649 gives the level of the table
- BYTE nCellLevel = 0;
+ sal_uInt8 nCellLevel = 0;
if (bVer67)
nCellLevel = 0 != pPlcxMan->HasParaSprm(24);
@@ -2184,14 +2189,14 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
WW8_CP nMyStartCp=nStartCp;
- if (const BYTE *pLevel = pPlcxMan->HasParaSprm(0x6649))
+ if (const sal_uInt8 *pLevel = pPlcxMan->HasParaSprm(0x6649))
nCellLevel = *pLevel;
bool bHasRowEnd = SearchRowEnd(pPap, nMyStartCp, nCellLevel-1);
//Bad Table, remain unchanged in level, e.g. #i19667#
if (!bHasRowEnd)
- nCellLevel = static_cast< BYTE >(nInTable);
+ nCellLevel = static_cast< sal_uInt8 >(nInTable);
if (bHasRowEnd && ParseTabPos(&aTabPos,pPap))
pTabPos = &aTabPos;
@@ -2219,10 +2224,10 @@ bool SwWW8ImplReader::ProcessSpecial(bool &rbReSync, WW8_CP nStartCp)
if( bAnl && !bTableRowEnd )
{
- const BYTE* pSprm13 = pPlcxMan->HasParaSprm( 13 );
+ const sal_uInt8* pSprm13 = pPlcxMan->HasParaSprm( 13 );
if( pSprm13 )
{ // Noch Anl ?
- BYTE nT = static_cast< BYTE >(GetNumType( *pSprm13 ));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType( *pSprm13 ));
if( ( nT != WW8_Pause && nT != nWwNumType ) // Anl-Wechsel
|| aApo.HasStartStop() // erzwungenes Anl-Ende
|| bStopTab || bStartTab )
@@ -2481,7 +2486,7 @@ sal_Size Custom8BitToUnicode(rtl_TextToUnicodeConverter hConverter,
return nDestChars;
}
-bool SwWW8ImplReader::LangUsesHindiNumbers(USHORT nLang)
+bool SwWW8ImplReader::LangUsesHindiNumbers(sal_uInt16 nLang)
{
bool bResult = false;
@@ -2559,11 +2564,11 @@ bool SwWW8ImplReader::ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs)
p8Bits = new sal_Char[nLen];
// read the stream data
- BYTE nBCode = 0;
- UINT16 nUCode;
+ sal_uInt8 nBCode = 0;
+ sal_uInt16 nUCode;
xub_StrLen nL2;
- USHORT nCTLLang = 0;
+ sal_uInt16 nCTLLang = 0;
const SfxPoolItem * pItem = GetFmtAttr(RES_CHRATR_CTL_LANGUAGE);
if (pItem != NULL)
nCTLLang = dynamic_cast<const SvxLanguageItem *>(pItem)->GetLanguage();
@@ -2830,7 +2835,7 @@ bool SwWW8ImplReader::ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd,
{
if( bSymbol ) // Spezialzeichen einfuegen
{
- for(USHORT nCh = 0; nCh < nEnd - rPos; ++nCh)
+ for(sal_uInt16 nCh = 0; nCh < nEnd - rPos; ++nCh)
{
rDoc.InsertString( *pPaM, cSymbol );
}
@@ -2863,11 +2868,11 @@ bool SwWW8ImplReader::HandlePageBreakChar()
if (!nInTable)
{
//xushanchuan add for issue106569
- BOOL IsTemp=TRUE;
+ sal_Bool IsTemp=sal_True;
SwTxtNode* pTemp = pPaM->GetNode()->GetTxtNode();
if ( pTemp && !( pTemp->GetTxt().Len() ) && ( bFirstPara || bFirstParaOfPage ) )
{
- IsTemp = FALSE;
+ IsTemp = sal_False;
AppendTxtNode(*pPaM->GetPoint());
pTemp->SetAttr(*GetDfltAttr(RES_PARATR_NUMRULE));
}
@@ -2905,8 +2910,8 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
// ob die korrekte FilePos nicht schon erreicht ist.
pStrm->Seek( pSBase->WW8Cp2Fc(nCpOfs+nPosCp, &bIsUnicode) );
- BYTE nBCode;
- UINT16 nWCharVal;
+ sal_uInt8 nBCode;
+ sal_uInt16 nWCharVal;
if( bIsUnicode )
*pStrm >> nWCharVal; // unicode --> read 2 bytes
else
@@ -3078,7 +3083,7 @@ bool SwWW8ImplReader::ReadChar(long nPosCp, long nCpOfs)
void SwWW8ImplReader::ProcessAktCollChange(WW8PLCFManResult& rRes,
bool* pStartAttr, bool bCallProcessSpecial)
{
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
nAktColl = pPlcxMan->GetColl();
// Invalid Style-Id
@@ -3185,7 +3190,7 @@ long SwWW8ImplReader::ReadTextAttr(WW8_CP& rTxtPos, bool& rbStartLine)
pCtrlStck->MarkAllAttrsOld();
bool bOldIgnoreText = bIgnoreText;
bIgnoreText = true;
- USHORT nOldColl = nAktColl;
+ sal_uInt16 nOldColl = nAktColl;
bool bDoPlcxManPlusPLus = true;
long nNext;
do
@@ -3258,12 +3263,12 @@ void SwWW8ImplReader::CloseAttrEnds()
{
//If there are any unclosed sprms then copy them to
//another stack and close the ones that must be closed
- std::stack<USHORT> aStack;
+ std::stack<sal_uInt16> aStack;
pPlcxMan->TransferOpenSprms(aStack);
while (!aStack.empty())
{
- USHORT nSprmId = aStack.top();
+ sal_uInt16 nSprmId = aStack.top();
if ((0 < nSprmId) && (( eFTN > nSprmId) || (0x0800 <= nSprmId)))
EndSprm(nSprmId);
aStack.pop();
@@ -3299,7 +3304,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
WW8_CP nNext = pPlcxMan->Where();
SwTxtNode* pPreviousNode = 0;
- BYTE nDropLines = 0;
+ sal_uInt8 nDropLines = 0;
SwCharFmt* pNewSwCharFmt = 0;
const SwCharFmt* pFmt = 0;
pStrm->Seek( pSBase->WW8Cp2Fc( nStartCp + nCpOfs, &bIsUnicode ) );
@@ -3342,7 +3347,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
aDrop.GetLines() = nDropLines;
aDrop.GetDistance() = nDistance;
- aDrop.GetChars() = writer_cast<BYTE>(nDropCapLen);
+ aDrop.GetChars() = writer_cast<sal_uInt8>(nDropCapLen);
// Word has no concept of a "whole word dropcap"
aDrop.GetWholeWord() = false;
@@ -3361,7 +3366,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// If we have found a dropcap store the textnode
pPreviousNode = pPaM->GetNode()->GetTxtNode();
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPlcxMan->GetPapPLCF()->HasSprm(46);
@@ -3373,7 +3378,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
else // There is no Drop Cap Specifier hence no dropcap
pPreviousNode = 0;
- if (const BYTE *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
+ if (const sal_uInt8 *pDistance = pPlcxMan->GetPapPLCF()->HasSprm(0x842F))
nDistance = SVBT16ToShort( pDistance );
else
nDistance = 0;
@@ -3405,7 +3410,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
// alle 64 CRs aufrufen not for Header u. ae.
if ((nCrCount++ & 0x40) == 0 && nType == MAN_MAINTEXT)
{
- nProgress = (USHORT)( l * 100 / nTextLen );
+ nProgress = (sal_uInt16)( l * 100 / nTextLen );
::SetProgressState(nProgress, mpDocShell); // Update
}
}
@@ -3459,7 +3464,7 @@ bool SwWW8ImplReader::ReadText(long nStartCp, long nTextLen, ManTypes nType)
# class SwWW8ImplReader
#**************************************************************************/
-SwWW8ImplReader::SwWW8ImplReader(BYTE nVersionPara, SvStorage* pStorage,
+SwWW8ImplReader::SwWW8ImplReader(sal_uInt8 nVersionPara, SvStorage* pStorage,
SvStream* pSt, SwDoc& rD, const String& rBaseURL, bool bNewDoc) :
mpDocShell(rD.GetDocShell()),
maTracer(*(mpDocShell->GetMedium())),
@@ -3692,7 +3697,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::FIRST_PAGE)
, 0, false);
rIter->mpTitlePage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3711,7 +3716,7 @@ SwFmtPageDesc wwSectionManager::SetSwFmtPageDesc(mySegIter &rIter,
}
else
{
- USHORT nPos = mrReader.rDoc.MakePageDesc(
+ sal_uInt16 nPos = mrReader.rDoc.MakePageDesc(
ViewShell::GetShellRes()->GetPageDescName(mnDesc, ShellResource::NORMAL_PAGE),
rIter->mpTitlePage, false);
rIter->mpPage = &mrReader.rDoc._GetPageDesc(nPos);
@@ -3802,7 +3807,7 @@ void wwSectionManager::InsertSegments()
bool bThisAndNextAreCompatible = (aNext != aEnd) ? ((aIter->GetPageWidth() == aNext->GetPageWidth()) &&
(aIter->GetPageHeight() == aNext->GetPageHeight()) && (aIter->IsLandScape() == aNext->IsLandScape())) : true;
- if ((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected)
+ if (((aNext != aEnd && aNext->IsContinous() && bThisAndNextAreCompatible) || bProtected))
{
bIgnoreCols = true;
if ((aIter->NoCols() > 1) || bProtected)
@@ -3859,8 +3864,7 @@ void wwSectionManager::InsertSegments()
}
const SwPosition* pPos = aSectPaM.GetPoint();
- const SwTxtNode* pSttNd =
- mrReader.rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
const SwTableNode* pTableNd = pSttNd ? pSttNd->FindTableNode() : 0;
if (pTableNd)
{
@@ -3923,8 +3927,8 @@ void wwSectionManager::InsertSegments()
SwFmtPageDesc aDesc(SetSwFmtPageDesc(aIter, aStart, true));
if (aDesc.GetPageDesc())
{
- ULONG nStart = aSectPaM.Start()->nNode.GetIndex();
- ULONG nEnd = aSectPaM.End()->nNode.GetIndex();
+ sal_uLong nStart = aSectPaM.Start()->nNode.GetIndex();
+ sal_uLong nEnd = aSectPaM.End()->nNode.GetIndex();
for(; nStart <= nEnd; ++nStart)
{
SwNode* pNode = mrReader.rDoc.GetNodes()[nStart];
@@ -4202,9 +4206,9 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF
return bRes;
}
-ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
+sal_uLong SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (mbNewDoc && pStg && !pGloss)
ReadDocInfo();
@@ -4257,7 +4261,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SwNodeIndex aSttNdIdx( rDoc.GetNodes() );
SwRelNumRuleSpaces aRelNumRule(rDoc, mbNewDoc);
- USHORT eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
+ sal_uInt16 eMode = nsRedlineMode_t::REDLINE_SHOW_INSERT;
mpSprmParser = new wwSprmParser(pWwFib->GetFIBVersion());
@@ -4390,10 +4394,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
// evtl. Zeilen eingefuegt / aufgebrochen werden
//
const SwPosition* pPos = pPaM->GetPoint();
- const SwTxtNode* pSttNd =
- rDoc.GetNodes()[ pPos->nNode ]->GetTxtNode();
+ SwTxtNode const*const pSttNd = pPos->nNode.GetNode().GetTxtNode();
- USHORT nCntPos = pPos->nContent.GetIndex();
+ sal_uInt16 nCntPos = pPos->nContent.GetIndex();
// EinfuegePos nicht in leerer Zeile
if( nCntPos && pSttNd->GetTxt().Len() )
@@ -4406,7 +4409,7 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
}
// verhinder das Einlesen von Tabellen in Fussnoten / Tabellen
- ULONG nNd = pPos->nNode.GetIndex();
+ sal_uLong nNd = pPos->nNode.GetIndex();
bReadNoTbl = 0 != pSttNd->FindTableNode() ||
( nNd < rDoc.GetNodes().GetEndOfInserts().GetIndex() &&
rDoc.GetNodes().GetEndOfInserts().StartOfSectionIndex()
@@ -4507,9 +4510,9 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
SvxMSDffShapeTxBxSort aTxBxSort;
// korrekte Z-Order der eingelesen Escher-Objekte sicherstellen
- USHORT nShapeCount = pMSDffManager->GetShapeOrders()->Count();
+ sal_uInt16 nShapeCount = pMSDffManager->GetShapeOrders()->Count();
- for (USHORT nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
+ for (sal_uInt16 nShapeNum=0; nShapeNum < nShapeCount; nShapeNum++)
{
SvxMSDffShapeOrder *pOrder =
pMSDffManager->GetShapeOrders()->GetObject(nShapeNum);
@@ -4518,11 +4521,11 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
aTxBxSort.Insert(pOrder);
}
// zu verkettende Rahmen jetzt verketten
- USHORT nTxBxCount = aTxBxSort.Count();
+ sal_uInt16 nTxBxCount = aTxBxSort.Count();
if( nTxBxCount )
{
SwFmtChain aChain;
- for (USHORT nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
+ for (sal_uInt16 nTxBxNum=0; nTxBxNum < nTxBxCount; nTxBxNum++)
{
SvxMSDffShapeOrder *pOrder =
aTxBxSort.GetObject(nTxBxNum);
@@ -4614,10 +4617,10 @@ ULONG SwWW8ImplReader::CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos)
return nErrRet;
}
-ULONG SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
+sal_uLong SwWW8ImplReader::SetSubStreams(SvStorageStreamRef &rTableStream,
SvStorageStreamRef &rDataStream)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
// 6 stands for "6 OR 7", 7 stand for "ONLY 7"
switch (pWwFib->nVersion)
{
@@ -4692,18 +4695,18 @@ namespace
void DecryptXOR(msfilter::MSCodec_XorWord95 &rCtx, SvStream &rIn, SvStream &rOut)
{
- ULONG nSt = rIn.Tell();
+ sal_uLong nSt = rIn.Tell();
rIn.Seek(STREAM_SEEK_TO_END);
- ULONG nLen = rIn.Tell();
+ sal_uLong nLen = rIn.Tell();
rIn.Seek(nSt);
rCtx.InitCipher();
rCtx.Skip(nSt);
sal_uInt8 in[0x4096];
- for (ULONG nI = nSt; nI < nLen; nI += 0x4096)
+ for (sal_uLong nI = nSt; nI < nLen; nI += 0x4096)
{
- ULONG nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
+ sal_uLong nBS = (nLen - nI > 0x4096 ) ? 0x4096 : nLen - nI;
rIn.Read(in, nBS);
rCtx.Decode(in, nBS);
rOut.Write(in, nBS);
@@ -4720,7 +4723,7 @@ namespace
const SfxItemSet* pSet = rMedium.GetItemSet();
const SfxPoolItem *pPasswordItem;
- if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, TRUE, &pPasswordItem))
+ if(pSet && SFX_ITEM_SET == pSet->GetItemState(SID_PASSWORD, sal_True, &pPasswordItem))
aPassw = ((const SfxStringItem *)pPasswordItem)->GetValue();
else
{
@@ -4748,11 +4751,95 @@ namespace
return aPassw;
}
+ uno::Sequence< beans::NamedValue > InitXorWord95Codec( ::msfilter::MSCodec_XorWord95& rCodec, SfxMedium& rMedium, WW8Fib* pWwFib )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ ByteString sPassword(sUniPassword, WW8Fib::GetFIBCharset( pWwFib->chseTables ) );
+
+ xub_StrLen nLen = sPassword.Len();
+ if( nLen <= 15 )
+ {
+ sal_uInt8 pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+
+ for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
+ pPassword[nChar] = sPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword );
+ aEncryptionData = rCodec.GetEncryptionData();
+
+ // the export supports RC4 algorithm only, so we have to generate the related EncryptionData as well,
+ // so that Save can export the document without asking for a password;
+ // as result there will be EncryptionData for both algorithms in the MediaDescriptor
+ ::msfilter::MSCodec_Std97 aCodec97;
+
+ // Generate random number with a seed of time as salt.
+ TimeValue aTime;
+ osl_getSystemTime( &aTime );
+ rtlRandomPool aRandomPool = rtl_random_createPool();
+ rtl_random_addBytes ( aRandomPool, &aTime, 8 );
+
+ sal_uInt8 pDocId[ 16 ];
+ rtl_random_getBytes( aRandomPool, pDocId, 16 );
+
+ rtl_random_destroyPool( aRandomPool );
+
+ sal_uInt16 pStd97Pass[16];
+ memset( pStd97Pass, 0, sizeof( pStd97Pass ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pStd97Pass[nChar] = sUniPassword.GetChar(nChar);
+
+ aCodec97.InitKey( pStd97Pass, pDocId );
+
+ // merge the EncryptionData, there should be no conflicts
+ ::comphelper::SequenceAsHashMap aEncryptionHash( aEncryptionData );
+ aEncryptionHash.update( ::comphelper::SequenceAsHashMap( aCodec97.GetEncryptionData() ) );
+ aEncryptionHash >> aEncryptionData;
+ }
+ }
+
+ return aEncryptionData;
+ }
+
+ uno::Sequence< beans::NamedValue > InitStd97Codec( ::msfilter::MSCodec_Std97& rCodec, sal_uInt8 pDocId[16], SfxMedium& rMedium )
+ {
+ uno::Sequence< beans::NamedValue > aEncryptionData;
+ SFX_ITEMSET_ARG( rMedium.GetItemSet(), pEncryptionData, SfxUnoAnyItem, SID_ENCRYPTIONDATA, sal_False );
+ if ( pEncryptionData && ( pEncryptionData->GetValue() >>= aEncryptionData ) && !rCodec.InitCodec( aEncryptionData ) )
+ aEncryptionData.realloc( 0 );
+
+ if ( !aEncryptionData.getLength() )
+ {
+ String sUniPassword = QueryPasswordForMedium( rMedium );
+
+ xub_StrLen nLen = sUniPassword.Len();
+ if ( nLen <= 15 )
+ {
+ sal_Unicode pPassword[16];
+ memset( pPassword, 0, sizeof( pPassword ) );
+ for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
+ pPassword[nChar] = sUniPassword.GetChar(nChar);
+
+ rCodec.InitKey( pPassword, pDocId );
+ aEncryptionData = rCodec.GetEncryptionData();
+ }
+ }
+
+ return aEncryptionData;
+ }
}
-ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
if (pGloss)
pWwFib = pGloss->GetFib();
else
@@ -4801,31 +4888,22 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
if (bDecrypt)
{
nErrRet = ERRCODE_SVX_WRONGPASS;
- switch (eAlgo)
+ SfxMedium* pMedium = mpDocShell->GetMedium();
+
+ if ( pMedium )
{
- default:
- nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
- break;
- case XOR:
+ switch (eAlgo)
{
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- ByteString sPassword(sUniPassword,
- WW8Fib::GetFIBCharset(pWwFib->chseTables));
-
- xub_StrLen nLen = sPassword.Len();
- // DR: do not cut a wrong (too long) password
- if( nLen <= 15 )
+ default:
+ nErrRet = ERRCODE_SVX_READ_FILTER_CRYPT;
+ break;
+ case XOR:
{
- sal_uInt8 aPassword[16] = {0};
-
- for (xub_StrLen nChar = 0; nChar < sPassword.Len(); ++nChar )
- aPassword[nChar] = sPassword.GetChar(nChar);
-
msfilter::MSCodec_XorWord95 aCtx;
- aCtx.InitKey(aPassword);
- if (aCtx.VerifyKey(pWwFib->nKey, pWwFib->nHash))
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitXorWord95Codec( aCtx, *pMedium, pWwFib );
+
+ // if initialization has failed the EncryptionData should be empty
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( pWwFib->nKey, pWwFib->nHash ) )
{
nErrRet = 0;
pTempMain = MakeTemp(aDecryptMain);
@@ -4857,22 +4935,15 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptXOR(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
- }
- break;
- case RC4:
- {
- String sUniPassword =
- QueryPasswordForMedium(*(mpDocShell->GetMedium()));
-
- xub_StrLen nLen = sUniPassword.Len();
- // DR: do not cut a wrong (too long) password
- if (nLen <= 15)
+ break;
+ case RC4:
{
- sal_Unicode aPassword[16] = {0};
- for (xub_StrLen nChar = 0; nChar < nLen; ++nChar )
- aPassword[nChar] = sUniPassword.GetChar(nChar);
+ msfilter::MSCodec_Std97 aCtx;
sal_uInt8 aDocId[ 16 ];
pTableStream->Read(aDocId, 16);
@@ -4881,9 +4952,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
sal_uInt8 aSaltHash[ 16 ];
pTableStream->Read(aSaltHash, 16);
- msfilter::MSCodec_Std97 aCtx;
- aCtx.InitKey(aPassword, aDocId);
- if (aCtx.VerifyKey(aSaltData, aSaltHash))
+ // if initialization has failed the EncryptionData should be empty
+ uno::Sequence< beans::NamedValue > aEncryptionData = InitStd97Codec( aCtx, aDocId, *pMedium );
+ if ( aEncryptionData.getLength() && aCtx.VerifyKey( aSaltData, aSaltHash ) )
{
nErrRet = 0;
@@ -4913,17 +4984,13 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
DecryptRC4(aCtx, *pDataStream, aDecryptData);
pDataStream = &aDecryptData;
}
- SfxMedium* pMedium = mpDocShell->GetMedium();
- if ( pMedium )
- {
- SfxItemSet* pSet = pMedium->GetItemSet();
- if ( pSet )
- pSet->Put( SfxStringItem(SID_PASSWORD, sUniPassword) );
- }
+
+ pMedium->GetItemSet()->ClearItem( SID_PASSWORD );
+ pMedium->GetItemSet()->Put( SfxUnoAnyItem( SID_ENCRYPTIONDATA, uno::makeAny( aEncryptionData ) ) );
}
}
+ break;
}
- break;
}
if (nErrRet == 0)
@@ -4952,9 +5019,9 @@ ULONG SwWW8ImplReader::LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss)
class outlineeq : public std::unary_function<const SwTxtFmtColl*, bool>
{
private:
- BYTE mnNum;
+ sal_uInt8 mnNum;
public:
- outlineeq(BYTE nNum) : mnNum(nNum) {}
+ outlineeq(sal_uInt8 nNum) : mnNum(nNum) {}
bool operator()(const SwTxtFmtColl *pTest) const
{
return pTest->IsAssignedToListLevelOfOutlineStyle() && pTest->GetAssignedOutlineStyleLevel() == mnNum; //<-end,zhaojianwei
@@ -4984,7 +5051,7 @@ void SwWW8ImplReader::SetOutLineStyles()
If we are inserted into a document then don't clobber existing existing
levels.
*/
- USHORT nFlagsStyleOutlLevel = 0;
+ sal_uInt16 nFlagsStyleOutlLevel = 0;
if (!mbNewDoc)
{
// #i70748# - backward iteration needed due to the outline level attribute
@@ -5010,9 +5077,9 @@ void SwWW8ImplReader::SetOutLineStyles()
// instead of the memory pointer of the outline numbering rule
// to assure that, if two outline numbering rule affect the same
// count of text formats, always the same outline numbering rule is chosen.
- std::map<USHORT, int>aRuleMap;
- typedef std::map<USHORT, int>::iterator myIter;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ std::map<sal_uInt16, int>aRuleMap;
+ typedef std::map<sal_uInt16, int>::iterator myIter;
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[ nI ];
if (
@@ -5062,15 +5129,15 @@ void SwWW8ImplReader::SetOutLineStyles()
}
}
- USHORT nOldFlags = nFlagsStyleOutlLevel;
+ sal_uInt16 nOldFlags = nFlagsStyleOutlLevel;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
{
- USHORT nAktFlags = 1 << rSI.nOutlineLevel;
+ sal_uInt16 nAktFlags = 1 << rSI.nOutlineLevel;
if (
(nAktFlags & nFlagsStyleOutlLevel) ||
(rSI.pOutlineNumrule != mpChosenOutlineNumRule)
@@ -5118,8 +5185,8 @@ void SwWW8ImplReader::SetOutLineStyles()
physical mapping into the list style reged on that outline
style.
*/
- BYTE nFromLevel = rSI.nListLevel;
- BYTE nToLevel = rSI.nOutlineLevel;
+ sal_uInt8 nFromLevel = rSI.nListLevel;
+ sal_uInt8 nToLevel = rSI.nOutlineLevel;
const SwNumFmt& rRule=rSI.pOutlineNumrule->Get(nFromLevel);
aOutlineRule.Set(nToLevel, rRule);
((SwTxtFmtColl*)rSI.pFmt)->AssignToListLevelOfOutlineStyle(nToLevel); //<-end,zhaojianwei
@@ -5155,12 +5222,12 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
if( bVer67 )
{
mpAtnNames->push_back(WW8ReadPString(rStrm, false));
- nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + BYTE Count
+ nRead += mpAtnNames->rbegin()->Len() + 1; // Laenge + sal_uInt8 Count
}
else
{
mpAtnNames->push_back(WW8Read_xstz(rStrm, 0, false));
- // UNICode: doppelte Laenge + USHORT Count
+ // UNICode: doppelte Laenge + sal_uInt16 Count
nRead += mpAtnNames->rbegin()->Len() * 2 + 2;
}
}
@@ -5173,9 +5240,9 @@ const String* SwWW8ImplReader::GetAnnotationAuthor(sal_uInt16 nIdx)
return pRet;
}
-ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
+sal_uLong SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
{
- ULONG nErrRet = 0;
+ sal_uLong nErrRet = 0;
{
static const sal_Char* aNames[ 13 ] = {
@@ -5206,7 +5273,7 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
m_bRegardHindiDigits = aVal[ 12 ] > 0;
}
- UINT16 nMagic;
+ sal_uInt16 nMagic;
*pStrm >> nMagic;
// beachte: 6 steht fuer "6 ODER 7", 7 steht fuer "NUR 7"
@@ -5222,10 +5289,10 @@ ULONG SwWW8ImplReader::LoadDoc( SwPaM& rPaM,WW8Glossary *pGloss)
// teste auf eigenen 97-Fake!
if (pStg && 0xa5ec == nMagic)
{
- ULONG nCurPos = pStrm->Tell();
+ sal_uLong nCurPos = pStrm->Tell();
if (pStrm->Seek(nCurPos + 22))
{
- UINT32 nfcMin;
+ sal_uInt32 nfcMin;
*pStrm >> nfcMin;
if (0x300 != nfcMin)
nErrRet = ERR_WW6_NO_WW6_FILE_ERR;
@@ -5259,9 +5326,9 @@ extern "C" SAL_DLLPUBLIC_EXPORT Reader* SAL_CALL ImportDOC()
return new WW8Reader();
}
-ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
+sal_uLong WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize )
{
- ULONG nRet = ERR_SWG_READ_ERROR;
+ sal_uLong nRet = ERR_SWG_READ_ERROR;
OSL_ENSURE( pStg, "wo ist mein Storage?" );
rRef = pStg->OpenSotStream(
rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("WordDocument")),
@@ -5271,7 +5338,7 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
{
if( SVSTREAM_OK == rRef->GetError() )
{
- USHORT nOld = rRef->GetBufferSize();
+ sal_uInt16 nOld = rRef->GetBufferSize();
rRef->SetBufferSize( rBuffSize );
rBuffSize = nOld;
nRet = 0;
@@ -5282,17 +5349,17 @@ ULONG WW8Reader::OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize )
return nRet;
}
-ULONG WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
+sal_uLong WW8Reader::Read(SwDoc &rDoc, const String& rBaseURL, SwPaM &rPam, const String & /* FileName */)
{
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
bool bNew = !bInsertMode; // Neues Doc ( kein Einfuegen )
SvStorageStreamRef refStrm; // damit uns keiner den Stream klaut
SvStream* pIn = pStrm;
- ULONG nRet = 0;
- BYTE nVersion = 8;
+ sal_uLong nRet = 0;
+ sal_uInt8 nVersion = 8;
String sFltName = GetFltName();
if( sFltName.EqualsAscii( "WW6" ) )
@@ -5363,18 +5430,18 @@ int WW8Reader::GetReaderType()
return SW_STORAGE_READER | SW_STREAM_READER;
}
-BOOL WW8Reader::HasGlossaries() const
+sal_Bool WW8Reader::HasGlossaries() const
{
return true;
}
-BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
+sal_Bool WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, sal_Bool bSaveRelFiles) const
{
bool bRet=false;
WW8Reader *pThis = const_cast<WW8Reader *>(this);
- USHORT nOldBuffSize = 32768;
+ sal_uInt16 nOldBuffSize = 32768;
SvStorageStreamRef refStrm;
if (!pThis->OpenMainStream(refStrm, nOldBuffSize))
{
@@ -5384,7 +5451,7 @@ BOOL WW8Reader::ReadGlossaries(SwTextBlocks& rBlocks, BOOL bSaveRelFiles) const
return bRet ? true : false;
}
-BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
+sal_Bool SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, uno::Reference < embed::XStorage >& rDestStorage) const
{
bool bRet = false;
@@ -5425,12 +5492,12 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
if (aDesc.nSprmsLen && aDesc.pMemPos) // Attribut(e) vorhanden
{
long nLen = aDesc.nSprmsLen;
- const BYTE* pSprm = aDesc.pMemPos;
+ const sal_uInt8* pSprm = aDesc.pMemPos;
while (nLen >= 2 && !nPictureId)
{
- USHORT nId = aSprmParser.GetSprmId(pSprm);
- USHORT nSL = aSprmParser.GetSprmSize(nId, pSprm);
+ sal_uInt16 nId = aSprmParser.GetSprmId(pSprm);
+ sal_uInt16 nSL = aSprmParser.GetSprmSize(nId, pSprm);
if( nLen < nSL )
break; // nicht mehr genug Bytes uebrig
@@ -5469,7 +5536,7 @@ BOOL SwMSDffManager::GetOLEStorageName(long nOLEId, String& rStorageName,
return bRet;
}
-BOOL SwMSDffManager::ShapeHasText(ULONG, ULONG) const
+sal_Bool SwMSDffManager::ShapeHasText(sal_uLong, sal_uLong) const
{
// Zur Zeit des Einlesens einer einzelnen Box, die womoeglich Teil einer
// Gruppe ist, liegen noch nicht genuegend Informationen vor, um
diff --git a/sw/source/filter/ww8/ww8par.hxx b/sw/source/filter/ww8/ww8par.hxx
index 08698e63a301..2851b8860a3a 100644
--- a/sw/source/filter/ww8/ww8par.hxx
+++ b/sw/source/filter/ww8/ww8par.hxx
@@ -147,13 +147,13 @@ SV_DECL_PTRARR_SORT_DEL(WW8OleMaps, WW8OleMap_Ptr,16,16)
class WW8Reader : public StgReader
{
- virtual ULONG Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
- ULONG OpenMainStream( SvStorageStreamRef& rRef, USHORT& rBuffSize );
+ virtual sal_uLong Read(SwDoc &, const String& rBaseURL, SwPaM &,const String &);
+ sal_uLong OpenMainStream( SvStorageStreamRef& rRef, sal_uInt16& rBuffSize );
public:
virtual int GetReaderType();
- virtual BOOL HasGlossaries() const;
- virtual BOOL ReadGlossaries( SwTextBlocks&, BOOL bSaveRelFiles ) const;
+ virtual sal_Bool HasGlossaries() const;
+ virtual sal_Bool ReadGlossaries( SwTextBlocks&, sal_Bool bSaveRelFiles ) const;
};
struct WW8OleMap
@@ -187,7 +187,7 @@ public:
enum ListLevel {nMinLevel=1, nMaxLevel=9};
//the rParaSprms returns back the original word paragraph indent
//sprms which were attached to the original numbering format
- SwNumRule* GetNumRuleForActivation(USHORT nLFOPosition, const BYTE nLevel,
+ SwNumRule* GetNumRuleForActivation(sal_uInt16 nLFOPosition, const sal_uInt8 nLevel,
std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode=0);
SwNumRule* CreateNextRule(bool bSimple);
~WW8ListManager();
@@ -199,12 +199,12 @@ private:
SvStream& rSt;
std::vector<WW8LSTInfo* > maLSTInfos;
WW8LFOInfos* pLFOInfos;// D. aus PLF LFO, sortiert genau wie im WW8 Stream
- USHORT nUniqueList; // current number for creating unique list names
- BYTE* GrpprlHasSprm(USHORT nId, BYTE& rSprms, BYTE nLen);
+ sal_uInt16 nUniqueList; // current number for creating unique list names
+ sal_uInt8* GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms, sal_uInt8 nLen);
WW8LSTInfo* GetLSTByListId( sal_uInt32 nIdLst ) const;
//the rParaSprms returns back the original word paragraph indent
//sprms which are attached to this numbering level
- bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, USHORT nLevelStyle,
+ bool ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet, sal_uInt16 nLevelStyle,
bool bSetStartNo, std::deque<bool> &rNotReallyThere, sal_uInt16 nLevel,
std::vector<sal_uInt8> &rParaSprms);
@@ -213,7 +213,7 @@ private:
// Zeichen Style Pointer
typedef SwCharFmt* WW8aCFmt[nMaxLevel];
- void AdjustLVL(BYTE nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
+ void AdjustLVL(sal_uInt8 nLevel, SwNumRule& rNumRule, WW8aISet& rListItemSet,
WW8aCFmt& aCharFmt, bool& bNewCharFmtCreated,
String aPrefix = aEmptyStr);
@@ -230,8 +230,8 @@ class SwWW8FltControlStack : public SwFltControlStack
{
private:
SwWW8ImplReader& rReader;
- USHORT nToggleAttrFlags;
- USHORT nToggleBiDiAttrFlags;
+ sal_uInt16 nToggleAttrFlags;
+ sal_uInt16 nToggleBiDiAttrFlags;
//No copying
SwWW8FltControlStack(const SwWW8FltControlStack&);
SwWW8FltControlStack& operator=(const SwWW8FltControlStack&);
@@ -242,16 +242,16 @@ protected:
SwFltStackEntry* pEntry);
public:
- SwWW8FltControlStack(SwDoc* pDo, ULONG nFieldFl, SwWW8ImplReader& rReader_ )
+ SwWW8FltControlStack(SwDoc* pDo, sal_uLong nFieldFl, SwWW8ImplReader& rReader_ )
: SwFltControlStack( pDo, nFieldFl ), rReader( rReader_ ),
nToggleAttrFlags(0), nToggleBiDiAttrFlags(0)
{}
void NewAttr(const SwPosition& rPos, const SfxPoolItem& rAttr);
- virtual void SetAttr(const SwPosition& rPos, USHORT nAttrId=0, BOOL bTstEnde=TRUE, long nHand=LONG_MAX, BOOL consumedByField=FALSE);
+ virtual void SetAttr(const SwPosition& rPos, sal_uInt16 nAttrId=0, sal_Bool bTstEnde=sal_True, long nHand=LONG_MAX, sal_Bool consumedByField=sal_False);
- void SetToggleAttr(BYTE nId, bool bOn)
+ void SetToggleAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleAttrFlags |= (1 << nId);
@@ -259,9 +259,9 @@ public:
nToggleAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleAttrFlags() const { return nToggleAttrFlags; }
+ sal_uInt16 GetToggleAttrFlags() const { return nToggleAttrFlags; }
- void SetToggleBiDiAttr(BYTE nId, bool bOn)
+ void SetToggleBiDiAttr(sal_uInt8 nId, bool bOn)
{
if( bOn )
nToggleBiDiAttrFlags |= (1 << nId);
@@ -269,12 +269,12 @@ public:
nToggleBiDiAttrFlags &= ~(1 << nId);
}
- USHORT GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
- void SetToggleAttrFlags(USHORT nFlags) { nToggleAttrFlags = nFlags; }
- void SetToggleBiDiAttrFlags(USHORT nFlags) {nToggleBiDiAttrFlags = nFlags;}
+ sal_uInt16 GetToggleBiDiAttrFlags() const { return nToggleBiDiAttrFlags; }
+ void SetToggleAttrFlags(sal_uInt16 nFlags) { nToggleAttrFlags = nFlags; }
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags) {nToggleBiDiAttrFlags = nFlags;}
- const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, USHORT nWhich);
- const SfxPoolItem* GetStackAttr(const SwPosition& rPos, USHORT nWhich);
+ const SfxPoolItem* GetFmtAttr(const SwPosition& rPos, sal_uInt16 nWhich);
+ const SfxPoolItem* GetStackAttr(const SwPosition& rPos, sal_uInt16 nWhich);
};
//The only thing this is for is RES_FLTR_ANCHOR, anything else is an error.
@@ -283,7 +283,7 @@ public:
class SwWW8FltAnchorStack : public SwFltControlStack
{
public:
- SwWW8FltAnchorStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltAnchorStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltControlStack( pDo, nFieldFl ) {}
void AddAnchor(const SwPosition& rPos,SwFrmFmt *pFmt);
void Flush();
@@ -312,10 +312,10 @@ private:
class SwWW8FltRefStack : public SwFltEndStack
{
public:
- SwWW8FltRefStack(SwDoc* pDo, ULONG nFieldFl)
+ SwWW8FltRefStack(SwDoc* pDo, sal_uLong nFieldFl)
: SwFltEndStack( pDo, nFieldFl )
{}
- bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, USHORT& rBkmNo);
+ bool IsFtnEdnBkmField(const SwFmtFld& rFmtFld, sal_uInt16& rBkmNo);
struct ltstr
{
@@ -369,7 +369,7 @@ class FieldEntry
public:
sw::hack::Position maStartPos;
sal_uInt16 mnFieldId;
- ULONG mnObjLocFc;
+ sal_uLong mnObjLocFc;
FieldEntry(SwPosition &rPos, sal_uInt16 nFieldId) throw();
FieldEntry(const FieldEntry &rOther) throw();
FieldEntry &operator=(const FieldEntry &rOther) throw();
@@ -408,7 +408,7 @@ private:
const SwNumRule* mpPrevNumRule;
WW8TabDesc* mpTableDesc;
int mnInTable;
- USHORT mnAktColl;
+ sal_uInt16 mnAktColl;
sal_Unicode mcSymbol;
bool mbIgnoreText;
bool mbSymbol;
@@ -464,19 +464,19 @@ public:
fUnused(0), nSize(0), hpsCheckBox(20), nChecked(0)
{
}
- UINT8 fUnknown:2;
- UINT8 fDropdownIndex:6;
- UINT8 fToolTip:1;
- UINT8 fNoMark:1;
- UINT8 fUseSize:1;
- UINT8 fNumbersOnly:1;
- UINT8 fDateOnly:1;
- UINT8 fUnused:3;
- UINT16 nSize;
-
- UINT16 hpsCheckBox;
- UINT16 nChecked;
- UINT16 nDefaultChecked;
+ sal_uInt8 fUnknown:2;
+ sal_uInt8 fDropdownIndex:6;
+ sal_uInt8 fToolTip:1;
+ sal_uInt8 fNoMark:1;
+ sal_uInt8 fUseSize:1;
+ sal_uInt8 fNumbersOnly:1;
+ sal_uInt8 fDateOnly:1;
+ sal_uInt8 fUnused:3;
+ sal_uInt16 nSize;
+
+ sal_uInt16 hpsCheckBox;
+ sal_uInt16 nChecked;
+ sal_uInt16 nDefaultChecked;
String sTitle;
String sDefault;
@@ -550,7 +550,7 @@ public:
com::sun::star::form::XFormComponent >& rFComp,
const ::com::sun::star::awt::Size& rSize,
com::sun::star::uno::Reference <
- com::sun::star::drawing::XShape > *pShape,BOOL bFloatingCtrl);
+ com::sun::star::drawing::XShape > *pShape,sal_Bool bFloatingCtrl);
bool ExportControl(WW8Export &rWrt, const SdrObject *pObj);
};
@@ -561,9 +561,9 @@ private:
SvStream *pFallbackStream;
List *pOldEscherBlipCache;
- virtual BOOL GetOLEStorageName( long nOLEId, String& rStorageName,
+ virtual sal_Bool GetOLEStorageName( long nOLEId, String& rStorageName,
SvStorageRef& rSrcStorage, com::sun::star::uno::Reference < com::sun::star::embed::XStorage >& rDestStorage ) const;
- virtual BOOL ShapeHasText( ULONG nShapeId, ULONG nFilePos ) const;
+ virtual sal_Bool ShapeHasText( sal_uLong nShapeId, sal_uLong nFilePos ) const;
// #i32596# - new parameter <_nCalledByGroup>, which
// indicates, if the OLE object is imported inside a group object
virtual SdrObject* ImportOLE( long nOLEId,
@@ -578,9 +578,9 @@ private:
SwMSDffManager(const SwMSDffManager&);
SwMSDffManager& operator=(const SwMSDffManager&);
public:
- static UINT32 GetFilterFlags();
- static INT32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
- INT32 &rThick);
+ static sal_uInt32 GetFilterFlags();
+ static sal_Int32 GetEscherLineMatch(MSO_LineStyle eStyle, MSO_SPT eShapeType,
+ sal_Int32 &rThick);
SwMSDffManager( SwWW8ImplReader& rRdr );
void DisableFallbackStream();
void EnableFallbackStream();
@@ -606,7 +606,7 @@ public:
sal_uInt32 nPgLeft;
sal_uInt32 nPgRight;
- BYTE mnBorders;
+ sal_uInt8 mnBorders;
bool mbHasFootnote;
void SetDirection();
void SetLinkId(short sLinkId) { mLinkId = sLinkId; }
@@ -694,7 +694,7 @@ public:
bool CurrentSectionIsVertical() const;
bool CurrentSectionIsProtected() const;
void PrependedInlineNode(const SwPosition &rPos, const SwNode &rNode);
- USHORT CurrentSectionColCount() const;
+ sal_uInt16 CurrentSectionColCount() const;
bool WillHavePageDescHere(SwNodeIndex aIdx) const;
void CreateSep(const long nTxtPos, bool bMustHaveBreak);
void InsertSegments();
@@ -752,8 +752,8 @@ struct ApoTestResults
{
bool mbStartApo;
bool mbStopApo;
- const BYTE* mpSprm37;
- const BYTE* mpSprm29;
+ const sal_uInt8* mpSprm37;
+ const sal_uInt8* mpSprm29;
WW8FlyPara* mpStyleApo;
ApoTestResults() :
mbStartApo(false), mbStopApo(false), mpSprm37(0), mpSprm29(0),
@@ -766,8 +766,8 @@ struct ANLDRuleMap
{
SwNumRule* mpOutlineNumRule; // WinWord 6 numbering, varient 1
SwNumRule* mpNumberingNumRule; // WinWord 6 numbering, varient 2
- SwNumRule* GetNumRule(BYTE nNumType);
- void SetNumRule(SwNumRule*, BYTE nNumType);
+ SwNumRule* GetNumRule(sal_uInt8 nNumType);
+ void SetNumRule(SwNumRule*, sal_uInt8 nNumType);
ANLDRuleMap() : mpOutlineNumRule(0), mpNumberingNumRule(0) {}
};
@@ -981,29 +981,29 @@ private:
String sBaseURL;
// Ini-Flags:
- ULONG nIniFlags; // Flags aus der writer.ini
- ULONG nIniFlags1; // dito ( zusaetzliche Flags )
- ULONG nFieldFlags; // dito fuer Feldern
- ULONG nFieldTagAlways[3]; // dito fuers Taggen von Feldern
- ULONG nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
+ sal_uLong nIniFlags; // Flags aus der writer.ini
+ sal_uLong nIniFlags1; // dito ( zusaetzliche Flags )
+ sal_uLong nFieldFlags; // dito fuer Feldern
+ sal_uLong nFieldTagAlways[3]; // dito fuers Taggen von Feldern
+ sal_uLong nFieldTagBad[3]; // dito fuers Taggen von nicht importierbaren F.
bool m_bRegardHindiDigits; // import digits in CTL scripts as Hindi numbers
WW8_CP nDrawCpO; // Anfang der Txbx-SubDocs
- ULONG nPicLocFc; // Picture Location in File (FC)
- ULONG nObjLocFc; // Object Location in File (FC)
+ sal_uLong nPicLocFc; // Picture Location in File (FC)
+ sal_uLong nObjLocFc; // Object Location in File (FC)
- INT32 nIniFlyDx; // X-Verschiebung von Flys
- INT32 nIniFlyDy; // Y-Verschiebung von Flys
+ sal_Int32 nIniFlyDx; // X-Verschiebung von Flys
+ sal_Int32 nIniFlyDy; // Y-Verschiebung von Flys
rtl_TextEncoding eTextCharSet; // Default charset for Text
rtl_TextEncoding eStructCharSet; // rtl_TextEncoding for structures
rtl_TextEncoding eHardCharSet; // Hard rtl_TextEncoding-Attribute
- USHORT nProgress; // %-Angabe fuer Progressbar
- USHORT nColls; // Groesse des Arrays
- USHORT nAktColl; // gemaess WW-Zaehlung
- USHORT nFldNum; // laufende Nummer dafuer
- USHORT nLFOPosition;
+ sal_uInt16 nProgress; // %-Angabe fuer Progressbar
+ sal_uInt16 nColls; // Groesse des Arrays
+ sal_uInt16 nAktColl; // gemaess WW-Zaehlung
+ sal_uInt16 nFldNum; // laufende Nummer dafuer
+ sal_uInt16 nLFOPosition;
short nCharFmt; // gemaess WW-Zaehlung, <0 fuer keine
@@ -1013,16 +1013,16 @@ private:
sal_Unicode cSymbol; // aktuell einzulesendes Symbolzeichen
- BYTE nWantedVersion; // urspruenglich vom Writer
+ sal_uInt8 nWantedVersion; // urspruenglich vom Writer
// angeforderte WW-Doc-Version
- BYTE nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
- BYTE nWwNumType; // Gliederung / Nummerg / Aufzaehlg
- BYTE nListLevel;
+ sal_uInt8 nSwNumLevel; // LevelNummer fuer Outline / Nummerierung
+ sal_uInt8 nWwNumType; // Gliederung / Nummerg / Aufzaehlg
+ sal_uInt8 nListLevel;
- BYTE nPgChpDelim; // ChapterDelim from PageNum
- BYTE nPgChpLevel; // ChapterLevel of Heading from PageNum
+ sal_uInt8 nPgChpDelim; // ChapterDelim from PageNum
+ sal_uInt8 nPgChpLevel; // ChapterLevel of Heading from PageNum
bool mbNewDoc; // Neues Dokument ?
bool bReadNoTbl; // Keine Tabellen
@@ -1087,10 +1087,10 @@ private:
//---------------------------------------------
- const SprmReadInfo& GetSprmReadInfo(USHORT nId) const;
+ const SprmReadInfo& GetSprmReadInfo(sal_uInt16 nId) const;
bool StyleExists(int nColl) const { return (nColl < nColls); }
- SwWW8StyInf *GetStyle(USHORT nColl) const;
+ SwWW8StyInf *GetStyle(sal_uInt16 nColl) const;
void AppendTxtNode(SwPosition& rPos);
void Read_HdFt(bool bIsTitle, int nSect, const SwPageDesc *pPrev,
@@ -1101,12 +1101,12 @@ private:
bool isValid_HdFt_CP(WW8_CP nHeaderCP) const;
- bool HasOwnHeaderFooter(BYTE nWhichItems, BYTE grpfIhdt, int nSect);
+ bool HasOwnHeaderFooter(sal_uInt8 nWhichItems, sal_uInt8 grpfIhdt, int nSect);
void HandleLineNumbering(const wwSection &rSection);
void CopyPageDescHdFt( const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode );
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode );
void DeleteStk(SwFltControlStack* prStck);
void DeleteCtrlStk() { DeleteStk( pCtrlStck ); pCtrlStck = 0; }
@@ -1124,7 +1124,7 @@ private:
bool ReadChar(long nPosCp, long nCpOfs);
bool ReadPlainChars(WW8_CP& rPos, long nEnd, long nCpOfs);
bool ReadChars(WW8_CP& rPos, WW8_CP nNextAttr, long nTextEnd, long nCpOfs);
- bool LangUsesHindiNumbers(USHORT nLang);
+ bool LangUsesHindiNumbers(sal_uInt16 nLang);
sal_Unicode TranslateToHindiNumbers(sal_Unicode);
void SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection);
@@ -1136,15 +1136,15 @@ private:
void CloseAttrEnds();
bool ReadText(long nStartCp, long nTextLen, ManTypes nType);
- void ReadRevMarkAuthorStrTabl( SvStream& rStrm, INT32 nTblPos,
- INT32 nTblSiz, SwDoc& rDoc );
+ void ReadRevMarkAuthorStrTabl( SvStream& rStrm, sal_Int32 nTblPos,
+ sal_Int32 nTblSiz, SwDoc& rDoc );
void Read_HdFtFtnText( const SwNodeIndex* pSttIdx, long nStartCp,
long nLen, ManTypes nType );
void ImportTox( int nFldId, String aStr );
- void EndSprm( USHORT nId );
+ void EndSprm( sal_uInt16 nId );
// #i103711#
// #i105414#
void NewAttr( const SfxPoolItem& rAttr,
@@ -1152,13 +1152,13 @@ private:
const bool bLeftIndentSet = false );
// <--
- bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
+ bool GetFontParams(sal_uInt16, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&);
- bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
+ bool SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums, sal_uInt16 nWhich);
void ResetCharSetVars();
void ResetCJKCharSetVars();
- const SfxPoolItem* GetFmtAttr( USHORT nWhich );
+ const SfxPoolItem* GetFmtAttr( sal_uInt16 nWhich );
bool JoinNode(SwPaM &rPam, bool bStealAttr = false);
bool IsBorder(const WW8_BRC* pbrc, bool bChkBtwn = false) const;
@@ -1172,7 +1172,7 @@ private:
// Note #i20672# we can't properly support between lines so best to ignore
// them for now
bool SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc, short *pSizeArray=0,
- BYTE nSetBorders=0xFF) const;
+ sal_uInt8 nSetBorders=0xFF) const;
void GetBorderDistance(const WW8_BRC* pbrc, Rectangle& rInnerDist) const;
sal_uInt16 GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing);
bool SetShadow(SvxShadowItem& rShadow, const short *pSizeArray,
@@ -1182,8 +1182,8 @@ private:
short *SizeArray=0) const;
void SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) const;
- INT32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
- MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, INT32 &rLineWidth,
+ sal_Int32 MatchSdrBoxIntoFlyBoxItem( const Color& rLineColor,
+ MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, sal_Int32 &rLineWidth,
SvxBoxItem& rBox );
void MatchSdrItemsIntoFlySet( SdrObject* pSdrObj, SfxItemSet &aFlySet,
MSO_LineStyle eLineStyle, MSO_LineDashing eDashing, MSO_SPT eShapeType, Rectangle &rInnerDist );
@@ -1209,10 +1209,10 @@ private:
void EndSpecial();
bool ProcessSpecial(bool &rbReSync, WW8_CP nStartCp);
- USHORT TabRowSprm(int nLevel) const;
+ sal_uInt16 TabRowSprm(int nLevel) const;
bool ReadGrafFile(String& rFileName, Graphic*& rpGraphic,
- const WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos, bool* pDelIt);
+ const WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos, bool* pDelIt);
void ReplaceObj(const SdrObject &rReplaceTextObj,
SdrObject &rSubObj);
@@ -1226,7 +1226,7 @@ private:
const SfxItemSet& rGrfSet);
SwFrmFmt *AddAutoAnchor(SwFrmFmt *pFmt);
- SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, ULONG nFilePos);
+ SwFrmFmt* ImportGraf1(WW8_PIC& rPic, SvStream* pSt, sal_uLong nFilePos);
SwFrmFmt* ImportGraf(SdrTextObj* pTextObj = 0, SwFrmFmt* pFlyFmt = 0);
SdrObject* ImportOleBase( Graphic& rGraph, const Graphic* pGrf=0,
@@ -1245,9 +1245,9 @@ private:
//This converts MS Asian Typography information into OOo's
void ImportDopTypography(const WW8DopTypography &rTypo);
- ULONG LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
- ULONG SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
- ULONG CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
+ sal_uLong LoadThroughDecryption(SwPaM& rPaM ,WW8Glossary *pGloss);
+ sal_uLong SetSubStreams(SvStorageStreamRef &rTableStream, SvStorageStreamRef &rDataStream);
+ sal_uLong CoreLoad(WW8Glossary *pGloss, const SwPosition &rPos);
void ReadDocVars();
@@ -1270,16 +1270,16 @@ private:
// verwaltet werden: rglst, hpllfo und hsttbListNames
// die Strukturen hierfuer sind: LSTF, LVLF, LFO LFOLVL
- void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const BYTE* pTxt,
+ void SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV, const sal_uInt8* pTxt,
bool bOutline);
- void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel, bool bOutLine);
- void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel );
+ void SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel, bool bOutLine);
+ void SetNumOlst( SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel );
SwNumRule* GetStyRule();
- void StartAnl(const BYTE* pSprm13);
- void NextAnlLine(const BYTE* pSprm13);
+ void StartAnl(const sal_uInt8* pSprm13);
+ void NextAnlLine(const sal_uInt8* pSprm13);
void StopAllAnl(bool bGoBack = true);
- void StopAnlToRestart(BYTE nType, bool bGoBack = true);
+ void StopAnlToRestart(sal_uInt8 nType, bool bGoBack = true);
// GrafikLayer
@@ -1296,20 +1296,20 @@ private:
SdrObject *ReadPolyLine(WW8_DPHEAD* pHd, const WW8_DO* pDo,
SfxAllItemSet &rSet);
ESelection GetESelection( long nCpStart, long nCpEnd );
- void InsertTxbxStyAttrs( SfxItemSet& rS, USHORT nColl );
+ void InsertTxbxStyAttrs( SfxItemSet& rS, sal_uInt16 nColl );
void InsertAttrsAsDrawingAttrs(long nStartCp, long nEndCp, ManTypes eType, bool bONLYnPicLocFc=false);
- bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, USHORT nTxBxS,
- USHORT nSequence);
+ bool GetTxbxTextSttEndCp(WW8_CP& rStartCp, WW8_CP& rEndCp, sal_uInt16 nTxBxS,
+ sal_uInt16 nSequence);
bool GetRangeAsDrawingString(String& rString, long StartCp, long nEndCp, ManTypes eType);
OutlinerParaObject* ImportAsOutliner(String &rString, WW8_CP nStartCp, WW8_CP nEndCp, ManTypes eType);
SwFrmFmt* InsertTxbxText(SdrTextObj* pTextObj, Size* pObjSiz,
- USHORT nTxBxS, USHORT nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
+ sal_uInt16 nTxBxS, sal_uInt16 nSequence, long nPosCp, SwFrmFmt* pFlyFmt,
bool bMakeSdrGrafObj, bool& rbEraseTextObj,
bool* pbTestTxbxContainsText = 0, long* pnStartCp = 0,
long* pnEndCp = 0, bool* pbContainsGraphics = 0,
SvxMSDffImportRec* pRecord = 0);
- bool TxbxChainContainsRealText( USHORT nTxBxS,
+ bool TxbxChainContainsRealText( sal_uInt16 nTxBxS,
long& rStartCp,
long& rEndCp );
SdrObject *ReadTxtBox(WW8_DPHEAD* pHd, const WW8_DO* pDo,
@@ -1345,39 +1345,39 @@ private:
void UpdateFields();
void ConvertFFileName( String& rName, const String& rRaw );
long Read_F_Tag( WW8FieldDesc* pF );
- void InsertTagField( const USHORT nId, const String& rTagText );
+ void InsertTagField( const sal_uInt16 nId, const String& rTagText );
long ImportExtSprm(WW8PLCFManResult* pRes);
- void EndExtSprm(USHORT nSprmId);
+ void EndExtSprm(sal_uInt16 nSprmId);
void ReadDocInfo();
// Ver8-Listen
- void RegisterNumFmtOnTxtNode(USHORT nActLFO, BYTE nActLevel,
+ void RegisterNumFmtOnTxtNode(sal_uInt16 nActLFO, sal_uInt8 nActLevel,
bool bSetAttr = true);
- void RegisterNumFmtOnStyle(USHORT nStyle);
+ void RegisterNumFmtOnStyle(sal_uInt16 nStyle);
void SetStylesList(sal_uInt16 nStyle, sal_uInt16 nActLFO,
sal_uInt8 nActLevel);
- void RegisterNumFmt(USHORT nActLFO, BYTE nActLevel);
+ void RegisterNumFmt(sal_uInt16 nActLFO, sal_uInt8 nActLevel);
// spaeter zu ersetzen durch Aufruf in entsprechend erweiterten SvxMSDffManager
const String* GetAnnotationAuthor(sal_uInt16 nIdx);
// Schnittstellen fuer die Toggle-Attribute
- void SetToggleAttr(BYTE nAttrId, bool bOn);
- void SetToggleBiDiAttr(BYTE nAttrId, bool bOn);
- void _ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void SetToggleAttr(sal_uInt8 nAttrId, bool bOn);
+ void SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn);
+ void _ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleAttrFlags() )
_ChkToggleAttr( nOldStyle81Mask, nNewStyle81Mask );
}
- void _ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask );
+ void _ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask );
- void ChkToggleBiDiAttr( USHORT nOldStyle81Mask, USHORT nNewStyle81Mask )
+ void ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask, sal_uInt16 nNewStyle81Mask )
{
if( nOldStyle81Mask != nNewStyle81Mask &&
pCtrlStck->GetToggleBiDiAttrFlags() )
@@ -1402,17 +1402,17 @@ private:
// #i84783#
// determine object attribute "Layout in Table Cell"
- bool IsObjectLayoutInTableCell( const UINT32 nLayoutInTableCell ) const;
+ bool IsObjectLayoutInTableCell( const sal_uInt32 nLayoutInTableCell ) const;
// <--
bool ReadGlobalTemplateSettings( const rtl::OUString& sCreatedFrom, const com::sun::star::uno::Reference< com::sun::star::container::XNameContainer >& xPrjNameMap );
//No copying
SwWW8ImplReader(const SwWW8ImplReader &);
SwWW8ImplReader& operator=(const SwWW8ImplReader&);
public: // eigentlich private, geht aber leider nur public
- USHORT GetToggleAttrFlags() const;
- USHORT GetToggleBiDiAttrFlags() const;
- void SetToggleAttrFlags(USHORT nFlags);
- void SetToggleBiDiAttrFlags(USHORT nFlags);
+ sal_uInt16 GetToggleAttrFlags() const;
+ sal_uInt16 GetToggleBiDiAttrFlags() const;
+ void SetToggleAttrFlags(sal_uInt16 nFlags);
+ void SetToggleBiDiAttrFlags(sal_uInt16 nFlags);
long Read_Ftn(WW8PLCFManResult* pRes);
@@ -1424,102 +1424,102 @@ public: // eigentlich private, geht aber leider nur public
// Attribute
- void Read_Special(USHORT, const BYTE*, short nLen);
- void Read_Obj(USHORT, const BYTE*, short nLen);
- void Read_PicLoc(USHORT, const BYTE* pData, short nLen );
- void Read_BoldUsw(USHORT nId, const BYTE*, short nLen);
- void Read_Bidi(USHORT nId, const BYTE*, short nLen);
- void Read_BoldBiDiUsw(USHORT nId, const BYTE*, short nLen);
- void Read_SubSuper( USHORT, const BYTE*, short nLen );
+ void Read_Special(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Obj(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_PicLoc(sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BoldUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_Bidi(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8*, short nLen);
+ void Read_SubSuper( sal_uInt16, const sal_uInt8*, short nLen );
bool ConvertSubToGraphicPlacement();
SwFrmFmt *ContainsSingleInlineGraphic(const SwPaM &rRegion);
- void Read_SubSuperProp( USHORT, const BYTE*, short nLen );
- void Read_Underline( USHORT, const BYTE*, short nLen );
- void Read_TxtColor( USHORT, const BYTE*, short nLen );
- void openFont(USHORT nFCode, USHORT nId);
- void closeFont(USHORT nId);
- void Read_FontCode( USHORT, const BYTE*, short nLen );
- void Read_FontSize( USHORT, const BYTE*, short nLen );
- void Read_CharSet(USHORT , const BYTE* pData, short nLen);
- void Read_Language( USHORT, const BYTE*, short nLen );
- void Read_CColl( USHORT, const BYTE*, short nLen );
- void Read_Kern( USHORT, const BYTE* pData, short nLen );
- void Read_FontKern( USHORT, const BYTE* pData, short nLen );
- void Read_Emphasis( USHORT, const BYTE* pData, short nLen );
- void Read_ScaleWidth( USHORT, const BYTE* pData, short nLen );
- void Read_Relief( USHORT, const BYTE* pData, short nLen);
- void Read_TxtAnim( USHORT, const BYTE* pData, short nLen);
-
- void Read_NoLineNumb( USHORT nId, const BYTE* pData, short nLen );
-
- void Read_LR( USHORT nId, const BYTE*, short nLen );
- void Read_UL( USHORT nId, const BYTE*, short nLen );
- void Read_ParaAutoBefore(USHORT , const BYTE *pData, short nLen);
- void Read_ParaAutoAfter(USHORT , const BYTE *pData, short nLen);
- void Read_DontAddEqual(USHORT , const BYTE *pData, short nLen);
- void Read_LineSpace( USHORT, const BYTE*, short nLen );
- void Read_Justify(USHORT, const BYTE*, short nLen);
- void Read_IdctHint(USHORT, const BYTE*, short nLen);
+ void Read_SubSuperProp( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Underline( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_TxtColor( sal_uInt16, const sal_uInt8*, short nLen );
+ void openFont(sal_uInt16 nFCode, sal_uInt16 nId);
+ void closeFont(sal_uInt16 nId);
+ void Read_FontCode( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_FontSize( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen);
+ void Read_Language( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_CColl( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_FontKern( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Relief( sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtAnim( sal_uInt16, const sal_uInt8* pData, short nLen);
+
+ void Read_NoLineNumb( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+
+ void Read_LR( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_UL( sal_uInt16 nId, const sal_uInt8*, short nLen );
+ void Read_ParaAutoBefore(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_ParaAutoAfter(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_DontAddEqual(sal_uInt16 , const sal_uInt8 *pData, short nLen);
+ void Read_LineSpace( sal_uInt16, const sal_uInt8*, short nLen );
+ void Read_Justify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_IdctHint(sal_uInt16, const sal_uInt8*, short nLen);
bool IsRightToLeft();
- void Read_RTLJustify(USHORT, const BYTE*, short nLen);
- void Read_Hyphenation( USHORT, const BYTE* pData, short nLen );
- void Read_WidowControl( USHORT, const BYTE* pData, short nLen );
- void Read_AlignFont( USHORT, const BYTE* pData, short nLen );
- void Read_UsePgsuSettings( USHORT, const BYTE* pData, short nLen );
- void Read_KeepLines( USHORT, const BYTE* pData, short nLen );
- void Read_KeepParas( USHORT, const BYTE* pData, short nLen );
- void Read_BreakBefore( USHORT, const BYTE* pData, short nLen );
- void Read_Apo(USHORT nId, const BYTE* pData, short nLen);
- void Read_ApoPPC(USHORT, const BYTE* pData, short);
-
- void Read_BoolItem( USHORT nId, const BYTE*, short nLen );
-
- void Read_Border( USHORT nId, const BYTE* pData, short nLen );
- void Read_Tab( USHORT nId, const BYTE* pData, short nLen );
- void Read_Symbol(USHORT, const BYTE* pData, short nLen);
- void Read_FldVanish( USHORT nId, const BYTE* pData, short nLen );
+ void Read_RTLJustify(sal_uInt16, const sal_uInt8*, short nLen);
+ void Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_UsePgsuSettings( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_Apo(sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_ApoPPC(sal_uInt16, const sal_uInt8* pData, short);
+
+ void Read_BoolItem( sal_uInt16 nId, const sal_uInt8*, short nLen );
+
+ void Read_Border( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Tab( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
+ void Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_FldVanish( sal_uInt16 nId, const sal_uInt8* pData, short nLen );
// Revision Marks ( == Redlining )
// insert or delete content (change char attributes resp.)
- void Read_CRevisionMark(RedlineType_t eType, const BYTE* pData, short nLen);
+ void Read_CRevisionMark(RedlineType_t eType, const sal_uInt8* pData, short nLen);
// insert new content
- void Read_CFRMark(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen);
// delete old content
- void Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen);
+ void Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen);
// change properties of content (e.g. char formating)
- void Read_CPropRMark(USHORT , const BYTE* pData, short nLen); // complex!
+ void Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen); // complex!
- void Read_TabRowEnd( USHORT, const BYTE* pData, short nLen );
- void Read_TabCellEnd( USHORT, const BYTE* pData, short nLen );
+ void Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen );
static bool ParseTabPos(WW8_TablePos *aTabPos, WW8PLCFx_Cp_FKP* pPap);
- void Read_Shade( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelNo( USHORT, const BYTE* pData, short nLen );
- void Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen );
+ void Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen );
// Gliederungsebene Ver8
- void Read_POutLvl(USHORT, const BYTE* pData, short nLen);
+ void Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen);
- void Read_OLST( USHORT, const BYTE* pData, short nLen );
+ void Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen );
- void Read_CharShadow( USHORT, const BYTE* pData, short nLen );
- void Read_CharHighlight( USHORT, const BYTE* pData, short nLen );
+ void Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen );
+ void Read_CharHighlight( sal_uInt16, const sal_uInt8* pData, short nLen );
// Ver8-Listen
- void Read_ListLevel( USHORT nId, const sal_uInt8* pData, short nLen);
- void Read_LFOPosition( USHORT nId, const sal_uInt8* pData, short nLen);
+ void Read_ListLevel( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
+ void Read_LFOPosition( sal_uInt16 nId, const sal_uInt8* pData, short nLen);
bool SetTxtFmtCollAndListLevel(const SwPaM& rRg, SwWW8StyInf& rStyleInfo);
- void Read_StyleCode(USHORT, const BYTE* pData, short nLen);
- void Read_Majority(USHORT, const BYTE* , short );
- void Read_DoubleLine_Rotate( USHORT, const BYTE* pDATA, short nLen);
+ void Read_StyleCode(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_Majority(sal_uInt16, const sal_uInt8* , short );
+ void Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pDATA, short nLen);
- void Read_TxtForeColor(USHORT, const BYTE* pData, short nLen);
- void Read_TxtBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBackColor(USHORT, const BYTE* pData, short nLen);
- void Read_ParaBiDi(USHORT, const BYTE* pData, short nLen);
- static sal_uInt32 ExtractColour(const BYTE* &rpData, bool bVer67);
+ void Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen);
+ void Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen);
+ static sal_uInt32 ExtractColour(const sal_uInt8* &rpData, bool bVer67);
long MapBookmarkVariables(const WW8FieldDesc* pF,String &rOrigName,
const String &rData);
@@ -1532,9 +1532,9 @@ public: // eigentlich private, geht aber leider nur public
eF_ResT Read_F_DocInfo( WW8FieldDesc* pF, String& rStr );
eF_ResT Read_F_Author( WW8FieldDesc*, String& );
eF_ResT Read_F_TemplName( WW8FieldDesc*, String& );
- short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, USHORT &rLang,
+ short GetTimeDatePara(String& rStr, sal_uInt32& rFormat, sal_uInt16 &rLang,
int nWhichDefault, bool bHijri = false);
- bool ForceFieldLanguage(SwField &rFld, USHORT nLang);
+ bool ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang);
eF_ResT Read_F_DateTime( WW8FieldDesc*, String& rStr );
eF_ResT Read_F_FileName( WW8FieldDesc*, String& rStr);
eF_ResT Read_F_Anz( WW8FieldDesc* pF, String& );
@@ -1575,30 +1575,30 @@ public: // eigentlich private, geht aber leider nur public
void DeleteFormImpl();
- short ImportSprm( const BYTE* pPos, USHORT nId = 0 );
+ short ImportSprm( const sal_uInt8* pPos, sal_uInt16 nId = 0 );
bool SearchRowEnd(WW8PLCFx_Cp_FKP* pPap,WW8_CP &rStartCp, int nLevel) const;
const WW8Fib& GetFib() const { return *pWwFib; }
SwDoc& GetDoc() const { return rDoc; }
- USHORT GetNAktColl() const { return nAktColl; }
- void SetNAktColl( USHORT nColl ) { nAktColl = nColl; }
+ sal_uInt16 GetNAktColl() const { return nAktColl; }
+ void SetNAktColl( sal_uInt16 nColl ) { nAktColl = nColl; }
void SetAktItemSet( SfxItemSet* pItemSet ) { pAktItemSet = pItemSet; }
- USHORT StyleUsingLFO( USHORT nLFOIndex ) const ;
+ sal_uInt16 StyleUsingLFO( sal_uInt16 nLFOIndex ) const ;
const SwFmt* GetStyleWithOrgWWName( String& rName ) const ;
static bool GetPictGrafFromStream(Graphic& rGraphic, SvStream& rSrc);
static void PicRead( SvStream *pDataStream, WW8_PIC *pPic, bool bVer67);
static bool ImportOleWMF( SvStorageRef xSrc1, GDIMetaFile &rWMF,
long &rX, long &rY);
- static ColorData GetCol(BYTE nIco);
+ static ColorData GetCol(sal_uInt8 nIco);
- SwWW8ImplReader( BYTE nVersionPara, SvStorage* pStorage, SvStream* pSt,
+ SwWW8ImplReader( sal_uInt8 nVersionPara, SvStorage* pStorage, SvStream* pSt,
SwDoc& rD, const String& rBaseURL, bool bNewDoc );
const String& GetBaseURL() const { return sBaseURL; }
// Laden eines kompletten DocFiles
- ULONG LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
+ sal_uLong LoadDoc( SwPaM&,WW8Glossary *pGloss=0);
CharSet GetCurrentCharSet();
CharSet GetCurrentCJKCharSet();
diff --git a/sw/source/filter/ww8/ww8par2.cxx b/sw/source/filter/ww8/ww8par2.cxx
index 736eaa528cd3..c4a13b75795d 100644
--- a/sw/source/filter/ww8/ww8par2.cxx
+++ b/sw/source/filter/ww8/ww8par2.cxx
@@ -116,37 +116,37 @@ struct WW8TabBandDesc
sal_uInt16 maDirections[MAX_COL + 1];
short nCenter[MAX_COL + 1]; // X-Rand aller Zellen dieses Bandes
short nWidth[MAX_COL + 1]; // Laenge aller Zellen dieses Bandes
- short nWwCols; // BYTE wuerde reichen, alignment -> short
+ short nWwCols; // sal_uInt8 wuerde reichen, alignment -> short
short nSwCols; // SW: so viele Spalten fuer den Writer
bool bLEmptyCol; // SW: Links eine leere Zusatz-Spalte
bool bREmptyCol; // SW: dito rechts
bool bCantSplit;
bool bCantSplit90;
WW8_TCell* pTCs;
- BYTE nOverrideSpacing[MAX_COL + 1];
+ sal_uInt8 nOverrideSpacing[MAX_COL + 1];
short nOverrideValues[MAX_COL + 1][4];
WW8_SHD* pSHDs;
sal_uInt32* pNewSHDs;
WW8_BRC aDefBrcs[6];
bool bExist[MAX_COL]; // Existiert diese Zelle ?
- UINT8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
+ sal_uInt8 nTransCell[MAX_COL + 2]; // UEbersetzung WW-Index -> SW-Index
WW8TabBandDesc();
WW8TabBandDesc(WW8TabBandDesc& rBand); // tief kopieren
~WW8TabBandDesc();
static void setcelldefaults(WW8_TCell *pCells, short nCells);
- void ReadDef(bool bVer67, const BYTE* pS);
- void ProcessDirection(const BYTE* pParams);
- void ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC);
- void ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams);
- void ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol);
- void ProcessSprmTDelete(const BYTE* pParamsTDelete);
- void ProcessSprmTInsert(const BYTE* pParamsTInsert);
- void ProcessSpacing(const BYTE* pParamsTInsert);
- void ProcessSpecificSpacing(const BYTE* pParamsTInsert);
- void ReadShd(const BYTE* pS );
- void ReadNewShd(const BYTE* pS, bool bVer67);
+ void ReadDef(bool bVer67, const sal_uInt8* pS);
+ void ProcessDirection(const sal_uInt8* pParams);
+ void ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC);
+ void ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams);
+ void ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol);
+ void ProcessSprmTDelete(const sal_uInt8* pParamsTDelete);
+ void ProcessSprmTInsert(const sal_uInt8* pParamsTInsert);
+ void ProcessSpacing(const sal_uInt8* pParamsTInsert);
+ void ProcessSpecificSpacing(const sal_uInt8* pParamsTInsert);
+ void ReadShd(const sal_uInt8* pS );
+ void ReadNewShd(const sal_uInt8* pS, bool bVer67);
enum wwDIR {wwTOP = 0, wwLEFT = 1, wwBOTTOM = 2, wwRIGHT = 3};
};
@@ -207,11 +207,11 @@ class WW8TabDesc
// 3. Verwaltungsinfo fuer Writer
short nAktCol;
- USHORT nRowsToRepeat;
+ sal_uInt16 nRowsToRepeat;
// 4. Methoden
- USHORT GetLogicalWWCol() const;
+ sal_uInt16 GetLogicalWWCol() const;
void SetTabBorders( SwTableBox* pBox, short nIdx );
void SetTabShades( SwTableBox* pBox, short nWwIdx );
void SetTabVertAlign( SwTableBox* pBox, short nWwIdx );
@@ -228,7 +228,7 @@ class WW8TabDesc
// einzelne Box ggfs. in eine Merge-Gruppe aufnehmen
// (die Merge-Gruppen werden dann spaeter auf einen Schlag abgearbeitet)
SwTableBox* UpdateTableMergeGroup(WW8_TCell& rCell,
- WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, USHORT nCol );
+ WW8SelBoxInfo* pActGroup, SwTableBox* pActBox, sal_uInt16 nCol );
void StartMiserableHackForUnsupportedDirection(short nWwCol);
void EndMiserableHackForUnsupportedDirection(short nWwCol);
//No copying
@@ -485,10 +485,10 @@ bool SwWW8ImplReader::SearchRowEnd(WW8PLCFx_Cp_FKP* pPap, WW8_CP &rStartCp,
{
if (pPap->Where() != WW8_CP_MAX)
{
- const BYTE* pB = pPap->HasSprm(TabRowSprm(nLevel));
+ const sal_uInt8* pB = pPap->HasSprm(TabRowSprm(nLevel));
if (pB && *pB == 1)
{
- const BYTE *pLevel = 0;
+ const sal_uInt8 *pLevel = 0;
if (0 != (pLevel = pPap->HasSprm(0x6649)))
{
if (nLevel + 1 == *pLevel)
@@ -624,7 +624,7 @@ ApoTestResults SwWW8ImplReader::TestApo(int nCellLevel, bool bTableRowEnd,
// Hilfroutinen fuer Kapitelnummerierung und Aufzaehlung / Gliederung
//---------------------------------------------------------------------
-static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
+static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, sal_uInt8 nSwLevel )
{
static SvxExtNumType eNumA[8] = { SVX_NUM_ARABIC, SVX_NUM_ROMAN_UPPER, SVX_NUM_ROMAN_LOWER,
SVX_NUM_CHARS_UPPER_LETTER_N, SVX_NUM_CHARS_LOWER_LETTER_N, SVX_NUM_ARABIC,
@@ -643,7 +643,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
rNum.SetNumAdjust( eAdjA[SVBT8ToByte( rAV.aBits1 ) & 0x3] );
rNum.SetCharTextDistance( SVBT16ToShort( rAV.dxaSpace ) );
- INT16 nIndent = Abs((INT16)SVBT16ToShort( rAV.dxaIndent ));
+ sal_Int16 nIndent = Abs((sal_Int16)SVBT16ToShort( rAV.dxaIndent ));
if( SVBT8ToByte( rAV.aBits1 ) & 0x08 ) //fHang
{
rNum.SetFirstLineOffset( -nIndent );
@@ -662,7 +662,7 @@ static void SetBaseAnlv(SwNumFmt &rNum, WW8_ANLV &rAV, BYTE nSwLevel )
}
void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
- const BYTE* pTxt, bool bOutline)
+ const sal_uInt8* pTxt, bool bOutline)
{
bool bInsert = false; // Default
CharSet eCharSet = eStructCharSet;
@@ -751,7 +751,7 @@ void SwWW8ImplReader::SetAnlvStrings(SwNumFmt &rNum, WW8_ANLV &rAV,
// SetAnld bekommt einen WW-ANLD-Descriptor und einen Level und modifiziert
// die durch pNumR anggebeben NumRules. Wird benutzt fuer alles ausser
// Gliederung im Text
-void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, BYTE nSwLevel,
+void SwWW8ImplReader::SetAnld(SwNumRule* pNumR, WW8_ANLD* pAD, sal_uInt8 nSwLevel,
bool bOutLine)
{
SwNumFmt aNF;
@@ -780,7 +780,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
const String aName( rDoc.GetUniqueNumRuleName( &aBaseName, false) );
// #i86652#
- USHORT nRul = rDoc.MakeNumRule( aName, 0, FALSE,
+ sal_uInt16 nRul = rDoc.MakeNumRule( aName, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
pStyles->pStyRule = rDoc.GetNumRuleTbl()[nRul];
@@ -791,7 +791,7 @@ SwNumRule* SwWW8ImplReader::GetStyRule()
}
// Sprm 13
-void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ANLevelNo( sal_uInt16, const sal_uInt8* pData, short nLen )
{
nSwNumLevel = 0xff; // Default: ungueltig
@@ -835,7 +835,7 @@ void SwWW8ImplReader::Read_ANLevelNo( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen ) // Sprm 12
+void SwWW8ImplReader::Read_ANLevelDesc( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm 12
{
{
SwWW8StyInf * pStyInf = GetStyle(nAktColl);
@@ -885,14 +885,14 @@ void SwWW8ImplReader::Read_ANLevelDesc( USHORT, const BYTE* pData, short nLen )
// ( nur fuer Gliederungen im Text; Aufzaehlungen / Nummerierungen laufen
// ueber ANLDs )
// dabei wird die Info aus dem OLST geholt und nicht aus dem ANLD ( s.u. )
-void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
+void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, sal_uInt8 nSwLevel)
{
SwNumFmt aNF;
WW8_ANLV &rAV = pO->rganlv[nSwLevel];
SetBaseAnlv(aNF, rAV, nSwLevel);
// ... und then the Strings
int nTxtOfs = 0;
- BYTE i;
+ sal_uInt8 i;
WW8_ANLV* pAV1; // search String-Positions
for (i = 0, pAV1 = pO->rganlv; i < nSwLevel; ++i, ++pAV1)
{
@@ -910,7 +910,7 @@ void SwWW8ImplReader::SetNumOlst(SwNumRule* pNumR, WW8_OLST* pO, BYTE nSwLevel)
// die an jeder Gliederungszeile haengen, enthalten nur Stuss, also werden die
// OLSTs waehrend der Section gemerkt, damit die Informationen beim Auftreten
// von Gliederungsabsaetzen zugreifbar ist.
-void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_OLST( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen <= 0)
{
@@ -925,7 +925,7 @@ void SwWW8ImplReader::Read_OLST( USHORT, const BYTE* pData, short nLen )
*pNumOlst = *(WW8_OLST*)pData;
}
-WW8LvlType GetNumType(BYTE nWwLevelNo)
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo)
{
WW8LvlType nRet = WW8_None;
if( nWwLevelNo == 12 )
@@ -939,12 +939,12 @@ WW8LvlType GetNumType(BYTE nWwLevelNo)
return nRet;
}
-SwNumRule *ANLDRuleMap::GetNumRule(BYTE nNumType)
+SwNumRule *ANLDRuleMap::GetNumRule(sal_uInt8 nNumType)
{
return (WW8_Numbering == nNumType ? mpNumberingNumRule : mpOutlineNumRule);
}
-void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
+void ANLDRuleMap::SetNumRule(SwNumRule *pRule, sal_uInt8 nNumType)
{
if (WW8_Numbering == nNumType)
mpNumberingNumRule = pRule;
@@ -955,11 +955,11 @@ void ANLDRuleMap::SetNumRule(SwNumRule *pRule, BYTE nNumType)
// StartAnl wird am Anfang eines Zeilenbereichs gerufen,
// der Gliederung / Nummerierung / Aufzaehlung enthaelt
-void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
+void SwWW8ImplReader::StartAnl(const sal_uInt8* pSprm13)
{
bAktAND_fNumberAcross = false;
- BYTE nT = static_cast< BYTE >(GetNumType(*pSprm13));
+ sal_uInt8 nT = static_cast< sal_uInt8 >(GetNumType(*pSprm13));
if (nT == WW8_Pause || nT == WW8_None)
return;
@@ -967,7 +967,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
SwNumRule *pNumRule = maANLDRules.GetNumRule(nWwNumType);
// check for COL numbering:
- const BYTE* pS12 = 0;// sprmAnld
+ const sal_uInt8* pS12 = 0;// sprmAnld
String sNumRule;
if (pTableDesc)
@@ -1003,7 +1003,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
{
// #i86652#
pNumRule = rDoc.GetNumRuleTbl()[
- rDoc.MakeNumRule( sNumRule, 0, FALSE,
+ rDoc.MakeNumRule( sNumRule, 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT ) ];
// <--
}
@@ -1027,7 +1027,7 @@ void SwWW8ImplReader::StartAnl(const BYTE* pSprm13)
// NextAnlLine() wird fuer jede Zeile einer
// Gliederung / Nummerierung / Aufzaehlung einmal gerufen
-void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
+void SwWW8ImplReader::NextAnlLine(const sal_uInt8* pSprm13)
{
if (!bAnl)
return;
@@ -1045,7 +1045,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
{
// noch nicht definiert
// sprmAnld o. 0
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1058,7 +1058,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
if (pNumOlst) // es gab ein OLST
{
//Assure upper levels are set, #i9556#
- for (BYTE nI = 0; nI < nSwNumLevel; ++nI)
+ for (sal_uInt8 nI = 0; nI < nSwNumLevel; ++nI)
{
if (!pNumRule->GetNumFmt(nI))
SetNumOlst(pNumRule, pNumOlst, nI);
@@ -1069,7 +1069,7 @@ void SwWW8ImplReader::NextAnlLine(const BYTE* pSprm13)
else // kein Olst, nimm Anld
{
// sprmAnld
- const BYTE* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
+ const sal_uInt8* pS12 = pPlcxMan->HasParaSprm(bVer67 ? 12 : 0xC63E);
SetAnld(pNumRule, (WW8_ANLD*)pS12, nSwNumLevel, false);
}
}
@@ -1094,7 +1094,7 @@ void SwWW8ImplReader::StopAllAnl(bool bGoBack)
StopAnlToRestart(WW8_None, bGoBack);
}
-void SwWW8ImplReader::StopAnlToRestart(BYTE nNewType, bool bGoBack)
+void SwWW8ImplReader::StopAnlToRestart(sal_uInt8 nNewType, bool bGoBack)
{
if (bGoBack)
{
@@ -1145,14 +1145,14 @@ WW8TabBandDesc::WW8TabBandDesc( WW8TabBandDesc& rBand )
}
// ReadDef liest die Zellenpositionen und ggfs die Umrandungen eines Bandes ein
-void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
+void WW8TabBandDesc::ReadDef(bool bVer67, const sal_uInt8* pS)
{
if (!bVer67)
pS++;
- short nLen = (INT16)SVBT16ToShort( pS - 2 ); // nicht schoen
+ short nLen = (sal_Int16)SVBT16ToShort( pS - 2 ); // nicht schoen
- BYTE nCols = *pS; // Anzahl der Zellen
+ sal_uInt8 nCols = *pS; // Anzahl der Zellen
short nOldCols = nWwCols;
if( nCols > MAX_COL )
@@ -1160,11 +1160,11 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
nWwCols = nCols;
- const BYTE* pT = &pS[1];
+ const sal_uInt8* pT = &pS[1];
nLen --;
int i;
for(i=0; i<=nCols; i++, pT+=2 )
- nCenter[i] = (INT16)SVBT16ToShort( pT ); // X-Raender
+ nCenter[i] = (sal_Int16)SVBT16ToShort( pT ); // X-Raender
nLen -= 2 * ( nCols + 1 );
if( nCols != nOldCols ) // andere Spaltenzahl
{
@@ -1206,7 +1206,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
{
if( i < nColsToRead )
{ // TC aus File ?
- BYTE aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
+ sal_uInt8 aBits1 = SVBT8ToByte( pTc->aBits1Ver6 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x01 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x02 ) != 0 );
memcpy( pAktTC->rgbrc[ WW8_TOP ].aBits1,
@@ -1236,7 +1236,7 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
WW8_TCellVer8* pTc = (WW8_TCellVer8*)pT;
for (int k = 0; k < nColsToRead; ++k, ++pAktTC, ++pTc )
{
- UINT16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
+ sal_uInt16 aBits1 = SVBT16ToShort( pTc->aBits1Ver8 );
pAktTC->bFirstMerged = ( ( aBits1 & 0x0001 ) != 0 );
pAktTC->bMerged = ( ( aBits1 & 0x0002 ) != 0 );
pAktTC->bVertical = ( ( aBits1 & 0x0004 ) != 0 );
@@ -1274,13 +1274,13 @@ void WW8TabBandDesc::ReadDef(bool bVer67, const BYTE* pS)
}
}
-void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
+void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const sal_uInt8* pParamsTSetBRC)
{
if( pParamsTSetBRC && pTCs ) // set one or more cell border(s)
{
- BYTE nitcFirst= pParamsTSetBRC[0];// first col to be changed
- BYTE nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
- BYTE nFlag = *(pParamsTSetBRC+2);
+ sal_uInt8 nitcFirst= pParamsTSetBRC[0];// first col to be changed
+ sal_uInt8 nitcLim = pParamsTSetBRC[1];// (last col to be changed)+1
+ sal_uInt8 nFlag = *(pParamsTSetBRC+2);
if (nitcFirst >= nWwCols)
return;
@@ -1348,7 +1348,7 @@ void WW8TabBandDesc::ProcessSprmTSetBRC(bool bVer67, const BYTE* pParamsTSetBRC)
}
}
-void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
+void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const sal_uInt8* pParams)
{
// sprmTTableBorders
if( bVer67 )
@@ -1363,16 +1363,16 @@ void WW8TabBandDesc::ProcessSprmTTableBorders(bool bVer67, const BYTE* pParams)
memcpy( aDefBrcs, pParams, 24 );
}
-void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
+void WW8TabBandDesc::ProcessSprmTDxaCol(const sal_uInt8* pParamsTDxaCol)
{
// sprmTDxaCol (opcode 0x7623) changes the width of cells
// whose index is within a certain range to be a certain value.
if( nWwCols && pParamsTDxaCol ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDxaCol[0]; // first col to be changed
- BYTE nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
- short nDxaCol = (INT16)SVBT16ToShort( pParamsTDxaCol + 2 );
+ sal_uInt8 nitcFirst= pParamsTDxaCol[0]; // first col to be changed
+ sal_uInt8 nitcLim = pParamsTDxaCol[1]; // (last col to be changed)+1
+ short nDxaCol = (sal_Int16)SVBT16ToShort( pParamsTDxaCol + 2 );
short nOrgWidth;
short nDelta;
@@ -1388,15 +1388,15 @@ void WW8TabBandDesc::ProcessSprmTDxaCol(const BYTE* pParamsTDxaCol)
}
}
-void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
+void WW8TabBandDesc::ProcessSprmTInsert(const sal_uInt8* pParamsTInsert)
{
if( nWwCols && pParamsTInsert ) // set one or more cell length(s)
{
- BYTE nitcInsert = pParamsTInsert[0]; // position at which to insert
+ sal_uInt8 nitcInsert = pParamsTInsert[0]; // position at which to insert
if (nitcInsert >= MAX_COL) // cannot insert into cell outside max possible index
return;
- BYTE nctc = pParamsTInsert[1]; // number of cells
- USHORT ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
+ sal_uInt8 nctc = pParamsTInsert[1]; // number of cells
+ sal_uInt16 ndxaCol = SVBT16ToShort( pParamsTInsert+2 );
short nNewWwCols;
if (nitcInsert > nWwCols)
@@ -1407,7 +1407,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nitcInsert);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nitcInsert);
}
}
else
@@ -1418,7 +1418,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
if (nNewWwCols > MAX_COL)
{
nNewWwCols = MAX_COL;
- nctc = ::sal::static_int_cast<BYTE>(nNewWwCols-nWwCols);
+ nctc = ::sal::static_int_cast<sal_uInt8>(nNewWwCols-nWwCols);
}
}
@@ -1459,7 +1459,7 @@ void WW8TabBandDesc::ProcessSprmTInsert(const BYTE* pParamsTInsert)
}
}
-void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
+void WW8TabBandDesc::ProcessDirection(const sal_uInt8* pParams)
{
sal_uInt8 nStartCell = *pParams++;
sal_uInt8 nEndCell = *pParams++;
@@ -1476,24 +1476,24 @@ void WW8TabBandDesc::ProcessDirection(const BYTE* pParams)
maDirections[nStartCell] = nCode;
}
-void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
mbHasSpacing=true;
#if OSL_DEBUG_LEVEL > 1
- BYTE nWhichCell = *pParams;
+ sal_uInt8 nWhichCell = *pParams;
OSL_ENSURE(nWhichCell == 0, "Expected cell to be 0!");
#endif
++pParams; //Skip which cell
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
++pParams; //unknown byte
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i = wwTOP; i <= wwRIGHT; i++)
{
switch (nSideBits & (1 << i))
@@ -1519,30 +1519,31 @@ void WW8TabBandDesc::ProcessSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
+void WW8TabBandDesc::ProcessSpecificSpacing(const sal_uInt8* pParams)
{
- BYTE nLen = pParams ? *(pParams - 1) : 0;
+ sal_uInt8 nLen = pParams ? *(pParams - 1) : 0;
OSL_ENSURE(nLen == 6, "Unexpected spacing len");
if (nLen != 6)
return;
- BYTE nWhichCell = *pParams++;
+ sal_uInt8 nWhichCell = *pParams++;
OSL_ENSURE(nWhichCell < MAX_COL + 1, "Cell out of range in spacings");
if (nWhichCell >= MAX_COL + 1)
return;
++pParams; //unknown byte
- BYTE nSideBits = *pParams++;
+ sal_uInt8 nSideBits = *pParams++;
OSL_ENSURE(nSideBits < 0x10, "Unexpected value for nSideBits");
nOverrideSpacing[nWhichCell] |= nSideBits;
OSL_ENSURE(nOverrideSpacing[nWhichCell] < 0x10,
"Unexpected value for nSideBits");
#if OSL_DEBUG_LEVEL > 1
- BYTE nUnknown2 = *pParams;
+ sal_uInt8 nUnknown2 = *pParams;
OSL_ENSURE(nUnknown2 == 0x3, "Unexpected value for spacing2");
+
#endif
++pParams;
- USHORT nValue = SVBT16ToShort( pParams );
+ sal_uInt16 nValue = SVBT16ToShort( pParams );
for (int i=0; i < 4; i++)
{
@@ -1551,14 +1552,14 @@ void WW8TabBandDesc::ProcessSpecificSpacing(const BYTE* pParams)
}
}
-void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
+void WW8TabBandDesc::ProcessSprmTDelete(const sal_uInt8* pParamsTDelete)
{
if( nWwCols && pParamsTDelete ) // set one or more cell length(s)
{
- BYTE nitcFirst= pParamsTDelete[0]; // first col to be deleted
+ sal_uInt8 nitcFirst= pParamsTDelete[0]; // first col to be deleted
if (nitcFirst >= nWwCols) // first index to delete from doesn't exist
return;
- BYTE nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
+ sal_uInt8 nitcLim = pParamsTDelete[1]; // (last col to be deleted)+1
if (nitcLim <= nitcFirst) // second index to delete to is not greater than first index
return;
@@ -1597,9 +1598,9 @@ void WW8TabBandDesc::ProcessSprmTDelete(const BYTE* pParamsTDelete)
// ReadShd liest ggfs die Hintergrundfarben einer Zeile ein.
// Es muss vorher ReadDef aufgerufen worden sein
-void WW8TabBandDesc::ReadShd(const BYTE* pS )
+void WW8TabBandDesc::ReadShd(const sal_uInt8* pS )
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if( !nLen )
return;
@@ -1619,9 +1620,9 @@ void WW8TabBandDesc::ReadShd(const BYTE* pS )
pSHDs[i].SetWWValue( *pShd );
}
-void WW8TabBandDesc::ReadNewShd(const BYTE* pS, bool bVer67)
+void WW8TabBandDesc::ReadNewShd(const sal_uInt8* pS, bool bVer67)
{
- BYTE nLen = pS ? *(pS - 1) : 0;
+ sal_uInt8 nLen = pS ? *(pS - 1) : 0;
if (!nLen)
return;
@@ -1645,9 +1646,9 @@ void WW8TabBandDesc::setcelldefaults(WW8_TCell *pCells, short nCols)
memset( pCells, 0, nCols * sizeof( WW8_TCell ) );
}
-const BYTE *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
+const sal_uInt8 *HasTabCellSprm(WW8PLCFx_Cp_FKP* pPap, bool bVer67)
{
- const BYTE *pParams;
+ const sal_uInt8 *pParams;
if (bVer67)
pParams = pPap->HasSprm(24);
else
@@ -1839,8 +1840,8 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
short nTabeDxaNew = SHRT_MAX;
bool bTabRowJustRead = false;
- const BYTE* pShadeSprm = 0;
- const BYTE* pNewShadeSprm = 0;
+ const sal_uInt8* pShadeSprm = 0;
+ const sal_uInt8* pNewShadeSprm = 0;
WW8_TablePos *pTabPos = 0;
// Suche Ende einer TabZeile
@@ -1856,7 +1857,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
pPap->GetSprms( &aDesc );
WW8SprmIter aSprmIter(aDesc.pMemPos, aDesc.nSprmsLen, aSprmParser);
- const BYTE* pParams = aSprmIter.GetAktParams();
+ const sal_uInt8* pParams = aSprmIter.GetAktParams();
for (int nLoop = 0; nLoop < 2; ++nLoop)
{
bool bRepeatedSprm = false;
@@ -1868,9 +1869,9 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
{
case sprmTTableWidth:
{
- const BYTE b0 = pParams[0];
- const BYTE b1 = pParams[1];
- const BYTE b2 = pParams[2];
+ const sal_uInt8 b0 = pParams[0];
+ const sal_uInt8 b1 = pParams[1];
+ const sal_uInt8 b2 = pParams[2];
if (b0 == 3) // Twips
nPreferredWidth = b2 * 0x100 + b1;
}
@@ -1905,10 +1906,10 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
bIsBiDi = SVBT16ToShort(pParams) ? true : false;
break;
case sprmTDxaGapHalf:
- pNewBand->nGapHalf = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nGapHalf = (sal_Int16)SVBT16ToShort( pParams );
break;
case sprmTDyaRowHeight:
- pNewBand->nLineHeight = (INT16)SVBT16ToShort( pParams );
+ pNewBand->nLineHeight = (sal_Int16)SVBT16ToShort( pParams );
bClaimLineFmt = true;
break;
case sprmTDefTable:
@@ -1927,7 +1928,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
// parameter (meaning the left-most position) and then
// shift the whole table to that margin (see below)
{
- short nDxaNew = (INT16)SVBT16ToShort( pParams );
+ short nDxaNew = (sal_Int16)SVBT16ToShort( pParams );
nOrgDxaLeft = nDxaNew;
if( nDxaNew < nTabeDxaNew )
nTabeDxaNew = nDxaNew;
@@ -2029,7 +2030,7 @@ WW8TabDesc::WW8TabDesc(SwWW8ImplReader* pIoClass, WW8_CP nStartCp) :
//Are we still in a table cell
pParams = HasTabCellSprm(pPap, bOldVer);
- const BYTE *pLevel = pPap->HasSprm(0x6649);
+ const sal_uInt8 *pLevel = pPap->HasSprm(0x6649);
// InTable
if (!pParams || (1 != *pParams) ||
(pLevel && (*pLevel <= pIo->nInTable)))
@@ -2290,11 +2291,11 @@ void WW8TabDesc::CalcDefaults()
pR->bREmptyCol = (nMaxRight - pR->nCenter[pR->nWwCols] - nRightMaxThickness) >= MINLAY;
short nAddCols = pR->bLEmptyCol + pR->bREmptyCol;
- USHORT i;
- USHORT j = ( pR->bLEmptyCol ) ? 1 : 0;
+ sal_uInt16 i;
+ sal_uInt16 j = ( pR->bLEmptyCol ) ? 1 : 0;
for (i = 0; i < pR->nWwCols; ++i)
{
- pR->nTransCell[i] = (INT8)j;
+ pR->nTransCell[i] = (sal_Int8)j;
if ( pR->nCenter[i] < pR->nCenter[i+1] )
{
pR->bExist[i] = true;
@@ -2316,15 +2317,15 @@ void WW8TabDesc::CalcDefaults()
*/
if (i && pR->bExist[i-1] == false)
{
- USHORT k=i-1;
+ sal_uInt16 k=i-1;
while (k && pR->bExist[k] == false)
k--;
- for (USHORT n=k+1;n<i;n++)
+ for (sal_uInt16 n=k+1;n<i;n++)
pR->nTransCell[n] = pR->nTransCell[k];
}
- pR->nTransCell[i++] = (INT8)(j++); // Wird u.a. wegen bREmptyCol um
- pR->nTransCell[i] = (INT8)j; // max. 2 ueberindiziert
+ pR->nTransCell[i++] = (sal_Int8)(j++); // Wird u.a. wegen bREmptyCol um
+ pR->nTransCell[i] = (sal_Int8)j; // max. 2 ueberindiziert
pR->nSwCols = pR->nSwCols + nAddCols;
if( pR->nSwCols < nMinCols )
@@ -2426,7 +2427,7 @@ void WW8TabDesc::CreateSwTable()
// da sich die (identischen) Zeilen eines Bandes prima duplizieren lassen
pTable = pIo->rDoc.InsertTable(
SwInsertTableOptions( tabopts::HEADLINE_NO_BORDER, 0 ),
- *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, FALSE, TRUE );
+ *pTmpPos, nBands, nDefaultSwCols, eOri, 0, 0, sal_False, sal_True );
OSL_ENSURE(pTable && pTable->GetFrmFmt(), "insert table failed");
if (!pTable || !pTable->GetFrmFmt())
@@ -2444,7 +2445,7 @@ void WW8TabDesc::CreateSwTable()
// ein Pagedesc steht. Dann wuerde der PageDesc in die naechste Zeile
// hinter der Tabelle rutschen, wo er nichts zu suchen hat. -> loeschen
// und spaeter an das Tabellenformat setzen
- if (SwTxtNode* pNd = pIo->rDoc.GetNodes()[pTmpPos->nNode]->GetTxtNode())
+ if (SwTxtNode *const pNd = pTmpPos->nNode.GetNode().GetTxtNode())
{
if (const SfxItemSet* pSet = pNd->GetpSwAttrSet())
{
@@ -2541,7 +2542,7 @@ void WW8TabDesc::UseSwTable()
OSL_ENSURE( pTblNd, "wo ist mein TabellenNode" );
// #i69519# - Restrict rows to repeat to a decent value
- if ( nRowsToRepeat == static_cast<USHORT>(nRows) )
+ if ( nRowsToRepeat == static_cast<sal_uInt16>(nRows) )
nRowsToRepeat = 1;
pTblNd->GetTable().SetRowsToRepeat( nRowsToRepeat );
@@ -2584,7 +2585,7 @@ void WW8TabDesc::MergeCells()
pTabLine = (*pTabLines)[ nRow ];
pTabBoxes = &pTabLine->GetTabBoxes();
- USHORT nCol = pActBand->nTransCell[ i ];
+ sal_uInt16 nCol = pActBand->nTransCell[ i ];
if (!pActBand->bExist[i])
continue;
OSL_ENSURE(nCol < pTabBoxes->Count(),
@@ -2612,7 +2613,7 @@ void WW8TabDesc::MergeCells()
//If its a hori merge only, and the only things in
//it are invalid cells then its already taken care
//of, so don't merge.
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2646,7 +2647,7 @@ void WW8TabDesc::MergeCells()
// Needed to correctly locked previously created merge groups.
// Gesamtbreite ermitteln und zuweisen
short nSizCell = pActBand->nWidth[ i ];
- for (USHORT i2 = i+1; i2 < pActBand->nWwCols; i2++ )
+ for (sal_uInt16 i2 = i+1; i2 < pActBand->nWwCols; i2++ )
if (pActBand->pTCs[ i2 ].bMerged &&
!pActBand->pTCs[ i2 ].bFirstMerged )
{
@@ -2748,17 +2749,17 @@ void WW8TabDesc::FinishSwTable()
{
// bearbeite alle Merge-Gruppen nacheinander
WW8SelBoxInfo* pActMGroup;
- USHORT nActBoxCount;
+ sal_uInt16 nActBoxCount;
- for (USHORT iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
+ for (sal_uInt16 iGr = 0; iGr < pMergeGroups->Count(); ++iGr)
{
pActMGroup = (*pMergeGroups)[ iGr ];
nActBoxCount = pActMGroup->Count();
if( ( 1 < nActBoxCount ) && pActMGroup && (*pActMGroup)[ 0 ] )
{
- const USHORT nRowSpan = pActMGroup->Count();
- for (USHORT n = 0; n < nRowSpan; ++n)
+ const sal_uInt16 nRowSpan = pActMGroup->Count();
+ for (sal_uInt16 n = 0; n < nRowSpan; ++n)
{
SwTableBox* pCurrentBox = (*pActMGroup)[n];
const long nRowSpanSet = n == 0 ?
@@ -2798,7 +2799,6 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
short nGrX2;
// improvement: search backwards
- // for ( USHORT iGr = 0; iGr < pMergeGroups->Count(); iGr++ )
for ( short iGr = pMergeGroups->Count() - 1; iGr >= 0; --iGr )
{
// die aktuell untersuchte Gruppe
@@ -2841,7 +2841,7 @@ bool WW8TabDesc::FindMergeGroup(short nX1, short nWidth, bool bExact,
bool WW8TabDesc::IsValidCell(short nCol) const
{
- return pActBand->bExist[nCol] && (USHORT)nAktRow < pTabLines->Count();
+ return pActBand->bExist[nCol] && (sal_uInt16)nAktRow < pTabLines->Count();
}
bool WW8TabDesc::InFirstParaInCell() const
@@ -2883,9 +2883,9 @@ bool WW8TabDesc::SetPamInCell(short nWwCol, bool bPam)
{
OSL_ENSURE( pActBand, "pActBand ist 0" );
- USHORT nCol = pActBand->nTransCell[nWwCol];
+ sal_uInt16 nCol = pActBand->nTransCell[nWwCol];
- if ((USHORT)nAktRow >= pTabLines->Count())
+ if ((sal_uInt16)nAktRow >= pTabLines->Count())
{
OSL_ENSURE(!this, "Actual row bigger than expected." );
if (bPam)
@@ -3079,7 +3079,7 @@ void WW8TabDesc::SetTabShades( SwTableBox* pBox, short nWwIdx )
}
}
-SvxFrameDirection MakeDirection(sal_uInt16 nCode, BOOL bIsBiDi)
+SvxFrameDirection MakeDirection(sal_uInt16 nCode, sal_Bool bIsBiDi)
{
SvxFrameDirection eDir = FRMDIR_ENVIRONMENT;
// 1: Asian layout with rotated CJK characters
@@ -3148,7 +3148,7 @@ void WW8TabDesc::AdjustNewBand()
InsertCells( pActBand->nSwCols - nDefaultSwCols );
SetPamInCell( 0, false);
- OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (USHORT)pActBand->nSwCols,
+ OSL_ENSURE( pTabBoxes && pTabBoxes->Count() == (sal_uInt16)pActBand->nSwCols,
"Falsche Spaltenzahl in Tabelle" );
if( bClaimLineFmt )
@@ -3272,7 +3272,7 @@ void WW8TabDesc::TableCellEnd()
// bWasTabRowEnd will be deactivated in
// SwWW8ImplReader::ProcessSpecial()
- USHORT iCol = GetLogicalWWCol();
+ sal_uInt16 iCol = GetLogicalWWCol();
if (iCol < aNumRuleNames.size())
{
aNumRuleNames.erase(aNumRuleNames.begin() + iCol,
@@ -3319,7 +3319,7 @@ void WW8TabDesc::TableCellEnd()
SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
WW8SelBoxInfo* pActGroup,
SwTableBox* pActBox,
- USHORT nCol )
+ sal_uInt16 nCol )
{
// Rueckgabewert defaulten
SwTableBox* pResult = 0;
@@ -3362,12 +3362,12 @@ SwTableBox* WW8TabDesc::UpdateTableMergeGroup( WW8_TCell& rCell,
}
-USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
+sal_uInt16 WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED within WW6 UI status line -1
{
- USHORT nCol = 0;
+ sal_uInt16 nCol = 0;
if( pActBand && pActBand->pTCs)
{
- for( USHORT iCol = 1; iCol <= nAktCol && iCol <= pActBand->nWwCols; ++iCol )
+ for( sal_uInt16 iCol = 1; iCol <= nAktCol; ++iCol )
{
if( !pActBand->pTCs[ iCol-1 ].bMerged )
++nCol;
@@ -3379,7 +3379,7 @@ USHORT WW8TabDesc::GetLogicalWWCol() const // returns number of col as INDICATED
// find name of numrule valid for current WW-COL
const String& WW8TabDesc::GetNumRuleName() const
{
- USHORT nCol = GetLogicalWWCol();
+ sal_uInt16 nCol = GetLogicalWWCol();
if (nCol < aNumRuleNames.size())
return aNumRuleNames[nCol];
else
@@ -3388,8 +3388,8 @@ const String& WW8TabDesc::GetNumRuleName() const
void WW8TabDesc::SetNumRuleName( const String& rName )
{
- USHORT nCol = GetLogicalWWCol();
- for (USHORT nSize = static_cast< USHORT >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
+ sal_uInt16 nCol = GetLogicalWWCol();
+ for (sal_uInt16 nSize = static_cast< sal_uInt16 >(aNumRuleNames.size()); nSize <= nCol; ++nSize)
aNumRuleNames.push_back(aEmptyStr);
aNumRuleNames[nCol] = rName;
}
@@ -3502,7 +3502,7 @@ bool SwWW8ImplReader::StartTable(WW8_CP nStartCp)
// <--
// #i33818# - The nested table doesn't have to leave
// the table cell. Thus, the Writer fly frame has to follow the text flow.
- pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( TRUE ) );
+ pTableDesc->pFlyFmt->SetFmtAttr( SwFmtFollowTextFlow( sal_True ) );
// <--
}
else
@@ -3575,13 +3575,13 @@ void SwWW8ImplReader::TabCellEnd()
mpTableEndPaM.reset();
}
-void SwWW8ImplReader::Read_TabCellEnd( USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TabCellEnd( sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabCellEnd = true;
}
-void SwWW8ImplReader::Read_TabRowEnd( USHORT, const BYTE* pData, short nLen ) // Sprm25
+void SwWW8ImplReader::Read_TabRowEnd( sal_uInt16, const sal_uInt8* pData, short nLen ) // Sprm25
{
if( ( nLen > 0 ) && ( *pData == 1 ) )
bWasTabRowEnd = true;
@@ -3661,12 +3661,12 @@ bool SwWW8ImplReader::IsInvalidOrToBeMergedTabCell() const
);
}
-USHORT SwWW8ImplReader::StyleUsingLFO( USHORT nLFOIndex ) const
+sal_uInt16 SwWW8ImplReader::StyleUsingLFO( sal_uInt16 nLFOIndex ) const
{
- USHORT nRes = USHRT_MAX;
+ sal_uInt16 nRes = USHRT_MAX;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (nLFOIndex == pCollA[ nI ].nLFOIndex) )
nRes = nI;
@@ -3679,7 +3679,7 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
SwFmt* pRet = 0;
if( pCollA )
{
- for(USHORT nI = 0; nI < pStyles->GetCount(); nI++ )
+ for(sal_uInt16 nI = 0; nI < pStyles->GetCount(); nI++ )
if( pCollA[ nI ].bValid
&& (rName.Equals( pCollA[ nI ].GetOrgWWName())) )
{
@@ -3694,17 +3694,17 @@ const SwFmt* SwWW8ImplReader::GetStyleWithOrgWWName( String& rName ) const
// class WW8RStyle
//-----------------------------------------
-const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8RStyle::HasParaSprm( sal_uInt16 nId ) const
{
if( !pParaSprms || !nSprmsLen )
return 0;
- const BYTE* pSprms = pParaSprms;
- USHORT i, x;
+ const sal_uInt8* pSprms = pParaSprms;
+ sal_uInt16 i, x;
for( i=0; i < nSprmsLen; )
{
- USHORT nAktId = maSprmParser.GetSprmId(pSprms);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
// Sprm found ?
if( nAktId == nId )
return pSprms + maSprmParser.DistanceToData(nId);
@@ -3716,7 +3716,7 @@ const BYTE* WW8RStyle::HasParaSprm( USHORT nId ) const
return 0; // Sprm not found
}
-void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
+void WW8RStyle::ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap)
{
if (!nLen)
return;
@@ -3729,7 +3729,7 @@ void WW8RStyle::ImportSprms(BYTE *pSprms, short nLen, bool bPap)
while ( nLen > 0 )
{
- USHORT nL1 = pIo->ImportSprm(pSprms);
+ sal_uInt16 nL1 = pIo->ImportSprm(pSprms);
nLen = nLen - nL1;
pSprms += nL1;
}
@@ -3743,7 +3743,7 @@ void WW8RStyle::ImportSprms(sal_Size nPosFc, short nLen, bool bPap)
if (!nLen)
return;
- BYTE *pSprms = new BYTE[nLen];
+ sal_uInt8 *pSprms = new sal_uInt8[nLen];
pStStrm->Seek(nPosFc);
pStStrm->Read(pSprms, nLen);
@@ -3757,7 +3757,7 @@ static inline short WW8SkipOdd(SvStream* pSt )
{
if ( pSt->Tell() & 0x1 )
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3768,7 +3768,7 @@ static inline short WW8SkipEven(SvStream* pSt )
{
if (!(pSt->Tell() & 0x1))
{
- UINT8 c;
+ sal_uInt8 c;
pSt->Read( &c, 1 );
return 1;
}
@@ -3777,7 +3777,7 @@ static inline short WW8SkipEven(SvStream* pSt )
short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
- INT16 cbUPX;
+ sal_Int16 cbUPX;
if( 0 < nLen ) // Empty ?
{
@@ -3797,7 +3797,7 @@ short WW8RStyle::ImportUPX(short nLen, bool bPAP, bool bOdd)
{
if( bPAP )
{
- UINT16 id;
+ sal_uInt16 id;
*pStStrm >> id;
cbUPX-= 2;
@@ -3928,7 +3928,7 @@ bool WW8RStyle::PrepareStyle(SwWW8StyInf &rSI, ww::sti eSti, sal_uInt16 nThisSty
rSI.bImportSkipped = !bImport;
// Set Based on style
- USHORT j = rSI.nBase;
+ sal_uInt16 j = rSI.nBase;
if (j != nThisStyle && j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
@@ -3990,7 +3990,7 @@ void WW8RStyle::PostStyle(SwWW8StyInf &rSI, bool bOldNoImp)
pIo->nListLevel = WW8ListManager::nMaxLevel;
}
-void WW8RStyle::Import1Style( USHORT nNr )
+void WW8RStyle::Import1Style( sal_uInt16 nNr )
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
@@ -4043,7 +4043,7 @@ void WW8RStyle::Import1Style( USHORT nNr )
delete pStd;
}
-void WW8RStyle::RecursiveReg(USHORT nNr)
+void WW8RStyle::RecursiveReg(sal_uInt16 nNr)
{
SwWW8StyInf &rSI = pIo->pCollA[nNr];
if( rSI.bImported || !rSI.bValid )
@@ -4065,7 +4065,7 @@ void WW8RStyle::RecursiveReg(USHORT nNr)
*/
void WW8RStyle::PostProcessStyles()
{
- USHORT i;
+ sal_uInt16 i;
/*
Clear all imported flags so that we can recursively apply numbering
formats and use it to mark handled ones
@@ -4095,7 +4095,7 @@ void WW8RStyle::PostProcessStyles()
void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
{ // und ermittelt die Filepos fuer jeden Style
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
short nSkip;
SwWW8StyInf &rSI = pIo->pCollA[i];
@@ -4116,30 +4116,30 @@ void WW8RStyle::ScanStyles() // untersucht Style-Abhaengigkeiten
}
}
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx)
{
- std::vector<BYTE> aRet;
+ std::vector<sal_uInt8> aRet;
aRet.push_back(60);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBold) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBold) );
aRet.push_back(61);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalic) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalic) );
aRet.push_back(62);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fStrike) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fStrike) );
aRet.push_back(63);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fOutline) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fOutline) );
aRet.push_back(65);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fSmallCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fSmallCaps) );
aRet.push_back(66);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fCaps) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fCaps) );
aRet.push_back(67);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fVanish) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fVanish) );
if (rChpx.fsFtc)
{
@@ -4187,10 +4187,10 @@ std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx)
}
aRet.push_back(80);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fBoldBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fBoldBi) );
aRet.push_back(81);
- aRet.push_back( static_cast< BYTE >(128 + rChpx.fItalicBi) );
+ aRet.push_back( static_cast< sal_uInt8 >(128 + rChpx.fItalicBi) );
if (rChpx.fsFtcBi)
{
@@ -4369,7 +4369,7 @@ void WW8RStyle::ImportOldFormatStyles()
sal_uInt16 cbName;
rSt >> cbName;
sal_uInt16 nByteCount = 2;
- USHORT stcp=0;
+ sal_uInt16 stcp=0;
while (nByteCount < cbName)
{
sal_uInt8 nCount;
@@ -4410,14 +4410,14 @@ void WW8RStyle::ImportOldFormatStyles()
stcp++;
}
- USHORT nStyles=stcp;
+ sal_uInt16 nStyles=stcp;
std::vector<pxoffset> aCHPXOffsets(stcp);
sal_uInt16 cbChpx;
rSt >> cbChpx;
nByteCount = 2;
stcp=0;
- std::vector< std::vector<BYTE> > aConvertedChpx;
+ std::vector< std::vector<sal_uInt8> > aConvertedChpx;
while (nByteCount < cbChpx)
{
sal_uInt8 cb;
@@ -4440,7 +4440,7 @@ void WW8RStyle::ImportOldFormatStyles()
nByteCount += nRemainder;
}
else
- aConvertedChpx.push_back( std::vector<BYTE>() );
+ aConvertedChpx.push_back( std::vector<sal_uInt8>() );
stcp++;
if (stcp == nStyles)
@@ -4538,7 +4538,7 @@ void WW8RStyle::ImportNewFormatStyles()
{
ScanStyles(); // Scanne Based On
- for (USHORT i = 0; i < cstd; ++i) // import Styles
+ for (sal_uInt16 i = 0; i < cstd; ++i) // import Styles
if (pIo->pCollA[i].bValid)
Import1Style( i );
}
@@ -4562,11 +4562,11 @@ void WW8RStyle::Import()
ImportStyles();
- for (USHORT i = 0; i < cstd; ++i)
+ for (sal_uInt16 i = 0; i < cstd; ++i)
{
// Follow chain
SwWW8StyInf* pi = &pIo->pCollA[i];
- USHORT j = pi->nFollow;
+ sal_uInt16 j = pi->nFollow;
if( j < cstd )
{
SwWW8StyInf* pj = &pIo->pCollA[j];
diff --git a/sw/source/filter/ww8/ww8par2.hxx b/sw/source/filter/ww8/ww8par2.hxx
index b54d5d02bb93..5e3e2a8cff10 100644
--- a/sw/source/filter/ww8/ww8par2.hxx
+++ b/sw/source/filter/ww8/ww8par2.hxx
@@ -58,24 +58,24 @@ struct WW8FlyPara
// Achtung: *Nicht* umsortieren, da Teile mit
// memcmp verglichen werden
bool bVer67;
- INT16 nSp26, nSp27; // rohe Position
- INT16 nSp45, nSp28; // Breite / Hoehe
- INT16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
- BYTE nSp29; // rohe Bindung + Alignment
- BYTE nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
+ sal_Int16 nSp26, nSp27; // rohe Position
+ sal_Int16 nSp45, nSp28; // Breite / Hoehe
+ sal_Int16 nLeMgn, nRiMgn, nUpMgn, nLoMgn; // Raender
+ sal_uInt8 nSp29; // rohe Bindung + Alignment
+ sal_uInt8 nSp37; // Wrap-Mode ( 1 / 2; 0 = no Apo ? )
WW8_BRC5 brc; // Umrandung Top, Left, Bottom, Right, Between
bool bBorderLines; // Umrandungslinien
bool bGrafApo; // true: Dieser Rahmen dient allein dazu, die
// enthaltene Grafik anders als zeichengebunden
// zu positionieren
bool mbVertSet; // true if vertical positioning has been set
- BYTE nOrigSp29;
+ sal_uInt8 nOrigSp29;
WW8FlyPara(bool bIsVer67, const WW8FlyPara* pSrc = 0);
bool operator==(const WW8FlyPara& rSrc) const;
- void Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap);
- void ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo);
- void Read(const BYTE* pSprm29, WW8RStyle* pStyle);
+ void Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap);
+ void ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo);
+ void Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle);
void ApplyTabPos(const WW8_TablePos *pTabPos);
bool IsEmpty() const;
};
@@ -85,11 +85,11 @@ struct WW8SwFlyPara
SwFlyFrmFmt* pFlyFmt;
// 1. Teil: daraus abgeleitete Sw-Attribute
- INT16 nXPos, nYPos; // Position
- INT16 nLeMgn, nRiMgn; // Raender
- INT16 nUpMgn, nLoMgn; // Raender
- INT16 nWidth, nHeight; // Groesse
- INT16 nNettoWidth;
+ sal_Int16 nXPos, nYPos; // Position
+ sal_Int16 nLeMgn, nRiMgn; // Raender
+ sal_Int16 nUpMgn, nLoMgn; // Raender
+ sal_Int16 nWidth, nHeight; // Groesse
+ sal_Int16 nNettoWidth;
SwFrmSize eHeightFix; // Hoehe Fix oder Min
RndStdIds eAnchor; // Bindung
@@ -99,12 +99,12 @@ struct WW8SwFlyPara
sal_Int16 eHAlign; // links, rechts, mittig
SwSurround eSurround; // Wrap-Mode
- BYTE nXBind, nYBind; // relativ zu was gebunden
+ sal_uInt8 nXBind, nYBind; // relativ zu was gebunden
// 2.Teil: sich waehrend des Einlesens ergebende AEnderungen
long nNewNettoWidth;
SwPosition* pMainTextPos; // um nach Apo in Haupttext zurueckzukehren
- USHORT nLineSpace; // LineSpace in tw fuer Graf-Apos
+ sal_uInt16 nLineSpace; // LineSpace in tw fuer Graf-Apos
bool bAutoWidth;
bool bToggelPos;
@@ -115,8 +115,8 @@ struct WW8SwFlyPara
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy );
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy );
void BoxUpWidth( long nWidth );
SwWW8FltAnchorStack *pOldAnchorStck;
@@ -125,7 +125,7 @@ struct WW8SwFlyPara
class SwWW8StyInf
{
String sWWStyleName;
- USHORT nWWStyleId;
+ sal_uInt16 nWWStyleId;
public:
rtl_TextEncoding eLTRFontSrcCharSet; // rtl_TextEncoding fuer den Font
rtl_TextEncoding eRTLFontSrcCharSet; // rtl_TextEncoding fuer den Font
@@ -134,11 +134,11 @@ public:
WW8FlyPara* pWWFly;
SwNumRule* pOutlineNumrule;
long nFilePos;
- USHORT nBase;
- USHORT nFollow;
- USHORT nLFOIndex;
- BYTE nListLevel;
- BYTE nOutlineLevel; // falls Gliederungs-Style
+ sal_uInt16 nBase;
+ sal_uInt16 nFollow;
+ sal_uInt16 nLFOIndex;
+ sal_uInt8 nListLevel;
+ sal_uInt8 nOutlineLevel; // falls Gliederungs-Style
sal_uInt16 n81Flags; // Fuer Bold, Italic, ...
sal_uInt16 n81BiDiFlags; // Fuer Bold, Italic, ...
SvxLRSpaceItem maWordLR;
@@ -191,12 +191,12 @@ public:
delete pWWFly;
}
- void SetOrgWWIdent( const String& rName, const USHORT nId )
+ void SetOrgWWIdent( const String& rName, const sal_uInt16 nId )
{
sWWStyleName = rName;
nWWStyleId = nId;
}
- USHORT GetWWStyleId() const { return nWWStyleId; }
+ sal_uInt16 GetWWStyleId() const { return nWWStyleId; }
const String& GetOrgWWName() const
{
return sWWStyleName;
@@ -226,10 +226,10 @@ friend class SwWW8ImplReader;
SwNumRule* pStyRule; // Bullets und Aufzaehlungen in Styles
- BYTE* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
- USHORT nSprmsLen; // Laenge davon
+ sal_uInt8* pParaSprms; // alle ParaSprms des UPX falls UPX.Papx
+ sal_uInt16 nSprmsLen; // Laenge davon
- BYTE nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
+ sal_uInt8 nWwNumLevel; // fuer Bullets und Aufzaehlungen in Styles
bool bTxtColChanged;
bool bFontChanged; // For Simulating Default-Font
@@ -240,13 +240,13 @@ friend class SwWW8ImplReader;
bool bWidowsChanged; // For Simulating Default-Widows / Orphans
void ImportSprms(sal_Size nPosFc, short nLen, bool bPap);
- void ImportSprms(BYTE *pSprms, short nLen, bool bPap);
+ void ImportSprms(sal_uInt8 *pSprms, short nLen, bool bPap);
void ImportGrupx(short nLen, bool bPara, bool bOdd);
short ImportUPX(short nLen, bool bPAP, bool bOdd);
void Set1StyleDefaults();
- void Import1Style(USHORT nNr);
- void RecursiveReg(USHORT nNr);
+ void Import1Style(sal_uInt16 nNr);
+ void RecursiveReg(sal_uInt16 nNr);
void ImportStyles();
@@ -264,7 +264,7 @@ public:
WW8RStyle( WW8Fib& rFib, SwWW8ImplReader* pI );
void Import();
void PostProcessStyles();
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
};
class WW8FlySet: public SfxItemSet
@@ -282,7 +282,7 @@ public:
enum WW8LvlType {WW8_None, WW8_Outline, WW8_Numbering, WW8_Sequence, WW8_Pause};
-WW8LvlType GetNumType(BYTE nWwLevelNo);
+WW8LvlType GetNumType(sal_uInt8 nWwLevelNo);
#endif
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/ww8/ww8par3.cxx b/sw/source/filter/ww8/ww8par3.cxx
index e5cfefd4c3ce..fd5edc4358b2 100644
--- a/sw/source/filter/ww8/ww8par3.cxx
+++ b/sw/source/filter/ww8/ww8par3.cxx
@@ -153,7 +153,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormTextBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -201,7 +201,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormCheckBox( WW8FieldDesc* pF, String& rStr )
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0) {
@@ -276,7 +276,7 @@ eF_ResT SwWW8ImplReader::Read_F_FormListBox( WW8FieldDesc* pF, String& rStr)
WW8_CP currentCP=pF->nSCode;
WW8_CP currentLen=pF->nLen;
- USHORT bkmFindIdx;
+ sal_uInt16 bkmFindIdx;
String aBookmarkFind=pB->GetBookmark(currentCP-1, currentCP+currentLen-1, bkmFindIdx);
if (aBookmarkFind.Len()>0)
@@ -346,8 +346,8 @@ struct WW8LST // nur DIE Eintraege, die WIR benoetigen!
// nIStDNil if no style linked
sal_uInt32 nIdLst; // Unique List ID
sal_uInt32 nTplC; // Unique template code - Was ist das bloss?
- BYTE bSimpleList:1; // Flag: Liste hat nur EINEN Level
- BYTE bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
+ sal_uInt8 bSimpleList:1; // Flag: Liste hat nur EINEN Level
+ sal_uInt8 bRestartHdn:1; // WW6-Kompatibilitaets-Flag:
// true if the list should start numbering over
}; // at the beginning of each section
@@ -375,11 +375,11 @@ struct WW8LVL // nur DIE Eintraege, die WIR benoetigen!
sal_uInt8 nLenGrpprlChpx; // length, in bytes, of the LVL's grpprlChpx
sal_uInt8 nLenGrpprlPapx; // length, in bytes, of the LVL's grpprlPapx
sal_uInt8 nAlign: 2; // alignment (left, right, centered) of the number
- BYTE bLegal: 1; // egal
- BYTE bNoRest:1; // egal
- BYTE bV6Prev:1; // Ver6-Compatible: number will include previous levels
- BYTE bV6PrSp:1; // Ver6-Compatible: egal
- BYTE bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
+ sal_uInt8 bLegal: 1; // egal
+ sal_uInt8 bNoRest:1; // egal
+ sal_uInt8 bV6Prev:1; // Ver6-Compatible: number will include previous levels
+ sal_uInt8 bV6PrSp:1; // Ver6-Compatible: egal
+ sal_uInt8 bV6: 1; // falls true , beachte die V6-Compatible Eintraege!
sal_uInt8 bDummy: 1; // (macht das Byte voll)
};
@@ -392,8 +392,8 @@ struct WW8LFOLVL
// dieses Byte ist _absichtlich_ nicht in das folgende Byte hineingepackt !!
// (siehe Kommentar unten bei struct WW8LFOInfo)
- BYTE bStartAt :1; // true if the start-at value is overridden
- BYTE bFormat :1; // true if the formatting is overriden
+ sal_uInt8 bStartAt :1; // true if the start-at value is overridden
+ sal_uInt8 bFormat :1; // true if the formatting is overriden
WW8LFOLVL() :
nStartAt(1), nLevel(0), bStartAt(1), bFormat(0) {}
@@ -410,8 +410,8 @@ struct WW8LSTInfo // sortiert nach nIdLst (in WW8 verwendete Listen-Id)
SwNumRule* pNumRule; // Zeiger auf entsprechende Listenvorlage im Writer
sal_uInt32 nIdLst; // WW8Id dieser Liste
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
WW8LSTInfo(SwNumRule* pNumRule_, WW8LST& aLST)
@@ -441,12 +441,12 @@ struct WW8LFOInfo // unsortiert, d.h. Reihenfolge genau wie im WW8 Stream
// Byte mit hineinpacken, doch waere das eine ziemliche Fehlerquelle,
// an dem Tag, wo MS ihr Listenformat auf mehr als 15 Level aufbohren.
- BYTE bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
+ sal_uInt8 bOverride :1;// Flag, ob die NumRule nicht in maLSTInfos steht,
// sondern fuer pLFOInfos NEU angelegt wurde
- BYTE bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
- BYTE bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
+ sal_uInt8 bSimpleList:1;// Flag, ob diese NumRule nur einen Level verwendet
+ sal_uInt8 bUsedInDoc :1;// Flag, ob diese NumRule im Doc verwendet wird,
// oder beim Reader-Ende geloescht werden sollte
- BYTE bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
+ sal_uInt8 bLSTbUIDSet :1;// Flag, ob bUsedInDoc in maLSTInfos gesetzt wurde,
// und nicht nochmals gesetzt zu werden braucht
WW8LFOInfo(const WW8LFO& rLFO);
};
@@ -471,7 +471,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
sal_uInt8 nLen)
{
sal_uInt8* pSprms = &rSprms;
- USHORT nRemLen=nLen;
+ sal_uInt16 nRemLen=nLen;
while (nRemLen > (maSprmParser.getVersion()?1:0))
{
sal_uInt16 nAktId = maSprmParser.GetSprmId(pSprms);
@@ -479,7 +479,7 @@ sal_uInt8* WW8ListManager::GrpprlHasSprm(sal_uInt16 nId, sal_uInt8& rSprms,
return pSprms + maSprmParser.DistanceToData(nId);
// gib Zeiger auf Daten
- USHORT nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
+ sal_uInt16 nSize = maSprmParser.GetSprmSize(nAktId, pSprms);
pSprms += nSize;
nRemLen -= nSize;
}
@@ -638,7 +638,7 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// most of the time.
if ( nTabPos != 0 )
{
- const USHORT nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
+ const sal_uInt16 nDesired = aLVL.nDxaLeft + aLVL.nDxaLeft1;
bool bDoAdjust = false;
if ( nDesired < aLVL.nDxaLeft )
@@ -694,8 +694,8 @@ bool WW8ListManager::ReadLVL(SwNumFmt& rNumFmt, SfxItemSet*& rpItemSet,
// in WW8PAR6.CXX rufen ganz normal ihr NewAttr() oder GetFmtAttr()
// und diese merken am besetzten Reader-ItemSet-Pointer, dass dieser
// spezielle ItemSet relevant ist - und nicht ein Stack oder Style!
- USHORT nOldFlags1 = rReader.GetToggleAttrFlags();
- USHORT nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
+ sal_uInt16 nOldFlags1 = rReader.GetToggleAttrFlags();
+ sal_uInt16 nOldFlags2 = rReader.GetToggleBiDiAttrFlags();
short nLen = aLVL.nLenGrpprlChpx;
sal_uInt8* pSprms1 = &aGrpprlChpx[0];
while (0 < nLen)
@@ -1056,7 +1056,7 @@ SwNumRule* WW8ListManager::CreateNextRule(bool bSimple)
sPrefix += String::CreateFromInt32(nUniqueList++);
// #i86652#
sal_uInt16 nRul =
- rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, FALSE,
+ rDoc.MakeNumRule( rDoc.GetUniqueNumRuleName(&sPrefix), 0, sal_False,
SvxNumberFormat::LABEL_ALIGNMENT );
// <--
SwNumRule* pMyNumRule = rDoc.GetNumRuleTbl()[nRul];
@@ -1386,7 +1386,7 @@ WW8ListManager::WW8ListManager(SvStream& rSt_, SwWW8ImplReader& rReader_)
else if (aLFOLVL.bStartAt)
{
aNumFmt.SetStart(
- writer_cast<USHORT>(aLFOLVL.nStartAt));
+ writer_cast<sal_uInt16>(aLFOLVL.nStartAt));
}
//
// 2.2.2.3 das NumFmt in die NumRule aufnehmen
@@ -1477,7 +1477,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
if (bRet)
{
- for (BYTE n = 0; n < MAXLEVEL; ++n )
+ for (sal_uInt8 n = 0; n < MAXLEVEL; ++n )
{
//The SvxNumberFormat compare, not the SwNumFmt compare
const SvxNumberFormat &rO = rOne.Get(n);
@@ -1493,7 +1493,7 @@ bool IsEqualFormatting(const SwNumRule &rOne, const SwNumRule &rTwo)
}
SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
- const BYTE nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
+ const sal_uInt8 nLevel, std::vector<sal_uInt8> &rParaSprms, SwTxtNode *pNode)
{
sal_uInt16 nLFOInfos = pLFOInfos ? pLFOInfos->Count() : 0;
if( nLFOInfos <= nLFOPosition )
@@ -1551,7 +1551,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
SwNumRule *pRet = pLFOInfo->pNumRule;
bool bRestart(false);
- USHORT nStart(0);
+ sal_uInt16 nStart(0);
bool bNewstart(false);
/*
Note: If you fiddle with this then you have to make sure that #i18322#
@@ -1591,7 +1591,7 @@ SwNumRule* WW8ListManager::GetNumRuleForActivation(sal_uInt16 nLFOPosition,
else
{
bNewstart = true;
- nStart = writer_cast<USHORT>
+ nStart = writer_cast<sal_uInt16>
(pLFOInfo->maOverrides[nLevel].nStartAt);
}
}
@@ -2098,10 +2098,10 @@ bool SwWW8ImplReader::ImportFormulaControl(WW8FormulaControl &aFormula,
(*pPlcxMan)++;
nStart = pPlcxMan->Where();
}
- ULONG nOffset = nPicLocFc;
+ sal_uLong nOffset = nPicLocFc;
aSave.Restore(this);
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
WW8_PIC aPic;
pDataStream->Seek( nOffset);
PicRead( pDataStream, &aPic, bVer67);
@@ -2146,8 +2146,8 @@ sal_Bool SwMSConvertControls::InsertFormula(WW8FormulaControl &rFormula)
void WW8FormulaControl::FormulaRead(SwWw8ControlType nWhich,
SvStream *pDataStream)
{
- UINT8 nField;
- UINT8 nHeaderByte;
+ sal_uInt8 nField;
+ sal_uInt8 nHeaderByte;
int nType=0;
*pDataStream >> nHeaderByte;
@@ -2286,7 +2286,7 @@ awt::Size SwWW8ImplReader::MiserableDropDownFormHack(const String &rString,
awt::Size aRet;
struct CtrlFontMapEntry
{
- USHORT nWhichId;
+ sal_uInt16 nWhichId;
const sal_Char* pPropNm;
};
const CtrlFontMapEntry aMapTable[] =
@@ -2548,7 +2548,7 @@ WW8FormulaEditBox::WW8FormulaEditBox(SwWW8ImplReader &rR)
sal_Bool SwMSConvertControls::InsertControl(
const uno::Reference< form::XFormComponent > & rFComp,
const awt::Size& rSize, uno::Reference< drawing::XShape > *pShape,
- BOOL bFloatingCtrl)
+ sal_Bool bFloatingCtrl)
{
const uno::Reference< container::XIndexContainer > &rComps = GetFormComps();
uno::Any aTmp( &rFComp, ::getCppuType((const uno::Reference<
@@ -2575,8 +2575,8 @@ sal_Bool SwMSConvertControls::InsertControl(
xCreate, uno::UNO_QUERY );
//I lay a small bet that this will change to
- //INT16 nTemp=TextContentAnchorType::AS_CHARACTER;
- INT16 nTemp;
+ //sal_Int16 nTemp=TextContentAnchorType::AS_CHARACTER;
+ sal_Int16 nTemp;
if (bFloatingCtrl)
nTemp= text::TextContentAnchorType_AT_PARAGRAPH;
else
diff --git a/sw/source/filter/ww8/ww8par4.cxx b/sw/source/filter/ww8/ww8par4.cxx
index 725981e57c05..cd91a87d1f08 100644
--- a/sw/source/filter/ww8/ww8par4.cxx
+++ b/sw/source/filter/ww8/ww8par4.cxx
@@ -67,10 +67,10 @@
struct OLE_MFP
{
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int in 1/100 mm
- INT16 yExt; // 0xa int in 1/100 mm
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int in 1/100 mm
+ sal_Int16 yExt; // 0xa int in 1/100 mm
+ sal_Int16 hMF; // 0xc int
};
using namespace ::com::sun::star;
@@ -100,7 +100,7 @@ static bool SwWw8ReadScaling(long& rX, long& rY, SvStorageRef& rSrc1)
OSL_ENSURE( pS->Tell() >= 76, "+OLE-PIC-Stream is shorter than 76 Byte" );
- INT32 nOrgWidth,
+ sal_Int32 nOrgWidth,
nOrgHeight,
nScaleX,
nScaleY,
@@ -141,7 +141,7 @@ static bool SwWw6ReadMetaStream(GDIMetaFile& rWMF, OLE_MFP* pMfp,
STREAM_STD_READ | STREAM_NOCREATE);
SvStorageStream* pSt = xSrc2;
pSt->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- ULONG nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
+ sal_uLong nRead = pSt->Read( pMfp, sizeof(*pMfp ) );
// Mini-Placable-Header lesen
if (nRead != sizeof(*pMfp))
return false;
@@ -196,8 +196,8 @@ static bool SwWw6ReadMacPICTStream(Graphic& rGraph, SvStorageRef& rSrc1)
SvStorageStreamRef xSrc4 = rSrc1->OpenSotStream( CREATE_CONST_ASC( "\3PICT" ));
SvStorageStream* pStp = xSrc4;
pStp->SetNumberFormatInt( NUMBERFORMAT_INT_LITTLEENDIAN );
- BYTE aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
- ULONG nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
+ sal_uInt8 aTestA[10]; // Ist der 01Ole-Stream ueberhaupt vorhanden
+ sal_uLong nReadTst = pStp->Read( aTestA, sizeof( aTestA ) );
if (nReadTst != sizeof(aTestA))
return false;
@@ -425,7 +425,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
if (bOleOk)
{
- ULONG nOldPos = pDataStream->Tell();
+ sal_uLong nOldPos = pDataStream->Tell();
pDataStream->Seek(STREAM_SEEK_TO_END);
SvStream *pTmpData = 0;
if (nObjLocFc < pDataStream->Tell())
@@ -441,7 +441,7 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
STREAM_STD_READ | STREAM_NOCREATE );
if ( xObjInfoSrc.Is() && !xObjInfoSrc->GetError() )
{
- BYTE nByte = 0;
+ sal_uInt8 nByte = 0;
*xObjInfoSrc >> nByte;
if ( ( nByte >> 4 ) & embed::Aspects::MSOLE_ICON )
nAspect = embed::Aspects::MSOLE_ICON;
@@ -459,17 +459,17 @@ SdrObject* SwWW8ImplReader::ImportOleBase( Graphic& rGraph,
}
void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
- INT32 nTblPos, INT32 nTblSiz, SwDoc& rDocOut )
+ sal_Int32 nTblPos, sal_Int32 nTblSiz, SwDoc& rDocOut )
{
::std::vector<String> aAuthorNames;
WW8ReadSTTBF( !bVer67, rStrm, nTblPos, nTblSiz, bVer67 ? 2 : 0,
eStructCharSet, aAuthorNames );
- USHORT nCount = static_cast< USHORT >(aAuthorNames.size());
- for( USHORT nAuthor = 0; nAuthor < nCount; ++nAuthor )
+ sal_uInt16 nCount = static_cast< sal_uInt16 >(aAuthorNames.size());
+ for( sal_uInt16 nAuthor = 0; nAuthor < nCount; ++nAuthor )
{
// Store author in doc
- USHORT nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
+ sal_uInt16 nSWId = rDocOut.InsertRedlineAuthor(aAuthorNames[nAuthor]);
// Store matchpair
if( !pAuthorInfos )
pAuthorInfos = new sw::util::AuthorInfos;
@@ -484,14 +484,14 @@ void SwWW8ImplReader::ReadRevMarkAuthorStrTabl( SvStream& rStrm,
*/
// insert or delete content (change char attributes resp.)
void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
- const BYTE* pData, short nLen )
+ const sal_uInt8* pData, short nLen )
{
// there *must* be a SprmCIbstRMark[Del] and a SprmCDttmRMark[Del]
// pointing to the very same char position as our SprmCFRMark[Del]
if (!pPlcxMan)
return;
- const BYTE* pSprmCIbstRMark;
- const BYTE* pSprmCDttmRMark;
+ const sal_uInt8* pSprmCIbstRMark;
+ const sal_uInt8* pSprmCDttmRMark;
if( nsRedlineType_t::REDLINE_FORMAT == eType )
{
pSprmCIbstRMark = pData+1;
@@ -504,7 +504,7 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
of the change, (possibly a word bug) so we must use the "get a full
list" varient of HasCharSprm and take the last one as the true one.
*/
- std::vector<const BYTE *> aResult;
+ std::vector<const sal_uInt8 *> aResult;
bool bIns = (nsRedlineType_t::REDLINE_INSERT == eType);
if( bVer67 )
{
@@ -529,16 +529,16 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
else
{
// start of new revision mark, if not there default to first entry
- USHORT nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
+ sal_uInt16 nWWAutNo = pSprmCIbstRMark ? SVBT16ToShort( pSprmCIbstRMark ) : 0;
sw::util::AuthorInfo aEntry(nWWAutNo);
- USHORT nPos;
+ sal_uInt16 nPos;
if (pAuthorInfos && pAuthorInfos->Seek_Entry(&aEntry, &nPos))
{
if (const sw::util::AuthorInfo* pAuthor = pAuthorInfos->GetObject(nPos))
{
- UINT32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
+ sal_uInt32 nWWDate = pSprmCDttmRMark ? SVBT32ToUInt32(pSprmCDttmRMark): 0;
DateTime aStamp(sw::ms::DTTM2DateTime(nWWDate));
- USHORT nAutorNo = pAuthor->nOurId;
+ sal_uInt16 nAutorNo = pAuthor->nOurId;
SwFltRedline aNewAttr(eType, nAutorNo, aStamp);
NewAttr(aNewAttr);
@@ -548,19 +548,19 @@ void SwWW8ImplReader::Read_CRevisionMark(RedlineType_t eType,
}
// insert new content
-void SwWW8ImplReader::Read_CFRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_INSERT, pData, nLen );
}
// delete old content
-void SwWW8ImplReader::Read_CFRMarkDel(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CFRMarkDel(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
Read_CRevisionMark( nsRedlineType_t::REDLINE_DELETE, pData, nLen );
}
// change properties of content ( == char formating)
-void SwWW8ImplReader::Read_CPropRMark(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CPropRMark(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
// complex (len is always 7)
// 1 byte - chp.fPropRMark
diff --git a/sw/source/filter/ww8/ww8par5.cxx b/sw/source/filter/ww8/ww8par5.cxx
index ab9a07d646a0..be19f7453432 100644
--- a/sw/source/filter/ww8/ww8par5.cxx
+++ b/sw/source/filter/ww8/ww8par5.cxx
@@ -286,10 +286,10 @@ xub_StrLen _ReadFieldParams::FindNextStringPiece(const xub_StrLen nStart)
// read parameters "1-3" or 1-3 with both values between 1 and nMax
-bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax)
+bool _ReadFieldParams::GetTokenSttFromTo(sal_uInt16* pFrom, sal_uInt16* pTo, sal_uInt16 nMax)
{
- USHORT nStart = 0;
- USHORT nEnd = 0;
+ sal_uInt16 nStart = 0;
+ sal_uInt16 nEnd = 0;
xub_StrLen n = GoToTokenParam();
if( STRING_NOTFOUND != n )
{
@@ -300,8 +300,8 @@ bool _ReadFieldParams::GetTokenSttFromTo(USHORT* pFrom, USHORT* pTo, USHORT nMax
String sStart( sParams.GetToken(0, '-', nIndex) );
if( STRING_NOTFOUND != nIndex )
{
- nStart = static_cast<USHORT>(sStart.ToInt32());
- nEnd = static_cast<USHORT>(sParams.Copy(nIndex).ToInt32());
+ nStart = static_cast<sal_uInt16>(sStart.ToInt32());
+ nEnd = static_cast<sal_uInt16>(sParams.Copy(nIndex).ToInt32());
}
}
if( pFrom ) *pFrom = nStart;
@@ -555,14 +555,14 @@ static SvxExtNumType GetNumberPara(String& rStr, bool bAllowPageDesc = false)
-bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
+bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, sal_uInt16 nLang)
{
bool bRet(false);
const SvxLanguageItem *pLang =
(const SvxLanguageItem*)GetFmtAttr(RES_CHRATR_LANGUAGE);
OSL_ENSURE(pLang, "impossible");
- USHORT nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
+ sal_uInt16 nDefault = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
if (nLang != nDefault)
{
@@ -574,12 +574,12 @@ bool SwWW8ImplReader::ForceFieldLanguage(SwField &rFld, USHORT nLang)
return bRet;
}
-String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
+String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, sal_uInt16 nLang)
{
//Get the system date in the correct final language layout, convert to
//a known language and modify the 2 digit year part to be 4 digit, and
//convert back to the correct language layout.
- ULONG nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
+ sal_uLong nIndex = pFormatter->GetFormatIndex(NF_DATE_SYSTEM_SHORT, nLang);
SvNumberformat aFormat = const_cast<SvNumberformat &>
(*(pFormatter->GetEntry(nIndex)));
@@ -599,17 +599,17 @@ String GetWordDefaultDateStringAsUS(SvNumberFormatter* pFormatter, USHORT nLang)
}
short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
- USHORT &rLang, int nWhichDefault, bool bHijri)
+ sal_uInt16 &rLang, int nWhichDefault, bool bHijri)
{
bool bRTL = false;
if (pPlcxMan && !bVer67)
{
- const BYTE *pResult = pPlcxMan->HasCharSprm(0x85A);
+ const sal_uInt8 *pResult = pPlcxMan->HasCharSprm(0x85A);
if (pResult && *pResult)
bRTL = true;
}
RES_CHRATR eLang = bRTL ? RES_CHRATR_CTL_LANGUAGE : RES_CHRATR_LANGUAGE;
- const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< USHORT >(eLang));
+ const SvxLanguageItem *pLang = (SvxLanguageItem*)GetFmtAttr( static_cast< sal_uInt16 >(eLang));
OSL_ENSURE(pLang, "impossible");
rLang = pLang ? pLang->GetValue() : LANGUAGE_ENGLISH_US;
@@ -639,8 +639,8 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
if (bHijri)
sParams.Insert(CREATE_CONST_ASC("[~hijri]"), 0);
- UINT16 nCheckPos = 0;
- INT16 nType = NUMBERFORMAT_DEFINED;
+ sal_uInt16 nCheckPos = 0;
+ sal_Int16 nType = NUMBERFORMAT_DEFINED;
rFormat = 0;
pFormatter->PutandConvertEntry(sParams, nCheckPos, nType, rFormat,
@@ -649,7 +649,7 @@ short SwWW8ImplReader::GetTimeDatePara(String& rStr, sal_uInt32& rFormat,
return bHasTime ? NUMBERFORMAT_DATETIME : NUMBERFORMAT_DATE;
}
- ULONG nFmtIdx =
+ sal_uLong nFmtIdx =
sw::ms::MSDateTimeFormatToSwFormat(sParams, pFormatter, rLang, bHijri,
GetFib().lid);
short nNumFmtType = NUMBERFORMAT_UNDEFINED;
@@ -1032,9 +1032,9 @@ long SwWW8ImplReader::Read_Field(WW8PLCFManResult* pRes)
if (bNested)
return 0;
- USHORT n = ( aF.nId <= eMax ) ? aF.nId : static_cast< USHORT >(eMax); // alle > 91 werden 92
- USHORT nI = n / 32; // # des UINT32
- ULONG nMask = 1 << ( n % 32 ); // Maske fuer Bits
+ sal_uInt16 n = ( aF.nId <= eMax ) ? aF.nId : static_cast< sal_uInt16 >(eMax); // alle > 91 werden 92
+ sal_uInt16 nI = n / 32; // # des sal_uInt32
+ sal_uLong nMask = 1 << ( n % 32 ); // Maske fuer Bits
if( nFieldTagAlways[nI] & nMask ) // Flag: Tag it
return Read_F_Tag( &aF ); // Resultat nicht als Text
@@ -1221,7 +1221,7 @@ void SwWW8ImplReader::MakeTagString( String& rStr, const String& rOrg )
rStr.Erase( MAX_FIELDLEN - 4 );
}
-void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
+void SwWW8ImplReader::InsertTagField( const sal_uInt16 nId, const String& rTagText )
{
String aName( CREATE_CONST_ASC( "WwFieldTag" ) );
if( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_DO_ID ) ) // Nummer?
@@ -1239,7 +1239,7 @@ void SwWW8ImplReader::InsertTagField( const USHORT nId, const String& rTagText )
SwFieldType* pFT = rDoc.InsertFldType(
SwSetExpFieldType( &rDoc, aName, nsSwGetSetExpType::GSE_STRING ) );
SwSetExpField aFld( (SwSetExpFieldType*)pFT, rTagText ); // SUB_INVISIBLE
- USHORT nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
+ sal_uInt16 nSubType = ( SwFltGetFlag( nFieldFlags, SwFltControlStack::TAGS_VISIBLE ) ) ? 0 : nsSwExtendedSubType::SUB_INVISIBLE;
aFld.SetSubType(nSubType | nsSwGetSetExpType::GSE_STRING);
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
@@ -1385,7 +1385,7 @@ long SwWW8ImplReader::MapBookmarkVariables(const WW8FieldDesc* pF,
If there was no bookmark associated with this set field, then we create a
pseudo one and insert it in the document.
*/
- USHORT nIndex;
+ sal_uInt16 nIndex;
pPlcxMan->GetBook()->MapName(rOrigName);
String sName = pPlcxMan->GetBook()->GetBookmark(
pF->nSCode, pF->nSCode + pF->nLen, nIndex);
@@ -1595,9 +1595,9 @@ eF_ResT SwWW8ImplReader::Read_F_Seq( WW8FieldDesc*, String& rStr )
eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
{
- USHORT nSub=0;
+ sal_uInt16 nSub=0;
// RegInfoFormat, DefaultFormat fuer DocInfoFelder
- USHORT nReg = DI_SUB_AUTHOR;
+ sal_uInt16 nReg = DI_SUB_AUTHOR;
bool bDateTime = false;
if( 85 == pF->nId )
@@ -1674,11 +1674,11 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
= "REVISIONNUMBER";
static const sal_Char* aName54 // Spanish
= "SNUBBEL BUBBEL";
- static const USHORT nFldCnt = 5;
+ static const sal_uInt16 nFldCnt = 5;
// additional fields are to be coded soon! :-)
- static const USHORT nLangCnt = 4;
+ static const sal_uInt16 nLangCnt = 4;
static const sal_Char *aNameSet_26[nFldCnt][nLangCnt+1] =
{
{aName10, aName11, aName12, aName13, aName14},
@@ -1689,8 +1689,8 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
};
bool bFldFound= false;
- USHORT nFIdx;
- for(USHORT nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
+ sal_uInt16 nFIdx;
+ for(sal_uInt16 nLIdx=1; !bFldFound && (nLangCnt > nLIdx); ++nLIdx)
{
for(nFIdx = 0; !bFldFound && (nFldCnt > nFIdx); ++nFIdx)
{
@@ -1762,7 +1762,7 @@ eF_ResT SwWW8ImplReader::Read_F_DocInfo( WW8FieldDesc* pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
if (bDateTime)
{
short nDT = GetTimeDatePara(rStr, nFormat, nLang, pF->nId);
@@ -1837,7 +1837,7 @@ eF_ResT SwWW8ImplReader::Read_F_DateTime( WW8FieldDesc*pF, String& rStr )
sal_uInt32 nFormat = 0;
- USHORT nLang(0);
+ sal_uInt16 nLang(0);
short nDT = GetTimeDatePara(rStr, nFormat, nLang, ww::eDATE, bHijri);
if( NUMBERFORMAT_UNDEFINED == nDT ) // no D/T-Formatstring
@@ -1904,7 +1904,7 @@ eF_ResT SwWW8ImplReader::Read_F_FileName(WW8FieldDesc*, String &rStr)
eF_ResT SwWW8ImplReader::Read_F_Anz( WW8FieldDesc* pF, String& rStr )
{ // SeitenZahl - Feld
- USHORT nSub = DS_PAGE;
+ sal_uInt16 nSub = DS_PAGE;
switch ( pF->nId ){
case 27: nSub = DS_WORD; break; // Wordzahl
case 28: nSub = DS_CHAR; break; // Zeichenzahl
@@ -1927,7 +1927,7 @@ eF_ResT SwWW8ImplReader::Read_F_CurPage( WW8FieldDesc*, String& rStr )
rDoc.InsertPoolItem( *pPaM, SwFmtFld( aFld ), 0 );
static const sal_Char aDelim[] = "-.:\x97\x96";
- BYTE nDelim = nPgChpDelim;
+ sal_uInt8 nDelim = nPgChpDelim;
if( nDelim > 4 )
nDelim = 0;
@@ -2590,9 +2590,9 @@ void SwWW8ImplReader::Read_SubF_Combined( _ReadFieldParams& rReadParam)
void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
{
- USHORT nJustificationCode=0;
+ sal_uInt16 nJustificationCode=0;
String sFontName;
- UINT32 nFontSize=0;
+ sal_uInt32 nFontSize=0;
String sRuby;
String sText;
long nRet;
@@ -2606,12 +2606,12 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
if( sTemp.EqualsIgnoreCaseAscii( "jc", 0, 2 ) )
{
sTemp.Erase(0,2);
- nJustificationCode = static_cast<USHORT>(sTemp.ToInt32());
+ nJustificationCode = static_cast<sal_uInt16>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "hps", 0, 3 ) )
{
sTemp.Erase(0,3);
- nFontSize= static_cast<UINT32>(sTemp.ToInt32());
+ nFontSize= static_cast<sal_uInt32>(sTemp.ToInt32());
}
else if( sTemp.EqualsIgnoreCaseAscii( "Font:", 0, 5 ) )
{
@@ -2689,7 +2689,7 @@ void SwWW8ImplReader::Read_SubF_Ruby( _ReadFieldParams& rReadParam)
SwFmtRuby aRuby(sRuby);
const SwCharFmt *pCharFmt=0;
//Make a guess at which of asian of western we should be setting
- USHORT nScript;
+ sal_uInt16 nScript;
if (pBreakIt->GetBreakIter().is())
nScript = pBreakIt->GetBreakIter()->getScriptType(sRuby, 0);
else
@@ -2777,7 +2777,7 @@ bool SwWW8ImplReader::AddExtraOutlinesAsExtraStyles(SwTOXBase& rBase)
bool bExtras = false;
//This is the case if the winword outline numbering is set while the
//writer one is not
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutline())
@@ -2812,7 +2812,7 @@ static void EnsureMaxLevelForTemplates(SwTOXBase& rBase)
//Word included.
if ((rBase.GetLevel() != MAXLEVEL) && (nsSwTOXElement::TOX_TEMPLATE & rBase.GetCreateType()))
{
- for (USHORT nI = MAXLEVEL; nI > 0; --nI)
+ for (sal_uInt16 nI = MAXLEVEL; nI > 0; --nI)
{
String sStyles(rBase.GetStyleNames(nI-1));
if (rBase.GetStyleNames(nI-1).Len())
@@ -2854,12 +2854,12 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
else while( STRING_NOTFOUND != nIndex )
{
xub_StrLen nOldIndex=nIndex;
- USHORT nLevel = static_cast<USHORT>(
+ sal_uInt16 nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ';', nIndex).ToInt32());
if( STRING_NOTFOUND == nIndex )
{
nIndex = nOldIndex;
- nLevel = static_cast<USHORT>(
+ nLevel = static_cast<sal_uInt16>(
sParams.GetToken(0, ',', nIndex).ToInt32());
}
@@ -2892,9 +2892,9 @@ void lcl_toxMatchTSwitch(SwWW8ImplReader& rReader, SwTOXBase& rBase,
}
}
-USHORT wwSectionManager::CurrentSectionColCount() const
+sal_uInt16 wwSectionManager::CurrentSectionColCount() const
{
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
if (!maSegments.empty())
nIndexCols = maSegments.back().maSep.ccolM1 + 1;
return nIndexCols;
@@ -2916,10 +2916,10 @@ bool wwSectionManager::WillHavePageDescHere(SwNodeIndex aIdx) const
return bRet;
}
-USHORT lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
+sal_uInt16 lcl_GetMaxValidWordTOCLevel(const SwForm &rForm)
{
// GetFormMax() returns level + 1, hence the -1
- USHORT nRet = rForm.GetFormMax()-1;
+ sal_uInt16 nRet = rForm.GetFormMax()-1;
// If the max of this type of TOC is greater than the max of a word
// possible toc, then clip to the word max
@@ -2957,9 +2957,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
}
- USHORT nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
+ sal_uInt16 nCreateOf = (eTox == TOX_CONTENT) ? nsSwTOXElement::TOX_OUTLINELEVEL : nsSwTOXElement::TOX_MARK;
- USHORT nIndexCols = 1;
+ sal_uInt16 nIndexCols = 1;
const SwTOXType* pType = rDoc.GetTOXType( eTox, 0 );
SwForm aOrigForm(eTox);
@@ -2968,7 +2968,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
switch( eTox ){
case TOX_INDEX:
{
- USHORT eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
+ sal_uInt16 eOptions = nsSwTOIOptions::TOI_SAME_ENTRY | nsSwTOIOptions::TOI_CASE_SENSITIVE;
// TOX_OUTLINELEVEL setzen wir genau dann, wenn
// die Parameter \o in 1 bis 9 liegen
@@ -2990,7 +2990,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if( sParams.Len() )
{
nIndexCols =
- static_cast<USHORT>(sParams.ToInt32());
+ static_cast<sal_uInt16>(sParams.ToInt32());
}
}
}
@@ -3005,9 +3005,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3073,8 +3073,8 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// die Parameter \o in 1 bis 9 liegen
// oder der Parameter \f existiert
// oder GARKEINE Switches Parameter angegeben sind.
- USHORT eCreateFrom = 0;
- USHORT nMaxLevel = 0;
+ sal_uInt16 eCreateFrom = 0;
+ sal_uInt16 nMaxLevel = 0;
long nRet;
_ReadFieldParams aReadParam( rStr );
while( -1 != ( nRet = aReadParam.SkipToNextToken() ))
@@ -3093,7 +3093,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'o':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( !aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
nVal = lcl_GetMaxValidWordTOCLevel(aOrigForm);
if( nMaxLevel < nVal )
@@ -3106,7 +3106,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
break;
case 'l':
{
- USHORT nVal;
+ sal_uInt16 nVal;
if( aReadParam.GetTokenSttFromTo(0, &nVal, WW8ListManager::nMaxLevel) )
{
if( nMaxLevel < nVal )
@@ -3130,9 +3130,9 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// Attention: if TOX_CONTENT brave
// GetFormMax() returns MAXLEVEL + 1 !!
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
- for(USHORT nLevel = 1;
+ for(sal_uInt16 nLevel = 1;
nLevel <= nEnd;
++nLevel)
{
@@ -3178,7 +3178,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
case 'n': // don't print page numbers
{
// read START and END param
- USHORT nStart, nEnd;
+ sal_uInt16 nStart, nEnd;
if( !aReadParam.GetTokenSttFromTo( &nStart, &nEnd,
WW8ListManager::nMaxLevel ) )
{
@@ -3190,7 +3190,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (aForm.GetFormMax() <= nEnd)
nEnd = aForm.GetFormMax()-1;
for (
- USHORT nLevel = nStart; nLevel <= nEnd;
+ sal_uInt16 nLevel = nStart; nLevel <= nEnd;
++nLevel
)
{
@@ -3243,12 +3243,12 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
if (bIsHyperlink)
{
SwForm aForm(pBase->GetTOXForm());
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
SwFormToken aLinkStart(TOKEN_LINK_START);
SwFormToken aLinkEnd(TOKEN_LINK_END);
// -> #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aForm.GetPattern(nLevel);
@@ -3273,7 +3273,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
{
//If we would be created from outlines, either explictly or by default
//then see if we need extra styles added to the outlines
- USHORT eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
+ sal_uInt16 eEffectivelyFrom = eCreateFrom ? eCreateFrom : nsSwTOXElement::TOX_OUTLINELEVEL;
if (eEffectivelyFrom & nsSwTOXElement::TOX_OUTLINELEVEL)
{
if (AddExtraOutlinesAsExtraStyles(*pBase))
@@ -3284,7 +3284,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// the entry correctly, but I currently have no clue how to obtain
// the tab stop position. It is _not_ set at the paragraph style.
SwForm* pForm = 0;
- for (USHORT nI = 0; nI < nColls; ++nI)
+ for (sal_uInt16 nI = 0; nI < nColls; ++nI)
{
const SwWW8StyInf& rSI = pCollA[nI];
if (rSI.IsOutlineNumbered())
@@ -3340,10 +3340,10 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
*/
SwForm aOldForm( pBase->GetTOXForm() );
SwForm aForm( eType );
- USHORT nEnd = aForm.GetFormMax()-1;
+ sal_uInt16 nEnd = aForm.GetFormMax()-1;
// #i21237#
- for(USHORT nLevel = 1; nLevel <= nEnd; ++nLevel)
+ for(sal_uInt16 nLevel = 1; nLevel <= nEnd; ++nLevel)
{
SwFormTokens aPattern = aOldForm.GetPattern(nLevel);
@@ -3382,7 +3382,7 @@ eF_ResT SwWW8ImplReader::Read_F_Tox( WW8FieldDesc* pF, String& rStr )
// #i21237# - propagate tab stops from paragraph styles
// used in TOX to patterns of the TOX
- pBase->AdjustTabStops(rDoc, TRUE);
+ pBase->AdjustTabStops(rDoc, sal_True);
// #i10028# - inserting a toc implicltly acts like a parabreak in word and writer
if (pPaM->GetPoint()->nContent.GetIndex())
@@ -3537,7 +3537,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
{
TOXTypes eTox = ( !bIdx ) ? TOX_CONTENT : TOX_INDEX; // Default
- USHORT nLevel = 1;
+ sal_uInt16 nLevel = 1;
xub_StrLen n;
String sFldTxt;
@@ -3573,7 +3573,7 @@ void lcl_ImportTox(SwDoc &rDoc, SwPaM &rPaM, const String &rStr, bool bIdx)
&& sParams.GetChar( 0 ) > '0'
&& sParams.GetChar( 0 ) <= '9' )
{
- nLevel = (USHORT)sParams.ToInt32();
+ nLevel = (sal_uInt16)sParams.ToInt32();
}
}
break;
@@ -3621,7 +3621,7 @@ void SwWW8ImplReader::ImportTox( int nFldId, String aStr )
lcl_ImportTox(rDoc, *pPaM, aStr, bIdx);
}
-void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
+void SwWW8ImplReader::Read_FldVanish( sal_uInt16, const sal_uInt8*, short nLen )
{
//Meaningless in a style
if (pAktColl || !pPlcxMan)
@@ -3632,7 +3632,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
// Vorsicht: Bei Feldnamen mit Umlauten geht das MEMICMP nicht!
const static sal_Char *aFldNames[] = { "\x06""INHALT", "\x02""XE", // dt.
"\x02""TC" }; // us
- const static BYTE aFldId[] = { 9, 4, 9 };
+ const static sal_uInt8 aFldId[] = { 9, 4, 9 };
if( nLen < 0 )
{
@@ -3651,7 +3651,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
WW8_CP nStartCp = pPlcxMan->Where() + pPlcxMan->GetCpOfs();
String sFieldName;
- USHORT nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
+ sal_uInt16 nFieldLen = pSBase->WW8ReadString( *pStrm, sFieldName, nStartCp,
nChunk, eStructCharSet );
nStartCp+=nFieldLen;
@@ -3697,7 +3697,7 @@ void SwWW8ImplReader::Read_FldVanish( USHORT, const BYTE*, short nLen )
for( int i = 0; i < 3; i++ )
{
const sal_Char* pName = aFldNames[i];
- USHORT nNameLen = *pName++;
+ sal_uInt16 nNameLen = *pName++;
if( sFieldName.EqualsIgnoreCaseAscii( pName, nC, nNameLen ) )
{
ImportTox( aFldId[i], sFieldName.Copy( nC + nNameLen ) );
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx
index 47d98c371a4b..484fb3020c67 100644
--- a/sw/source/filter/ww8/ww8par6.cxx
+++ b/sw/source/filter/ww8/ww8par6.cxx
@@ -122,11 +122,11 @@ using namespace nsHdFtFlags;
#define MM_200 1134 // WW-Default fuer u.Seitenrand: 2.0 cm
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty = 0, const WW8PLCFx_SEPX* pSep = 0);
-ColorData SwWW8ImplReader::GetCol(BYTE nIco)
+ColorData SwWW8ImplReader::GetCol(sal_uInt8 nIco)
{
static const ColorData eSwWW8ColA[] =
{
@@ -150,24 +150,24 @@ inline sal_uInt32 MSRoundTweak(sal_uInt32 x)
# ( ausser OLST, dass weiterhin ein normales Attribut ist )
#**************************************************************************/
-static short ReadSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static short ReadSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
short nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static USHORT ReadUSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, short nDefaultVal )
+static sal_uInt16 ReadUSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, short nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- USHORT nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt16 nVal = ( pS ) ? SVBT16ToShort( pS ) : nDefaultVal;
return nVal;
}
-static BYTE ReadBSprm( const WW8PLCFx_SEPX* pSep, USHORT nId, BYTE nDefaultVal )
+static sal_uInt8 ReadBSprm( const WW8PLCFx_SEPX* pSep, sal_uInt16 nId, sal_uInt8 nDefaultVal )
{
- const BYTE* pS = pSep->HasSprm( nId ); // sprm da ?
- BYTE nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
+ const sal_uInt8* pS = pSep->HasSprm( nId ); // sprm da ?
+ sal_uInt8 nVal = ( pS ) ? SVBT8ToByte( pS ) : nDefaultVal;
return nVal;
}
@@ -282,7 +282,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//Get the size of word's default styles font
sal_uInt32 nCharWidth=240;
- for (USHORT nI = 0; nI < pStyles->GetCount(); ++nI)
+ for (sal_uInt16 nI = 0; nI < pStyles->GetCount(); ++nI)
{
if (pCollA[nI].bValid && pCollA[nI].pFmt &&
pCollA[nI].GetWWStyleId() == 0)
@@ -296,9 +296,9 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
//dxtCharSpace
if (rSection.maSep.dxtCharSpace)
{
- UINT32 nCharSpace = rSection.maSep.dxtCharSpace;
+ sal_uInt32 nCharSpace = rSection.maSep.dxtCharSpace;
//main lives in top 20 bits, and is signed.
- INT32 nMain = (nCharSpace & 0xFFFFF000);
+ sal_Int32 nMain = (nCharSpace & 0xFFFFF000);
nMain/=0x1000;
nCharWidth += nMain*20;
@@ -317,7 +317,7 @@ void SwWW8ImplReader::SetDocumentGrid(SwFrmFmt &rFmt, const wwSection &rSection)
rFmt.SetFmtAttr(aGrid);
}
-void SwWW8ImplReader::Read_ParaBiDi(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBiDi(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_FRAMEDIR);
@@ -352,27 +352,27 @@ bool wwSectionManager::SetCols(SwFrmFmt &rFmt, const wwSection &rSection,
aCol.SetLineWidth(1);
}
- aCol.Init(nCols, writer_cast<USHORT>(nColSpace),
- writer_cast<USHORT>(nNettoWidth));
+ aCol.Init(nCols, writer_cast<sal_uInt16>(nColSpace),
+ writer_cast<sal_uInt16>(nNettoWidth));
// sprmSFEvenlySpaced
if (!rSection.maSep.fEvenlySpaced)
{
aCol._SetOrtho(false);
int nIdx = 1;
- for (USHORT i = 0; i < nCols; i++ )
+ for (sal_uInt16 i = 0; i < nCols; i++ )
{
SwColumn* pCol = aCol.GetColumns()[i];
sal_Int32 nLeft = rSection.maSep.rgdxaColumnWidthSpacing[nIdx-1]/2;
sal_Int32 nRight = rSection.maSep.rgdxaColumnWidthSpacing[nIdx+1]/2;
sal_Int32 nWishWidth = rSection.maSep.rgdxaColumnWidthSpacing[nIdx]
+ nLeft + nRight;
- pCol->SetWishWidth(writer_cast<USHORT>(nWishWidth));
- pCol->SetLeft(writer_cast<USHORT>(nLeft));
- pCol->SetRight(writer_cast<USHORT>(nRight));
+ pCol->SetWishWidth(writer_cast<sal_uInt16>(nWishWidth));
+ pCol->SetLeft(writer_cast<sal_uInt16>(nLeft));
+ pCol->SetRight(writer_cast<sal_uInt16>(nRight));
nIdx += 2;
}
- aCol.SetWishWidth(writer_cast<USHORT>(nNettoWidth));
+ aCol.SetWishWidth(writer_cast<sal_uInt16>(nNettoWidth));
}
rFmt.SetFmtAttr(aCol);
return true;
@@ -437,7 +437,7 @@ void wwSectionManager::SetPage(SwPageDesc &rInPageDesc, SwFrmFmt &rFmt,
SetCols(rFmt, rSection, rSection.GetTextAreaWidth());
}
-USHORT lcl_MakeSafeNegativeSpacing(USHORT nIn)
+sal_uInt16 lcl_MakeSafeNegativeSpacing(sal_uInt16 nIn)
{
if (nIn > SHRT_MAX)
nIn = 0;
@@ -460,11 +460,11 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (rSection.maSep.pgbOffsetFrom == 1)
{
- USHORT nDist;
+ sal_uInt16 nDist;
if (aBox.GetLeft())
{
nDist = aBox.GetDistance(BOX_LINE_LEFT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - nDist)), BOX_LINE_LEFT);
aSizeArray[WW8_LEFT] =
aSizeArray[WW8_LEFT] - nDist + aBox.GetDistance(BOX_LINE_LEFT);
}
@@ -472,7 +472,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetRight())
{
nDist = aBox.GetDistance(BOX_LINE_RIGHT);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - nDist)), BOX_LINE_RIGHT);
aSizeArray[WW8_RIGHT] =
aSizeArray[WW8_RIGHT] - nDist + aBox.GetDistance(BOX_LINE_RIGHT);
}
@@ -480,7 +480,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetTop())
{
nDist = aBox.GetDistance(BOX_LINE_TOP);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - nDist)), BOX_LINE_TOP);
aSizeArray[WW8_TOP] =
aSizeArray[WW8_TOP] - nDist + aBox.GetDistance(BOX_LINE_TOP);
}
@@ -488,7 +488,7 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
if (aBox.GetBottom())
{
nDist = aBox.GetDistance(BOX_LINE_BOTTOM);
- aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
+ aBox.SetDistance(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - nDist)), BOX_LINE_BOTTOM);
aSizeArray[WW8_BOT] =
aSizeArray[WW8_BOT] - nDist + aBox.GetDistance(BOX_LINE_BOTTOM);
}
@@ -497,20 +497,20 @@ void SwWW8ImplReader::SetPageBorder(SwFrmFmt &rFmt, const wwSection &rSection) c
}
if (aBox.GetLeft())
- aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
+ aLR.SetLeft(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetLeft() - aSizeArray[WW8_LEFT])));
if (aBox.GetRight())
- aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
+ aLR.SetRight(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aLR.GetRight() - aSizeArray[WW8_RIGHT])));
if (aBox.GetTop())
- aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
+ aUL.SetUpper(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetUpper() - aSizeArray[WW8_TOP])));
if (aBox.GetBottom())
{
//#i30088# and #i30074# - do a final sanity check on
//bottom value. Do not allow a resulting zero if bottom
//Border margin value was not originally zero.
if(aUL.GetLower() != 0)
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aUL.GetLower() - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aUL.GetLower() - aSizeArray[WW8_BOT])));
else
- aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<USHORT>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
+ aUL.SetLower(lcl_MakeSafeNegativeSpacing(static_cast<sal_uInt16>(aOriginalBottomMargin - aSizeArray[WW8_BOT])));
}
aSet.Put(aLR);
@@ -609,7 +609,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwHLo));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aHdUL.SetLower( writer_cast<USHORT>(rData.nSwHLo - cMinHdFtHeight) );
+ aHdUL.SetLower( writer_cast<sal_uInt16>(rData.nSwHLo - cMinHdFtHeight) );
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -618,7 +618,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between header and body.
const SwTwips nHdLowerSpace( Abs(rSection.maSep.dyaTop) - rData.nSwUp - rData.nSwHLo );
pHdFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwHLo + nHdLowerSpace));
- aHdUL.SetLower( static_cast< USHORT >(nHdLowerSpace) );
+ aHdUL.SetLower( static_cast< sal_uInt16 >(nHdLowerSpace) );
// <--
pHdFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -637,7 +637,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_MIN_SIZE, 0, rData.nSwFUp));
// #i19922# - minimum page header height is now 1mm
// use new constant <cMinHdFtHeight>
- aFtUL.SetUpper( writer_cast<USHORT>(rData.nSwFUp - cMinHdFtHeight) );
+ aFtUL.SetUpper( writer_cast<sal_uInt16>(rData.nSwFUp - cMinHdFtHeight) );
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, true));
}
@@ -646,7 +646,7 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
// #i48832# - set correct spacing between footer and body.
const SwTwips nFtUpperSpace( Abs(rSection.maSep.dyaBottom) - rData.nSwLo - rData.nSwFUp );
pFtFmt->SetFmtAttr(SwFmtFrmSize(ATT_FIX_SIZE, 0, rData.nSwFUp + nFtUpperSpace));
- aFtUL.SetUpper( static_cast< USHORT >(nFtUpperSpace) );
+ aFtUL.SetUpper( static_cast< sal_uInt16 >(nFtUpperSpace) );
// <--
pFtFmt->SetFmtAttr(SwHeaderAndFooterEatSpacingItem(
RES_HEADER_FOOTER_EAT_SPACING, false));
@@ -655,8 +655,8 @@ void wwSectionManager::SetPageULSpaceItems(SwFrmFmt &rFmt,
}
}
- SvxULSpaceItem aUL(writer_cast<USHORT>(rData.nSwUp),
- writer_cast<USHORT>(rData.nSwLo), RES_UL_SPACE);
+ SvxULSpaceItem aUL(writer_cast<sal_uInt16>(rData.nSwUp),
+ writer_cast<sal_uInt16>(rData.nSwLo), RES_UL_SPACE);
rFmt.SetFmtAttr(aUL);
}
@@ -738,7 +738,7 @@ void SwWW8ImplReader::HandleLineNumbering(const wwSection &rSection)
aInfo.SetRestartEachPage(rSection.maSep.lnc == 0);
- aInfo.SetPosFromLeft(writer_cast<USHORT>(rSection.maSep.dxaLnn));
+ aInfo.SetPosFromLeft(writer_cast<sal_uInt16>(rSection.maSep.dxaLnn));
//Paint only for every n line
aInfo.SetCountBy(rSection.maSep.nLnnMod);
@@ -840,12 +840,12 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aLastSection = maSegments.back();
//Here
- USHORT nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
+ sal_uInt16 nLIdx = ( ( mrReader.pWwFib->lid & 0xff ) == 0x9 ) ? 1 : 0;
//BEGIN read section values
wwSection aNewSection(*mrReader.pPaM->GetPoint());
- static const USHORT aVer2Ids0[] =
+ static const sal_uInt16 aVer2Ids0[] =
{
/*sprmSBkc*/ 117,
/*sprmSFTitlePage*/ 118,
@@ -855,7 +855,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 133
};
- static const USHORT aVer67Ids0[] =
+ static const sal_uInt16 aVer67Ids0[] =
{
/*sprmSBkc*/ 142,
/*sprmSFTitlePage*/ 143,
@@ -865,7 +865,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 158
};
- static const USHORT aVer8Ids0[] =
+ static const sal_uInt16 aVer8Ids0[] =
{
/*sprmSBkc*/ 0x3009,
/*sprmSFTitlePage*/ 0x300A,
@@ -875,7 +875,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLBetween*/ 0x3019
};
- const USHORT* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
+ const sal_uInt16* pIds = eVer <= ww::eWW2 ? aVer2Ids0 : eVer <= ww::eWW7 ? aVer67Ids0 : aVer8Ids0;
if (!maSegments.empty())
{
@@ -885,7 +885,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
// 2 New page
// 3 Even page
// 4 Odd page
- if (const BYTE* pSprmBkc = pSep->HasSprm(pIds[0]))
+ if (const sal_uInt8* pSprmBkc = pSep->HasSprm(pIds[0]))
aNewSection.maSep.bkc = *pSprmBkc;
}
@@ -925,7 +925,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
for (int i = 0; i < nCols; ++i)
{
//sprmSDxaColWidth
- const BYTE* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), BYTE( i ) );
+ const sal_uInt8* pSW = pSep->HasSprm( (eVer <= ww::eWW7 ? 136 : 0xF203), sal_uInt8( i ) );
OSL_ENSURE( pSW, "+Sprm 136 (bzw. 0xF203) (ColWidth) fehlt" );
sal_uInt16 nWidth = pSW ? SVBT16ToShort(pSW + 1) : 1440;
@@ -935,7 +935,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (i < nCols-1)
{
//sprmSDxaColSpacing
- const BYTE* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), BYTE( i ) );
+ const sal_uInt8* pSD = pSep->HasSprm( (eVer <= ww::eWW7 ? 137 : 0xF204), sal_uInt8( i ) );
OSL_ENSURE( pSD, "+Sprm 137 (bzw. 0xF204) (Colspacing) fehlt" );
if( pSD )
@@ -948,7 +948,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
}
- static const USHORT aVer2Ids1[] =
+ static const sal_uInt16 aVer2Ids1[] =
{
/*sprmSBOrientation*/ 137,
/*sprmSXaPage*/ 139,
@@ -962,7 +962,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 116
};
- static const USHORT aVer67Ids1[] =
+ static const sal_uInt16 aVer67Ids1[] =
{
/*sprmSBOrientation*/ 162,
/*sprmSXaPage*/ 164,
@@ -976,7 +976,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDmBinOther*/ 141
};
- static const USHORT aVer8Ids1[] =
+ static const sal_uInt16 aVer8Ids1[] =
{
/*sprmSBOrientation*/ 0x301d,
/*sprmSXaPage*/ 0xB01F,
@@ -1002,8 +1002,8 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.yaPage = ReadUSprm(pSep, pIds[2], lLetterHeight);
// 3. LR-Raender
- static const USHORT nLef[] = { MM_250, 1800 };
- static const USHORT nRig[] = { MM_250, 1800 };
+ static const sal_uInt16 nLef[] = { MM_250, 1800 };
+ static const sal_uInt16 nRig[] = { MM_250, 1800 };
aNewSection.maSep.dxaLeft = ReadUSprm( pSep, pIds[3], nLef[nLIdx]);
aNewSection.maSep.dxaRight = ReadUSprm( pSep, pIds[4], nRig[nLIdx]);
@@ -1027,23 +1027,23 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
if (eVer >= ww::eWW6)
{
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 132 : 0x3001) ))
aNewSection.maSep.iHeadingPgn = *p;
- if (const BYTE* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
+ if (const sal_uInt8* p = pSep->HasSprm( (eVer <= ww::eWW7 ? 131 : 0x3000) ))
aNewSection.maSep.cnsPgn = *p;
}
- if(const BYTE* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
+ if(const sal_uInt8* pSprmSDmBinFirst = pSep->HasSprm( pIds[8] ))
aNewSection.maSep.dmBinFirst = *pSprmSDmBinFirst;
- if (const BYTE* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
+ if (const sal_uInt8* pSprmSDmBinOther = pSep->HasSprm( pIds[9] ))
aNewSection.maSep.dmBinOther = *pSprmSDmBinOther;
- static const USHORT nTop[] = { MM_250, 1440 };
- static const USHORT nBot[] = { MM_200, 1440 };
+ static const sal_uInt16 nTop[] = { MM_250, 1440 };
+ static const sal_uInt16 nBot[] = { MM_200, 1440 };
- static const USHORT aVer2Ids2[] =
+ static const sal_uInt16 aVer2Ids2[] =
{
/*sprmSDyaTop*/ 143,
/*sprmSDyaBottom*/ 144,
@@ -1055,7 +1055,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSLnnMin*/ 135
};
- static const USHORT aVer67Ids2[] =
+ static const sal_uInt16 aVer67Ids2[] =
{
/*sprmSDyaTop*/ 168,
/*sprmSDyaBottom*/ 169,
@@ -1066,7 +1066,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
/*sprmSDxaLnn*/ 155,
/*sprmSLnnMin*/ 160
};
- static const USHORT aVer8Ids2[] =
+ static const sal_uInt16 aVer8Ids2[] =
{
/*sprmSDyaTop*/ 0x9023,
/*sprmSDyaBottom*/ 0x9024,
@@ -1090,7 +1090,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
aNewSection.maSep.wTextFlow = ReadUSprm(pSep, 0x5033, 0);
aNewSection.maSep.clm = ReadUSprm( pSep, 0x5032, 0 );
aNewSection.maSep.dyaLinePitch = ReadUSprm(pSep, 0x9031, 360);
- if (const BYTE* pS = pSep->HasSprm(0x7030))
+ if (const sal_uInt8* pS = pSep->HasSprm(0x7030))
aNewSection.maSep.dxtCharSpace = SVBT32ToUInt32(pS);
//sprmSPgbProp
@@ -1104,16 +1104,16 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
// check if Line Numbering must be activated or resetted
- if (const BYTE* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
+ if (const sal_uInt8* pSprmSNLnnMod = pSep->HasSprm( pIds[4] ))
aNewSection.maSep.nLnnMod = *pSprmSNLnnMod;
- if (const BYTE* pSprmSLnc = pSep->HasSprm( pIds[5] ))
+ if (const sal_uInt8* pSprmSLnc = pSep->HasSprm( pIds[5] ))
aNewSection.maSep.lnc = *pSprmSLnc;
- if (const BYTE* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
+ if (const sal_uInt8* pSprmSDxaLnn = pSep->HasSprm( pIds[6] ))
aNewSection.maSep.dxaLnn = SVBT16ToShort( pSprmSDxaLnn );
- if (const BYTE* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
+ if (const sal_uInt8* pSprmSLnnMin = pSep->HasSprm( pIds[7] ))
aNewSection.maSep.lnnMin = *pSprmSLnnMin;
if (eVer <= ww::eWW7)
@@ -1164,7 +1164,7 @@ void wwSectionManager::CreateSep(const long nTxtPos, bool /*bMustHaveBreak*/)
}
void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
- SwPageDesc* pNewPageDesc, BYTE nCode )
+ SwPageDesc* pNewPageDesc, sal_uInt8 nCode )
{
// copy first header content section
if (nCode & WW8_HEADER_FIRST)
@@ -1208,7 +1208,7 @@ void SwWW8ImplReader::CopyPageDescHdFt(const SwPageDesc* pOrgPageDesc,
// Hilfsroutinen fuer Grafiken und Apos und Tabellen
//------------------------------------------------------
-static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
+static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const sal_uInt8* pS)
{
if( pS )
{
@@ -1221,19 +1221,19 @@ static bool _SetWW8_BRC(bool bVer67, WW8_BRC& rVar, const BYTE* pS)
return 0 != pS;
}
-BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
+sal_uInt8 lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
const WW8RStyle* pSty, const WW8PLCFx_SEPX* pSep)
{
-//returns a BYTE filled with a bit for each position that had a sprm
+//returns a sal_uInt8 filled with a bit for each position that had a sprm
//setting that border
- BYTE nBorder = false;
+ sal_uInt8 nBorder = false;
if( pSep )
{
if( !bVer67 )
{
- BYTE* pSprm[4];
+ sal_uInt8* pSprm[4];
// sprmSBrcTop, sprmSBrcLeft, sprmSBrcBottom, sprmSBrcRight
if( pSep->Find4Sprms( 0x702B, 0x702C, 0x702D, 0x702E,
@@ -1247,12 +1247,12 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
else
{
- static const USHORT aVer67Ids[5] = { 38, 39, 40, 41, 42 };
+ static const sal_uInt16 aVer67Ids[5] = { 38, 39, 40, 41, 42 };
- static const USHORT aVer8Ids[5] =
+ static const sal_uInt16 aVer8Ids[5] =
{ 0x6424, 0x6425, 0x6426, 0x6427, 0x6428 };
- const USHORT* pIds = bVer67 ? aVer67Ids : aVer8Ids;
+ const sal_uInt16* pIds = bVer67 ? aVer67Ids : aVer8Ids;
if( pPap )
{
@@ -1273,8 +1273,8 @@ BYTE lcl_ReadBorders(bool bVer67, WW8_BRC* brc, WW8PLCFx_Cp_FKP* pPap,
return nBorder;
}
-void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCol, short nIdx,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, sal_uInt8 nCol, short nIdx,
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
WW8_BordersSO::eBorderCode eCodeIdx;
@@ -1461,9 +1461,9 @@ void GetLineIndex(SvxBoxItem &rBox, short nLineThickness, short nSpace, BYTE nCo
}
void Set1Border(bool bVer67, SvxBoxItem &rBox, const WW8_BRC& rBor,
- USHORT nOOIndex, USHORT nWWIndex, short *pSize=0)
+ sal_uInt16 nOOIndex, sal_uInt16 nWWIndex, short *pSize=0)
{
- BYTE nCol;
+ sal_uInt8 nCol;
short nSpace, nIdx;
short nLineThickness = rBor.DetermineBorderProperties(bVer67,&nSpace,&nCol,
&nIdx);
@@ -1518,10 +1518,10 @@ bool WW8_BRC::IsZeroed(bool bVer67) const
}
bool SwWW8ImplReader::SetBorder(SvxBoxItem& rBox, const WW8_BRC* pbrc,
- short *pSizeArray, BYTE nSetBorders) const
+ short *pSizeArray, sal_uInt8 nSetBorders) const
{
bool bChange = false;
- static const USHORT aIdArr[ 10 ] =
+ static const sal_uInt16 aIdArr[ 10 ] =
{
WW8_TOP, BOX_LINE_TOP,
WW8_LEFT, BOX_LINE_LEFT,
@@ -1639,19 +1639,19 @@ static void FlySecur1(short& rSize, const bool bBorder)
rSize = nMin;
}
-inline bool SetValSprm( INT16* pVar, WW8PLCFx_Cp_FKP* pPap, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, WW8PLCFx_Cp_FKP* pPap, sal_uInt16 nId )
{
- const BYTE* pS = pPap->HasSprm( nId );
+ const sal_uInt8* pS = pPap->HasSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
-inline bool SetValSprm( INT16* pVar, const WW8RStyle* pStyle, USHORT nId )
+inline bool SetValSprm( sal_Int16* pVar, const WW8RStyle* pStyle, sal_uInt16 nId )
{
- const BYTE* pS = pStyle->HasParaSprm( nId );
+ const sal_uInt8* pS = pStyle->HasParaSprm( nId );
if( pS )
- *pVar = (INT16)SVBT16ToShort( pS );
+ *pVar = (sal_Int16)SVBT16ToShort( pS );
return ( pS != 0 );
}
@@ -1709,12 +1709,12 @@ bool WW8FlyPara::operator==(const WW8FlyPara& rSrc) const
}
// Read fuer normalen Text
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8PLCFx_Cp_FKP* pPap)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if( bVer67 )
{
SetValSprm( &nSp26, pPap, 26 ); // X-Position //sprmPDxaAbs
@@ -1764,7 +1764,7 @@ void WW8FlyPara::Read(const BYTE* pSprm29, WW8PLCFx_Cp_FKP* pPap)
nSp29 = nOrigSp29;
}
-void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
+void WW8FlyPara::ReadFull(const sal_uInt8* pSprm29, SwWW8ImplReader* pIo)
{
WW8PLCFMan* pPlcxMan = pIo->pPlcxMan;
WW8PLCFx_Cp_FKP* pPap = pPlcxMan->GetPapPLCF();
@@ -1778,14 +1778,14 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
break; // (*pPap)++ geht bei FastSave schief
// -> bei FastSave kein Test auf Grafik-APO
SvStream* pIoStrm = pIo->pStrm;
- ULONG nPos = pIoStrm->Tell();
+ sal_uLong nPos = pIoStrm->Tell();
WW8PLCFxSave1 aSave;
pPlcxMan->GetPap()->Save( aSave );
bGrafApo = false;
do{ // Block zum rausspringen
- BYTE nTxt[2];
+ sal_uInt8 nTxt[2];
pIoStrm->Read( nTxt, 2 ); // lies Text
if( nTxt[0] != 0x01 || nTxt[1] != 0x0d )// nur Grafik + CR ?
@@ -1795,7 +1795,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// In APO ?
//sprmPPc
- const BYTE* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
+ const sal_uInt8* pS = pPap->HasSprm( bVer67 ? 29 : 0x261B );
// Nein -> Grafik-Apo
if( !pS ){
@@ -1805,7 +1805,7 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
ww::WordVersion eVer = pIo->GetFib().GetFIBVersion();
WW8FlyPara *pNowStyleApo=0;
- USHORT nColl = pPap->GetIstd();
+ sal_uInt16 nColl = pPap->GetIstd();
ww::sti eSti = eVer < ww::eWW6 ? ww::GetCanonicalStiFromStc( static_cast< sal_uInt8 >(nColl) ) : static_cast<ww::sti>(nColl);
while (eSti != ww::stiNil && 0 == (pNowStyleApo = pIo->pCollA[nColl].pWWFly))
{
@@ -1829,12 +1829,12 @@ void WW8FlyPara::ReadFull(const BYTE* pSprm29, SwWW8ImplReader* pIo)
// Read fuer Apo-Defs in Styledefs
-void WW8FlyPara::Read(const BYTE* pSprm29, WW8RStyle* pStyle)
+void WW8FlyPara::Read(const sal_uInt8* pSprm29, WW8RStyle* pStyle)
{
if (pSprm29)
nOrigSp29 = *pSprm29; // PPC ( Bindung )
- const BYTE* pS = 0;
+ const sal_uInt8* pS = 0;
if (bVer67)
{
SetValSprm( &nSp26, pStyle, 26 ); // X-Position
@@ -1907,8 +1907,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
const sal_uInt32 nWWPgTop,
const sal_uInt32 nPgLeft,
const sal_uInt32 nPgWidth,
- const INT32 nIniFlyDx,
- const INT32 nIniFlyDy )
+ const sal_Int32 nIniFlyDx,
+ const sal_Int32 nIniFlyDy )
{
(void) rPaM;
(void) nPgLeft;
@@ -2060,18 +2060,18 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// the left and right border distances are different.
// no adjustments possible, if frame has automatic width.
// determine left border distance
- INT16 nLeBorderMgn( 0L );
+ sal_Int16 nLeBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeBorderMgn);
nLeBorderMgn = nLeBorderMgn + nTemp;
}
// determine right border distance
- INT16 nRiBorderMgn( 0L );
+ sal_Int16 nRiBorderMgn( 0L );
if ( !bAutoWidth )
{
- INT16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nTemp = rWW.brc[WW8_RIGHT].DetermineBorderProperties(rWW.bVer67,
&nRiBorderMgn);
nRiBorderMgn = nRiBorderMgn + nTemp;
}
@@ -2125,8 +2125,8 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
Word has a curious bug where the offset stored do not take into
account the internal distance from the corner both
*/
- INT16 nLeLMgn = 0;
- INT16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
+ sal_Int16 nLeLMgn = 0;
+ sal_Int16 nTemp = rWW.brc[WW8_LEFT].DetermineBorderProperties(rWW.bVer67,
&nLeLMgn);
nLeLMgn = nLeLMgn + nTemp;
@@ -2144,7 +2144,7 @@ WW8SwFlyPara::WW8SwFlyPara( SwPaM& rPaM,
// convert "<X> from top page text area" to
// "<X + page top margin> from page"
eVRel = text::RelOrientation::PAGE_FRAME;
- nYPos = static_cast< INT16 >( nYPos + nWWPgTop );
+ nYPos = static_cast< sal_Int16 >( nYPos + nWWPgTop );
}
FlySecur1( nWidth, rWW.bBorderLines ); // passen Raender ?
@@ -2192,7 +2192,7 @@ WW8FlySet::WW8FlySet(SwWW8ImplReader& rReader, const WW8FlyPara* pFW,
//we no longer need to hack around the header/footer problems
SwFmtSurround aSurround(pFS->eSurround);
if ( pFS->eSurround == SURROUND_IDEAL )
- aSurround.SetAnchorOnly( TRUE );
+ aSurround.SetAnchorOnly( sal_True );
Put( aSurround );
short aSizeArray[5]={0};
@@ -2279,8 +2279,8 @@ WW8DupProperties::WW8DupProperties(SwDoc &rDoc, SwWW8FltControlStack *pStk)
{
//Close any open character properties and duplicate them inside the
//first table cell
- USHORT nCnt = static_cast< USHORT >(pCtrlStck->Count());
- for (USHORT i=0; i < nCnt; i++)
+ sal_uInt16 nCnt = static_cast< sal_uInt16 >(pCtrlStck->Count());
+ for (sal_uInt16 i=0; i < nCnt; i++)
{
const SwFltStackEntry* pEntry = (*pCtrlStck)[ i ];
if(pEntry->bLocked)
@@ -2425,7 +2425,7 @@ bool SwWW8ImplReader::IsDropCap()
WW8PLCFx_Cp_FKP *pPap = pPlcxMan ? pPlcxMan->GetPapPLCF() : 0;
if (pPap)
{
- const BYTE *pDCS;
+ const sal_uInt8 *pDCS;
if (bVer67)
pDCS = pPap->HasSprm(46);
else
@@ -2739,7 +2739,7 @@ void SwWW8ImplReader::NewAttr( const SfxPoolItem& rAttr,
}
// holt Attribut aus der FmtColl / Stack / Doc
-const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
+const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( sal_uInt16 nWhich )
{
const SfxPoolItem* pRet = 0;
if (pAktColl)
@@ -2784,7 +2784,7 @@ const SfxPoolItem* SwWW8ImplReader::GetFmtAttr( USHORT nWhich )
# Spezial WW - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Special(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{
@@ -2795,7 +2795,7 @@ void SwWW8ImplReader::Read_Special(USHORT, const BYTE* pData, short nLen)
}
// Read_Obj wird fuer fObj und fuer fOle2 benutzt !
-void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_Obj(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
bObj = false;
@@ -2815,7 +2815,7 @@ void SwWW8ImplReader::Read_Obj(USHORT , const BYTE* pData, short nLen)
}
}
-void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_PicLoc(sal_uInt16 , const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -2832,13 +2832,13 @@ void SwWW8ImplReader::Read_PicLoc(USHORT , const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_POutLvl(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (pAktColl && (0 < nLen))
{
if (SwWW8StyInf* pSI = GetStyle(nAktColl))
{
- pSI->nOutlineLevel = static_cast< BYTE >(
+ pSI->nOutlineLevel = static_cast< sal_uInt8 >(
( (1 <= pSI->GetWWStyleId()) && (9 >= pSI->GetWWStyleId()) )
? pSI->GetWWStyleId()-1
: (pData ? *pData : 0) );
@@ -2846,7 +2846,7 @@ void SwWW8ImplReader::Read_POutLvl(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Symbol(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( !bIgnoreText )
{
@@ -2881,7 +2881,7 @@ void SwWW8ImplReader::Read_Symbol(USHORT, const BYTE* pData, short nLen )
}
}
-SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
+SwWW8StyInf *SwWW8ImplReader::GetStyle(sal_uInt16 nColl) const
{
return nColl < nColls ? &pCollA[nColl] : 0;
}
@@ -2892,14 +2892,14 @@ SwWW8StyInf *SwWW8ImplReader::GetStyle(USHORT nColl) const
// Read_BoldUsw fuer Italic, Bold, Kapitaelchen, Versalien, durchgestrichen,
// Contour und Shadow
-void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoldUsw( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
const int nContigiousWestern = 8;
const int nWestern = nContigiousWestern + 1;
const int nEastern = 2;
const int nCTL = 2;
const int nIds = nWestern + nEastern + nCTL;
- static const USHORT nEndIds[ nIds ] =
+ static const sal_uInt16 nEndIds[ nIds ] =
{
RES_CHRATR_WEIGHT, RES_CHRATR_POSTURE,
RES_CHRATR_CROSSEDOUT, RES_CHRATR_CONTOUR,
@@ -2915,7 +2915,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
- BYTE nI;
+ sal_uInt8 nI;
// die Attribut-Nr fuer "doppelt durchgestrichen" tanzt aus der Reihe
if (0x2A53 == nId)
nI = nContigiousWestern; // The out of sequence western id
@@ -2923,11 +2923,11 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
{
// The contigious western ids
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 60);
+ nI = static_cast< sal_uInt8 >(nId - 60);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 85);
+ nI = static_cast< sal_uInt8 >(nId - 85);
else
- nI = static_cast< BYTE >(nId - 0x0835);
+ nI = static_cast< sal_uInt8 >(nId - 0x0835);
}
sal_uInt16 nMask = 1 << nI;
@@ -2955,7 +2955,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan && eVersion > ww::eWW2)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -2996,7 +2996,7 @@ void SwWW8ImplReader::Read_BoldUsw( USHORT nId, const BYTE* pData, short nLen )
SetToggleAttr( nI, bOn );
}
-void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
+void SwWW8ImplReader::Read_Bidi(sal_uInt16, const sal_uInt8*, short nLen)
{
if (nLen > 0)
bBidi = true;
@@ -3005,22 +3005,22 @@ void SwWW8ImplReader::Read_Bidi(USHORT, const BYTE*, short nLen)
}
// Read_BoldUsw for BiDi Italic, Bold
-void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
+void SwWW8ImplReader::Read_BoldBiDiUsw(sal_uInt16 nId, const sal_uInt8* pData,
short nLen)
{
- static const USHORT nEndIds[2] =
+ static const sal_uInt16 nEndIds[2] =
{
RES_CHRATR_CTL_WEIGHT, RES_CHRATR_CTL_POSTURE,
};
- BYTE nI;
+ sal_uInt8 nI;
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
if (eVersion <= ww::eWW2)
- nI = static_cast< BYTE >(nId - 80);
+ nI = static_cast< sal_uInt8 >(nId - 80);
else if (eVersion < ww::eWW8)
- nI = static_cast< BYTE >(nId - 111);
+ nI = static_cast< sal_uInt8 >(nId - 111);
else
- nI = static_cast< BYTE >(nId - 0x085C);
+ nI = static_cast< sal_uInt8 >(nId - 0x085C);
OSL_ENSURE(nI <= 1, "not happening");
if (nI > 1)
@@ -3038,7 +3038,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SwWW8StyInf* pSI = GetStyle(nAktColl);
if (pPlcxMan)
{
- const BYTE *pCharIstd =
+ const sal_uInt8 *pCharIstd =
pPlcxMan->GetChpPLCF()->HasSprm(bVer67 ? 80 : 0x4A30);
if (pCharIstd)
pSI = GetStyle(SVBT16ToShort(pCharIstd));
@@ -3075,7 +3075,7 @@ void SwWW8ImplReader::Read_BoldBiDiUsw(USHORT nId, const BYTE* pData,
SetToggleBiDiAttr(nI, bOn);
}
-void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleBiDiAttr(sal_uInt8 nAttrId, bool bOn)
{
switch (nAttrId)
{
@@ -3100,7 +3100,7 @@ void SwWW8ImplReader::SetToggleBiDiAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
+void SwWW8ImplReader::SetToggleAttr(sal_uInt8 nAttrId, bool bOn)
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
@@ -3162,11 +3162,11 @@ void SwWW8ImplReader::SetToggleAttr(BYTE nAttrId, bool bOn)
}
}
-void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3178,11 +3178,11 @@ void SwWW8ImplReader::_ChkToggleAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
- USHORT nNewStyle81Mask )
+void SwWW8ImplReader::_ChkToggleBiDiAttr( sal_uInt16 nOldStyle81Mask,
+ sal_uInt16 nNewStyle81Mask )
{
- USHORT i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
- for (BYTE n = 0; n < 7; ++n, i <<= 1)
+ sal_uInt16 i = 1, nToggleAttrFlags = pCtrlStck->GetToggleBiDiAttrFlags();
+ for (sal_uInt8 n = 0; n < 7; ++n, i <<= 1)
{
if (
(i & nToggleAttrFlags) &&
@@ -3194,7 +3194,7 @@ void SwWW8ImplReader::_ChkToggleBiDiAttr( USHORT nOldStyle81Mask,
}
}
-void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuper( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_ESCAPEMENT );
@@ -3202,7 +3202,7 @@ void SwWW8ImplReader::Read_SubSuper( USHORT, const BYTE* pData, short nLen )
}
short nEs;
- BYTE nProp;
+ sal_uInt8 nProp;
switch( *pData )
{
case 1:
@@ -3264,7 +3264,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
FLY_AS_CHAR and then we can change its anchoring to centered in the line.
*/
bool bIsGraphicPlacementHack = false;
- USHORT nPos;
+ sal_uInt16 nPos;
if (pCtrlStck->GetFmtStackAttr(RES_CHRATR_ESCAPEMENT, &nPos))
{
SwPaM aRegion(*pPaM->GetPoint());
@@ -3286,7 +3286,7 @@ bool SwWW8ImplReader::ConvertSubToGraphicPlacement()
return bIsGraphicPlacementHack;
}
-void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_SubSuperProp( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -3299,13 +3299,13 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
// Font-Position in HalfPoints
short nPos = eVersion <= ww::eWW2 ? static_cast< sal_Int8 >( *pData ) : SVBT16ToShort( pData );
- INT32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
+ sal_Int32 nPos2 = nPos * ( 10 * 100 ); // HalfPoints in 100 * tw
const SvxFontHeightItem* pF
= (const SvxFontHeightItem*)GetFmtAttr(RES_CHRATR_FONTSIZE);
OSL_ENSURE(pF, "Expected to have the fontheight available here");
// #i59022: Check ensure nHeight != 0. Div by zero otherwise.
- INT32 nHeight = 240;
+ sal_Int32 nHeight = 240;
if (pF != NULL && pF->GetHeight() != 0)
nHeight = pF->GetHeight();
nPos2 /= nHeight; // ... nun in % ( gerundet )
@@ -3317,7 +3317,7 @@ void SwWW8ImplReader::Read_SubSuperProp( USHORT, const BYTE* pData, short nLen )
NewAttr( aEs );
}
-void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Underline( sal_uInt16, const sal_uInt8* pData, short nLen )
{
FontUnderline eUnderline = UNDERLINE_NONE;
bool bWordLine = false;
@@ -3334,7 +3334,7 @@ void SwWW8ImplReader::Read_Underline( USHORT, const BYTE* pData, short nLen )
// erst mal ggfs. *bold* einschalten!
if( bAlsoBold )
{
- BYTE nOn = 1;
+ sal_uInt8 nOn = 1;
Read_BoldUsw( 0x0835, &nOn, nLen );
eUnderline = UNDERLINE_SINGLE;
}
@@ -3385,7 +3385,7 @@ NoBracket 78 CA 06 - 02 00 00 02 34 52
<> 78 CA 06 - 02 03 00 02 34 52
{} 78 CA 06 - 02 04 00 02 34 52
*/
-void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
+void SwWW8ImplReader::Read_DoubleLine_Rotate( sal_uInt16, const sal_uInt8* pData,
short nLen )
{
if( nLen < 0 ) // close the tag
@@ -3421,7 +3421,7 @@ void SwWW8ImplReader::Read_DoubleLine_Rotate( USHORT, const BYTE* pData,
}
}
-void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtColor( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0x6870))
@@ -3431,7 +3431,7 @@ void SwWW8ImplReader::Read_TxtColor( USHORT, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0;
@@ -3453,7 +3453,7 @@ sal_uInt32 wwUtility::BGRToRGB(sal_uInt32 nColor)
return nColor;
}
-void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtForeColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_COLOR );
@@ -3466,7 +3466,7 @@ void SwWW8ImplReader::Read_TxtForeColor(USHORT, const BYTE* pData, short nLen)
}
}
-bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
+bool SwWW8ImplReader::GetFontParams( sal_uInt16 nFCode, FontFamily& reFamily,
String& rName, FontPitch& rePitch, CharSet& reCharSet )
{
// Die Defines, aus denen diese Tabellen erzeugt werden, stehen in windows.h
@@ -3505,7 +3505,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
}
// pF->ff : Family
- BYTE b = pF->ff;
+ sal_uInt8 b = pF->ff;
// make sure Font Family Code is set correctly
// at least for the most important fonts
@@ -3546,7 +3546,7 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
sFontName12, sFontName13
};
- for( USHORT n = 0; n < FONTNAMETAB_SZ; n++ )
+ for( sal_uInt16 n = 0; n < FONTNAMETAB_SZ; n++ )
{
const sal_Char* pCmp = aFontNameTab[ n ];
xub_StrLen nLen = *pCmp++;
@@ -3564,8 +3564,8 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true;
}
-bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
- USHORT nWhich)
+bool SwWW8ImplReader::SetNewFontAttr(sal_uInt16 nFCode, bool bSetEnums,
+ sal_uInt16 nWhich)
{
FontFamily eFamily;
String aName;
@@ -3660,7 +3660,7 @@ void SwWW8ImplReader::ResetCJKCharSetVars()
maFontSrcCJKCharSets.pop();
}
-void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
+void SwWW8ImplReader::openFont(sal_uInt16 nFCode, sal_uInt16 nId)
{
if (SetNewFontAttr(nFCode, true, nId) && pAktColl && pStyles)
{
@@ -3674,7 +3674,7 @@ void SwWW8ImplReader::openFont(USHORT nFCode, USHORT nId)
}
}
-void SwWW8ImplReader::closeFont(USHORT nId)
+void SwWW8ImplReader::closeFont(sal_uInt16 nId)
{
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
if (nId == RES_CHRATR_CJK_FONT)
@@ -3686,7 +3686,7 @@ void SwWW8ImplReader::closeFont(USHORT nId)
/*
Font ein oder ausschalten:
*/
-void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontCode( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (!bSymbol) // falls bSymbol, gilt der am Symbol
{ // (siehe sprmCSymbol) gesetzte Font !
@@ -3723,7 +3723,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
else
{
- USHORT nFCode = SVBT16ToShort( pData ); // Font-Nummer
+ sal_uInt16 nFCode = SVBT16ToShort( pData ); // Font-Nummer
openFont(nFCode, nId);
if (eVersion <= ww::eWW6)
{
@@ -3734,7 +3734,7 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_FontSize( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3765,7 +3765,7 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
else
{
// Font-Size in half points e.g. 10 = 1440 / ( 72 * 2 )
- USHORT nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
+ sal_uInt16 nFSize = eVersion <= ww::eWW2 ? *pData : SVBT16ToShort(pData);
nFSize*= 10;
SvxFontHeightItem aSz( nFSize, 100, nId );
@@ -3797,14 +3797,14 @@ void SwWW8ImplReader::Read_FontSize( USHORT nId, const BYTE* pData, short nLen )
-void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharSet(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 )
{ // Ende des Attributes
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
return;
}
- BYTE nfChsDiff = SVBT8ToByte( pData );
+ sal_uInt8 nfChsDiff = SVBT8ToByte( pData );
if( nfChsDiff )
eHardCharSet = rtl_getTextEncodingFromWindowsCharset( *(pData + 1) );
@@ -3812,7 +3812,7 @@ void SwWW8ImplReader::Read_CharSet(USHORT , const BYTE* pData, short nLen)
eHardCharSet = RTL_TEXTENCODING_DONTKNOW;
}
-void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Language( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -3838,7 +3838,7 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
pCtrlStck->SetAttr( *pPaM->GetPoint(), nId );
else
{
- USHORT nLang = SVBT16ToShort( pData ); // Language-Id
+ sal_uInt16 nLang = SVBT16ToShort( pData ); // Language-Id
NewAttr(SvxLanguageItem((const LanguageType)nLang, nId));
}
}
@@ -3846,14 +3846,14 @@ void SwWW8ImplReader::Read_Language( USHORT nId, const BYTE* pData, short nLen )
/*
Einschalten des Zeichen-Styles:
*/
-void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CColl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_TXTATR_CHARFMT );
nCharFmt = -1;
return;
}
- USHORT nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
+ sal_uInt16 nId = SVBT16ToShort( pData ); // Style-Id (NICHT Sprm-Id!)
if( nId >= nColls || !pCollA[nId].pFmt // ungueltige Id ?
|| pCollA[nId].bColl ) // oder Para-Style ?
@@ -3867,17 +3867,17 @@ void SwWW8ImplReader::Read_CColl( USHORT, const BYTE* pData, short nLen )
/*
enger oder weiter als normal:
*/
-void SwWW8ImplReader::Read_Kern( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Kern( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 ){ // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_KERNING );
return;
}
- INT16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
+ sal_Int16 nKern = SVBT16ToShort( pData ); // Kerning in Twips
NewAttr( SvxKerningItem( nKern, RES_CHRATR_KERNING ) );
}
-void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
+void SwWW8ImplReader::Read_FontKern( sal_uInt16, const sal_uInt8* , short nLen )
{
if( nLen < 0 ) // Ende des Attributes
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_AUTOKERN );
@@ -3885,7 +3885,7 @@ void SwWW8ImplReader::Read_FontKern( USHORT, const BYTE* , short nLen )
NewAttr(SvxAutoKernItem(true, RES_CHRATR_AUTOKERN));
}
-void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_CharShadow( sal_uInt16, const sal_uInt8* pData, short nLen )
{
//Has newer colour varient, ignore this old varient
if (!bVer67 && pPlcxMan && pPlcxMan->GetChpPLCF()->HasSprm(0xCA71))
@@ -3911,7 +3911,7 @@ void SwWW8ImplReader::Read_CharShadow( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_TxtBackColor(sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -3933,7 +3933,7 @@ void SwWW8ImplReader::Read_TxtBackColor(USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_CharHighlight(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if( nLen <= 0 )
{
@@ -3946,7 +3946,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
}
else
{
- BYTE b = *pData; // Parameter: 0 = Auto, 1..16 Farben
+ sal_uInt8 b = *pData; // Parameter: 0 = Auto, 1..16 Farben
if( b > 16 ) // unbekannt -> Black
b = 0; // Auto -> Black
@@ -3961,7 +3961,7 @@ void SwWW8ImplReader::Read_CharHighlight(USHORT, const BYTE* pData, short nLen)
# Absatz - Attribute
#**************************************************************************/
-void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_NoLineNumb(sal_uInt16 , const sal_uInt8* pData, short nLen)
{
if( nLen < 0 ) // Ende des Attributes
{
@@ -3980,7 +3980,7 @@ void SwWW8ImplReader::Read_NoLineNumb(USHORT , const BYTE* pData, short nLen)
}
// Sprm 16, 17
-void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LR( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if (nLen < 0) // End of the Attributes
{
@@ -4006,7 +4006,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
SwNumRule * pNumRule = pTxtNode->GetNumRule();
if( pNumRule )
{
- BYTE nLvl = static_cast< BYTE >(pTxtNode->GetActualListLevel());
+ sal_uInt8 nLvl = static_cast< sal_uInt8 >(pTxtNode->GetActualListLevel());
const SwNumFmt* pFmt = pNumRule->GetNumFmt( nLvl );
if ( pFmt && pFmt->GetPositionAndSpaceMode() == SvxNumberFormat::LABEL_ALIGNMENT )
{
@@ -4077,7 +4077,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
*/
if (pPlcxMan && pCollA[nAktColl].bHasBrokenWW6List)
{
- const BYTE *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
+ const sal_uInt8 *pIsZeroed = pPlcxMan->GetPapPLCF()->HasSprm(0x460B);
if (pIsZeroed && *pIsZeroed == 0)
{
const SvxLRSpaceItem &rLR =
@@ -4108,7 +4108,7 @@ void SwWW8ImplReader::Read_LR( USHORT nId, const BYTE* pData, short nLen )
}
// Sprm 20
-void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_LineSpace( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// Kommentear siehe Read_UL()
if (bStyNormal && bWWBugNormal)
@@ -4145,7 +4145,7 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// bei proportional betraegt er min( 0cm, FontSize*(nFach-1) ) sowohl "vor"
// wie auch "nach"
- USHORT nSpaceTw = 0;
+ sal_uInt16 nSpaceTw = 0;
SvxLineSpacingItem aLSpc( LINE_SPACE_DEFAULT_HEIGHT, RES_PARATR_LINESPACING );
@@ -4155,15 +4155,15 @@ void SwWW8ImplReader::Read_LineSpace( USHORT, const BYTE* pData, short nLen )
// nach Absprache mit AMA ist die Begrenzung unsinnig
if( n>200 ) n = 200; // SW_UI-Maximum
- aLSpc.SetPropLineSpace( (const BYTE)n );
+ aLSpc.SetPropLineSpace( (const sal_uInt8)n );
const SvxFontHeightItem* pH = (const SvxFontHeightItem*)
GetFmtAttr( RES_CHRATR_FONTSIZE );
- nSpaceTw = (USHORT)( n * pH->GetHeight() / 100 );
+ nSpaceTw = (sal_uInt16)( n * pH->GetHeight() / 100 );
}
else // Fixed / Minimum
{
// bei negativen Space ist der Abstand exakt, sonst minimum
- nSpaceTw = (USHORT)nSpace;
+ nSpaceTw = (sal_uInt16)nSpace;
aLSpc.SetLineHeight( nSpaceTw );
aLSpc.GetLineSpaceRule() = eLnSpc;
}
@@ -4181,7 +4181,7 @@ sal_uInt16 SwWW8ImplReader::GetParagraphAutoSpace(bool fDontUseHTMLAutoSpacing)
return 280; //Seems to be always 14points in this case
}
-void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_DontAddEqual(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
return;
@@ -4190,7 +4190,7 @@ void SwWW8ImplReader::Read_DontAddEqual(USHORT, const BYTE *pData, short nLen)
maTracer.Log(sw::log::eDontAddSpaceForEqualStyles);
}
-void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoBefore(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4217,7 +4217,7 @@ void SwWW8ImplReader::Read_ParaAutoBefore(USHORT, const BYTE *pData, short nLen)
}
}
-void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
+void SwWW8ImplReader::Read_ParaAutoAfter(sal_uInt16, const sal_uInt8 *pData, short nLen)
{
if (nLen < 0)
{
@@ -4245,7 +4245,7 @@ void SwWW8ImplReader::Read_ParaAutoAfter(USHORT, const BYTE *pData, short nLen)
}
// Sprm 21, 22
-void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_UL( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
// Nun eine Umpopelung eines WW-Fehlers: Bei nProduct == 0c03d wird
// faelschlicherweise ein DyaAfter 240 ( delta y abstand after, amn.d.?b.)
@@ -4290,7 +4290,7 @@ void SwWW8ImplReader::Read_UL( USHORT nId, const BYTE* pData, short nLen )
NewAttr( aUL );
}
-void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_IdctHint( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (nLen < 0)
nIdctHint = 0;
@@ -4298,7 +4298,7 @@ void SwWW8ImplReader::Read_IdctHint( USHORT, const BYTE* pData, short nLen )
nIdctHint = *pData;
}
-void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Justify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4337,7 +4337,7 @@ void SwWW8ImplReader::Read_Justify( USHORT, const BYTE* pData, short nLen )
bool SwWW8ImplReader::IsRightToLeft()
{
bool bRTL = false;
- const BYTE *pDir =
+ const sal_uInt8 *pDir =
pPlcxMan ? pPlcxMan->GetPapPLCF()->HasSprm(0x2441) : 0;
if (pDir)
bRTL = *pDir ? true : false;
@@ -4351,7 +4351,7 @@ bool SwWW8ImplReader::IsRightToLeft()
return bRTL;
}
-void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_RTLJustify( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
{
@@ -4394,7 +4394,7 @@ void SwWW8ImplReader::Read_RTLJustify( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BoolItem( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
switch( nId )
{
@@ -4423,7 +4423,7 @@ void SwWW8ImplReader::Read_BoolItem( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Emphasis( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_EMPHASIS_MARK );
@@ -4434,7 +4434,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
//there is use it, if there is not fall back to the currently set one.
//Only the cjk language setting seems to matter to word, the western
//one is ignored
- const BYTE *pLang =
+ const sal_uInt8 *pLang =
pPlcxMan ? pPlcxMan->GetChpPLCF()->HasSprm(0x486E) : 0;
if (pLang)
@@ -4484,7 +4484,7 @@ void SwWW8ImplReader::Read_Emphasis( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_ScaleWidth( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_SCALEW );
@@ -4498,7 +4498,7 @@ void SwWW8ImplReader::Read_ScaleWidth( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Relief( sal_uInt16 nId, const sal_uInt8* pData, short nLen )
{
if( nLen < 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_CHRATR_RELIEF );
@@ -4525,7 +4525,7 @@ void SwWW8ImplReader::Read_Relief( USHORT nId, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_TxtAnim(sal_uInt16 /*nId*/, const sal_uInt8* pData, short nLen)
{
if (nLen < 0)
pCtrlStck->SetAttr(*pPaM->GetPoint(), RES_CHRATR_BLINK);
@@ -4553,7 +4553,7 @@ void SwWW8ImplReader::Read_TxtAnim(USHORT /*nId*/, const BYTE* pData, short nLen
SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
{
- BYTE b = rSHD.GetFore();
+ sal_uInt8 b = rSHD.GetFore();
OSL_ENSURE(b < 17, "ww8: colour out of range");
if (b >= 17)
b = 0;
@@ -4574,7 +4574,7 @@ SwWW8Shade::SwWW8Shade(bool bVer67, const WW8_SHD& rSHD)
void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
{
- static const ULONG eMSGrayScale[] =
+ static const sal_uLong eMSGrayScale[] =
{
// Nul-Brush
0, // 0
@@ -4661,7 +4661,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
if( nIndex >= SAL_N_ELEMENTS(eMSGrayScale))
nIndex = 0;
- ULONG nWW8BrushStyle = eMSGrayScale[nIndex];
+ sal_uLong nWW8BrushStyle = eMSGrayScale[nIndex];
switch (nWW8BrushStyle)
{
@@ -4687,7 +4687,7 @@ void SwWW8Shade::SetShade(ColorData nFore, ColorData nBack, sal_uInt16 nIndex)
}
}
-void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Shade( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if (!bVer67 && pPlcxMan && pPlcxMan->GetPapPLCF()->HasSprm(0xC64D))
return;
@@ -4713,7 +4713,7 @@ void SwWW8ImplReader::Read_Shade( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
+void SwWW8ImplReader::Read_ParaBackColor(sal_uInt16, const sal_uInt8* pData, short nLen)
{
if (nLen <= 0)
{
@@ -4735,7 +4735,7 @@ void SwWW8ImplReader::Read_ParaBackColor(USHORT, const BYTE* pData, short nLen)
}
}
-sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
+sal_uInt32 SwWW8ImplReader::ExtractColour(const sal_uInt8* &rpData,
bool
#if OSL_DEBUG_LEVEL > 1
bVer67
@@ -4761,7 +4761,7 @@ sal_uInt32 SwWW8ImplReader::ExtractColour(const BYTE* &rpData,
return aShade.aColor.GetColor();
}
-void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
+void SwWW8ImplReader::Read_Border(sal_uInt16 , const sal_uInt8* , short nLen)
{
if( nLen < 0 )
{
@@ -4780,7 +4780,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
bHasBorder = true;
WW8_BRC5 aBrcs; // Top, Left, Bottom, Right, Between
- BYTE nBorder;
+ sal_uInt8 nBorder;
if( pAktColl )
nBorder = ::lcl_ReadBorders(bVer67, aBrcs, 0, pStyles);
@@ -4816,17 +4816,17 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
maTracer.Log(sw::log::eBorderDistOutside);
if ((nBorder & WW8_LEFT)==WW8_LEFT) {
- aBox.SetDistance( (USHORT)aInnerDist.Left(), BOX_LINE_LEFT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Left(), BOX_LINE_LEFT );
}
if ((nBorder & WW8_TOP)==WW8_TOP) {
- aBox.SetDistance( (USHORT)aInnerDist.Top(), BOX_LINE_TOP );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Top(), BOX_LINE_TOP );
}
if ((nBorder & WW8_RIGHT)==WW8_RIGHT) {
- aBox.SetDistance( (USHORT)aInnerDist.Right(), BOX_LINE_RIGHT );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Right(), BOX_LINE_RIGHT );
}
if ((nBorder & WW8_BOT)==WW8_BOT) {
- aBox.SetDistance( (USHORT)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
+ aBox.SetDistance( (sal_uInt16)aInnerDist.Bottom(), BOX_LINE_BOTTOM );
}
NewAttr( aBox );
@@ -4839,7 +4839,7 @@ void SwWW8ImplReader::Read_Border(USHORT , const BYTE* , short nLen)
}
}
-void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_Hyphenation( sal_uInt16, const sal_uInt8* pData, short nLen )
{
// set Hyphenation flag
if( nLen <= 0 )
@@ -4862,7 +4862,7 @@ void SwWW8ImplReader::Read_Hyphenation( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_WidowControl( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
{
@@ -4871,7 +4871,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
else
{
- BYTE nL = ( *pData & 1 ) ? 2 : 0;
+ sal_uInt8 nL = ( *pData & 1 ) ? 2 : 0;
NewAttr( SvxWidowsItem( nL, RES_PARATR_WIDOWS ) ); // Aus -> nLines = 0
NewAttr( SvxOrphansItem( nL, RES_PARATR_ORPHANS ) );
@@ -4882,7 +4882,7 @@ void SwWW8ImplReader::Read_WidowControl( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
+void SwWW8ImplReader::Read_UsePgsuSettings(sal_uInt16,const sal_uInt8* pData,short nLen)
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SNAPTOGRID);
@@ -4895,7 +4895,7 @@ void SwWW8ImplReader::Read_UsePgsuSettings(USHORT,const BYTE* pData,short nLen)
}
}
-void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_AlignFont( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_VERTALIGN);
@@ -4928,7 +4928,7 @@ void SwWW8ImplReader::Read_AlignFont( USHORT, const BYTE* pData, short nLen )
}
}
-void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepLines( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_PARATR_SPLIT );
@@ -4936,7 +4936,7 @@ void SwWW8ImplReader::Read_KeepLines( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtSplitItem( ( *pData & 1 ) == 0, RES_PARATR_SPLIT ) );
}
-void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_KeepParas( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_KEEP );
@@ -4944,7 +4944,7 @@ void SwWW8ImplReader::Read_KeepParas( USHORT, const BYTE* pData, short nLen )
NewAttr( SvxFmtKeepItem( ( *pData & 1 ) != 0 , RES_KEEP) );
}
-void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
+void SwWW8ImplReader::Read_BreakBefore( sal_uInt16, const sal_uInt8* pData, short nLen )
{
if( nLen <= 0 )
pCtrlStck->SetAttr( *pPaM->GetPoint(), RES_BREAK );
@@ -4953,7 +4953,7 @@ void SwWW8ImplReader::Read_BreakBefore( USHORT, const BYTE* pData, short nLen )
( *pData & 1 ) ? SVX_BREAK_PAGE_BEFORE : SVX_BREAK_NONE, RES_BREAK ) );
}
-void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
+void SwWW8ImplReader::Read_ApoPPC( sal_uInt16, const sal_uInt8* pData, short )
{
if (pAktColl) // only for Styledef, sonst anders geloest
{
@@ -4969,7 +4969,7 @@ void SwWW8ImplReader::Read_ApoPPC( USHORT, const BYTE* pData, short )
bool SwWW8ImplReader::ParseTabPos(WW8_TablePos *pTabPos, WW8PLCFx_Cp_FKP* pPap)
{
bool bRet = false;
- const BYTE *pRes=0;
+ const sal_uInt8 *pRes=0;
memset(pTabPos, 0, sizeof(WW8_TablePos));
if (0 != (pRes = pPap->HasSprm(0x360D)))
{
@@ -5016,7 +5016,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
if( pRes->nSprmId < 280 )
{
- BYTE nIdx = static_cast< BYTE >(pRes->nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(pRes->nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
return (this->*aWwSprmTab[nIdx])(pRes);
@@ -5027,7 +5027,7 @@ long SwWW8ImplReader::ImportExtSprm(WW8PLCFManResult* pRes)
return 0;
}
-void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
+void SwWW8ImplReader::EndExtSprm(sal_uInt16 nSprmId)
{
typedef sal_uInt16 (SwWW8ImplReader:: *FNReadRecordExt)();
@@ -5040,7 +5040,7 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
/* 4 (260) */ 0 // Annotation
};
- BYTE nIdx = static_cast< BYTE >(nSprmId - eFTN);
+ sal_uInt8 nIdx = static_cast< sal_uInt8 >(nSprmId - eFTN);
if( nIdx < sizeof( aWwSprmTab ) / sizeof( *aWwSprmTab )
&& aWwSprmTab[nIdx] )
(this->*aWwSprmTab[nIdx])();
@@ -5051,11 +5051,11 @@ void SwWW8ImplReader::EndExtSprm(USHORT nSprmId)
#**************************************************************************/
// Funktion zum Einlesen von Sprms. Par1: SprmId
-typedef void (SwWW8ImplReader:: *FNReadRecord)( USHORT, const BYTE*, short );
+typedef void (SwWW8ImplReader:: *FNReadRecord)( sal_uInt16, const sal_uInt8*, short );
struct SprmReadInfo
{
- USHORT nId;
+ sal_uInt16 nId;
FNReadRecord pReadFnc;
};
@@ -6182,7 +6182,7 @@ const wwSprmDispatcher *GetWW8SprmDispatcher()
// Hilfsroutinen : SPRM finden
//-----------------------------------------
-const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
+const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(sal_uInt16 nId) const
{
ww::WordVersion eVersion = pWwFib->GetFIBVersion();
const wwSprmDispatcher *pDispatcher;
@@ -6209,7 +6209,7 @@ const SprmReadInfo& SwWW8ImplReader::GetSprmReadInfo(USHORT nId) const
//-----------------------------------------
// Hilfsroutinen : SPRMs
//-----------------------------------------
-void SwWW8ImplReader::EndSprm( USHORT nId )
+void SwWW8ImplReader::EndSprm( sal_uInt16 nId )
{
if( ( nId > 255 ) && ( nId < 0x0800 ) ) return;
@@ -6219,7 +6219,7 @@ void SwWW8ImplReader::EndSprm( USHORT nId )
(this->*rSprm.pReadFnc)( nId, 0, -1 );
}
-short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
+short SwWW8ImplReader::ImportSprm(const sal_uInt8* pPos,sal_uInt16 nId)
{
if (!nId)
nId = mpSprmParser->GetSprmId(pPos);
@@ -6230,8 +6230,8 @@ short SwWW8ImplReader::ImportSprm(const BYTE* pPos,USHORT nId)
const SprmReadInfo& rSprm = GetSprmReadInfo(nId);
- USHORT nFixedLen = mpSprmParser->DistanceToData(nId);
- USHORT nL = mpSprmParser->GetSprmSize(nId, pPos);
+ sal_uInt16 nFixedLen = mpSprmParser->DistanceToData(nId);
+ sal_uInt16 nL = mpSprmParser->GetSprmSize(nId, pPos);
if (rSprm.pReadFnc)
(this->*rSprm.pReadFnc)(nId, pPos + nFixedLen, nL - nFixedLen);
diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index 553a05543514..eaaa1e0b609a 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -850,45 +850,45 @@ SprmInfo wwSprmParser::GetSprmInfo(sal_uInt16 nId) const
//-end
-inline BYTE Get_Byte( BYTE *& p )
+inline sal_uInt8 Get_Byte( sal_uInt8 *& p )
{
- BYTE n = SVBT8ToByte( *(SVBT8*)p );
+ sal_uInt8 n = SVBT8ToByte( *(SVBT8*)p );
p += 1;
return n;
}
-inline USHORT Get_UShort( BYTE *& p )
+inline sal_uInt16 Get_UShort( sal_uInt8 *& p )
{
- USHORT n = SVBT16ToShort( *(SVBT16*)p );
+ sal_uInt16 n = SVBT16ToShort( *(SVBT16*)p );
p += 2;
return n;
}
-inline short Get_Short( BYTE *& p )
+inline short Get_Short( sal_uInt8 *& p )
{
return Get_UShort(p);
}
-inline ULONG Get_ULong( BYTE *& p )
+inline sal_uLong Get_ULong( sal_uInt8 *& p )
{
- ULONG n = SVBT32ToUInt32( *(SVBT32*)p );
+ sal_uLong n = SVBT32ToUInt32( *(SVBT32*)p );
p += 4;
return n;
}
-inline long Get_Long( BYTE *& p )
+inline long Get_Long( sal_uInt8 *& p )
{
return Get_ULong(p);
}
-WW8SprmIter::WW8SprmIter(const BYTE* pSprms_, long nLen_,
+WW8SprmIter::WW8SprmIter(const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rParser)
: mrSprmParser(rParser), pSprms( pSprms_), nRemLen( nLen_)
{
UpdateMyMembers();
}
-void WW8SprmIter::SetSprms(const BYTE* pSprms_, long nLen_)
+void WW8SprmIter::SetSprms(const sal_uInt8* pSprms_, long nLen_)
{
pSprms = pSprms_;
nRemLen = nLen_;
@@ -899,7 +899,7 @@ void WW8SprmIter::advance()
{
if (nRemLen > 0 )
{
- USHORT nSize = nAktSize;
+ sal_uInt16 nSize = nAktSize;
if (nSize > nRemLen)
nSize = nRemLen;
pSprms += nSize;
@@ -925,7 +925,7 @@ void WW8SprmIter::UpdateMyMembers()
}
}
-const BYTE* WW8SprmIter::FindSprm(USHORT nId)
+const sal_uInt8* WW8SprmIter::FindSprm(sal_uInt16 nId)
{
while(GetSprms())
{
@@ -952,12 +952,12 @@ WW8PLCFx_PCDAttrs::WW8PLCFx_PCDAttrs(ww::WordVersion eVersion,
{
}
-ULONG WW8PLCFx_PCDAttrs::GetIdx() const
+sal_uLong WW8PLCFx_PCDAttrs::GetIdx() const
{
return 0;
}
-void WW8PLCFx_PCDAttrs::SetIdx( ULONG )
+void WW8PLCFx_PCDAttrs::SetIdx( sal_uLong )
{
}
@@ -990,11 +990,11 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
return;
}
- UINT16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
+ sal_uInt16 nPrm = SVBT16ToShort( ( (WW8_PCD*)pData )->prm );
if ( nPrm & 1 )
{
// PRM Variant 2
- UINT16 nSprmIdx = nPrm >> 1;
+ sal_uInt16 nSprmIdx = nPrm >> 1;
if( nSprmIdx >= nGrpprls )
{
@@ -1004,7 +1004,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
p->nSprmsLen = 0;
return;
}
- const BYTE* pSprms = pGrpprls[ nSprmIdx ];
+ const sal_uInt8* pSprms = pGrpprls[ nSprmIdx ];
p->nSprmsLen = SVBT16ToShort( pSprms ); // Length
pSprms += 2;
@@ -1019,8 +1019,8 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
if (IsSevenMinus(GetFIBVersion()))
{
- aShortSprm[0] = (BYTE)( ( nPrm & 0xfe) >> 1 );
- aShortSprm[1] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nPrm & 0xfe) >> 1 );
+ aShortSprm[1] = (sal_uInt8)( nPrm >> 8 );
p->nSprmsLen = ( nPrm ) ? 2 : 0; // Laenge
// store Postion of internal mini storage in Data Pointer
@@ -1030,7 +1030,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
{
p->pMemPos = 0;
p->nSprmsLen = 0;
- BYTE nSprmListIdx = (BYTE)((nPrm & 0xfe) >> 1);
+ sal_uInt8 nSprmListIdx = (sal_uInt8)((nPrm & 0xfe) >> 1);
if( nSprmListIdx )
{
// process Sprm Id Matching as explained in MS Doku
@@ -1039,7 +1039,7 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
// see file: s62f39.htm
//
// Since isprm is 7 bits, rgsprmPrm can hold 0x80 entries.
- static const USHORT aSprmId[0x80] =
+ static const sal_uInt16 aSprmId[0x80] =
{
// sprmNoop, sprmNoop, sprmNoop, sprmNoop
0x0000,0x0000,0x0000,0x0000,
@@ -1111,14 +1111,14 @@ void WW8PLCFx_PCDAttrs::GetSprms(WW8PLCFxDesc* p)
};
// find real Sprm Id:
- USHORT nSprmId = aSprmId[ nSprmListIdx ];
+ sal_uInt16 nSprmId = aSprmId[ nSprmListIdx ];
if( nSprmId )
{
// move Sprm Id and Sprm Param to internal mini storage:
- aShortSprm[0] = (BYTE)( ( nSprmId & 0x00ff) );
- aShortSprm[1] = (BYTE)( ( nSprmId & 0xff00) >> 8 );
- aShortSprm[2] = (BYTE)( nPrm >> 8 );
+ aShortSprm[0] = (sal_uInt8)( ( nSprmId & 0x00ff) );
+ aShortSprm[1] = (sal_uInt8)( ( nSprmId & 0xff00) >> 8 );
+ aShortSprm[2] = (sal_uInt8)( nPrm >> 8 );
// store Sprm Length in member:
p->nSprmsLen = ( nPrm ) ? 3 : 0;
@@ -1148,17 +1148,17 @@ WW8PLCFx_PCD::~WW8PLCFx_PCD()
delete pPcdI;
}
-ULONG WW8PLCFx_PCD::GetIMax() const
+sal_uLong WW8PLCFx_PCD::GetIMax() const
{
return pPcdI ? pPcdI->GetIMax() : 0;
}
-ULONG WW8PLCFx_PCD::GetIdx() const
+sal_uLong WW8PLCFx_PCD::GetIdx() const
{
return pPcdI ? pPcdI->GetIdx() : 0;
}
-void WW8PLCFx_PCD::SetIdx( ULONG nIdx )
+void WW8PLCFx_PCD::SetIdx( sal_uLong nIdx )
{
if (pPcdI)
pPcdI->SetIdx( nIdx );
@@ -1246,11 +1246,11 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
return WW8_CP_MAX;
}
bool bIsUnicode = false;
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( !bVer67 )
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart, bIsUnicode );
- INT32 nUnicodeFactor = bIsUnicode ? 2 : 1;
+ sal_Int32 nUnicodeFactor = bIsUnicode ? 2 : 1;
if( nStartPos < nFcStart )
nStartPos = nFcStart;
@@ -1266,7 +1266,7 @@ WW8_CP WW8PLCFx_PCD::AktPieceStartFc2Cp( WW8_FC nStartPos )
//-----------------------------------------
short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
- BYTE *pCol, short *pIdx) const
+ sal_uInt8 *pCol, short *pIdx) const
{
/*
Word does not factor the width of the border into the width/height
@@ -1275,12 +1275,12 @@ short WW8_BRC::DetermineBorderProperties(bool bVer67, short *pSpace,
our calculations
*/
short nMSTotalWidth;
- BYTE nCol;
+ sal_uInt8 nCol;
short nIdx,nSpace;
if( bVer67 )
{
- UINT16 aBrc1 = SVBT16ToShort(aBits1);
- nCol = static_cast< BYTE >((aBrc1 >> 6) & 0x1f); // aBor.ico
+ sal_uInt16 aBrc1 = SVBT16ToShort(aBits1);
+ nCol = static_cast< sal_uInt8 >((aBrc1 >> 6) & 0x1f); // aBor.ico
nSpace = (aBrc1 & 0xF800) >> 11;
nMSTotalWidth = aBrc1 & 0x07;
@@ -1495,7 +1495,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if( pPieceIter ) // Complex File ?
{
bool bIsUnicode = false;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
for (pPieceIter->SetIdx(0);
pPieceIter->GetIdx() < pPieceIter->GetIMax();(*pPieceIter)++)
@@ -1507,7 +1507,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
OSL_ENSURE( !this, "PLCFpcd-WW8Fc2Cp() ging schief" );
break;
}
- INT32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
+ sal_Int32 nFcStart = SVBT32ToUInt32( ((WW8_PCD*)pData)->fc );
if( 8 <= pWw8Fib->nVersion )
{
nFcStart = WW8PLCFx_PCD::TransformPieceAddress( nFcStart,
@@ -1518,7 +1518,7 @@ WW8_CP WW8ScannerBase::WW8Fc2Cp( WW8_FC nFcPos ) const
if (pWw8Fib->fExtChar)
bIsUnicode=true;
}
- INT32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
+ sal_Int32 nLen = (nCpEnd - nCpStart) * (bIsUnicode ? 2 : 1);
/*
If this cp is inside this piece, or its the last piece and we are
@@ -1634,10 +1634,10 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
return 0;
WW8_FC nClxPos = pWwF->fcClx;
- INT32 nClxLen = pWwF->lcbClx;
- INT32 nLeft = nClxLen;
- INT16 nGrpprl = 0;
- BYTE clxt;
+ sal_Int32 nClxLen = pWwF->lcbClx;
+ sal_Int32 nLeft = nClxLen;
+ sal_Int16 nGrpprl = 0;
+ sal_uInt8 clxt;
pStr->Seek( nClxPos );
while( 1 ) // Zaehle Zahl der Grpprls
@@ -1648,7 +1648,7 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
break; // PLCFfpcd gefunden
if( 1 == clxt ) // clxtGrpprl ?
nGrpprl++;
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
@@ -1657,24 +1657,24 @@ WW8PLCFpcd* WW8ScannerBase::OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF )
}
pStr->Seek( nClxPos );
nLeft = nClxLen;
- pPieceGrpprls = new BYTE*[nGrpprl + 1];
- memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(BYTE *) );
+ pPieceGrpprls = new sal_uInt8*[nGrpprl + 1];
+ memset( pPieceGrpprls, 0, ( nGrpprl + 1 ) * sizeof(sal_uInt8 *) );
nPieceGrpprls = nGrpprl;
- INT16 nAktGrpprl = 0; // lies Grpprls ein
+ sal_Int16 nAktGrpprl = 0; // lies Grpprls ein
while( 1 )
{
*pStr >> clxt;
nLeft--;
if( 2 == clxt) // PLCFfpcd ?
break; // PLCFfpcd gefunden
- UINT16 nLen;
+ sal_uInt16 nLen;
*pStr >> nLen;
nLeft -= 2 + nLen;
if( nLeft < 0 )
return 0; // schiefgegangen
if( 1 == clxt ) // clxtGrpprl ?
{
- BYTE* p = new BYTE[nLen+2]; // alloziere
+ sal_uInt8* p = new sal_uInt8[nLen+2]; // alloziere
ShortToSVBT16(nLen, p); // trage Laenge ein
pStr->Read( p+2, nLen ); // lies grpprl
pPieceGrpprls[nAktGrpprl++] = p; // trage in Array ein
@@ -1700,7 +1700,7 @@ void WW8ScannerBase::DeletePieceTable()
{
if( pPieceGrpprls )
{
- for( BYTE** p = pPieceGrpprls; *p; p++ )
+ for( sal_uInt8** p = pPieceGrpprls; *p; p++ )
delete[] (*p);
delete[] pPieceGrpprls;
pPieceGrpprls = 0;
@@ -1817,7 +1817,7 @@ WW8ScannerBase::WW8ScannerBase( SvStream* pSt, SvStream* pTblSt,
// Extended ATRD
if (pWwFib->fcAtrdExtra && pWwFib->lcbAtrdExtra)
{
- pExtendedAtrds = new BYTE[pWwFib->lcbAtrdExtra];
+ pExtendedAtrds = new sal_uInt8[pWwFib->lcbAtrdExtra];
long nOldPos = pTblSt->Tell();
pTblSt->Seek(pWwFib->fcAtrdExtra);
pTblSt->Read(pExtendedAtrds, pWwFib->lcbAtrdExtra);
@@ -1894,14 +1894,14 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
return true; // Bei Fehler nicht abbrechen
if( !rPLCF.Get( nP, pData ) )
return false;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1909,7 +1909,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
return false;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 )
{
// Field Separator ?
@@ -1918,7 +1918,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
if( !rPLCF.Get( nP, pData ) )
return false;
- while ((((BYTE*)pData)[0] & 0x1f ) == 0x13)
+ while ((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13)
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1934,7 +1934,7 @@ static bool WW8SkipField(WW8PLCFspecial& rPLCF)
static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
{
void* pData;
- ULONG nOldIdx = rPLCF.GetIdx();
+ sal_uLong nOldIdx = rPLCF.GetIdx();
rF.nLen = rF.nId = rF.nOpt = rF.bCodeNest = rF.bResNest = 0;
@@ -1943,10 +1943,10 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) != 0x13 ) // Kein Anfang ?
goto Err;
- rF.nId = ((BYTE*)pData)[1];
+ rF.nId = ((sal_uInt8*)pData)[1];
if( !rPLCF.Get( rF.nLCode, pData ) )
goto Err;
@@ -1955,7 +1955,7 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
rF.nSCode++; // ohne Marken
rF.nLCode -= rF.nSCode; // Pos zu Laenge
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Beschreibungsteil
@@ -1964,13 +1964,13 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
goto Err;
}
- if((((BYTE*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x14 ){ // Field Separator ?
rPLCF++;
if( !rPLCF.Get( rF.nLRes, pData ) )
goto Err;
- while((((BYTE*)pData)[0] & 0x1f ) == 0x13 )
+ while((((sal_uInt8*)pData)[0] & 0x1f ) == 0x13 )
{
// immer noch neue (nested) Anfaenge ?
WW8SkipField( rPLCF ); // nested Field im Resultatteil
@@ -1989,11 +1989,11 @@ static bool WW8GetFieldPara(WW8PLCFspecial& rPLCF, WW8FieldDesc& rF)
}
rPLCF++;
- if((((BYTE*)pData)[0] & 0x1f ) == 0x15 )
+ if((((sal_uInt8*)pData)[0] & 0x1f ) == 0x15 )
{
// Field Ende ?
// INDEX-Fld hat Bit7 gesetzt!?!
- rF.nOpt = ((BYTE*)pData)[1]; // Ja -> Flags uebernehmen
+ rF.nOpt = ((sal_uInt8*)pData)[1]; // Ja -> Flags uebernehmen
}else{
rF.nId = 0; // Nein -> Feld ungueltig
}
@@ -2016,7 +2016,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
bool bAtEndSeekRel1)
{
ByteString aByteStr;
- UINT8 b;
+ sal_uInt8 b;
rStrm >> b;
if (b)
@@ -2024,7 +2024,7 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
// Alloc methode automatically sets Zero at the end
sal_Char* pByteData = aByteStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( pByteData, b );
+ sal_uLong nWasRead = rStrm.Read( pByteData, b );
if( nWasRead != b )
aByteStr.ReleaseBufferAccess(static_cast<xub_StrLen>(nWasRead));
}
@@ -2036,9 +2036,9 @@ String WW8ReadPString(SvStream& rStrm, rtl_TextEncoding eEnc,
return String( aByteStr, eEnc );
}
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1)
{
- UINT16 b(0);
+ sal_uInt16 b;
if( nChars )
b = nChars;
@@ -2051,16 +2051,16 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
// Alloc methode automatically sets Zero at the end
sal_Unicode* pData = aStr.AllocBuffer( b );
- ULONG nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
- if( nWasRead != static_cast<ULONG>(b*2) )
+ sal_uLong nWasRead = rStrm.Read( (sal_Char*)pData, b * 2 );
+ if( nWasRead != static_cast<sal_uLong>(b*2) )
{
- b = static_cast<UINT16>(nWasRead / 2);
+ b = static_cast<sal_uInt16>(nWasRead / 2);
aStr.ReleaseBufferAccess( b );
pData = aStr.GetBufferAccess();
}
#ifdef OSL_BIGENDIAN
- ULONG n;
+ sal_uLong n;
sal_Unicode *pWork;
for( n = 0, pWork = pData; n < b; ++n, ++pWork )
*pWork = SWAPSHORT( *pWork );
@@ -2073,9 +2073,9 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1)
return aStr;
}
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm)
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm)
{
- ULONG nWasRead=0;
+ sal_uLong nWasRead=0;
if (nLen)
{
nWasRead = rStrm.Read( rStr.AllocBuffer( nLen ), nLen);
@@ -2115,12 +2115,12 @@ xub_StrLen WW8ScannerBase::WW8ReadString( SvStream& rStrm, String& rStr,
nLen = USHRT_MAX - 1;
if( bIsUnicode )
- rStr.Append(WW8Read_xstz(rStrm, (USHORT)nLen, false));
+ rStr.Append(WW8Read_xstz(rStrm, (sal_uInt16)nLen, false));
else
{
// Alloc method automatically sets Zero at the end
ByteString aByteStr;
- SafeReadString(aByteStr,(USHORT)nLen,rStrm);
+ SafeReadString(aByteStr,(sal_uInt16)nLen,rStrm);
rStr += String( aByteStr, eEnc );
}
nTotalRead += nLen;
@@ -2144,7 +2144,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
// Pointer auf Pos- u. Struct-Array
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ];
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ];
long nOldPos = pSt->Tell();
@@ -2156,7 +2156,7 @@ WW8PLCFspecial::WW8PLCFspecial(SvStream* pSt, long nFilePos, long nPLCF,
nIdx = 0;
#endif // OSL_BIGENDIAN
if( nStruct ) // Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
else
pPLCF_Contents = 0; // kein Inhalt
if( nStartPos >= 0 )
@@ -2259,7 +2259,7 @@ bool WW8PLCFspecial::GetData(long nInIdx, WW8_CP& rPos, void*& rpValue) const
// Ctor fuer *andere* als Fkps
// Bei nStartPos < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos ) : pPLCF_PosArray(0), nIdx(0), nStru(nStruct)
{
OSL_ENSURE( nPLCF, "WW8PLCF: nPLCF ist Null!" );
@@ -2277,8 +2277,8 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
// != 0, dann wird ein unvollstaendiger PLCF vervollstaendigt. Das ist bei
// WW6 bei Resourcenmangel und bei WordPad (W95) immer noetig. Bei nStartPos
// < 0 wird das erste Element des PLCFs genommen
-WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
+WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN ) : pPLCF_PosArray(0), nIdx(0),
nStru(nStruct)
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
@@ -2292,7 +2292,7 @@ WW8PLCF::WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
SeekPos( nStartPos );
}
-void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
+void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF )
{
bool failure = false;
@@ -2318,7 +2318,7 @@ void WW8PLCF::ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF )
nIdx = 0;
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
pSt->Seek( nOldPos );
@@ -2333,12 +2333,12 @@ void WW8PLCF::MakeFailedPLCF()
{
nIMax = 0;
delete[] pPLCF_PosArray;
- pPLCF_PosArray = new INT32[2];
+ pPLCF_PosArray = new sal_Int32[2];
pPLCF_PosArray[0] = pPLCF_PosArray[1] = WW8_CP_MAX;
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
}
-void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
+void WW8PLCF::GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN )
{
OSL_ENSURE( nIMax < ncpN, "Pcl.Fkp: Warum ist PLCF zu gross ?" );
@@ -2352,9 +2352,9 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
{
size_t nSiz = 6 * nIMax + 4;
size_t nElems = ( nSiz + 3 ) / 4;
- pPLCF_PosArray = new INT32[ nElems ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ nElems ]; // Pointer auf Pos-Array
- for (INT32 i = 0; i < ncpN && !pSt->GetError(); ++i)
+ for (sal_Int32 i = 0; i < ncpN && !pSt->GetError(); ++i)
{
// Baue FC-Eintraege
pSt->Seek( ( nPN + i ) << 9 ); // erster FC-Eintrag jedes Fkp
@@ -2371,7 +2371,7 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
sal_Size nLastFkpPos = ( ( nPN + nIMax - 1 ) << 9 );
pSt->Seek( nLastFkpPos + 511 ); // Anz. Fkp-Eintraege des letzten Fkp
- BYTE nb;
+ sal_uInt8 nb;
*pSt >> nb;
pSt->Seek( nLastFkpPos + nb * 4 ); // letzer FC-Eintrag des letzten Fkp
@@ -2385,10 +2385,10 @@ void WW8PLCF::GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN )
if (!failure)
{
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
- BYTE* p = pPLCF_Contents;
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
+ sal_uInt8* p = pPLCF_Contents;
- for (INT32 i = 0; i < ncpN; ++i) // Baue PNs
+ for (sal_Int32 i = 0; i < ncpN; ++i) // Baue PNs
{
ShortToSVBT16(static_cast<sal_uInt16>(nPN + i), p);
p+=2;
@@ -2416,8 +2416,8 @@ bool WW8PLCF::SeekPos(WW8_CP nPos)
if( (1 > nIdx) || (nP < pPLCF_PosArray[ nIdx-1 ]) )
nIdx = 1;
- INT32 nI = nIdx ? nIdx : 1;
- INT32 nEnd = nIMax;
+ sal_Int32 nI = nIdx ? nIdx : 1;
+ sal_Int32 nEnd = nIMax;
for(int n = (1==nIdx ? 1 : 2); n; --n )
{
@@ -2466,7 +2466,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
:nStru( nStruct )
{
nIMax = ( nPLCF - 4 ) / ( 4 + nStruct );
- pPLCF_PosArray = new INT32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
+ pPLCF_PosArray = new sal_Int32[ ( nPLCF + 3 ) / 4 ]; // Pointer auf Pos-Array
long nOldPos = pSt->Tell();
@@ -2478,7 +2478,7 @@ WW8PLCFpcd::WW8PLCFpcd( SvStream* pSt, long nFilePos, long nPLCF, long nStruct )
#endif // OSL_BIGENDIAN
// Pointer auf Inhalts-Array
- pPLCF_Contents = (BYTE*)&pPLCF_PosArray[nIMax + 1];
+ pPLCF_Contents = (sal_uInt8*)&pPLCF_PosArray[nIMax + 1];
pSt->Seek( nOldPos );
}
@@ -2537,7 +2537,7 @@ bool WW8PLCFpcd_Iter::Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const
return true;
}
-INT32 WW8PLCFpcd_Iter::Where() const
+sal_Int32 WW8PLCFpcd_Iter::Where() const
{
if ( nIdx >= rPLCF.nIMax )
return SAL_MAX_INT32;
@@ -2552,12 +2552,12 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::Entry::operator<
return (mnFC < rSecond.mnFC);
}
-bool IsReplaceAllSprm(USHORT nSpId)
+bool IsReplaceAllSprm(sal_uInt16 nSpId)
{
return (0x6645 == nSpId || 0x6646 == nSpId);
}
-bool IsExpandableSprm(USHORT nSpId)
+bool IsExpandableSprm(sal_uInt16 nSpId)
{
return 0x646B == nSpId;
}
@@ -2595,7 +2595,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
if (aEntry.mnLen && eVersion == ww::eWW2)
{
Word2CHPX aChpx = ReadWord2Chpx(*pSt, nFilePos + nOfs + 1, static_cast< sal_uInt8 >(aEntry.mnLen));
- std::vector<BYTE> aSprms = ChpxToSprms(aChpx);
+ std::vector<sal_uInt8> aSprms = ChpxToSprms(aChpx);
aEntry.mnLen = static_cast< sal_uInt16 >(aSprms.size());
if (aEntry.mnLen)
{
@@ -2648,7 +2648,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
aEntry.mnLen=0; //Too short, ignore
}
- USHORT nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
+ sal_uInt16 nSpId = aEntry.mnLen ? maSprmParser.GetSprmId(aEntry.mpData) : 0;
/*
If we replace then we throw away the old data, if we
@@ -2661,9 +2661,9 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
sal_uInt16 nOrigLen = bExpand ? aEntry.mnLen : 0;
sal_uInt8 *pOrigData = bExpand ? aEntry.mpData : 0;
- UINT32 nCurr = pDataSt->Tell();
+ sal_uInt32 nCurr = pDataSt->Tell();
- UINT32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
+ sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
pDataSt->Seek(nPos);
*pDataSt >> aEntry.mnLen;
aEntry.mpData =
@@ -2693,7 +2693,7 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(ww::WordVersion eVersion, SvStream* pSt,
#ifdef DEBUGSPRMREADER
{
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
while(aIter.GetSprms())
@@ -2798,7 +2798,7 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SeekPos(WW8_FC nFc)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
const
{
rLen = 0;
@@ -2812,7 +2812,7 @@ BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::Get(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen
rStart = maEntries[mnIdx].mnFC;
rEnd = maEntries[mnIdx + 1].mnFC;
- BYTE* pSprms = GetLenAndIStdAndSprms( rLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( rLen );
return pSprms;
}
@@ -2826,32 +2826,32 @@ bool WW8PLCFx_Fc_FKP::WW8Fkp::SetIdx(sal_uInt8 nI)
return false;
}
-BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
+sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::GetLenAndIStdAndSprms(sal_Int32& rLen) const
{
rLen = maEntries[mnIdx].mnLen;
return maEntries[mnIdx].mpData;
}
-const BYTE* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm( sal_uInt16 nId )
{
if (mnIdx >= mnIMax)
return 0;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
return aIter.FindSprm(nId);
}
-bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(USHORT nId,
- std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::WW8Fkp::HasSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult)
{
if (mnIdx >= mnIMax)
return false;
sal_Int32 nLen;
- BYTE* pSprms = GetLenAndIStdAndSprms( nLen );
+ sal_uInt8* pSprms = GetLenAndIStdAndSprms( nLen );
WW8SprmIter aIter(pSprms, nLen, maSprmParser);
@@ -2884,12 +2884,12 @@ long WW8PLCFx::GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen )
}
// ...Idx2: Default: ignorieren
-ULONG WW8PLCFx::GetIdx2() const
+sal_uLong WW8PLCFx::GetIdx2() const
{
return 0;
}
-void WW8PLCFx::SetIdx2(ULONG )
+void WW8PLCFx::SetIdx2(sal_uLong )
{
}
@@ -2948,7 +2948,7 @@ bool WW8PLCFx_Fc_FKP::NewFkp()
return false; // PLCF fertig abgearbeitet
}
(*pPLCF)++;
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
long nAktFkpFilePos = pFkp ? pFkp->GetFilePos() : -1;
@@ -3008,15 +3008,15 @@ WW8PLCFx_Fc_FKP::~WW8PLCFx_Fc_FKP()
delete pPCDAttrs;
}
-ULONG WW8PLCFx_Fc_FKP::GetIdx() const
+sal_uLong WW8PLCFx_Fc_FKP::GetIdx() const
{
- ULONG u = pPLCF->GetIdx() << 8;
+ sal_uLong u = pPLCF->GetIdx() << 8;
if (pFkp)
u |= pFkp->GetIdx();
return u;
}
-void WW8PLCFx_Fc_FKP::SetIdx( ULONG nIdx )
+void WW8PLCFx_Fc_FKP::SetIdx( sal_uLong nIdx )
{
if( !( nIdx & 0xffffff00L ) )
{
@@ -3048,7 +3048,7 @@ bool WW8PLCFx_Fc_FKP::SeekPos(WW8_FC nFcPos)
void* pPage;
if( pFkp && pPLCF->Get( nPLCFStart, nPLCFEnd, pPage ) )
{
- long nPo = SVBT16ToShort( (BYTE *)pPage );
+ long nPo = SVBT16ToShort( (sal_uInt8 *)pPage );
nPo <<= 9; // shift als LONG
if (nPo != pFkp->GetFilePos())
pFkp = 0;
@@ -3073,7 +3073,7 @@ WW8_FC WW8PLCFx_Fc_FKP::Where()
return Where(); // am einfachsten rekursiv
}
-BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
+sal_uInt8* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen)
{
rLen = 0; // Default
rStart = rEnd = WW8_FC_MAX;
@@ -3084,7 +3084,7 @@ BYTE* WW8PLCFx_Fc_FKP::GetSprmsAndPos(WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& r
return 0;
}
- BYTE* pPos = pFkp->Get( rStart, rEnd, rLen );
+ sal_uInt8* pPos = pFkp->Get( rStart, rEnd, rLen );
if( rStart == WW8_FC_MAX ) //Not found
return 0;
return pPos;
@@ -3105,7 +3105,7 @@ WW8PLCFx& WW8PLCFx_Fc_FKP::operator ++( int )
return *this;
}
-USHORT WW8PLCFx_Fc_FKP::GetIstd() const
+sal_uInt16 WW8PLCFx_Fc_FKP::GetIstd() const
{
return pFkp ? pFkp->GetIstd() : 0xFFFF;
}
@@ -3127,7 +3127,7 @@ void WW8PLCFx_Fc_FKP::GetPCDSprms( WW8PLCFxDesc& rDesc )
}
}
-const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
+const sal_uInt8* WW8PLCFx_Fc_FKP::HasSprm( sal_uInt16 nId )
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3139,7 +3139,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return 0;
}
- const BYTE* pRes = pFkp->HasSprm( nId );
+ const sal_uInt8* pRes = pFkp->HasSprm( nId );
if( !pRes )
{
@@ -3157,7 +3157,7 @@ const BYTE* WW8PLCFx_Fc_FKP::HasSprm( USHORT nId )
return pRes;
}
-bool WW8PLCFx_Fc_FKP::HasSprm(USHORT nId, std::vector<const BYTE *> &rResult)
+bool WW8PLCFx_Fc_FKP::HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult)
{
// const waere schoener, aber dafuer muesste NewFkp() ersetzt werden oder
// wegfallen
@@ -3229,17 +3229,17 @@ void WW8PLCFx_Cp_FKP::ResetAttrStartEnd()
bLineEnd = false;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIMax() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIMax() const
{
return pPcd ? pPcd->GetIMax() : 0;
}
-ULONG WW8PLCFx_Cp_FKP::GetPCDIdx() const
+sal_uLong WW8PLCFx_Cp_FKP::GetPCDIdx() const
{
return pPcd ? pPcd->GetIdx() : 0;
}
-void WW8PLCFx_Cp_FKP::SetPCDIdx( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetPCDIdx( sal_uLong nIdx )
{
if( pPcd )
pPcd->SetIdx( nIdx );
@@ -3291,7 +3291,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
*/
if( !pPieceIter )
return;
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
bool bOk = pPieceIter->SeekPos(nOrigCp);
pPieceIter->SetIdx( nOldPos );
if (!bOk)
@@ -3318,7 +3318,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
//We set the piece iterator to the piece that contains the
//character, now we have the correct piece for this character
- ULONG nOldPos = pPieceIter->GetIdx();
+ sal_uLong nOldPos = pPieceIter->GetIdx();
p->nStartPos = nOrigCp;
pPieceIter->SeekPos( p->nStartPos);
@@ -3396,7 +3396,7 @@ void WW8PLCFx_Cp_FKP::GetSprms(WW8PLCFxDesc* p)
break;
}
bIsUnicode = false;
- INT32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
+ sal_Int32 nFcStart=SVBT32ToUInt32(((WW8_PCD*)pData)->fc);
if (IsEightPlus(GetFIBVersion()))
{
@@ -3480,7 +3480,7 @@ WW8PLCFx_SEPX::WW8PLCFx_SEPX(SvStream* pSt, SvStream* pTblSt,
GetFIBVersion() <= ww::eWW2 ? 6 : 12, nStartCp)
: 0;
- pSprms = new BYTE[nArrMax]; // maximum length
+ pSprms = new sal_uInt8[nArrMax]; // maximum length
}
WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
@@ -3489,12 +3489,12 @@ WW8PLCFx_SEPX::~WW8PLCFx_SEPX()
delete[] pSprms;
}
-ULONG WW8PLCFx_SEPX::GetIdx() const
+sal_uLong WW8PLCFx_SEPX::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_SEPX::SetIdx( ULONG nIdx )
+void WW8PLCFx_SEPX::SetIdx( sal_uLong nIdx )
{
if( pPLCF ) pPLCF->SetIdx( nIdx );
}
@@ -3524,7 +3524,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
}
else
{
- sal_uInt32 nPo = SVBT32ToUInt32( (BYTE*)pData+2 );
+ sal_uInt32 nPo = SVBT32ToUInt32( (sal_uInt8*)pData+2 );
if (nPo == 0xFFFFFFFF)
{
p->nStartPos = p->nEndPos = WW8_CP_MAX; // Sepx empty
@@ -3538,7 +3538,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
// read len
if (GetFIBVersion() <= ww::eWW2) // eWW6 ?, docs say yes, but...
{
- BYTE nSiz(0);
+ sal_uInt8 nSiz(0);
*pStrm >> nSiz;
nSprmSiz = nSiz;
}
@@ -3549,7 +3549,7 @@ void WW8PLCFx_SEPX::GetSprms(WW8PLCFxDesc* p)
{ // passt nicht
delete[] pSprms;
nArrMax = nSprmSiz; // Hole mehr Speicher
- pSprms = new BYTE[nArrMax];
+ pSprms = new sal_uInt8[nArrMax];
}
pStrm->Read( pSprms, nSprmSiz ); // read Sprms
@@ -3566,15 +3566,15 @@ WW8PLCFx& WW8PLCFx_SEPX::operator ++( int )
return *this;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId ) const
{
return HasSprm( nId, pSprms, nSprmSiz);
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const
{
- const BYTE *pRet = 0;
+ const sal_uInt8 *pRet = 0;
if (pPLCF)
{
WW8SprmIter aIter(pOtherSprms, nOtherSprmSiz, maSprmParser);
@@ -3583,8 +3583,8 @@ const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, const BYTE* pOtherSprms,
return pRet;
}
-bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4) const
+bool WW8PLCFx_SEPX::Find4Sprms(sal_uInt16 nId1,sal_uInt16 nId2,sal_uInt16 nId3,sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4) const
{
if( !pPLCF )
return 0;
@@ -3595,12 +3595,12 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
p3 = 0;
p4 = 0;
- BYTE* pSp = pSprms;
- USHORT i=0;
+ sal_uInt8* pSp = pSprms;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
bool bOk = true;
if( nAktId == nId1 )
p1 = pSp + maSprmParser.DistanceToData(nId1);
@@ -3614,33 +3614,33 @@ bool WW8PLCFx_SEPX::Find4Sprms(USHORT nId1,USHORT nId2,USHORT nId3,USHORT nId4,
bOk = false;
bFound |= bOk;
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
return bFound;
}
-const BYTE* WW8PLCFx_SEPX::HasSprm( USHORT nId, BYTE n2nd ) const
+const sal_uInt8* WW8PLCFx_SEPX::HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const
{
if( !pPLCF )
return 0;
- BYTE* pSp = pSprms;
+ sal_uInt8* pSp = pSprms;
- USHORT i=0;
+ sal_uInt16 i=0;
while (i + maSprmParser.MinSprmLen() <= nSprmSiz)
{
// Sprm gefunden?
- USHORT nAktId = maSprmParser.GetSprmId(pSp);
+ sal_uInt16 nAktId = maSprmParser.GetSprmId(pSp);
if (nAktId == nId)
{
- BYTE *pRet = pSp + maSprmParser.DistanceToData(nId);
+ sal_uInt8 *pRet = pSp + maSprmParser.DistanceToData(nId);
if (*pRet == n2nd)
return pRet;
}
// erhoehe Zeiger, so dass er auf naechsten Sprm zeigt
- USHORT x = maSprmParser.GetSprmSize(nAktId, pSp);
+ sal_uInt16 x = maSprmParser.GetSprmSize(nAktId, pSp);
i = i + x;
pSp += x;
}
@@ -3667,7 +3667,7 @@ WW8PLCFx_SubDoc::~WW8PLCFx_SubDoc()
delete pTxt;
}
-ULONG WW8PLCFx_SubDoc::GetIdx() const
+sal_uLong WW8PLCFx_SubDoc::GetIdx() const
{
// Wahrscheinlich pTxt... nicht noetig
if( pRef )
@@ -3675,7 +3675,7 @@ ULONG WW8PLCFx_SubDoc::GetIdx() const
return 0;
}
-void WW8PLCFx_SubDoc::SetIdx( ULONG nIdx )
+void WW8PLCFx_SubDoc::SetIdx( sal_uLong nIdx )
{
if( pRef )
{
@@ -3705,7 +3705,7 @@ void WW8PLCFx_SubDoc::GetSprms(WW8PLCFxDesc* p)
if (!pRef)
return;
- ULONG nNr = pRef->GetIdx();
+ sal_uLong nNr = pRef->GetIdx();
void *pData;
WW8_CP nFoo;
@@ -3792,12 +3792,12 @@ WW8PLCFx_FLD::~WW8PLCFx_FLD()
delete pPLCF;
}
-ULONG WW8PLCFx_FLD::GetIdx() const
+sal_uLong WW8PLCFx_FLD::GetIdx() const
{
return pPLCF ? pPLCF->GetIdx() : 0;
}
-void WW8PLCFx_FLD::SetIdx( ULONG nIdx )
+void WW8PLCFx_FLD::SetIdx( sal_uLong nIdx )
{
if( pPLCF )
pPLCF->SetIdx( nIdx );
@@ -3819,7 +3819,7 @@ bool WW8PLCFx_FLD::StartPosIsFieldStart()
sal_Int32 nTest;
if (
(!pPLCF || !pPLCF->Get(nTest, pData) ||
- ((((BYTE*)pData)[0] & 0x1f) != 0x13))
+ ((((sal_uInt8*)pData)[0] & 0x1f) != 0x13))
)
return false;
return true;
@@ -3837,7 +3837,7 @@ bool WW8PLCFx_FLD::EndPosIsFieldEnd()
void* pData;
sal_Int32 nTest;
- if ( pPLCF->Get(nTest, pData) && ((((BYTE*)pData)[0] & 0x1f) == 0x15) )
+ if ( pPLCF->Get(nTest, pData) && ((((sal_uInt8*)pData)[0] & 0x1f) == 0x15) )
bRet = true;
pPLCF->SetIdx(n);
@@ -3911,23 +3911,23 @@ bool WW8PLCFx_FLD::GetPara(long nIdx, WW8FieldDesc& rF)
//-----------------------------------------
/* to be optimized like this: */
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, std::vector<String> &rArray,
std::vector<ww::bytes>* pExtraArray, ::std::vector<String>* pValueArray)
{
if(nLen==0) // Handle Empty STTBF
return;
- ULONG nOldPos = rStrm.Tell();
+ sal_uLong nOldPos = rStrm.Tell();
rStrm.Seek( nStart );
- UINT16 nLen2;
+ sal_uInt16 nLen2;
rStrm >> nLen2; // bVer67: total length of structure
// bVer8 : count of strings
if( bVer8 )
{
- UINT16 nStrings;
+ sal_uInt16 nStrings;
bool bUnicode = (0xFFFF == nLen2);
if( bUnicode )
rStrm >> nStrings;
@@ -3936,13 +3936,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
rStrm >> nExtraLen;
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
rArray.push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3970,13 +3970,13 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
// read the value of the document variables, if requested.
if (pValueArray)
{
- for( USHORT i=0; i < nStrings; i++ )
+ for( sal_uInt16 i=0; i < nStrings; i++ )
{
if( bUnicode )
pValueArray->push_back(WW8Read_xstz(rStrm, 0, false));
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
rStrm >> nBChar;
ByteString aTmp;
SafeReadString(aTmp,nBChar,rStrm);
@@ -3987,7 +3987,7 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
}
else
{
- BYTE nBChar;
+ sal_uInt8 nBChar;
if( nLen2 != nLen )
{
OSL_ENSURE( nLen2 == nLen, "Fib length and read length are different" );
@@ -3995,9 +3995,9 @@ void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
nLen = USHRT_MAX;
else if (nLen < 2 )
nLen = 2;
- nLen2 = static_cast<UINT16>(nLen);
+ nLen2 = static_cast<sal_uInt16>(nLen);
}
- ULONG nRead = 0;
+ sal_uLong nRead = 0;
for( nLen2 -= 2; nRead < nLen2; )
{
rStrm >> nBChar; ++nRead;
@@ -4071,28 +4071,28 @@ WW8PLCFx_Book::~WW8PLCFx_Book()
delete pBook[0];
}
-ULONG WW8PLCFx_Book::GetIdx() const
+sal_uLong WW8PLCFx_Book::GetIdx() const
{
return nIMax ? pBook[0]->GetIdx() : 0;
}
-void WW8PLCFx_Book::SetIdx( ULONG nI )
+void WW8PLCFx_Book::SetIdx( sal_uLong nI )
{
if( nIMax )
pBook[0]->SetIdx( nI );
}
-ULONG WW8PLCFx_Book::GetIdx2() const
+sal_uLong WW8PLCFx_Book::GetIdx2() const
{
return nIMax ? ( pBook[1]->GetIdx() | ( ( nIsEnd ) ? 0x80000000 : 0 ) ) : 0;
}
-void WW8PLCFx_Book::SetIdx2( ULONG nI )
+void WW8PLCFx_Book::SetIdx2( sal_uLong nI )
{
if( nIMax )
{
pBook[1]->SetIdx( nI & 0x7fffffff );
- nIsEnd = (USHORT)( ( nI >> 31 ) & 1 ); // 0 oder 1
+ nIsEnd = (sal_uInt16)( ( nI >> 31 ) & 1 ); // 0 oder 1
}
}
@@ -4147,8 +4147,8 @@ WW8PLCFx& WW8PLCFx_Book::operator ++( int )
{
(*pBook[nIsEnd])++;
- ULONG l0 = pBook[0]->Where();
- ULONG l1 = pBook[1]->Where();
+ sal_uLong l0 = pBook[0]->Where();
+ sal_uLong l1 = pBook[1]->Where();
if( l0 < l1 )
nIsEnd = 0;
else if( l1 < l0 )
@@ -4173,13 +4173,13 @@ long WW8PLCFx_Book::GetLen() const
OSL_ENSURE( !this, "Falscher Aufruf (2) von PLCF_Book::GetLen()" );
return 0;
}
- USHORT nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
+ sal_uInt16 nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
long nNum = pBook[1]->GetPos( nEndIdx );
nNum -= nStartPos;
return nNum;
}
-void WW8PLCFx_Book::SetStatus(USHORT nIndex, eBookStatus eStat )
+void WW8PLCFx_Book::SetStatus(sal_uInt16 nIndex, eBookStatus eStat )
{
OSL_ENSURE(nIndex < nIMax, "set status of non existing bookmark!");
pStatus[nIndex] = (eBookStatus)( pStatus[nIndex] | eStat );
@@ -4209,17 +4209,17 @@ long WW8PLCFx_Book::GetHandle() const
}
}
-String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, USHORT &nIndex)
+String WW8PLCFx_Book::GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex)
{
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
if( pBook[0] && pBook[1] )
{
WW8_CP nStartAkt, nEndAkt;
do
{
void* p;
- USHORT nEndIdx;
+ sal_uInt16 nEndIdx;
if( pBook[0]->GetData( i, nStartAkt, p ) && p )
nEndIdx = SVBT16ToShort( *((SVBT16*)p) );
@@ -4253,9 +4253,9 @@ String WW8PLCFx_Book::GetUniqueBookmarkName(String &suggestedName)
if (aRet.CompareTo(s)==0) {
int len=aRet.Len();
int p=len-1;
- while(p>0 && aRet.GetChar(static_cast<USHORT>(p))>='0' && aRet.GetChar(static_cast<USHORT>(p))<='9')
+ while(p>0 && aRet.GetChar(static_cast<sal_uInt16>(p))>='0' && aRet.GetChar(static_cast<sal_uInt16>(p))<='9')
p--;
- aRet=String(aRet, 0, static_cast<USHORT>(p+1));
+ aRet=String(aRet, 0, static_cast<sal_uInt16>(p+1));
aRet += String::CreateFromInt32( nBookmarkId++ );
i=0; // start search from beginning
} else {
@@ -4271,7 +4271,7 @@ bool WW8PLCFx_Book::MapName(String& rName)
return false;
bool bFound = false;
- USHORT i = 0;
+ sal_uInt16 i = 0;
do
{
if (COMPARE_EQUAL == rName.CompareIgnoreCaseToAscii(aBookNames[i]))
@@ -4395,9 +4395,9 @@ void WW8PLCFMan::GetNewNoSprms( WW8PLCFxDesc& rDesc )
rDesc.nOrigSprmsLen = rDesc.nSprmsLen;
}
-USHORT WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
+sal_uInt16 WW8PLCFMan::GetId(const WW8PLCFxDesc* p) const
{
- USHORT nId;
+ sal_uInt16 nId;
if (p == pFld)
nId = eFLD;
@@ -4426,7 +4426,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
memset( aD, 0, sizeof( aD ) );
nLineEnd = WW8_CP_MAX;
nManType = nType;
- USHORT i;
+ sal_uInt16 i;
if( MAN_MAINTEXT == nType )
{
@@ -4569,7 +4569,7 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
if( p->pPLCFx->IsSprm() )
{
// Vorsicht: nEndPos muss bereits
- p->pIdStk = new std::stack<USHORT>;
+ p->pIdStk = new std::stack<sal_uInt16>;
if ((p == pChp) || (p == pPap))
{
WW8_CP nTemp = p->nEndPos+p->nCpOfs;
@@ -4591,20 +4591,20 @@ WW8PLCFMan::WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
WW8PLCFMan::~WW8PLCFMan()
{
- for( USHORT i=0; i<nPLCF; i++)
+ for( sal_uInt16 i=0; i<nPLCF; i++)
delete aD[i].pIdStk;
}
// 0. welche Attr.-Klasse,
// 1. ob ein Attr.-Start ist,
// 2. CP, wo ist naechste Attr.-Aenderung
-USHORT WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
+sal_uInt16 WW8PLCFMan::WhereIdx(bool* pbStart, long* pPos) const
{
OSL_ENSURE(nPLCF,"What the hell");
long nNext = LONG_MAX; // SuchReihenfolge:
- USHORT nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
+ sal_uInt16 nNextIdx = nPLCF;// first ending found ( CHP, PAP, ( SEP ) ),
bool bStart = true; // dann Anfaenge finden ( ( SEP ), PAP, CHP )
- USHORT i;
+ sal_uInt16 i;
const WW8PLCFxDesc* pD;
for (i=0; i < nPLCF; i++)
{
@@ -4661,7 +4661,7 @@ void WW8PLCFMan::SeekPos( long nNewCp )
void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Save( rSave.aS[n++] );
if( pPcdA )
@@ -4674,7 +4674,7 @@ void WW8PLCFMan::SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const
void WW8PLCFMan::RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave )
{
- USHORT i, n=0;
+ sal_uInt16 i, n=0;
if( pPcd )
pPcd->Restore( rSave.aS[n++] );
if( pPcdA )
@@ -4774,7 +4774,7 @@ void WW8PLCFMan::GetNoSprmEnd( short nIdx, WW8PLCFManResult* pRes ) const
pRes->nSprmId = 0;
}
-bool WW8PLCFMan::TransferOpenSprms(std::stack<USHORT> &rStack)
+bool WW8PLCFMan::TransferOpenSprms(std::stack<sal_uInt16> &rStack)
{
for (int i = 0; i < nPLCF; ++i)
{
@@ -4797,7 +4797,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
p->bFirstSprm = false;
if( bStart )
{
- USHORT nLastId = GetId(p);
+ sal_uInt16 nLastId = GetId(p);
p->pIdStk->push(nLastId); // merke Id fuer Attribut-Ende
if( p->nSprmsLen )
@@ -4807,7 +4807,7 @@ void WW8PLCFMan::AdvSprm(short nIdx, bool bStart)
if( p->pMemPos )
{
// Length of last sprm
- USHORT nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
+ sal_uInt16 nSprmL = maSprmParser.GetSprmSize(nLastId, p->pMemPos);
// Gesamtlaenge Sprms um SprmLaenge verringern
p->nSprmsLen -= nSprmL;
@@ -4959,7 +4959,7 @@ void WW8PLCFMan::AdvNoSprm(short nIdx, bool bStart)
WW8PLCFMan& WW8PLCFMan::operator ++(int)
{
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if (nIdx < nPLCF)
{
WW8PLCFxDesc* p = &aD[nIdx];
@@ -4982,7 +4982,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
{
memset( pRes, 0, sizeof( WW8PLCFManResult ) );
bool bStart;
- USHORT nIdx = WhereIdx(&bStart);
+ sal_uInt16 nIdx = WhereIdx(&bStart);
if( nIdx >= nPLCF )
{
@@ -5018,7 +5018,7 @@ bool WW8PLCFMan::Get(WW8PLCFManResult* pRes) const
}
}
-USHORT WW8PLCFMan::GetColl() const
+sal_uInt16 WW8PLCFMan::GetColl() const
{
if( pPap->pPLCFx )
return pPap->pPLCFx->GetIstd();
@@ -5034,18 +5034,18 @@ WW8PLCFx_FLD* WW8PLCFMan::GetFld() const
return (WW8PLCFx_FLD*)pFld->pPLCFx;
}
-const BYTE* WW8PLCFMan::HasParaSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasParaSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pPap->pPLCFx)->HasSprm( nId );
}
-const BYTE* WW8PLCFMan::HasCharSprm( USHORT nId ) const
+const sal_uInt8* WW8PLCFMan::HasCharSprm( sal_uInt16 nId ) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm( nId );
}
-bool WW8PLCFMan::HasCharSprm(USHORT nId,
- std::vector<const BYTE *> &rResult) const
+bool WW8PLCFMan::HasCharSprm(sal_uInt16 nId,
+ std::vector<const sal_uInt8 *> &rResult) const
{
return ((WW8PLCFx_Cp_FKP*)pChp->pPLCFx)->HasSprm(nId, rResult);
}
@@ -5067,12 +5067,12 @@ void WW8PLCFx::Restore( const WW8PLCFxSave1& rSave )
SetStartFc( rSave.nStartFC );
}
-ULONG WW8PLCFx_Cp_FKP::GetIdx2() const
+sal_uLong WW8PLCFx_Cp_FKP::GetIdx2() const
{
return GetPCDIdx();
}
-void WW8PLCFx_Cp_FKP::SetIdx2( ULONG nIdx )
+void WW8PLCFx_Cp_FKP::SetIdx2( sal_uLong nIdx )
{
SetPCDIdx( nIdx );
}
@@ -5244,13 +5244,13 @@ ww::WordVersion WW8Fib::GetFIBVersion() const
return eVer;
}
-WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
+WW8Fib::WW8Fib(SvStream& rSt, sal_uInt8 nWantedVersion, sal_uInt32 nOffset)
: nFibError( 0 )
{
memset(this, 0, sizeof(*this));
- BYTE aBits1;
- BYTE aBits2;
- BYTE aVer8Bits1; // nur ab WinWord 8 benutzt
+ sal_uInt8 aBits1;
+ sal_uInt8 aBits2;
+ sal_uInt8 aVer8Bits1; // nur ab WinWord 8 benutzt
rSt.Seek( nOffset );
/*
Wunsch-Nr vermerken, File-Versionsnummer ermitteln
@@ -5262,8 +5262,8 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> nProduct;
if( 0 != rSt.GetError() )
{
- INT16 nFibMin;
- INT16 nFibMax;
+ sal_Int16 nFibMin;
+ sal_Int16 nFibMax;
// note: 6 stands for "6 OR 7", 7 stands for "ONLY 7"
switch( nVersion )
{
@@ -5299,10 +5299,10 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
ww::WordVersion eVer = GetFIBVersion();
// Hilfs-Varis fuer Ver67:
- INT16 pnChpFirst_Ver67=0;
- INT16 pnPapFirst_Ver67=0;
- INT16 cpnBteChp_Ver67=0;
- INT16 cpnBtePap_Ver67=0;
+ sal_Int16 pnChpFirst_Ver67=0;
+ sal_Int16 pnPapFirst_Ver67=0;
+ sal_Int16 cpnBteChp_Ver67=0;
+ sal_Int16 cpnBtePap_Ver67=0;
// und auf gehts: FIB einlesen
rSt >> lid;
@@ -5316,12 +5316,12 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> aVer8Bits1; // unter Ver67 nur leeres Reservefeld
// Inhalt von aVer8Bits1
//
- // BYTE fMac :1;
- // BYTE fEmptySpecial :1;
- // BYTE fLoadOverridePage :1;
- // BYTE fFuturesavedUndo :1;
- // BYTE fWord97Saved :1;
- // BYTE :3;
+ // sal_uInt8 fMac :1;
+ // sal_uInt8 fEmptySpecial :1;
+ // sal_uInt8 fLoadOverridePage :1;
+ // sal_uInt8 fFuturesavedUndo :1;
+ // sal_uInt8 fWord97Saved :1;
+ // sal_uInt8 :3;
rSt >> chse;
rSt >> chseTables;
rSt >> fcMin;
@@ -5337,7 +5337,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> wMagicRevised;
rSt >> wMagicCreatedPrivate;
rSt >> wMagicRevisedPrivate;
- rSt.SeekRel( 9 * sizeof( INT16 ) );
+ rSt.SeekRel( 9 * sizeof( sal_Int16 ) );
/*
// dies sind die 9 unused Felder:
@@ -5361,11 +5361,11 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
rSt >> cbMac;
// 2 Longs uebergehen, da unwichtiger Quatsch
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
// weitere 2 Longs nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 2 * sizeof( INT32) );
+ rSt.SeekRel( 2 * sizeof( sal_Int32) );
rSt >> ccpText;
rSt >> ccpFtn;
@@ -5378,7 +5378,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres Long nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
- rSt.SeekRel( 1 * sizeof( INT32) );
+ rSt.SeekRel( 1 * sizeof( sal_Int32) );
else
{
// Einschub fuer WW8 *****************************************************
@@ -5479,7 +5479,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
// weiteres short nur bei Ver67 ueberspringen
if (IsSevenMinus(eVer))
{
- rSt.SeekRel( 1*sizeof( INT16) );
+ rSt.SeekRel( 1*sizeof( sal_Int16) );
// folgende 4 Shorts existieren nur bei Ver67;
rSt >> pnChpFirst_Ver67;
@@ -5635,7 +5635,7 @@ WW8Fib::WW8Fib(SvStream& rSt, BYTE nWantedVersion, UINT32 nOffset)
}
-WW8Fib::WW8Fib(BYTE nVer)
+WW8Fib::WW8Fib(sal_uInt8 nVer)
{
memset(this, 0, sizeof(*this));
nVersion = nVer;
@@ -5708,11 +5708,11 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
bool bVer8 = 8 == nVersion;
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
@@ -5722,7 +5722,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, lid );
Set_UInt16( pData, pnNext );
- UINT16 nBits16 = 0;
+ sal_uInt16 nBits16 = 0;
if( fDot ) nBits16 |= 0x0001;
if( fGlsy) nBits16 |= 0x0002;
if( fComplex ) nBits16 |= 0x0004;
@@ -5746,7 +5746,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, nKey );
Set_UInt8( pData, envr );
- BYTE nBits8 = 0;
+ sal_uInt8 nBits8 = 0;
if( bVer8 )
{
if( fMac ) nBits8 |= 0x0001;
@@ -5774,7 +5774,7 @@ bool WW8Fib::WriteHeader(SvStream& rStrm)
Set_UInt16( pData, wMagicRevised );
Set_UInt16( pData, wMagicCreatedPrivate );
Set_UInt16( pData, wMagicRevisedPrivate );
- pData += 9 * sizeof( INT16 );
+ pData += 9 * sizeof( sal_Int16 );
Set_UInt16( pData, lidFE );
Set_UInt16( pData, clw );
}
@@ -5797,20 +5797,20 @@ bool WW8Fib::Write(SvStream& rStrm)
size_t nUnencryptedHdr = bVer8 ? 0x44 : 0x24;
- BYTE *pDataPtr = new BYTE[ fcMin - nUnencryptedHdr ];
- BYTE *pData = pDataPtr;
+ sal_uInt8 *pDataPtr = new sal_uInt8[ fcMin - nUnencryptedHdr ];
+ sal_uInt8 *pData = pDataPtr;
memset( pData, 0, fcMin - nUnencryptedHdr );
- ULONG nPos = rStrm.Tell();
+ sal_uLong nPos = rStrm.Tell();
cbMac = rStrm.Seek( STREAM_SEEK_TO_END );
rStrm.Seek( nPos );
// 2 Longs uebergehen, da unwichtiger Quatsch
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
// weitere 2 Longs nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 2 * sizeof( INT32);
+ pData += 2 * sizeof( sal_Int32);
Set_UInt32( pData, ccpText );
Set_UInt32( pData, ccpFtn );
@@ -5823,7 +5823,7 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres Long nur bei Ver67 ueberspringen
if( !bVer8 )
- pData += 1 * sizeof( INT32);
+ pData += 1 * sizeof( sal_Int32);
// Einschub fuer WW8 *****************************************************
if( bVer8 )
@@ -5924,11 +5924,11 @@ bool WW8Fib::Write(SvStream& rStrm)
// weiteres short nur bei Ver67 ueberspringen
if( !bVer8 )
{
- pData += 1*sizeof( INT16);
- Set_UInt16( pData, (UINT16)pnChpFirst );
- Set_UInt16( pData, (UINT16)pnPapFirst );
- Set_UInt16( pData, (UINT16)cpnBteChp );
- Set_UInt16( pData, (UINT16)cpnBtePap );
+ pData += 1*sizeof( sal_Int16);
+ Set_UInt16( pData, (sal_uInt16)pnChpFirst );
+ Set_UInt16( pData, (sal_uInt16)pnPapFirst );
+ Set_UInt16( pData, (sal_uInt16)cpnBteChp );
+ Set_UInt16( pData, (sal_uInt16)cpnBtePap );
}
Set_UInt32( pData, fcPlcfdoaMom ); // nur bei Ver67, in Ver8 unused
@@ -6001,8 +6001,8 @@ bool WW8Fib::Write(SvStream& rStrm)
Set_UInt32( pData, lcbPlcfTch );
pData += 0x3FA - 0x38A;
- Set_UInt16( pData, (UINT16)0x0002);
- Set_UInt16( pData, (UINT16)0x00D9);
+ Set_UInt16( pData, (sal_uInt16)0x0002);
+ Set_UInt16( pData, (sal_uInt16)0x00D9);
pData += 0x41A - 0x3FE;
Set_UInt32( pData, fcAtrdExtra );
@@ -6018,13 +6018,13 @@ bool WW8Fib::Write(SvStream& rStrm)
return 0 == rStrm.GetError();
}
-rtl_TextEncoding WW8Fib::GetFIBCharset(UINT16 chs)
+rtl_TextEncoding WW8Fib::GetFIBCharset(sal_uInt16 chs)
{
OSL_ENSURE(chs <= 0x100, "overflowed winword charset set");
rtl_TextEncoding eCharSet =
(0x0100 == chs)
? RTL_TEXTENCODING_APPLE_ROMAN
- : rtl_getTextEncodingFromWindowsCharset( static_cast<BYTE>(chs) );
+ : rtl_getTextEncodingFromWindowsCharset( static_cast<sal_uInt8>(chs) );
return eCharSet;
}
@@ -6038,7 +6038,7 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
rSt.Seek(nStyleStart);
- USHORT cbStshi = 0; // 2 bytes size of the following STSHI structure
+ sal_uInt16 cbStshi = 0; // 2 bytes size of the following STSHI structure
if (rFib.GetFIBVersion() <= ww::eWW2)
{
@@ -6051,10 +6051,10 @@ WW8Style::WW8Style(SvStream& rStream, WW8Fib& rFibPara)
// lies die Laenge der in der Datei gespeicherten Struktur
rSt >> cbStshi;
- UINT16 nRead = cbStshi;
+ sal_uInt16 nRead = cbStshi;
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> cstd;
@@ -6110,10 +6110,10 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
{
WW8_STD* pStd = 0;
- UINT16 cbStd;
+ sal_uInt16 cbStd;
rSt >> cbStd; // lies Laenge
- UINT16 nRead = cbSTDBaseInFile;
+ sal_uInt16 nRead = cbSTDBaseInFile;
if( cbStd >= cbSTDBaseInFile )
{
// Fixed part vollst. vorhanden
@@ -6124,7 +6124,7 @@ WW8_STD* WW8Style::Read1STDFixed( short& rSkip, short* pcbStd )
do
{
- UINT16 a16Bit;
+ sal_uInt16 a16Bit;
if( 2 > nRead ) break;
rSt >> a16Bit;
@@ -6257,7 +6257,7 @@ struct WW8_FFN_Ver8 : public WW8_FFN_BASE
sal_Char fs[ 24 ]; // 0x10 FONTSIGNATURE
// ab Ver8 als Unicode
- UINT16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
+ sal_uInt16 szFfn[65]; // 0x6 bzw. 0x40 ab Ver8 zero terminated string that
// records name of font.
// Maximal size of szFfn is 65 characters.
// Vorsicht: Dieses Array kann auch kleiner sein!!!
@@ -6313,10 +6313,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
rSt.Seek( rFib.fcSttbfffn );
- INT32 nFFn = rFib.lcbSttbfffn - 2;
+ sal_Int32 nFFn = rFib.lcbSttbfffn - 2;
// allocate Font Array
- BYTE* pA = new BYTE[ nFFn ];
+ sal_uInt8* pA = new sal_uInt8[ nFFn ];
memset(pA, 0, nFFn);
WW8_FFN* p = (WW8_FFN*)pA;
@@ -6353,7 +6353,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( nLeft < 1 ) // can we read the given ammount of bytes ?
break;
// increase p by nNextSiz Bytes
- p = (WW8_FFN *)( ( (BYTE*)p ) + nNextSiz );
+ p = (WW8_FFN *)( ( (sal_uInt8*)p ) + nNextSiz );
}
}
@@ -6366,7 +6366,7 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
if( eVersion <= ww::eWW2 )
{
WW8_FFN_BASE* pVer2 = (WW8_FFN_BASE*)pA;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer2->cbFfnM1;
@@ -6374,8 +6374,8 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->fTrueType = 0;
p->ff = 0;
- p->wWeight = ( *(((BYTE*)pVer2) + 1) );
- p->chs = ( *(((BYTE*)pVer2) + 2) );
+ p->wWeight = ( *(((sal_uInt8*)pVer2) + 1) );
+ p->chs = ( *(((sal_uInt8*)pVer2) + 2) );
/*
#i8726# 7- seems to encode the name in the same encoding as
the font, e.g load the doc in 97 and save to see the unicode
@@ -6386,17 +6386,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
eEnc = RTL_TEXTENCODING_MS_1252;
p->sFontname = String ( (((const sal_Char*)pVer2) + 1 + 2), eEnc);
- pVer2 = (WW8_FFN_BASE*)( ((BYTE*)pVer2) + pVer2->cbFfnM1 + 1 );
+ pVer2 = (WW8_FFN_BASE*)( ((sal_uInt8*)pVer2) + pVer2->cbFfnM1 + 1 );
}
}
else if( eVersion < ww::eWW8 )
{
WW8_FFN_Ver6* pVer6 = (WW8_FFN_Ver6*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer6->cbFfnM1;
- c2 = *(((BYTE*)pVer6) + 1);
+ c2 = *(((sal_uInt8*)pVer6) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6431,17 +6431,17 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
p->sFontname.APPEND_CONST_ASC(";Symbol");
}
}
- pVer6 = (WW8_FFN_Ver6*)( ((BYTE*)pVer6) + pVer6->cbFfnM1 + 1 );
+ pVer6 = (WW8_FFN_Ver6*)( ((sal_uInt8*)pVer6) + pVer6->cbFfnM1 + 1 );
}
}
else
{
WW8_FFN_Ver8* pVer8 = (WW8_FFN_Ver8*)pA;
- BYTE c2;
- for(USHORT i=0; i<nMax; ++i, ++p)
+ sal_uInt8 c2;
+ for(sal_uInt16 i=0; i<nMax; ++i, ++p)
{
p->cbFfnM1 = pVer8->cbFfnM1;
- c2 = *(((BYTE*)pVer8) + 1);
+ c2 = *(((sal_uInt8*)pVer8) + 1);
p->prg = c2 & 0x02;
p->fTrueType = (c2 & 0x04) >> 2;
@@ -6454,10 +6454,10 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
#ifdef __WW8_NEEDS_COPY
{
- BYTE nLen = 0x28;
- BYTE nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
- nLength = std::min( nLength, BYTE( pVer8->cbFfnM1+1 ) );
- for( UINT16* pTmp = pVer8->szFfn;
+ sal_uInt8 nLen = 0x28;
+ sal_uInt8 nLength = sizeof( pVer8->szFfn ) / sizeof( SVBT16 );
+ nLength = std::min( nLength, sal_uInt8( pVer8->cbFfnM1+1 ) );
+ for( sal_uInt16* pTmp = pVer8->szFfn;
nLen < nLength; ++pTmp, nLen+=2 )
{
*pTmp = SVBT16ToShort( *(SVBT16*)pTmp );
@@ -6476,14 +6476,14 @@ WW8Fonts::WW8Fonts( SvStream& rSt, WW8Fib& rFib )
lcl_checkFontname( p->sFontname );
// Zeiger auf Ursprungsarray einen Font nach hinten setzen
- pVer8 = (WW8_FFN_Ver8*)( ((BYTE*)pVer8) + pVer8->cbFfnM1 + 1 );
+ pVer8 = (WW8_FFN_Ver8*)( ((sal_uInt8*)pVer8) + pVer8->cbFfnM1 + 1 );
}
}
}
delete[] pA;
}
-const WW8_FFN* WW8Fonts::GetFont( USHORT nNum ) const
+const WW8_FFN* WW8Fonts::GetFont( sal_uInt16 nNum ) const
{
if( !pFontA || nNum >= nMax )
return 0;
@@ -6526,7 +6526,7 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
to point to the beginning of the next section's group of headers and
footers in this PLCF, UpdateIndex does that task.
*/
- for( BYTE nI = 0x1; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x1; nI <= 0x20; nI <<= 1 )
if( nI & rDop.grpfIhdt ) // Bit gesetzt ?
nIdxOffset++;
@@ -6534,10 +6534,10 @@ WW8PLCF_HdFt::WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop )
// und der Fussnoten
}
-bool WW8PLCF_HdFt::GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart,
+bool WW8PLCF_HdFt::GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart,
long& rLen)
{
- BYTE nI = 0x01;
+ sal_uInt8 nI = 0x01;
short nIdx = nIdxOffset;
while (true)
{
@@ -6572,10 +6572,10 @@ bool WW8PLCF_HdFt::GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen)
return true;
}
-void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
+void WW8PLCF_HdFt::UpdateIndex( sal_uInt8 grpfIhdt )
{
// Caution: Description is not correct
- for( BYTE nI = 0x01; nI <= 0x20; nI <<= 1 )
+ for( sal_uInt8 nI = 0x01; nI <= 0x20; nI <<= 1 )
if( nI & grpfIhdt )
nIdxOffset++;
}
@@ -6584,14 +6584,14 @@ void WW8PLCF_HdFt::UpdateIndex( BYTE grpfIhdt )
// WW8Dop
//-----------------------------------------
-WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
+WW8Dop::WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize) : bUseThaiLineBreakingRules(false)
{
memset( &nDataStart, 0, (&nDataEnd - &nDataStart) );
fDontUseHTMLAutoSpacing = true; //default
fAcetateShowAtn = true; //default
const sal_uInt32 nMaxDopSize = 0x268;
- BYTE* pDataPtr = new BYTE[ nMaxDopSize ];
- BYTE* pData = pDataPtr;
+ sal_uInt8* pDataPtr = new sal_uInt8[ nMaxDopSize ];
+ sal_uInt8* pData = pDataPtr;
sal_uInt32 nRead = nMaxDopSize < nSize ? nMaxDopSize : nSize;
rSt.Seek( nPos );
@@ -6603,9 +6603,9 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
memset( pData + nRead, 0, nMaxDopSize - nRead );
// dann mal die Daten auswerten
- UINT32 a32Bit;
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt32 a32Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = Get_UShort( pData ); // 0 0x00
fFacingPages = 0 != ( a16Bit & 0x0001 ) ;
@@ -6761,7 +6761,7 @@ WW8Dop::WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize) : bUseTh
cDBC = Get_Long( pData ); // 480 0x1e0
cDBCFtnEdn = Get_Long( pData ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
nfcFtnRef = Get_Short( pData ); // 492 0x1ec
nfcEdnRef = Get_Short( pData ); // 494 0x1ee
@@ -6860,7 +6860,7 @@ WW8Dop::WW8Dop() : bUseThaiLineBreakingRules(false)
fAcetateShowAtn = true;
}
-void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions(sal_uInt32 a32Bit)
{
fNoTabForInd = ( a32Bit & 0x00000001 ) ;
fNoSpaceRaiseLower = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6897,9 +6897,9 @@ void WW8Dop::SetCompatabilityOptions(UINT32 a32Bit)
fUsePrinterMetrics = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fNoTabForInd) a32Bit |= 0x00000001;
if (fNoSpaceRaiseLower) a32Bit |= 0x00000002;
if (fSupressSpbfAfterPageBreak) a32Bit |= 0x00000004;
@@ -6936,7 +6936,7 @@ UINT32 WW8Dop::GetCompatabilityOptions() const
}
// i#78591#
-void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
+void WW8Dop::SetCompatabilityOptions2(sal_uInt32 a32Bit)
{
fCompatabilityOptions_Unknown2_1 = ( a32Bit & 0x00000001 );
fCompatabilityOptions_Unknown2_2 = ( a32Bit & 0x00000002 ) >> 1 ;
@@ -6972,9 +6972,9 @@ void WW8Dop::SetCompatabilityOptions2(UINT32 a32Bit)
fCompatabilityOptions_Unknown2_32 = ( a32Bit & 0x80000000 ) >> 31 ;
}
-UINT32 WW8Dop::GetCompatabilityOptions2() const
+sal_uInt32 WW8Dop::GetCompatabilityOptions2() const
{
- UINT32 a32Bit = 0;
+ sal_uInt32 a32Bit = 0;
if (fCompatabilityOptions_Unknown2_1) a32Bit |= 0x00000001;
if (fCompatabilityOptions_Unknown2_2) a32Bit |= 0x00000002;
if (fDontUseHTMLAutoSpacing) a32Bit |= 0x00000004;
@@ -7021,13 +7021,13 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
rFib.fcDop = rStrm.Tell();
rFib.lcbDop = nLen;
- BYTE aData[ nMaxDopLen ];
+ sal_uInt8 aData[ nMaxDopLen ];
memset( aData, 0, nMaxDopLen );
- BYTE* pData = aData;
+ sal_uInt8* pData = aData;
// dann mal die Daten auswerten
- UINT16 a16Bit;
- BYTE a8Bit;
+ sal_uInt16 a16Bit;
+ sal_uInt8 a8Bit;
a16Bit = 0; // 0 0x00
if (fFacingPages)
@@ -7184,7 +7184,7 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
Set_UInt32( pData, cDBC ); // 480 0x1e0
Set_UInt32( pData, cDBCFtnEdn ); // 484 0x1e4
- pData += 1 * sizeof( INT32); // 488 0x1e8
+ pData += 1 * sizeof( sal_Int32); // 488 0x1e8
Set_UInt16( pData, nfcFtnRef ); // 492 0x1ec
Set_UInt16( pData, nfcEdnRef ); // 494 0x1ee
@@ -7216,9 +7216,9 @@ bool WW8Dop::Write(SvStream& rStrm, WW8Fib& rFib) const
return 0 == rStrm.GetError();
}
-void WW8DopTypography::ReadFromMem(BYTE *&pData)
+void WW8DopTypography::ReadFromMem(sal_uInt8 *&pData)
{
- USHORT a16Bit = Get_UShort(pData);
+ sal_uInt16 a16Bit = Get_UShort(pData);
fKerningPunct = (a16Bit & 0x0001);
iJustification = (a16Bit & 0x0006) >> 1;
iLevelOfKinsoku = (a16Bit & 0x0018) >> 3;
@@ -7229,7 +7229,7 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
cchFollowingPunct = Get_Short(pData);
cchLeadingPunct = Get_Short(pData);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
rgxchFPunct[i] = Get_Short(pData);
for (i=0; i < nMaxLeading; ++i)
@@ -7247,9 +7247,9 @@ void WW8DopTypography::ReadFromMem(BYTE *&pData)
}
-void WW8DopTypography::WriteToMem(BYTE *&pData) const
+void WW8DopTypography::WriteToMem(sal_uInt8 *&pData) const
{
- USHORT a16Bit = fKerningPunct;
+ sal_uInt16 a16Bit = fKerningPunct;
a16Bit |= (iJustification << 1) & 0x0006;
a16Bit |= (iLevelOfKinsoku << 3) & 0x0018;
a16Bit |= (f2on1 << 5) & 0x002;
@@ -7260,16 +7260,16 @@ void WW8DopTypography::WriteToMem(BYTE *&pData) const
Set_UInt16(pData,cchFollowingPunct);
Set_UInt16(pData,cchLeadingPunct);
- INT16 i;
+ sal_Int16 i;
for (i=0; i < nMaxFollowing; ++i)
Set_UInt16(pData,rgxchFPunct[i]);
for (i=0; i < nMaxLeading; ++i)
Set_UInt16(pData,rgxchLPunct[i]);
}
-USHORT WW8DopTypography::GetConvertedLang() const
+sal_uInt16 WW8DopTypography::GetConvertedLang() const
{
- USHORT nLang;
+ sal_uInt16 nLang;
//I have assumed peoples republic/taiwan == simplified/traditional
//This isn't a documented issue, so we might have it all wrong,
@@ -7311,11 +7311,11 @@ USHORT WW8DopTypography::GetConvertedLang() const
//-----------------------------------------
// Sprms
//-----------------------------------------
-USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
+sal_uInt16 wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
const
{
SprmInfo aSprm = GetSprmInfo(nId);
- USHORT nL = 0; // number of Bytes to read
+ sal_uInt16 nL = 0; // number of Bytes to read
//sprmPChgTabs
switch( nId )
@@ -7323,11 +7323,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case 23:
case 0xC615:
if( pSprm[1 + mnDelta] != 255 )
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
else
{
- BYTE nDel = pSprm[2 + mnDelta];
- BYTE nIns = pSprm[3 + mnDelta + 4 * nDel];
+ sal_uInt8 nDel = pSprm[2 + mnDelta];
+ sal_uInt8 nIns = pSprm[3 + mnDelta + 4 * nDel];
nL = 2 + 4 * nDel + 3 * nIns;
}
@@ -7344,12 +7344,12 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
case L_VAR:
// Variable 1-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(pSprm[1 + mnDelta] + aSprm.nLen);
+ nL = static_cast< sal_uInt16 >(pSprm[1 + mnDelta] + aSprm.nLen);
break;
case L_VAR2:
// Variable 2-Byte Length?
// Excl. Token + Var-Lengthbyte
- nL = static_cast< USHORT >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
+ nL = static_cast< sal_uInt16 >(SVBT16ToShort( &pSprm[1 + mnDelta] ) + aSprm.nLen - 1);
break;
default:
OSL_ENSURE(!this, "Unknown sprm varient");
@@ -7361,11 +7361,11 @@ USHORT wwSprmParser::GetSprmTailLen(sal_uInt16 nId, const sal_uInt8* pSprm)
}
// one or two bytes at the beginning at the sprm id
-USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
+sal_uInt16 wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
{
ASSERT_RET_ON_FAIL(pSp, "Why GetSprmId with pSp of 0", 0);
- USHORT nId = 0;
+ sal_uInt16 nId = 0;
if (ww::IsSevenMinus(meVersion))
{
@@ -7384,17 +7384,17 @@ USHORT wwSprmParser::GetSprmId(const sal_uInt8* pSp) const
}
// with tokens and length byte
-USHORT wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
+sal_uInt16 wwSprmParser::GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const
{
return GetSprmTailLen(nId, pSprm) + 1 + mnDelta + SprmDataOfs(nId);
}
-BYTE wwSprmParser::SprmDataOfs(USHORT nId) const
+sal_uInt8 wwSprmParser::SprmDataOfs(sal_uInt16 nId) const
{
return GetSprmInfo(nId).nVari;
}
-USHORT wwSprmParser::DistanceToData(USHORT nId) const
+sal_uInt16 wwSprmParser::DistanceToData(sal_uInt16 nId) const
{
return 1 + mnDelta + SprmDataOfs(nId);
}
diff --git a/sw/source/filter/ww8/ww8scan.hxx b/sw/source/filter/ww8/ww8scan.hxx
index 897938b39033..96300f4fbe5a 100644
--- a/sw/source/filter/ww8/ww8scan.hxx
+++ b/sw/source/filter/ww8/ww8scan.hxx
@@ -115,7 +115,7 @@ class wwSprmParser
{
private:
ww::WordVersion meVersion;
- BYTE mnDelta;
+ sal_uInt8 mnDelta;
const wwSprmSearcher *mpKnownSprms;
static const wwSprmSearcher* GetWW8SprmSearcher();
static const wwSprmSearcher* GetWW6SprmSearcher();
@@ -123,7 +123,7 @@ private:
SprmInfo GetSprmInfo(sal_uInt16 nId) const;
- BYTE SprmDataOfs(sal_uInt16 nId) const;
+ sal_uInt8 SprmDataOfs(sal_uInt16 nId) const;
enum SprmType {L_FIX=0, L_VAR=1, L_VAR2=2};
public:
@@ -132,15 +132,15 @@ public:
/// Return the SPRM id at the beginning of this byte sequence
sal_uInt16 GetSprmId(const sal_uInt8* pSp) const;
- USHORT GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
+ sal_uInt16 GetSprmSize(sal_uInt16 nId, const sal_uInt8* pSprm) const;
/// Get known len of a sprms head, the bytes of the sprm id + any bytes
/// reserved to hold a variable length
- USHORT DistanceToData(sal_uInt16 nId) const;
+ sal_uInt16 DistanceToData(sal_uInt16 nId) const;
/// Get len of a sprms data area, ignoring the bytes of the sprm id and
/// ignoring any len bytes. Reports the remaining data after those bytes
- USHORT GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
+ sal_uInt16 GetSprmTailLen(sal_uInt16 nId, const sal_uInt8 * pSprm) const;
/// The minimum acceptable sprm len possible for this type of parser
int MinSprmLen() const { return (IsSevenMinus(meVersion)) ? 2 : 3; }
@@ -164,7 +164,7 @@ String WW8ReadPString( SvStream& rStrm, rtl_TextEncoding eEnc,
exactly ONE byte is skipped If nChars is set then that number of characters
(not bytes) is read, if its not set, the first character read is the length
*/
-String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
+String WW8Read_xstz(SvStream& rStrm, sal_uInt16 nChars, bool bAtEndSeekRel1);
/**
reads array of strings (see MS documentation: STring TaBle stored in File)
@@ -172,8 +172,8 @@ String WW8Read_xstz(SvStream& rStrm, USHORT nChars, bool bAtEndSeekRel1);
attention: the *extra data* of each string are SKIPPED and ignored
*/
-void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, UINT32 nStart, INT32 nLen,
- USHORT nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
+void WW8ReadSTTBF(bool bVer8, SvStream& rStrm, sal_uInt32 nStart, sal_Int32 nLen,
+ sal_uInt16 nExtraLen, rtl_TextEncoding eCS, ::std::vector<String> &rArray,
::std::vector<ww::bytes>* pExtraArray = 0, ::std::vector<String>* pValueArray = 0);
struct WW8FieldDesc
@@ -183,16 +183,16 @@ struct WW8FieldDesc
WW8_CP nLCode; ///< Laenge
WW8_CP nSRes; ///< Anfang Ergebnis
WW8_CP nLRes; ///< Laenge ( == 0, falls kein Ergebnis )
- USHORT nId; ///< WW-Id fuer Felder
- BYTE nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
- BYTE bCodeNest:1; ///< Befehl rekursiv verwendet
- BYTE bResNest:1; ///< Befehl in Resultat eingefuegt
+ sal_uInt16 nId; ///< WW-Id fuer Felder
+ sal_uInt8 nOpt; ///< WW-Flags ( z.B.: vom User geaendert )
+ sal_uInt8 bCodeNest:1; ///< Befehl rekursiv verwendet
+ sal_uInt8 bResNest:1; ///< Befehl in Resultat eingefuegt
};
struct WW8PLCFxSave1
{
- ULONG nPLCFxPos;
- ULONG nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
+ sal_uLong nPLCFxPos;
+ sal_uLong nPLCFxPos2; ///< fuer PLCF_Cp_Fkp: PieceIter-Pos
long nPLCFxMemOfs;
WW8_CP nStartCp; ///< for cp based iterator like PAP and CHP
long nCpOfs;
@@ -209,8 +209,8 @@ struct WW8PLCFxSave1
class WW8PLCFspecial // Iterator fuer PLCFs
{
private:
- INT32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; ///< Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; ///< Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax; ///< Anzahl der Elemente
long nIdx; ///< Merker, wo wir gerade sind
long nStru;
@@ -224,7 +224,7 @@ public:
bool SeekPos(long nPos); // geht ueber FC- bzw. CP-Wert
// bzw. naechste groesseren Wert
bool SeekPosExact(long nPos);
- INT32 Where() const
+ sal_Int32 Where() const
{ return ( nIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nIdx]; }
bool Get(WW8_CP& rStart, void*& rpValue) const;
bool GetData(long nIdx, WW8_CP& rPos, void*& rpValue) const;
@@ -234,7 +234,7 @@ public:
return ( nInIdx >= nIMax ) ? 0
: (const void*)&pPLCF_Contents[nInIdx * nStru];
}
- INT32 GetPos( long nInIdx ) const
+ sal_Int32 GetPos( long nInIdx ) const
{ return ( nInIdx >= nIMax ) ? SAL_MAX_INT32 : pPLCF_PosArray[nInIdx]; }
WW8PLCFspecial& operator ++( int ) { nIdx++; return *this; }
@@ -247,24 +247,24 @@ class WW8SprmIter
private:
const wwSprmParser &mrSprmParser;
// these members will be updated
- const BYTE* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
- const BYTE* pAktParams; // start of akt. SPRM's parameters
- USHORT nAktId;
- USHORT nAktSize;
+ const sal_uInt8* pSprms; // remaining part of the SPRMs ( == start of akt. SPRM)
+ const sal_uInt8* pAktParams; // start of akt. SPRM's parameters
+ sal_uInt16 nAktId;
+ sal_uInt16 nAktSize;
long nRemLen; // length of remaining SPRMs (including akt. SPRM)
void UpdateMyMembers();
public:
- explicit WW8SprmIter( const BYTE* pSprms_, long nLen_,
+ explicit WW8SprmIter( const sal_uInt8* pSprms_, long nLen_,
const wwSprmParser &rSprmParser);
- void SetSprms( const BYTE* pSprms_, long nLen_ );
- const BYTE* FindSprm(USHORT nId);
+ void SetSprms( const sal_uInt8* pSprms_, long nLen_ );
+ const sal_uInt8* FindSprm(sal_uInt16 nId);
void advance();
- const BYTE* GetSprms() const
+ const sal_uInt8* GetSprms() const
{ return ( pSprms && (0 < nRemLen) ) ? pSprms : 0; }
- const BYTE* GetAktParams() const { return pAktParams; }
- USHORT GetAktId() const { return nAktId; }
+ const sal_uInt8* GetAktParams() const { return pAktParams; }
+ sal_uInt16 GetAktId() const { return nAktId; }
private:
//No copying
WW8SprmIter(const WW8SprmIter&);
@@ -276,40 +276,40 @@ class WW8PLCF // Iterator fuer PLCFs
{
private:
WW8_CP* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
- INT32 nIMax; // Anzahl der Elemente
- INT32 nIdx;
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32 nIMax; // Anzahl der Elemente
+ sal_Int32 nIdx;
int nStru;
- void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF );
+ void ReadPLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF );
/*
Falls im Dok ein PLC fehlt und die FKPs solo dastehen,
machen wir uns hiermit einen PLC:
*/
- void GeneratePLCF( SvStream* pSt, INT32 nPN, INT32 ncpN );
+ void GeneratePLCF( SvStream* pSt, sal_Int32 nPN, sal_Int32 ncpN );
void MakeFailedPLCF();
public:
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
WW8_CP nStartPos = -1 );
/*
folgender Ctor generiert ggfs. einen PLC aus nPN und ncpN
*/
- WW8PLCF( SvStream* pSt, WW8_FC nFilePos, INT32 nPLCF, int nStruct,
- WW8_CP nStartPos, INT32 nPN, INT32 ncpN );
+ WW8PLCF( SvStream* pSt, WW8_FC nFilePos, sal_Int32 nPLCF, int nStruct,
+ WW8_CP nStartPos, sal_Int32 nPN, sal_Int32 ncpN );
~WW8PLCF(){ delete[] pPLCF_PosArray; }
- INT32 GetIdx() const { return nIdx; }
- void SetIdx( INT32 nI ) { nIdx = nI; }
- INT32 GetIMax() const { return nIMax; }
+ sal_Int32 GetIdx() const { return nIdx; }
+ void SetIdx( sal_Int32 nI ) { nIdx = nI; }
+ sal_Int32 GetIMax() const { return nIMax; }
bool SeekPos(WW8_CP nPos);
WW8_CP Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCF& operator ++( int ) { if( nIdx < nIMax ) nIdx++; return *this; }
- const void* GetData( INT32 nInIdx ) const
+ const void* GetData( sal_Int32 nInIdx ) const
{
return ( nInIdx >= nIMax ) ? 0 :
(const void*)&pPLCF_Contents[nInIdx * nStru];
@@ -320,8 +320,8 @@ public:
class WW8PLCFpcd
{
friend class WW8PLCFpcd_Iter;
- INT32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
- BYTE* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
+ sal_Int32* pPLCF_PosArray; // Pointer auf Pos-Array und auf ganze Struktur
+ sal_uInt8* pPLCF_Contents; // Pointer auf Inhalts-Array-Teil des Pos-Array
long nIMax;
long nStru;
public:
@@ -345,7 +345,7 @@ public:
void SetIdx( long nI ) { nIdx = nI; }
long GetIMax() const { return rPLCF.nIMax; }
bool SeekPos(long nPos);
- INT32 Where() const;
+ sal_Int32 Where() const;
bool Get(WW8_CP& rStart, WW8_CP& rEnd, void*& rpValue) const;
WW8PLCFpcd_Iter& operator ++( int )
{
@@ -380,16 +380,16 @@ public:
: meVer(eVersion), bIsSprm(bSprm), bDirty(false) {}
virtual ~WW8PLCFx() {}
bool IsSprm() const { return bIsSprm; }
- virtual ULONG GetIdx() const = 0;
- virtual void SetIdx( ULONG nIdx ) = 0;
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const = 0;
+ virtual void SetIdx( sal_uLong nIdx ) = 0;
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos) = 0;
virtual WW8_FC Where() = 0;
virtual void GetSprms( WW8PLCFxDesc* p );
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int ) = 0;
- virtual USHORT GetIstd() const { return 0xffff; }
+ virtual sal_uInt16 GetIstd() const { return 0xffff; }
virtual void Save( WW8PLCFxSave1& rSave ) const;
virtual void Restore( const WW8PLCFxSave1& rSave );
ww::WordVersion GetFIBVersion() const { return meVer; }
@@ -404,10 +404,10 @@ class WW8PLCFx_PCDAttrs : public WW8PLCFx
private:
WW8PLCFpcd_Iter* pPcdI;
WW8PLCFx_PCD* pPcd;
- BYTE** const pGrpprls; // Attribute an Piece-Table
+ sal_uInt8** const pGrpprls; // Attribute an Piece-Table
SVBT32 aShortSprm; // mini storage: can contain ONE sprm with
// 1 byte param
- UINT16 nGrpprls; // Attribut Anzahl davon
+ sal_uInt16 nGrpprls; // Attribut Anzahl davon
//No copying
WW8PLCFx_PCDAttrs(const WW8PLCFx_PCDAttrs&);
@@ -415,8 +415,8 @@ private:
public:
WW8PLCFx_PCDAttrs(ww::WordVersion eVersion, WW8PLCFx_PCD* pPLCFx_PCD,
const WW8ScannerBase* pBase );
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -439,9 +439,9 @@ public:
WW8PLCFx_PCD(ww::WordVersion eVersion, WW8PLCFpcd* pPLCFpcd,
WW8_CP nStartCp, bool bVer67P);
virtual ~WW8PLCFx_PCD();
- virtual ULONG GetIMax() const;
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
+ virtual sal_uLong GetIMax() const;
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP&, sal_Int32& rLen );
@@ -454,7 +454,7 @@ public:
void SetClipStart(WW8_CP nIn) { nClipStart = nIn; }
WW8_CP GetClipStart() { return nClipStart; }
- static INT32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
+ static sal_Int32 TransformPieceAddress(long nfc, bool& bIsUnicodeAddress)
{
bIsUnicodeAddress = 0 == (0x40000000 & nfc);
return bIsUnicodeAddress ? nfc : (nfc & 0x3fffFFFF) / 2;
@@ -520,20 +520,20 @@ public:
mnIdx++;
return *this;
}
- BYTE* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
+ sal_uInt8* Get( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen ) const;
sal_uInt16 GetIstd() const { return maEntries[mnIdx].mnIStd; }
/*
liefert einen echten Pointer auf das Sprm vom Typ nId,
falls ein solches im Fkp drin ist.
*/
- BYTE* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
+ sal_uInt8* GetLenAndIStdAndSprms(sal_Int32& rLen) const;
/*
ruft GetLenAndIStdAndSprms() auf...
*/
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
const wwSprmParser &GetSprmParser() const { return maSprmParser; }
};
@@ -571,16 +571,16 @@ public:
WW8PLCFx_Fc_FKP( SvStream* pSt, SvStream* pTblSt, SvStream* pDataSt,
const WW8Fib& rFib, ePLCFT ePl, WW8_FC nStartFcL );
virtual ~WW8PLCFx_Fc_FKP();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_FC nFcPos);
virtual WW8_FC Where();
- BYTE* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
+ sal_uInt8* GetSprmsAndPos( WW8_FC& rStart, WW8_FC& rEnd, sal_Int32& rLen );
virtual WW8PLCFx& operator ++( int );
- virtual USHORT GetIstd() const;
+ virtual sal_uInt16 GetIstd() const;
void GetPCDSprms( WW8PLCFxDesc& rDesc );
- const BYTE* HasSprm( USHORT nId );
- bool HasSprm(USHORT nId, std::vector<const BYTE *> &rResult);
+ const sal_uInt8* HasSprm( sal_uInt16 nId );
+ bool HasSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult);
bool HasFkp() const { return (0 != pFkp); }
};
@@ -592,8 +592,8 @@ private:
WW8PLCFx_PCD* pPcd;
WW8PLCFpcd_Iter *pPieceIter;
WW8_CP nAttrStart, nAttrEnd;
- BYTE bLineEnd : 1;
- BYTE bComplex : 1;
+ sal_uInt8 bLineEnd : 1;
+ sal_uInt8 bComplex : 1;
//No copying
WW8PLCFx_Cp_FKP(const WW8PLCFx_Cp_FKP&);
@@ -603,11 +603,11 @@ public:
const WW8ScannerBase& rBase, ePLCFT ePl );
virtual ~WW8PLCFx_Cp_FKP();
void ResetAttrStartEnd();
- ULONG GetPCDIMax() const;
- ULONG GetPCDIdx() const;
- void SetPCDIdx( ULONG nIdx );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ sal_uLong GetPCDIMax() const;
+ sal_uLong GetPCDIdx() const;
+ void SetPCDIdx( sal_uLong nIdx );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_CP Where();
virtual void GetSprms( WW8PLCFxDesc* p );
@@ -623,9 +623,9 @@ private:
wwSprmParser maSprmParser;
SvStream* pStrm;
WW8PLCF* pPLCF;
- BYTE* pSprms;
- USHORT nArrMax;
- UINT16 nSprmSiz;
+ sal_uInt8* pSprms;
+ sal_uInt16 nArrMax;
+ sal_uInt16 nSprmSiz;
//no copying
WW8PLCFx_SEPX(const WW8PLCFx_SEPX&);
@@ -634,19 +634,19 @@ public:
WW8PLCFx_SEPX( SvStream* pSt, SvStream* pTblxySt, const WW8Fib& rFib,
WW8_CP nStartCp );
virtual ~WW8PLCFx_SEPX();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
long GetIMax() const { return ( pPLCF ) ? pPLCF->GetIMax() : 0; }
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms( WW8PLCFxDesc* p );
virtual WW8PLCFx& operator ++( int );
- const BYTE* HasSprm( USHORT nId ) const;
- const BYTE* HasSprm( USHORT nId, BYTE n2nd ) const;
- const BYTE* HasSprm( USHORT nId, const BYTE* pOtherSprms,
+ const sal_uInt8* HasSprm( sal_uInt16 nId ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, sal_uInt8 n2nd ) const;
+ const sal_uInt8* HasSprm( sal_uInt16 nId, const sal_uInt8* pOtherSprms,
long nOtherSprmSiz ) const;
- bool Find4Sprms(USHORT nId1, USHORT nId2, USHORT nId3, USHORT nId4,
- BYTE*& p1, BYTE*& p2, BYTE*& p3, BYTE*& p4 ) const;
+ bool Find4Sprms(sal_uInt16 nId1, sal_uInt16 nId2, sal_uInt16 nId3, sal_uInt16 nId4,
+ sal_uInt8*& p1, sal_uInt8*& p2, sal_uInt8*& p3, sal_uInt8*& p4 ) const;
};
/// Iterator fuer Fuss-/Endnoten und Anmerkungen
@@ -663,8 +663,8 @@ public:
WW8PLCFx_SubDoc(SvStream* pSt, ww::WordVersion eVersion, WW8_CP nStartCp,
long nFcRef, long nLenRef, long nFcTxt, long nLenTxt, long nStruc = 0);
virtual ~WW8PLCFx_SubDoc();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
@@ -693,8 +693,8 @@ private:
public:
WW8PLCFx_FLD(SvStream* pSt, const WW8Fib& rMyFib, short nType);
virtual ~WW8PLCFx_FLD();
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual void GetSprms(WW8PLCFxDesc* p);
@@ -714,7 +714,7 @@ private:
::std::vector<String> aBookNames; // Name
eBookStatus* pStatus;
long nIMax; // Number of Booknotes
- USHORT nIsEnd;
+ sal_uInt16 nIsEnd;
int nBookmarkId; // counter incremented by GetUniqueBookmarkName.
//No copying
@@ -724,10 +724,10 @@ public:
WW8PLCFx_Book(SvStream* pTblSt,const WW8Fib& rFib);
virtual ~WW8PLCFx_Book();
long GetIMax() const { return nIMax; }
- virtual ULONG GetIdx() const;
- virtual void SetIdx( ULONG nI );
- virtual ULONG GetIdx2() const;
- virtual void SetIdx2( ULONG nIdx );
+ virtual sal_uLong GetIdx() const;
+ virtual void SetIdx( sal_uLong nI );
+ virtual sal_uLong GetIdx2() const;
+ virtual void SetIdx2( sal_uLong nIdx );
virtual bool SeekPos(WW8_CP nCpPos);
virtual WW8_FC Where();
virtual long GetNoSprms( WW8_CP& rStart, WW8_CP& rEnd, sal_Int32& rLen );
@@ -738,9 +738,9 @@ public:
long GetLen() const;
bool GetIsEnd() const { return nIsEnd ? true : false; }
long GetHandle() const;
- void SetStatus( USHORT nIndex, eBookStatus eStat );
+ void SetStatus( sal_uInt16 nIndex, eBookStatus eStat );
bool MapName(String& rName);
- String GetBookmark(long nStart,long nEnd, USHORT &nIndex);
+ String GetBookmark(long nStart,long nEnd, sal_uInt16 &nIndex);
eBookStatus GetStatus() const;
String GetUniqueBookmarkName(String &suggestedName);
};
@@ -754,11 +754,11 @@ struct WW8PLCFManResult
long nMemLen; // Laenge dazu
long nCp2OrIdx; // footnote-textpos oder Index in PLCF
WW8_CP nAktCp; // wird nur vom Aufrufer benutzt
- const BYTE* pMemPos;// Mem-Pos fuer Sprms
- USHORT nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
+ const sal_uInt8* pMemPos;// Mem-Pos fuer Sprms
+ sal_uInt16 nSprmId; // Sprm-Id ( 0 = ungueltige Id -> ueberspringen! )
// (2..255) oder Pseudo-Sprm-Id (256..260)
// bzw. ab Winword-Ver8 die Sprm-Id (800..)
- BYTE nFlags; // Absatz- oder Section-Anfang
+ sal_uInt8 nFlags; // Absatz- oder Section-Anfang
};
enum ManMaskTypes
@@ -779,8 +779,8 @@ enum ManTypes // enums for PLCFMan-ctor
struct WW8PLCFxDesc
{
WW8PLCFx* pPLCFx;
- ::std::stack<USHORT>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
- const BYTE* pMemPos;// wo liegen die Sprm(s)
+ ::std::stack<sal_uInt16>* pIdStk; // Speicher fuer Attr-Id fuer Attr-Ende(n)
+ const sal_uInt8* pMemPos;// wo liegen die Sprm(s)
long nOrigSprmsLen;
WW8_CP nStartPos;
@@ -825,7 +825,7 @@ private:
WW8_CP nLineEnd; // zeigt *hinter* das <CR>
long nLastWhereIdxCp; // last result of WhereIdx()
- USHORT nPLCF; // so viele PLCFe werden verwaltet
+ sal_uInt16 nPLCF; // so viele PLCFe werden verwaltet
ManTypes nManType;
bool mbDoingDrawTextBox; //Normally we adjust the end of attributes
//so that the end of a paragraph occurs
@@ -836,11 +836,11 @@ private:
WW8PLCFxDesc *pChp, *pPap, *pSep, *pFld, *pFtn, *pEdn, *pBkm, *pPcd,
*pPcdA, *pAnd;
WW8PLCFspecial *pFdoa, *pTxbx, *pTxbxBkd,*pMagicTables, *pSubdocs;
- BYTE* pExtendedAtrds;
+ sal_uInt8* pExtendedAtrds;
const WW8Fib* pWwFib;
- USHORT WhereIdx(bool* pbStart=0, long* pPos=0) const;
+ sal_uInt16 WhereIdx(bool* pbStart=0, long* pPos=0) const;
void AdjustEnds(WW8PLCFxDesc& rDesc);
void GetNewSprms(WW8PLCFxDesc& rDesc);
void GetNewNoSprms(WW8PLCFxDesc& rDesc);
@@ -850,7 +850,7 @@ private:
void GetNoSprmEnd(short nIdx, WW8PLCFManResult* pRes) const;
void AdvSprm(short nIdx, bool bStart);
void AdvNoSprm(short nIdx, bool bStart);
- USHORT GetId(const WW8PLCFxDesc* p ) const;
+ sal_uInt16 GetId(const WW8PLCFxDesc* p ) const;
public:
WW8PLCFMan(WW8ScannerBase* pBase, ManTypes nType, long nStartCp,
bool bDoingDrawTextBox = false);
@@ -864,7 +864,7 @@ public:
bool Get(WW8PLCFManResult* pResult) const;
WW8PLCFMan& operator ++( int );
- USHORT GetColl() const; // index of actual Style
+ sal_uInt16 GetColl() const; // index of actual Style
WW8PLCFx_FLD* GetFld() const;
WW8PLCFx_SubDoc* GetEdn() const { return (WW8PLCFx_SubDoc*)pEdn->pPLCFx; }
WW8PLCFx_SubDoc* GetFtn() const { return (WW8PLCFx_SubDoc*)pFtn->pPLCFx; }
@@ -873,11 +873,11 @@ public:
long GetCpOfs() const { return pChp->nCpOfs; } // for Header/Footer...
/* fragt, ob *aktueller Absatz* einen Sprm diesen Typs hat */
- const BYTE* HasParaSprm( USHORT nId ) const;
+ const sal_uInt8* HasParaSprm( sal_uInt16 nId ) const;
/* fragt, ob *aktueller Textrun* einen Sprm diesen Typs hat */
- const BYTE* HasCharSprm( USHORT nId ) const;
- bool HasCharSprm(USHORT nId, std::vector<const BYTE *> &rResult) const;
+ const sal_uInt8* HasCharSprm( sal_uInt16 nId ) const;
+ bool HasCharSprm(sal_uInt16 nId, std::vector<const sal_uInt8 *> &rResult) const;
WW8PLCFx_Cp_FKP* GetChpPLCF() const
{ return (WW8PLCFx_Cp_FKP*)pChp->pPLCFx; }
@@ -886,7 +886,7 @@ public:
WW8PLCFx_SEPX* GetSepPLCF() const
{ return (WW8PLCFx_SEPX*)pSep->pPLCFx; }
WW8PLCFxDesc* GetPap() const { return pPap; }
- bool TransferOpenSprms(std::stack<USHORT> &rStack);
+ bool TransferOpenSprms(std::stack<sal_uInt16> &rStack);
void SeekPos( long nNewCp );
void SaveAllPLCFx( WW8PLCFxSaveAll& rSave ) const;
void RestoreAllPLCFx( const WW8PLCFxSaveAll& rSave );
@@ -895,7 +895,7 @@ public:
WW8PLCFspecial* GetTxbxBkd() const { return pTxbxBkd; }
WW8PLCFspecial* GetMagicTables() const { return pMagicTables; }
WW8PLCFspecial* GetWkbPLCF() const { return pSubdocs; }
- BYTE* GetExtendedAtrds() const { return pExtendedAtrds; }
+ sal_uInt8* GetExtendedAtrds() const { return pExtendedAtrds; }
ManTypes GetManType() const { return nManType; }
bool GetDoingDrawTextBox() const { return mbDoingDrawTextBox; }
};
@@ -943,15 +943,15 @@ private:
WW8PLCFspecial* pHdFtTxbxBkd; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pMagicTables; // Break-Deskriptoren fuer diese
WW8PLCFspecial* pSubdocs; // subdoc references in master document
- BYTE* pExtendedAtrds; // Extended ATRDs
+ sal_uInt8* pExtendedAtrds; // Extended ATRDs
WW8PLCFx_Book* pBook; // Bookmarks
WW8PLCFpcd* pPiecePLCF; // fuer FastSave ( Basis-PLCF ohne Iterator )
WW8PLCFpcd_Iter* pPieceIter; // fuer FastSave ( Iterator dazu )
WW8PLCFx_PCD* pPLCFx_PCD; // dito
WW8PLCFx_PCDAttrs* pPLCFx_PCDAttrs;
- BYTE** pPieceGrpprls; // Attribute an Piece-Table
- UINT16 nPieceGrpprls; // Anzahl davon
+ sal_uInt8** pPieceGrpprls; // Attribute an Piece-Table
+ sal_uInt16 nPieceGrpprls; // Anzahl davon
WW8PLCFpcd* OpenPieceTable( SvStream* pStr, const WW8Fib* pWwF );
void DeletePieceTable();
@@ -995,17 +995,17 @@ public:
7 == "only WinWord 95"
8 == "WinWord 97 or newer"
*/
- BYTE nVersion;
+ sal_uInt8 nVersion;
/*
error status
*/
- ULONG nFibError;
+ sal_uLong nFibError;
/*
vom Ctor aus dem FIB gelesene Daten
(entspricht nur ungefaehr der tatsaechlichen Struktur
des Winword-FIB)
*/
- UINT16 wIdent; // 0x0 int magic number
+ sal_uInt16 wIdent; // 0x0 int magic number
/*
File Information Block (FIB) values:
WinWord 1.0 = 33
@@ -1019,20 +1019,20 @@ public:
Word 2003 = 268
Word 2007 = 274
*/
- UINT16 nFib; // 0x2 FIB version written
- UINT16 nProduct; // 0x4 product version written by
- INT16 lid; // 0x6 language stamp---localized version;
+ sal_uInt16 nFib; // 0x2 FIB version written
+ sal_uInt16 nProduct; // 0x4 product version written by
+ sal_Int16 lid; // 0x6 language stamp---localized version;
WW8_PN pnNext; // 0x8
- UINT16 fDot :1; // 0xa 0001
- UINT16 fGlsy :1;
- UINT16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
- UINT16 fHasPic :1; // 0008 file contains 1 or more pictures
- UINT16 cQuickSaves :4; // 00F0 count of times file was quicksaved
- UINT16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
- UINT16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
- UINT16 fReadOnlyRecommended :1;
- UINT16 fWriteReservation :1;
+ sal_uInt16 fDot :1; // 0xa 0001
+ sal_uInt16 fGlsy :1;
+ sal_uInt16 fComplex :1; // 0004 when 1, file is in complex, fast-saved format.
+ sal_uInt16 fHasPic :1; // 0008 file contains 1 or more pictures
+ sal_uInt16 cQuickSaves :4; // 00F0 count of times file was quicksaved
+ sal_uInt16 fEncrypted :1; //0100 1 if file is encrypted, 0 if not
+ sal_uInt16 fWhichTblStm :1; //0200 When 0, this fib refers to the table stream
+ sal_uInt16 fReadOnlyRecommended :1;
+ sal_uInt16 fWriteReservation :1;
// named "0Table", when 1, this fib refers to the
// table stream named "1Table". Normally, a file
// will have only one table stream, but under unusual
@@ -1040,55 +1040,55 @@ public:
// both names. In that case, this flag must be used
// to decide which table stream is valid.
- UINT16 fExtChar :1; // 1000 =1, when using extended character set in file
- UINT16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
+ sal_uInt16 fExtChar :1; // 1000 =1, when using extended character set in file
+ sal_uInt16 fFarEast :1; // 4000 =1, probably, when far-East language vaiants of Word is used to create a file #i90932#
- UINT16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
+ sal_uInt16 fObfuscated :1; // 8000=1. specifies whether the document is obfuscated using XOR obfuscation. otherwise this bit MUST be ignored.
- UINT16 nFibBack; // 0xc
- UINT16 nHash; // 0xe file encrypted hash
- UINT16 nKey; // 0x10 file encrypted key
- UINT8 envr; // 0x12 environment in which file was created
+ sal_uInt16 nFibBack; // 0xc
+ sal_uInt16 nHash; // 0xe file encrypted hash
+ sal_uInt16 nKey; // 0x10 file encrypted key
+ sal_uInt8 envr; // 0x12 environment in which file was created
// 0 created by Win Word / 1 created by Mac Word
- BYTE fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
- BYTE fEmptySpecial :1;
- BYTE fLoadOverridePage :1;
- BYTE fFuturesavedUndo :1;
- BYTE fWord97Saved :1;
- BYTE fWord2000Saved :1;
- BYTE :2;
-
- UINT16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
+ sal_uInt8 fMac :1; // 0x13 when 1, this file was last saved in the Mac environment
+ sal_uInt8 fEmptySpecial :1;
+ sal_uInt8 fLoadOverridePage :1;
+ sal_uInt8 fFuturesavedUndo :1;
+ sal_uInt8 fWord97Saved :1;
+ sal_uInt8 fWord2000Saved :1;
+ sal_uInt8 :2;
+
+ sal_uInt16 chse; // 0x14 default extended character set id for text in document stream. (overidden by chp.chse)
// 0 = ANSI / 256 Macintosh character set.
- UINT16 chseTables; // 0x16 default extended character set id for text in
+ sal_uInt16 chseTables; // 0x16 default extended character set id for text in
// internal data structures: 0 = ANSI, 256 = Macintosh
WW8_FC fcMin; // 0x18 file offset of first character of text
WW8_FC fcMac; // 0x1c file offset of last character of text + 1
// Einschub fuer WW8 *****************************************************
- UINT16 csw; // Count of fields in the array of "shorts"
+ sal_uInt16 csw; // Count of fields in the array of "shorts"
// Marke: "rgsw" Beginning of the array of shorts
- UINT16 wMagicCreated; // unique number Identifying the File's creator
+ sal_uInt16 wMagicCreated; // unique number Identifying the File's creator
// 0x6A62 is the creator ID for Word and is reserved.
// Other creators should choose a different value.
- UINT16 wMagicRevised; // identifies the File's last modifier
- UINT16 wMagicCreatedPrivate; // private data
- UINT16 wMagicRevisedPrivate; // private data
+ sal_uInt16 wMagicRevised; // identifies the File's last modifier
+ sal_uInt16 wMagicCreatedPrivate; // private data
+ sal_uInt16 wMagicRevisedPrivate; // private data
/*
- INT16 pnFbpChpFirst_W6; // not used
- INT16 pnChpFirst_W6; // not used
- INT16 cpnBteChp_W6; // not used
- INT16 pnFbpPapFirst_W6; // not used
- INT16 pnPapFirst_W6; // not used
- INT16 cpnBtePap_W6; // not used
- INT16 pnFbpLvcFirst_W6; // not used
- INT16 pnLvcFirst_W6; // not used
- INT16 cpnBteLvc_W6; // not used
+ sal_Int16 pnFbpChpFirst_W6; // not used
+ sal_Int16 pnChpFirst_W6; // not used
+ sal_Int16 cpnBteChp_W6; // not used
+ sal_Int16 pnFbpPapFirst_W6; // not used
+ sal_Int16 pnPapFirst_W6; // not used
+ sal_Int16 cpnBtePap_W6; // not used
+ sal_Int16 pnFbpLvcFirst_W6; // not used
+ sal_Int16 pnLvcFirst_W6; // not used
+ sal_Int16 cpnBteLvc_W6; // not used
*/
- INT16 lidFE; // Language id if document was written by Far East version
+ sal_Int16 lidFE; // Language id if document was written by Far East version
// of Word (i.e. FIB.fFarEast is on)
- UINT16 clw; // Number of fields in the array of longs
+ sal_uInt16 clw; // Number of fields in the array of longs
// Ende des Einschubs fuer WW8 *******************************************
@@ -1106,7 +1106,7 @@ public:
WW8_CP ccpHdrTxbx; // 0x50 length of header textbox subdocument text stream
// Einschub fuer WW8 *****************************************************
- INT32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpChpFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written
// to the file in a linked list of 512-byte pieces
// starting with this pn.
@@ -1114,13 +1114,13 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnChpFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnChpFirst; // the page number of the lowest numbered page in the
// document that records CHPX FKP information
- INT32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteChp; // count of CHPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbteChpx
// is less than this, the PLCFbteChpx is incomplete.
*/
- INT32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpPapFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
@@ -1128,24 +1128,24 @@ public:
// folgende Felder existieren zwar so in der Datei,
// wir benutzen jedoch unten deklarierte General-Variablen
// fuer Ver67 und Ver8 gemeinsam.
- INT32 pnPapFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnPapFirst; // the page number of the lowest numbered page in the
// document that records PAPX FKP information
- INT32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
+ sal_Int32 cpnBtePap; // count of PAPX FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
*/
- INT32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
+ sal_Int32 pnFbpLvcFirst; // when there was insufficient memory for Word to expand
// the PLCFbte at save time, the PLCFbte is written to
// the file in a linked list of 512-byte pieces
// starting with this pn
- INT32 pnLvcFirst; // the page number of the lowest numbered page in the
+ sal_Int32 pnLvcFirst; // the page number of the lowest numbered page in the
// document that records LVC FKP information
- INT32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
+ sal_Int32 cpnBteLvc; // count of LVC FKPs recorded in file. In non-complex
// files if the number of entries in the PLCFbtePapx is
// less than this, the PLCFbtePapx is incomplete.
- INT32 fcIslandFirst; // ?
- INT32 fcIslandLim; // ?
- UINT16 cfclcb; // Number of fields in the array of FC/LCB pairs.
+ sal_Int32 fcIslandFirst; // ?
+ sal_Int32 fcIslandLim; // ?
+ sal_uInt16 cfclcb; // Number of fields in the array of FC/LCB pairs.
// Ende des Einschubs fuer WW8 *******************************************
@@ -1153,105 +1153,105 @@ public:
WW8_FC fcStshfOrig; // file offset of original allocation for STSH in table
// stream. During fast save Word will attempt to reuse
// this allocation if STSH is small enough to fit.
- INT32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
+ sal_Int32 lcbStshfOrig; // 0x5c count of bytes of original STSH allocation
WW8_FC fcStshf; // 0x60 file offset of STSH in file.
- INT32 lcbStshf; // 0x64 count of bytes of current STSH allocation
+ sal_Int32 lcbStshf; // 0x64 count of bytes of current STSH allocation
WW8_FC fcPlcffndRef; // 0x68 file offset of footnote reference PLCF.
- INT32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
+ sal_Int32 lcbPlcffndRef; // 0x6c count of bytes of footnote reference PLCF
// == 0 if no footnotes defined in document.
WW8_FC fcPlcffndTxt; // 0x70 file offset of footnote text PLCF.
- INT32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
+ sal_Int32 lcbPlcffndTxt; // 0x74 count of bytes of footnote text PLCF.
// == 0 if no footnotes defined in document
WW8_FC fcPlcfandRef; // 0x78 file offset of annotation reference PLCF.
- INT32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
+ sal_Int32 lcbPlcfandRef; // 0x7c count of bytes of annotation reference PLCF.
WW8_FC fcPlcfandTxt; // 0x80 file offset of annotation text PLCF.
- INT32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
+ sal_Int32 lcbPlcfandTxt; // 0x84 count of bytes of the annotation text PLCF
WW8_FC fcPlcfsed; // 8x88 file offset of section descriptor PLCF.
- INT32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
+ sal_Int32 lcbPlcfsed; // 0x8c count of bytes of section descriptor PLCF.
WW8_FC fcPlcfpad; // 0x90 file offset of paragraph descriptor PLCF
- INT32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
+ sal_Int32 lcbPlcfpad; // 0x94 count of bytes of paragraph descriptor PLCF.
// ==0 if file was never viewed in Outline view.
// Should not be written by third party creators
WW8_FC fcPlcfphe; // 0x98 file offset of PLCF of paragraph heights.
- INT32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
+ sal_Int32 lcbPlcfphe; // 0x9c count of bytes of paragraph height PLCF.
// ==0 when file is non-complex.
WW8_FC fcSttbfglsy; // 0xa0 file offset of glossary string table.
- INT32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
+ sal_Int32 lcbSttbfglsy; // 0xa4 count of bytes of glossary string table.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfglsy; // 0xa8 file offset of glossary PLCF.
- INT32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
+ sal_Int32 lcbPlcfglsy; // 0xac count of bytes of glossary PLCF.
// == 0 for non-glossary documents.
// !=0 for glossary documents.
WW8_FC fcPlcfhdd; // 0xb0 byte offset of header PLCF.
- INT32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
+ sal_Int32 lcbPlcfhdd; // 0xb4 count of bytes of header PLCF.
// == 0 if document contains no headers
WW8_FC fcPlcfbteChpx; // 0xb8 file offset of character property bin table.PLCF.
- INT32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
+ sal_Int32 lcbPlcfbteChpx;// 0xbc count of bytes of character property bin table PLCF.
WW8_FC fcPlcfbtePapx; // 0xc0 file offset of paragraph property bin table.PLCF.
- INT32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
+ sal_Int32 lcbPlcfbtePapx;// 0xc4 count of bytes of paragraph property bin table PLCF.
WW8_FC fcPlcfsea; // 0xc8 file offset of PLCF reserved for private use. The SEA is 6 bytes long.
- INT32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
+ sal_Int32 lcbPlcfsea; // 0xcc count of bytes of private use PLCF.
WW8_FC fcSttbfffn; // 0xd0 file offset of font information STTBF. See the FFN file structure definition.
- INT32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
+ sal_Int32 lcbSttbfffn; // 0xd4 count of bytes in sttbfffn.
WW8_FC fcPlcffldMom; // 0xd8 offset in doc stream to the PLCF of field positions in the main document.
- INT32 lcbPlcffldMom; // 0xdc
+ sal_Int32 lcbPlcffldMom; // 0xdc
WW8_FC fcPlcffldHdr; // 0xe0 offset in doc stream to the PLCF of field positions in the header subdocument.
- INT32 lcbPlcffldHdr; // 0xe4
+ sal_Int32 lcbPlcffldHdr; // 0xe4
WW8_FC fcPlcffldFtn; // 0xe8 offset in doc stream to the PLCF of field positions in the footnote subdocument.
- INT32 lcbPlcffldFtn; // 0xec
+ sal_Int32 lcbPlcffldFtn; // 0xec
WW8_FC fcPlcffldAtn; // 0xf0 offset in doc stream to the PLCF of field positions in the annotation subdocument.
- INT32 lcbPlcffldAtn; // 0xf4
+ sal_Int32 lcbPlcffldAtn; // 0xf4
WW8_FC fcPlcffldMcr; // 0xf8 offset in doc stream to the PLCF of field positions in the macro subdocument.
- INT32 lcbPlcffldMcr; // 9xfc
+ sal_Int32 lcbPlcffldMcr; // 9xfc
WW8_FC fcSttbfbkmk; // 0x100 offset in document stream of the STTBF that records bookmark names in the main document
- INT32 lcbSttbfbkmk; // 0x104
+ sal_Int32 lcbSttbfbkmk; // 0x104
WW8_FC fcPlcfbkf; // 0x108 offset in document stream of the PLCF that records the beginning CP offsets of bookmarks in the main document. See BKF
- INT32 lcbPlcfbkf; // 0x10c
+ sal_Int32 lcbPlcfbkf; // 0x10c
WW8_FC fcPlcfbkl; // 0x110 offset in document stream of the PLCF that records the ending CP offsets of bookmarks recorded in the main document. See the BKL structure definition.
- INT32 lcbPlcfbkl; // 0x114 INT32
+ sal_Int32 lcbPlcfbkl; // 0x114 sal_Int32
WW8_FC fcCmds; // 0x118 FC
- INT32 lcbCmds; // 0x11c
+ sal_Int32 lcbCmds; // 0x11c
WW8_FC fcPlcfmcr; // 0x120 FC
- INT32 lcbPlcfmcr; // 0x124
+ sal_Int32 lcbPlcfmcr; // 0x124
WW8_FC fcSttbfmcr; // 0x128 FC
- INT32 lcbSttbfmcr; // 0x12c
+ sal_Int32 lcbSttbfmcr; // 0x12c
WW8_FC fcPrDrvr; // 0x130 file offset of the printer driver information (names of drivers, port etc...)
- INT32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
+ sal_Int32 lcbPrDrvr; // 0x134 count of bytes of the printer driver information (names of drivers, port etc...)
WW8_FC fcPrEnvPort; // 0x138 file offset of the print environment in portrait mode.
- INT32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
+ sal_Int32 lcbPrEnvPort; // 0x13c count of bytes of the print environment in portrait mode.
WW8_FC fcPrEnvLand; // 0x140 file offset of the print environment in landscape mode.
- INT32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
+ sal_Int32 lcbPrEnvLand; // 0x144 count of bytes of the print environment in landscape mode.
WW8_FC fcWss; // 0x148 file offset of Window Save State data structure. See WSS.
- INT32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
+ sal_Int32 lcbWss; // 0x14c count of bytes of WSS. ==0 if unable to store the window state.
WW8_FC fcDop; // 0x150 file offset of document property data structure.
sal_uInt32 lcbDop; // 0x154 count of bytes of document properties.
@@ -1259,27 +1259,27 @@ public:
WW8_FC fcSttbfAssoc; // 0x158 offset to STTBF of associated strings. See STTBFASSOC.
- INT32 lcbSttbfAssoc; // 0x15C
+ sal_Int32 lcbSttbfAssoc; // 0x15C
WW8_FC fcClx; // 0x160 file offset of beginning of information for complex files.
- INT32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
+ sal_Int32 lcbClx; // 0x164 count of bytes of complex file information. 0 if file is non-complex.
WW8_FC fcPlcfpgdFtn; // 0x168 file offset of page descriptor PLCF for footnote subdocument.
- INT32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
+ sal_Int32 lcbPlcfpgdFtn; // 0x16C count of bytes of page descriptor PLCF for footnote subdocument.
// ==0 if document has not been paginated. The length of the PGD is 8 bytes.
WW8_FC fcAutosaveSource; // 0x170 file offset of the name of the original file.
- INT32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
+ sal_Int32 lcbAutosaveSource; // 0x174 count of bytes of the name of the original file.
WW8_FC fcGrpStAtnOwners; // 0x178 group of strings recording the names of the owners of annotations
- INT32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
+ sal_Int32 lcbGrpStAtnOwners; // 0x17C count of bytes of the group of strings
WW8_FC fcSttbfAtnbkmk; // 0x180 file offset of the sttbf that records names of bookmarks in the annotation subdocument
- INT32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
+ sal_Int32 lcbSttbfAtnbkmk; // 0x184 length in bytes of the sttbf that records names of bookmarks in the annotation subdocument
// Einschubs fuer WW67 ***************************************************
- // INT16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
+ // sal_Int16 wSpare4Fib; // Reserve, muss hier nicht deklariert werden
/*
// folgende Felder existieren zwar so in der Datei,
@@ -1303,144 +1303,144 @@ public:
WW8_FC fcPlcfdoaMom; // 0x192 file offset of the FDOA (drawn object) PLCF for main document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
+ sal_Int32 lcbPlcfdoaMom; // 0x196 length in bytes of the FDOA PLCF of the main document
// ab Ver8 unused
WW8_FC fcPlcfdoaHdr; // 0x19A file offset of the FDOA (drawn object) PLCF for the header document.
// ==0 if document has no drawn objects. The length of the FDOA is 6 bytes.
// ab Ver8 unused
- INT32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
+ sal_Int32 lcbPlcfdoaHdr; // 0x19E length in bytes of the FDOA PLCF of the header document
// ab Ver8 unused
WW8_FC fcPlcfspaMom; // offset in table stream of the FSPA PLCF for main document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
+ sal_Int32 lcbPlcfspaMom; // length in bytes of the FSPA PLCF of the main document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfspaHdr; // offset in table stream of the FSPA PLCF for header document.
// == 0 if document has no office art objects
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
+ sal_Int32 lcbPlcfspaHdr; // length in bytes of the FSPA PLCF of the header document
// war in Ver67 nur leere Reserve
WW8_FC fcPlcfAtnbkf; // 0x1B2 file offset of BKF (bookmark first) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkf; // 0x1B6 length in bytes of BKF (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPlcfAtnbkl; // 0x1BA file offset of BKL (bookmark last) PLCF of the annotation subdocument
- INT32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
+ sal_Int32 lcbPlcfAtnbkl; // 0x1BE length in bytes of BKL (bookmark first) PLCF of the annotation subdocument
WW8_FC fcPms; // 0x1C2 file offset of PMS (Print Merge State) information block
- INT32 lcbPMS; // 0x1C6 length in bytes of PMS
+ sal_Int32 lcbPMS; // 0x1C6 length in bytes of PMS
WW8_FC fcFormFldSttbf; // 0x1CA file offset of form field Sttbf which contains strings used in form field dropdown controls
- INT32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
+ sal_Int32 lcbFormFldSttbf; // 0x1CE length in bytes of form field Sttbf
WW8_FC fcPlcfendRef; // 0x1D2 file offset of PLCFendRef which points to endnote references in the main document stream
- INT32 lcbPlcfendRef; // 0x1D6
+ sal_Int32 lcbPlcfendRef; // 0x1D6
WW8_FC fcPlcfendTxt; // 0x1DA file offset of PLCFendRef which points to endnote text in the endnote document
// stream which corresponds with the PLCFendRef
- INT32 lcbPlcfendTxt; // 0x1DE
+ sal_Int32 lcbPlcfendTxt; // 0x1DE
WW8_FC fcPlcffldEdn; // 0x1E2 offset to PLCF of field positions in the endnote subdoc
- INT32 lcbPlcffldEdn; // 0x1E6
+ sal_Int32 lcbPlcffldEdn; // 0x1E6
WW8_FC fcPlcfpgdEdn; // 0x1EA offset to PLCF of page boundaries in the endnote subdoc.
- INT32 lcbPlcfpgdEdn; // 0x1EE
+ sal_Int32 lcbPlcfpgdEdn; // 0x1EE
WW8_FC fcDggInfo; // offset in table stream of the office art object table data.
// The format of office art object table data is found in a separate document.
// war in Ver67 nur leere Reserve
- INT32 lcbDggInfo; // length in bytes of the office art object table data
+ sal_Int32 lcbDggInfo; // length in bytes of the office art object table data
// war in Ver67 nur leere Reserve
WW8_FC fcSttbfRMark; // 0x1fa offset to STTBF that records the author abbreviations...
- INT32 lcbSttbfRMark; // 0x1fe
+ sal_Int32 lcbSttbfRMark; // 0x1fe
WW8_FC fcSttbfCaption; // 0x202 offset to STTBF that records caption titles...
- INT32 lcbSttbfCaption; // 0x206
+ sal_Int32 lcbSttbfCaption; // 0x206
WW8_FC fcSttbAutoCaption; // offset in table stream to the STTBF that records the object names and
// indices into the caption STTBF for objects which get auto captions.
- INT32 lcbSttbAutoCaption; // 0x20e
+ sal_Int32 lcbSttbAutoCaption; // 0x20e
WW8_FC fcPlcfwkb; // 0x212 offset to PLCF that describes the boundaries of contributing documents...
- INT32 lcbPlcfwkb; // 0x216
+ sal_Int32 lcbPlcfwkb; // 0x216
WW8_FC fcPlcfspl; // offset in table stream of PLCF (of SPLS structures) that records spell check state
// war in Ver67 nur leere Reserve
- INT32 lcbPlcfspl; // war in Ver67 nur leere Reserve
+ sal_Int32 lcbPlcfspl; // war in Ver67 nur leere Reserve
WW8_FC fcPlcftxbxTxt; // 0x222 ...PLCF of beginning CP in the text box subdoc
- INT32 lcbPlcftxbxTxt; // 0x226
+ sal_Int32 lcbPlcftxbxTxt; // 0x226
WW8_FC fcPlcffldTxbx; // 0x22a ...PLCF of field boundaries recorded in the textbox subdoc.
- INT32 lcbPlcffldTxbx; // 0x22e
+ sal_Int32 lcbPlcffldTxbx; // 0x22e
WW8_FC fcPlcfHdrtxbxTxt;// 0x232 ...PLCF of beginning CP in the header text box subdoc
- INT32 lcbPlcfHdrtxbxTxt;// 0x236
+ sal_Int32 lcbPlcfHdrtxbxTxt;// 0x236
WW8_FC fcPlcffldHdrTxbx;// 0x23a ...PLCF of field boundaries recorded in the header textbox subdoc.
- INT32 lcbPlcffldHdrTxbx;// 0x23e
+ sal_Int32 lcbPlcffldHdrTxbx;// 0x23e
WW8_FC fcStwUser;
sal_uInt32 lcbStwUser;
WW8_FC fcSttbttmbd;
sal_uInt32 lcbSttbttmbd;
WW8_FC fcSttbFnm; // 0x02da offset in the table stream of masters subdocument names
- INT32 lcbSttbFnm; // 0x02de length
+ sal_Int32 lcbSttbFnm; // 0x02de length
/*
spezielle Listenverwaltung fuer WW8
*/
WW8_FC fcPlcfLst; // 0x02e2 offset in the table stream of list format information.
- INT32 lcbPlcfLst; // 0x02e6 length
+ sal_Int32 lcbPlcfLst; // 0x02e6 length
WW8_FC fcPlfLfo; // 0x02ea offset in the table stream of list format override information.
- INT32 lcbPlfLfo; // 0x02ee length
+ sal_Int32 lcbPlfLfo; // 0x02ee length
/*
spezielle Break-Verwaltung fuer Text-Box-Stories in WW8
*/
WW8_FC fcPlcftxbxBkd; // 0x02f2 PLCF fuer TextBox-Break-Deskriptoren im Maintext
- INT32 lcbPlcftxbxBkd; // 0x02f6
+ sal_Int32 lcbPlcftxbxBkd; // 0x02f6
WW8_FC fcPlcfHdrtxbxBkd;// 0x02fa PLCF fuer TextBox-Break-Deskriptoren im Header-/Footer-Bereich
- INT32 lcbPlcfHdrtxbxBkd;// 0x02fe
+ sal_Int32 lcbPlcfHdrtxbxBkd;// 0x02fe
// 0x302 - 372 == ignore
/*
ListNames (skip to here!)
*/
WW8_FC fcSttbListNames;// 0x0372 PLCF for Listname Table
- INT32 lcbSttbListNames;// 0x0376
+ sal_Int32 lcbSttbListNames;// 0x0376
WW8_FC fcPlcfTch;
- INT32 lcbPlcfTch;
+ sal_Int32 lcbPlcfTch;
// 0x38A - 41A == ignore
WW8_FC fcAtrdExtra;
- UINT32 lcbAtrdExtra;
+ sal_uInt32 lcbAtrdExtra;
// 0x422 - 0x4D4 == ignore
WW8_FC fcHplxsdr; //bizarrely, word xp seems to require this set to shows dates from AtrdExtra
- UINT32 lcbHplxsdr;
+ sal_uInt32 lcbHplxsdr;
/*
General-Varaiblen, die fuer Ver67 und Ver8 verwendet werden,
obwohl sie in der jeweiligen DATEI verschiedene Groesse haben:
*/
- INT32 pnChpFirst;
- INT32 pnPapFirst;
- INT32 cpnBteChp;
- INT32 cpnBtePap;
+ sal_Int32 pnChpFirst;
+ sal_Int32 pnPapFirst;
+ sal_Int32 cpnBteChp;
+ sal_Int32 cpnBtePap;
/*
The actual nFib, moved here because some readers assumed
they couldn't read any format with nFib > some constant
*/
- UINT16 nFib_actual; // 0x05bc #i56856#
+ sal_uInt16 nFib_actual; // 0x05bc #i56856#
/*
nun wird lediglich noch ein Ctor benoetigt
*/
- WW8Fib( SvStream& rStrm, BYTE nWantedVersion,UINT32 nOffset=0 );
+ WW8Fib( SvStream& rStrm, sal_uInt8 nWantedVersion,sal_uInt32 nOffset=0 );
/* leider falsch, man braucht auch noch einen fuer den Export */
- WW8Fib( BYTE nVersion = 6 );
+ WW8Fib( sal_uInt8 nVersion = 6 );
bool WriteHeader(SvStream& rStrm);
bool Write(SvStream& rStrm);
- static rtl_TextEncoding GetFIBCharset(UINT16 chs);
+ static rtl_TextEncoding GetFIBCharset(sal_uInt16 chs);
ww::WordVersion GetFIBVersion() const;
WW8_CP GetBaseCp(ManTypes nType) const;
sal_Unicode getNumDecimalSep() const;
@@ -1454,21 +1454,21 @@ protected:
long nStyleStart;
long nStyleLen;
- UINT16 cstd; // Count of styles in stylesheet
- UINT16 cbSTDBaseInFile; // Length of STD Base as stored in a file
- UINT16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
- UINT16 : 15; // Spare flags
- UINT16 stiMaxWhenSaved; // Max sti known when file was written
- UINT16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
- UINT16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
+ sal_uInt16 cstd; // Count of styles in stylesheet
+ sal_uInt16 cbSTDBaseInFile; // Length of STD Base as stored in a file
+ sal_uInt16 fStdStylenamesWritten : 1; // Are built-in stylenames stored?
+ sal_uInt16 : 15; // Spare flags
+ sal_uInt16 stiMaxWhenSaved; // Max sti known when file was written
+ sal_uInt16 istdMaxFixedWhenSaved; // How many fixed-index istds are there?
+ sal_uInt16 nVerBuiltInNamesWhenSaved; // Current version of built-in stylenames
// ftc used by StandardChpStsh for this document
- UINT16 ftcAsci;
+ sal_uInt16 ftcAsci;
// CJK ftc used by StandardChpStsh for this document
- UINT16 ftcFE;
+ sal_uInt16 ftcFE;
// CTL/Other ftc used by StandardChpStsh for this document
- UINT16 ftcOther;
+ sal_uInt16 ftcOther;
// CTL ftc used by StandardChpStsh for this document
- UINT16 ftcBi;
+ sal_uInt16 ftcBi;
//No copying
WW8Style(const WW8Style&);
@@ -1477,22 +1477,22 @@ public:
WW8Style( SvStream& rSt, WW8Fib& rFibPara );
WW8_STD* Read1STDFixed( short& rSkip, short* pcbStd );
WW8_STD* Read1Style( short& rSkip, String* pString, short* pcbStd );
- UINT16 GetCount() const { return cstd; }
+ sal_uInt16 GetCount() const { return cstd; }
};
class WW8Fonts
{
protected:
WW8_FFN* pFontA; // Array of Pointers to Font Description
- USHORT nMax; // Array-Size
+ sal_uInt16 nMax; // Array-Size
public:
WW8Fonts( SvStream& rSt, WW8Fib& rFib );
~WW8Fonts() { delete[] pFontA; }
- const WW8_FFN* GetFont( USHORT nNum ) const;
- USHORT GetMax() const { return nMax; }
+ const WW8_FFN* GetFont( sal_uInt16 nNum ) const;
+ sal_uInt16 GetMax() const { return nMax; }
};
-typedef BYTE HdFtFlags;
+typedef sal_uInt8 HdFtFlags;
namespace nsHdFtFlags
{
const HdFtFlags WW8_HEADER_EVEN = 0x01;
@@ -1508,251 +1508,251 @@ class WW8Dop
{
public:
/* Error Status */
- ULONG nDopError;
+ sal_uLong nDopError;
/*
Corresponds only roughly to the actual structure of the Winword DOP,
the winword FIB version matters to what exists.
*/
// Initialisier-Dummy:
- BYTE nDataStart;
+ sal_uInt8 nDataStart;
//-------------------------
- UINT16 fFacingPages : 1; // 1 when facing pages should be printed
- UINT16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
- UINT16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
- UINT16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
- UINT16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
- UINT16 : 1; // 0 unused
+ sal_uInt16 fFacingPages : 1; // 1 when facing pages should be printed
+ sal_uInt16 fWidowControl : 1; // 1 when widow control is in effect. 0 when widow control disabled.
+ sal_uInt16 fPMHMainDoc : 1; // 1 when doc is a main doc for Print Merge Helper, 0 when not; default=0
+ sal_uInt16 grfSuppression : 2; // 0 Default line suppression storage; 0= form letter line suppression; 1= no line suppression; default=0
+ sal_uInt16 fpc : 2; // 1 footnote position code: 0 as endnotes, 1 at bottom of page, 2 immediately beneath text
+ sal_uInt16 : 1; // 0 unused
//-------------------------
- UINT16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
+ sal_uInt16 grpfIhdt : 8; // 0 specification of document headers and footers. See explanation under Headers and Footers topic.
//-------------------------
- UINT16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
- UINT16 nFtn : 14; // 1 initial footnote number for document
- UINT16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
- UINT16 : 7; // reserved
- UINT16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
- UINT16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
- UINT16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
- UINT16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
- UINT16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
- UINT16 fFormNoFields : 1;
- UINT16 fLinkStyles : 1; // when 1, Word will merge styles from its template
- UINT16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
- UINT16 fBackup : 1; // always make backup when document saved when 1.
- UINT16 fExactCWords : 1;
- UINT16 fPagHidden : 1; //
- UINT16 fPagResults : 1;
- UINT16 fLockAtn : 1; // when 1, annotations are locked for editing
- UINT16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
- UINT16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
- UINT16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
- UINT16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
- UINT16 fProtEnabled : 1; // when 1, document is protected from edit operations
- UINT16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
- UINT16 fRMView : 1; // when 1, show revision markings on screen
- UINT16 fRMPrint : 1; // when 1, print revision marks when document is printed
- UINT16 fWriteReservation : 1;
- UINT16 fLockRev : 1; // when 1, the current revision marking state is locked
- UINT16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
+ sal_uInt16 rncFtn : 2; // 0 restart index for footnotes, 0 don't restart note numbering, 1 section, 2 page
+ sal_uInt16 nFtn : 14; // 1 initial footnote number for document
+ sal_uInt16 fOutlineDirtySave : 1; // when 1, indicates that information in the hPLCFpad should be refreshed since outline has been dirtied
+ sal_uInt16 : 7; // reserved
+ sal_uInt16 fOnlyMacPics : 1; // when 1, Word believes all pictures recorded in the document were created on a Macintosh
+ sal_uInt16 fOnlyWinPics : 1; // when 1, Word believes all pictures recorded in the document were created in Windows
+ sal_uInt16 fLabelDoc : 1; // when 1, document was created as a print merge labels document
+ sal_uInt16 fHyphCapitals : 1; // when 1, Word is allowed to hyphenate words that are capitalized. When 0, capitalized may not be hyphenated
+ sal_uInt16 fAutoHyphen : 1; // when 1, Word will hyphenate newly typed text as a background task
+ sal_uInt16 fFormNoFields : 1;
+ sal_uInt16 fLinkStyles : 1; // when 1, Word will merge styles from its template
+ sal_uInt16 fRevMarking : 1; // when 1, Word will mark revisions as the document is edited
+ sal_uInt16 fBackup : 1; // always make backup when document saved when 1.
+ sal_uInt16 fExactCWords : 1;
+ sal_uInt16 fPagHidden : 1; //
+ sal_uInt16 fPagResults : 1;
+ sal_uInt16 fLockAtn : 1; // when 1, annotations are locked for editing
+ sal_uInt16 fMirrorMargins : 1; // swap margins on left/right pages when 1.
+ sal_uInt16 fReadOnlyRecommended : 1;// user has recommended that this doc be opened read-only when 1
+ sal_uInt16 fDfltTrueType : 1; // when 1, use TrueType fonts by default (flag obeyed only when doc was created by WinWord 2.x)
+ sal_uInt16 fPagSuppressTopSpacing : 1;//when 1, file created with SUPPRESSTOPSPACING=YES in win.ini. (flag obeyed only when doc was created by WinWord 2.x).
+ sal_uInt16 fProtEnabled : 1; // when 1, document is protected from edit operations
+ sal_uInt16 fDispFormFldSel : 1;// when 1, restrict selections to occur only within form fields
+ sal_uInt16 fRMView : 1; // when 1, show revision markings on screen
+ sal_uInt16 fRMPrint : 1; // when 1, print revision marks when document is printed
+ sal_uInt16 fWriteReservation : 1;
+ sal_uInt16 fLockRev : 1; // when 1, the current revision marking state is locked
+ sal_uInt16 fEmbedFonts : 1; // when 1, document contains embedded True Type fonts
// compatability options
- UINT16 copts_fNoTabForInd : 1; // when 1, donE½t add automatic tab stops for hanging indent
- UINT16 copts_fNoSpaceRaiseLower : 1; // when 1, donE½t add extra space for raised or lowered characters
- UINT16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
- UINT16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
- UINT16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
- UINT16 copts_fNoColumnBalance : 1; // when 1, donE½t balance columns for Continuous Section starts
- UINT16 copts_fConvMailMergeEsc : 1;
- UINT16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
- UINT16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
- UINT16 copts_fTransparentMetafiles : 1; // when 1, donE½t blank area between metafile pictures
- UINT16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
- UINT16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
- UINT16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
-
- INT16 dxaTab; // 720 twips default tab width
- UINT16 wSpare; //
- UINT16 dxaHotZ; // width of hyphenation hot zone measured in twips
- UINT16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
- UINT16 wSpare2; // reserved
- INT32 dttmCreated; // DTTM date and time document was created
- INT32 dttmRevised; // DTTM date and time document was last revised
- INT32 dttmLastPrint; // DTTM date and time document was last printed
- INT16 nRevision; // number of times document has been revised since its creation
- INT32 tmEdited; // time document was last edited
- INT32 cWords; // count of words tallied by last Word Count execution
- INT32 cCh; // count of characters tallied by last Word Count execution
- INT16 cPg; // count of pages tallied by last Word Count execution
- INT32 cParas; // count of paragraphs tallied by last Word Count execution
- UINT16 rncEdn : 2; // restart endnote number code: 0 donE½t restart endnote numbering, 1 section, 2 page
- UINT16 nEdn : 14; // beginning endnote number
- UINT16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
- // UINT16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ sal_uInt16 copts_fNoTabForInd : 1; // when 1, don�t add automatic tab stops for hanging indent
+ sal_uInt16 copts_fNoSpaceRaiseLower : 1; // when 1, don�t add extra space for raised or lowered characters
+ sal_uInt16 copts_fSupressSpbfAfterPgBrk : 1; // when 1, supress the paragraph Space Before and Space After options after a page break
+ sal_uInt16 copts_fWrapTrailSpaces : 1; // when 1, wrap trailing spaces at the end of a line to the next line
+ sal_uInt16 copts_fMapPrintTextColor : 1; // when 1, print colors as black on non-color printers
+ sal_uInt16 copts_fNoColumnBalance : 1; // when 1, don�t balance columns for Continuous Section starts
+ sal_uInt16 copts_fConvMailMergeEsc : 1;
+ sal_uInt16 copts_fSupressTopSpacing : 1; // when 1, supress extra line spacing at top of page
+ sal_uInt16 copts_fOrigWordTableRules : 1; // when 1, combine table borders like Word 5.x for the Macintosh
+ sal_uInt16 copts_fTransparentMetafiles : 1; // when 1, don�t blank area between metafile pictures
+ sal_uInt16 copts_fShowBreaksInFrames : 1; // when 1, show hard page or column breaks in frames
+ sal_uInt16 copts_fSwapBordersFacingPgs : 1; // when 1, swap left and right pages on odd facing pages
+ sal_uInt16 copts_fExpShRtn : 1; // when 1, expand character spaces on the line ending SHIFT+RETURN // #i56856#
+
+ sal_Int16 dxaTab; // 720 twips default tab width
+ sal_uInt16 wSpare; //
+ sal_uInt16 dxaHotZ; // width of hyphenation hot zone measured in twips
+ sal_uInt16 cConsecHypLim; // number of lines allowed to have consecutive hyphens
+ sal_uInt16 wSpare2; // reserved
+ sal_Int32 dttmCreated; // DTTM date and time document was created
+ sal_Int32 dttmRevised; // DTTM date and time document was last revised
+ sal_Int32 dttmLastPrint; // DTTM date and time document was last printed
+ sal_Int16 nRevision; // number of times document has been revised since its creation
+ sal_Int32 tmEdited; // time document was last edited
+ sal_Int32 cWords; // count of words tallied by last Word Count execution
+ sal_Int32 cCh; // count of characters tallied by last Word Count execution
+ sal_Int16 cPg; // count of pages tallied by last Word Count execution
+ sal_Int32 cParas; // count of paragraphs tallied by last Word Count execution
+ sal_uInt16 rncEdn : 2; // restart endnote number code: 0 don�t restart endnote numbering, 1 section, 2 page
+ sal_uInt16 nEdn : 14; // beginning endnote number
+ sal_uInt16 epc : 2; // endnote position code: 0 at end of section, 3 at end of document
+ // sal_uInt16 nfcFtnRef : 4; // number format code for auto footnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- // UINT16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
+ // sal_uInt16 nfcEdnRef : 4; // number format code for auto endnotes: 0 Arabic, 1 Upper case Roman, 2 Lower case Roman
// 3 Upper case Letter, 4 Lower case Letter
// ersetzt durch gleichlautendes Feld unten
- UINT16 fPrintFormData : 1; // only print data inside of form fields
- UINT16 fSaveFormData : 1; // only save document data that is inside of a form field.
- UINT16 fShadeFormData : 1; // shade form fields
- UINT16 : 2; // reserved
- UINT16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
- INT32 cLines; // count of lines tallied by last Word Count operation
- INT32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
- INT32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
- INT16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
- INT32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
- INT32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
- UINT16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
- UINT16 wScaleSaved : 9; //
- UINT16 zkSaved : 2;
- UINT16 fRotateFontW6 : 1;
- UINT16 iGutterPos : 1 ;
+ sal_uInt16 fPrintFormData : 1; // only print data inside of form fields
+ sal_uInt16 fSaveFormData : 1; // only save document data that is inside of a form field.
+ sal_uInt16 fShadeFormData : 1; // shade form fields
+ sal_uInt16 : 2; // reserved
+ sal_uInt16 fWCFtnEdn : 1; // when 1, include footnotes and endnotes in word count
+ sal_Int32 cLines; // count of lines tallied by last Word Count operation
+ sal_Int32 cWordsFtnEnd; // count of words in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cChFtnEdn; // count of characters in footnotes and endnotes tallied by last Word Count operation
+ sal_Int16 cPgFtnEdn; // count of pages in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cParasFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 cLinesFtnEdn; // count of paragraphs in footnotes and endnotes tallied by last Word Count operation
+ sal_Int32 lKeyProtDoc; // document protection password key, only valid if dop.fProtEnabled, dop.fLockAtn or dop.fLockRev are 1.
+ sal_uInt16 wvkSaved : 3; // document view kind: 0 Normal view, 1 Outline view, 2 Page View
+ sal_uInt16 wScaleSaved : 9; //
+ sal_uInt16 zkSaved : 2;
+ sal_uInt16 fRotateFontW6 : 1;
+ sal_uInt16 iGutterPos : 1 ;
// hier sollte bei nFib < 103 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib >= 103 gehts weiter:
*/
- UINT32 fNoTabForInd :1; // see above in compatability options
- UINT32 fNoSpaceRaiseLower :1; // see above
- UINT32 fSupressSpbfAfterPageBreak :1; // see above
- UINT32 fWrapTrailSpaces :1; // see above
- UINT32 fMapPrintTextColor :1; // see above
- UINT32 fNoColumnBalance :1; // see above
- UINT32 fConvMailMergeEsc :1; // see above
- UINT32 fSupressTopSpacing :1; // see above
- UINT32 fOrigWordTableRules :1; // see above
- UINT32 fTransparentMetafiles :1; // see above
- UINT32 fShowBreaksInFrames :1; // see above
- UINT32 fSwapBordersFacingPgs :1; // see above
- UINT32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
- UINT32 fExpShRtn :1; // #i78591# and #i56856#
- UINT32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
- UINT32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
+ sal_uInt32 fNoTabForInd :1; // see above in compatability options
+ sal_uInt32 fNoSpaceRaiseLower :1; // see above
+ sal_uInt32 fSupressSpbfAfterPageBreak :1; // see above
+ sal_uInt32 fWrapTrailSpaces :1; // see above
+ sal_uInt32 fMapPrintTextColor :1; // see above
+ sal_uInt32 fNoColumnBalance :1; // see above
+ sal_uInt32 fConvMailMergeEsc :1; // see above
+ sal_uInt32 fSupressTopSpacing :1; // see above
+ sal_uInt32 fOrigWordTableRules :1; // see above
+ sal_uInt32 fTransparentMetafiles :1; // see above
+ sal_uInt32 fShowBreaksInFrames :1; // see above
+ sal_uInt32 fSwapBordersFacingPgs :1; // see above
+ sal_uInt32 fCompatabilityOptions_Unknown1_13 :1; // #i78591#
+ sal_uInt32 fExpShRtn :1; // #i78591# and #i56856#
+ sal_uInt32 fCompatabilityOptions_Unknown1_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_16 :1; // #i78591#
+ sal_uInt32 fSuppressTopSpacingMac5 :1; // Suppress extra line spacing at top
// of page like MacWord 5.x
- UINT32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
- UINT32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
- UINT32 fNoLeading :1; // Don't add extra spacebetween rows of text
- UINT32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
- UINT32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
- UINT32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
- UINT32 fUsePrinterMetrics : 1; //The magic option
+ sal_uInt32 fTruncDxaExpand :1; // Expand/Condense by whole number of points
+ sal_uInt32 fPrintBodyBeforeHdr :1; // Print body text before header/footer
+ sal_uInt32 fNoLeading :1; // Don't add extra spacebetween rows of text
+ sal_uInt32 fCompatabilityOptions_Unknown1_21 :1; // #i78591#
+ sal_uInt32 fMWSmallCaps : 1; // Use larger small caps like MacWord 5.x
+ sal_uInt32 fCompatabilityOptions_Unknown1_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown1_31 :1; // #i78591#
+ sal_uInt32 fUsePrinterMetrics : 1; //The magic option
// hier sollte bei nFib <= 105 Schluss sein, sonst ist Datei fehlerhaft!
/*
bei nFib > 105 gehts weiter:
*/
- INT16 adt; // Autoformat Document Type:
+ sal_Int16 adt; // Autoformat Document Type:
// 0 for normal.
// 1 for letter, and
// 2 for email.
WW8DopTypography doptypography; // see WW8STRUC.HXX
WW8_DOGRID dogrid; // see WW8STRUC.HXX
- UINT16 :1; // reserved
- UINT16 lvl :4; // Which outline levels are showing in outline view
- UINT16 :4; // reserved
- UINT16 fHtmlDoc :1; // This file is based upon an HTML file
- UINT16 :1; // reserved
- UINT16 fSnapBorder :1; // Snap table and page borders to page border
- UINT16 fIncludeHeader :1; // Place header inside page border
- UINT16 fIncludeFooter :1; // Place footer inside page border
- UINT16 fForcePageSizePag :1; // Are we in online view
- UINT16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
- UINT16 fHaveVersions :1; // versioning is turned on
- UINT16 fAutoVersion :1; // autoversioning is enabled
- UINT16 : 14; // reserved
+ sal_uInt16 :1; // reserved
+ sal_uInt16 lvl :4; // Which outline levels are showing in outline view
+ sal_uInt16 :4; // reserved
+ sal_uInt16 fHtmlDoc :1; // This file is based upon an HTML file
+ sal_uInt16 :1; // reserved
+ sal_uInt16 fSnapBorder :1; // Snap table and page borders to page border
+ sal_uInt16 fIncludeHeader :1; // Place header inside page border
+ sal_uInt16 fIncludeFooter :1; // Place footer inside page border
+ sal_uInt16 fForcePageSizePag :1; // Are we in online view
+ sal_uInt16 fMinFontSizePag :1; // Are we auto-promoting fonts to >= hpsZoonFontPag?
+ sal_uInt16 fHaveVersions :1; // versioning is turned on
+ sal_uInt16 fAutoVersion :1; // autoversioning is enabled
+ sal_uInt16 : 14; // reserved
// Skip 12 Bytes here: ASUMI
- INT32 cChWS;
- INT32 cChWSFtnEdn;
- INT32 grfDocEvents;
+ sal_Int32 cChWS;
+ sal_Int32 cChWSFtnEdn;
+ sal_Int32 grfDocEvents;
// Skip 4+30+8 Bytes here
- INT32 cDBC;
- INT32 cDBCFtnEdn;
+ sal_Int32 cDBC;
+ sal_Int32 cDBCFtnEdn;
// Skip 4 Bytes here
- INT16 nfcFtnRef;
- INT16 nfcEdnRef;
- INT16 hpsZoonFontPag;
- INT16 dywDispPag;
-
- UINT32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
- UINT32 fDontUseHTMLAutoSpacing:1;
- UINT32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
- UINT32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
-
- UINT16 fUnknown3:15;
- UINT16 fUseBackGroundInAllmodes:1;
-
- UINT16 fDoNotEmbedSystemFont:1;
- UINT16 fWordCompat:1;
- UINT16 fLiveRecover:1;
- UINT16 fEmbedFactoids:1;
- UINT16 fFactoidXML:1;
- UINT16 fFactoidAllDone:1;
- UINT16 fFolioPrint:1;
- UINT16 fReverseFolio:1;
- UINT16 iTextLineEnding:3;
- UINT16 fHideFcc:1;
- UINT16 fAcetateShowMarkup:1;
- UINT16 fAcetateShowAtn:1;
- UINT16 fAcetateShowInsDel:1;
- UINT16 fAcetateShowProps:1;
+ sal_Int16 nfcFtnRef;
+ sal_Int16 nfcEdnRef;
+ sal_Int16 hpsZoonFontPag;
+ sal_Int16 dywDispPag;
+
+ sal_uInt32 fCompatabilityOptions_Unknown2_1 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_2 :1; // #i78591#
+ sal_uInt32 fDontUseHTMLAutoSpacing:1;
+ sal_uInt32 fCompatabilityOptions_Unknown2_4 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_5 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_6 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_7 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_8 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_9 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_10 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_11 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_12 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_13 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_14 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_15 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_16 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_17 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_18 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_19 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_20 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_21 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_22 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_23 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_24 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_25 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_26 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_27 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_28 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_29 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_30 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_31 :1; // #i78591#
+ sal_uInt32 fCompatabilityOptions_Unknown2_32 :1; // #i78591#
+
+ sal_uInt16 fUnknown3:15;
+ sal_uInt16 fUseBackGroundInAllmodes:1;
+
+ sal_uInt16 fDoNotEmbedSystemFont:1;
+ sal_uInt16 fWordCompat:1;
+ sal_uInt16 fLiveRecover:1;
+ sal_uInt16 fEmbedFactoids:1;
+ sal_uInt16 fFactoidXML:1;
+ sal_uInt16 fFactoidAllDone:1;
+ sal_uInt16 fFolioPrint:1;
+ sal_uInt16 fReverseFolio:1;
+ sal_uInt16 iTextLineEnding:3;
+ sal_uInt16 fHideFcc:1;
+ sal_uInt16 fAcetateShowMarkup:1;
+ sal_uInt16 fAcetateShowAtn:1;
+ sal_uInt16 fAcetateShowInsDel:1;
+ sal_uInt16 fAcetateShowProps:1;
// 2. Initialisier-Dummy:
- BYTE nDataEnd;
+ sal_uInt8 nDataEnd;
bool bUseThaiLineBreakingRules;
/* Constructor for importing, needs to know the version of word used */
- WW8Dop(SvStream& rSt, INT16 nFib, INT32 nPos, sal_uInt32 nSize);
+ WW8Dop(SvStream& rSt, sal_Int16 nFib, sal_Int32 nPos, sal_uInt32 nSize);
/* Constructs default DOP suitable for exporting */
WW8Dop();
bool Write(SvStream& rStrm, WW8Fib& rFib) const;
public:
- UINT32 GetCompatabilityOptions() const;
- void SetCompatabilityOptions(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions() const;
+ void SetCompatabilityOptions(sal_uInt32 a32Bit);
// i#78591#
- UINT32 GetCompatabilityOptions2() const;
- void SetCompatabilityOptions2(UINT32 a32Bit);
+ sal_uInt32 GetCompatabilityOptions2() const;
+ void SetCompatabilityOptions2(sal_uInt32 a32Bit);
};
class WW8PLCF_HdFt
@@ -1763,22 +1763,22 @@ private:
short nIdxOffset;
public:
WW8PLCF_HdFt( SvStream* pSt, WW8Fib& rFib, WW8Dop& rDop );
- bool GetTextPos(BYTE grpfIhdt, BYTE nWhich, WW8_CP& rStart, long& rLen);
+ bool GetTextPos(sal_uInt8 grpfIhdt, sal_uInt8 nWhich, WW8_CP& rStart, long& rLen);
bool GetTextPosExact(short nIdx, WW8_CP& rStart, long& rLen);
- void UpdateIndex( BYTE grpfIhdt );
+ void UpdateIndex( sal_uInt8 grpfIhdt );
};
void SwapQuotesInField(String &rFmt);
Word2CHPX ReadWord2Chpx(SvStream &rSt, sal_Size nOffset, sal_uInt8 nSize);
-std::vector<BYTE> ChpxToSprms(const Word2CHPX &rChpx);
+std::vector<sal_uInt8> ChpxToSprms(const Word2CHPX &rChpx);
-ULONG SafeReadString(ByteString &rStr,USHORT nLen,SvStream &rStrm);
+sal_uLong SafeReadString(ByteString &rStr,sal_uInt16 nLen,SvStream &rStrm);
//MS has a (slightly) inaccurate view of how many twips
//are in the default letter size of a page
-const USHORT lLetterWidth = 12242;
-const USHORT lLetterHeight = 15842;
+const sal_uInt16 lLetterWidth = 12242;
+const sal_uInt16 lLetterHeight = 15842;
#endif
diff --git a/sw/source/filter/ww8/ww8struc.hxx b/sw/source/filter/ww8/ww8struc.hxx
index 5d943b80a759..7f2e7ab55ea4 100644
--- a/sw/source/filter/ww8/ww8struc.hxx
+++ b/sw/source/filter/ww8/ww8struc.hxx
@@ -45,19 +45,19 @@
# pragma pack(2)
#endif
-inline void Set_UInt8( BYTE *& p, UINT8 n )
+inline void Set_UInt8( sal_uInt8 *& p, sal_uInt8 n )
{
ByteToSVBT8( n, *(SVBT8*)p );
p+= 1;
}
-inline void Set_UInt16( BYTE *& p, UINT16 n )
+inline void Set_UInt16( sal_uInt8 *& p, sal_uInt16 n )
{
ShortToSVBT16( n, *(SVBT16*)p );
p+= 2;
}
-inline void Set_UInt32( BYTE *& p, UINT32 n )
+inline void Set_UInt32( sal_uInt8 *& p, sal_uInt32 n )
{
UInt32ToSVBT32( n, *(SVBT32*)p );
p+= 4;
@@ -177,26 +177,26 @@ const WW8_CP WW8_CP_MAX = SAL_MAX_INT32;
struct WW8_STD
{
// Base part of STD:
- UINT16 sti : 12; // invariant style identifier
- UINT16 fScratch : 1; // spare field for any temporary use,
+ sal_uInt16 sti : 12; // invariant style identifier
+ sal_uInt16 fScratch : 1; // spare field for any temporary use,
// always reset back to zero!
- UINT16 fInvalHeight : 1; // PHEs of all text with this style are wrong
- UINT16 fHasUpe : 1; // UPEs have been generated
- UINT16 fMassCopy : 1; // std has been mass-copied; if unused at
+ sal_uInt16 fInvalHeight : 1; // PHEs of all text with this style are wrong
+ sal_uInt16 fHasUpe : 1; // UPEs have been generated
+ sal_uInt16 fMassCopy : 1; // std has been mass-copied; if unused at
// save time, style should be deleted
- UINT16 sgc : 4; // style type code
- UINT16 istdBase : 12; // base style
- UINT16 cupx : 4; // # of UPXs (and UPEs)
- UINT16 istdNext : 12; // next style
- UINT16 bchUpe; // offset to end of upx's, start of upe's
+ sal_uInt16 sgc : 4; // style type code
+ sal_uInt16 istdBase : 12; // base style
+ sal_uInt16 cupx : 4; // # of UPXs (and UPEs)
+ sal_uInt16 istdNext : 12; // next style
+ sal_uInt16 bchUpe; // offset to end of upx's, start of upe's
//-------- jetzt neu:
// ab Ver8 gibts zwei Felder mehr:
- UINT16 fAutoRedef : 1; /* auto redefine style when appropriate */
- UINT16 fHidden : 1; /* hidden from UI? */
- UINT16 : 14; /* unused bits */
+ sal_uInt16 fAutoRedef : 1; /* auto redefine style when appropriate */
+ sal_uInt16 fHidden : 1; /* hidden from UI? */
+ sal_uInt16 : 14; /* unused bits */
// Variable length part of STD:
- // UINT8 stzName[2]; /* sub-names are separated by chDelimStyle
+ // sal_uInt8 stzName[2]; /* sub-names are separated by chDelimStyle
// char grupx[];
// the UPEs are not stored on the file; they are a cache of the based-on
// chain
@@ -208,17 +208,17 @@ struct WW8_STD
struct WW8_FFN_BASE // Font Descriptor
{
// ab Ver6
- BYTE cbFfnM1; // 0x0 total length of FFN - 1.
+ sal_uInt8 cbFfnM1; // 0x0 total length of FFN - 1.
- BYTE prg: 2; // 0x1:03 pitch request
- BYTE fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
+ sal_uInt8 prg: 2; // 0x1:03 pitch request
+ sal_uInt8 fTrueType : 1; // 0x1:04 when 1, font is a TrueType font
// 0x1:08 reserved
- BYTE ff : 3; // 0x1:70 font family id
+ sal_uInt8 ff : 3; // 0x1:70 font family id
// 0x1:80 reserved
short wWeight; // 0x2 base weight of font
- BYTE chs; // 0x4 character set identifier
- BYTE ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
+ sal_uInt8 chs; // 0x4 character set identifier
+ sal_uInt8 ibszAlt; // 0x5 index into ffn.szFfn to the name of the alternate font
};
/** Hiermit arbeiten wir im Parser (und Dumper)
@@ -240,14 +240,14 @@ struct WW8_FFN : public WW8_FFN_BASE
struct WW8_BRCVer6 // alter Border Code
{
SVBT16 aBits1;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
};
@@ -256,14 +256,14 @@ class WW8_BRC // Border Code
public:
SVBT16 aBits1;
SVBT16 aBits2;
-// UINT16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
+// sal_uInt16 dxpLineWidth : 3;// 0007 When dxpLineWidth is 0, 1, 2, 3, 4, or 5, this field is the width of
// a single line of border in units of 0.75 points
// Must be nonzero when brcType is nonzero.
// 6 == dotted, 7 == dashed.
-// UINT16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
-// UINT16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
-// UINT16 ico : 5; // 07C0 color code (see chp.ico)
-// UINT16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
+// sal_uInt16 brcType : 2; // 0018 border type code: 0 == none, 1 == single, 2 == thick, 3 == double
+// sal_uInt16 fShadow : 1; // 0020 when 1, border is drawn with shadow. Must be 0 when BRC is a substructure of the TC
+// sal_uInt16 ico : 5; // 07C0 color code (see chp.ico)
+// sal_uInt16 dxpSpace : 5; // F800 width of space to maintain between border and text within border.
// Must be 0 when BRC is a substructure of the TC. Stored in points for Windows.
WW8_BRC()
{
@@ -271,7 +271,7 @@ public:
memset(aBits2, 0, sizeof(aBits2));
}
short DetermineBorderProperties (bool bVer67, short *pSpace=0,
- BYTE *pCol=0, short *pIdx=0) const;
+ sal_uInt8 *pCol=0, short *pIdx=0) const;
bool IsEmpty(bool bVer67) const;
bool IsZeroed(bool bVer67) const;
bool IsBlank() const;
@@ -287,9 +287,9 @@ enum BRC_Sides
class WW8_BordersSO // for StarOffice-Border Code
{
public:
- USHORT mnOut;
- USHORT mnIn;
- USHORT mnDist;
+ sal_uInt16 mnOut;
+ sal_uInt16 mnIn;
+ sal_uInt16 mnDist;
SvxBorderStyle mnType;
public:
enum eBorderCode
@@ -310,24 +310,24 @@ and are accessible through the Typography tab of the Tools/Options dialog.
class WW8DopTypography
{
public:
- void ReadFromMem(BYTE *&pData);
- void WriteToMem(BYTE *&pData) const;
+ void ReadFromMem(sal_uInt8 *&pData);
+ void WriteToMem(sal_uInt8 *&pData) const;
//Maps what I think is the language this is to affect to the OOo language
- USHORT GetConvertedLang() const;
+ sal_uInt16 GetConvertedLang() const;
- UINT16 fKerningPunct : 1; // true if we're kerning punctuation
- UINT16 iJustification : 2; // Kinsoku method of justification:
+ sal_uInt16 fKerningPunct : 1; // true if we're kerning punctuation
+ sal_uInt16 iJustification : 2; // Kinsoku method of justification:
// 0 = always expand
// 1 = compress punctuation
// 2 = compress punctuation and kana.
- UINT16 iLevelOfKinsoku : 2; // Level of Kinsoku:
+ sal_uInt16 iLevelOfKinsoku : 2; // Level of Kinsoku:
// 0 = Level 1
// 1 = Level 2
// 2 = Custom
- UINT16 f2on1 : 1; // 2-page-on-1 feature is turned on.
- UINT16 reserved1 : 4; // in 97 its marked as reserved BUT
- UINT16 reserved2 : 6; // reserved ?
+ sal_uInt16 f2on1 : 1; // 2-page-on-1 feature is turned on.
+ sal_uInt16 reserved1 : 4; // in 97 its marked as reserved BUT
+ sal_uInt16 reserved2 : 6; // reserved ?
//we find that the following applies,
//2 == Japanese
//4 == Chinese (VR...
@@ -342,8 +342,8 @@ public:
static const sal_Unicode * GetJapanNotBeginLevel1();
static const sal_Unicode * GetJapanNotEndLevel1();
- INT16 cchFollowingPunct; // length of rgxchFPunct
- INT16 cchLeadingPunct; // length of rgxchLPunct
+ sal_Int16 cchFollowingPunct; // length of rgxchFPunct
+ sal_Int16 cchLeadingPunct; // length of rgxchLPunct
// array of characters that should never appear at the start of a line
sal_Unicode rgxchFPunct[nMaxFollowing];
@@ -381,39 +381,39 @@ struct WW8_DOGRID
struct WW8_PIC
{
- INT32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
- UINT16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
+ sal_Int32 lcb; // 0x0 number of bytes in the PIC structure plus size of following picture data which may be a Window's metafile, a bitmap, or the filename of a TIFF file.
+ sal_uInt16 cbHeader; // 0x4 number of bytes in the PIC (to allow for future expansion).
struct {
- INT16 mm; // 0x6 int
- INT16 xExt; // 0x8 int
- INT16 yExt; // 0xa int
- INT16 hMF; // 0xc int
+ sal_Int16 mm; // 0x6 int
+ sal_Int16 xExt; // 0x8 int
+ sal_Int16 yExt; // 0xa int
+ sal_Int16 hMF; // 0xc int
}MFP;
-// BYTE bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
- BYTE rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
+// sal_uInt8 bm[14]; // 0xe BITMAP(14 bytes) Window's bitmap structure when PIC describes a BITMAP.
+ sal_uInt8 rcWinMF[14]; // 0xe rc (rectangle - 8 bytes) rect for window origin
// and extents when metafile is stored -- ignored if 0
- INT16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
- INT16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
- UINT16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
- UINT16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
- INT16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
- INT16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
- INT16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
- INT16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
- INT16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
- INT16 fFrameEmpty : 1; // 0010 picture consists of a single frame
- INT16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
- INT16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
- INT16 fError : 1; // 0080 ==1, when picture is just an error message
- INT16 bpp : 8; // FF00 bits per pixel, 0 = unknown
+ sal_Int16 dxaGoal; // 0x1c horizontal measurement in twips of the rectangle the picture should be imaged within.
+ sal_Int16 dyaGoal; // 0x1e vertical measurement in twips of the rectangle the picture should be imaged within.
+ sal_uInt16 mx; // 0x20 horizontal scaling factor supplied by user in .1% units.
+ sal_uInt16 my; // 0x22 vertical scaling factor supplied by user in .1% units.
+ sal_Int16 dxaCropLeft; // 0x24 the amount the picture has been cropped on the left in twips.
+ sal_Int16 dyaCropTop; // 0x26 the amount the picture has been cropped on the top in twips.
+ sal_Int16 dxaCropRight; // 0x28 the amount the picture has been cropped on the right in twips.
+ sal_Int16 dyaCropBottom;// 0x2a the amount the picture has been cropped on the bottom in twips.
+ sal_Int16 brcl : 4; // 000F Obsolete, superseded by brcTop, etc. In
+ sal_Int16 fFrameEmpty : 1; // 0010 picture consists of a single frame
+ sal_Int16 fBitmap : 1; // 0020 ==1, when picture is just a bitmap
+ sal_Int16 fDrawHatch : 1; // 0040 ==1, when picture is an active OLE object
+ sal_Int16 fError : 1; // 0080 ==1, when picture is just an error message
+ sal_Int16 bpp : 8; // FF00 bits per pixel, 0 = unknown
WW8_BRC rgbrc[4];
// BRC brcTop; // 0x2e specification for border above picture
// BRC brcLeft; // 0x30 specification for border to the left
// BRC brcBottom; // 0x32 specification for border below picture
// BRC brcRight; // 0x34 specification for border to the right
- INT16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
- INT16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
-// BYTE rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
+ sal_Int16 dxaOrigin; // 0x36 horizontal offset of hand annotation origin
+ sal_Int16 dyaOrigin; // 0x38 vertical offset of hand annotation origin
+// sal_uInt8 rgb[]; // 0x3a variable array of bytes containing Window's metafile, bitmap or TIFF file filename.
};
struct WW8_PIC_SHADOW
@@ -453,26 +453,26 @@ struct WW8_PIC_SHADOW
struct WW8_TBD
{
SVBT8 aBits1;
-// BYTE jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
-// BYTE tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
+// sal_uInt8 jc : 3; // 0x07 justification code: 0=left tab, 1=centered tab, 2=right tab, 3=decimal tab, 4=bar
+// sal_uInt8 tlc : 3; // 0x38 tab leader code: 0=no leader, 1=dotted leader,
// 2=hyphenated leader, 3=single line leader, 4=heavy line leader
// * int :2 C0 reserved
};
struct WW8_TCell // hiermit wird weitergearbeitet (entspricht weitestgehend dem Ver8-Format)
{
- BYTE bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
- BYTE bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
- BYTE bVertical : 1;// set to 1 when cell has vertical text flow
- BYTE bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
- BYTE bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
- BYTE bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
- BYTE bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
- BYTE nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
+ sal_uInt8 bFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+ sal_uInt8 bMerged : 1;// 0002 set to 1 when cell has been merged with preceding cell.
+ sal_uInt8 bVertical : 1;// set to 1 when cell has vertical text flow
+ sal_uInt8 bBackward : 1;// for a vertical table cell, text flow is bottom to top when 1 and is bottom to top when 0.
+ sal_uInt8 bRotateFont : 1;// set to 1 when cell has rotated characters (i.e. uses @font)
+ sal_uInt8 bVertMerge : 1;// set to 1 when cell is vertically merged with the cell(s) above and/or below. When cells are vertically merged, the display area of the merged cells are consolidated. The consolidated area is used to display the contents of the first vertically merged cell (the cell with fVertRestart set to 1), and all other vertically merged cells (those with fVertRestart set to 0) must be empty. Cells can only be merged vertically if their left and right boundaries are (nearly) identical (i.e. if corresponding entries in rgdxaCenter of the table rows differ by at most 3).
+ sal_uInt8 bVertRestart : 1;// set to 1 when the cell is the first of a set of vertically merged cells. The contents of a cell with fVertStart set to 1 are displayed in the consolidated area belonging to the entire set of vertically merged cells. Vertically merged cells with fVertRestart set to 0 must be empty.
+ sal_uInt8 nVertAlign : 2;// specifies the alignment of the cell contents relative to text flow (e.g. in a cell with bottom to top text flow and bottom vertical alignment, the text is shifted horizontally to match the cell's right boundary):
// 0 top
// 1 center
// 2 bottom
- UINT16 fUnused : 7;// reserved - nicht loeschen: macht das UINT16 voll !!
+ sal_uInt16 fUnused : 7;// reserved - nicht loeschen: macht das sal_uInt16 voll !!
WW8_BRC rgbrc[4]; // border codes
//notational convenience for referring to brcTop, brcLeft, etc fields.
@@ -488,9 +488,9 @@ struct WW8_TCellVer6 // wird aus der Datei gelesen
{
SVBT8 aBits1Ver6;
SVBT8 aBits2Ver6;
-// UINT16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
-// UINT16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
-// UINT16 fUnused : 14; // FFFC reserved
+// sal_uInt16 fFirstMerged : 1;// 0001 set to 1 when cell is first cell of a range of cells that have been merged.
+// sal_uInt16 fMerged : 1; // 0002 set to 1 when cell has been merged with preceding cell.
+// sal_uInt16 fUnused : 14; // FFFC reserved
WW8_BRCVer6 rgbrcVer6[4];
// notational convenience for referring to brcTop, brcLeft, etc fields:
// BRC brcTop; // specification of the top border of a table cell
@@ -512,36 +512,36 @@ struct WW8_TCellVer8 // wird aus der Datei gelesen
struct WW8_SHD // struct SHD fehlt in der Beschreibung
{
private:
- UINT16 maBits;
-// UINT16 nFore : 5; // 0x001f ForegroundColor
-// UINT16 nBack : 5; // 0x03e0 BackgroundColor
-// UINT16 nStyle : 5; // 0x7c00 Percentage and Style
-// UINT16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
+ sal_uInt16 maBits;
+// sal_uInt16 nFore : 5; // 0x001f ForegroundColor
+// sal_uInt16 nBack : 5; // 0x03e0 BackgroundColor
+// sal_uInt16 nStyle : 5; // 0x7c00 Percentage and Style
+// sal_uInt16 nDontKnow : 1; // 0x8000 ??? ab Ver8: ebenfalls fuer Style
public:
WW8_SHD() : maBits(0) {}
- BYTE GetFore() const { return (BYTE)( maBits & 0x1f); }
- BYTE GetBack() const { return (BYTE)((maBits >> 5 ) & 0x1f); }
- BYTE GetStyle(bool bVer67) const
- { return (BYTE)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
+ sal_uInt8 GetFore() const { return (sal_uInt8)( maBits & 0x1f); }
+ sal_uInt8 GetBack() const { return (sal_uInt8)((maBits >> 5 ) & 0x1f); }
+ sal_uInt8 GetStyle(bool bVer67) const
+ { return (sal_uInt8)((maBits >> 10) & ( bVer67 ? 0x1f : 0x3f ) ); }
- UINT16 GetValue() const { return maBits; }
+ sal_uInt16 GetValue() const { return maBits; }
- void SetValue(UINT16 nVal) { maBits = nVal; }
+ void SetValue(sal_uInt16 nVal) { maBits = nVal; }
void SetWWValue(SVBT16 nVal) { maBits = SVBT16ToShort(nVal); }
- void SetFore(BYTE nVal)
+ void SetFore(sal_uInt8 nVal)
{
maBits &= 0xffe0;
maBits |= (nVal & 0x1f);
}
- void SetBack(BYTE nVal)
+ void SetBack(sal_uInt8 nVal)
{
maBits &= 0xfc1f;
maBits |= (nVal & 0x1f) << 5;
}
- void SetStyle(bool bVer67, BYTE nVal)
+ void SetStyle(bool bVer67, sal_uInt8 nVal)
{
if (bVer67)
{
@@ -563,29 +563,29 @@ struct WW8_ANLV
SVBT8 cbTextBefore; // 1 offset into anld.rgch limit of prefix text
SVBT8 cbTextAfter; // 2
SVBT8 aBits1;
-// BYTE jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
-// BYTE fPrev : 1; // 0x04 when ==1, include previous levels
-// BYTE fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
-// BYTE fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
-// BYTE fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
-// BYTE fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
-// BYTE fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
+// sal_uInt8 jc : 2; // 3 : 0x03 justification code, 0=left, 1=center, 2=right, 3=left and right justify
+// sal_uInt8 fPrev : 1; // 0x04 when ==1, include previous levels
+// sal_uInt8 fHang : 1; // 0x08 when ==1, number will be displayed using a hanging indent
+// sal_uInt8 fSetBold : 1; // 0x10 when ==1, boldness of number will be determined by anld.fBold.
+// sal_uInt8 fSetItalic : 1;// 0x20 when ==1, italicness of number will be determined by anld.fItalic
+// sal_uInt8 fSetSmallCaps : 1;// 0x40 when ==1, anld.fSmallCaps will determine whether number will be displayed in small caps or not.
+// sal_uInt8 fSetCaps : 1; // 0x80 when ==1, anld.fCaps will determine whether number will be displayed capitalized or not
SVBT8 aBits2;
-// BYTE fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
-// BYTE fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
-// BYTE fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
-// BYTE fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
-// BYTE fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
-// BYTE fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
-// BYTE fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
-// BYTE fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
+// sal_uInt8 fSetStrike : 1;// 4 : 0x01 when ==1, anld.fStrike will determine whether the number will be displayed using strikethrough or not.
+// sal_uInt8 fSetKul : 1; // 0x02 when ==1, anld.kul will determine the underlining state of the autonumber.
+// sal_uInt8 fPrevSpace : 1;// 0x04 when ==1, autonumber will be displayed with a single prefixing space character
+// sal_uInt8 fBold : 1; // 0x08 determines boldness of autonumber when anld.fSetBold == 1.
+// sal_uInt8 fItalic : 1; // 0x10 determines italicness of autonumber when anld.fSetItalic == 1.
+// sal_uInt8 fSmallCaps : 1;// 0x20 determines whether autonumber will be displayed using small caps when anld.fSetSmallCaps == 1.
+// sal_uInt8 fCaps : 1; // 0x40 determines whether autonumber will be displayed using caps when anld.fSetCaps == 1.
+// sal_uInt8 fStrike : 1; // 0x80 determines whether autonumber will be displayed using caps when anld.fSetStrike == 1.
SVBT8 aBits3;
-// BYTE kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
-// BYTE ico : 5; // 0xF1 color of autonumber
+// sal_uInt8 kul : 3; // 5 : 0x07 determines whether autonumber will be displayed with underlining when anld.fSetKul == 1.
+// sal_uInt8 ico : 5; // 0xF1 color of autonumber
SVBT16 ftc; // 6 font code of autonumber
SVBT16 hps; // 8 font half point size (or 0=auto)
SVBT16 iStartAt; // 0x0a starting value (0 to 65535)
- SVBT16 dxaIndent; // 0x0c *short?* *USHORT?* width of prefix text (same as indent)
+ SVBT16 dxaIndent; // 0x0c *short?* *sal_uInt16?* width of prefix text (same as indent)
SVBT16 dxaSpace; // 0x0e minimum space between number and paragraph
};
// *cbANLV (count of bytes of ANLV) is 16 (decimal), 10(hex).
@@ -597,7 +597,7 @@ struct WW8_ANLD
SVBT8 fNumberAcross; // 0x11 number across cells in table rows(instead of down)
SVBT8 fRestartHdn; // 0x12 restart heading number on section boundary
SVBT8 fSpareX; // 0x13 unused( should be 0)
- BYTE rgchAnld[32]; // 0x14 characters displayed before/after autonumber
+ sal_uInt8 rgchAnld[32]; // 0x14 characters displayed before/after autonumber
};
struct WW8_OLST
@@ -607,7 +607,7 @@ struct WW8_OLST
SVBT8 fSpareOlst2; // 0x91 reserved
SVBT8 fSpareOlst3; // 0x92 reserved
SVBT8 fSpareOlst4; // 0x93 reserved
- BYTE rgch[64]; // 0x94 array of 64 chars text before/after number
+ sal_uInt8 rgch[64]; // 0x94 array of 64 chars text before/after number
};
// cbOLST is 212(decimal), D4(hex).
@@ -625,8 +625,8 @@ struct WW8_DO
SVBT8 by; // 5 y position relative to anchor CP
SVBT16 dhgt; // 6 height of DO
SVBT16 aBits1;
-// UINT16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
-// BYTE[] rgdp; // 0xa variable length array of drawing primitives
+// sal_uInt16 fAnchorLock : 1; // 8 1 if the DO anchor is locked
+// sal_uInt8[] rgdp; // 0xa variable length array of drawing primitives
};
struct WW8_DPHEAD
@@ -668,16 +668,16 @@ struct WW8_DP_FILL
struct WW8_DP_LINEEND
{
SVBT16 aStartBits;
-// UINT16 eppsStart : 2; // Start EndPoint Property Style
+// sal_uInt16 eppsStart : 2; // Start EndPoint Property Style
// 0=None, 1=Hollow, 2=Filled
-// UINT16 eppwStart : 2; // Start EndPoint Property Weight
-// UINT16 epplStart : 2; // Start EndPoint Property length
-// UINT16 dummyStart : 10; // Alignment
+// sal_uInt16 eppwStart : 2; // Start EndPoint Property Weight
+// sal_uInt16 epplStart : 2; // Start EndPoint Property length
+// sal_uInt16 dummyStart : 10; // Alignment
SVBT16 aEndBits;
-// UINT16 eppsEnd : 2; // End EndPoint Property Style
-// UINT16 eppwEnd : 2; // End EndPoint Property Weight
-// UINT16 epplEnd : 2; // End EndPoint Property length
-// UINT16 dummyEnd : 10; // Alignment
+// sal_uInt16 eppsEnd : 2; // End EndPoint Property Style
+// sal_uInt16 eppwEnd : 2; // End EndPoint Property Weight
+// sal_uInt16 epplEnd : 2; // End EndPoint Property length
+// sal_uInt16 dummyEnd : 10; // Alignment
};
struct WW8_DP_LINE
@@ -698,8 +698,8 @@ struct WW8_DP_TXTBOX
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; //0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
SVBT16 dzaInternalMargin; // 0x26 REVIEW davebu
};
@@ -709,8 +709,8 @@ struct WW8_DP_RECT
WW8_DP_FILL aFill;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
-// UINT16 zaShape : 15; // 0x24 000e REVIEW davebu
+// sal_uInt16 fRoundCorners : 1; // 0x24 0001 1 if the textbox has rounded corners
+// sal_uInt16 zaShape : 15; // 0x24 000e REVIEW davebu
};
struct WW8_DP_ARC
@@ -720,8 +720,8 @@ struct WW8_DP_ARC
WW8_DP_SHADOW aShd;
SVBT8 fLeft; // 0x24 00ff REVIEW davebu
SVBT8 fUp; // 0x24 ff00 REVIEW davebu
-// UINT16 fLeft : 8; // 0x24 00ff REVIEW davebu
-// UINT16 fUp : 8; // 0x24 ff00 REVIEW davebu
+// sal_uInt16 fLeft : 8; // 0x24 00ff REVIEW davebu
+// sal_uInt16 fUp : 8; // 0x24 ff00 REVIEW davebu
};
struct WW8_DP_ELIPSE
@@ -738,8 +738,8 @@ struct WW8_DP_POLYLINE
WW8_DP_LINEEND aEpp;
WW8_DP_SHADOW aShd;
SVBT16 aBits1;
-// UINT16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
-// UINT16 cpt : 15; // 0x28 00fe count of points
+// sal_uInt16 fPolygon : 1; // 0x28 0001 1 if this is a polygon
+// sal_uInt16 cpt : 15; // 0x28 00fe count of points
// short xaFirst; // 0x2a These are the endpoints of the first line.
// short yaFirst; // 0x2c
// short xaEnd; // 0x2e
@@ -762,9 +762,9 @@ struct WW8_DP_CALLOUT_TXTBOX
struct WW8_PCD
{
SVBT8 aBits1;
-// BYTE fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
-// BYTE fPaphNil : 1; // used internally by Word
-// BYTE fCopied : 1; // used internally by Word
+// sal_uInt8 fNoParaLast : 1; // when 1, means that piece contains no end of paragraph marks.
+// sal_uInt8 fPaphNil : 1; // used internally by Word
+// sal_uInt8 fCopied : 1; // used internally by Word
// * int :5
SVBT8 aBits2; // fn int:8, used internally by Word
SVBT32 fc; // file offset of beginning of piece. The size of the
@@ -815,14 +815,14 @@ struct WW67_ATRD // fuer die 6/7-Version
struct WW8_TablePos
{
- INT16 nSp26;
- INT16 nSp27;
- INT16 nLeMgn;
- INT16 nRiMgn;
- INT16 nUpMgn;
- INT16 nLoMgn;
- BYTE nSp29;
- BYTE nSp37;
+ sal_Int16 nSp26;
+ sal_Int16 nSp27;
+ sal_Int16 nLeMgn;
+ sal_Int16 nRiMgn;
+ sal_Int16 nUpMgn;
+ sal_Int16 nLoMgn;
+ sal_uInt8 nSp29;
+ sal_uInt8 nSp37;
};
struct WW8_FSPA
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 73cb7f33016f..cc72fa62eb26 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -668,8 +668,8 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// create redline (using pRedlineData which gets copied in SwRedline())
SwRedlineData* pRedlineData = ConvertRedline(pRedlineInfo, pDoc);
SwRedline* pRedline =
- new SwRedline( pRedlineData, *aPaM.GetPoint(), TRUE,
- !pRedlineInfo->bMergeLastParagraph, FALSE );
+ new SwRedline( pRedlineData, *aPaM.GetPoint(), sal_True,
+ !pRedlineInfo->bMergeLastParagraph, sal_False );
// set mark
if( aPaM.HasMark() )
@@ -681,7 +681,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// set content node (if necessary)
if (NULL != pRedlineInfo->pContentIndex)
{
- ULONG nPoint = aPaM.GetPoint()->nNode.GetIndex();
+ sal_uLong nPoint = aPaM.GetPoint()->nNode.GetIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
nPoint > pRedlineInfo->pContentIndex->GetNode().EndOfSectionIndex() )
pRedline->SetContentIdx(pRedlineInfo->pContentIndex);
diff --git a/sw/source/filter/xml/makefile.mk b/sw/source/filter/xml/makefile.mk
deleted file mode 100644
index 10a653fc7ac0..000000000000
--- a/sw/source/filter/xml/makefile.mk
+++ /dev/null
@@ -1,76 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2000, 2010 Oracle and/or its affiliates.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# This file is part of OpenOffice.org.
-#
-# OpenOffice.org is free software: you can redistribute it and/or modify
-# it under the terms of the GNU Lesser General Public License version 3
-# only, as published by the Free Software Foundation.
-#
-# OpenOffice.org is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU Lesser General Public License version 3 for more details
-# (a copy is included in the LICENSE file that accompanied this code).
-#
-# You should have received a copy of the GNU Lesser General Public License
-# version 3 along with OpenOffice.org. If not, see
-# <http://www.openoffice.org/license.html>
-# for a copy of the LGPLv3 License.
-#
-#*************************************************************************
-
-PRJ=..$/..$/..
-
-PRJNAME=sw
-TARGET=xml
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : $(PRJ)$/inc$/swpre.mk
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/inc$/sw.mk
-
-.IF "$(mydebug)" != ""
-CDEFS=$(CDEFS) -Dmydebug
-.ENDIF
-
-# --- Files --------------------------------------------------------
-
-SLOFILES = \
- $(EXCEPTIONSFILES) \
- $(SLO)$/xmlimpit.obj \
- $(SLO)$/xmlitemm.obj \
- $(SLO)$/xmlitmpr.obj
-
-EXCEPTIONSFILES= \
- $(SLO)$/XMLRedlineImportHelper.obj \
- $(SLO)$/swxml.obj \
- $(SLO)$/wrtxml.obj \
- $(SLO)$/xmlbrsh.obj \
- $(SLO)$/xmlexp.obj \
- $(SLO)$/xmlexpit.obj \
- $(SLO)$/xmlfmt.obj \
- $(SLO)$/xmlfmte.obj \
- $(SLO)$/xmlfonte.obj \
- $(SLO)$/xmlimp.obj \
- $(SLO)$/xmlitem.obj \
- $(SLO)$/xmliteme.obj \
- $(SLO)$/xmlitemi.obj \
- $(SLO)$/xmlithlp.obj \
- $(SLO)$/xmlmeta.obj \
- $(SLO)$/xmlscript.obj \
- $(SLO)$/xmltble.obj \
- $(SLO)$/xmltbli.obj \
- $(SLO)$/xmltext.obj \
- $(SLO)$/xmltexte.obj \
- $(SLO)$/xmltexti.obj
-
-# --- Targets -------------------------------------------------------
-
-.INCLUDE : target.mk
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index 55879a146d0c..17a026c8bddb 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -115,8 +115,8 @@ void lcl_EnsureValidPam( SwPaM& rPam )
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetCntntNode( FALSE ) == NULL ) ||
- ( rPam.GetCntntNode( FALSE ) != rPam.GetMark()->nContent.GetIdxReg() ) )
+ if( ( rPam.GetCntntNode( sal_False ) == NULL ) ||
+ ( rPam.GetCntntNode( sal_False ) != rPam.GetMark()->nContent.GetIdxReg() ) )
{
rPam.DeleteMark();
}
@@ -410,7 +410,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
String aDefOutlStyleNames[ MAXLEVEL ];
{
String sStyleName;
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
sStyleName =
SwStyleNameMapper::GetProgName( static_cast< sal_uInt16 >(RES_POOLCOLL_HEADLINE1 + i),
@@ -425,7 +425,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
SwTxtFmtColl* aCreatedDefaultOutlineStyles[ MAXLEVEL ];
{
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
aOutlineLevelAssigned[ i ] = false;
aCreatedDefaultOutlineStyles[ i ] = 0L;
@@ -435,7 +435,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// determine, which outline level has already a style assigned and
// which of the default outline styles is created.
const SwTxtFmtColls& rColls = *(_rDoc.GetTxtFmtColls());
- for ( USHORT n = 1; n < rColls.Count(); ++n )
+ for ( sal_uInt16 n = 1; n < rColls.Count(); ++n )
{
SwTxtFmtColl* pColl = rColls[ n ];
if ( pColl->IsAssignedToListLevelOfOutlineStyle() )
@@ -443,7 +443,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
aOutlineLevelAssigned[ pColl->GetAssignedOutlineStyleLevel() ] = true;//<-end,zhaojianwei
}
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
if ( aCreatedDefaultOutlineStyles[ i ] == 0L &&
pColl->GetName() == aDefOutlStyleNames[i] )
@@ -457,7 +457,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// assign already created default outline style to outline level, which
// doesn't have a style assigned to it.
const SwNumRule* pOutlineRule = _rDoc.GetOutlineNumRule();
- for ( BYTE i = 0; i < MAXLEVEL; ++i )
+ for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
// #i73361#
// Do not change assignment of already created default outline style
@@ -472,7 +472,7 @@ void lcl_AdjustOutlineStylesForOOo( SwDoc& _rDoc )
// apply outline numbering rule, if none is set.
const SfxPoolItem& rItem =
- aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, FALSE );
+ aCreatedDefaultOutlineStyles[ i ]->GetFmtAttr( RES_PARATR_NUMRULE, sal_False );
if ( static_cast<const SwNumRuleItem&>(rItem).GetValue().Len() == 0 )
{
SwNumRuleItem aItem( pOutlineRule->GetName() );
@@ -523,7 +523,7 @@ void lcl_ConvertSdrOle2ObjsToSdrGrafObjs( SwDoc& _rDoc )
}
-ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
+sal_uLong XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const String & rName )
{
// Get service factory
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
@@ -655,7 +655,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Note: Text documents read via the binary filter are also finally
// read using the OpenOffice.org file format. Thus, e.g. for text
// documents in StarOffice 5.2 binary file format this property
- // will be TRUE.
+ // will be sal_True.
{ "TextDocInOOoFileFormat", sizeof("TextDocInOOoFileFormat")-1, 0,
&::getBooleanCppuType(),
beans::PropertyAttribute::MAYBEVOID, 0 },
@@ -964,9 +964,9 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// Notify math objects
if( bInsertMode )
- rDoc.PrtOLENotify( FALSE );
+ rDoc.PrtOLENotify( sal_False );
else if ( rDoc.IsOLEPrtNotifyPending() )
- rDoc.PrtOLENotify( TRUE );
+ rDoc.PrtOLENotify( sal_True );
nRet = nRet ? nRet : (nWarn ? nWarn : (nWarn2 ? nWarn2 : nWarnRDF ) );
@@ -1023,7 +1023,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// <--
// Fix #i58251#: Unfortunately is the static default different to SO7 behaviour,
// so we have to set a dynamic default after importing SO7
- rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, FALSE ) );
+ rDoc.SetDefault( SfxBoolItem( RES_ROW_SPLIT, sal_False ) );
}
// <--
@@ -1066,7 +1066,7 @@ ULONG XMLReader::Read( SwDoc &rDoc, const String& rBaseURL, SwPaM &rPaM, const S
// read the sections of the document, which is equal to the medium.
// returns the count of it
-USHORT XMLReader::GetSectionList( SfxMedium& rMedium,
+sal_uInt16 XMLReader::GetSectionList( SfxMedium& rMedium,
SvStrings& rStrings ) const
{
uno::Reference< lang::XMultiServiceFactory > xServiceFactory =
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index 86441a44e85f..a6bbc52d92ad 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -507,17 +507,17 @@ pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
return 0;
}
-ULONG SwXMLWriter::WriteStorage()
+sal_uLong SwXMLWriter::WriteStorage()
{
return _Write();
}
-ULONG SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
+sal_uLong SwXMLWriter::WriteMedium( SfxMedium& aTargetMedium )
{
return _Write( &aTargetMedium );
}
-ULONG SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
+sal_uLong SwXMLWriter::Write( SwPaM& rPaM, SfxMedium& rMed,
const String* pFileName )
{
return IsStgWriter()
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index a622d59a362d..b53b952db616 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -53,15 +53,15 @@ class SwXMLWriter : public StgWriter
using StgWriter::Write;
protected:
- virtual ULONG WriteStorage();
- virtual ULONG WriteMedium( SfxMedium& aTargetMedium );
+ virtual sal_uLong WriteStorage();
+ virtual sal_uLong WriteMedium( SfxMedium& aTargetMedium );
public:
SwXMLWriter( const String& rBaseURL );
virtual ~SwXMLWriter();
- virtual ULONG Write( SwPaM&, SfxMedium&, const String* = 0 );
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const String* = 0 );
private:
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 84ba81b868f5..ad314a6a1177 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -240,10 +240,10 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
for( sal_uInt16 j=0; j < nWhichIds; j++ )
{
sal_uInt16 nWhichId = aWhichIds[j];
- sal_uInt16 i=0, nItems = rPool.GetItemCount( nWhichId );
+ sal_uInt32 i=0, nItems = rPool.GetItemCount2( nWhichId );
for( i = 0; i < nItems; ++i )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId , i ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId , i ) ) )
{
const SvXMLAttrContainerItem *pUnknown =
PTR_CAST( SvXMLAttrContainerItem, pItem );
diff --git a/sw/source/filter/xml/xmlexp.hxx b/sw/source/filter/xml/xmlexp.hxx
index eb4a92e7bc05..779cdbfbf602 100644
--- a/sw/source/filter/xml/xmlexp.hxx
+++ b/sw/source/filter/xml/xmlexp.hxx
@@ -103,7 +103,7 @@ class SwXMLExport : public SvXMLExport
SwXMLTableInfo_Impl& rTblInfo );
void ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows = 0 );
+ sal_uInt16 nHeaderRows = 0 );
virtual void _ExportMeta();
virtual void _ExportFontDecls();
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index ea9ec6b3d404..222a388615b0 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -81,10 +81,10 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
Add( rFont.GetFamilyName(), rFont.GetStyleName(),
static_cast< sal_uInt16 >(rFont.GetFamily()), static_cast< sal_uInt16 >(rFont.GetPitch()),
rFont.GetCharSet() );
- sal_uInt16 nItems = rPool.GetItemCount( nWhichId );
- for( sal_uInt16 j = 0; j < nItems; ++j )
+ sal_uInt32 nItems = rPool.GetItemCount2( nWhichId );
+ for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem( nWhichId, j ) ) )
+ if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont =
(const SvxFontItem *)pItem;
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index 8574fdb697fc..e39b227a2fb7 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -869,7 +869,7 @@ void SwXMLImport::endDocument( void )
if( !pPos->nContent.GetIndex() )
{
SwTxtNode* pCurrNd;
- ULONG nNodeIdx = pPos->nNode.GetIndex();
+ sal_uLong nNodeIdx = pPos->nNode.GetIndex();
pDoc = pPaM->GetDoc();
DBG_ASSERT( pPos->nNode.GetNode().IsCntntNode(),
@@ -944,9 +944,9 @@ void SwXMLImport::endDocument( void )
// Notify math objects. If we are in the package filter this will
// be done by the filter object itself
if( IsInsertMode() )
- pDoc->PrtOLENotify( FALSE );
+ pDoc->PrtOLENotify( sal_False );
else if ( pDoc->IsOLEPrtNotifyPending() )
- pDoc->PrtOLENotify( TRUE );
+ pDoc->PrtOLENotify( sal_True );
}
// SJ: #i49801# -> now permitting repaints
@@ -1194,7 +1194,7 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
const PropertyValue* pValues = aConfigProps.getConstArray();
SvtSaveOptions aSaveOpt;
- BOOL bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
+ sal_Bool bIsUserSetting = aSaveOpt.IsLoadUserSettings(),
bSet = bIsUserSetting;
// for some properties we don't want to use the application
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 1dd8295293b3..889902f6a3a2 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -67,7 +67,7 @@ using uno::Any;
SvXMLImportItemMapper::SvXMLImportItemMapper(
SvXMLItemMapEntriesRef rMapEntries,
- USHORT nUnknWhich ) :
+ sal_uInt16 nUnknWhich ) :
mrMapEntries( rMapEntries ),
nUnknownWhich( nUnknWhich )
{
@@ -83,14 +83,14 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap ) const
{
- INT16 nAttr = xAttrList->getLength();
+ sal_Int16 nAttr = xAttrList->getLength();
SvXMLAttrContainerItem *pUnknownItem = 0;
- for( INT16 i=0; i < nAttr; i++ )
+ for( sal_Int16 i=0; i < nAttr; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
OUString aLocalName, aPrefix, aNamespace;
- USHORT nPrefix =
+ sal_uInt16 nPrefix =
rNamespaceMap.GetKeyByAttrName( rAttrName, &aPrefix, &aLocalName,
&aNamespace );
if( XML_NAMESPACE_XMLNS == nPrefix )
@@ -109,7 +109,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
// first get item from itemset
const SfxPoolItem* pItem = 0;
- SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, TRUE,
+ SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, sal_True,
&pItem );
// if its not set, try the pool
@@ -120,7 +120,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if(eState >= SFX_ITEM_DEFAULT && pItem)
{
SfxPoolItem *pNewItem = pItem->Clone();
- BOOL bPut = FALSE;
+ sal_Bool bPut = sal_False;
if( 0 == (pEntry->nMemberId&MID_SW_FLAG_SPECIAL_ITEM_IMPORT) )
{
@@ -157,7 +157,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
if( !pUnknownItem )
{
const SfxPoolItem* pItem = 0;
- if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, TRUE,
+ if( SFX_ITEM_SET == rSet.GetItemState( nUnknownWhich, sal_True,
&pItem ) )
{
SfxPoolItem *pNew = pItem->Clone();
@@ -194,7 +194,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
-BOOL
+sal_Bool
SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxPoolItem& /*rItem*/,
SfxItemSet& /*rSet*/,
@@ -203,19 +203,19 @@ SvXMLImportItemMapper::handleSpecialItem( const SvXMLItemMapEntry& /*rEntry*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
OSL_FAIL( "unsuported special item in xml import" );
- return FALSE;
+ return sal_False;
}
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
-BOOL SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
+sal_Bool SvXMLImportItemMapper::handleNoItem( const SvXMLItemMapEntry& /*rEntry*/,
SfxItemSet& /*rSet*/,
const OUString& /*rValue*/,
const SvXMLUnitConverter& /*rUnitConverter*/,
const SvXMLNamespaceMap& /*rNamespaceMap*/ ) const
{
OSL_FAIL( "unsuported no item in xml import" );
- return FALSE;
+ return sal_False;
}
void SvXMLImportItemMapper::finished( SfxItemSet& ) const
@@ -389,7 +389,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
if( nX < 0 ) nX *= -1;
if( nY < 0 ) nY *= -1;
- pShadow->SetWidth( static_cast< USHORT >( (nX + nY) >> 1 ) );
+ pShadow->SetWidth( static_cast< sal_uInt16 >( (nX + nY) >> 1 ) );
}
}
}
@@ -594,12 +594,12 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
switch( nMemberId )
{
case MID_BREAK_BEFORE:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_BEFORE :
SVX_BREAK_PAGE_BEFORE) );
break;
case MID_BREAK_AFTER:
- pFmtBreak->SetValue( static_cast< USHORT >((eEnum == 1) ?
+ pFmtBreak->SetValue( static_cast< sal_uInt16 >((eEnum == 1) ?
SVX_BREAK_COLUMN_AFTER :
SVX_BREAK_PAGE_AFTER) );
break;
@@ -781,7 +781,7 @@ sal_Bool SvXMLImportItemMapper::PutXMLValue(
sal_Int32 nVal;
bOk = rUnitConverter.convertNumber( nVal, rValue, 0, USHRT_MAX );
if( bOk )
- pPageDesc->SetNumOffset( (USHORT)nVal );
+ pPageDesc->SetNumOffset( (sal_uInt16)nVal );
}
}
break;
diff --git a/sw/source/filter/xml/xmlimpit.hxx b/sw/source/filter/xml/xmlimpit.hxx
index 0734dbbf67bc..578084ee972a 100644
--- a/sw/source/filter/xml/xmlimpit.hxx
+++ b/sw/source/filter/xml/xmlimpit.hxx
@@ -48,11 +48,11 @@ class SvXMLImportItemMapper
{
protected:
SvXMLItemMapEntriesRef mrMapEntries;
- USHORT nUnknownWhich;
+ sal_uInt16 nUnknownWhich;
public:
SvXMLImportItemMapper( SvXMLItemMapEntriesRef rMapEntries ,
- USHORT nUnknWhich=USHRT_MAX );
+ sal_uInt16 nUnknWhich=USHRT_MAX );
virtual ~SvXMLImportItemMapper();
/** fills the given itemset with the attributes in the given list */
@@ -63,7 +63,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_SPECIAL_ITEM_IMPORT flag set */
- virtual BOOL handleSpecialItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleSpecialItem( const SvXMLItemMapEntry& rEntry,
SfxPoolItem& rItem,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
@@ -72,7 +72,7 @@ public:
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_IMPORT flag set */
- virtual BOOL handleNoItem( const SvXMLItemMapEntry& rEntry,
+ virtual sal_Bool handleNoItem( const SvXMLItemMapEntry& rEntry,
SfxItemSet& rSet,
const ::rtl::OUString& rValue,
const SvXMLUnitConverter& rUnitConverter,
diff --git a/sw/source/filter/xml/xmlitem.cxx b/sw/source/filter/xml/xmlitem.cxx
index ff5dc27764d1..d2c41d380cdd 100644
--- a/sw/source/filter/xml/xmlitem.cxx
+++ b/sw/source/filter/xml/xmlitem.cxx
@@ -36,7 +36,7 @@
using ::rtl::OUString;
using namespace ::com::sun::star;
-SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, USHORT nPrfx,
+SvXMLItemSetContext::SvXMLItemSetContext( SvXMLImport& rImp, sal_uInt16 nPrfx,
const OUString& rLName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rISet,
@@ -56,7 +56,7 @@ SvXMLItemSetContext::~SvXMLItemSetContext()
{
}
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& xAttrList )
{
@@ -78,7 +78,7 @@ SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
CreateChildContext if the element matches an entry in the
SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT
*/
-SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( USHORT nPrefix,
+SvXMLImportContext *SvXMLItemSetContext::CreateChildContext( sal_uInt16 nPrefix,
const rtl::OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList >& /*xAttrList*/,
SfxItemSet& /*rItemSet*/,
diff --git a/sw/source/filter/xml/xmlitem.hxx b/sw/source/filter/xml/xmlitem.hxx
index 1922f2238b39..a47f73e06bb1 100644
--- a/sw/source/filter/xml/xmlitem.hxx
+++ b/sw/source/filter/xml/xmlitem.hxx
@@ -50,7 +50,7 @@ protected:
public:
- SvXMLItemSetContext( SvXMLImport& rImport, USHORT nPrfx,
+ SvXMLItemSetContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
const ::rtl::OUString& rLName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
@@ -59,14 +59,14 @@ public:
virtual ~SvXMLItemSetContext();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList );
// This method is called from this instance implementation of
// CreateChildContext if the element matches an entry in the
// SvXMLImportItemMapper with the mid flag MID_SW_FLAG_ELEMENT_ITEM_IMPORT
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::com::sun::star::uno::Reference< ::com::sun::star::xml::sax::XAttributeList >& xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 50aeb43359c3..1f38c952459e 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -41,7 +41,7 @@
#include "xmlbrshe.hxx"
#include <editeng/tstpitem.hxx>
#include <editeng/brshitem.hxx>
-#include <vcl/fldunit.hxx>
+#include <tools/fldunit.hxx>
#include <swmodule.hxx>
#include <doc.hxx>
#include "fmtornt.hxx"
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index dab975c48901..c875453e97f1 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -139,7 +139,7 @@ public:
const SvXMLUnitConverter& rUnitConv );
virtual ~SwXMLItemSetContext_Impl();
- virtual SvXMLImportContext *CreateChildContext( USHORT nPrefix,
+ virtual SvXMLImportContext *CreateChildContext( sal_uInt16 nPrefix,
const ::rtl::OUString& rLocalName,
const ::uno::Reference< xml::sax::XAttributeList > & xAttrList,
SfxItemSet& rItemSet,
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index c0edce67c1bf..27c66e9b5640 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -80,12 +80,12 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
return (pMap->eLocalName != XML_TOKEN_INVALID) ? pMap : NULL;
}
-SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( UINT16 nIndex ) const
+SvXMLItemMapEntry* SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
{
return &mpImpl->mpEntries[nIndex];
}
-UINT16 SvXMLItemMapEntries::getCount() const
+sal_uInt16 SvXMLItemMapEntries::getCount() const
{
return mpImpl->mnCount;
}
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 2ada7c1a25e0..92c743518cb6 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -100,8 +100,8 @@ enum SvXMLTokenMapAttrs
struct statistic {
SvXMLTokenMapAttrs token;
const char* name;
- USHORT SwDocStat::* target16;
- ULONG SwDocStat::* target32; /* or 64, on LP64 platforms */
+ sal_uInt16 SwDocStat::* target16;
+ sal_uLong SwDocStat::* target32; /* or 64, on LP64 platforms */
};
static const struct statistic s_stats [] = {
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index d3d1647c6fda..0205783d4611 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -83,7 +83,7 @@ class SwXMLTableColumn_Impl : public SwWriteTableCol
public:
- SwXMLTableColumn_Impl( sal_uInt16 nPosition ) :
+ SwXMLTableColumn_Impl( sal_uInt32 nPosition ) :
SwWriteTableCol( nPosition ),
nRelWidth( 0UL )
{};
@@ -138,7 +138,7 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
nWidth( 0UL )
{
#if OSL_DEBUG_LEVEL > 1
- sal_uInt16 nEndCPos = 0U;
+ sal_uInt32 nEndCPos = 0U;
#endif
sal_uInt16 nLines = rLines.Count();
sal_uInt16 nLine;
@@ -148,14 +148,14 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
const SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U || nWidth==0UL )
{
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
SwXMLTableColumn_Impl *pCol =
new SwXMLTableColumn_Impl( nCPos );
@@ -172,16 +172,16 @@ SwXMLTableLines_Impl::SwXMLTableLines_Impl( const SwTableLines& rLines ) :
else
{
#if OSL_DEBUG_LEVEL > 1
- sal_uInt16 nCheckPos =
- nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ sal_uInt32 nCheckPos =
+ nCPos + SwWriteTable::GetBoxWidth( pBox );
if( !nEndCPos )
{
nEndCPos = nCheckPos;
}
#endif
- nCPos = (sal_uInt16)nWidth;
+ nCPos = nWidth;
#if OSL_DEBUG_LEVEL > 1
- SwXMLTableColumn_Impl aCol( (sal_uInt16)nWidth );
+ SwXMLTableColumn_Impl aCol( nWidth );
OSL_ENSURE( aCols.Seek_Entry(&aCol), "couldn't find last column" );
OSL_ENSURE( SwXMLTableColumn_Impl(nCheckPos) ==
SwXMLTableColumn_Impl(nCPos),
@@ -593,13 +593,13 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
// pass 2: export column styles
{
const SwXMLTableColumns_Impl& rCols = pLines->GetColumns();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nColumns = rCols.Count();
for( sal_uInt16 nColumn=0U; nColumn<nColumns; nColumn++ )
{
SwXMLTableColumn_Impl *pColumn = rCols[nColumn];
- sal_uInt16 nOldCPos = nCPos;
+ sal_uInt32 nOldCPos = nCPos;
nCPos = pColumn->GetPos();
sal_uInt32 nWidth = nCPos - nOldCPos;
@@ -625,10 +625,10 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
nColAbsWidth += (nBaseWidth/2UL);
nColAbsWidth /= nBaseWidth;
}
- pColumn->SetWidthOpt( (sal_uInt16)nColAbsWidth, sal_False );
+ pColumn->SetWidthOpt( nColAbsWidth, sal_False );
}
- ULONG nExpPos = 0;
+ sal_uLong nExpPos = 0;
if( rExpCols.Seek_Entry( pColumn, &nExpPos ) )
{
pColumn->SetStyleName(
@@ -669,16 +669,16 @@ void SwXMLExport::ExportTableLinesAutoStyles( const SwTableLines& rLines,
const SwTableBoxes& rBoxes = pLine->GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
SwTableBox *pBox = rBoxes[nBox];
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)pLines->GetWidth();
+ nCPos = pLines->GetWidth();
// Und ihren Index
@@ -951,7 +951,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
const SwTableBoxes& rBoxes = rLine.GetTabBoxes();
sal_uInt16 nBoxes = rBoxes.Count();
- sal_uInt16 nCPos = 0U;
+ sal_uInt32 nCPos = 0U;
sal_uInt16 nCol = 0U;
for( sal_uInt16 nBox=0U; nBox<nBoxes; nBox++ )
{
@@ -967,9 +967,9 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
}
if( nBox < nBoxes-1U )
- nCPos = nCPos + (sal_uInt16)SwWriteTable::GetBoxWidth( pBox );
+ nCPos = nCPos + SwWriteTable::GetBoxWidth( pBox );
else
- nCPos = (sal_uInt16)rLines.GetWidth();
+ nCPos = rLines.GetWidth();
// Und ihren Index
const sal_uInt16 nOldCol = nCol;
@@ -1018,7 +1018,7 @@ void SwXMLExport::ExportTableLine( const SwTableLine& rLine,
void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
SwXMLTableInfo_Impl& rTblInfo,
- USHORT nHeaderRows )
+ sal_uInt16 nHeaderRows )
{
OSL_ENSURE( pTableLines && !pTableLines->empty(),
"SwXMLExport::ExportTableLines: table columns infos missing" );
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index d438fc7862df..9f8b2501d557 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -1540,7 +1540,7 @@ void SwXMLTableContext::InsertColumn( sal_Int32 nWidth2, sal_Bool bRelWidth2,
if( !pColumnDefaultCellStyleNames )
{
pColumnDefaultCellStyleNames = new SvStringsDtor;
- ULONG nCount = aColumnWidths.size() - 1;
+ sal_uLong nCount = aColumnWidths.size() - 1;
while( nCount-- )
pColumnDefaultCellStyleNames->Insert( new String,
pColumnDefaultCellStyleNames->Count() );
@@ -2100,7 +2100,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
{
// default num format?
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt2->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwTblBoxNumFormat* pNumFormat =
@@ -2155,7 +2155,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// Solution: the number format will be removed,
// the cell gets the default text format.
const SfxPoolItem* pItem = NULL;
- if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, FALSE, &pItem )
+ if( pBoxFmt->GetItemState( RES_BOXATR_FORMAT, sal_False, &pItem )
== SFX_ITEM_SET )
{
const SwDoc* pDoc = pBoxFmt->GetDoc();
@@ -2413,14 +2413,14 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
{
SwXMLTableRow_Impl *pPrevRow = (*pRows)[(sal_uInt16)nCurRow-1U];
SwXMLTableCell_Impl *pCell;
- for( ULONG i = 0; i < aColumnWidths.size(); ++i )
+ for( sal_uLong i = 0; i < aColumnWidths.size(); ++i )
{
if( ( pCell=pPrevRow->GetCell(i), pCell->GetRowSpan() > 1UL ) )
{
FixRowSpan( nCurRow-1UL, i, 1UL );
}
}
- for( ULONG i = pRows->Count()-1UL; i>=nCurRow; --i )
+ for( sal_uLong i = pRows->Count()-1UL; i>=nCurRow; --i )
pRows->DeleteAndDestroy( (sal_uInt16)i );
}
@@ -2498,7 +2498,7 @@ void SwXMLTableContext::_MakeTable( SwTableBox *pBox )
for( colIter = aColumnWidths.begin(); colIter < aColumnWidths.end() - 1; ++colIter)
{
sal_Int32 nW = (sal_Int32)( colIter->width * n);
- colIter->width = (USHORT)nW;
+ colIter->width = (sal_uInt16)nW;
nRelWidth += nW;
}
aColumnWidths.back().width = (nWidth-nRelWidth);
@@ -2825,10 +2825,10 @@ void SwXMLTableContext::MakeTable()
// 3) create new DDE table, and
SwDDETable* pDDETable = new SwDDETable( pTableNode->GetTable(),
- pFldType, FALSE );
+ pFldType, sal_False );
// 4) set new (DDE)table at node.
- pTableNode->SetNewTable(pDDETable, FALSE);
+ pTableNode->SetNewTable(pDDETable, sal_False);
}
// ??? this is always false: root frame is only created in ViewShell::Init
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index de228de07398..4d6d2cfc88e7 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -70,9 +70,9 @@ class SwXMLTableContext : public XMLTextTableContext
//! Holds basic information about a column's width.
struct ColumnWidthInfo {
- USHORT width; //!< Column width (absolute or relative).
+ sal_uInt16 width; //!< Column width (absolute or relative).
bool isRelative; //!< True for a relative width, false for absolute.
- inline ColumnWidthInfo(USHORT wdth, bool isRel) : width(wdth), isRelative(isRel) {};
+ inline ColumnWidthInfo(sal_uInt16 wdth, bool isRel) : width(wdth), isRelative(isRel) {};
};
std::vector<ColumnWidthInfo> aColumnWidths;
SvStringsDtor *pColumnDefaultCellStyleNames;
@@ -105,7 +105,7 @@ class SwXMLTableContext : public XMLTextTableContext
sal_Bool bRelWidth : 1;
sal_Bool bHasSubTables : 1;
- USHORT nHeaderRows;
+ sal_uInt16 nHeaderRows;
sal_uInt32 nCurRow;
sal_uInt32 nCurCol;
sal_Int32 nWidth;
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index 57e54974a1cb..b99f10ad9365 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -594,7 +594,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr2;
@@ -690,7 +690,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, TRUE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_True );
if (SWHTML_OPTTYPE_PARAM == nType2 || SWHTML_OPTTYPE_SIZE == nType2 )
{
::rtl::OUString aStr;
@@ -716,7 +716,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
while ( i > 0 )
{
beans::PropertyValue& aProp = aProps[--i];
- USHORT nType2 = SwApplet_Impl::GetOptionType( aProp.Name, FALSE );
+ sal_uInt16 nType2 = SwApplet_Impl::GetOptionType( aProp.Name, sal_False );
if ( nType2 == SWHTML_OPTTYPE_TAG)
{
::rtl::OUString aStr;