summaryrefslogtreecommitdiff
path: root/svtools/source/svhtml
diff options
context:
space:
mode:
Diffstat (limited to 'svtools/source/svhtml')
-rw-r--r--svtools/source/svhtml/htmlkywd.cxx26
-rw-r--r--svtools/source/svhtml/htmlout.cxx34
-rw-r--r--svtools/source/svhtml/htmlsupp.cxx14
-rw-r--r--svtools/source/svhtml/makefile.mk51
-rw-r--r--svtools/source/svhtml/parhtml.cxx306
5 files changed, 190 insertions, 241 deletions
diff --git a/svtools/source/svhtml/htmlkywd.cxx b/svtools/source/svhtml/htmlkywd.cxx
index e1631efc84b9..412140f9a3f5 100644
--- a/svtools/source/svhtml/htmlkywd.cxx
+++ b/svtools/source/svhtml/htmlkywd.cxx
@@ -35,8 +35,8 @@
#include <limits.h>
#include <svtools/svparser.hxx>
-#include "htmlkywd.hxx"
-#include "htmltokn.h"
+#include <svtools/htmlkywd.hxx>
+#include <svtools/htmltokn.h>
// die Tabelle muss noch sortiert werden
struct HTML_TokenEntry
@@ -50,7 +50,7 @@ struct HTML_TokenEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int bSortKeyWords = FALSE;
+static int bSortKeyWords = sal_False;
static HTML_TokenEntry aHTMLTokenTab[] = {
{{OOO_STRING_SVTOOLS_HTML_area}, HTML_AREA}, // Netscape 2.0
@@ -245,7 +245,7 @@ int GetHTMLToken( const String& rName )
sizeof( aHTMLTokenTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortKeyWords = TRUE;
+ bSortKeyWords = sal_True;
}
int nRet = 0;
@@ -280,7 +280,7 @@ struct HTML_CharEntry
};
// Flag: RTF-Token Tabelle wurde schon sortiert
-static int bSortCharKeyWords = FALSE;
+static int bSortCharKeyWords = sal_False;
static HTML_CharEntry aHTMLCharNameTab[] = {
{{OOO_STRING_SVTOOLS_HTML_C_lt}, 60},
@@ -600,7 +600,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
sizeof( aHTMLCharNameTab ) / sizeof( HTML_CharEntry ),
sizeof( HTML_CharEntry ),
HTMLCharNameCompare );
- bSortCharKeyWords = TRUE;
+ bSortCharKeyWords = sal_True;
}
sal_Unicode cRet = 0;
@@ -621,7 +621,7 @@ sal_Unicode GetHTMLCharName( const String& rName )
/* */
// Flag: Optionen-Tabelle wurde schon sortiert
-static int bSortOptionKeyWords = FALSE;
+static int bSortOptionKeyWords = sal_False;
static HTML_TokenEntry aHTMLOptionTab[] = {
@@ -833,7 +833,7 @@ int GetHTMLOption( const String& rName )
sizeof( aHTMLOptionTab ) / sizeof( HTML_TokenEntry ),
sizeof( HTML_TokenEntry ),
HTMLKeyCompare );
- bSortOptionKeyWords = TRUE;
+ bSortOptionKeyWords = sal_True;
}
int nRet = HTML_O_UNKNOWN;
@@ -861,10 +861,10 @@ struct HTML_ColorEntry
const sal_Char* sName;
const String *pUName;
};
- ULONG nColor;
+ sal_uLong nColor;
};
-static int bSortColorKeyWords = FALSE;
+static int bSortColorKeyWords = sal_False;
#define HTML_NO_COLOR 0xffffffffUL
@@ -1053,7 +1053,7 @@ static int
}
-ULONG GetHTMLColor( const String& rName )
+sal_uLong GetHTMLColor( const String& rName )
{
if( !bSortColorKeyWords )
{
@@ -1061,10 +1061,10 @@ ULONG GetHTMLColor( const String& rName )
sizeof( aHTMLColorNameTab ) / sizeof( HTML_ColorEntry ),
sizeof( HTML_ColorEntry ),
HTMLColorNameCompare );
- bSortColorKeyWords = TRUE;
+ bSortColorKeyWords = sal_True;
}
- ULONG nRet = ULONG_MAX;
+ sal_uLong nRet = ULONG_MAX;
void* pFound;
HTML_ColorEntry aSrch;
aSrch.pUName = &rName;
diff --git a/svtools/source/svhtml/htmlout.cxx b/svtools/source/svhtml/htmlout.cxx
index 29a142e88151..31e60e1ab1a1 100644
--- a/svtools/source/svhtml/htmlout.cxx
+++ b/svtools/source/svhtml/htmlout.cxx
@@ -37,7 +37,7 @@
#include <svl/zforlist.hxx>
#include <svtools/htmlout.hxx>
-#include "htmlkywd.hxx"
+#include <svtools/htmlkywd.hxx>
#include <svtools/imap.hxx>
#include <svtools/imaprect.hxx>
#include <svtools/imapcirc.hxx>
@@ -529,7 +529,7 @@ void HTMLOutFuncs::ConvertStringToHTML( const String& rSrc,
}
SvStream& HTMLOutFuncs::Out_AsciiTag( SvStream& rStream, const sal_Char *pStr,
- BOOL bOn, rtl_TextEncoding )
+ sal_Bool bOn, rtl_TextEncoding )
{
sal_Char sStt[3] = "</";
if( bOn )
@@ -570,7 +570,7 @@ SvStream& HTMLOutFuncs::FlushToAscii( SvStream& rStream,
return rStream;
}
-SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
+SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, sal_uLong nHex, sal_uInt8 nLen,
rtl_TextEncoding )
{ // in einen Stream aus
sal_Char aNToABuf[] = "0000000000000000";
@@ -581,7 +581,7 @@ SvStream& HTMLOutFuncs::Out_Hex( SvStream& rStream, ULONG nHex, BYTE nLen,
// Pointer an das Bufferende setzen
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' )
@@ -616,7 +616,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
const ImageMap& rIMap,
const String& rName,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
const sal_Char *pDelim,
const sal_Char *pIndentArea,
const sal_Char *pIndentMap,
@@ -641,7 +641,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
Out_String( rStream, rOutName, eDestEnc, pNonConvertableChars );
rStream << "\">";
- for( USHORT i=0U; i<rIMap.GetIMapObjectCount(); i++ )
+ for( sal_uInt16 i=0U; i<rIMap.GetIMapObjectCount(); i++ )
{
const IMapObject* pObj = rIMap.GetIMapObject( i );
DBG_ASSERT( pObj, "Wo ist das ImageMap-Object?" );
@@ -684,7 +684,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
(const IMapPolygonObject *)pObj;
pShape= OOO_STRING_SVTOOLS_HTML_SH_poly;
Polygon aPoly( pPolyObj->GetPolygon() );
- USHORT nCount = aPoly.GetSize();
+ sal_uInt16 nCount = aPoly.GetSize();
if( nCount>0 )
{
const Point& rPoint = aPoly[0];
@@ -692,7 +692,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
ByteString::CreateFromInt32(rPoint.X())) += ',')
+= ByteString::CreateFromInt32(rPoint.Y());
}
- for( USHORT j=1; j<nCount; j++ )
+ for( sal_uInt16 j=1; j<nCount; j++ )
{
const Point& rPoint = aPoly[j];
(((aCoords += ',')
@@ -772,7 +772,7 @@ SvStream& HTMLOutFuncs::Out_ImageMap( SvStream& rStream,
rStream << pDelim;
if( pIndentMap )
rStream << pIndentMap;
- Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, FALSE );
+ Out_AsciiTag( rStream, OOO_STRING_SVTOOLS_HTML_map, sal_False );
return rStream;
}
@@ -886,7 +886,7 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
}
}
- HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, FALSE );
+ HTMLOutFuncs::Out_AsciiTag( rStrm, OOO_STRING_SVTOOLS_HTML_script, sal_False );
return rStrm;
}
@@ -895,11 +895,11 @@ SvStream& HTMLOutFuncs::OutScript( SvStream& rStrm,
SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
const SvxMacroTableDtor& rMacroTable,
const HTMLOutEvent *pEventTable,
- BOOL bOutStarBasic,
+ sal_Bool bOutStarBasic,
rtl_TextEncoding eDestEnc,
String *pNonConvertableChars )
{
- USHORT i=0;
+ sal_uInt16 i=0;
while( pEventTable[i].pBasicName || pEventTable[i].pJavaName )
{
const SvxMacro *pMacro =
@@ -928,8 +928,8 @@ SvStream& HTMLOutFuncs::Out_Events( SvStream& rStrm,
}
ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
- BOOL bValue,
- double fVal, ULONG nFormat, SvNumberFormatter& rFormatter,
+ sal_Bool bValue,
+ double fVal, sal_uLong nFormat, SvNumberFormatter& rFormatter,
rtl_TextEncoding eDestEnc, String* pNonConvertableChars )
{
if ( bValue )
@@ -966,16 +966,16 @@ ByteString& HTMLOutFuncs::CreateTableDataOptionsValNum( ByteString& aStrTD,
return aStrTD;
}
-BOOL HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
+sal_Bool HTMLOutFuncs::PrivateURLToInternalImg( String& rURL )
{
if( rURL.Len() > 14UL &&
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_private_image, 14UL ) == COMPARE_EQUAL )
{
rURL.Erase( 0UL, 14UL );
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
diff --git a/svtools/source/svhtml/htmlsupp.cxx b/svtools/source/svhtml/htmlsupp.cxx
index cfb0fca37e11..76f49e7d0558 100644
--- a/svtools/source/svhtml/htmlsupp.cxx
+++ b/svtools/source/svhtml/htmlsupp.cxx
@@ -38,8 +38,8 @@
#endif
#include <svtools/parhtml.hxx>
-#include "htmltokn.h"
-#include "htmlkywd.hxx"
+#include <svtools/htmltokn.h>
+#include <svtools/htmlkywd.hxx>
/* */
@@ -57,7 +57,7 @@ static HTMLOptionEnum const aScriptLangOptEnums[] =
{ 0, 0 }
};
-BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
+sal_Bool HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL,
HTMLScriptLanguage& rLang,
String& rSrc,
String& rLibrary,
@@ -71,7 +71,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
rLibrary.Erase();
rModule.Erase();
- for( USHORT i = pScriptOptions->Count(); i; )
+ for( sal_uInt16 i = pScriptOptions->Count(); i; )
{
const HTMLOption *pOption = (*pScriptOptions)[ --i ];
switch( pOption->GetToken() )
@@ -79,7 +79,7 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
case HTML_O_LANGUAGE:
{
rLangString = pOption->GetString();
- USHORT nLang;
+ sal_uInt16 nLang;
if( pOption->GetEnum( nLang, aScriptLangOptEnums ) )
rLang = (HTMLScriptLanguage)nLang;
else
@@ -100,10 +100,10 @@ BOOL HTMLParser::ParseScriptOptions( String& rLangString, const String& rBaseURL
}
}
- return TRUE;
+ return sal_True;
}
-void HTMLParser::RemoveSGMLComment( String &rString, BOOL bFull )
+void HTMLParser::RemoveSGMLComment( String &rString, sal_Bool bFull )
{
sal_Unicode c = 0;
while( rString.Len() &&
diff --git a/svtools/source/svhtml/makefile.mk b/svtools/source/svhtml/makefile.mk
deleted file mode 100644
index 7a8552f2b672..000000000000
--- a/svtools/source/svhtml/makefile.mk
+++ /dev/null
@@ -1,51 +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=svtools
-TARGET=svhtml
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/svt.pmk
-
-# --- Files --------------------------------------------------------
-
-SLOFILES=\
- $(SLO)$/htmlkywd.obj \
- $(SLO)$/htmlsupp.obj \
- $(SLO)$/htmlout.obj \
- $(SLO)$/parhtml.obj
-
-# ==========================================================================
-
-.INCLUDE : target.mk
-
diff --git a/svtools/source/svhtml/parhtml.cxx b/svtools/source/svhtml/parhtml.cxx
index dc3f593c6729..dbaae52db17e 100644
--- a/svtools/source/svhtml/parhtml.cxx
+++ b/svtools/source/svhtml/parhtml.cxx
@@ -49,8 +49,8 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <svtools/parhtml.hxx>
-#include "htmltokn.h"
-#include "htmlkywd.hxx"
+#include <svtools/htmltokn.h>
+#include <svtools/htmlkywd.hxx>
using namespace ::com::sun::star;
@@ -115,9 +115,9 @@ SV_IMPL_PTRARR(HTMLOptions,HTMLOptionPtr)
/* */
-USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) const
+sal_uInt16 HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, sal_uInt16 nDflt ) const
{
- USHORT nValue = nDflt;
+ sal_uInt16 nValue = nDflt;
while( pOptEnums->pName )
if( aValue.EqualsIgnoreCaseAscii( pOptEnums->pName ) )
@@ -131,7 +131,7 @@ USHORT HTMLOption::GetEnum( const HTMLOptionEnum *pOptEnums, USHORT nDflt ) cons
return nValue;
}
-BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
+sal_Bool HTMLOption::GetEnum( sal_uInt16 &rEnum, const HTMLOptionEnum *pOptEnums ) const
{
while( pOptEnums->pName )
{
@@ -148,7 +148,7 @@ BOOL HTMLOption::GetEnum( USHORT &rEnum, const HTMLOptionEnum *pOptEnums ) const
return (pName != 0);
}
-HTMLOption::HTMLOption( USHORT nTok, const String& rToken,
+HTMLOption::HTMLOption( sal_uInt16 nTok, const String& rToken,
const String& rValue )
: aValue(rValue)
, aToken(rToken)
@@ -172,7 +172,7 @@ sal_uInt32 HTMLOption::GetNumber() const
return nTmp >= 0 ? (sal_uInt32)nTmp : 0;
}
-INT32 HTMLOption::GetSNumber() const
+sal_Int32 HTMLOption::GetSNumber() const
{
DBG_ASSERT( (nToken>=HTML_OPTION_NUMBER_START && nToken<HTML_OPTION_NUMBER_END) ||
(nToken>=HTML_OPTION_CONTEXT_START && nToken<HTML_OPTION_CONTEXT_END),
@@ -191,8 +191,8 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const
{
// das ist ein sehr stark vereinfachter Scanner. Er sucht einfach
// alle Tiffern aus dem String
- BOOL bInNum = FALSE;
- ULONG nNum = 0;
+ sal_Bool bInNum = sal_False;
+ sal_uLong nNum = 0;
for( xub_StrLen i=0; i<aValue.Len(); i++ )
{
register sal_Unicode c = aValue.GetChar( i );
@@ -200,12 +200,12 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const
{
nNum *= 10;
nNum += (c - '0');
- bInNum = TRUE;
+ bInNum = sal_True;
}
else if( bInNum )
{
rLongs.Insert( nNum, rLongs.Count() );
- bInNum = FALSE;
+ bInNum = sal_False;
nNum = 0;
}
}
@@ -228,7 +228,7 @@ void HTMLOption::GetNumbers( SvULongs &rLongs, sal_Bool bSpaceDelim ) const
nPos++;
if( nPos==aValue.Len() )
- rLongs.Insert( ULONG(0), rLongs.Count() );
+ rLongs.Insert( sal_uLong(0), rLongs.Count() );
else
{
xub_StrLen nEnd = aValue.Search( (sal_Unicode)',', nPos );
@@ -259,7 +259,7 @@ void HTMLOption::GetColor( Color& rColor ) const
String aTmp( aValue );
aTmp.ToUpperAscii();
- ULONG nColor = ULONG_MAX;
+ sal_uLong nColor = ULONG_MAX;
if( '#'!=aTmp.GetChar( 0 ) )
nColor = GetHTMLColor( aTmp );
@@ -289,9 +289,9 @@ void HTMLOption::GetColor( Color& rColor ) const
}
}
- rColor.SetRed( (BYTE)((nColor & 0x00ff0000) >> 16) );
- rColor.SetGreen( (BYTE)((nColor & 0x0000ff00) >> 8));
- rColor.SetBlue( (BYTE)(nColor & 0x000000ff) );
+ rColor.SetRed( (sal_uInt8)((nColor & 0x00ff0000) >> 16) );
+ rColor.SetGreen( (sal_uInt8)((nColor & 0x0000ff00) >> 8));
+ rColor.SetBlue( (sal_uInt8)(nColor & 0x000000ff) );
}
HTMLInputType HTMLOption::GetInputType() const
@@ -321,8 +321,8 @@ HTMLParser::HTMLParser( SvStream& rIn, int bReadNewDoc )
bReadListing = bReadXMP = bReadPRE = bReadTextArea =
bReadScript = bReadStyle =
bEndTokenFound = bIsInBody = bReadNextChar =
- bReadComment = FALSE;
- bIsInHeader = TRUE;
+ bReadComment = sal_False;
+ bIsInHeader = sal_True;
pOptions = new HTMLOptions;
//#i76649, default to UTF-8 for HTML unless we know differently
@@ -343,7 +343,7 @@ SvParserState HTMLParser::CallParser()
SaveState( 0 );
nPre_LinePos = 0;
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
AddRef();
Continue( 0 );
@@ -382,24 +382,24 @@ int HTMLParser::FilterToken( int nToken )
break; // nicht verschicken
case HTML_HEAD_OFF:
- bIsInBody = TRUE;
+ bIsInBody = sal_True;
case HTML_HEAD_ON:
bIsInHeader = HTML_HEAD_ON == nToken;
break;
case HTML_BODY_ON:
case HTML_FRAMESET_ON:
- bIsInHeader = FALSE;
+ bIsInHeader = sal_False;
bIsInBody = HTML_BODY_ON == nToken;
break;
case HTML_BODY_OFF:
- bIsInBody = bReadPRE = bReadListing = bReadXMP = FALSE;
+ bIsInBody = bReadPRE = bReadListing = bReadXMP = sal_False;
break;
case HTML_HTML_OFF:
nToken = 0;
- bReadPRE = bReadListing = bReadXMP = FALSE;
+ bReadPRE = bReadListing = bReadXMP = sal_False;
break; // HTML_ON wurde auch nicht verschickt !
case HTML_PREFORMTXT_ON:
@@ -450,23 +450,23 @@ int HTMLParser::FilterToken( int nToken )
int HTMLParser::ScanText( const sal_Unicode cBreak )
{
::rtl::OUStringBuffer sTmpBuffer( MAX_LEN );
- int bWeiter = TRUE;
- int bEqSignFound = FALSE;
+ int bWeiter = sal_True;
+ int bEqSignFound = sal_False;
sal_Unicode cQuote = 0U;
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '&':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( bReadXMP )
sTmpBuffer.append( (sal_Unicode)'&' );
else
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLinePos = GetLinePos();
sal_Unicode cChar = 0U;
if( '#' == (nNextCh = GetNextChar()) )
@@ -544,7 +544,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( 0U == cChar && ';' != nNextCh )
{
DBG_ASSERT( rInput.Tell() - nStreamPos ==
- (ULONG)(nPos+1L)*GetCharSize(),
+ (sal_uLong)(nPos+1L)*GetCharSize(),
"UTF-8 geht hier schief" );
for( xub_StrLen i=nPos-1L; i>1L; i-- )
{
@@ -574,10 +574,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -619,10 +619,10 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// rInput.SeekRel( -(long)(++nPos*GetCharSize()) );
// nlLinePos -= nPos;
DBG_ASSERT( rInput.Tell()-nStreamPos ==
- (ULONG)(nPos+1)*GetCharSize(),
+ (sal_uLong)(nPos+1)*GetCharSize(),
"Falsche Stream-Position" );
DBG_ASSERT( nlLinePos-nLinePos ==
- (ULONG)(nPos+1),
+ (sal_uLong)(nPos+1),
"Falsche Zeilen-Position" );
rInput.Seek( nStreamPos );
nlLinePos = nLinePos;
@@ -654,7 +654,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else if( IsParserWorking() )
{
sTmpBuffer.append( (sal_Unicode)'&' );
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
@@ -691,15 +691,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
rInput.Seek( nStreamPos-(sal_uInt32)GetCharSize() );
nlLinePos = nLinePos-1;
ClearTxtConvContext();
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
case '=':
if( '>'==cBreak && !cQuote )
- bEqSignFound = TRUE;
+ bEqSignFound = sal_True;
sTmpBuffer.append( nNextCh );
break;
@@ -724,7 +724,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
cQuote = 0U;
}
sTmpBuffer.append( nNextCh );
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
break;
case sal_Unicode(EOF):
@@ -734,7 +734,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
// abc&auml;<EOF> nicht angezeigt, also lassen wir das in Zukunft.
// if( '>' != cBreak )
// eState = SVPAR_ACCEPTED;
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
else
{
@@ -743,11 +743,11 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
break;
case '<':
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( '>'==cBreak )
sTmpBuffer.append( nNextCh );
else
- bWeiter = FALSE; // Abbrechen, String zusammen
+ bWeiter = sal_False; // Abbrechen, String zusammen
break;
case '\f':
@@ -759,7 +759,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
else
{
// sonst wird es ein eigenes Token
- bWeiter = FALSE;
+ bWeiter = sal_False;
}
break;
@@ -773,7 +773,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
}
else if( bReadListing || bReadXMP || bReadPRE || bReadTextArea )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// Bug 18984: CR-LF -> Blank
@@ -783,7 +783,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( '\t'==nNextCh && bReadPRE && '>'!=cBreak )
{
// In <PRE>: Tabs nach oben durchreichen
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
// kein break
@@ -820,15 +820,15 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
} while ( ' ' == nNextCh || '\t' == nNextCh ||
'\r' == nNextCh || '\n' == nNextCh ||
'\x0b' == nNextCh );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
default:
- bEqSignFound = FALSE;
+ bEqSignFound = sal_False;
if( (nNextCh==cBreak && !cQuote) ||
- (ULONG(aToken.Len()) + MAX_LEN) > ULONG(STRING_MAXLEN & ~1 ))
- bWeiter = FALSE;
+ (sal_uLong(aToken.Len()) + MAX_LEN) > sal_uLong(STRING_MAXLEN & ~1 ))
+ bWeiter = sal_False;
else
{
do {
@@ -837,8 +837,8 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
if( MAX_LEN == sTmpBuffer.getLength() )
{
aToken += String(sTmpBuffer.makeStringAndClear());
- if( (ULONG(aToken.Len()) + MAX_LEN) >
- ULONG(STRING_MAXLEN & ~1 ) )
+ if( (sal_uLong(aToken.Len()) + MAX_LEN) >
+ sal_uLong(STRING_MAXLEN & ~1 ) )
{
nNextCh = GetNextChar();
return HTML_TEXTTOKEN;
@@ -853,7 +853,7 @@ int HTMLParser::ScanText( const sal_Unicode cBreak )
return HTML_TEXTTOKEN;
}
} while( HTML_ISALPHA( nNextCh ) || HTML_ISDIGIT( nNextCh ) );
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
@@ -878,21 +878,21 @@ int HTMLParser::_GetNextRawToken()
{
// beim letzten Aufruf haben wir das End-Token bereits gefunden,
// deshalb muessen wir es nicht noch einmal suchen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
- bEndTokenFound = FALSE;
+ bEndTokenFound = sal_False;
return 0;
}
// per default geben wir HTML_RAWDATA zurueck
- int bWeiter = TRUE;
+ int bWeiter = sal_True;
int nToken = HTML_RAWDATA;
SaveState( 0 );
while( bWeiter && IsParserWorking() )
{
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
@@ -903,15 +903,15 @@ int HTMLParser::_GetNextRawToken()
aToken += String(sTmpBuffer.makeStringAndClear());
// und die Position im Stream merken
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
// Start eines End-Token?
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
else if( '!' == nNextCh )
@@ -932,7 +932,7 @@ int HTMLParser::_GetNextRawToken()
sal::static_int_cast< xub_StrLen >(
sTmpBuffer.getLength()) );
aTok.ToUpperAscii();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
if( bReadScript || aEndToken.Len() )
{
if( !bReadComment )
@@ -940,7 +940,7 @@ int HTMLParser::_GetNextRawToken()
if( aTok.CompareToAscii( OOO_STRING_SVTOOLS_HTML_comment, 3 )
== COMPARE_EQUAL )
{
- bReadComment = TRUE;
+ bReadComment = sal_True;
}
else
{
@@ -957,7 +957,7 @@ int HTMLParser::_GetNextRawToken()
aTok.Copy( aTok.Len()-2 ).EqualsAscii( "--" ) )
{
// hier ist ein Kommentar der Art <!-----> zuende
- bReadComment = FALSE;
+ bReadComment = sal_False;
}
}
else
@@ -980,15 +980,15 @@ int HTMLParser::_GetNextRawToken()
// bisher gelesenen String zurueckgeben und dnach normal
// weitermachen
- bWeiter = FALSE;
+ bWeiter = sal_False;
// nToken==0 heisst, dass _GetNextToken gleich weiterliest
if( !aToken.Len() && (bReadStyle || bReadScript) )
{
// wir koennen sofort die Umgebung beeden und
// das End-Token parsen
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -997,7 +997,7 @@ int HTMLParser::_GetNextRawToken()
// wir muessen bReadScript/bReadStyle noch am
// Leben lassen und koennen erst beim naechsten
// mal das End-Token Parsen
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
// jetzt fahren wir im Stream auf das '<' zurueck
@@ -1017,7 +1017,7 @@ int HTMLParser::_GetNextRawToken()
if( bOffState )
aToken += (sal_Unicode)'/';
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
}
break;
@@ -1025,11 +1025,11 @@ int HTMLParser::_GetNextRawToken()
sTmpBuffer.append( nNextCh );
if( bReadComment )
{
- BOOL bTwoMinus = FALSE;
+ sal_Bool bTwoMinus = sal_False;
nNextCh = GetNextChar();
while( '-' == nNextCh && IsParserWorking() )
{
- bTwoMinus = TRUE;
+ bTwoMinus = sal_True;
if( MAX_LEN == sTmpBuffer.getLength() )
aToken += String(sTmpBuffer.makeStringAndClear());
@@ -1038,9 +1038,9 @@ int HTMLParser::_GetNextRawToken()
}
if( '>' == nNextCh && IsParserWorking() && bTwoMinus )
- bReadComment = FALSE;
+ bReadComment = sal_False;
- bNextCh = FALSE;
+ bNextCh = sal_False;
}
break;
@@ -1049,27 +1049,27 @@ int HTMLParser::_GetNextRawToken()
nNextCh = GetNextChar();
if( nNextCh=='\n' )
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case '\n':
// \n beendet das aktuelle Text-Token (auch wenn es leer ist)
nNextCh = GetNextChar();
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
case sal_Unicode(EOF):
// eof beendet das aktuelle Text-Token und tut so, als ob
// ein End-Token gelesen wurde
if( rInput.IsEof() )
{
- bWeiter = FALSE;
+ bWeiter = sal_False;
if( aToken.Len() || sTmpBuffer.getLength() )
{
- bEndTokenFound = TRUE;
+ bEndTokenFound = sal_True;
}
else
{
- bReadScript = FALSE;
- bReadStyle = FALSE;
+ bReadScript = sal_False;
+ bReadStyle = sal_False;
aEndToken.Erase();
nToken = 0;
}
@@ -1111,7 +1111,7 @@ int HTMLParser::_GetNextToken()
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- BOOL bReadNextCharSave = bReadNextChar;
+ sal_Bool bReadNextCharSave = bReadNextChar;
if( bReadNextChar )
{
DBG_ASSERT( !bEndTokenFound,
@@ -1119,7 +1119,7 @@ int HTMLParser::_GetNextToken()
nNextCh = GetNextChar();
if( !IsParserWorking() ) // wenn schon Fehler, dann nicht weiter!
return 0;
- bReadNextChar = FALSE;
+ bReadNextChar = sal_False;
}
if( bReadScript || bReadStyle || aEndToken.Len() )
@@ -1130,19 +1130,19 @@ int HTMLParser::_GetNextToken()
}
do {
- int bNextCh = TRUE;
+ int bNextCh = sal_True;
switch( nNextCh )
{
case '<':
{
- ULONG nStreamPos = rInput.Tell();
- ULONG nLineNr = GetLineNr();
- ULONG nLinePos = GetLinePos();
+ sal_uLong nStreamPos = rInput.Tell();
+ sal_uLong nLineNr = GetLineNr();
+ sal_uLong nLinePos = GetLinePos();
- int bOffState = FALSE;
+ int bOffState = sal_False;
if( '/' == (nNextCh = GetNextChar()) )
{
- bOffState = TRUE;
+ bOffState = sal_True;
nNextCh = GetNextChar();
}
if( HTML_ISALPHA( nNextCh ) || '!'==nNextCh ) // fix #26984#
@@ -1202,12 +1202,12 @@ int HTMLParser::_GetNextToken()
aToken = sSaveToken;
if( '>'!=nNextCh )
aToken += (sal_Unicode)' ';
- ULONG nCStreamPos = 0;
- ULONG nCLineNr = 0;
- ULONG nCLinePos = 0;
+ sal_uLong nCStreamPos = 0;
+ sal_uLong nCLineNr = 0;
+ sal_uLong nCLinePos = 0;
xub_StrLen nCStrLen = 0;
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden --> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1264,7 +1264,7 @@ int HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1289,7 +1289,7 @@ int HTMLParser::_GetNextToken()
aToken = '<';
nRet = HTML_TEXTTOKEN;
nNextCh = GetNextChar();
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
if( SVPAR_PENDING == eState )
@@ -1300,10 +1300,10 @@ int HTMLParser::_GetNextToken()
{
nRet = HTML_UNKNOWNCONTROL_ON;
- ULONG nCStreamPos = rInput.Tell();
- ULONG nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
+ sal_uLong nCStreamPos = rInput.Tell();
+ sal_uLong nCLineNr = GetLineNr(), nCLinePos = GetLinePos();
- BOOL bDone = FALSE;
+ sal_Bool bDone = sal_False;
// bis zum schliessenden %> lesen. wenn keins gefunden
// wurde beim der ersten > wieder aufsetzen
while( !bDone && !rInput.IsEof() && IsParserWorking() )
@@ -1336,7 +1336,7 @@ int HTMLParser::_GetNextToken()
{
aToken = '<';
nRet = HTML_TEXTTOKEN;
- bNextCh = FALSE;
+ bNextCh = sal_False;
break;
}
}
@@ -1347,32 +1347,32 @@ int HTMLParser::_GetNextToken()
switch( nRet )
{
case HTML_TEXTAREA_ON:
- bReadTextArea = TRUE;
+ bReadTextArea = sal_True;
break;
case HTML_TEXTAREA_OFF:
- bReadTextArea = FALSE;
+ bReadTextArea = sal_False;
break;
case HTML_SCRIPT_ON:
if( !bReadTextArea )
- bReadScript = TRUE;
+ bReadScript = sal_True;
break;
case HTML_SCRIPT_OFF:
if( !bReadTextArea )
{
- bReadScript = FALSE;
+ bReadScript = sal_False;
// JavaScript kann den Stream veraendern
// also muss das letzte Zeichen nochmals
// gelesen werden
- bReadNextChar = TRUE;
- bNextCh = FALSE;
+ bReadNextChar = sal_True;
+ bNextCh = sal_False;
}
break;
case HTML_STYLE_ON:
- bReadStyle = TRUE;
+ bReadStyle = sal_True;
break;
case HTML_STYLE_OFF:
- bReadStyle = FALSE;
+ bReadStyle = sal_False;
break;
}
@@ -1406,7 +1406,7 @@ int HTMLParser::_GetNextToken()
if( ( '\n' != nNextCh || '\r' != c ) &&
( '\r' != nNextCh || '\n' != c ) )
{
- bNextCh = FALSE;
+ bNextCh = sal_False;
nNextCh = c;
}
nRet = HTML_NEWPARA;
@@ -1433,7 +1433,7 @@ scan_text:
if( !bNextCh && eState == SVPAR_PENDING )
{
eState = SVPAR_WORKING;
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
}
break;
@@ -1444,7 +1444,7 @@ scan_text:
nNextCh = GetNextChar();
if( SVPAR_PENDING == eState && nRet && HTML_TEXTTOKEN != nRet )
{
- bReadNextChar = TRUE;
+ bReadNextChar = sal_True;
eState = SVPAR_WORKING;
}
}
@@ -1461,15 +1461,15 @@ void HTMLParser::UnescapeToken()
{
xub_StrLen nPos=0;
- BOOL bEscape = FALSE;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
if( '\\'==aToken.GetChar(nPos) && !bOldEscape )
{
aToken.Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
else
{
@@ -1479,7 +1479,7 @@ void HTMLParser::UnescapeToken()
}
// hole die Optionen
-const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
+const HTMLOptions *HTMLParser::GetOptions( sal_uInt16 *pNoConvertToken ) const
{
// wenn die Option fuer das aktuelle Token schon einmal
// geholt wurden, geben wir sie noch einmal zurueck
@@ -1517,7 +1517,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
nToken = GetHTMLOption( sNameUpperCase ); // der Name ist fertig
DBG_ASSERTWARNING( nToken!=HTML_O_UNKNOWN,
"GetOption: unbekannte HTML-Option" );
- BOOL bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
+ sal_Bool bStripCRLF = (nToken < HTML_OPTION_SCRIPT_START ||
nToken >= HTML_OPTION_SCRIPT_END) &&
(!pNoConvertToken || nToken != *pNoConvertToken);
@@ -1544,12 +1544,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
sal_Unicode cEnd = cChar;
nPos++; nStt++;
- BOOL bDone = FALSE;
- BOOL bEscape = FALSE;
+ sal_Bool bDone = sal_False;
+ sal_Bool bEscape = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
cChar = aToken.GetChar(nPos);
switch( cChar )
{
@@ -1568,7 +1568,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
case '"':
@@ -1589,12 +1589,12 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
{
// hier sind wir etwas laxer als der
// Standard und erlauben alles druckbare
- BOOL bEscape = FALSE;
- BOOL bDone = FALSE;
+ sal_Bool bEscape = sal_False;
+ sal_Bool bDone = sal_False;
while( nPos < aToken.Len() && !bDone )
{
- BOOL bOldEscape = bEscape;
- bEscape = FALSE;
+ sal_Bool bOldEscape = bEscape;
+ bEscape = sal_False;
sal_Unicode c = aToken.GetChar(nPos);
switch( c )
{
@@ -1607,7 +1607,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
case '\t':
case '\r':
case '\n':
- bDone = TRUE;
+ bDone = sal_True;
break;
case '\\':
@@ -1618,7 +1618,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
else
{
((String &)aToken).Erase( nPos, 1 );
- bEscape = TRUE;
+ bEscape = sal_True;
}
break;
@@ -1626,7 +1626,7 @@ const HTMLOptions *HTMLParser::GetOptions( USHORT *pNoConvertToken ) const
if( HTML_ISPRINTABLE( c ) )
nPos++, nLen++;
else
- bDone = TRUE;
+ bDone = sal_True;
break;
}
}
@@ -1831,7 +1831,7 @@ int HTMLParser::FilterPRE( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1872,7 +1872,7 @@ int HTMLParser::FilterXMP( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
@@ -1900,13 +1900,13 @@ int HTMLParser::FilterListing( int nToken )
break;
}
- bPre_IgnoreNewPara = FALSE;
+ bPre_IgnoreNewPara = sal_False;
return nToken;
}
bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
- BOOL bSwitchToUCS2,
+ sal_Bool bSwitchToUCS2,
rtl_TextEncoding eEnc )
{
// Einer der folgenden regulaeren Ausdrucke muss sich auf den String
@@ -1920,14 +1920,14 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// ensprechen muss
ByteString sCmp;
- BOOL bUCS2B = FALSE;
+ sal_Bool bUCS2B = sal_False;
if( bSwitchToUCS2 )
{
if( 0xfeU == (sal_uChar)pHeader[0] &&
0xffU == (sal_uChar)pHeader[1] )
{
eEnc = RTL_TEXTENCODING_UCS2;
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
}
else if( 0xffU == (sal_uChar)pHeader[0] &&
0xfeU == (sal_uChar)pHeader[1] )
@@ -1945,7 +1945,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
)
{
if( 0xfe == (sal_uChar)pHeader[0] )
- bUCS2B = TRUE;
+ bUCS2B = sal_True;
xub_StrLen nLen;
for( nLen = 2;
@@ -1978,7 +1978,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// Ein HTML-Dokument muss in der ersten Zeile ein '<' besitzen
xub_StrLen nStart = sCmp.Search( '<' );
if( STRING_NOTFOUND == nStart )
- return FALSE;
+ return sal_False;
nStart++;
// danach duerfen beliebige andere Zeichen bis zu einem blank oder
@@ -1993,7 +1993,7 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
// wenn das Dokeument hinter dem < aufhoert ist es wohl kein HTML
if( nPos==nStart )
- return FALSE;
+ return sal_False;
// die Zeichenkette nach dem '<' muss ausserdem ein bekanntes
// HTML Token sein. Damit die Ausgabe eines DOS-dir-Befehls nicht
@@ -2002,30 +2002,30 @@ bool HTMLParser::IsHTMLFormat( const sal_Char* pHeader,
String sTest( sCmp.Copy( nStart, nPos-nStart ), RTL_TEXTENCODING_ASCII_US );
int nTok = GetHTMLToken( sTest );
if( 0 != nTok && HTML_DIRLIST_ON != nTok )
- return TRUE;
+ return sal_True;
// oder es handelt sich um ein "<!" ganz am Anfang der Datei (fix #27092#)
if( nStart == 1 && '!' == sCmp.GetChar( 1 ) )
- return TRUE;
+ return sal_True;
// oder wir finden irgendwo ein <HTML> in den ersten 80 Zeichen
nStart = sCmp.Search( OOO_STRING_SVTOOLS_HTML_html );
if( nStart!=STRING_NOTFOUND &&
nStart>0 && '<'==sCmp.GetChar(nStart-1) &&
nStart+4 < sCmp.Len() && '>'==sCmp.GetChar(nStart+4) )
- return TRUE;
+ return sal_True;
// sonst ist es wohl doch eher kein HTML-Dokument
- return FALSE;
+ return sal_False;
}
-BOOL HTMLParser::InternalImgToPrivateURL( String& rURL )
+sal_Bool HTMLParser::InternalImgToPrivateURL( String& rURL )
{
if( rURL.Len() < 19 || 'i' != rURL.GetChar(0) ||
rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher, 9 ) != COMPARE_EQUAL )
- return FALSE;
+ return sal_False;
- BOOL bFound = FALSE;
+ sal_Bool bFound = sal_False;
if( rURL.CompareToAscii( OOO_STRING_SVTOOLS_HTML_internal_gopher,16) == COMPARE_EQUAL )
{
@@ -2133,10 +2133,10 @@ bool HTMLParser::ParseMetaOptionsImpl(
rtl_TextEncoding& o_rEnc )
{
String aName, aContent;
- USHORT nAction = HTML_META_NONE;
+ sal_uInt16 nAction = HTML_META_NONE;
bool bHTTPEquiv = false, bChanged = false;
- for ( USHORT i = i_pOptions->Count(); i; )
+ for ( sal_uInt16 i = i_pOptions->Count(); i; )
{
const HTMLOption *pOption = (*i_pOptions)[ --i ];
switch ( pOption->GetToken() )
@@ -2222,8 +2222,8 @@ bool HTMLParser::ParseMetaOptionsImpl(
if ( i_xDocProps.is() && aContent.Len() &&
aContent.GetTokenCount() == 2 )
{
- Date aDate( (ULONG)aContent.GetToken(0).ToInt32() );
- Time aTime( (ULONG)aContent.GetToken(1).ToInt32() );
+ Date aDate( (sal_uLong)aContent.GetToken(0).ToInt32() );
+ Time aTime( (sal_uLong)aContent.GetToken(1).ToInt32() );
DateTime aDateTime( aDate, aTime );
::util::DateTime uDT(aDateTime.Get100Sec(),
aDateTime.GetSec(), aDateTime.GetMin(),
@@ -2279,7 +2279,7 @@ bool HTMLParser::ParseMetaOptions(
const uno::Reference<document::XDocumentProperties> & i_xDocProps,
SvKeyValueIterator *i_pHeader )
{
- USHORT nContentOption = HTML_O_CONTENT;
+ sal_uInt16 nContentOption = HTML_O_CONTENT;
rtl_TextEncoding eEnc = RTL_TEXTENCODING_DONTKNOW;
bool bRet = ParseMetaOptionsImpl( i_xDocProps, i_pHeader,
@@ -2287,7 +2287,7 @@ bool HTMLParser::ParseMetaOptions(
eEnc );
// If the encoding is set by a META tag, it may only overwrite the
- // current encoding if both, the current and the new encoding, are 1-BYTE
+ // current encoding if both, the current and the new encoding, are 1-sal_uInt8
// encodings. Everything else cannot lead to reasonable results.
if (RTL_TEXTENCODING_DONTKNOW != eEnc &&
rtl_isOctetTextEncoding( eEnc ) &&
@@ -2326,7 +2326,7 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
if( pHTTPHeader )
{
SvKeyValue aKV;
- for( BOOL bCont = pHTTPHeader->GetFirst( aKV ); bCont;
+ for( sal_Bool bCont = pHTTPHeader->GetFirst( aKV ); bCont;
bCont = pHTTPHeader->GetNext( aKV ) )
{
if( aKV.GetKey().EqualsIgnoreCaseAscii( OOO_STRING_SVTOOLS_HTML_META_content_type ) )
@@ -2341,15 +2341,15 @@ rtl_TextEncoding HTMLParser::GetEncodingByHttpHeader( SvKeyValueIterator *pHTTPH
return eRet;
}
-BOOL HTMLParser::SetEncodingByHTTPHeader(
+sal_Bool HTMLParser::SetEncodingByHTTPHeader(
SvKeyValueIterator *pHTTPHeader )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
rtl_TextEncoding eEnc = HTMLParser::GetEncodingByHttpHeader( pHTTPHeader );
if(RTL_TEXTENCODING_DONTKNOW != eEnc)
{
SetSrcEncoding( eEnc );
- bRet = TRUE;
+ bRet = sal_True;
}
return bRet;
}