summaryrefslogtreecommitdiff
path: root/editeng/source/misc
diff options
context:
space:
mode:
Diffstat (limited to 'editeng/source/misc')
-rw-r--r--editeng/source/misc/SvXMLAutoCorrectImport.cxx6
-rw-r--r--editeng/source/misc/acorrcfg.cxx30
-rw-r--r--editeng/source/misc/forbiddencharacterstable.cxx14
-rw-r--r--editeng/source/misc/hangulhanja.cxx2
-rw-r--r--editeng/source/misc/makefile.mk71
-rw-r--r--editeng/source/misc/splwrap.cxx2
-rw-r--r--editeng/source/misc/svxacorr.cxx462
-rw-r--r--editeng/source/misc/swafopt.cxx10
-rw-r--r--editeng/source/misc/txtrange.cxx112
-rwxr-xr-xediteng/source/misc/unolingu.cxx90
10 files changed, 364 insertions, 435 deletions
diff --git a/editeng/source/misc/SvXMLAutoCorrectImport.cxx b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
index 65f4bbb11ddc..aeb9d2be23b1 100644
--- a/editeng/source/misc/SvXMLAutoCorrectImport.cxx
+++ b/editeng/source/misc/SvXMLAutoCorrectImport.cxx
@@ -143,8 +143,8 @@ SvXMLWordContext::SvXMLWordContext(
return;
// const International& rInter = Application::GetAppInternational();
-// BOOL bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE );
- BOOL bOnlyTxt = sRight != sWrong;
+// sal_Bool bOnlyTxt = COMPARE_EQUAL != rInter.Compare( sRight, sWrong, INTN_COMPARE_IGNORECASE );
+ sal_Bool bOnlyTxt = sRight != sWrong;
if( !bOnlyTxt )
{
String sLongSave( sRight );
@@ -152,7 +152,7 @@ SvXMLWordContext::SvXMLWordContext(
sLongSave.Len() )
{
sRight = sLongSave;
- bOnlyTxt = TRUE;
+ bOnlyTxt = sal_True;
}
}
SvxAutocorrWordPtr pNew = new SvxAutocorrWord( sWrong, sRight, bOnlyTxt );
diff --git a/editeng/source/misc/acorrcfg.cxx b/editeng/source/misc/acorrcfg.cxx
index 966a0876fa30..f804c4b39329 100644
--- a/editeng/source/misc/acorrcfg.cxx
+++ b/editeng/source/misc/acorrcfg.cxx
@@ -53,18 +53,18 @@ static SvxAutoCorrCfg* pAutoCorrCfg = 0;
SvxAutoCorrCfg::SvxAutoCorrCfg() :
aBaseConfig(*this),
aSwConfig(*this),
- bFileRel(TRUE),
- bNetRel(TRUE),
- bAutoTextTip(TRUE),
- bAutoTextPreview(FALSE),
- bAutoFmtByInput(TRUE),
- bSearchInAllCategories(FALSE)
+ bFileRel(sal_True),
+ bNetRel(sal_True),
+ bAutoTextTip(sal_True),
+ bAutoTextPreview(sal_False),
+ bAutoFmtByInput(sal_True),
+ bSearchInAllCategories(sal_False)
{
SvtPathOptions aPathOpt;
String sSharePath, sUserPath, sAutoPath( aPathOpt.GetAutoCorrectPath() );
String* pS = &sSharePath;
- for( USHORT n = 0; n < 2; ++n, pS = &sUserPath )
+ for( sal_uInt16 n = 0; n < 2; ++n, pS = &sUserPath )
{
*pS = sAutoPath.GetToken( n, ';' );
INetURLObject aPath( *pS );
@@ -224,8 +224,8 @@ void SvxBaseAutoCorrCfg::Load(sal_Bool bInit)
}
}
if( nFlags )
- rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, TRUE );
- rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), FALSE );
+ rParent.pAutoCorrect->SetAutoCorrFlag( nFlags, sal_True );
+ rParent.pAutoCorrect->SetAutoCorrFlag( ( 0xffff & ~nFlags ), sal_False );
}
}
@@ -254,7 +254,7 @@ void SvxBaseAutoCorrCfg::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
const long nFlags = rParent.pAutoCorrect->GetFlags();
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
@@ -470,7 +470,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nRightMargin =
- sal::static_int_cast< BYTE >(nVal);
+ sal::static_int_cast< sal_uInt8 >(nVal);
}
break; // "Format/Option/CombineValue",
case 23: rSwFlags.bAFmtDelSpacesAtSttEnd = *(sal_Bool*)pValues[nProp].getValue(); break; // "Format/Option/DelSpacesAtStartEnd",
@@ -488,14 +488,14 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltWordLen =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/MinWordLen",
case 35:
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltListLen =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/MaxListLen",
case 36: rSwFlags.bAutoCmpltCollectWords = *(sal_Bool*)pValues[nProp].getValue(); break; // "Completion/CollectWords",
@@ -506,7 +506,7 @@ void SvxSwAutoCorrCfg::Load(sal_Bool bInit)
{
sal_Int32 nVal = 0; pValues[nProp] >>= nVal;
rSwFlags.nAutoCmpltExpandKey =
- sal::static_int_cast< USHORT >(nVal);
+ sal::static_int_cast< sal_uInt16 >(nVal);
}
break; // "Completion/AcceptKey"
case 41 :rSwFlags.bAutoCmpltKeepList = *(sal_Bool*)pValues[nProp].getValue(); break;//"Completion/KeepList"
@@ -571,7 +571,7 @@ void SvxSwAutoCorrCfg::Commit()
Any* pValues = aValues.getArray();
const Type& rType = ::getBooleanCppuType();
- BOOL bVal;
+ sal_Bool bVal;
SvxSwAutoFmtFlags& rSwFlags = rParent.pAutoCorrect->GetSwFlags();
for(int nProp = 0; nProp < aNames.getLength(); nProp++)
{
diff --git a/editeng/source/misc/forbiddencharacterstable.cxx b/editeng/source/misc/forbiddencharacterstable.cxx
index 52b439838ce0..b7bd2959719d 100644
--- a/editeng/source/misc/forbiddencharacterstable.cxx
+++ b/editeng/source/misc/forbiddencharacterstable.cxx
@@ -35,7 +35,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
-SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, USHORT nISize, USHORT nGrow )
+SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF, sal_uInt16 nISize, sal_uInt16 nGrow )
: SvxForbiddenCharactersTableImpl( nISize, nGrow )
{
mxMSF = xMSF;
@@ -44,13 +44,13 @@ SvxForbiddenCharactersTable::SvxForbiddenCharactersTable( ::com::sun::star::uno:
SvxForbiddenCharactersTable::~SvxForbiddenCharactersTable()
{
- for ( ULONG n = Count(); n; )
+ for ( sal_uLong n = Count(); n; )
delete GetObject( --n );
}
-const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( USHORT nLanguage, BOOL bGetDefault ) const
+const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::GetForbiddenCharacters( sal_uInt16 nLanguage, sal_Bool bGetDefault ) const
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( !pInf && bGetDefault && mxMSF.is() )
@@ -60,7 +60,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge
pInf = new ForbiddenCharactersInfo;
pImpl->Insert( nLanguage, pInf );
- pInf->bTemporary = TRUE;
+ pInf->bTemporary = sal_True;
LocaleDataWrapper aWrapper( mxMSF, SvxCreateLocale( nLanguage ) );
pInf->aForbiddenChars = aWrapper.getForbiddenCharacters();
}
@@ -69,7 +69,7 @@ const com::sun::star::i18n::ForbiddenCharacters* SvxForbiddenCharactersTable::Ge
-void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars )
+void SvxForbiddenCharactersTable::SetForbiddenCharacters( sal_uInt16 nLanguage, const com::sun::star::i18n::ForbiddenCharacters& rForbiddenChars )
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( !pInf )
@@ -77,11 +77,11 @@ void SvxForbiddenCharactersTable::SetForbiddenCharacters( USHORT nLanguage, cons
pInf = new ForbiddenCharactersInfo;
Insert( nLanguage, pInf );
}
- pInf->bTemporary = FALSE;
+ pInf->bTemporary = sal_False;
pInf->aForbiddenChars = rForbiddenChars;
}
-void SvxForbiddenCharactersTable::ClearForbiddenCharacters( USHORT nLanguage )
+void SvxForbiddenCharactersTable::ClearForbiddenCharacters( sal_uInt16 nLanguage )
{
ForbiddenCharactersInfo* pInf = Get( nLanguage );
if ( pInf )
diff --git a/editeng/source/misc/hangulhanja.cxx b/editeng/source/misc/hangulhanja.cxx
index 378ffb705300..87f115474bf7 100644
--- a/editeng/source/misc/hangulhanja.cxx
+++ b/editeng/source/misc/hangulhanja.cxx
@@ -686,7 +686,7 @@ namespace editeng
// determine if it's Hangul
CharClass aCharClassificaton( m_xORB, m_aSourceLocale );
- sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< USHORT >(nNextAsianScript) );
+ sal_Int16 nScript = aCharClassificaton.getScript( m_sCurrentPortion, sal::static_int_cast< sal_uInt16 >(nNextAsianScript) );
if ( ( UnicodeScript_kHangulJamo == nScript )
|| ( UnicodeScript_kHangulCompatibilityJamo == nScript )
|| ( UnicodeScript_kHangulSyllable == nScript )
diff --git a/editeng/source/misc/makefile.mk b/editeng/source/misc/makefile.mk
deleted file mode 100644
index 7eb2d80447a1..000000000000
--- a/editeng/source/misc/makefile.mk
+++ /dev/null
@@ -1,71 +0,0 @@
-#*************************************************************************
-#
-# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
-#
-# Copyright 2008 by Sun Microsystems, Inc.
-#
-# OpenOffice.org - a multi-platform office productivity suite
-#
-# $RCSfile: makefile.mk,v $
-#
-# $Revision: 1.18 $
-#
-# 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=editeng
-TARGET=misc
-
-#PROJECTPCH4DLL=TRUE
-#PROJECTPCH=eeng_pch
-#PROJECTPCHSOURCE=eeng_pch
-
-ENABLE_EXCEPTIONS=TRUE
-
-# --- Settings -----------------------------------------------------------
-
-.INCLUDE : settings.mk
-.INCLUDE : $(PRJ)$/util$/makefile.pmk
-
-# --- Allgemein ----------------------------------------------------------
-
-.IF "$(editdebug)" != "" || "$(EDITDEBUG)" != ""
-CDEFS+=-DEDITDEBUG
-.ENDIF
-
-SLOFILES = \
- $(SLO)$/edtdlg.obj \
- $(SLO)$/unolingu.obj \
- $(SLO)$/acorrcfg.obj \
- $(SLO)$/forbiddencharacterstable.obj \
- $(SLO)$/hangulhanja.obj \
- $(SLO)$/splwrap.obj \
- $(SLO)$/svxacorr.obj \
- $(SLO)$/SvXMLAutoCorrectExport.obj \
- $(SLO)$/SvXMLAutoCorrectImport.obj \
- $(SLO)$/swafopt.obj \
- $(SLO)$/txtrange.obj
-
-SRS1NAME=misc
-SRC1FILES = \
- lingu.src
-
-.INCLUDE : target.mk
-
diff --git a/editeng/source/misc/splwrap.cxx b/editeng/source/misc/splwrap.cxx
index 3df64c26a594..af6b029b3001 100644
--- a/editeng/source/misc/splwrap.cxx
+++ b/editeng/source/misc/splwrap.cxx
@@ -105,7 +105,7 @@ struct lt_LanguageType
}
};
-typedef std::map< LanguageType, USHORT, lt_LanguageType > LangCheckState_map_t;
+typedef std::map< LanguageType, sal_uInt16, lt_LanguageType > LangCheckState_map_t;
static LangCheckState_map_t & GetLangCheckState()
{
diff --git a/editeng/source/misc/svxacorr.cxx b/editeng/source/misc/svxacorr.cxx
index f2481e79eb22..e15e92200e0c 100644
--- a/editeng/source/misc/svxacorr.cxx
+++ b/editeng/source/misc/svxacorr.cxx
@@ -139,7 +139,7 @@ inline int IsUpperLetter( sal_Int32 nCharType )
0 == ( ::com::sun::star::i18n::KCharacterType::LOWER & nCharType);
}
-BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
+sal_Bool lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
xub_StrLen nStt, xub_StrLen nEnd )
{
for( ; nStt < nEnd; ++nStt )
@@ -152,19 +152,19 @@ BOOL lcl_IsSymbolChar( CharClass& rCC, const String& rTxt,
#endif
if( ::com::sun::star::i18n::UnicodeType::PRIVATE_USE ==
rCC.getType( rTxt, nStt ))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
-static BOOL lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
+static sal_Bool lcl_IsInAsciiArr( const sal_Char* pArr, const sal_Unicode c )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
for( ; *pArr; ++pArr )
if( *pArr == c )
{
- bRet = TRUE;
+ bRet = sal_True;
break;
}
return bRet;
@@ -180,12 +180,12 @@ SvxAutoCorrDoc::~SvxAutoCorrDoc()
// - FnCptlSttSntnc
// gerufen. Dann koennen die Worte ggfs. in die Ausnahmelisten
// aufgenommen werden.
-void SvxAutoCorrDoc::SaveCpltSttWord( ULONG, xub_StrLen, const String&,
+void SvxAutoCorrDoc::SaveCpltSttWord( sal_uLong, xub_StrLen, const String&,
sal_Unicode )
{
}
-LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , BOOL ) const
+LanguageType SvxAutoCorrDoc::GetLanguage( xub_StrLen , sal_Bool ) const
{
return LANGUAGE_SYSTEM;
}
@@ -199,11 +199,11 @@ static ::com::sun::star::uno::Reference<
return xMSF;
}
-static USHORT GetAppLang()
+static sal_uInt16 GetAppLang()
{
return Application::GetSettings().GetLanguage();
}
-static LocaleDataWrapper& GetLocaleDataWrapper( USHORT nLang )
+static LocaleDataWrapper& GetLocaleDataWrapper( sal_uInt16 nLang )
{
static LocaleDataWrapper aLclDtWrp( GetProcessFact(),
SvxCreateLocale( GetAppLang() ) );
@@ -242,21 +242,21 @@ static CollatorWrapper& GetCollatorWrapper()
}
-void SvxAutocorrWordList::DeleteAndDestroy( USHORT nP, USHORT nL )
+void SvxAutocorrWordList::DeleteAndDestroy( sal_uInt16 nP, sal_uInt16 nL )
{
if( nL )
{
DBG_ASSERT( nP < nA && nP + nL <= nA, "ERR_VAR_DEL" );
- for( USHORT n=nP; n < nP + nL; n++ )
+ for( sal_uInt16 n=nP; n < nP + nL; n++ )
delete *((SvxAutocorrWordPtr*)pData+n);
SvPtrarr::Remove( nP, nL );
}
}
-BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP ) const
+sal_Bool SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, sal_uInt16* pP ) const
{
- register USHORT nO = SvxAutocorrWordList_SAR::Count(),
+ register sal_uInt16 nO = SvxAutocorrWordList_SAR::Count(),
nM,
nU = 0;
if( nO > 0 )
@@ -271,21 +271,21 @@ BOOL SvxAutocorrWordList::Seek_Entry( const SvxAutocorrWordPtr aE, USHORT* pP )
if( 0 == nCmp )
{
if( pP ) *pP = nM;
- return TRUE;
+ return sal_True;
}
else if( 0 < nCmp )
nU = nM + 1;
else if( nM == 0 )
{
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
else
nO = nM - 1;
}
}
if( pP ) *pP = nU;
- return FALSE;
+ return sal_False;
}
/* -----------------18.11.98 15:28-------------------
@@ -405,7 +405,7 @@ void SvxAutoCorrect::_GetCharClass( LanguageType eLang )
eCharClassLang = eLang;
}
-void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
+void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, sal_Bool bOn )
{
long nOld = nFlags;
nFlags = bOn ? nFlags | nFlag
@@ -424,11 +424,11 @@ void SvxAutoCorrect::SetAutoCorrFlag( long nFlag, BOOL bOn )
// Zwei Grossbuchstaben am Wort-Anfang ??
-BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
CharClass& rCC = GetCharClass( eLang );
// loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und
@@ -460,7 +460,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
{
if( SaveWordWrdSttLst & nFlags )
rDoc.SaveCpltSttWord( CptlSttWrd, nSttPos, sWord, cSave );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -468,7 +468,7 @@ BOOL SvxAutoCorrect::FnCptlSttWrd( SvxAutoCorrDoc& rDoc, const String& rTxt,
}
-BOOL SvxAutoCorrect::FnChgOrdinalNumber(
+sal_Bool SvxAutoCorrect::FnChgOrdinalNumber(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
@@ -477,7 +477,7 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber(
// 201th oder 201st
// 12th oder 12nd
CharClass& rCC = GetCharClass( eLang );
- BOOL bChg = FALSE;
+ sal_Bool bChg = sal_False;
for( ; nSttPos < nEndPos; ++nSttPos )
if( !lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nSttPos ) ))
@@ -536,12 +536,12 @@ BOOL SvxAutoCorrect::FnChgOrdinalNumber(
}
-BOOL SvxAutoCorrect::FnChgToEnEmDash(
+sal_Bool SvxAutoCorrect::FnChgToEnEmDash(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
CharClass& rCC = GetCharClass( eLang );
if (eLang == LANGUAGE_SYSTEM)
eLang = GetAppLang();
@@ -574,7 +574,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
{
rDoc.Delete( nSttPos, nSttPos + 2 );
rDoc.Insert( nSttPos, bAlwaysUseEmDash ? cEmDash : cEnDash );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -609,7 +609,7 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
{
rDoc.Delete( nTmpPos, nTmpPos + nLen );
rDoc.Insert( nTmpPos, bAlwaysUseEmDash ? cEmDash : cEnDash );
- bRet = TRUE;
+ bRet = sal_True;
}
}
}
@@ -633,13 +633,13 @@ BOOL SvxAutoCorrect::FnChgToEnEmDash(
nSttPos = nSttPos + nFndPos;
rDoc.Delete( nSttPos, nSttPos + 2 );
rDoc.Insert( nSttPos, (bEnDash ? cEnDash : cEmDash) );
- bRet = TRUE;
+ bRet = sal_True;
}
}
return bRet;
}
-BOOL SvxAutoCorrect::FnAddNonBrkSpace(
+sal_Bool SvxAutoCorrect::FnAddNonBrkSpace(
SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
@@ -717,20 +717,20 @@ BOOL SvxAutoCorrect::FnAddNonBrkSpace(
return bRet;
}
-BOOL SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnSetINetAttr( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
String sURL( URIHelper::FindFirstURLInText( rTxt, nSttPos, nEndPos,
GetCharClass( eLang ) ));
- BOOL bRet = 0 != sURL.Len();
+ sal_Bool bRet = 0 != sURL.Len();
if( bRet ) // also Attribut setzen:
rDoc.SetINetAttr( nSttPos, nEndPos, sURL );
return bRet;
}
-BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_Bool SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen, xub_StrLen nEndPos,
LanguageType eLang )
{
@@ -741,11 +741,11 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt
sal_Unicode c, cInsChar = rTxt.GetChar( nEndPos ); // unterstreichen oder fett
if( ++nEndPos != rTxt.Len() &&
!IsWordDelim( rTxt.GetChar( nEndPos ) ) )
- return FALSE;
+ return sal_False;
--nEndPos;
- BOOL bAlphaNum = FALSE;
+ sal_Bool bAlphaNum = sal_False;
xub_StrLen nPos = nEndPos, nFndPos = STRING_NOTFOUND;
CharClass& rCC = GetCharClass( eLang );
@@ -799,14 +799,14 @@ BOOL SvxAutoCorrect::FnChgWeightUnderl( SvxAutoCorrDoc& rDoc, const String& rTxt
}
-BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
- const String& rTxt, BOOL bNormalPos,
+sal_Bool SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
+ const String& rTxt, sal_Bool bNormalPos,
xub_StrLen nSttPos, xub_StrLen nEndPos,
LanguageType eLang )
{
// Grossbuchstabe am Satz-Anfang ??
if( !rTxt.Len() || nEndPos <= nSttPos )
- return FALSE;
+ return sal_False;
CharClass& rCC = GetCharClass( eLang );
String aText( rTxt );
@@ -815,7 +815,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
*pWordStt = 0,
*pDelim = 0;
- BOOL bAtStart = FALSE, bPrevPara = FALSE;
+ sal_Bool bAtStart = sal_False, bPrevPara = sal_False;
do {
--pStr;
if( rCC.isLetter(
@@ -854,14 +854,14 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
aText,
sal::static_int_cast< xub_StrLen >( pWordStt - pStart ) ) ) ||
0x1 == *pWordStt || 0x2 == *pWordStt )
- return FALSE; // kein zu ersetzendes Zeichen, oder schon ok
+ return sal_False; // kein zu ersetzendes Zeichen, oder schon ok
// JP 27.10.97: wenn das Wort weniger als 3 Zeichen hat und der Trenner
// ein "Num"-Trenner ist, dann nicht ersetzen!
// Damit wird ein "a.", "a)", "a-a" nicht ersetzt!
if( *pDelim && 2 >= pDelim - pWordStt &&
lcl_IsInAsciiArr( ".-)>", *pDelim ) )
- return FALSE;
+ return sal_False;
if( !bAtStart ) // noch kein Absatz Anfang ?
{
@@ -874,7 +874,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
// and full width question marks are treated as word delimiters
else if ( 0x3002 != *pStr && 0xFF0E != *pStr && 0xFF01 != *pStr &&
0xFF1F != *pStr )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
}
if( bAtStart ) // am Absatz Anfang ?
@@ -892,8 +892,8 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
aText = *pPrevPara;
- bPrevPara = TRUE;
- bAtStart = FALSE;
+ bPrevPara = sal_True;
+ bAtStart = sal_False;
pStart = aText.GetBuffer();
pStr = pStart + aText.Len();
@@ -904,7 +904,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
} while( 0 == ( bAtStart = (pStart == pStr)) );
if( bAtStart )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
}
// bis hierhier wurde [ \t]+[A-Z0-9]+ gefunden. Test jetzt auf den
@@ -912,7 +912,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
const sal_Unicode* pExceptStt = 0;
if( !bAtStart )
{
- BOOL bWeiter = TRUE;
+ sal_Bool bWeiter = sal_True;
int nFlag = C_NONE;
do {
switch( *pStr )
@@ -923,7 +923,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF0E :
{
if( nFlag & C_FULL_STOP )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
nFlag |= C_FULL_STOP;
pExceptStt = pStr;
}
@@ -932,7 +932,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF01 :
{
if( nFlag & C_EXCLAMATION_MARK )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
nFlag |= C_EXCLAMATION_MARK;
}
break;
@@ -940,15 +940,15 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
case 0xFF1F :
{
if( nFlag & C_QUESTION_MARK)
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
nFlag |= C_QUESTION_MARK;
}
break;
default:
if( !nFlag )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
else
- bWeiter = FALSE;
+ bWeiter = sal_False;
break;
}
@@ -956,7 +956,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
{
// !!! wenn am Anfang, dann nie ersetzen.
// if( !nFlag )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
// ++pStr;
// break; // Schleife beenden
}
@@ -966,12 +966,12 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( 2 > ( pStr - pStart ) )
- return FALSE;
+ return sal_False;
if( !rCC.isLetterNumeric(
aText, sal::static_int_cast< xub_StrLen >( pStr-- - pStart ) ) )
{
- BOOL bValid = FALSE, bAlphaFnd = FALSE;
+ sal_Bool bValid = sal_False, bAlphaFnd = sal_False;
const sal_Unicode* pTmpStr = pStr;
while( !bValid )
{
@@ -979,7 +979,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
aText,
sal::static_int_cast< xub_StrLen >( pTmpStr - pStart ) ) )
{
- bValid = TRUE;
+ bValid = sal_True;
pStr = pTmpStr - 1;
}
else if( rCC.isLetter(
@@ -989,11 +989,11 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
{
if( bAlphaFnd )
{
- bValid = TRUE;
+ bValid = sal_True;
pStr = pTmpStr;
}
else
- bAlphaFnd = TRUE;
+ bAlphaFnd = sal_True;
}
else if( bAlphaFnd || IsWordDelim( *pTmpStr ) )
break;
@@ -1005,10 +1005,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( !bValid )
- return FALSE; // kein gueltiger Trenner -> keine Ersetzung
+ return sal_False; // kein gueltiger Trenner -> keine Ersetzung
}
- BOOL bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
+ sal_Bool bNumericOnly = '0' <= *(pStr+1) && *(pStr+1) <= '9';
// suche den Anfang vom Wort
while( !IsWordDelim( *pStr ))
@@ -1016,7 +1016,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
if( bNumericOnly &&
rCC.isLetter(
aText, sal::static_int_cast< xub_StrLen >( pStr - pStart ) ) )
- bNumericOnly = FALSE;
+ bNumericOnly = sal_False;
if( pStart == pStr )
break;
@@ -1025,7 +1025,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
}
if( bNumericOnly ) // besteht nur aus Zahlen, dann nicht
- return FALSE;
+ return sal_False;
if( IsWordDelim( *pStr ))
++pStr;
@@ -1038,7 +1038,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
sWord = String(
pStr, sal::static_int_cast< xub_StrLen >( pExceptStt - pStr + 1 ) );
if( FindInCplSttExceptList(eLang, sWord) )
- return FALSE;
+ return sal_False;
// loesche alle nicht alpanum. Zeichen am Wortanfang/-ende und
// teste dann noch mal ( erkennt: "(min.", "/min.", usw.)
@@ -1057,10 +1057,10 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
if( sTmp.Len() && sTmp.Len() != sWord.Len() &&
FindInCplSttExceptList(eLang, sTmp))
- return FALSE;
+ return sal_False;
- if(FindInCplSttExceptList(eLang, sWord, TRUE))
- return FALSE;
+ if(FindInCplSttExceptList(eLang, sWord, sal_True))
+ return sal_False;
}
// Ok, dann ersetze mal
@@ -1068,7 +1068,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
nSttPos = sal::static_int_cast< xub_StrLen >( pWordStt - rTxt.GetBuffer() );
String sChar( cSave );
rCC.toUpper( sChar );
- BOOL bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
+ sal_Bool bRet = sChar.GetChar(0) != cSave && rDoc.Replace( nSttPos, sChar );
// das Wort will vielleicht jemand haben
if( bRet && SaveWordCplSttLst & nFlags )
@@ -1077,7 +1077,7 @@ BOOL SvxAutoCorrect::FnCptlSttSntnc( SvxAutoCorrDoc& rDoc,
return bRet;
}
//The method below is renamed from _GetQuote to GetQuote by BerryJia for Bug95846 Time:2002-8-13 15:50
-sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
+sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, sal_Bool bSttQuote,
LanguageType eLang ) const
{
sal_Unicode cRet = bSttQuote ? ( '\"' == cInsChar
@@ -1108,10 +1108,10 @@ sal_Unicode SvxAutoCorrect::GetQuote( sal_Unicode cInsChar, BOOL bSttQuote,
}
void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote,
- BOOL bIns )
+ sal_Unicode cInsChar, sal_Bool bSttQuote,
+ sal_Bool bIns )
{
- LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False );
sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang );
//JP 13.02.99: damit beim Undo das "einfuegte" Zeichen wieder erscheint,
@@ -1157,9 +1157,9 @@ void SvxAutoCorrect::InsertQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
}
String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
- sal_Unicode cInsChar, BOOL bSttQuote )
+ sal_Unicode cInsChar, sal_Bool bSttQuote )
{
- LanguageType eLang = rDoc.GetLanguage( nInsPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nInsPos, sal_False );
sal_Unicode cRet = GetQuote( cInsChar, bSttQuote, eLang );
String sRet( cRet );
@@ -1187,11 +1187,11 @@ String SvxAutoCorrect::GetQuote( SvxAutoCorrDoc& rDoc, xub_StrLen nInsPos,
return sRet;
}
-ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
+sal_uLong SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
xub_StrLen nInsPos, sal_Unicode cChar,
- BOOL bInsert )
+ sal_Bool bInsert )
{
- ULONG nRet = 0;
+ sal_uLong nRet = 0;
bool bIsNextRun = bRunNext;
bRunNext = false; // if it was set, then it has to be turned off
@@ -1207,14 +1207,14 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
break;
}
- BOOL bSingle = '\'' == cChar;
- BOOL bIsReplaceQuote =
+ sal_Bool bSingle = '\'' == cChar;
+ sal_Bool bIsReplaceQuote =
(IsAutoCorrFlag( ChgQuotes ) && ('\"' == cChar )) ||
(IsAutoCorrFlag( ChgSglQuotes ) && bSingle );
if( bIsReplaceQuote )
{
sal_Unicode cPrev;
- BOOL bSttQuote = !nInsPos ||
+ sal_Bool bSttQuote = !nInsPos ||
IsWordDelim( ( cPrev = rTxt.GetChar( nInsPos-1 ))) ||
// os: #56034# - Warum kein schliessendes Anfuehrungszeichen nach dem Bindestrich?
// strchr( "-([{", cPrev ) ||
@@ -1236,7 +1236,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
if ( IsAutoCorrFlag( AddNonBrkSpace ) )
{
if ( NeedsHardspaceAutocorr( cChar ) &&
- FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, FALSE ) ) )
+ FnAddNonBrkSpace( rDoc, rTxt, 0, nInsPos, rDoc.GetLanguage( nInsPos, sal_False ) ) )
{
nRet = AddNonBrkSpace;
}
@@ -1294,7 +1294,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
if( !nPos && !IsWordDelim( rTxt.GetChar( 0 )))
--nCapLttrPos; // Absatz Anfang und kein Blank !
- LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False );
if( LANGUAGE_SYSTEM == eLang )
eLang = MsLangId::getSystemLanguage();
CharClass& rCC = GetCharClass( eLang );
@@ -1308,7 +1308,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
const String* pPara = 0;
const String** ppPara = IsAutoCorrFlag(CptlSttSntnc) ? &pPara : 0;
- BOOL bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
+ sal_Bool bChgWord = rDoc.ChgAutoCorrWord( nCapLttrPos, nInsPos,
*this, ppPara );
if( !bChgWord )
{
@@ -1330,7 +1330,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
nCapLttrPos1 < nInsPos1 &&
rDoc.ChgAutoCorrWord( nCapLttrPos1, nInsPos1, *this, ppPara ))
{
- bChgWord = TRUE;
+ bChgWord = sal_True;
nCapLttrPos = nCapLttrPos1;
}
}
@@ -1347,7 +1347,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
// Grossbuchstabe am Satz-Anfang ??
if( IsAutoCorrFlag( CptlSttSntnc ) &&
- FnCptlSttSntnc( rDoc, *pPara, FALSE,
+ FnCptlSttSntnc( rDoc, *pPara, sal_False,
nCapLttrPos, nEnd, eLang ) )
nRet |= CptlSttSntnc;
@@ -1370,7 +1370,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
nRet = 0;
// Grossbuchstabe am Satz-Anfang ??
if( IsAutoCorrFlag( CptlSttSntnc ) &&
- FnCptlSttSntnc( rDoc, rTxt, TRUE, nCapLttrPos, nInsPos, eLang ) )
+ FnCptlSttSntnc( rDoc, rTxt, sal_True, nCapLttrPos, nInsPos, eLang ) )
nRet |= CptlSttSntnc;
// Zwei Grossbuchstaben am Wort-Anfang ??
@@ -1383,7 +1383,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
nRet |= ChgToEnEmDash;
}
- } while( FALSE );
+ } while( sal_False );
if( nRet )
{
@@ -1413,7 +1413,7 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
HID_AUTOCORR_HELP_CHGORDINALNUMBER
};
- ULONG nHelpId = 0;
+ sal_uLong nHelpId = 0;
if( nRet & ( Autocorrect|CptlSttSntnc|CptlSttWrd|ChgToEnEmDash ) )
{
// von 0 - 15
@@ -1451,16 +1451,16 @@ ULONG SvxAutoCorrect::AutoCorrect( SvxAutoCorrDoc& rDoc, const String& rTxt,
SvxAutoCorrectLanguageLists& SvxAutoCorrect::_GetLanguageList(
LanguageType eLang )
{
- if( !pLangTable->IsKeyValid( ULONG( eLang )))
- CreateLanguageFile( eLang, TRUE);
- return *pLangTable->Seek( ULONG( eLang ) );
+ if( !pLangTable->IsKeyValid( sal_uLong( eLang )))
+ CreateLanguageFile( eLang, sal_True);
+ return *pLangTable->Seek( sal_uLong( eLang ) );
}
void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
{
- if( pLangTable->IsKeyValid( ULONG( eLang )))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )))
{
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
if( pLists )
pLists->SaveCplSttExceptList();
}
@@ -1474,9 +1474,9 @@ void SvxAutoCorrect::SaveCplSttExceptList( LanguageType eLang )
void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
{
- if(pLangTable->IsKeyValid(ULONG(eLang)))
+ if(pLangTable->IsKeyValid(sal_uLong(eLang)))
{
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
if(pLists)
pLists->SaveWrdSttExceptList();
}
@@ -1491,17 +1491,17 @@ void SvxAutoCorrect::SaveWrdSttExceptList(LanguageType eLang)
// fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
// in die Datei geschrieben!
-BOOL SvxAutoCorrect::AddCplSttException( const String& rNew,
+sal_Bool SvxAutoCorrect::AddCplSttException( const String& rNew,
LanguageType eLang )
{
SvxAutoCorrectLanguageListsPtr pLists = 0;
//entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste
- if( pLangTable->IsKeyValid(ULONG(eLang)))
- pLists = pLangTable->Seek(ULONG(eLang));
- else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
- CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
+ if( pLangTable->IsKeyValid(sal_uLong(eLang)))
+ pLists = pLangTable->Seek(sal_uLong(eLang));
+ else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True))
{
- pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
}
DBG_ASSERT(pLists, "keine Autokorrekturdatei");
return pLists->AddToCplSttExceptList(rNew);
@@ -1510,16 +1510,16 @@ BOOL SvxAutoCorrect::AddCplSttException( const String& rNew,
// fuegt ein einzelnes Wort hinzu. Die Liste wird sofort
// in die Datei geschrieben!
-BOOL SvxAutoCorrect::AddWrtSttException( const String& rNew,
+sal_Bool SvxAutoCorrect::AddWrtSttException( const String& rNew,
LanguageType eLang )
{
SvxAutoCorrectLanguageListsPtr pLists = 0;
//entweder die richtige Sprache ist vorhanden oder es kommt in die allg. Liste
- if(pLangTable->IsKeyValid(ULONG(eLang)))
- pLists = pLangTable->Seek(ULONG(eLang));
- else if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))||
- CreateLanguageFile(LANGUAGE_DONTKNOW, TRUE))
- pLists = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ if(pLangTable->IsKeyValid(sal_uLong(eLang)))
+ pLists = pLangTable->Seek(sal_uLong(eLang));
+ else if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))||
+ CreateLanguageFile(LANGUAGE_DONTKNOW, sal_True))
+ pLists = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
DBG_ASSERT(pLists, "keine Autokorrekturdatei");
return pLists->AddToWrdSttExceptList(rNew);
}
@@ -1554,12 +1554,12 @@ void SvxAutoCorrect::SetShareAutoCorrFileName( const String& rNew )
}
-BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
+sal_Bool SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
const String& rTxt, xub_StrLen nPos,
String& rWord ) const
{
if( !nPos )
- return FALSE;
+ return sal_False;
xub_StrLen nEnde = nPos;
@@ -1567,7 +1567,7 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
if( ( nPos < rTxt.Len() &&
!IsWordDelim( rTxt.GetChar( nPos ))) ||
IsWordDelim( rTxt.GetChar( --nPos )))
- return FALSE;
+ return sal_False;
while( nPos && !IsWordDelim( rTxt.GetChar( --nPos )))
;
@@ -1580,14 +1580,14 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
while( lcl_IsInAsciiArr( sImplSttSkipChars, rTxt.GetChar( nCapLttrPos )) )
if( ++nCapLttrPos >= nEnde )
- return FALSE;
+ return sal_False;
// Bug 19285: Symbolzeichen nicht anfassen
// Interresant erst ab 3 Zeichen
if( 3 > nEnde - nCapLttrPos )
- return FALSE;
+ return sal_False;
- LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, FALSE );
+ LanguageType eLang = rDoc.GetLanguage( nCapLttrPos, sal_False );
if( LANGUAGE_SYSTEM == eLang )
eLang = MsLangId::getSystemLanguage();
@@ -1595,24 +1595,24 @@ BOOL SvxAutoCorrect::GetPrevAutoCorrWord( SvxAutoCorrDoc& rDoc,
CharClass& rCC = pThis->GetCharClass( eLang );
if( lcl_IsSymbolChar( rCC, rTxt, nCapLttrPos, nEnde ))
- return FALSE;
+ return sal_False;
rWord = rTxt.Copy( nCapLttrPos, nEnde - nCapLttrPos );
- return TRUE;
+ return sal_True;
}
-BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile )
+sal_Bool SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, sal_Bool bNewFile )
{
- DBG_ASSERT(!pLangTable->IsKeyValid(ULONG(eLang)), "Sprache ist bereits vorhanden");
+ DBG_ASSERT(!pLangTable->IsKeyValid(sal_uLong(eLang)), "Sprache ist bereits vorhanden");
- String sUserDirFile( GetAutoCorrFileName( eLang, TRUE, FALSE )),
+ String sUserDirFile( GetAutoCorrFileName( eLang, sal_True, sal_False )),
sShareDirFile( sUserDirFile );
SvxAutoCorrectLanguageListsPtr pLists = 0;
Time nMinTime( 0, 2 ), nAktTime, nLastCheckTime;
- ULONG nFndPos;
+ sal_uLong nFndPos;
if( TABLE_ENTRY_NOTFOUND !=
- pLastFileTable->SearchKey( ULONG( eLang ), &nFndPos ) &&
+ pLastFileTable->SearchKey( sal_uLong( eLang ), &nFndPos ) &&
( nLastCheckTime.SetTime( pLastFileTable->GetObject( nFndPos )),
nLastCheckTime < nAktTime ) &&
( nAktTime - nLastCheckTime ) < nMinTime )
@@ -1624,60 +1624,60 @@ BOOL SvxAutoCorrect::CreateLanguageFile( LanguageType eLang, BOOL bNewFile )
sShareDirFile = sUserDirFile;
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile,
sUserDirFile, eLang );
- pLangTable->Insert( ULONG(eLang), pLists );
- pLastFileTable->Remove( ULONG( eLang ) );
+ pLangTable->Insert( sal_uLong(eLang), pLists );
+ pLastFileTable->Remove( sal_uLong( eLang ) );
}
}
else if( ( FStatHelper::IsDocument( sUserDirFile ) ||
FStatHelper::IsDocument( sShareDirFile =
- GetAutoCorrFileName( eLang, FALSE, FALSE ) ) ) ||
+ GetAutoCorrFileName( eLang, sal_False, sal_False ) ) ) ||
( sShareDirFile = sUserDirFile, bNewFile ))
{
pLists = new SvxAutoCorrectLanguageLists( *this, sShareDirFile,
sUserDirFile, eLang );
- pLangTable->Insert( ULONG(eLang), pLists );
- pLastFileTable->Remove( ULONG( eLang ) );
+ pLangTable->Insert( sal_uLong(eLang), pLists );
+ pLastFileTable->Remove( sal_uLong( eLang ) );
}
else if( !bNewFile )
{
- if( !pLastFileTable->Insert( ULONG( eLang ), nAktTime.GetTime() ))
- pLastFileTable->Replace( ULONG( eLang ), nAktTime.GetTime() );
+ if( !pLastFileTable->Insert( sal_uLong( eLang ), nAktTime.GetTime() ))
+ pLastFileTable->Replace( sal_uLong( eLang ), nAktTime.GetTime() );
}
return pLists != 0;
}
-BOOL SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
+sal_Bool SvxAutoCorrect::PutText( const String& rShort, const String& rLong,
LanguageType eLang )
{
- BOOL bRet = FALSE;
- if( pLangTable->IsKeyValid( ULONG(eLang)) || CreateLanguageFile(eLang) )
- bRet = pLangTable->Seek( ULONG(eLang) )->PutText(rShort, rLong);
+ sal_Bool bRet = sal_False;
+ if( pLangTable->IsKeyValid( sal_uLong(eLang)) || CreateLanguageFile(eLang) )
+ bRet = pLangTable->Seek( sal_uLong(eLang) )->PutText(rShort, rLong);
return bRet;
}
// - loesche einen Eintrag
-BOOL SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang )
+sal_Bool SvxAutoCorrect::DeleteText( const String& rShort, LanguageType eLang )
{
- BOOL bRet = FALSE;
- if( pLangTable->IsKeyValid( ULONG( eLang )) )
- bRet = pLangTable->Seek( ULONG( eLang ))->DeleteText( rShort );
+ sal_Bool bRet = sal_False;
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) )
+ bRet = pLangTable->Seek( sal_uLong( eLang ))->DeleteText( rShort );
return bRet;
}
// - return den Ersetzungstext (nur fuer SWG-Format, alle anderen
// koennen aus der Wortliste herausgeholt werden!)
-BOOL SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& )
+sal_Bool SvxAutoCorrect::GetLongText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String& , String& )
{
- return FALSE;
+ return sal_False;
}
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
-BOOL SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&,
+sal_Bool SvxAutoCorrect::PutText( const com::sun::star::uno::Reference < com::sun::star::embed::XStorage >&, const String&, const String&, SfxObjectShell&,
String& )
{
- return FALSE;
+ return sal_False;
}
void EncryptBlockName_Imp( String& rName )
@@ -1773,11 +1773,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
// zuerst nach eLang suchen, dann nach der Obersprache
// US-Englisch -> Englisch und zuletzt in LANGUAGE_DONTKNOW
- if( pLangTable->IsKeyValid( ULONG( eLang ) ) ||
- CreateLanguageFile( eLang, FALSE ))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang ) ) ||
+ CreateLanguageFile( eLang, sal_False ))
{
//die Sprache ist vorhanden - also her damit
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang));
pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc );
if( pRet )
{
@@ -1787,16 +1787,16 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
}
// wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
- ULONG nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE
+ sal_uLong nTmpKey1 = eLang & 0x7ff, // die Hauptsprache in vielen Faellen u.B. DE
nTmpKey2 = eLang & 0x3ff, // sonst z.B. EN
nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//die Sprache ist vorhanden - also her damit
SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek( nTmp );
@@ -1807,11 +1807,11 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
return pRet;
}
}
- if( pLangTable->IsKeyValid( ULONG( LANGUAGE_DONTKNOW ) ) ||
- CreateLanguageFile( LANGUAGE_DONTKNOW, FALSE ) )
+ if( pLangTable->IsKeyValid( sal_uLong( LANGUAGE_DONTKNOW ) ) ||
+ CreateLanguageFile( LANGUAGE_DONTKNOW, sal_False ) )
{
//die Sprache ist vorhanden - also her damit
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
pRet = lcl_SearchWordsInList( pList, rTxt, rStt, nEndPos, rDoc);
if( pRet )
{
@@ -1824,60 +1824,60 @@ const SvxAutocorrWord* SvxAutoCorrect::SearchWordsInList(
/* -----------------18.11.98 13:46-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
+sal_Bool SvxAutoCorrect::FindInWrdSttExceptList( LanguageType eLang,
const String& sWord )
{
//zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch
//und zuletzt in LANGUAGE_DONTKNOW
- ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
- ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
+ sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
+ sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
String sTemp(sWord);
- if( pLangTable->IsKeyValid( ULONG( eLang )) ||
- CreateLanguageFile( eLang, FALSE ) )
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) ||
+ CreateLanguageFile( eLang, sal_False ) )
{
//die Sprache ist vorhanden - also her damit
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(eLang));
String _sTemp(sWord);
if(pList->GetWrdSttExceptList()->Seek_Entry(&_sTemp))
- return TRUE;
+ return sal_True;
}
// wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
- ULONG nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ sal_uLong nTmp;
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//die Sprache ist vorhanden - also her damit
SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(nTmp);
if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
- return TRUE;
+ return sal_True;
}
- if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False))
{
//die Sprache ist vorhanden - also her damit
- SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(ULONG(LANGUAGE_DONTKNOW));
+ SvxAutoCorrectLanguageListsPtr pList = pLangTable->Seek(sal_uLong(LANGUAGE_DONTKNOW));
if(pList->GetWrdSttExceptList()->Seek_Entry(&sTemp))
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
/* -----------------18.11.98 14:28-------------------
*
* --------------------------------------------------*/
-BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
+sal_Bool lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
{
String sAbk( '~' );
- USHORT nPos;
+ sal_uInt16 nPos;
pList->Seek_Entry( &sAbk, &nPos );
if( nPos < pList->Count() )
{
String sLowerWord( sWord ); sLowerWord.ToLowerAscii();
const String* pAbk;
- for( USHORT n = nPos;
+ for( sal_uInt16 n = nPos;
n < pList->Count() &&
'~' == ( pAbk = (*pList)[ n ])->GetChar( 0 );
++n )
@@ -1889,7 +1889,7 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
for( xub_StrLen i = sLowerAbk.Len(), ii = sLowerWord.Len(); i; )
{
if( !--i ) // stimmt ueberein
- return TRUE;
+ return sal_True;
if( sLowerAbk.GetChar( i ) != sLowerWord.GetChar( --ii ))
break;
@@ -1899,56 +1899,56 @@ BOOL lcl_FindAbbreviation( const SvStringsISortDtor* pList, const String& sWord)
}
DBG_ASSERT( !(nPos && '~' == (*pList)[ --nPos ]->GetChar( 0 ) ),
"falsch sortierte ExeptionListe?" );
- return FALSE;
+ return sal_False;
}
/* -----------------18.11.98 14:49-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
- const String& sWord, BOOL bAbbreviation)
+sal_Bool SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
+ const String& sWord, sal_Bool bAbbreviation)
{
//zuerst nach eLang suchen, dann nach der Obersprace US-Englisch -> Englisch
//und zuletzt in LANGUAGE_DONTKNOW
- ULONG nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
- ULONG nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
+ sal_uLong nTmpKey1 = eLang & 0x7ff; // die Hauptsprache in vielen Faellen u.B. DE
+ sal_uLong nTmpKey2 = eLang & 0x3ff; // sonst z.B. EN
String sTemp( sWord );
- if( pLangTable->IsKeyValid( ULONG( eLang )) ||
- CreateLanguageFile( eLang, FALSE ))
+ if( pLangTable->IsKeyValid( sal_uLong( eLang )) ||
+ CreateLanguageFile( eLang, sal_False ))
{
//die Sprache ist vorhanden - also her damit
- SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(ULONG(eLang));
+ SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(sal_uLong(eLang));
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
// wenn es hier noch nicht gefunden werden konnte, dann weitersuchen
- ULONG nTmp;
+ sal_uLong nTmp;
- if( ((nTmp = nTmpKey1) != (ULONG)eLang &&
+ if( ((nTmp = nTmpKey1) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey1 ) ||
- CreateLanguageFile( LanguageType( nTmpKey1 ), FALSE ) )) ||
- (( nTmp = nTmpKey2) != (ULONG)eLang &&
+ CreateLanguageFile( LanguageType( nTmpKey1 ), sal_False ) )) ||
+ (( nTmp = nTmpKey2) != (sal_uLong)eLang &&
( pLangTable->IsKeyValid( nTmpKey2 ) ||
- CreateLanguageFile( LanguageType( nTmpKey2 ), FALSE ) )) )
+ CreateLanguageFile( LanguageType( nTmpKey2 ), sal_False ) )) )
{
//die Sprache ist vorhanden - also her damit
SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(nTmp);
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
- if(pLangTable->IsKeyValid(ULONG(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, FALSE))
+ if(pLangTable->IsKeyValid(sal_uLong(LANGUAGE_DONTKNOW))|| CreateLanguageFile(LANGUAGE_DONTKNOW, sal_False))
{
//die Sprache ist vorhanden - also her damit
SvxAutoCorrectLanguageListsPtr pLists = pLangTable->Seek(LANGUAGE_DONTKNOW);
const SvStringsISortDtor* pList = pLists->GetCplSttExceptList();
if(bAbbreviation ? lcl_FindAbbreviation( pList, sWord)
: pList->Seek_Entry( &sTemp ) )
- return TRUE;
+ return sal_True;
}
- return FALSE;
+ return sal_False;
}
@@ -1956,7 +1956,7 @@ BOOL SvxAutoCorrect::FindInCplSttExceptList(LanguageType eLang,
*
* --------------------------------------------------*/
String SvxAutoCorrect::GetAutoCorrFileName( LanguageType eLang,
- BOOL bNewFile, BOOL bTst ) const
+ sal_Bool bNewFile, sal_Bool bTst ) const
{
String sRet, sExt( MsLangId::convertLanguageToIsoString( eLang ) );
sExt.Insert('_', 0);
@@ -2007,11 +2007,11 @@ SvxAutoCorrectLanguageLists::~SvxAutoCorrectLanguageLists()
/* -----------------18.11.98 11:26-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
+sal_Bool SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
{
// nur alle 2 Minuten aufs FileSystem zugreifen um den
// Dateistempel zu ueberpruefen
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
Time nMinTime( 0, 2 );
Time nAktTime;
@@ -2023,7 +2023,7 @@ BOOL SvxAutoCorrectLanguageLists::IsFileChanged_Imp()
&aTstDate, &aTstTime ) &&
( aModifiedDate != aTstDate || aModifiedTime != aTstTime ))
{
- bRet = TRUE;
+ bRet = sal_True;
// dann mal schnell alle Listen entfernen!
if( CplSttLstLoad & nFlags && pCplStt_ExcptLst )
delete pCplStt_ExcptLst, pCplStt_ExcptLst = 0;
@@ -2133,7 +2133,7 @@ void SvxAutoCorrectLanguageLists::SaveExceptList_Imp(
const SvStringsISortDtor& rLst,
const sal_Char* pStrmName,
SotStorageRef &rStg,
- BOOL bConvert )
+ sal_Bool bConvert )
{
if( rStg.Is() )
{
@@ -2287,13 +2287,13 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::GetCplSttExceptList()
/* -----------------18.11.98 11:26-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
+sal_Bool SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
{
String* pNew = new String( rNew );
if( rNew.Len() && GetCplSttExceptList()->Insert( pNew ) )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2310,14 +2310,14 @@ BOOL SvxAutoCorrectLanguageLists::AddToCplSttExceptList(const String& rNew)
/* -----------------18.11.98 15:20-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
+sal_Bool SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
{
String* pNew = new String( rNew );
SvStringsISortDtor* pExceptList = LoadWrdSttExceptList();
if( rNew.Len() && pExceptList && pExceptList->Insert( pNew ) )
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2337,7 +2337,7 @@ BOOL SvxAutoCorrectLanguageLists::AddToWrdSttExceptList(const String& rNew)
* --------------------------------------------------*/
SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplCplStt_ExcptLstStr ) );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2351,7 +2351,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadCplSttExceptList()
void SvxAutoCorrectLanguageLists::SaveCplSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pCplStt_ExcptLst, pXMLImplCplStt_ExcptLstStr, xStg );
@@ -2384,7 +2384,7 @@ void SvxAutoCorrectLanguageLists::SetCplSttExceptList( SvStringsISortDtor* pList
* --------------------------------------------------*/
SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
{
- SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, TRUE );
+ SotStorageRef xStg = new SotStorage( sShareAutoCorrFile, STREAM_READ | STREAM_SHARE_DENYNONE, sal_True );
String sTemp ( RTL_CONSTASCII_USTRINGPARAM ( pXMLImplWrdStt_ExcptLstStr ) );
if( xStg.Is() && xStg->IsContained( sTemp ) )
LoadXMLExceptList_Imp( pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2396,7 +2396,7 @@ SvStringsISortDtor* SvxAutoCorrectLanguageLists::LoadWrdSttExceptList()
void SvxAutoCorrectLanguageLists::SaveWrdSttExceptList()
{
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
SaveExceptList_Imp( *pWrdStt_ExcptLst, pXMLImplWrdStt_ExcptLstStr, xStg );
@@ -2437,7 +2437,7 @@ void SvxAutoCorrectLanguageLists::RemoveStream_Imp( const String& rName )
{
if( sShareAutoCorrFile != sUserAutoCorrFile )
{
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
if( xStg.Is() && SVSTREAM_OK == xStg->GetError() &&
xStg->IsStream( rName ) )
{
@@ -2495,7 +2495,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
aInfo.NameClash = NameClash::OVERWRITE;
aInfo.NewTitle = aDest.GetName();
aInfo.SourceURL = aSource.GetMainURL( INetURLObject::DECODE_TO_IURI );
- aInfo.MoveData = FALSE;
+ aInfo.MoveData = sal_False;
aAny <<= aInfo;
aNewContent.executeCommand( OUString ( RTL_CONSTASCII_USTRINGPARAM( "transfer" ) ), aAny);
}
@@ -2506,8 +2506,8 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
}
if (bConvert && !bError)
{
- SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, TRUE );
- SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, TRUE );
+ SotStorageRef xSrcStg = new SotStorage( aDest.GetMainURL( INetURLObject::DECODE_TO_IURI ), STREAM_READ, sal_True );
+ SotStorageRef xDstStg = new SotStorage( sUserAutoCorrFile, STREAM_WRITE, sal_True );
if( xSrcStg.Is() && xDstStg.Is() )
{
@@ -2522,7 +2522,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
if (pTmpWordList)
{
- SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, TRUE );
+ SaveExceptList_Imp( *pTmpWordList, pXMLImplWrdStt_ExcptLstStr, xDstStg, sal_True );
pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() );
pTmpWordList = NULL;
}
@@ -2533,7 +2533,7 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
if (pTmpWordList)
{
- SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, TRUE );
+ SaveExceptList_Imp( *pTmpWordList, pXMLImplCplStt_ExcptLstStr, xDstStg, sal_True );
pTmpWordList->DeleteAndDestroy( 0, pTmpWordList->Count() );
}
@@ -2560,10 +2560,10 @@ void SvxAutoCorrectLanguageLists::MakeUserStorage_Impl()
/* -----------------18.11.98 11:26-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
+sal_Bool SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
{
String sStrmName( pXMLImplAutocorr_ListStr, RTL_TEXTENCODING_MS_1252 );
- BOOL bRet = TRUE, bRemove = !pAutocorr_List || !pAutocorr_List->Count();
+ sal_Bool bRet = sal_True, bRemove = !pAutocorr_List || !pAutocorr_List->Count();
if( !bRemove )
{
/*
@@ -2617,8 +2617,8 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
rStg.Commit();
if( SVSTREAM_OK != rStg.GetError() )
{
- bRemove = TRUE;
- bRet = FALSE;
+ bRemove = sal_True;
+ bRet = sal_False;
}
}
@@ -2629,11 +2629,11 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
String aDummy; // Erkennungszeichen fuer neue Streams
refList->WriteByteString( aDummy, RTL_TEXTENCODING_MS_1252 )
- << (BYTE) 4 // Laenge des Headers (ohne den Leerstring)
- << (USHORT)WORDLIST_VERSION_358 // Version des Streams
- << (BYTE)eEncoding; // der Zeichensatz
+ << (sal_uInt8) 4 // Laenge des Headers (ohne den Leerstring)
+ << (sal_uInt16)WORDLIST_VERSION_358 // Version des Streams
+ << (sal_uInt8)eEncoding; // der Zeichensatz
- for( USHORT i = 0; i < pAutocorr_List->Count() &&
+ for( sal_uInt16 i = 0; i < pAutocorr_List->Count() &&
SVSTREAM_OK == refList->GetError(); ++i )
{
SvxAutocorrWord* p = pAutocorr_List->GetObject( i );
@@ -2650,14 +2650,14 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
rStg.Commit();
if( SVSTREAM_OK != rStg.GetError() )
{
- bRemove = TRUE;
- bRet = FALSE;
+ bRemove = sal_True;
+ bRet = sal_False;
}
}
*/
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
if( bRemove )
@@ -2672,16 +2672,16 @@ BOOL SvxAutoCorrectLanguageLists::MakeBlocklist_Imp( SvStorage& rStg )
/* -----------------18.11.98 11:26-------------------
*
* --------------------------------------------------*/
-BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
const String& rLong )
{
// erstmal akt. Liste besorgen!
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
- BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+ sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
/* if( bRet )
{
@@ -2691,8 +2691,8 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
// die Wortliste aktualisieren
if( bRet )
{
- USHORT nPos;
- SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, TRUE );
+ sal_uInt16 nPos;
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, rLong, sal_True );
if( pAutocorr_List->Seek_Entry( pNew, &nPos ) )
{
if( !(*pAutocorr_List)[ nPos ]->IsTextOnly() )
@@ -2718,7 +2718,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
else
{
delete pNew;
- bRet = FALSE;
+ bRet = sal_False;
}
}
return bRet;
@@ -2727,7 +2727,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
*
* --------------------------------------------------*/
// - Text mit Attributierung (kann nur der SWG - SWG-Format!)
-BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
+sal_Bool SvxAutoCorrectLanguageLists::PutText( const String& rShort,
SfxObjectShell& rShell )
{
// erstmal akt. Liste besorgen!
@@ -2735,7 +2735,7 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
MakeUserStorage_Impl();
- BOOL bRet = FALSE;
+ sal_Bool bRet = sal_False;
String sLong;
try
{
@@ -2749,10 +2749,10 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
// die Wortliste aktualisieren
if( bRet )
{
- SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, FALSE );
+ SvxAutocorrWord* pNew = new SvxAutocorrWord( rShort, sLong, sal_False );
if( pAutocorr_List->Insert( pNew ) )
{
- SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
+ SotStorageRef xStor = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
MakeBlocklist_Imp( *xStor );
}
else
@@ -2770,18 +2770,18 @@ BOOL SvxAutoCorrectLanguageLists::PutText( const String& rShort,
*
* --------------------------------------------------*/
// - loesche einen Eintrag
-BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
+sal_Bool SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
{
// erstmal akt. Liste besorgen!
GetAutocorrWordList();
MakeUserStorage_Impl();
- SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, TRUE );
- BOOL bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
+ SotStorageRef xStg = new SotStorage( sUserAutoCorrFile, STREAM_READWRITE, sal_True );
+ sal_Bool bRet = xStg.Is() && SVSTREAM_OK == xStg->GetError();
if( bRet )
{
- USHORT nPos;
+ sal_uInt16 nPos;
SvxAutocorrWord aTmp( rShort, rShort );
if( pAutocorr_List->Seek_Entry( &aTmp, &nPos ) )
{
@@ -2806,7 +2806,7 @@ BOOL SvxAutoCorrectLanguageLists::DeleteText( const String& rShort )
xStg = 0;
}
else
- bRet = FALSE;
+ bRet = sal_False;
}
return bRet;
}
diff --git a/editeng/source/misc/swafopt.cxx b/editeng/source/misc/swafopt.cxx
index f693ce0270f8..79222cad5fdc 100644
--- a/editeng/source/misc/swafopt.cxx
+++ b/editeng/source/misc/swafopt.cxx
@@ -56,14 +56,14 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
bAFmtDelSpacesBetweenLines =
bAFmtByInpDelSpacesAtSttEnd =
bAFmtByInpDelSpacesBetweenLines =
- bDummy = TRUE;
+ bDummy = sal_True;
bReplaceStyles =
bDelEmptyNode =
bWithRedlining =
bAutoCmpltEndless =
bAutoCmpltAppendBlanc =
- bAutoCmpltShowAsTip = FALSE;
+ bAutoCmpltShowAsTip = sal_False;
bSetBorder =
bCreateTable =
@@ -72,10 +72,10 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
bRightMargin =
bAutoCompleteWords =
bAutoCmpltCollectWords =
- bAutoCmpltKeepList = TRUE;
+ bAutoCmpltKeepList = sal_True;
bDummy6 = bDummy7 = bDummy8 =
- FALSE;
+ sal_False;
nRightMargin = 50; // dflt. 50 %
nAutoCmpltExpandKey = KEY_RETURN;
@@ -84,7 +84,7 @@ SvxSwAutoFmtFlags::SvxSwAutoFmtFlags()
aBulletFont.SetFamily( FAMILY_DONTKNOW );
aBulletFont.SetPitch( PITCH_DONTKNOW );
aBulletFont.SetWeight( WEIGHT_DONTKNOW );
- aBulletFont.SetTransparent( TRUE );
+ aBulletFont.SetTransparent( sal_True );
cBullet = 0x2022;
cByInputBullet = cBullet;
diff --git a/editeng/source/misc/txtrange.cxx b/editeng/source/misc/txtrange.cxx
index a69fd59439c2..5f55fcd02acf 100644
--- a/editeng/source/misc/txtrange.cxx
+++ b/editeng/source/misc/txtrange.cxx
@@ -46,8 +46,8 @@
*************************************************************************/
TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const basegfx::B2DPolyPolygon* pLinePolyPolygon,
- USHORT nCacheSz, USHORT nLft, USHORT nRght, BOOL bSimpl, BOOL bInnr,
- BOOL bVert ) :
+ sal_uInt16 nCacheSz, sal_uInt16 nLft, sal_uInt16 nRght, sal_Bool bSimpl, sal_Bool bInnr,
+ sal_Bool bVert ) :
pBound( NULL ),
nCacheSize( nCacheSz ),
nCacheIdx( 0 ),
@@ -61,7 +61,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg
bVertical( bVert )
{
#ifdef DBG_UTIL
- bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = FALSE;
+ bFlag3 = bFlag4 = bFlag5 = bFlag6 = bFlag7 = sal_False;
#endif
pRangeArr = new Range[ nCacheSize ];
pCache = new SvLongsPtr[ nCacheSize ];
@@ -105,7 +105,7 @@ TextRanger::TextRanger( const basegfx::B2DPolyPolygon& rPolyPolygon, const baseg
TextRanger::~TextRanger()
{
- for( USHORT i = 0; i < nCacheSize; ++i )
+ for( sal_uInt16 i = 0; i < nCacheSize; ++i )
delete pCache[i];
delete[] pCache;
delete[] pRangeArr;
@@ -119,12 +119,12 @@ TextRanger::~TextRanger()
* the cache has to be cleared.
* --------------------------------------------------*/
-void TextRanger::SetVertical( BOOL bNew )
+void TextRanger::SetVertical( sal_Bool bNew )
{
if( IsVertical() != bNew )
{
bVertical = bNew;
- for( USHORT i = 0; i < nCacheSize; ++i )
+ for( sal_uInt16 i = 0; i < nCacheSize; ++i )
delete pCache[i];
memset( pRangeArr, 0, nCacheSize * sizeof( Range ) );
memset( pCache, 0, nCacheSize * sizeof( SvLongsPtr ) );
@@ -156,17 +156,17 @@ class SvxBoundArgs
long nLower;
long nStart;
long nEnd;
- USHORT nCut;
- USHORT nLast;
- USHORT nNext;
- BYTE nAct;
- BYTE nFirst;
- BOOL bClosed : 1;
- BOOL bInner : 1;
- BOOL bMultiple : 1;
- BOOL bConcat : 1;
- BOOL bRotate : 1;
- void NoteRange( BOOL bToggle );
+ sal_uInt16 nCut;
+ sal_uInt16 nLast;
+ sal_uInt16 nNext;
+ sal_uInt8 nAct;
+ sal_uInt8 nFirst;
+ sal_Bool bClosed : 1;
+ sal_Bool bInner : 1;
+ sal_Bool bMultiple : 1;
+ sal_Bool bConcat : 1;
+ sal_Bool bRotate : 1;
+ void NoteRange( sal_Bool bToggle );
long Cut( long nY, const Point& rPt1, const Point& rPt2 );
void Add();
void _NoteFarPoint( long nPx, long nPyDiff, long nDiff );
@@ -181,17 +181,17 @@ public:
void NotePoint( const long nA ) { NoteMargin( nA - nStart, nA + nEnd ); }
void NoteMargin( const long nL, const long nR )
{ if( nMin > nL ) nMin = nL; if( nMax < nR ) nMax = nR; }
- USHORT Area( const Point& rPt );
- void NoteUpLow( long nA, const BYTE nArea );
+ sal_uInt16 Area( const Point& rPt );
+ void NoteUpLow( long nA, const sal_uInt8 nArea );
void Calc( const PolyPolygon& rPoly );
void Concat( const PolyPolygon* pPoly );
// inlines
void NoteLast() { if( bMultiple ) NoteRange( nAct == nFirst ); }
- void SetClosed( const BOOL bNew ){ bClosed = bNew; }
- BOOL IsClosed() const { return bClosed; }
- void SetConcat( const BOOL bNew ){ bConcat = bNew; }
- BOOL IsConcat() const { return bConcat; }
- BYTE GetAct() const { return nAct; }
+ void SetClosed( const sal_Bool bNew ){ bClosed = bNew; }
+ sal_Bool IsClosed() const { return bClosed; }
+ void SetConcat( const sal_Bool bNew ){ bConcat = bNew; }
+ sal_Bool IsConcat() const { return bConcat; }
+ sal_uInt8 GetAct() const { return nAct; }
};
SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
@@ -199,7 +199,7 @@ SvxBoundArgs::SvxBoundArgs( TextRanger* pRanger, SvLongs *pLong,
: pLongArr( pLong ), pTextRanger( pRanger ),
nTop( rRange.Min() ), nBottom( rRange.Max() ),
bInner( pRanger->IsInner() ), bMultiple( bInner || !pRanger->IsSimple() ),
- bConcat( FALSE ), bRotate( pRanger->IsVertical() )
+ bConcat( sal_False ), bRotate( pRanger->IsVertical() )
{
if( bRotate )
{
@@ -236,7 +236,7 @@ long SvxBoundArgs::CalcMax( const Point& rPt1, const Point& rPt2,
nB += nDa * nDa;
nB = nRange + nDa * ( nFarRange - nRange ) / sqrt( nB );
- BOOL bNote;
+ sal_Bool bNote;
if( nB < B(rPt2) )
bNote = nB > B(rPt1);
else
@@ -282,19 +282,19 @@ void SvxBoundArgs::_NoteFarPoint( long nPa, long nPbDiff, long nDiff )
NoteMargin( nTmpA, nPbDiff );
}
-void SvxBoundArgs::NoteRange( BOOL bToggle )
+void SvxBoundArgs::NoteRange( sal_Bool bToggle )
{
DBG_ASSERT( nMax >= nMin || bInner, "NoteRange: Min > Max?");
if( nMax < nMin )
return;
if( !bClosed )
- bToggle = FALSE;
- USHORT nIdx = 0;
- USHORT nCount = pLongArr->Count();
+ bToggle = sal_False;
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 nCount = pLongArr->Count();
DBG_ASSERT( nCount == 2 * aBoolArr.size(), "NoteRange: Incompatible Sizes" );
while( nIdx < nCount && (*pLongArr)[ nIdx ] < nMin )
++nIdx;
- BOOL bOdd = nIdx % 2 ? TRUE : FALSE;
+ sal_Bool bOdd = nIdx % 2 ? sal_True : sal_False;
// Kein Ueberlappung mit vorhandenen Intervallen?
if( nIdx == nCount || ( !bOdd && nMax < (*pLongArr)[ nIdx ] ) )
{ // Dann wird ein neues eingefuegt ...
@@ -304,7 +304,7 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
}
else
{ // ein vorhandes Intervall erweitern ...
- USHORT nMaxIdx = nIdx;
+ sal_uInt16 nMaxIdx = nIdx;
// Wenn wir auf einer linken Intervallgrenze gelandet sind, muss diese
// auf nMin gesenkt werden.
if( bOdd )
@@ -323,14 +323,14 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
if( nMaxIdx % 2 )
(*pLongArr)[ nMaxIdx-- ] = nMax;
// Jetzt werden eventuell noch Intervalle verschmolzen
- USHORT nDiff = nMaxIdx - nIdx;
+ sal_uInt16 nDiff = nMaxIdx - nIdx;
nMaxIdx = nIdx / 2; // Ab hier ist nMaxIdx der Index im BoolArray.
if( nDiff )
{
(*pLongArr).Remove( nIdx + 1, nDiff );
nDiff /= 2;
- USHORT nStop = nMaxIdx + nDiff;
- for( USHORT i = nMaxIdx; i < nStop; ++i )
+ sal_uInt16 nStop = nMaxIdx + nDiff;
+ for( sal_uInt16 i = nMaxIdx; i < nStop; ++i )
bToggle ^= aBoolArr[ i ];
aBoolArr.erase( aBoolArr.begin() + nMaxIdx, aBoolArr.begin() + (nMaxIdx + nDiff) );
}
@@ -341,9 +341,9 @@ void SvxBoundArgs::NoteRange( BOOL bToggle )
void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
{
- USHORT nCount;
+ sal_uInt16 nCount;
nAct = 0;
- for( USHORT i = 0; i < rPoly.Count(); ++i )
+ for( sal_uInt16 i = 0; i < rPoly.Count(); ++i )
{
const Polygon& rPol = rPoly[ i ];
nCount = rPol.GetSize();
@@ -389,8 +389,8 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
}
if( nCount > 1 )
{
- USHORT nIdx = 1;
- while( TRUE )
+ sal_uInt16 nIdx = 1;
+ while( sal_True )
{
const Point& rLast = rPol[ nIdx - 1 ];
if( nIdx == nCount )
@@ -398,7 +398,7 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
const Point& rNext = rPol[ nIdx ];
nNext = Area( rNext );
nCut = nNext ^ nLast;
- USHORT nOldAct = nAct;
+ sal_uInt16 nOldAct = nAct;
if( nAct )
CheckCut( rLast, rNext );
if( nCut & 4 )
@@ -478,18 +478,18 @@ void SvxBoundArgs::Calc( const PolyPolygon& rPoly )
void SvxBoundArgs::Add()
{
- USHORT nLongIdx = 1;
+ sal_uInt16 nLongIdx = 1;
size_t nCount = aBoolArr.size();
if( nCount && ( !bInner || !pTextRanger->IsSimple() ) )
{
- BOOL bDelete = aBoolArr.front();
+ sal_Bool bDelete = aBoolArr.front();
if( bInner )
bDelete = !bDelete;
for( size_t nBoolIdx = 1; nBoolIdx < nCount; ++nBoolIdx )
{
if( bDelete )
{
- USHORT next = 2;
+ sal_uInt16 next = 2;
while( nBoolIdx < nCount && !aBoolArr[ nBoolIdx++ ] &&
(!bInner || nBoolIdx < nCount ) )
next += 2;
@@ -499,7 +499,7 @@ void SvxBoundArgs::Add()
nCount = nCount - next;
aBoolArr.erase( aBoolArr.begin() + nBoolIdx, aBoolArr.begin() + (nBoolIdx + next) );
if( nBoolIdx )
- aBoolArr[ nBoolIdx - 1 ] = FALSE;
+ aBoolArr[ nBoolIdx - 1 ] = sal_False;
#if OSL_DEBUG_LEVEL > 1
else
++next;
@@ -534,20 +534,20 @@ void SvxBoundArgs::Add()
void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
{
- SetConcat( TRUE );
+ SetConcat( sal_True );
DBG_ASSERT( pPoly, "Nothing to do?" );
SvLongs *pOld = pLongArr;
pLongArr = new SvLongs( 2, 8 );
aBoolArr.clear();
- bInner = FALSE;
+ bInner = sal_False;
Calc( *pPoly );
- USHORT nCount = pLongArr->Count();
- USHORT nIdx = 0;
- USHORT i = 0;
- BOOL bSubtract = pTextRanger->IsInner();
+ sal_uInt16 nCount = pLongArr->Count();
+ sal_uInt16 nIdx = 0;
+ sal_uInt16 i = 0;
+ sal_Bool bSubtract = pTextRanger->IsInner();
while( i < nCount )
{
- USHORT nOldCount = pOld->Count();
+ sal_uInt16 nOldCount = pOld->Count();
if( nIdx == nOldCount )
{ // Am Ende des alten Arrays angelangt...
if( !bSubtract )
@@ -556,7 +556,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
}
long nLeft = (*pLongArr)[ i++ ];
long nRight = (*pLongArr)[ i++ ];
- USHORT nLeftPos = nIdx + 1;
+ sal_uInt16 nLeftPos = nIdx + 1;
while( nLeftPos < nOldCount && nLeft > (*pOld)[ nLeftPos ] )
nLeftPos += 2;
if( nLeftPos >= nOldCount )
@@ -565,7 +565,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
pOld->Insert( pLongArr, nOldCount, i - 2, USHRT_MAX );
break;
}
- USHORT nRightPos = nLeftPos - 1;
+ sal_uInt16 nRightPos = nLeftPos - 1;
while( nRightPos < nOldCount && nRight >= (*pOld)[ nRightPos ] )
nRightPos += 2;
if( nRightPos < nLeftPos )
@@ -618,7 +618,7 @@ void SvxBoundArgs::Concat( const PolyPolygon* pPoly )
*10 = oberhalb des unteren Randes
*************************************************************************/
-USHORT SvxBoundArgs::Area( const Point& rPt )
+sal_uInt16 SvxBoundArgs::Area( const Point& rPt )
{
long nB = B( rPt );
if( nB >= nBottom )
@@ -658,7 +658,7 @@ long SvxBoundArgs::Cut( long nB, const Point& rPt1, const Point& rPt2 )
return long( rPt1.X() + nQuot );
}
-void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea )
+void SvxBoundArgs::NoteUpLow( long nA, const sal_uInt8 nArea )
{
if( nAct )
{
@@ -682,7 +682,7 @@ void SvxBoundArgs::NoteUpLow( long nA, const BYTE nArea )
SvLongsPtr TextRanger::GetTextRanges( const Range& rRange )
{
DBG_ASSERT( rRange.Min() || rRange.Max(), "Zero-Range not allowed, Bye Bye" );
- USHORT nIndex = 0;
+ sal_uInt16 nIndex = 0;
while( nIndex < nCacheSize && rRange != pRangeArr[ nIndex ] )
++nIndex;
if( nIndex >= nCacheSize )
diff --git a/editeng/source/misc/unolingu.cxx b/editeng/source/misc/unolingu.cxx
index ae92fd1a01b8..f619f2fbf86b 100755
--- a/editeng/source/misc/unolingu.cxx
+++ b/editeng/source/misc/unolingu.cxx
@@ -97,12 +97,12 @@ static uno::Reference< XLinguServiceManager > GetLngSvcMgr_Impl()
///////////////////////////////////////////////////////////////////////////
-BOOL lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
+sal_Bool lcl_FindEntry( const OUString &rEntry, const Sequence< OUString > &rCfgSvcs )
{
- INT32 nRes = -1;
- INT32 nEntries = rCfgSvcs.getLength();
+ sal_Int32 nRes = -1;
+ sal_Int32 nEntries = rCfgSvcs.getLength();
const OUString *pEntry = rCfgSvcs.getConstArray();
- for (INT32 i = 0; i < nEntries && nRes == -1; ++i)
+ for (sal_Int32 i = 0; i < nEntries && nRes == -1; ++i)
{
if (rEntry == pEntry[i])
nRes = i;
@@ -117,11 +117,11 @@ Sequence< OUString > lcl_RemoveMissingEntries(
{
Sequence< OUString > aRes( rCfgSvcs.getLength() );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
- INT32 nEntries = rCfgSvcs.getLength();
+ sal_Int32 nEntries = rCfgSvcs.getLength();
const OUString *pEntry = rCfgSvcs.getConstArray();
- for (INT32 i = 0; i < nEntries; ++i)
+ for (sal_Int32 i = 0; i < nEntries; ++i)
{
if (pEntry[i].getLength() && lcl_FindEntry( pEntry[i], rAvailSvcs ))
pRes[ nCnt++ ] = pEntry[i];
@@ -143,7 +143,7 @@ Sequence< OUString > lcl_GetLastFoundSvcs(
SvxLocaleToLanguage( rAvailLocale ) ) );
Sequence< OUString > aNodeNames( rCfg.GetNodeNames(rLastFoundList) );
- BOOL bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
+ sal_Bool bFound = lcl_FindEntry( aCfgLocaleStr, aNodeNames);
if (bFound)
{
@@ -178,13 +178,13 @@ Sequence< OUString > lcl_GetNewEntries(
const Sequence< OUString > &rLastFoundSvcs,
const Sequence< OUString > &rAvailSvcs )
{
- INT32 nLen = rAvailSvcs.getLength();
+ sal_Int32 nLen = rAvailSvcs.getLength();
Sequence< OUString > aRes( nLen );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
const OUString *pEntry = rAvailSvcs.getConstArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], rLastFoundSvcs ))
pRes[ nCnt++ ] = pEntry[i];
@@ -201,17 +201,17 @@ Sequence< OUString > lcl_MergeSeq(
{
Sequence< OUString > aRes( rCfgSvcs.getLength() + rNewSvcs.getLength() );
OUString *pRes = aRes.getArray();
- INT32 nCnt = 0;
+ sal_Int32 nCnt = 0;
- for (INT32 k = 0; k < 2; ++k)
+ for (sal_Int32 k = 0; k < 2; ++k)
{
// add previously configuerd service first and append
// new found services at the end
const Sequence< OUString > &rSeq = k == 0 ? rCfgSvcs : rNewSvcs;
- INT32 nLen = rSeq.getLength();
+ sal_Int32 nLen = rSeq.getLength();
const OUString *pEntry = rSeq.getConstArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
if (pEntry[i].getLength() && !lcl_FindEntry( pEntry[i], aRes ))
pRes[ nCnt++ ] = pEntry[i];
@@ -225,8 +225,8 @@ Sequence< OUString > lcl_MergeSeq(
///////////////////////////////////////////////////////////////////////////
// static member initialization
-INT16 SvxLinguConfigUpdate::nNeedUpdating = -1;
-INT32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1;
+sal_Int16 SvxLinguConfigUpdate::nNeedUpdating = -1;
+sal_Int32 SvxLinguConfigUpdate::nCurrentDataFilesChangedCheckValue = -1;
void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
{
@@ -266,13 +266,13 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
OUString aService( A2OU( apServices[k] ) );
OUString aActiveList( A2OU( apCurLists[k] ) );
OUString aLastFoundList( A2OU( apLastFoundLists[k] ) );
- INT32 i;
+ sal_Int32 i;
//
// remove configured but not available language/services entries
//
Sequence< OUString > aNodeNames( aCfg.GetNodeNames( aActiveList ) ); // list of configured locales
- INT32 nNodeNames = aNodeNames.getLength();
+ sal_Int32 nNodeNames = aNodeNames.getLength();
const OUString *pNodeName = aNodeNames.getConstArray();
for (i = 0; i < nNodeNames; ++i)
{
@@ -297,7 +297,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
//
uno::Reference< XAvailableLocales > xAvail( xLngSvcMgr, UNO_QUERY );
Sequence< Locale > aAvailLocales( xAvail->getAvailableLocales(aService) );
- INT32 nAvailLocales = aAvailLocales.getLength();
+ sal_Int32 nAvailLocales = aAvailLocales.getLength();
const Locale *pAvailLocale = aAvailLocales.getConstArray();
for (i = 0; i < nAvailLocales; ++i)
{
@@ -341,9 +341,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
xLngSvcMgr->getAvailableServices( aService, pAvailLocale[i] ) );
#if OSL_DEBUG_LEVEL > 1
- INT32 nSvcs = aSvcImplNames.getLength();
+ sal_Int32 nSvcs = aSvcImplNames.getLength();
const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (INT32 j = 0; j < nSvcs; ++j)
+ for (sal_Int32 j = 0; j < nSvcs; ++j)
{
OUString aImplName( pSvcImplName[j] );
}
@@ -378,9 +378,9 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
#if OSL_DEBUG_LEVEL > 1
Sequence< OUString > aSvcImplNames( (*aIt).second );
- INT32 nSvcs = aSvcImplNames.getLength();
+ sal_Int32 nSvcs = aSvcImplNames.getLength();
const OUString *pSvcImplName = aSvcImplNames.getConstArray();
- for (INT32 j = 0; j < nSvcs; ++j)
+ for (sal_Int32 j = 0; j < nSvcs; ++j)
{
OUString aImplName( pSvcImplName[j] );
}
@@ -396,7 +396,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::UpdateAll - ReplaceSetProperties" );
// add new or replace existing entries.
- BOOL bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
+ sal_Bool bRes = aCfg.ReplaceSetProperties( aSubNodeName, aNewValues );
if (!bRes)
{
#if OSL_DEBUG_LEVEL > 1
@@ -418,7 +418,7 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
// not be too troublesome.
// In OOo 3.0 we will not need the respective code anymore at all.
// aAny <<= nCurrentDataFilesChangedCheckValue;
- aAny <<= (INT32) -1; // keep the value set to 'need to check'
+ aAny <<= (sal_Int32) -1; // keep the value set to 'need to check'
aCfg.SetProperty( A2OU( "DataFilesChangedCheckValue" ), aAny );
@@ -435,17 +435,17 @@ void SvxLinguConfigUpdate::UpdateAll( sal_Bool bForceCheck )
}
-INT32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue()
+sal_Int32 SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue()
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::CalcDataFilesChangedCheckValue" );
- INT32 nHashVal = 0;
+ sal_Int32 nHashVal = 0;
// nothing to be checked anymore since those old directory paths are gone by now
return nHashVal;
}
-BOOL SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck )
+sal_Bool SvxLinguConfigUpdate::IsNeedUpdateAll( sal_Bool bForceCheck )
{
RTL_LOGFILE_CONTEXT( aLog, "svx: SvxLinguConfigUpdate::IsNeedUpdateAll" );
if (nNeedUpdating == -1 || bForceCheck ) // need to check if updating is necessary
@@ -522,10 +522,10 @@ void ThesDummy_Impl::GetCfgLocales()
String aNode( A2OU( "ServiceManager/ThesaurusList" ) );
Sequence < OUString > aNodeNames( aCfg.GetNodeNames( aNode ) );
const OUString *pNodeNames = aNodeNames.getConstArray();
- INT32 nLen = aNodeNames.getLength();
+ sal_Int32 nLen = aNodeNames.getLength();
pLocaleSeq = new Sequence< Locale >( nLen );
Locale *pLocale = pLocaleSeq->getArray();
- for (INT32 i = 0; i < nLen; ++i)
+ for (sal_Int32 i = 0; i < nLen; ++i)
{
pLocale[i] = SvxCreateLocale(
MsLangId::convertIsoStringToLanguage( pNodeNames[i] ) );
@@ -580,8 +580,8 @@ sal_Bool SAL_CALL
else if (!pLocaleSeq) // if not already loaded save startup time by avoiding loading them now
GetCfgLocales();
GetCfgLocales();
- BOOL bFound = FALSE;
- INT32 nLen = pLocaleSeq->getLength();
+ sal_Bool bFound = sal_False;
+ sal_Int32 nLen = pLocaleSeq->getLength();
const Locale *pLocale = pLocaleSeq->getConstArray();
const Locale *pEnd = pLocale + nLen;
for ( ; pLocale < pEnd && !bFound; ++pLocale)
@@ -681,7 +681,7 @@ sal_Bool SAL_CALL
throw(uno::RuntimeException)
{
GetSpell_Impl();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xSpell.is())
bRes = xSpell->hasLanguage( nLanguage );
return bRes;
@@ -695,7 +695,7 @@ sal_Bool SAL_CALL
uno::RuntimeException)
{
GetSpell_Impl();
- BOOL bRes = TRUE;
+ sal_Bool bRes = sal_True;
if (xSpell.is())
bRes = xSpell->isValid( rWord, nLanguage, rProperties );
return bRes;
@@ -800,7 +800,7 @@ sal_Bool SAL_CALL
throw(uno::RuntimeException)
{
GetHyph_Impl();
- BOOL bRes = FALSE;
+ sal_Bool bRes = sal_False;
if (xHyph.is())
bRes = xHyph->hasLocale( rLocale );
return bRes;
@@ -1274,32 +1274,32 @@ SvxAlternativeSpelling SvxGetAltSpelling(
{
OUString aWord( rHyphWord->getWord() ),
aAltWord( rHyphWord->getHyphenatedWord() );
- INT16 nHyphenationPos = rHyphWord->getHyphenationPos(),
+ sal_Int16 nHyphenationPos = rHyphWord->getHyphenationPos(),
nHyphenPos = rHyphWord->getHyphenPos();
- INT16 nLen = (INT16)aWord.getLength();
- INT16 nAltLen = (INT16)aAltWord.getLength();
+ sal_Int16 nLen = (sal_Int16)aWord.getLength();
+ sal_Int16 nAltLen = (sal_Int16)aAltWord.getLength();
const sal_Unicode *pWord = aWord.getStr(),
*pAltWord = aAltWord.getStr();
// count number of chars from the left to the
// hyphenation pos / hyphen pos that are equal
- INT16 nL = 0;
+ sal_Int16 nL = 0;
while (nL <= nHyphenationPos && nL <= nHyphenPos
&& pWord[ nL ] == pAltWord[ nL ])
++nL;
// count number of chars from the right to the
// hyphenation pos / hyphen pos that are equal
- INT16 nR = 0;
- INT32 nIdx = nLen - 1;
- INT32 nAltIdx = nAltLen - 1;
+ sal_Int16 nR = 0;
+ sal_Int32 nIdx = nLen - 1;
+ sal_Int32 nAltIdx = nAltLen - 1;
while (nIdx > nHyphenationPos && nAltIdx > nHyphenPos
&& pWord[ nIdx-- ] == pAltWord[ nAltIdx-- ])
++nR;
aRes.aReplacement = OUString( aAltWord.copy( nL, nAltLen - nL - nR ) );
- aRes.nChangedPos = (INT16) nL;
+ aRes.nChangedPos = (sal_Int16) nL;
aRes.nChangedLength = nLen - nL - nR;
- aRes.bIsAltSpelling = TRUE;
+ aRes.bIsAltSpelling = sal_True;
aRes.xHyphWord = rHyphWord;
}
return aRes;