diff options
author | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2011-02-08 11:49:29 +0100 |
commit | d55fc1c693ed693def35feb0c34f82478ae42ae6 (patch) | |
tree | 49b109557349baed3ed05f51703fd13ca1ad4f99 /unotools | |
parent | 7c3026b4aa032e6c1c477c2f2ebe47f45275c03d (diff) | |
parent | 88f014217e8e8c8c2ffc6b497357917800f33520 (diff) |
CWS gnumake3: pull in cws removetooltypes01
Diffstat (limited to 'unotools')
40 files changed, 679 insertions, 679 deletions
diff --git a/unotools/inc/unotools/accelcfg.hxx b/unotools/inc/unotools/accelcfg.hxx index a1884d34fbc3..5f0fcc61f9c4 100644 --- a/unotools/inc/unotools/accelcfg.hxx +++ b/unotools/inc/unotools/accelcfg.hxx @@ -78,7 +78,7 @@ public: void SetCommand( const SvtAcceleratorConfigItem& rItem ); // sets several or all configuration items - // if bClear=FALSE, all items not in the sequence remain unchanged + // if bClear=sal_False, all items not in the sequence remain unchanged void SetItems( const SvtAcceleratorItemList& rItems, bool bClear ); }; diff --git a/unotools/inc/unotools/componentresmodule.hxx b/unotools/inc/unotools/componentresmodule.hxx index 0fe4e126ea74..079af63e9b4a 100644 --- a/unotools/inc/unotools/componentresmodule.hxx +++ b/unotools/inc/unotools/componentresmodule.hxx @@ -80,7 +80,7 @@ namespace utl class UNOTOOLS_DLLPUBLIC ModuleRes : public ::ResId { public: - ModuleRes( USHORT _nId, OComponentResourceModule& _rModule ) : ResId( _nId, *_rModule.getResManager() ) { } + ModuleRes( sal_uInt16 _nId, OComponentResourceModule& _rModule ) : ResId( _nId, *_rModule.getResManager() ) { } }; //==================================================================== @@ -119,7 +119,7 @@ namespace utl typedef ::utl::ModuleRes BaseClass; \ \ public: \ - ResClass( USHORT _nId ) : BaseClass( _nId, ModuleClass::getInstance() ) \ + ResClass( sal_uInt16 _nId ) : BaseClass( _nId, ModuleClass::getInstance() ) \ { \ } \ }; \ diff --git a/unotools/inc/unotools/configvaluecontainer.hxx b/unotools/inc/unotools/configvaluecontainer.hxx index a66ca4cb753a..57a140a00e58 100644 --- a/unotools/inc/unotools/configvaluecontainer.hxx +++ b/unotools/inc/unotools/configvaluecontainer.hxx @@ -187,7 +187,7 @@ namespace utl <p>The current values in memory (your exchange locations registered using the registerXXX methods) is forwarded to their respective configuration nodes.</p> - <p>Note that calling <method>write</method>(<TRUE/) is the same as calling <method>commit</method>(<TRUE/>).</p> + <p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p> @precond The access must have been created for update access @@ -203,7 +203,7 @@ namespace utl /** commits any changes done - <p>Note that calling <method>write</method>(<TRUE/) is the same as calling <method>commit</method>(<TRUE/>).</p> + <p>Note that calling <method>write</method>(<sal_True/) is the same as calling <method>commit</method>(<TRUE/>).</p> @precond The access must have been created for update access diff --git a/unotools/inc/unotools/defaultoptions.hxx b/unotools/inc/unotools/defaultoptions.hxx index ecd6b7928629..f4c10f0b9e09 100644 --- a/unotools/inc/unotools/defaultoptions.hxx +++ b/unotools/inc/unotools/defaultoptions.hxx @@ -47,7 +47,7 @@ public: SvtDefaultOptions(); virtual ~SvtDefaultOptions(); - String GetDefaultPath( USHORT nId ) const; + String GetDefaultPath( sal_uInt16 nId ) const; }; #endif // #ifndef INCLUDED_unotools_DEFAULTOPTIONS_HXX diff --git a/unotools/inc/unotools/fontcfg.hxx b/unotools/inc/unotools/fontcfg.hxx index 633c12c4c99c..37bbdf3018e3 100644 --- a/unotools/inc/unotools/fontcfg.hxx +++ b/unotools/inc/unotools/fontcfg.hxx @@ -118,38 +118,38 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration // IMPL_FONT_ATTR_COMIC - Like Comic Sans MS // IMPL_FONT_ATTR_BRUSHSCRIPT - More Script // IMPL_FONT_ATTR_OTHERSTYLE - OldStyle, ... so negativ points -#define IMPL_FONT_ATTR_DEFAULT ((ULONG)0x00000001) -#define IMPL_FONT_ATTR_STANDARD ((ULONG)0x00000002) -#define IMPL_FONT_ATTR_NORMAL ((ULONG)0x00000004) -#define IMPL_FONT_ATTR_SYMBOL ((ULONG)0x00000008) -#define IMPL_FONT_ATTR_FIXED ((ULONG)0x00000010) -#define IMPL_FONT_ATTR_SANSSERIF ((ULONG)0x00000020) -#define IMPL_FONT_ATTR_SERIF ((ULONG)0x00000040) -#define IMPL_FONT_ATTR_DECORATIVE ((ULONG)0x00000080) -#define IMPL_FONT_ATTR_SPECIAL ((ULONG)0x00000100) -#define IMPL_FONT_ATTR_ITALIC ((ULONG)0x00000200) -#define IMPL_FONT_ATTR_TITLING ((ULONG)0x00000400) -#define IMPL_FONT_ATTR_CAPITALS ((ULONG)0x00000800) -#define IMPL_FONT_ATTR_CJK ((ULONG)0x00001000) -#define IMPL_FONT_ATTR_CJK_JP ((ULONG)0x00002000) -#define IMPL_FONT_ATTR_CJK_SC ((ULONG)0x00004000) -#define IMPL_FONT_ATTR_CJK_TC ((ULONG)0x00008000) -#define IMPL_FONT_ATTR_CJK_KR ((ULONG)0x00010000) -#define IMPL_FONT_ATTR_CTL ((ULONG)0x00020000) -#define IMPL_FONT_ATTR_NONELATIN ((ULONG)0x00040000) -#define IMPL_FONT_ATTR_FULL ((ULONG)0x00080000) -#define IMPL_FONT_ATTR_OUTLINE ((ULONG)0x00100000) -#define IMPL_FONT_ATTR_SHADOW ((ULONG)0x00200000) -#define IMPL_FONT_ATTR_ROUNDED ((ULONG)0x00400000) -#define IMPL_FONT_ATTR_TYPEWRITER ((ULONG)0x00800000) -#define IMPL_FONT_ATTR_SCRIPT ((ULONG)0x01000000) -#define IMPL_FONT_ATTR_HANDWRITING ((ULONG)0x02000000) -#define IMPL_FONT_ATTR_CHANCERY ((ULONG)0x04000000) -#define IMPL_FONT_ATTR_COMIC ((ULONG)0x08000000) -#define IMPL_FONT_ATTR_BRUSHSCRIPT ((ULONG)0x10000000) -#define IMPL_FONT_ATTR_GOTHIC ((ULONG)0x20000000) -#define IMPL_FONT_ATTR_SCHOOLBOOK ((ULONG)0x40000000) -#define IMPL_FONT_ATTR_OTHERSTYLE ((ULONG)0x80000000) +#define IMPL_FONT_ATTR_DEFAULT ((sal_uLong)0x00000001) +#define IMPL_FONT_ATTR_STANDARD ((sal_uLong)0x00000002) +#define IMPL_FONT_ATTR_NORMAL ((sal_uLong)0x00000004) +#define IMPL_FONT_ATTR_SYMBOL ((sal_uLong)0x00000008) +#define IMPL_FONT_ATTR_FIXED ((sal_uLong)0x00000010) +#define IMPL_FONT_ATTR_SANSSERIF ((sal_uLong)0x00000020) +#define IMPL_FONT_ATTR_SERIF ((sal_uLong)0x00000040) +#define IMPL_FONT_ATTR_DECORATIVE ((sal_uLong)0x00000080) +#define IMPL_FONT_ATTR_SPECIAL ((sal_uLong)0x00000100) +#define IMPL_FONT_ATTR_ITALIC ((sal_uLong)0x00000200) +#define IMPL_FONT_ATTR_TITLING ((sal_uLong)0x00000400) +#define IMPL_FONT_ATTR_CAPITALS ((sal_uLong)0x00000800) +#define IMPL_FONT_ATTR_CJK ((sal_uLong)0x00001000) +#define IMPL_FONT_ATTR_CJK_JP ((sal_uLong)0x00002000) +#define IMPL_FONT_ATTR_CJK_SC ((sal_uLong)0x00004000) +#define IMPL_FONT_ATTR_CJK_TC ((sal_uLong)0x00008000) +#define IMPL_FONT_ATTR_CJK_KR ((sal_uLong)0x00010000) +#define IMPL_FONT_ATTR_CTL ((sal_uLong)0x00020000) +#define IMPL_FONT_ATTR_NONELATIN ((sal_uLong)0x00040000) +#define IMPL_FONT_ATTR_FULL ((sal_uLong)0x00080000) +#define IMPL_FONT_ATTR_OUTLINE ((sal_uLong)0x00100000) +#define IMPL_FONT_ATTR_SHADOW ((sal_uLong)0x00200000) +#define IMPL_FONT_ATTR_ROUNDED ((sal_uLong)0x00400000) +#define IMPL_FONT_ATTR_TYPEWRITER ((sal_uLong)0x00800000) +#define IMPL_FONT_ATTR_SCRIPT ((sal_uLong)0x01000000) +#define IMPL_FONT_ATTR_HANDWRITING ((sal_uLong)0x02000000) +#define IMPL_FONT_ATTR_CHANCERY ((sal_uLong)0x04000000) +#define IMPL_FONT_ATTR_COMIC ((sal_uLong)0x08000000) +#define IMPL_FONT_ATTR_BRUSHSCRIPT ((sal_uLong)0x10000000) +#define IMPL_FONT_ATTR_GOTHIC ((sal_uLong)0x20000000) +#define IMPL_FONT_ATTR_SCHOOLBOOK ((sal_uLong)0x40000000) +#define IMPL_FONT_ATTR_OTHERSTYLE ((sal_uLong)0x80000000) #define IMPL_FONT_ATTR_CJK_ALLLANG (IMPL_FONT_ATTR_CJK_JP | IMPL_FONT_ATTR_CJK_SC | IMPL_FONT_ATTR_CJK_TC | IMPL_FONT_ATTR_CJK_KR) #define IMPL_FONT_ATTR_ALLSCRIPT (IMPL_FONT_ATTR_SCRIPT | IMPL_FONT_ATTR_HANDWRITING | IMPL_FONT_ATTR_CHANCERY | IMPL_FONT_ATTR_COMIC | IMPL_FONT_ATTR_BRUSHSCRIPT) @@ -219,7 +219,7 @@ public: rtl::OUString(), rtl::OUString() ) ) const; - static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, ULONG& rType ); + static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType ); }; } // namespace utl diff --git a/unotools/inc/unotools/fontcvt.hxx b/unotools/inc/unotools/fontcvt.hxx index 333ee36e706d..715ffeb56623 100644 --- a/unotools/inc/unotools/fontcvt.hxx +++ b/unotools/inc/unotools/fontcvt.hxx @@ -35,12 +35,12 @@ // - FontToSubsFont - // ------------------ -#define FONTTOSUBSFONT_IMPORT ((ULONG)0x00000001) -#define FONTTOSUBSFONT_EXPORT ((ULONG)0x00000002) -#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((ULONG)0x00000004) +#define FONTTOSUBSFONT_IMPORT ((sal_uLong)0x00000001) +#define FONTTOSUBSFONT_EXPORT ((sal_uLong)0x00000002) +#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((sal_uLong)0x00000004) typedef void* FontToSubsFontConverter; -UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const String& rFontName, ULONG nFlags ); +UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const String& rFontName, sal_uLong nFlags ); UNOTOOLS_DLLPUBLIC void DestroyFontToSubsFontConverter( FontToSubsFontConverter hConverter ); UNOTOOLS_DLLPUBLIC sal_Unicode ConvertFontToSubsFontChar( FontToSubsFontConverter hConverter, sal_Unicode c ); UNOTOOLS_DLLPUBLIC String GetFontToSubsFontName( FontToSubsFontConverter hConverter ); diff --git a/unotools/inc/unotools/fontdefs.hxx b/unotools/inc/unotools/fontdefs.hxx index 12868aabe525..3ba232b6eba4 100644 --- a/unotools/inc/unotools/fontdefs.hxx +++ b/unotools/inc/unotools/fontdefs.hxx @@ -40,12 +40,12 @@ namespace utl { // - SubsFontName - // ---------------- -#define SUBSFONT_ONLYONE ((ULONG)0x00000001) -#define SUBSFONT_MS ((ULONG)0x00000002) -#define SUBSFONT_PS ((ULONG)0x00000004) -#define SUBSFONT_HTML ((ULONG)0x00000008) +#define SUBSFONT_ONLYONE ((sal_uLong)0x00000001) +#define SUBSFONT_MS ((sal_uLong)0x00000002) +#define SUBSFONT_PS ((sal_uLong)0x00000004) +#define SUBSFONT_HTML ((sal_uLong)0x00000008) -UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, ULONG nFlags ); +UNOTOOLS_DLLPUBLIC String GetSubsFontName( const String& rName, sal_uLong nFlags ); // ----------------- // - FontTokenName - @@ -79,29 +79,29 @@ public: // Default-Font -#define DEFAULTFONT_SANS_UNICODE ((USHORT)1) -#define DEFAULTFONT_SANS ((USHORT)2) -#define DEFAULTFONT_SERIF ((USHORT)3) -#define DEFAULTFONT_FIXED ((USHORT)4) -#define DEFAULTFONT_SYMBOL ((USHORT)5) -#define DEFAULTFONT_UI_SANS ((USHORT)1000) -#define DEFAULTFONT_UI_FIXED ((USHORT)1001) -#define DEFAULTFONT_LATIN_TEXT ((USHORT)2000) -#define DEFAULTFONT_LATIN_PRESENTATION ((USHORT)2001) -#define DEFAULTFONT_LATIN_SPREADSHEET ((USHORT)2002) -#define DEFAULTFONT_LATIN_HEADING ((USHORT)2003) -#define DEFAULTFONT_LATIN_DISPLAY ((USHORT)2004) -#define DEFAULTFONT_LATIN_FIXED ((USHORT)2005) -#define DEFAULTFONT_CJK_TEXT ((USHORT)3000) -#define DEFAULTFONT_CJK_PRESENTATION ((USHORT)3001) -#define DEFAULTFONT_CJK_SPREADSHEET ((USHORT)3002) -#define DEFAULTFONT_CJK_HEADING ((USHORT)3003) -#define DEFAULTFONT_CJK_DISPLAY ((USHORT)3004) -#define DEFAULTFONT_CTL_TEXT ((USHORT)4000) -#define DEFAULTFONT_CTL_PRESENTATION ((USHORT)4001) -#define DEFAULTFONT_CTL_SPREADSHEET ((USHORT)4002) -#define DEFAULTFONT_CTL_HEADING ((USHORT)4003) -#define DEFAULTFONT_CTL_DISPLAY ((USHORT)4004) +#define DEFAULTFONT_SANS_UNICODE ((sal_uInt16)1) +#define DEFAULTFONT_SANS ((sal_uInt16)2) +#define DEFAULTFONT_SERIF ((sal_uInt16)3) +#define DEFAULTFONT_FIXED ((sal_uInt16)4) +#define DEFAULTFONT_SYMBOL ((sal_uInt16)5) +#define DEFAULTFONT_UI_SANS ((sal_uInt16)1000) +#define DEFAULTFONT_UI_FIXED ((sal_uInt16)1001) +#define DEFAULTFONT_LATIN_TEXT ((sal_uInt16)2000) +#define DEFAULTFONT_LATIN_PRESENTATION ((sal_uInt16)2001) +#define DEFAULTFONT_LATIN_SPREADSHEET ((sal_uInt16)2002) +#define DEFAULTFONT_LATIN_HEADING ((sal_uInt16)2003) +#define DEFAULTFONT_LATIN_DISPLAY ((sal_uInt16)2004) +#define DEFAULTFONT_LATIN_FIXED ((sal_uInt16)2005) +#define DEFAULTFONT_CJK_TEXT ((sal_uInt16)3000) +#define DEFAULTFONT_CJK_PRESENTATION ((sal_uInt16)3001) +#define DEFAULTFONT_CJK_SPREADSHEET ((sal_uInt16)3002) +#define DEFAULTFONT_CJK_HEADING ((sal_uInt16)3003) +#define DEFAULTFONT_CJK_DISPLAY ((sal_uInt16)3004) +#define DEFAULTFONT_CTL_TEXT ((sal_uInt16)4000) +#define DEFAULTFONT_CTL_PRESENTATION ((sal_uInt16)4001) +#define DEFAULTFONT_CTL_SPREADSHEET ((sal_uInt16)4002) +#define DEFAULTFONT_CTL_HEADING ((sal_uInt16)4003) +#define DEFAULTFONT_CTL_DISPLAY ((sal_uInt16)4004) UNOTOOLS_DLLPUBLIC String GetNextFontToken( const String& rTokenStr, xub_StrLen& rIndex ); diff --git a/unotools/inc/unotools/intlwrapper.hxx b/unotools/inc/unotools/intlwrapper.hxx index e35f4cc9268f..1ccc85b55037 100644 --- a/unotools/inc/unotools/intlwrapper.hxx +++ b/unotools/inc/unotools/intlwrapper.hxx @@ -69,7 +69,7 @@ private: void ImplNewCharClass() const; void ImplNewLocaleData() const; void ImplNewCalendar() const; - void ImplNewCollator( BOOL bCaseSensitive ) const; + void ImplNewCollator( sal_Bool bCaseSensitive ) const; public: @@ -108,14 +108,14 @@ public: const CollatorWrapper* getCollator() const { if ( !pCollator ) - ImplNewCollator( FALSE ); + ImplNewCollator( sal_False ); return pCollator; } /// case sensitive collator const CollatorWrapper* getCaseCollator() const { if ( !pCaseCollator ) - ImplNewCollator( TRUE ); + ImplNewCollator( sal_True ); return pCaseCollator; } }; diff --git a/unotools/inc/unotools/lingucfg.hxx b/unotools/inc/unotools/lingucfg.hxx index 9a26bdd73021..affba64d9377 100644..100755 --- a/unotools/inc/unotools/lingucfg.hxx +++ b/unotools/inc/unotools/lingucfg.hxx @@ -52,89 +52,89 @@ struct UNOTOOLS_DLLPUBLIC SvtLinguOptions ::com::sun::star::uno::Sequence< rtl::OUString > aActiveDics; ::com::sun::star::uno::Sequence< rtl::OUString > aActiveConvDics; - BOOL bROActiveDics; - BOOL bROActiveConvDics; + sal_Bool bROActiveDics; + sal_Bool bROActiveConvDics; // Hyphenator service specific options - INT16 nHyphMinLeading, + sal_Int16 nHyphMinLeading, nHyphMinTrailing, nHyphMinWordLength; - BOOL bROHyphMinLeading, + sal_Bool bROHyphMinLeading, bROHyphMinTrailing, bROHyphMinWordLength; // misc options (non-service specific) - INT16 nDefaultLanguage; - INT16 nDefaultLanguage_CJK; - INT16 nDefaultLanguage_CTL; + sal_Int16 nDefaultLanguage; + sal_Int16 nDefaultLanguage_CJK; + sal_Int16 nDefaultLanguage_CTL; - BOOL bRODefaultLanguage; - BOOL bRODefaultLanguage_CJK; - BOOL bRODefaultLanguage_CTL; + sal_Bool bRODefaultLanguage; + sal_Bool bRODefaultLanguage_CJK; + sal_Bool bRODefaultLanguage_CTL; // spelling options (non-service specific) - BOOL bIsSpellSpecial; - BOOL bIsSpellAuto; - BOOL bIsSpellReverse; + sal_Bool bIsSpellSpecial; + sal_Bool bIsSpellAuto; + sal_Bool bIsSpellReverse; - BOOL bROIsSpellSpecial; - BOOL bROIsSpellAuto; - BOOL bROIsSpellReverse; + sal_Bool bROIsSpellSpecial; + sal_Bool bROIsSpellAuto; + sal_Bool bROIsSpellReverse; // hyphenation options (non-service specific) - BOOL bIsHyphSpecial; - BOOL bIsHyphAuto; + sal_Bool bIsHyphSpecial; + sal_Bool bIsHyphAuto; - BOOL bROIsHyphSpecial; - BOOL bROIsHyphAuto; + sal_Bool bROIsHyphSpecial; + sal_Bool bROIsHyphAuto; // common to SpellChecker, Hyphenator and Thesaurus service - BOOL bIsUseDictionaryList; - BOOL bIsIgnoreControlCharacters; + sal_Bool bIsUseDictionaryList; + sal_Bool bIsIgnoreControlCharacters; - BOOL bROIsUseDictionaryList; - BOOL bROIsIgnoreControlCharacters; + sal_Bool bROIsUseDictionaryList; + sal_Bool bROIsIgnoreControlCharacters; // SpellChecker service specific options - BOOL bIsSpellWithDigits, + sal_Bool bIsSpellWithDigits, bIsSpellUpperCase, bIsSpellCapitalization; - BOOL bROIsSpellWithDigits, + sal_Bool bROIsSpellWithDigits, bROIsSpellUpperCase, bROIsSpellCapitalization; // text conversion specific options - BOOL bIsIgnorePostPositionalWord; - BOOL bIsAutoCloseDialog; - BOOL bIsShowEntriesRecentlyUsedFirst; - BOOL bIsAutoReplaceUniqueEntries; - BOOL bIsDirectionToSimplified; - BOOL bIsUseCharacterVariants; - BOOL bIsTranslateCommonTerms; - BOOL bIsReverseMapping; - - BOOL bROIsIgnorePostPositionalWord; - BOOL bROIsAutoCloseDialog; - BOOL bROIsShowEntriesRecentlyUsedFirst; - BOOL bROIsAutoReplaceUniqueEntries; - BOOL bROIsDirectionToSimplified; - BOOL bROIsUseCharacterVariants; - BOOL bROIsTranslateCommonTerms; - BOOL bROIsReverseMapping; + sal_Bool bIsIgnorePostPositionalWord; + sal_Bool bIsAutoCloseDialog; + sal_Bool bIsShowEntriesRecentlyUsedFirst; + sal_Bool bIsAutoReplaceUniqueEntries; + sal_Bool bIsDirectionToSimplified; + sal_Bool bIsUseCharacterVariants; + sal_Bool bIsTranslateCommonTerms; + sal_Bool bIsReverseMapping; + + sal_Bool bROIsIgnorePostPositionalWord; + sal_Bool bROIsAutoCloseDialog; + sal_Bool bROIsShowEntriesRecentlyUsedFirst; + sal_Bool bROIsAutoReplaceUniqueEntries; + sal_Bool bROIsDirectionToSimplified; + sal_Bool bROIsUseCharacterVariants; + sal_Bool bROIsTranslateCommonTerms; + sal_Bool bROIsReverseMapping; // check value need to determine if the configuration needs to updatet // or not (used for a quick check if data files have been changed/added // or deleted - INT32 nDataFilesChangedCheckValue; - BOOL bRODataFilesChangedCheckValue; + sal_Int32 nDataFilesChangedCheckValue; + sal_Bool bRODataFilesChangedCheckValue; - BOOL bIsGrammarAuto; - BOOL bIsGrammarInteractive; + sal_Bool bIsGrammarAuto; + sal_Bool bIsGrammarInteractive; - BOOL bROIsGrammarAuto; - BOOL bROIsGrammarInteractive; + sal_Bool bROIsGrammarAuto; + sal_Bool bROIsGrammarInteractive; SvtLinguOptions(); }; @@ -196,29 +196,29 @@ public: com::sun::star::uno::Any GetProperty( const rtl::OUString &rPropertyName ) const; com::sun::star::uno::Any - GetProperty( INT32 nPropertyHandle ) const; + GetProperty( sal_Int32 nPropertyHandle ) const; - BOOL SetProperty( const rtl::OUString &rPropertyName, + sal_Bool SetProperty( const rtl::OUString &rPropertyName, const com::sun::star::uno::Any &rValue ); - BOOL SetProperty( INT32 nPropertyHandle, + sal_Bool SetProperty( sal_Int32 nPropertyHandle, const com::sun::star::uno::Any &rValue ); - BOOL GetOptions( SvtLinguOptions &rOptions ) const; - BOOL SetOptions( const SvtLinguOptions &rOptions ); + sal_Bool GetOptions( SvtLinguOptions &rOptions ) const; + sal_Bool SetOptions( const SvtLinguOptions &rOptions ); - BOOL IsReadOnly( const rtl::OUString &rPropertyName ) const; - BOOL IsReadOnly( INT32 nPropertyHandle ) const; + sal_Bool IsReadOnly( const rtl::OUString &rPropertyName ) const; + sal_Bool IsReadOnly( sal_Int32 nPropertyHandle ) const; //! //! the following functions work on the 'ServiceManager' sub node of the //! linguistic configuration only //! - BOOL GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const; + sal_Bool GetElementNamesFor( const rtl::OUString &rNodeName, com::sun::star::uno::Sequence< rtl::OUString > &rElementNames ) const; // - BOOL GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const; + sal_Bool GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const; void SetOrCreateSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, const com::sun::star::uno::Sequence< rtl::OUString > &rFormatList ) const; // - BOOL GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const; + sal_Bool GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const; void SetOrCreateDictionaryEntry( const rtl::OUString &rNodeName, const SvtLinguConfigDictionaryEntry &rDicEntry ) const; // com::sun::star::uno::Sequence< rtl::OUString > GetDisabledDictionaries() const; diff --git a/unotools/inc/unotools/localedatawrapper.hxx b/unotools/inc/unotools/localedatawrapper.hxx index fd09b07e58cb..0e815f61ccb6 100644 --- a/unotools/inc/unotools/localedatawrapper.hxx +++ b/unotools/inc/unotools/localedatawrapper.hxx @@ -65,7 +65,7 @@ enum MeasurementSystem { class UNOTOOLS_DLLPUBLIC LocaleDataWrapper { - static BYTE nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no + static sal_uInt8 nLocaleDataChecking; // 0:=dontknow, 1:=yes, 2:=no ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xSMgr; ::com::sun::star::uno::Reference< ::com::sun::star::i18n::XLocaleData2 > xLD; @@ -81,11 +81,11 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper String aCurrBankSymbol; int nDateFormat; int nLongDateFormat; - USHORT nCurrPositiveFormat; - USHORT nCurrNegativeFormat; - USHORT nCurrDigits; - BOOL bLocaleDataItemValid; - BOOL bReservedWordValid; + sal_uInt16 nCurrPositiveFormat; + sal_uInt16 nCurrNegativeFormat; + sal_uInt16 nCurrDigits; + sal_Bool bLocaleDataItemValid; + sal_Bool bReservedWordValid; mutable ::utl::ReadWriteMutex aMutex; // dummies, to be implemented or provided by XML locale data @@ -119,8 +119,8 @@ class UNOTOOLS_DLLPUBLIC LocaleDataWrapper void getDefaultCalendarImpl(); sal_Unicode* ImplAddFormatNum( sal_Unicode* pBuf, - sal_Int64 nNumber, USHORT nDecimals, - BOOL bUseThousandSep, BOOL bTrailingZeros ) const; + sal_Int64 nNumber, sal_uInt16 nDecimals, + sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const; void getDigitGroupingImpl(); @@ -242,19 +242,19 @@ public: // currency const String& getCurrSymbol() const; const String& getCurrBankSymbol() const; - USHORT getCurrPositiveFormat() const; - USHORT getCurrNegativeFormat() const; - USHORT getCurrDigits() const; + sal_uInt16 getCurrPositiveFormat() const; + sal_uInt16 getCurrNegativeFormat() const; + sal_uInt16 getCurrDigits() const; // simple date and time formatting DateFormat getDateFormat() const; DateFormat getLongDateFormat() const; /// only numerical values of Gregorian calendar String getDate( const Date& rDate ) const; - String getTime( const Time& rTime, BOOL bSec = TRUE, - BOOL b100Sec = FALSE ) const; + String getTime( const Time& rTime, sal_Bool bSec = sal_True, + sal_Bool b100Sec = sal_False ) const; String getDuration( const Time& rTime, - BOOL bSec = TRUE, BOOL b100Sec = FALSE ) const; + sal_Bool bSec = sal_True, sal_Bool b100Sec = sal_False ) const; /** The CalendarWrapper already <b>MUST</b> have loaded a calendar. @@ -283,37 +283,37 @@ public: @param nNumber value * 10**nDecimals @param bTrailingZeros - </TRUE> := always display trailing zeros in + </sal_True> := always display trailing zeros in decimal places, even if integer value. - </FALSE> := trailing zeros are only displayed + </sal_False> := trailing zeros are only displayed if the value is not an integer value. */ - String getNum( sal_Int64 nNumber, USHORT nDecimals, - BOOL bUseThousandSep = TRUE, - BOOL bTrailingZeros = TRUE ) const; + String getNum( sal_Int64 nNumber, sal_uInt16 nDecimals, + sal_Bool bUseThousandSep = sal_True, + sal_Bool bTrailingZeros = sal_True ) const; /// "Secure" currency formatted string. - String getCurr( sal_Int64 nNumber, USHORT nDecimals, + String getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals, const String& rCurrencySymbol, - BOOL bUseThousandSep = TRUE ) const; + sal_Bool bUseThousandSep = sal_True ) const; /** Default currency formatted string, use with care as default currency may change in any locale, for example, DEM -> EUR */ - String getCurr( sal_Int64 nNumber, USHORT nDecimals, - BOOL bUseThousandSep = TRUE ) const + String getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals, + sal_Bool bUseThousandSep = sal_True ) const { return getCurr( nNumber, nDecimals, getCurrSymbol(), bUseThousandSep ); } // dummy returns, to be implemented inline sal_Unicode getCurrZeroChar() const { return cCurrZeroChar; } - inline BOOL isNumLeadingZero() const - { return TRUE; } + inline sal_Bool isNumLeadingZero() const + { return sal_True; } /// standard decimal places - inline USHORT getNumDigits() const + inline sal_uInt16 getNumDigits() const { return 2; } - inline BOOL isNumTrailingZeros() const - { return TRUE; } + inline sal_Bool isNumTrailingZeros() const + { return sal_True; } // reserved words diff --git a/unotools/inc/unotools/misccfg.hxx b/unotools/inc/unotools/misccfg.hxx index 01b8db21138f..9751e494e9a1 100644 --- a/unotools/inc/unotools/misccfg.hxx +++ b/unotools/inc/unotools/misccfg.hxx @@ -46,14 +46,14 @@ public: MiscCfg( ); virtual ~MiscCfg( ); - BOOL IsNotFoundWarning() const; - void SetNotFoundWarning( BOOL bSet); + sal_Bool IsNotFoundWarning() const; + void SetNotFoundWarning( sal_Bool bSet); - BOOL IsPaperSizeWarning() const; - void SetPaperSizeWarning(BOOL bSet); + sal_Bool IsPaperSizeWarning() const; + void SetPaperSizeWarning(sal_Bool bSet); - BOOL IsPaperOrientationWarning() const; - void SetPaperOrientationWarning( BOOL bSet); + sal_Bool IsPaperOrientationWarning() const; + void SetPaperOrientationWarning( sal_Bool bSet); // 0 ... 99 sal_Int32 GetYear2000() const; diff --git a/unotools/inc/unotools/pathoptions.hxx b/unotools/inc/unotools/pathoptions.hxx index bff3a3120ee4..1308c2d181e2 100644 --- a/unotools/inc/unotools/pathoptions.hxx +++ b/unotools/inc/unotools/pathoptions.hxx @@ -101,7 +101,7 @@ public: const String& GetUIConfigPath() const; const String& GetFingerprintPath() const; - BOOL IsPathReadonly(Pathes ePath)const; + sal_Bool IsPathReadonly(Pathes ePath)const; const String& GetPath(Pathes ePath) const; // set the pathes diff --git a/unotools/inc/unotools/searchopt.hxx b/unotools/inc/unotools/searchopt.hxx index ed4110011df7..ab9941da6507 100644 --- a/unotools/inc/unotools/searchopt.hxx +++ b/unotools/inc/unotools/searchopt.hxx @@ -47,71 +47,71 @@ public: SvtSearchOptions(); ~SvtSearchOptions(); - INT32 GetTransliterationFlags() const; + sal_Int32 GetTransliterationFlags() const; // // General Options // - BOOL IsWholeWordsOnly() const; - BOOL IsBackwards() const; - BOOL IsUseRegularExpression() const; - BOOL IsSearchForStyles() const; - BOOL IsSimilaritySearch() const; - BOOL IsUseAsianOptions() const; - BOOL IsMatchCase() const; // also Japanese search option - BOOL IsNotes() const; - - void SetWholeWordsOnly( BOOL bVal ); - void SetBackwards( BOOL bVal ); - void SetUseRegularExpression( BOOL bVal ); - void SetSearchForStyles( BOOL bVal ); - void SetSimilaritySearch( BOOL bVal ); - void SetUseAsianOptions( BOOL bVal ); - void SetMatchCase( BOOL bVal ); // also Japanese search option - void SetNotes( BOOL bVal); + sal_Bool IsWholeWordsOnly() const; + sal_Bool IsBackwards() const; + sal_Bool IsUseRegularExpression() const; + sal_Bool IsSearchForStyles() const; + sal_Bool IsSimilaritySearch() const; + sal_Bool IsUseAsianOptions() const; + sal_Bool IsMatchCase() const; // also Japanese search option + sal_Bool IsNotes() const; + + void SetWholeWordsOnly( sal_Bool bVal ); + void SetBackwards( sal_Bool bVal ); + void SetUseRegularExpression( sal_Bool bVal ); + void SetSearchForStyles( sal_Bool bVal ); + void SetSimilaritySearch( sal_Bool bVal ); + void SetUseAsianOptions( sal_Bool bVal ); + void SetMatchCase( sal_Bool bVal ); // also Japanese search option + void SetNotes( sal_Bool bVal); // // Japanese search options // - BOOL IsMatchFullHalfWidthForms() const; - BOOL IsMatchHiraganaKatakana() const; - BOOL IsMatchContractions() const; - BOOL IsMatchMinusDashChoon() const; - BOOL IsMatchRepeatCharMarks() const; - BOOL IsMatchVariantFormKanji() const; - BOOL IsMatchOldKanaForms() const; - BOOL IsMatchDiziDuzu() const; - BOOL IsMatchBavaHafa() const; - BOOL IsMatchTsithichiDhizi() const; - BOOL IsMatchHyuiyuByuvyu() const; - BOOL IsMatchSesheZeje() const; - BOOL IsMatchIaiya() const; - BOOL IsMatchKiku() const; - BOOL IsIgnorePunctuation() const; - BOOL IsIgnoreWhitespace() const; - BOOL IsIgnoreProlongedSoundMark() const; - BOOL IsIgnoreMiddleDot() const; - - void SetMatchFullHalfWidthForms( BOOL bVal ); - void SetMatchHiraganaKatakana( BOOL bVal ); - void SetMatchContractions( BOOL bVal ); - void SetMatchMinusDashChoon( BOOL bVal ); - void SetMatchRepeatCharMarks( BOOL bVal ); - void SetMatchVariantFormKanji( BOOL bVal ); - void SetMatchOldKanaForms( BOOL bVal ); - void SetMatchDiziDuzu( BOOL bVal ); - void SetMatchBavaHafa( BOOL bVal ); - void SetMatchTsithichiDhizi( BOOL bVal ); - void SetMatchHyuiyuByuvyu( BOOL bVal ); - void SetMatchSesheZeje( BOOL bVal ); - void SetMatchIaiya( BOOL bVal ); - void SetMatchKiku( BOOL bVal ); - void SetIgnorePunctuation( BOOL bVal ); - void SetIgnoreWhitespace( BOOL bVal ); - void SetIgnoreProlongedSoundMark( BOOL bVal ); - void SetIgnoreMiddleDot( BOOL bVal ); + sal_Bool IsMatchFullHalfWidthForms() const; + sal_Bool IsMatchHiraganaKatakana() const; + sal_Bool IsMatchContractions() const; + sal_Bool IsMatchMinusDashChoon() const; + sal_Bool IsMatchRepeatCharMarks() const; + sal_Bool IsMatchVariantFormKanji() const; + sal_Bool IsMatchOldKanaForms() const; + sal_Bool IsMatchDiziDuzu() const; + sal_Bool IsMatchBavaHafa() const; + sal_Bool IsMatchTsithichiDhizi() const; + sal_Bool IsMatchHyuiyuByuvyu() const; + sal_Bool IsMatchSesheZeje() const; + sal_Bool IsMatchIaiya() const; + sal_Bool IsMatchKiku() const; + sal_Bool IsIgnorePunctuation() const; + sal_Bool IsIgnoreWhitespace() const; + sal_Bool IsIgnoreProlongedSoundMark() const; + sal_Bool IsIgnoreMiddleDot() const; + + void SetMatchFullHalfWidthForms( sal_Bool bVal ); + void SetMatchHiraganaKatakana( sal_Bool bVal ); + void SetMatchContractions( sal_Bool bVal ); + void SetMatchMinusDashChoon( sal_Bool bVal ); + void SetMatchRepeatCharMarks( sal_Bool bVal ); + void SetMatchVariantFormKanji( sal_Bool bVal ); + void SetMatchOldKanaForms( sal_Bool bVal ); + void SetMatchDiziDuzu( sal_Bool bVal ); + void SetMatchBavaHafa( sal_Bool bVal ); + void SetMatchTsithichiDhizi( sal_Bool bVal ); + void SetMatchHyuiyuByuvyu( sal_Bool bVal ); + void SetMatchSesheZeje( sal_Bool bVal ); + void SetMatchIaiya( sal_Bool bVal ); + void SetMatchKiku( sal_Bool bVal ); + void SetIgnorePunctuation( sal_Bool bVal ); + void SetIgnoreWhitespace( sal_Bool bVal ); + void SetIgnoreProlongedSoundMark( sal_Bool bVal ); + void SetIgnoreMiddleDot( sal_Bool bVal ); }; diff --git a/unotools/inc/unotools/syslocaleoptions.hxx b/unotools/inc/unotools/syslocaleoptions.hxx index 63e271f1c435..3bd719e10460 100644..100755 --- a/unotools/inc/unotools/syslocaleoptions.hxx +++ b/unotools/inc/unotools/syslocaleoptions.hxx @@ -38,10 +38,10 @@ #include <unotools/options.hxx> // bits for broadcasting hints of changes in a SfxSimpleHint, may be combined -const ULONG SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001; -const ULONG SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002; -const ULONG SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004; -const ULONG SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008; +const sal_uLong SYSLOCALEOPTIONS_HINT_LOCALE = 0x00000001; +const sal_uLong SYSLOCALEOPTIONS_HINT_CURRENCY = 0x00000002; +const sal_uLong SYSLOCALEOPTIONS_HINT_UILOCALE = 0x00000004; +const sal_uLong SYSLOCALEOPTIONS_HINT_DECSEP = 0x00000008; class SvtSysLocaleOptions_Impl; class SvtListener; @@ -92,8 +92,8 @@ public: @ATTENTION All SvtSysLocaleOptions instances point to exactly one refcounted internal representation instance and broadcast blocks are counted. - Thus if you issue a BlockBroadcasts(TRUE) you MUST issue a matching - BlockBroadcasts(FALSE) or otherwise pending hints would never be + Thus if you issue a BlockBroadcasts(sal_True) you MUST issue a matching + BlockBroadcasts(sal_False) or otherwise pending hints would never be broadcasted again. */ virtual void BlockBroadcasts( bool bBlock ); diff --git a/unotools/inc/unotools/textsearch.hxx b/unotools/inc/unotools/textsearch.hxx index e4cd095fcc14..fb89e0f15179 100644 --- a/unotools/inc/unotools/textsearch.hxx +++ b/unotools/inc/unotools/textsearch.hxx @@ -81,9 +81,9 @@ private: public: SearchParam( const String &rText, SearchType eSrchType = SearchParam::SRCH_NORMAL, - BOOL bCaseSens = TRUE, - BOOL bWrdOnly = FALSE, - BOOL bSrchInSel = FALSE ); + sal_Bool bCaseSens = sal_True, + sal_Bool bWrdOnly = sal_False, + sal_Bool bSrchInSel = sal_False ); SearchParam( const SearchParam& ); const String& GetSrchStr() const { return sSrchStr; } @@ -159,14 +159,14 @@ public: pStart - start position for the search pEnde - end position for the search - RETURN values == TRUE: something is found + RETURN values == sal_True: something is found - pStart start pos of the found text, - pStart end pos of the found text, - pSrchResult - the search result with all found positions. Is only filled with more positions if the regular expression handles groups. - == FALSE: nothing found, pStart,pEnde unchanged. + == sal_False: nothing found, pStart,pEnde unchanged. Definitions: start pos always inclusive, end pos always exclusive! The position must always in the right direction! diff --git a/unotools/inc/unotools/ucbhelper.hxx b/unotools/inc/unotools/ucbhelper.hxx index 38b355439c2b..a24d132ae793 100644 --- a/unotools/inc/unotools/ucbhelper.hxx +++ b/unotools/inc/unotools/ucbhelper.hxx @@ -73,12 +73,12 @@ namespace utl sal_Bool bNewOnly = sal_False ); static sal_Bool HasParentFolder( const String& rFolder ); - static ULONG GetSize( const String& rContent ); + static sal_uLong GetSize( const String& rContent ); static sal_Bool IsYounger( const String& rIsYoung, const String& rIsOlder ); static sal_Bool Exists( const String& rContent ); - static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', BOOL bAllowWildCards = TRUE ); - static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards = FALSE ); + static sal_Bool FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim = ';', sal_Bool bAllowWildCards = sal_True ); + static sal_Bool Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards = sal_False ); static sal_Bool IsSubPath( const ::rtl::OUString& rPath, const ::rtl::OUString& rChildCandidate, const ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >& xContentProvider = ::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentProvider >() ); static sal_Bool EqualURLs( const ::rtl::OUString& aFirstURL, const ::rtl::OUString& aSecondURL ); }; diff --git a/unotools/inc/unotools/ucblockbytes.hxx b/unotools/inc/unotools/ucblockbytes.hxx index 2ba0a683745a..bb77b2d67cc2 100644 --- a/unotools/inc/unotools/ucblockbytes.hxx +++ b/unotools/inc/unotools/ucblockbytes.hxx @@ -90,7 +90,7 @@ public: {} virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0; - void Activate( BOOL bActivate = sal_True ) { m_bActive = bActivate; } + void Activate( sal_Bool bActivate = sal_True ) { m_bActive = bActivate; } sal_Bool IsActive() const { return m_bActive; } }; @@ -151,11 +151,11 @@ public: static UcbLockBytesRef CreateLockBytes( const NS_UNO::Reference < NS_IO::XStream >& xContent ); // SvLockBytes - virtual void SetSynchronMode (BOOL bSynchron); - virtual ErrCode ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const; - virtual ErrCode WriteAt ( ULONG, const void*, ULONG, ULONG *pWritten); + virtual void SetSynchronMode (sal_Bool bSynchron); + virtual ErrCode ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const; + virtual ErrCode WriteAt ( sal_uLong, const void*, sal_uLong, sal_uLong *pWritten); virtual ErrCode Flush (void) const; - virtual ErrCode SetSize (ULONG); + virtual ErrCode SetSize (sal_uLong); virtual ErrCode Stat ( SvLockBytesStat *pStat, SvLockBytesStatFlag) const; void SetError( ErrCode nError ) diff --git a/unotools/inc/unotools/useroptions.hxx b/unotools/inc/unotools/useroptions.hxx index 020ddd657eaf..0eca30fe3075 100644 --- a/unotools/inc/unotools/useroptions.hxx +++ b/unotools/inc/unotools/useroptions.hxx @@ -35,23 +35,23 @@ // define ---------------------------------------------------------------- -#define USER_OPT_CITY ((USHORT)0) -#define USER_OPT_COMPANY ((USHORT)1) -#define USER_OPT_COUNTRY ((USHORT)2) -#define USER_OPT_EMAIL ((USHORT)3) -#define USER_OPT_FAX ((USHORT)4) -#define USER_OPT_FIRSTNAME ((USHORT)5) -#define USER_OPT_LASTNAME ((USHORT)6) -#define USER_OPT_POSITION ((USHORT)7) -#define USER_OPT_STATE ((USHORT)8) -#define USER_OPT_STREET ((USHORT)9) -#define USER_OPT_TELEPHONEHOME ((USHORT)10) -#define USER_OPT_TELEPHONEWORK ((USHORT)11) -#define USER_OPT_TITLE ((USHORT)12) -#define USER_OPT_ID ((USHORT)13) -#define USER_OPT_ZIP ((USHORT)14) -#define USER_OPT_FATHERSNAME ((USHORT)15) -#define USER_OPT_APARTMENT ((USHORT)16) +#define USER_OPT_CITY ((sal_uInt16)0) +#define USER_OPT_COMPANY ((sal_uInt16)1) +#define USER_OPT_COUNTRY ((sal_uInt16)2) +#define USER_OPT_EMAIL ((sal_uInt16)3) +#define USER_OPT_FAX ((sal_uInt16)4) +#define USER_OPT_FIRSTNAME ((sal_uInt16)5) +#define USER_OPT_LASTNAME ((sal_uInt16)6) +#define USER_OPT_POSITION ((sal_uInt16)7) +#define USER_OPT_STATE ((sal_uInt16)8) +#define USER_OPT_STREET ((sal_uInt16)9) +#define USER_OPT_TELEPHONEHOME ((sal_uInt16)10) +#define USER_OPT_TELEPHONEWORK ((sal_uInt16)11) +#define USER_OPT_TITLE ((sal_uInt16)12) +#define USER_OPT_ID ((sal_uInt16)13) +#define USER_OPT_ZIP ((sal_uInt16)14) +#define USER_OPT_FATHERSNAME ((sal_uInt16)15) +#define USER_OPT_APARTMENT ((sal_uInt16)16) // class SvtUserOptions -------------------------------------------------- @@ -111,8 +111,8 @@ public: void SetFathersName( const ::rtl::OUString& rNewToken ); void SetApartment( const ::rtl::OUString& rNewToken ); - sal_Bool IsTokenReadonly( USHORT nToken ) const; - ::rtl::OUString GetToken(USHORT nToken) const; + sal_Bool IsTokenReadonly( sal_uInt16 nToken ) const; + ::rtl::OUString GetToken(sal_uInt16 nToken) const; }; #endif // #ifndef INCLUDED_unotools_USEROPTIONS_HXX diff --git a/unotools/source/config/accelcfg.cxx b/unotools/source/config/accelcfg.cxx index fc0e6108138b..d3f26de35304 100644 --- a/unotools/source/config/accelcfg.cxx +++ b/unotools/source/config/accelcfg.cxx @@ -71,7 +71,7 @@ public: bool bModified; SvtAcceleratorConfig_Impl() - : bModified( FALSE ) + : bModified( sal_False ) {} SvtAcceleratorConfig_Impl( Reference< XInputStream >& xInputStream ); diff --git a/unotools/source/config/defaultoptions.cxx b/unotools/source/config/defaultoptions.cxx index 1567bd1b841d..7bd4b566e928 100644 --- a/unotools/source/config/defaultoptions.cxx +++ b/unotools/source/config/defaultoptions.cxx @@ -107,7 +107,7 @@ public: SvtDefaultOptions_Impl(); - String GetDefaultPath( USHORT nId ) const; + String GetDefaultPath( sal_uInt16 nId ) const; virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); }; @@ -200,10 +200,10 @@ void SvtDefaultOptions_Impl::Commit() // class SvtDefaultOptions_Impl ------------------------------------------ -String SvtDefaultOptions_Impl::GetDefaultPath( USHORT nId ) const +String SvtDefaultOptions_Impl::GetDefaultPath( sal_uInt16 nId ) const { String aRet; - USHORT nIdx = 0; + sal_uInt16 nIdx = 0; while ( PathMap_Impl[nIdx]._ePath <= SvtPathOptions::PATH_WORK ) { @@ -356,7 +356,7 @@ SvtDefaultOptions::~SvtDefaultOptions() // ----------------------------------------------------------------------- -String SvtDefaultOptions::GetDefaultPath( USHORT nId ) const +String SvtDefaultOptions::GetDefaultPath( sal_uInt16 nId ) const { return pImp->GetDefaultPath( nId ); } diff --git a/unotools/source/config/fltrcfg.cxx b/unotools/source/config/fltrcfg.cxx index 94f7ff07d7d7..f16f6ed9cfca 100644 --- a/unotools/source/config/fltrcfg.cxx +++ b/unotools/source/config/fltrcfg.cxx @@ -200,7 +200,7 @@ void SvtCalcFilterOptions_Impl::Load() ---------------------------------------------------------------------------*/ struct SvtFilterOptions_Impl { - ULONG nFlags; + sal_uLong nFlags; SvtAppFilterOptions_Impl aWriterCfg; SvtCalcFilterOptions_Impl aCalcCfg; SvtAppFilterOptions_Impl aImpressCfg; @@ -228,8 +228,8 @@ struct SvtFilterOptions_Impl Load(); } - void SetFlag( ULONG nFlag, BOOL bSet ); - BOOL IsFlag( ULONG nFlag ) const; + void SetFlag( sal_uLong nFlag, sal_Bool bSet ); + sal_Bool IsFlag( sal_uLong nFlag ) const; void Load() { aWriterCfg.Load(); @@ -240,7 +240,7 @@ struct SvtFilterOptions_Impl /* -----------------------------22.01.01 10:34-------------------------------- ---------------------------------------------------------------------------*/ -void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet ) +void SvtFilterOptions_Impl::SetFlag( sal_uLong nFlag, sal_Bool bSet ) { switch(nFlag) { @@ -261,9 +261,9 @@ void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet ) /* -----------------------------22.01.01 10:35-------------------------------- ---------------------------------------------------------------------------*/ -BOOL SvtFilterOptions_Impl::IsFlag( ULONG nFlag ) const +sal_Bool SvtFilterOptions_Impl::IsFlag( sal_uLong nFlag ) const { - BOOL bRet; + sal_Bool bRet; switch(nFlag) { case FILTERCFG_WORD_CODE : bRet = aWriterCfg.IsLoad();break; @@ -326,9 +326,9 @@ const Sequence<OUString>& SvtFilterOptions::GetPropertyNames() return aNames; } //----------------------------------------------------------------------- -static ULONG lcl_GetFlag(sal_Int32 nProp) +static sal_uLong lcl_GetFlag(sal_Int32 nProp) { - ULONG nFlag = 0; + sal_uLong nFlag = 0; switch(nProp) { case 0: nFlag = FILTERCFG_MATH_LOAD; break; @@ -367,7 +367,7 @@ void SvtFilterOptions::Commit() const Type& rType = ::getBooleanCppuType(); for(int nProp = 0; nProp < aNames.getLength(); nProp++) { - ULONG nFlag = lcl_GetFlag(nProp); + sal_uLong nFlag = lcl_GetFlag(nProp); sal_Bool bVal = pImp->IsFlag( nFlag); pValues[nProp].setValue(&bVal, rType); @@ -391,7 +391,7 @@ void SvtFilterOptions::Load() if(pValues[nProp].hasValue()) { sal_Bool bVal = *(sal_Bool*)pValues[nProp].getValue(); - ULONG nFlag = lcl_GetFlag(nProp); + sal_uLong nFlag = lcl_GetFlag(nProp); pImp->SetFlag( nFlag, bVal); } } @@ -399,106 +399,106 @@ void SvtFilterOptions::Load() } // ----------------------------------------------------------------------- -void SvtFilterOptions::SetLoadWordBasicCode( BOOL bFlag ) +void SvtFilterOptions::SetLoadWordBasicCode( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_WORD_CODE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadWordBasicCode() const +sal_Bool SvtFilterOptions::IsLoadWordBasicCode() const { return pImp->IsFlag( FILTERCFG_WORD_CODE ); } -void SvtFilterOptions::SetLoadWordBasicStorage( BOOL bFlag ) +void SvtFilterOptions::SetLoadWordBasicStorage( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_WORD_STORAGE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadWordBasicStorage() const +sal_Bool SvtFilterOptions::IsLoadWordBasicStorage() const { return pImp->IsFlag( FILTERCFG_WORD_STORAGE ); } // ----------------------------------------------------------------------- -void SvtFilterOptions::SetLoadExcelBasicCode( BOOL bFlag ) +void SvtFilterOptions::SetLoadExcelBasicCode( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_EXCEL_CODE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadExcelBasicCode() const +sal_Bool SvtFilterOptions::IsLoadExcelBasicCode() const { return pImp->IsFlag( FILTERCFG_EXCEL_CODE ); } -void SvtFilterOptions::SetLoadExcelBasicExecutable( BOOL bFlag ) +void SvtFilterOptions::SetLoadExcelBasicExecutable( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_EXCEL_EXECTBL, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadExcelBasicExecutable() const +sal_Bool SvtFilterOptions::IsLoadExcelBasicExecutable() const { return pImp->IsFlag( FILTERCFG_EXCEL_EXECTBL ); } -void SvtFilterOptions::SetLoadExcelBasicStorage( BOOL bFlag ) +void SvtFilterOptions::SetLoadExcelBasicStorage( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_EXCEL_STORAGE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadExcelBasicStorage() const +sal_Bool SvtFilterOptions::IsLoadExcelBasicStorage() const { return pImp->IsFlag( FILTERCFG_EXCEL_STORAGE ); } // ----------------------------------------------------------------------- -void SvtFilterOptions::SetLoadPPointBasicCode( BOOL bFlag ) +void SvtFilterOptions::SetLoadPPointBasicCode( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_PPOINT_CODE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadPPointBasicCode() const +sal_Bool SvtFilterOptions::IsLoadPPointBasicCode() const { return pImp->IsFlag( FILTERCFG_PPOINT_CODE ); } -void SvtFilterOptions::SetLoadPPointBasicStorage( BOOL bFlag ) +void SvtFilterOptions::SetLoadPPointBasicStorage( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_PPOINT_STORAGE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsLoadPPointBasicStorage() const +sal_Bool SvtFilterOptions::IsLoadPPointBasicStorage() const { return pImp->IsFlag( FILTERCFG_PPOINT_STORAGE ); } // ----------------------------------------------------------------------- -BOOL SvtFilterOptions::IsMathType2Math() const +sal_Bool SvtFilterOptions::IsMathType2Math() const { return pImp->IsFlag( FILTERCFG_MATH_LOAD ); } -void SvtFilterOptions::SetMathType2Math( BOOL bFlag ) +void SvtFilterOptions::SetMathType2Math( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_MATH_LOAD, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsMath2MathType() const +sal_Bool SvtFilterOptions::IsMath2MathType() const { return pImp->IsFlag( FILTERCFG_MATH_SAVE ); } -void SvtFilterOptions::SetMath2MathType( BOOL bFlag ) +void SvtFilterOptions::SetMath2MathType( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_MATH_SAVE, bFlag ); SetModified(); @@ -506,58 +506,58 @@ void SvtFilterOptions::SetMath2MathType( BOOL bFlag ) // ----------------------------------------------------------------------- -BOOL SvtFilterOptions::IsWinWord2Writer() const +sal_Bool SvtFilterOptions::IsWinWord2Writer() const { return pImp->IsFlag( FILTERCFG_WRITER_LOAD ); } -void SvtFilterOptions::SetWinWord2Writer( BOOL bFlag ) +void SvtFilterOptions::SetWinWord2Writer( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_WRITER_LOAD, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsWriter2WinWord() const +sal_Bool SvtFilterOptions::IsWriter2WinWord() const { return pImp->IsFlag( FILTERCFG_WRITER_SAVE ); } -void SvtFilterOptions::SetWriter2WinWord( BOOL bFlag ) +void SvtFilterOptions::SetWriter2WinWord( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_WRITER_SAVE, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsUseEnhancedFields() const +sal_Bool SvtFilterOptions::IsUseEnhancedFields() const { return false; // disable for now; // return pImp->IsFlag( FILTERCFG_USE_ENHANCED_FIELDS ); } -void SvtFilterOptions::SetUseEnhancedFields( BOOL bFlag ) +void SvtFilterOptions::SetUseEnhancedFields( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_USE_ENHANCED_FIELDS, bFlag ); SetModified(); } // ----------------------------------------------------------------------- -BOOL SvtFilterOptions::IsExcel2Calc() const +sal_Bool SvtFilterOptions::IsExcel2Calc() const { return pImp->IsFlag( FILTERCFG_CALC_LOAD ); } -void SvtFilterOptions::SetExcel2Calc( BOOL bFlag ) +void SvtFilterOptions::SetExcel2Calc( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_CALC_LOAD, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsCalc2Excel() const +sal_Bool SvtFilterOptions::IsCalc2Excel() const { return pImp->IsFlag( FILTERCFG_CALC_SAVE ); } -void SvtFilterOptions::SetCalc2Excel( BOOL bFlag ) +void SvtFilterOptions::SetCalc2Excel( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_CALC_SAVE, bFlag ); SetModified(); @@ -565,23 +565,23 @@ void SvtFilterOptions::SetCalc2Excel( BOOL bFlag ) // ----------------------------------------------------------------------- -BOOL SvtFilterOptions::IsPowerPoint2Impress() const +sal_Bool SvtFilterOptions::IsPowerPoint2Impress() const { return pImp->IsFlag( FILTERCFG_IMPRESS_LOAD ); } -void SvtFilterOptions::SetPowerPoint2Impress( BOOL bFlag ) +void SvtFilterOptions::SetPowerPoint2Impress( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_IMPRESS_LOAD, bFlag ); SetModified(); } -BOOL SvtFilterOptions::IsImpress2PowerPoint() const +sal_Bool SvtFilterOptions::IsImpress2PowerPoint() const { return pImp->IsFlag( FILTERCFG_IMPRESS_SAVE ); } -void SvtFilterOptions::SetImpress2PowerPoint( BOOL bFlag ) +void SvtFilterOptions::SetImpress2PowerPoint( sal_Bool bFlag ) { pImp->SetFlag( FILTERCFG_IMPRESS_SAVE, bFlag ); SetModified(); @@ -596,19 +596,19 @@ SvtFilterOptions* SvtFilterOptions::Get() // ----------------------------------------------------------------------- -BOOL SvtFilterOptions::IsEnablePPTPreview() const +sal_Bool SvtFilterOptions::IsEnablePPTPreview() const { return pImp->IsFlag( FILTERCFG_ENABLE_PPT_PREVIEW ); } -BOOL SvtFilterOptions::IsEnableCalcPreview() const +sal_Bool SvtFilterOptions::IsEnableCalcPreview() const { return pImp->IsFlag( FILTERCFG_ENABLE_EXCEL_PREVIEW ); } -BOOL SvtFilterOptions::IsEnableWordPreview() const +sal_Bool SvtFilterOptions::IsEnableWordPreview() const { return pImp->IsFlag( FILTERCFG_ENABLE_WORD_PREVIEW ); } diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx index e8ae78d0aed2..b7fd73898c71 100644 --- a/unotools/source/config/fontcfg.cxx +++ b/unotools/source/config/fontcfg.cxx @@ -612,7 +612,7 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] = struct ImplFontAttrTypeSearchData { const char* mpStr; - ULONG mnType; + sal_uLong mnType; }; static ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[] = @@ -776,23 +776,23 @@ static bool ImplKillTrailingWithExceptions( String& rName, const char* const* pp // ----------------------------------------------------------------------- -static BOOL ImplFindAndErase( String& rName, const char* pStr ) +static sal_Bool ImplFindAndErase( String& rName, const char* pStr ) { xub_StrLen nPos = rName.SearchAscii( pStr ); if ( nPos == STRING_NOTFOUND ) - return FALSE; + return sal_False; const char* pTempStr = pStr; while ( *pTempStr ) pTempStr++; rName.Erase( nPos, (xub_StrLen)(pTempStr-pStr) ); - return TRUE; + return sal_True; } // ======================================================================= void FontSubstConfiguration::getMapName( const String& rOrgName, String& rShortName, - String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, ULONG& rType ) + String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType ) { rShortName = rOrgName; diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx index 39233f022534..b17681331935 100644..100755 --- a/unotools/source/config/lingucfg.cxx +++ b/unotools/source/config/lingucfg.cxx @@ -69,25 +69,25 @@ static osl::Mutex & GetOwnMutex() /////////////////////////////////////////////////////////////////////////// -static BOOL lcl_SetLocale( INT16 &rLanguage, const uno::Any &rVal ) +static sal_Bool lcl_SetLocale( sal_Int16 &rLanguage, const uno::Any &rVal ) { - BOOL bSucc = FALSE; + sal_Bool bSucc = sal_False; lang::Locale aNew; if (rVal >>= aNew) // conversion successful? { - INT16 nNew = MsLangId::convertLocaleToLanguage( aNew ); + sal_Int16 nNew = MsLangId::convertLocaleToLanguage( aNew ); if (nNew != rLanguage) { rLanguage = nNew; - bSucc = TRUE; + bSucc = sal_True; } } return bSucc; } -static inline const OUString lcl_LanguageToCfgLocaleStr( INT16 nLanguage ) +static inline const OUString lcl_LanguageToCfgLocaleStr( sal_Int16 nLanguage ) { OUString aRes; if (LANGUAGE_SYSTEM != nLanguage) @@ -96,7 +96,7 @@ static inline const OUString lcl_LanguageToCfgLocaleStr( INT16 nLanguage ) } -static INT16 lcl_CfgAnyToLanguage( const uno::Any &rVal ) +static sal_Int16 lcl_CfgAnyToLanguage( const uno::Any &rVal ) { OUString aTmp; rVal >>= aTmp; @@ -114,34 +114,34 @@ SvtLinguOptions::SvtLinguOptions() // general options bIsUseDictionaryList = - bIsIgnoreControlCharacters = TRUE; + bIsIgnoreControlCharacters = sal_True; // spelling options bIsSpellCapitalization = - bIsSpellSpecial = TRUE; + bIsSpellSpecial = sal_True; bIsSpellAuto = bIsSpellReverse = bIsSpellWithDigits = - bIsSpellUpperCase = FALSE; + bIsSpellUpperCase = sal_False; // text conversion options - bIsIgnorePostPositionalWord = TRUE; + bIsIgnorePostPositionalWord = sal_True; bIsAutoCloseDialog = bIsShowEntriesRecentlyUsedFirst = - bIsAutoReplaceUniqueEntries = FALSE; - bIsDirectionToSimplified = TRUE; + bIsAutoReplaceUniqueEntries = sal_False; + bIsDirectionToSimplified = sal_True; bIsUseCharacterVariants = bIsTranslateCommonTerms = - bIsReverseMapping = FALSE; + bIsReverseMapping = sal_False; bROIsDirectionToSimplified = bROIsUseCharacterVariants = bROIsTranslateCommonTerms = - bROIsReverseMapping = FALSE; + bROIsReverseMapping = sal_False; // hyphenation options - bIsHyphSpecial = TRUE; - bIsHyphAuto = FALSE; + bIsHyphSpecial = sal_True; + bIsHyphAuto = sal_False; nHyphMinLeading = nHyphMinTrailing = 2; nHyphMinWordLength = 0; @@ -166,10 +166,10 @@ class SvtLinguConfigItem : public utl::ConfigItem SvtLinguConfigItem( const SvtLinguConfigItem & ); SvtLinguConfigItem & operator = ( const SvtLinguConfigItem & ); - static BOOL GetHdlByName( INT32 &rnHdl, const OUString &rPropertyName, sal_Bool bFullPropName = sal_False ); + static sal_Bool GetHdlByName( sal_Int32 &rnHdl, const OUString &rPropertyName, sal_Bool bFullPropName = sal_False ); static const uno::Sequence< OUString > & GetPropertyNames(); - BOOL LoadOptions( const uno::Sequence< OUString > &rProperyNames ); - BOOL SaveOptions( const uno::Sequence< OUString > &rProperyNames ); + sal_Bool LoadOptions( const uno::Sequence< OUString > &rProperyNames ); + sal_Bool SaveOptions( const uno::Sequence< OUString > &rProperyNames ); public: SvtLinguConfigItem(); @@ -191,18 +191,18 @@ public: com::sun::star::uno::Any GetProperty( const rtl::OUString &rPropertyName ) const; com::sun::star::uno::Any - GetProperty( INT32 nPropertyHandle ) const; + GetProperty( sal_Int32 nPropertyHandle ) const; - BOOL SetProperty( const rtl::OUString &rPropertyName, + sal_Bool SetProperty( const rtl::OUString &rPropertyName, const com::sun::star::uno::Any &rValue ); - BOOL SetProperty( INT32 nPropertyHandle, + sal_Bool SetProperty( sal_Int32 nPropertyHandle, const com::sun::star::uno::Any &rValue ); - BOOL GetOptions( SvtLinguOptions &rOptions ) const; - BOOL SetOptions( const SvtLinguOptions &rOptions ); + sal_Bool GetOptions( SvtLinguOptions &rOptions ) const; + sal_Bool SetOptions( const SvtLinguOptions &rOptions ); - BOOL IsReadOnly( const rtl::OUString &rPropertyName ) const; - BOOL IsReadOnly( INT32 nPropertyHandle ) const; + sal_Bool IsReadOnly( const rtl::OUString &rPropertyName ) const; + sal_Bool IsReadOnly( sal_Int32 nPropertyHandle ) const; }; @@ -240,7 +240,7 @@ static struct NamesToHdl { const char *pFullPropName; // full qualified name as used in configuration const char *pPropName; // property name only (atom) of above - INT32 nHdl; // numeric handle representing the property + sal_Int32 nHdl; // numeric handle representing the property }aNamesToHdl[] = { {/* 0 */ "General/DefaultLocale", UPN_DEFAULT_LOCALE, UPH_DEFAULT_LOCALE}, @@ -292,12 +292,12 @@ const uno::Sequence< OUString > & SvtLinguConfigItem::GetPropertyNames() if (!bInitialized) { - INT32 nMax = sizeof(aNamesToHdl) / sizeof(aNamesToHdl[0]); + sal_Int32 nMax = sizeof(aNamesToHdl) / sizeof(aNamesToHdl[0]); aNames.realloc( nMax ); OUString *pNames = aNames.getArray(); - INT32 nIdx = 0; - for (INT32 i = 0; i < nMax; ++i) + sal_Int32 nIdx = 0; + for (sal_Int32 i = 0; i < nMax; ++i) { const sal_Char *pFullPropName = aNamesToHdl[i].pFullPropName; if (pFullPropName) @@ -310,8 +310,8 @@ const uno::Sequence< OUString > & SvtLinguConfigItem::GetPropertyNames() } -BOOL SvtLinguConfigItem::GetHdlByName( - INT32 &rnHdl, +sal_Bool SvtLinguConfigItem::GetHdlByName( + sal_Int32 &rnHdl, const OUString &rPropertyName, sal_Bool bFullPropName ) { @@ -350,20 +350,20 @@ uno::Any SvtLinguConfigItem::GetProperty( const OUString &rPropertyName ) const { osl::MutexGuard aGuard( GetOwnMutex() ); - INT32 nHdl; + sal_Int32 nHdl; return GetHdlByName( nHdl, rPropertyName ) ? GetProperty( nHdl ) : uno::Any(); } -uno::Any SvtLinguConfigItem::GetProperty( INT32 nPropertyHandle ) const +uno::Any SvtLinguConfigItem::GetProperty( sal_Int32 nPropertyHandle ) const { osl::MutexGuard aGuard( GetOwnMutex() ); uno::Any aRes; - const INT16 *pnVal = 0; - const BOOL *pbVal = 0; - const INT32 *pnInt32Val = 0; + const sal_Int16 *pnVal = 0; + const sal_Bool *pbVal = 0; + const sal_Int32 *pnInt32Val = 0; const SvtLinguOptions &rOpt = const_cast< SvtLinguConfigItem * >(this)->aOpt; switch (nPropertyHandle) @@ -438,31 +438,31 @@ uno::Any SvtLinguConfigItem::GetProperty( INT32 nPropertyHandle ) const } -BOOL SvtLinguConfigItem::SetProperty( const OUString &rPropertyName, const uno::Any &rValue ) +sal_Bool SvtLinguConfigItem::SetProperty( const OUString &rPropertyName, const uno::Any &rValue ) { osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bSucc = FALSE; - INT32 nHdl; + sal_Bool bSucc = sal_False; + sal_Int32 nHdl; if (GetHdlByName( nHdl, rPropertyName )) bSucc = SetProperty( nHdl, rValue ); return bSucc; } -BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rValue ) +sal_Bool SvtLinguConfigItem::SetProperty( sal_Int32 nPropertyHandle, const uno::Any &rValue ) { osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bSucc = FALSE; + sal_Bool bSucc = sal_False; if (!rValue.hasValue()) return bSucc; - BOOL bMod = FALSE; + sal_Bool bMod = sal_False; - INT16 *pnVal = 0; - BOOL *pbVal = 0; - INT32 *pnInt32Val = 0; + sal_Int16 *pnVal = 0; + sal_Bool *pbVal = 0; + sal_Int32 *pnInt32Val = 0; SvtLinguOptions &rOpt = aOpt; switch (nPropertyHandle) @@ -484,13 +484,13 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa case UPH_ACTIVE_DICTIONARIES : { rValue >>= rOpt.aActiveDics; - bMod = TRUE; + bMod = sal_True; break; } case UPH_ACTIVE_CONVERSION_DICTIONARIES : { rValue >>= rOpt.aActiveConvDics; - bMod = TRUE; + bMod = sal_True; break; } case UPH_DEFAULT_LOCALE : @@ -530,41 +530,41 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa if (pbVal) { - BOOL bNew = BOOL(); + sal_Bool bNew = sal_Bool(); if (rValue >>= bNew) { if (bNew != *pbVal) { *pbVal = bNew; - bMod = TRUE; + bMod = sal_True; } - bSucc = TRUE; + bSucc = sal_True; } } else if (pnVal) { - INT16 nNew = INT16(); + sal_Int16 nNew = sal_Int16(); if (rValue >>= nNew) { if (nNew != *pnVal) { *pnVal = nNew; - bMod = TRUE; + bMod = sal_True; } - bSucc = TRUE; + bSucc = sal_True; } } else if (pnInt32Val) { - INT32 nNew = INT32(); + sal_Int32 nNew = sal_Int32(); if (rValue >>= nNew) { if (nNew != *pnInt32Val) { *pnInt32Val = nNew; - bMod = TRUE; + bMod = sal_True; } - bSucc = TRUE; + bSucc = sal_True; } } @@ -576,34 +576,34 @@ BOOL SvtLinguConfigItem::SetProperty( INT32 nPropertyHandle, const uno::Any &rVa } -BOOL SvtLinguConfigItem::GetOptions( SvtLinguOptions &rOptions ) const +sal_Bool SvtLinguConfigItem::GetOptions( SvtLinguOptions &rOptions ) const { osl::MutexGuard aGuard( GetOwnMutex() ); rOptions = aOpt; - return TRUE; + return sal_True; } -BOOL SvtLinguConfigItem::SetOptions( const SvtLinguOptions &rOptions ) +sal_Bool SvtLinguConfigItem::SetOptions( const SvtLinguOptions &rOptions ) { osl::MutexGuard aGuard( GetOwnMutex() ); aOpt = rOptions; SetModified(); NotifyListeners(0); - return TRUE; + return sal_True; } -BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames ) +sal_Bool SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyNames ) { osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bRes = FALSE; + sal_Bool bRes = sal_False; const OUString *pProperyNames = rProperyNames.getConstArray(); - INT32 nProps = rProperyNames.getLength(); + sal_Int32 nProps = rProperyNames.getLength(); const uno::Sequence< uno::Any > aValues = GetProperties( rProperyNames ); const uno::Sequence< sal_Bool > aROStates = GetReadOnlyStates( rProperyNames ); @@ -614,10 +614,10 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN const uno::Any *pValue = aValues.getConstArray(); const sal_Bool *pROStates = aROStates.getConstArray(); - for (INT32 i = 0; i < nProps; ++i) + for (sal_Int32 i = 0; i < nProps; ++i) { const uno::Any &rVal = pValue[i]; - INT32 nPropertyHandle; + sal_Int32 nPropertyHandle; GetHdlByName( nPropertyHandle, pProperyNames[i], sal_True ); switch ( nPropertyHandle ) { @@ -678,11 +678,11 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN || rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_MACAU || rOpt.nDefaultLanguage_CJK == LANGUAGE_CHINESE_TRADITIONAL ) { - rOpt.bIsDirectionToSimplified = FALSE; + rOpt.bIsDirectionToSimplified = sal_False; } else { - rOpt.bIsDirectionToSimplified = TRUE; + rOpt.bIsDirectionToSimplified = sal_True; } } } break; @@ -708,7 +708,7 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN } } - bRes = TRUE; + bRes = sal_True; } DBG_ASSERT( bRes, "LoadOptions failed" ); @@ -716,19 +716,19 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN } -BOOL SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyNames ) +sal_Bool SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyNames ) { if (!IsModified()) - return TRUE; + return sal_True; osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bRet = FALSE; + sal_Bool bRet = sal_False; const uno::Type &rBOOL = ::getBooleanCppuType(); - const uno::Type &rINT16 = ::getCppuType( (INT16 *) NULL ); - const uno::Type &rINT32 = ::getCppuType( (INT32 *) NULL ); + const uno::Type &rINT16 = ::getCppuType( (sal_Int16 *) NULL ); + const uno::Type &rINT32 = ::getCppuType( (sal_Int32 *) NULL ); - INT32 nProps = rProperyNames.getLength(); + sal_Int32 nProps = rProperyNames.getLength(); uno::Sequence< uno::Any > aValues( nProps ); uno::Any *pValue = aValues.getArray(); @@ -784,22 +784,22 @@ BOOL SvtLinguConfigItem::SaveOptions( const uno::Sequence< OUString > &rProperyN return bRet; } -BOOL SvtLinguConfigItem::IsReadOnly( const rtl::OUString &rPropertyName ) const +sal_Bool SvtLinguConfigItem::IsReadOnly( const rtl::OUString &rPropertyName ) const { osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bReadOnly = FALSE; - INT32 nHdl; + sal_Bool bReadOnly = sal_False; + sal_Int32 nHdl; if (GetHdlByName( nHdl, rPropertyName )) bReadOnly = IsReadOnly( nHdl ); return bReadOnly; } -BOOL SvtLinguConfigItem::IsReadOnly( INT32 nPropertyHandle ) const +sal_Bool SvtLinguConfigItem::IsReadOnly( sal_Int32 nPropertyHandle ) const { osl::MutexGuard aGuard( GetOwnMutex() ); - BOOL bReadOnly = FALSE; + sal_Bool bReadOnly = sal_False; const SvtLinguOptions &rOpt = const_cast< SvtLinguConfigItem * >(this)->aOpt; switch(nPropertyHandle) @@ -915,47 +915,47 @@ uno::Any SvtLinguConfig::GetProperty( const OUString &rPropertyName ) const } -uno::Any SvtLinguConfig::GetProperty( INT32 nPropertyHandle ) const +uno::Any SvtLinguConfig::GetProperty( sal_Int32 nPropertyHandle ) const { return GetConfigItem().GetProperty( nPropertyHandle ); } -BOOL SvtLinguConfig::SetProperty( const OUString &rPropertyName, const uno::Any &rValue ) +sal_Bool SvtLinguConfig::SetProperty( const OUString &rPropertyName, const uno::Any &rValue ) { return GetConfigItem().SetProperty( rPropertyName, rValue ); } -BOOL SvtLinguConfig::SetProperty( INT32 nPropertyHandle, const uno::Any &rValue ) +sal_Bool SvtLinguConfig::SetProperty( sal_Int32 nPropertyHandle, const uno::Any &rValue ) { return GetConfigItem().SetProperty( nPropertyHandle, rValue ); } -BOOL SvtLinguConfig::GetOptions( SvtLinguOptions &rOptions ) const +sal_Bool SvtLinguConfig::GetOptions( SvtLinguOptions &rOptions ) const { return GetConfigItem().GetOptions( rOptions ); } -BOOL SvtLinguConfig::SetOptions( const SvtLinguOptions &rOptions ) +sal_Bool SvtLinguConfig::SetOptions( const SvtLinguOptions &rOptions ) { return GetConfigItem().SetOptions( rOptions ); } -BOOL SvtLinguConfig::IsReadOnly( const rtl::OUString &rPropertyName ) const +sal_Bool SvtLinguConfig::IsReadOnly( const rtl::OUString &rPropertyName ) const { return GetConfigItem().IsReadOnly( rPropertyName ); } -BOOL SvtLinguConfig::IsReadOnly( INT32 nPropertyHandle ) const +sal_Bool SvtLinguConfig::IsReadOnly( sal_Int32 nPropertyHandle ) const { return GetConfigItem().IsReadOnly( nPropertyHandle ); } -BOOL SvtLinguConfig::GetElementNamesFor( +sal_Bool SvtLinguConfig::GetElementNamesFor( const rtl::OUString &rNodeName, uno::Sequence< rtl::OUString > &rElementNames ) const { @@ -996,7 +996,7 @@ static uno::Reference< container::XNameAccess > GetOrCreateSetEntry_Impl( return xResult; } -BOOL SvtLinguConfig::GetSupportedDictionaryFormatsFor( +sal_Bool SvtLinguConfig::GetSupportedDictionaryFormatsFor( const rtl::OUString &rSetName, const rtl::OUString &rSetEntry, uno::Sequence< rtl::OUString > &rFormatList ) const @@ -1113,7 +1113,7 @@ static bool lcl_GetFileUrlFromOrigin( } -BOOL SvtLinguConfig::GetDictionaryEntry( +sal_Bool SvtLinguConfig::GetDictionaryEntry( const rtl::OUString &rNodeName, SvtLinguConfigDictionaryEntry &rDicEntry ) const { diff --git a/unotools/source/config/misccfg.cxx b/unotools/source/config/misccfg.cxx index e2cc8686d444..37e3dfac304f 100644 --- a/unotools/source/config/misccfg.cxx +++ b/unotools/source/config/misccfg.cxx @@ -58,9 +58,9 @@ static sal_Int32 nRefCount = 0; class SfxMiscCfg : public utl::ConfigItem { - BOOL bPaperSize; // printer warnings - BOOL bPaperOrientation; - BOOL bNotFound; + sal_Bool bPaperSize; // printer warnings + sal_Bool bPaperOrientation; + sal_Bool bNotFound; sal_Int32 nYear2000; // two digit year representation const com::sun::star::uno::Sequence<rtl::OUString>& GetPropertyNames(); @@ -73,14 +73,14 @@ public: virtual void Notify( const com::sun::star::uno::Sequence<rtl::OUString>& aPropertyNames); virtual void Commit(); - BOOL IsNotFoundWarning() const {return bNotFound;} - void SetNotFoundWarning( BOOL bSet); + sal_Bool IsNotFoundWarning() const {return bNotFound;} + void SetNotFoundWarning( sal_Bool bSet); - BOOL IsPaperSizeWarning() const {return bPaperSize;} - void SetPaperSizeWarning(BOOL bSet); + sal_Bool IsPaperSizeWarning() const {return bPaperSize;} + void SetPaperSizeWarning(sal_Bool bSet); - BOOL IsPaperOrientationWarning() const {return bPaperOrientation;} - void SetPaperOrientationWarning( BOOL bSet); + sal_Bool IsPaperOrientationWarning() const {return bPaperOrientation;} + void SetPaperOrientationWarning( sal_Bool bSet); // 0 ... 99 sal_Int32 GetYear2000() const { return nYear2000; } @@ -93,9 +93,9 @@ public: --------------------------------------------------------------------*/ SfxMiscCfg::SfxMiscCfg() : ConfigItem(C2U("Office.Common") ), - bPaperSize(FALSE), - bPaperOrientation (FALSE), - bNotFound (FALSE), + bPaperSize(sal_False), + bPaperOrientation (sal_False), + bNotFound (sal_False), nYear2000( 1930 ) { RTL_LOGFILE_CONTEXT(aLog, "svl SfxMiscCfg::SfxMiscCfg()"); @@ -112,7 +112,7 @@ SfxMiscCfg::~SfxMiscCfg() Beschreibung: --------------------------------------------------------------------*/ -void SfxMiscCfg::SetNotFoundWarning( BOOL bSet) +void SfxMiscCfg::SetNotFoundWarning( sal_Bool bSet) { if(bNotFound != bSet) SetModified(); @@ -123,7 +123,7 @@ void SfxMiscCfg::SetNotFoundWarning( BOOL bSet) Beschreibung: --------------------------------------------------------------------*/ -void SfxMiscCfg::SetPaperSizeWarning( BOOL bSet) +void SfxMiscCfg::SetPaperSizeWarning( sal_Bool bSet) { if(bPaperSize != bSet) SetModified(); @@ -133,7 +133,7 @@ void SfxMiscCfg::SetPaperSizeWarning( BOOL bSet) /*-------------------------------------------------------------------- Beschreibung: --------------------------------------------------------------------*/ -void SfxMiscCfg::SetPaperOrientationWarning( BOOL bSet) +void SfxMiscCfg::SetPaperOrientationWarning( sal_Bool bSet) { if(bPaperOrientation != bSet) SetModified(); @@ -266,32 +266,32 @@ MiscCfg::~MiscCfg( ) } } -BOOL MiscCfg::IsNotFoundWarning() const +sal_Bool MiscCfg::IsNotFoundWarning() const { return pImpl->IsNotFoundWarning(); } -void MiscCfg::SetNotFoundWarning( BOOL bSet) +void MiscCfg::SetNotFoundWarning( sal_Bool bSet) { pImpl->SetNotFoundWarning( bSet ); } -BOOL MiscCfg::IsPaperSizeWarning() const +sal_Bool MiscCfg::IsPaperSizeWarning() const { return pImpl->IsPaperSizeWarning(); } -void MiscCfg::SetPaperSizeWarning(BOOL bSet) +void MiscCfg::SetPaperSizeWarning(sal_Bool bSet) { pImpl->SetPaperSizeWarning( bSet ); } -BOOL MiscCfg::IsPaperOrientationWarning() const +sal_Bool MiscCfg::IsPaperOrientationWarning() const { return pImpl->IsPaperOrientationWarning(); } -void MiscCfg::SetPaperOrientationWarning( BOOL bSet) +void MiscCfg::SetPaperOrientationWarning( sal_Bool bSet) { pImpl->SetPaperOrientationWarning( bSet ); } diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx index afce713ccc49..ec2da6bff054 100644 --- a/unotools/source/config/moduleoptions.cxx +++ b/unotools/source/config/moduleoptions.cxx @@ -902,7 +902,7 @@ css::uno::Sequence< ::rtl::OUString > SvtModuleOptions_Impl::impl_ExpandSetNames @short helper to classify given factory by name @descr Every factory has his own long and short name. So we can match right enum value for internal using. - @attention We change in/out parameter "eFactory" in every case! But you should use it only, if return value is TRUE! + @attention We change in/out parameter "eFactory" in every case! But you should use it only, if return value is sal_True! Algorithm: Set out-parameter to propably value ... and check the longname. If it match with these factory - break operation and return true AND right set parameter. Otherwise try next one and so on. If no factory was found return false. Out parameter eFactory diff --git a/unotools/source/config/pathoptions.cxx b/unotools/source/config/pathoptions.cxx index d2f001d1c481..613b9056d346 100644 --- a/unotools/source/config/pathoptions.cxx +++ b/unotools/source/config/pathoptions.cxx @@ -206,7 +206,7 @@ class SvtPathOptions_Impl ::com::sun::star::lang::Locale GetLocale() const { return m_aLocale; } - BOOL IsPathReadonly(SvtPathOptions::Pathes ePath)const; + sal_Bool IsPathReadonly(SvtPathOptions::Pathes ePath)const; }; // global ---------------------------------------------------------------- @@ -310,10 +310,10 @@ const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath ) return m_aPathArray[ ePath ]; } // ----------------------------------------------------------------------- -BOOL SvtPathOptions_Impl::IsPathReadonly(SvtPathOptions::Pathes ePath)const +sal_Bool SvtPathOptions_Impl::IsPathReadonly(SvtPathOptions::Pathes ePath)const { ::osl::MutexGuard aGuard( m_aMutex ); - BOOL bReadonly = FALSE; + sal_Bool bReadonly = sal_False; if ( ePath < SvtPathOptions::PATH_COUNT ) { Reference<XPropertySet> xPrSet(m_xPathSettings, UNO_QUERY); @@ -399,7 +399,7 @@ OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar ) const OUString aWorkText = rVar; // Convert the returned path to system path! - BOOL bConvertLocal = FALSE; + sal_Bool bConvertLocal = sal_False; // Search for first occure of "$(...". sal_Int32 nPosition = aWorkText.indexOf( SIGN_STARTVARIABLE ); // = first position of "$(" in string @@ -426,7 +426,7 @@ OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar ) const // Look for special variable that needs a system path. VarNameToEnumMap::const_iterator pIter = m_aMapVarNamesToEnum.find( aSubString ); if ( pIter != m_aMapVarNamesToEnum.end() ) - bConvertLocal = TRUE; + bConvertLocal = sal_True; nPosition += nLength; @@ -995,12 +995,12 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath ) sal_uInt16 j, nIdx = 0, nTokenCount = aPath.GetTokenCount( SEARCHPATH_DELIMITER ); for ( j = 0; j < nTokenCount; ++j ) { - BOOL bIsURL = TRUE; + sal_Bool bIsURL = sal_True; String aPathToken = aPath.GetToken( 0, SEARCHPATH_DELIMITER, nIdx ); INetURLObject aObj( aPathToken ); if ( aObj.HasError() ) { - bIsURL = FALSE; + bIsURL = sal_False; String aURL; if ( LocalFileHelper::ConvertPhysicalNameToURL( aPathToken, aURL ) ) aObj.SetURL( aURL ); @@ -1045,7 +1045,7 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath ) return pImp->GetLocale(); } // ----------------------------------------------------------------------- -BOOL SvtPathOptions::IsPathReadonly(Pathes ePath)const +sal_Bool SvtPathOptions::IsPathReadonly(Pathes ePath)const { return pImp->IsPathReadonly(ePath); } diff --git a/unotools/source/config/regoptions.cxx b/unotools/source/config/regoptions.cxx index 81f089919dfd..3e99cf2dd327 100644 --- a/unotools/source/config/regoptions.cxx +++ b/unotools/source/config/regoptions.cxx @@ -78,9 +78,9 @@ namespace utl if ( bValid ) { Date aDate; - aDate.SetDay ( (USHORT)_rStringRep.copy( 0, 2 ).toInt32( ) ); - aDate.SetMonth ( (USHORT)_rStringRep.copy( 3, 2 ).toInt32( ) ); - aDate.SetYear ( (USHORT)_rStringRep.copy( 6, 4 ).toInt32( ) ); + aDate.SetDay ( (sal_uInt16)_rStringRep.copy( 0, 2 ).toInt32( ) ); + aDate.SetMonth ( (sal_uInt16)_rStringRep.copy( 3, 2 ).toInt32( ) ); + aDate.SetYear ( (sal_uInt16)_rStringRep.copy( 6, 4 ).toInt32( ) ); nDateIntRep = aDate.GetDate(); } } diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx index cbb7e763b38a..379ba65dc9e6 100644 --- a/unotools/source/config/saveopt.cxx +++ b/unotools/source/config/saveopt.cxx @@ -107,16 +107,16 @@ public: virtual void Commit(); sal_Int32 GetAutoSaveTime() const { return nAutoSaveTime; } - BOOL IsUseUserData() const { return bUseUserData; } - BOOL IsBackup() const { return bBackup; } - BOOL IsAutoSave() const { return bAutoSave; } - BOOL IsAutoSavePrompt() const { return bAutoSavePrompt; } - BOOL IsDocInfoSave() const { return bDocInfSave; } - BOOL IsSaveWorkingSet() const { return bSaveWorkingSet; } - BOOL IsSaveDocView() const { return bSaveDocView; } - BOOL IsSaveRelINet() const { return bSaveRelINet; } - BOOL IsSaveRelFSys() const { return bSaveRelFSys; } - BOOL IsSaveUnpacked() const { return bSaveUnpacked; } + sal_Bool IsUseUserData() const { return bUseUserData; } + sal_Bool IsBackup() const { return bBackup; } + sal_Bool IsAutoSave() const { return bAutoSave; } + sal_Bool IsAutoSavePrompt() const { return bAutoSavePrompt; } + sal_Bool IsDocInfoSave() const { return bDocInfSave; } + sal_Bool IsSaveWorkingSet() const { return bSaveWorkingSet; } + sal_Bool IsSaveDocView() const { return bSaveDocView; } + sal_Bool IsSaveRelINet() const { return bSaveRelINet; } + sal_Bool IsSaveRelFSys() const { return bSaveRelFSys; } + sal_Bool IsSaveUnpacked() const { return bSaveUnpacked; } sal_Bool IsPrettyPrintingEnabled( ) const { return bDoPrettyPrinting; } sal_Bool IsWarnAlienFormat() const { return bWarnAlienFormat; } sal_Bool IsLoadDocPrinter() const { return bLoadDocPrinter; } @@ -124,16 +124,16 @@ public: GetODFDefaultVersion() const { return eODFDefaultVersion; } void SetAutoSaveTime( sal_Int32 n ); - void SetUseUserData( BOOL b ); - void SetBackup( BOOL b ); - void SetAutoSave( BOOL b ); - void SetAutoSavePrompt( BOOL b ); - void SetDocInfoSave( BOOL b ); - void SetSaveWorkingSet( BOOL b ); - void SetSaveDocView( BOOL b ); - void SetSaveRelINet( BOOL b ); - void SetSaveRelFSys( BOOL b ); - void SetSaveUnpacked( BOOL b ); + void SetUseUserData( sal_Bool b ); + void SetBackup( sal_Bool b ); + void SetAutoSave( sal_Bool b ); + void SetAutoSavePrompt( sal_Bool b ); + void SetDocInfoSave( sal_Bool b ); + void SetSaveWorkingSet( sal_Bool b ); + void SetSaveDocView( sal_Bool b ); + void SetSaveRelINet( sal_Bool b ); + void SetSaveRelFSys( sal_Bool b ); + void SetSaveUnpacked( sal_Bool b ); void EnablePrettyPrinting( sal_Bool _bDoPP ); void SetWarnAlienFormat( sal_Bool _bDoPP ); void SetLoadDocPrinter( sal_Bool bNew ); @@ -152,7 +152,7 @@ void SvtSaveOptions_Impl::SetAutoSaveTime( sal_Int32 n ) } } -void SvtSaveOptions_Impl::SetUseUserData( BOOL b ) +void SvtSaveOptions_Impl::SetUseUserData( sal_Bool b ) { if (!bROUseUserData && bUseUserData!=b) { @@ -161,7 +161,7 @@ void SvtSaveOptions_Impl::SetUseUserData( BOOL b ) } } -void SvtSaveOptions_Impl::SetBackup( BOOL b ) +void SvtSaveOptions_Impl::SetBackup( sal_Bool b ) { if (!bROBackup && bBackup!=b) { @@ -170,7 +170,7 @@ void SvtSaveOptions_Impl::SetBackup( BOOL b ) } } -void SvtSaveOptions_Impl::SetAutoSave( BOOL b ) +void SvtSaveOptions_Impl::SetAutoSave( sal_Bool b ) { if (!bROAutoSave && bAutoSave!=b) { @@ -180,7 +180,7 @@ void SvtSaveOptions_Impl::SetAutoSave( BOOL b ) } } -void SvtSaveOptions_Impl::SetAutoSavePrompt( BOOL b ) +void SvtSaveOptions_Impl::SetAutoSavePrompt( sal_Bool b ) { if (!bROAutoSavePrompt && bAutoSavePrompt!=b) { @@ -189,7 +189,7 @@ void SvtSaveOptions_Impl::SetAutoSavePrompt( BOOL b ) } } -void SvtSaveOptions_Impl::SetDocInfoSave(BOOL b) +void SvtSaveOptions_Impl::SetDocInfoSave(sal_Bool b) { if (!bRODocInfSave && bDocInfSave!=b) { @@ -198,7 +198,7 @@ void SvtSaveOptions_Impl::SetDocInfoSave(BOOL b) } } -void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b ) +void SvtSaveOptions_Impl::SetSaveWorkingSet( sal_Bool b ) { if (!bROSaveWorkingSet && bSaveWorkingSet!=b) { @@ -207,7 +207,7 @@ void SvtSaveOptions_Impl::SetSaveWorkingSet( BOOL b ) } } -void SvtSaveOptions_Impl::SetSaveDocView( BOOL b ) +void SvtSaveOptions_Impl::SetSaveDocView( sal_Bool b ) { if (!bROSaveDocView && bSaveDocView!=b) { @@ -216,7 +216,7 @@ void SvtSaveOptions_Impl::SetSaveDocView( BOOL b ) } } -void SvtSaveOptions_Impl::SetSaveRelINet( BOOL b ) +void SvtSaveOptions_Impl::SetSaveRelINet( sal_Bool b ) { if (!bROSaveRelINet && bSaveRelINet!=b) { @@ -225,7 +225,7 @@ void SvtSaveOptions_Impl::SetSaveRelINet( BOOL b ) } } -void SvtSaveOptions_Impl::SetSaveRelFSys( BOOL b ) +void SvtSaveOptions_Impl::SetSaveRelFSys( sal_Bool b ) { if (!bROSaveRelFSys && bSaveRelFSys!=b) { @@ -234,7 +234,7 @@ void SvtSaveOptions_Impl::SetSaveRelFSys( BOOL b ) } } -void SvtSaveOptions_Impl::SetSaveUnpacked( BOOL b ) +void SvtSaveOptions_Impl::SetSaveUnpacked( sal_Bool b ) { if (!bROSaveUnpacked && bSaveUnpacked!=b) { diff --git a/unotools/source/config/searchopt.cxx b/unotools/source/config/searchopt.cxx index f9318f150589..9e09dcc96dac 100644 --- a/unotools/source/config/searchopt.cxx +++ b/unotools/source/config/searchopt.cxx @@ -50,19 +50,19 @@ using namespace com::sun::star::i18n; class SvtSearchOptions_Impl : public ConfigItem { - INT32 nFlags; - BOOL bModified; + sal_Int32 nFlags; + sal_Bool bModified; // disallow copy-constructor and assignment-operator for now SvtSearchOptions_Impl( const SvtSearchOptions_Impl & ); SvtSearchOptions_Impl & operator = ( const SvtSearchOptions_Impl & ); protected: - BOOL IsModified() const { return bModified; } + sal_Bool IsModified() const { return bModified; } using ConfigItem::SetModified; - void SetModified( BOOL bVal ); - BOOL Load(); - BOOL Save(); + void SetModified( sal_Bool bVal ); + sal_Bool Load(); + sal_Bool Save(); Sequence< OUString > GetPropertyNames() const; @@ -74,8 +74,8 @@ public: virtual void Commit(); virtual void Notify( const com::sun::star::uno::Sequence< rtl::OUString >& aPropertyNames ); - BOOL GetFlag( USHORT nOffset ) const; - void SetFlag( USHORT nOffset, BOOL bVal ); + sal_Bool GetFlag( sal_uInt16 nOffset ) const; + void SetFlag( sal_uInt16 nOffset, sal_Bool bVal ); }; @@ -86,7 +86,7 @@ SvtSearchOptions_Impl::SvtSearchOptions_Impl() : RTL_LOGFILE_CONTEXT(aLog, "unotools SvtSearchOptions_Impl::SvtSearchOptions_Impl()"); nFlags = 0x0003FFFF; // set all options values to 'true' Load(); - SetModified( FALSE ); + SetModified( sal_False ); } @@ -107,28 +107,28 @@ void SvtSearchOptions_Impl::Notify( const Sequence< rtl::OUString >& ) } -BOOL SvtSearchOptions_Impl::GetFlag( USHORT nOffset ) const +sal_Bool SvtSearchOptions_Impl::GetFlag( sal_uInt16 nOffset ) const { DBG_ASSERT( nOffset <= MAX_FLAGS_OFFSET, "offset out of range"); - return ((nFlags >> nOffset) & 0x01) ? TRUE : FALSE; + return ((nFlags >> nOffset) & 0x01) ? sal_True : sal_False; } -void SvtSearchOptions_Impl::SetFlag( USHORT nOffset, BOOL bVal ) +void SvtSearchOptions_Impl::SetFlag( sal_uInt16 nOffset, sal_Bool bVal ) { DBG_ASSERT( nOffset <= MAX_FLAGS_OFFSET, "offset out of range"); - INT32 nOldFlags = nFlags; - INT32 nMask = ((INT32) 1) << nOffset; + sal_Int32 nOldFlags = nFlags; + sal_Int32 nMask = ((sal_Int32) 1) << nOffset; if (bVal) nFlags |= nMask; else nFlags &= ~nMask; if (nFlags != nOldFlags) - SetModified( TRUE ); + SetModified( sal_True ); } -void SvtSearchOptions_Impl::SetModified( BOOL bVal ) +void SvtSearchOptions_Impl::SetModified( sal_Bool bVal ) { bModified = bVal; if (bModified) @@ -174,19 +174,19 @@ Sequence< OUString > SvtSearchOptions_Impl::GetPropertyNames() const const int nCount = sizeof( aPropNames ) / sizeof( aPropNames[0] ); Sequence< OUString > aNames( nCount ); OUString* pNames = aNames.getArray(); - for (INT32 i = 0; i < nCount; ++i) + for (sal_Int32 i = 0; i < nCount; ++i) pNames[i] = OUString::createFromAscii( aPropNames[i] ); return aNames; } -BOOL SvtSearchOptions_Impl::Load() +sal_Bool SvtSearchOptions_Impl::Load() { - BOOL bSucc = FALSE; + sal_Bool bSucc = sal_False; Sequence< OUString > aNames = GetPropertyNames(); - INT32 nProps = aNames.getLength(); + sal_Int32 nProps = aNames.getLength(); const Sequence< Any > aValues = GetProperties( aNames ); DBG_ASSERT( aValues.getLength() == aNames.getLength(), @@ -195,16 +195,16 @@ BOOL SvtSearchOptions_Impl::Load() if (nProps && aValues.getLength() == nProps) { - bSucc = TRUE; + bSucc = sal_True; const Any* pValues = aValues.getConstArray(); - for (USHORT i = 0; i < nProps; ++i) + for (sal_uInt16 i = 0; i < nProps; ++i) { const Any &rVal = pValues[i]; DBG_ASSERT( rVal.hasValue(), "property value missing" ); if (rVal.hasValue()) { - BOOL bVal = BOOL(); + sal_Bool bVal = sal_Bool(); if (rVal >>= bVal) { if (i <= MAX_FLAGS_OFFSET) @@ -219,13 +219,13 @@ BOOL SvtSearchOptions_Impl::Load() else { DBG_ERROR( "unexpected type" ); - bSucc = FALSE; + bSucc = sal_False; } } else { DBG_ERROR( "value missing" ); - bSucc = FALSE; + bSucc = sal_False; } } } @@ -235,12 +235,12 @@ BOOL SvtSearchOptions_Impl::Load() } -BOOL SvtSearchOptions_Impl::Save() +sal_Bool SvtSearchOptions_Impl::Save() { - BOOL bSucc = FALSE; + sal_Bool bSucc = sal_False; const Sequence< OUString > aNames = GetPropertyNames(); - INT32 nProps = aNames.getLength(); + sal_Int32 nProps = aNames.getLength(); Sequence< Any > aValues( nProps ); Any *pValue = aValues.getArray(); @@ -249,13 +249,13 @@ BOOL SvtSearchOptions_Impl::Save() "unexpected size of index" ); if (nProps && nProps == MAX_FLAGS_OFFSET + 1) { - for (USHORT i = 0; i < nProps; ++i) - pValue[i] <<= (BOOL) GetFlag(i); + for (sal_uInt16 i = 0; i < nProps; ++i) + pValue[i] <<= (sal_Bool) GetFlag(i); bSucc |= PutProperties( aNames, aValues ); } if (bSucc) - SetModified( FALSE ); + SetModified( sal_False ); return bSucc; } @@ -275,9 +275,9 @@ SvtSearchOptions::~SvtSearchOptions() } -INT32 SvtSearchOptions::GetTransliterationFlags() const +sal_Int32 SvtSearchOptions::GetTransliterationFlags() const { - INT32 nRes = 0; + sal_Int32 nRes = 0; if (!IsMatchCase()) // 'IsMatchCase' means act case sensitive nRes |= TransliterationModules_IGNORE_CASE; @@ -322,312 +322,312 @@ INT32 SvtSearchOptions::GetTransliterationFlags() const } -BOOL SvtSearchOptions::IsWholeWordsOnly() const +sal_Bool SvtSearchOptions::IsWholeWordsOnly() const { return pImpl->GetFlag( 0 ); } -void SvtSearchOptions::SetWholeWordsOnly( BOOL bVal ) +void SvtSearchOptions::SetWholeWordsOnly( sal_Bool bVal ) { pImpl->SetFlag( 0, bVal ); } -BOOL SvtSearchOptions::IsBackwards() const +sal_Bool SvtSearchOptions::IsBackwards() const { return pImpl->GetFlag( 1 ); } -void SvtSearchOptions::SetBackwards( BOOL bVal ) +void SvtSearchOptions::SetBackwards( sal_Bool bVal ) { pImpl->SetFlag( 1, bVal ); } -BOOL SvtSearchOptions::IsUseRegularExpression() const +sal_Bool SvtSearchOptions::IsUseRegularExpression() const { return pImpl->GetFlag( 2 ); } -void SvtSearchOptions::SetUseRegularExpression( BOOL bVal ) +void SvtSearchOptions::SetUseRegularExpression( sal_Bool bVal ) { pImpl->SetFlag( 2, bVal ); } -BOOL SvtSearchOptions::IsSearchForStyles() const +sal_Bool SvtSearchOptions::IsSearchForStyles() const { return pImpl->GetFlag( 3 ); } -void SvtSearchOptions::SetSearchForStyles( BOOL bVal ) +void SvtSearchOptions::SetSearchForStyles( sal_Bool bVal ) { pImpl->SetFlag( 3, bVal ); } -BOOL SvtSearchOptions::IsSimilaritySearch() const +sal_Bool SvtSearchOptions::IsSimilaritySearch() const { return pImpl->GetFlag( 4 ); } -void SvtSearchOptions::SetSimilaritySearch( BOOL bVal ) +void SvtSearchOptions::SetSimilaritySearch( sal_Bool bVal ) { pImpl->SetFlag( 4, bVal ); } -BOOL SvtSearchOptions::IsUseAsianOptions() const +sal_Bool SvtSearchOptions::IsUseAsianOptions() const { return pImpl->GetFlag( 5 ); } -void SvtSearchOptions::SetUseAsianOptions( BOOL bVal ) +void SvtSearchOptions::SetUseAsianOptions( sal_Bool bVal ) { pImpl->SetFlag( 5, bVal ); } -BOOL SvtSearchOptions::IsMatchCase() const +sal_Bool SvtSearchOptions::IsMatchCase() const { return pImpl->GetFlag( 6 ); } -void SvtSearchOptions::SetMatchCase( BOOL bVal ) +void SvtSearchOptions::SetMatchCase( sal_Bool bVal ) { pImpl->SetFlag( 6, bVal ); } -BOOL SvtSearchOptions::IsMatchFullHalfWidthForms() const +sal_Bool SvtSearchOptions::IsMatchFullHalfWidthForms() const { return pImpl->GetFlag( 7 ); } -void SvtSearchOptions::SetMatchFullHalfWidthForms( BOOL bVal ) +void SvtSearchOptions::SetMatchFullHalfWidthForms( sal_Bool bVal ) { pImpl->SetFlag( 7, bVal ); } -BOOL SvtSearchOptions::IsMatchHiraganaKatakana() const +sal_Bool SvtSearchOptions::IsMatchHiraganaKatakana() const { return pImpl->GetFlag( 8 ); } -void SvtSearchOptions::SetMatchHiraganaKatakana( BOOL bVal ) +void SvtSearchOptions::SetMatchHiraganaKatakana( sal_Bool bVal ) { pImpl->SetFlag( 8, bVal ); } -BOOL SvtSearchOptions::IsMatchContractions() const +sal_Bool SvtSearchOptions::IsMatchContractions() const { return pImpl->GetFlag( 9 ); } -void SvtSearchOptions::SetMatchContractions( BOOL bVal ) +void SvtSearchOptions::SetMatchContractions( sal_Bool bVal ) { pImpl->SetFlag( 9, bVal ); } -BOOL SvtSearchOptions::IsMatchMinusDashChoon() const +sal_Bool SvtSearchOptions::IsMatchMinusDashChoon() const { return pImpl->GetFlag( 10 ); } -void SvtSearchOptions::SetMatchMinusDashChoon( BOOL bVal ) +void SvtSearchOptions::SetMatchMinusDashChoon( sal_Bool bVal ) { pImpl->SetFlag( 10, bVal ); } -BOOL SvtSearchOptions::IsMatchRepeatCharMarks() const +sal_Bool SvtSearchOptions::IsMatchRepeatCharMarks() const { return pImpl->GetFlag( 11 ); } -void SvtSearchOptions::SetMatchRepeatCharMarks( BOOL bVal ) +void SvtSearchOptions::SetMatchRepeatCharMarks( sal_Bool bVal ) { pImpl->SetFlag( 11, bVal ); } -BOOL SvtSearchOptions::IsMatchVariantFormKanji() const +sal_Bool SvtSearchOptions::IsMatchVariantFormKanji() const { return pImpl->GetFlag( 12 ); } -void SvtSearchOptions::SetMatchVariantFormKanji( BOOL bVal ) +void SvtSearchOptions::SetMatchVariantFormKanji( sal_Bool bVal ) { pImpl->SetFlag( 12, bVal ); } -BOOL SvtSearchOptions::IsMatchOldKanaForms() const +sal_Bool SvtSearchOptions::IsMatchOldKanaForms() const { return pImpl->GetFlag( 13 ); } -void SvtSearchOptions::SetMatchOldKanaForms( BOOL bVal ) +void SvtSearchOptions::SetMatchOldKanaForms( sal_Bool bVal ) { pImpl->SetFlag( 13, bVal ); } -BOOL SvtSearchOptions::IsMatchDiziDuzu() const +sal_Bool SvtSearchOptions::IsMatchDiziDuzu() const { return pImpl->GetFlag( 14 ); } -void SvtSearchOptions::SetMatchDiziDuzu( BOOL bVal ) +void SvtSearchOptions::SetMatchDiziDuzu( sal_Bool bVal ) { pImpl->SetFlag( 14, bVal ); } -BOOL SvtSearchOptions::IsMatchBavaHafa() const +sal_Bool SvtSearchOptions::IsMatchBavaHafa() const { return pImpl->GetFlag( 15 ); } -void SvtSearchOptions::SetMatchBavaHafa( BOOL bVal ) +void SvtSearchOptions::SetMatchBavaHafa( sal_Bool bVal ) { pImpl->SetFlag( 15, bVal ); } -BOOL SvtSearchOptions::IsMatchTsithichiDhizi() const +sal_Bool SvtSearchOptions::IsMatchTsithichiDhizi() const { return pImpl->GetFlag( 16 ); } -void SvtSearchOptions::SetMatchTsithichiDhizi( BOOL bVal ) +void SvtSearchOptions::SetMatchTsithichiDhizi( sal_Bool bVal ) { pImpl->SetFlag( 16, bVal ); } -BOOL SvtSearchOptions::IsMatchHyuiyuByuvyu() const +sal_Bool SvtSearchOptions::IsMatchHyuiyuByuvyu() const { return pImpl->GetFlag( 17 ); } -void SvtSearchOptions::SetMatchHyuiyuByuvyu( BOOL bVal ) +void SvtSearchOptions::SetMatchHyuiyuByuvyu( sal_Bool bVal ) { pImpl->SetFlag( 17, bVal ); } -BOOL SvtSearchOptions::IsMatchSesheZeje() const +sal_Bool SvtSearchOptions::IsMatchSesheZeje() const { return pImpl->GetFlag( 18 ); } -void SvtSearchOptions::SetMatchSesheZeje( BOOL bVal ) +void SvtSearchOptions::SetMatchSesheZeje( sal_Bool bVal ) { pImpl->SetFlag( 18, bVal ); } -BOOL SvtSearchOptions::IsMatchIaiya() const +sal_Bool SvtSearchOptions::IsMatchIaiya() const { return pImpl->GetFlag( 19 ); } -void SvtSearchOptions::SetMatchIaiya( BOOL bVal ) +void SvtSearchOptions::SetMatchIaiya( sal_Bool bVal ) { pImpl->SetFlag( 19, bVal ); } -BOOL SvtSearchOptions::IsMatchKiku() const +sal_Bool SvtSearchOptions::IsMatchKiku() const { return pImpl->GetFlag( 20 ); } -void SvtSearchOptions::SetMatchKiku( BOOL bVal ) +void SvtSearchOptions::SetMatchKiku( sal_Bool bVal ) { pImpl->SetFlag( 20, bVal ); } -BOOL SvtSearchOptions::IsIgnorePunctuation() const +sal_Bool SvtSearchOptions::IsIgnorePunctuation() const { return pImpl->GetFlag( 21 ); } -void SvtSearchOptions::SetIgnorePunctuation( BOOL bVal ) +void SvtSearchOptions::SetIgnorePunctuation( sal_Bool bVal ) { pImpl->SetFlag( 21, bVal ); } -BOOL SvtSearchOptions::IsIgnoreWhitespace() const +sal_Bool SvtSearchOptions::IsIgnoreWhitespace() const { return pImpl->GetFlag( 22 ); } -void SvtSearchOptions::SetIgnoreWhitespace( BOOL bVal ) +void SvtSearchOptions::SetIgnoreWhitespace( sal_Bool bVal ) { pImpl->SetFlag( 22, bVal ); } -BOOL SvtSearchOptions::IsIgnoreProlongedSoundMark() const +sal_Bool SvtSearchOptions::IsIgnoreProlongedSoundMark() const { return pImpl->GetFlag( 23 ); } -void SvtSearchOptions::SetIgnoreProlongedSoundMark( BOOL bVal ) +void SvtSearchOptions::SetIgnoreProlongedSoundMark( sal_Bool bVal ) { pImpl->SetFlag( 23, bVal ); } -BOOL SvtSearchOptions::IsIgnoreMiddleDot() const +sal_Bool SvtSearchOptions::IsIgnoreMiddleDot() const { return pImpl->GetFlag( 24 ); } -void SvtSearchOptions::SetIgnoreMiddleDot( BOOL bVal ) +void SvtSearchOptions::SetIgnoreMiddleDot( sal_Bool bVal ) { pImpl->SetFlag( 24, bVal ); } -BOOL SvtSearchOptions::IsNotes() const +sal_Bool SvtSearchOptions::IsNotes() const { return pImpl->GetFlag( 25 ); } -void SvtSearchOptions::SetNotes( BOOL bVal ) +void SvtSearchOptions::SetNotes( sal_Bool bVal ) { pImpl->SetFlag( 25, bVal ); } diff --git a/unotools/source/config/syslocaleoptions.cxx b/unotools/source/config/syslocaleoptions.cxx index 35333b0db6a8..64ea0816d210 100644..100755 --- a/unotools/source/config/syslocaleoptions.cxx +++ b/unotools/source/config/syslocaleoptions.cxx @@ -88,7 +88,7 @@ class SvtSysLocaleOptions_Impl : public utl::ConfigItem OUString m_aLocaleString; // en-US or de-DE or empty for SYSTEM OUString m_aUILocaleString; // en-US or de-DE or empty for SYSTEM OUString m_aCurrencyString; // USD-en-US or EUR-de-DE - ULONG m_nBlockedHint; // pending hints + sal_uLong m_nBlockedHint; // pending hints sal_Bool m_bDecimalSeparator; //use decimal separator same as locale sal_Bool m_bROLocale; @@ -386,7 +386,7 @@ void SvtSysLocaleOptions_Impl::SetLocaleString( const OUString& rStr ) MakeRealLocale(); MsLangId::setConfiguredSystemLanguage( m_eRealLanguage ); SetModified(); - ULONG nHint = SYSLOCALEOPTIONS_HINT_LOCALE; + sal_uLong nHint = SYSLOCALEOPTIONS_HINT_LOCALE; if ( !m_aCurrencyString.getLength() ) nHint |= SYSLOCALEOPTIONS_HINT_CURRENCY; NotifyListeners( nHint ); @@ -430,7 +430,7 @@ void SvtSysLocaleOptions_Impl::SetDecimalSeparatorAsLocale( sal_Bool bSet) void SvtSysLocaleOptions_Impl::Notify( const Sequence< rtl::OUString >& seqPropertyNames ) { - ULONG nHint = 0; + sal_uLong nHint = 0; Sequence< Any > seqValues = GetProperties( seqPropertyNames ); Sequence< sal_Bool > seqROStates = GetReadOnlyStates( seqPropertyNames ); sal_Int32 nCount = seqPropertyNames.getLength(); diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx index 6c63bbfee34b..59f4a14548ca 100644 --- a/unotools/source/config/useroptions.cxx +++ b/unotools/source/config/useroptions.cxx @@ -127,8 +127,8 @@ public: void SetFathersName( const ::rtl::OUString& rNewToken ); void SetApartment( const ::rtl::OUString& rNewToken ); - sal_Bool IsTokenReadonly( USHORT nToken ) const; - ::rtl::OUString GetToken(USHORT nToken) const; + sal_Bool IsTokenReadonly( sal_uInt16 nToken ) const; + ::rtl::OUString GetToken(sal_uInt16 nToken) const; void Notify(); private: @@ -774,7 +774,7 @@ void SvtUserOptions_Impl::Notify() // ----------------------------------------------------------------------- -sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const +sal_Bool SvtUserOptions_Impl::IsTokenReadonly( sal_uInt16 nToken ) const { css::uno::Reference< css::beans::XPropertySet > xData(m_xCfg, css::uno::UNO_QUERY); css::uno::Reference< css::beans::XPropertySetInfo > xInfo = xData->getPropertySetInfo(); @@ -893,7 +893,7 @@ sal_Bool SvtUserOptions_Impl::IsTokenReadonly( USHORT nToken ) const } //------------------------------------------------------------------------ -::rtl::OUString SvtUserOptions_Impl::GetToken(USHORT nToken) const +::rtl::OUString SvtUserOptions_Impl::GetToken(sal_uInt16 nToken) const { ::rtl::OUString pRet; switch(nToken) @@ -1284,13 +1284,13 @@ void SvtUserOptions::SetApartment( const ::rtl::OUString& rNewToken ) // ----------------------------------------------------------------------- -sal_Bool SvtUserOptions::IsTokenReadonly( USHORT nToken ) const +sal_Bool SvtUserOptions::IsTokenReadonly( sal_uInt16 nToken ) const { ::osl::MutexGuard aGuard( GetInitMutex() ); return pImp->IsTokenReadonly( nToken ); } //------------------------------------------------------------------------ -::rtl::OUString SvtUserOptions::GetToken(USHORT nToken) const +::rtl::OUString SvtUserOptions::GetToken(sal_uInt16 nToken) const { ::osl::MutexGuard aGuard( GetInitMutex() ); return pImp->GetToken( nToken ); diff --git a/unotools/source/i18n/intlwrapper.cxx b/unotools/source/i18n/intlwrapper.cxx index 9f52cc60bfeb..aa20045eb17f 100644 --- a/unotools/source/i18n/intlwrapper.cxx +++ b/unotools/source/i18n/intlwrapper.cxx @@ -94,7 +94,7 @@ void IntlWrapper::ImplNewCalendar() const } -void IntlWrapper::ImplNewCollator( BOOL bCaseSensitive ) const +void IntlWrapper::ImplNewCollator( sal_Bool bCaseSensitive ) const { CollatorWrapper* p = new CollatorWrapper( xSMgr ); if ( bCaseSensitive ) diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx index 8bbe6f182862..1ae7d1c7e0f0 100644 --- a/unotools/source/i18n/localedatawrapper.cxx +++ b/unotools/source/i18n/localedatawrapper.cxx @@ -59,8 +59,8 @@ #define LOCALEDATA_SERVICENAME "com.sun.star.i18n.LocaleData" static const int nDateFormatInvalid = -1; -static const USHORT nCurrFormatInvalid = 0xffff; -static const USHORT nCurrFormatDefault = 0; +static const sal_uInt16 nCurrFormatInvalid = 0xffff; +static const sal_uInt16 nCurrFormatDefault = 0; using namespace ::com::sun::star; using namespace ::com::sun::star::i18n; @@ -79,7 +79,7 @@ namespace {}; } -BYTE LocaleDataWrapper::nLocaleDataChecking = 0; +sal_uInt8 LocaleDataWrapper::nLocaleDataChecking = 0; LocaleDataWrapper::LocaleDataWrapper( const Reference< lang::XMultiServiceFactory > & xSF, @@ -87,8 +87,8 @@ LocaleDataWrapper::LocaleDataWrapper( ) : xSMgr( xSF ), - bLocaleDataItemValid( FALSE ), - bReservedWordValid( FALSE ) + bLocaleDataItemValid( sal_False ), + bReservedWordValid( sal_False ) { setLocale( rLocale ); if ( xSMgr.is() ) @@ -170,7 +170,7 @@ void LocaleDataWrapper::invalidateData() { aLocaleItem[j].Erase(); } - bLocaleDataItemValid = FALSE; + bLocaleDataItemValid = sal_False; } if ( bReservedWordValid ) { @@ -178,7 +178,7 @@ void LocaleDataWrapper::invalidateData() { aReservedWord[j].Erase(); } - bReservedWordValid = FALSE; + bReservedWordValid = sal_False; } xDefaultCalendar.reset(); if (aGrouping.getLength()) @@ -546,7 +546,7 @@ void LocaleDataWrapper::getOneLocaleItemImpl( sal_Int16 nItem ) if ( !bLocaleDataItemValid ) { aLocaleDataItem = getLocaleItem(); - bLocaleDataItemValid = TRUE; + bLocaleDataItemValid = sal_True; } switch ( nItem ) { @@ -612,7 +612,7 @@ void LocaleDataWrapper::getOneReservedWordImpl( sal_Int16 nWord ) if ( !bReservedWordValid ) { aReservedWordSeq = getReservedWord(); - bReservedWordValid = TRUE; + bReservedWordValid = sal_True; } DBG_ASSERT( nWord < aReservedWordSeq.getLength(), "getOneReservedWordImpl: which one?" ); if ( nWord < aReservedWordSeq.getLength() ) @@ -721,7 +721,7 @@ const String& LocaleDataWrapper::getCurrBankSymbol() const } -USHORT LocaleDataWrapper::getCurrPositiveFormat() const +sal_uInt16 LocaleDataWrapper::getCurrPositiveFormat() const { ::utl::ReadWriteGuard aGuard( aMutex ); if ( nCurrPositiveFormat == nCurrFormatInvalid ) @@ -733,7 +733,7 @@ USHORT LocaleDataWrapper::getCurrPositiveFormat() const } -USHORT LocaleDataWrapper::getCurrNegativeFormat() const +sal_uInt16 LocaleDataWrapper::getCurrNegativeFormat() const { ::utl::ReadWriteGuard aGuard( aMutex ); if ( nCurrNegativeFormat == nCurrFormatInvalid ) @@ -745,7 +745,7 @@ USHORT LocaleDataWrapper::getCurrNegativeFormat() const } -USHORT LocaleDataWrapper::getCurrDigits() const +sal_uInt16 LocaleDataWrapper::getCurrDigits() const { ::utl::ReadWriteGuard aGuard( aMutex ); if ( nCurrDigits == nCurrFormatInvalid ) @@ -804,13 +804,13 @@ void LocaleDataWrapper::scanCurrFormatImpl( const String& rCode, const sal_Unicode* const pStop = pStr + rCode.Len(); const sal_Unicode* p = pStr + nStart; int nInSection = 0; - BOOL bQuote = FALSE; + sal_Bool bQuote = sal_False; while ( p < pStop ) { if ( bQuote ) { if ( *p == '"' && *(p-1) != '\\' ) - bQuote = FALSE; + bQuote = sal_False; } else { @@ -818,7 +818,7 @@ void LocaleDataWrapper::scanCurrFormatImpl( const String& rCode, { case '"' : if ( pStr == p || *(p-1) != '\\' ) - bQuote = TRUE; + bQuote = sal_True; break; case '-' : if ( !nInSection && nSign == STRING_NOTFOUND ) @@ -1337,7 +1337,7 @@ static sal_Unicode* ImplAddUNum( sal_Unicode* pBuf, sal_uInt64 nNumber, int nMin } -static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, USHORT nNumber, int bLeading ) +static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, sal_uInt16 nNumber, int bLeading ) { DBG_ASSERT( nNumber < 100, "ImplAdd2UNum() - Number >= 100" ); @@ -1352,7 +1352,7 @@ static sal_Unicode* ImplAdd2UNum( sal_Unicode* pBuf, USHORT nNumber, int bLeadin } else { - USHORT nTemp = nNumber % 10; + sal_uInt16 nTemp = nNumber % 10; nNumber /= 10; *pBuf = nNumber + '0'; pBuf++; @@ -1395,29 +1395,29 @@ inline sal_Unicode* ImplAddString( sal_Unicode* pBuf, const sal_Unicode* pCopyBu sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf, - sal_Int64 nNumber, USHORT nDecimals, BOOL bUseThousandSep, - BOOL bTrailingZeros ) const + sal_Int64 nNumber, sal_uInt16 nDecimals, sal_Bool bUseThousandSep, + sal_Bool bTrailingZeros ) const { sal_Unicode aNumBuf[64]; sal_Unicode* pNumBuf; - USHORT nNumLen; - USHORT i = 0; - BOOL bNeg; + sal_uInt16 nNumLen; + sal_uInt16 i = 0; + sal_Bool bNeg; // negative number if ( nNumber < 0 ) { nNumber *= -1; - bNeg = TRUE; + bNeg = sal_True; *pBuf = '-'; pBuf++; } else - bNeg = FALSE; + bNeg = sal_False; // convert number pNumBuf = ImplAddUNum( aNumBuf, (sal_uInt64)nNumber ); - nNumLen = (USHORT)(ULONG)(pNumBuf-aNumBuf); + nNumLen = (sal_uInt16)(sal_uLong)(pNumBuf-aNumBuf); pNumBuf = aNumBuf; if ( nNumLen <= nDecimals ) @@ -1463,7 +1463,7 @@ sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf, const String& rThoSep = getNumThousandSep(); // copy number to buffer (excluding decimals) - USHORT nNumLen2 = nNumLen-nDecimals; + sal_uInt16 nNumLen2 = nNumLen-nDecimals; uno::Sequence< sal_Bool > aGroupPos; if (bUseThousandSep) aGroupPos = utl::DigitGroupingIterator::createForwardSequence( @@ -1484,11 +1484,11 @@ sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf, { pBuf = ImplAddString( pBuf, getNumDecimalSep() ); - BOOL bNullEnd = TRUE; + sal_Bool bNullEnd = sal_True; while ( i < nNumLen ) { if ( *pNumBuf != '0' ) - bNullEnd = FALSE; + bNullEnd = sal_False; *pBuf = *pNumBuf; pBuf++; @@ -1514,12 +1514,12 @@ String LocaleDataWrapper::getDate( const Date& rDate ) const //!TODO: leading zeros et al sal_Unicode aBuf[128]; sal_Unicode* pBuf = aBuf; - USHORT nDay = rDate.GetDay(); - USHORT nMonth = rDate.GetMonth(); - USHORT nYear = rDate.GetYear(); - USHORT nYearLen; + sal_uInt16 nDay = rDate.GetDay(); + sal_uInt16 nMonth = rDate.GetMonth(); + sal_uInt16 nYear = rDate.GetYear(); + sal_uInt16 nYearLen; - if ( TRUE /* IsDateCentury() */ ) + if ( sal_True /* IsDateCentury() */ ) nYearLen = 4; else { @@ -1530,39 +1530,39 @@ String LocaleDataWrapper::getDate( const Date& rDate ) const switch ( getDateFormat() ) { case DMY : - pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); pBuf = ImplAddString( pBuf, getDateSep() ); - pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); break; case MDY : - pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAddString( pBuf, getDateSep() ); - pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); pBuf = ImplAddString( pBuf, getDateSep() ); pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); break; default: pBuf = ImplAddUNum( pBuf, nYear, nYearLen ); pBuf = ImplAddString( pBuf, getDateSep() ); - pBuf = ImplAdd2UNum( pBuf, nMonth, TRUE /* IsDateMonthLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nMonth, sal_True /* IsDateMonthLeadingZero() */ ); pBuf = ImplAddString( pBuf, getDateSep() ); - pBuf = ImplAdd2UNum( pBuf, nDay, TRUE /* IsDateDayLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nDay, sal_True /* IsDateDayLeadingZero() */ ); } - return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) ); + return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); } -String LocaleDataWrapper::getTime( const Time& rTime, BOOL bSec, BOOL b100Sec ) const +String LocaleDataWrapper::getTime( const Time& rTime, sal_Bool bSec, sal_Bool b100Sec ) const { ::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical ); //!TODO: leading zeros et al sal_Unicode aBuf[128]; sal_Unicode* pBuf = aBuf; - USHORT nHour = rTime.GetHour(); - BOOL bHour12 = FALSE; //!TODO: AM/PM from default time format code + sal_uInt16 nHour = rTime.GetHour(); + sal_Bool bHour12 = sal_False; //!TODO: AM/PM from default time format code if ( bHour12 ) { @@ -1574,22 +1574,22 @@ String LocaleDataWrapper::getTime( const Time& rTime, BOOL bSec, BOOL b100Sec ) else nHour %= 24; - pBuf = ImplAdd2UNum( pBuf, nHour, TRUE /* IsTimeLeadingZero() */ ); + pBuf = ImplAdd2UNum( pBuf, nHour, sal_True /* IsTimeLeadingZero() */ ); pBuf = ImplAddString( pBuf, getTimeSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), sal_True ); if ( bSec ) { pBuf = ImplAddString( pBuf, getTimeSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), sal_True ); if ( b100Sec ) { pBuf = ImplAddString( pBuf, getTime100SecSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), sal_True ); } } - String aStr( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) ); + String aStr( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); if ( bHour12 ) { @@ -1626,7 +1626,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal, // day of month nVal = rCal.getValue( CalendarFieldIndex::DAY_OF_MONTH ); pBuf = ImplAdd2UNum( aBuf, nVal, bDayOfMonthWithLeadingZero ); - String aDay( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) ); + String aDay( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); // month of year nVal = rCal.getValue( CalendarFieldIndex::MONTH ); String aMonth( rCal.getDisplayName( CalendarDisplayIndex::MONTH, nVal, nDisplayMonth ) ); @@ -1636,7 +1636,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal, pBuf = ImplAddUNum( aBuf, nVal % 100, 2 ); else pBuf = ImplAddUNum( aBuf, nVal ); - String aYear( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) ); + String aYear( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); // concatenate switch ( getLongDateFormat() ) { @@ -1665,7 +1665,7 @@ String LocaleDataWrapper::getLongDate( const Date& rDate, CalendarWrapper& rCal, } -String LocaleDataWrapper::getDuration( const Time& rTime, BOOL bSec, BOOL b100Sec ) const +String LocaleDataWrapper::getDuration( const Time& rTime, sal_Bool bSec, sal_Bool b100Sec ) const { ::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical ); sal_Unicode aBuf[128]; @@ -1674,31 +1674,31 @@ String LocaleDataWrapper::getDuration( const Time& rTime, BOOL bSec, BOOL b100Se if ( rTime < Time( 0 ) ) pBuf = ImplAddString( pBuf, ' ' ); - if ( TRUE /* IsTimeLeadingZero() */ ) + if ( sal_True /* IsTimeLeadingZero() */ ) pBuf = ImplAddUNum( pBuf, rTime.GetHour(), 2 ); else pBuf = ImplAddUNum( pBuf, rTime.GetHour() ); pBuf = ImplAddString( pBuf, getTimeSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.GetMin(), sal_True ); if ( bSec ) { pBuf = ImplAddString( pBuf, getTimeSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.GetSec(), sal_True ); if ( b100Sec ) { pBuf = ImplAddString( pBuf, getTime100SecSep() ); - pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), TRUE ); + pBuf = ImplAdd2UNum( pBuf, rTime.Get100Sec(), sal_True ); } } - return String( aBuf, (xub_StrLen)(ULONG)(pBuf-aBuf) ); + return String( aBuf, (xub_StrLen)(sal_uLong)(pBuf-aBuf) ); } // --- simple number formatting --------------------------------------- -inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, USHORT nDecimals ) +inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, sal_uInt16 nDecimals ) { // approximately 3.2 bits per digit const size_t nDig = ((sizeof(sal_Int64) * 8) / 3) + 1; @@ -1710,8 +1710,8 @@ inline size_t ImplGetNumberStringLengthGuess( const LocaleDataWrapper& rLoc, USH } -String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals, - BOOL bUseThousandSep, BOOL bTrailingZeros ) const +String LocaleDataWrapper::getNum( sal_Int64 nNumber, sal_uInt16 nDecimals, + sal_Bool bUseThousandSep, sal_Bool bTrailingZeros ) const { ::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical ); sal_Unicode aBuf[128]; // big enough for 64-bit long and crazy grouping @@ -1722,7 +1722,7 @@ String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals, sal_Unicode* pBuf = ImplAddFormatNum( pBuffer, nNumber, nDecimals, bUseThousandSep, bTrailingZeros ); - String aStr( pBuffer, (xub_StrLen)(ULONG)(pBuf-pBuffer) ); + String aStr( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) ); if ( pBuffer != aBuf ) delete [] pBuffer; @@ -1730,8 +1730,8 @@ String LocaleDataWrapper::getNum( sal_Int64 nNumber, USHORT nDecimals, } -String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals, - const String& rCurrencySymbol, BOOL bUseThousandSep ) const +String LocaleDataWrapper::getCurr( sal_Int64 nNumber, sal_uInt16 nDecimals, + const String& rCurrencySymbol, sal_Bool bUseThousandSep ) const { ::utl::ReadWriteGuard aGuard( aMutex, ::utl::ReadWriteGuardMode::nBlockCritical ); sal_Unicode aBuf[192]; @@ -1748,26 +1748,26 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals, new sal_Unicode[ rCurrencySymbol.Len() + nGuess + 20 ]); sal_Unicode* pBuf = pBuffer; - BOOL bNeg; + sal_Bool bNeg; if ( nNumber < 0 ) { - bNeg = TRUE; + bNeg = sal_True; nNumber *= -1; } else - bNeg = FALSE; + bNeg = sal_False; // convert number sal_Unicode* pEndNumBuf = ImplAddFormatNum( pNumBuffer, nNumber, nDecimals, - bUseThousandSep, TRUE ); - xub_StrLen nNumLen = (xub_StrLen)(ULONG)(pEndNumBuf-pNumBuffer); + bUseThousandSep, sal_True ); + xub_StrLen nNumLen = (xub_StrLen)(sal_uLong)(pEndNumBuf-pNumBuffer); // replace zeros with zero character if ( (cZeroChar != '0') && nDecimals /* && IsNumTrailingZeros() */ ) { sal_Unicode* pTempBuf; - USHORT i; - BOOL bZero = TRUE; + sal_uInt16 i; + sal_Bool bZero = sal_True; pTempBuf = pNumBuffer+nNumLen-nDecimals; i = 0; @@ -1775,7 +1775,7 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals, { if ( *pTempBuf != '0' ) { - bZero = FALSE; + bZero = sal_False; break; } @@ -1921,7 +1921,7 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals, } } - String aNumber( pBuffer, (xub_StrLen)(ULONG)(pBuf-pBuffer) ); + String aNumber( pBuffer, (xub_StrLen)(sal_uLong)(pBuf-pBuffer) ); if ( pBuffer != aBuf ) delete [] pBuffer; @@ -1981,7 +1981,7 @@ void LocaleDataWrapper::evaluateLocaleDataChecking() // accesses, since we want to assign the result to the static member // variable and would need to dereference the pointer returned and assign // the value unguarded. This is the same pattern manually coded. - BYTE nCheck = nLocaleDataChecking; + sal_uInt8 nCheck = nLocaleDataChecking; if (!nCheck) { ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex()); diff --git a/unotools/source/i18n/textsearch.cxx b/unotools/source/i18n/textsearch.cxx index 3f722adb0dba..317e6f9b6e45 100644 --- a/unotools/source/i18n/textsearch.cxx +++ b/unotools/source/i18n/textsearch.cxx @@ -52,9 +52,9 @@ namespace utl SearchParam::SearchParam( const String &rText, SearchType eType, - BOOL bCaseSensitive, - BOOL bWrdOnly, - BOOL bSearchInSel ) + sal_Bool bCaseSensitive, + sal_Bool bWrdOnly, + sal_Bool bSearchInSel ) { sSrchStr = rText; eSrchType = eType; @@ -66,7 +66,7 @@ SearchParam::SearchParam( const String &rText, nTransliterationFlags = 0; // Werte fuer "Gewichtete Levenshtein-Distanz" - bLEV_Relaxed = TRUE; + bLEV_Relaxed = sal_True; nLEV_OtherX = 2; nLEV_ShorterY = 1; nLEV_LongerZ = 3; @@ -299,8 +299,8 @@ void TextSearch::ReplaceBackReferences( String& rReplaceStr, const String &rStr, { if( rReplaceStr.GetChar( nPos ) == '&') { - USHORT nStart = (USHORT)(rResult.startOffset[0]); - USHORT nLength = (USHORT)(rResult.endOffset[0] - rResult.startOffset[0]); + sal_uInt16 nStart = (sal_uInt16)(rResult.startOffset[0]); + sal_uInt16 nLength = (sal_uInt16)(rResult.endOffset[0] - rResult.startOffset[0]); rReplaceStr.Erase( nPos, 1 ); // delete ampersand // replace by found string rReplaceStr.Insert( rStr, nStart, nLength, nPos ); @@ -329,17 +329,17 @@ void TextSearch::ReplaceBackReferences( String& rReplaceStr, const String &rStr, int i = sFndChar - '0'; // index if(i < rResult.subRegExpressions) { - USHORT nSttReg = (USHORT)(rResult.startOffset[i]); - USHORT nRegLen = (USHORT)(rResult.endOffset[i]); + sal_uInt16 nSttReg = (sal_uInt16)(rResult.startOffset[i]); + sal_uInt16 nRegLen = (sal_uInt16)(rResult.endOffset[i]); if( nRegLen > nSttReg ) nRegLen = nRegLen - nSttReg; else { nRegLen = nSttReg - nRegLen; - nSttReg = (USHORT)(rResult.endOffset[i]); + nSttReg = (sal_uInt16)(rResult.endOffset[i]); } // Copy reference from found string - sTmp = rStr.Copy((USHORT)nSttReg, (USHORT)nRegLen); + sTmp = rStr.Copy((sal_uInt16)nSttReg, (sal_uInt16)nRegLen); // insert rReplaceStr.Insert( sTmp, nPos ); // and step over diff --git a/unotools/source/misc/fontcvt.cxx b/unotools/source/misc/fontcvt.cxx index 2bb682e4915b..5f5011d9d863 100644 --- a/unotools/source/misc/fontcvt.cxx +++ b/unotools/source/misc/fontcvt.cxx @@ -1376,7 +1376,7 @@ sal_Unicode ConvertChar::RecodeChar( sal_Unicode cChar ) const // from an traditional symbol font (i.e. U+F020..U+F0FF) void ConvertChar::RecodeString( String& rStr, xub_StrLen nIndex, xub_StrLen nLen ) const { - ULONG nLastIndex = (ULONG)nIndex + nLen; + sal_uLong nLastIndex = (sal_uLong)nIndex + nLen; if( nLastIndex > rStr.Len() ) nLastIndex = rStr.Len(); @@ -1460,7 +1460,7 @@ const ConvertChar* ConvertChar::GetRecodeData( const String& rOrgFontName, const //======================================================================= FontToSubsFontConverter CreateFontToSubsFontConverter( - const String& rOrgName, ULONG nFlags ) + const String& rOrgName, sal_uLong nFlags ) { const ConvertChar* pCvt = NULL; diff --git a/unotools/source/misc/fontdefs.cxx b/unotools/source/misc/fontdefs.cxx index c1c222755599..c93175ed1c73 100644 --- a/unotools/source/misc/fontdefs.cxx +++ b/unotools/source/misc/fontdefs.cxx @@ -519,7 +519,7 @@ void AddTokenFontName( String& rName, const String& rNewToken ) // ======================================================================= -String GetSubsFontName( const String& rName, ULONG nFlags ) +String GetSubsFontName( const String& rName, sal_uLong nFlags ) { String aName; diff --git a/unotools/source/streaming/streamwrap.cxx b/unotools/source/streaming/streamwrap.cxx index eefaa7498070..b9d0185ffd48 100644 --- a/unotools/source/streaming/streamwrap.cxx +++ b/unotools/source/streaming/streamwrap.cxx @@ -181,7 +181,7 @@ void OInputStreamWrapper::checkError() const //------------------------------------------------------------------------------ OSeekableInputStreamWrapper::OSeekableInputStreamWrapper(SvStream& _rStream) { - SetStream( &_rStream, FALSE ); + SetStream( &_rStream, sal_False ); } //------------------------------------------------------------------------------ @@ -328,7 +328,7 @@ sal_Int64 SAL_CALL OSeekableOutputStreamWrapper::getLength( ) throw (IOExceptio //------------------------------------------------------------------------------ OStreamWrapper::OStreamWrapper(SvStream& _rStream) { - SetStream( &_rStream, FALSE ); + SetStream( &_rStream, sal_False ); } //------------------------------------------------------------------------------ diff --git a/unotools/source/ucbhelper/localfilehelper.cxx b/unotools/source/ucbhelper/localfilehelper.cxx index 5ddd1f811923..be855cd960af 100644 --- a/unotools/source/ucbhelper/localfilehelper.cxx +++ b/unotools/source/ucbhelper/localfilehelper.cxx @@ -223,10 +223,10 @@ DECLARE_LIST( StringList_Impl, ::rtl::OUString* ) if ( pFiles ) { - ULONG nCount = pFiles->Count(); + sal_uLong nCount = pFiles->Count(); Sequence < ::rtl::OUString > aRet( nCount ); ::rtl::OUString* pRet = aRet.getArray(); - for ( USHORT i = 0; i < nCount; ++i ) + for ( sal_uInt16 i = 0; i < nCount; ++i ) { ::rtl::OUString* pFile = pFiles->GetObject(i); pRet[i] = *( pFile ); diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index 8befb8a0f209..f363e8d1153d 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -366,10 +366,10 @@ Sequence < OUString > UCBContentHelper::GetFolderContents( const String& rFolder if ( pFiles ) { - ULONG nCount = pFiles->Count(); + sal_uLong nCount = pFiles->Count(); Sequence < OUString > aRet( nCount ); OUString* pRet = aRet.getArray(); - for ( ULONG i = 0; i < nCount; ++i ) + for ( sal_uLong i = 0; i < nCount; ++i ) { OUString* pFile = pFiles->GetObject(i); pRet[i] = *( pFile ); @@ -447,10 +447,10 @@ Sequence < OUString > UCBContentHelper::GetResultSet( const String& rURL ) if ( pList ) { - ULONG nCount = pList->Count(); + sal_uLong nCount = pList->Count(); Sequence < OUString > aRet( nCount ); OUString* pRet = aRet.getArray(); - for ( ULONG i = 0; i < nCount; ++i ) + for ( sal_uLong i = 0; i < nCount; ++i ) { OUString* pEntry = pList->GetObject(i); pRet[i] = *( pEntry ); @@ -626,9 +626,9 @@ sal_Bool UCBContentHelper::HasParentFolder( const String& rFolder ) // ----------------------------------------------------------------------- -ULONG UCBContentHelper::GetSize( const String& rContent ) +sal_uLong UCBContentHelper::GetSize( const String& rContent ) { - ULONG nSize = 0; + sal_uLong nSize = 0; sal_Int64 nTemp = 0; INetURLObject aObj( rContent ); DBG_ASSERT( aObj.GetProtocol() != INET_PROT_NOT_VALID, "Invalid URL!" ); @@ -643,7 +643,7 @@ ULONG UCBContentHelper::GetSize( const String& rContent ) catch( ::com::sun::star::uno::Exception& ) { } - nSize = (UINT32)nTemp; + nSize = (sal_uInt32)nTemp; return nSize; } @@ -679,9 +679,9 @@ sal_Bool UCBContentHelper::IsYounger( const String& rIsYoung, const String& rIsO } // ----------------------------------------------------------------------- -sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, BOOL bAllowWildCards ) +sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, String& rFile, sal_Bool bAllowWildCards ) { - BOOL bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND ); + sal_Bool bWild = bAllowWildCards && ( rName.Search( '*' ) != STRING_NOTFOUND || rName.Search( '?' ) != STRING_NOTFOUND ); sal_Bool bRet = sal_False; @@ -689,7 +689,7 @@ sal_Bool UCBContentHelper::Find( const String& rFolder, const String& rName, Str Sequence< ::rtl::OUString > aFiles = GetFolderContents( rFolder, sal_False ); const ::rtl::OUString* pFiles = aFiles.getConstArray(); - UINT32 i, nCount = aFiles.getLength(); + sal_uInt32 i, nCount = aFiles.getLength(); for ( i = 0; i < nCount; ++i ) { // get the last name of the URLs and compare it with rName @@ -740,7 +740,7 @@ sal_Bool UCBContentHelper::Exists( const String& rURL ) Sequence< ::rtl::OUString > aFiles = GetFolderContents( aObj.GetMainURL( INetURLObject::NO_DECODE ), sal_True, sal_False ); const ::rtl::OUString* pFiles = aFiles.getConstArray(); - UINT32 i, nCount = aFiles.getLength(); + sal_uInt32 i, nCount = aFiles.getLength(); for ( i = 0; i < nCount; ++i ) { // get the last name of the URLs and compare it with rName @@ -759,18 +759,18 @@ sal_Bool UCBContentHelper::Exists( const String& rURL ) } // ----------------------------------------------------------------------- -sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, BOOL bAllowWildCards ) +sal_Bool UCBContentHelper::FindInPath( const String& rPath, const String& rName, String& rFile, char cDelim, sal_Bool bAllowWildCards ) { // extract the single folder names from the path variable and try to find the file in one of these folders - USHORT nTokenCount = rPath.GetTokenCount( cDelim ); - for ( USHORT nToken = 0; nToken < nTokenCount; ++nToken ) + sal_uInt16 nTokenCount = rPath.GetTokenCount( cDelim ); + for ( sal_uInt16 nToken = 0; nToken < nTokenCount; ++nToken ) { String aPath = rPath.GetToken( nToken, cDelim ); if ( Find( aPath, rName, rFile, bAllowWildCards ) ) - return TRUE; + return sal_True; } - return FALSE; + return sal_False; } // ----------------------------------------------------------------------- diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx index 9f4c39b397e1..71640c6e5b08 100644 --- a/unotools/source/ucbhelper/ucblockbytes.cxx +++ b/unotools/source/ucbhelper/ucblockbytes.cxx @@ -1284,7 +1284,7 @@ UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler ) , m_bDontClose( sal_False ) , m_bStreamValid (sal_False) { - SetSynchronMode( TRUE ); + SetSynchronMode( sal_True ); } //---------------------------------------------------------------------------- @@ -1423,13 +1423,13 @@ void UcbLockBytes::terminate_Impl() } //---------------------------------------------------------------------------- -void UcbLockBytes::SetSynchronMode (BOOL bSynchron) +void UcbLockBytes::SetSynchronMode (sal_Bool bSynchron) { SvLockBytes::SetSynchronMode (bSynchron); } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *pRead) const +ErrCode UcbLockBytes::ReadAt ( sal_uLong nPos, void *pBuffer, sal_uLong nCount, sal_uLong *pRead) const { if ( IsSynchronMode() ) { @@ -1488,13 +1488,13 @@ ErrCode UcbLockBytes::ReadAt ( ULONG nPos, void *pBuffer, ULONG nCount, ULONG *p rtl_copyMemory (pBuffer, aData.getConstArray(), nSize); if (pRead) - *pRead = ULONG(nSize); + *pRead = sal_uLong(nSize); return ERRCODE_NONE; } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::WriteAt ( ULONG nPos, const void *pBuffer, ULONG nCount, ULONG *pWritten) +ErrCode UcbLockBytes::WriteAt ( sal_uLong nPos, const void *pBuffer, sal_uLong nCount, sal_uLong *pWritten) { if ( pWritten ) *pWritten = 0; @@ -1552,11 +1552,11 @@ ErrCode UcbLockBytes::Flush() const } //---------------------------------------------------------------------------- -ErrCode UcbLockBytes::SetSize (ULONG nNewSize) +ErrCode UcbLockBytes::SetSize (sal_uLong nNewSize) { SvLockBytesStat aStat; Stat( &aStat, (SvLockBytesStatFlag) 0 ); - ULONG nSize = aStat.nSize; + sal_uLong nSize = aStat.nSize; if ( nSize > nNewSize ) { @@ -1573,8 +1573,8 @@ ErrCode UcbLockBytes::SetSize (ULONG nNewSize) if ( nSize < nNewSize ) { - ULONG nDiff = nNewSize-nSize, nCount=0; - BYTE* pBuffer = new BYTE[ nDiff ]; + sal_uLong nDiff = nNewSize-nSize, nCount=0; + sal_uInt8* pBuffer = new sal_uInt8[ nDiff ]; memset(pBuffer, 0, nDiff); // initialize for enhanced security WriteAt( nSize, pBuffer, nDiff, &nCount ); delete[] pBuffer; @@ -1612,7 +1612,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const try { - pStat->nSize = ULONG(xSeekable->getLength()); + pStat->nSize = sal_uLong(xSeekable->getLength()); } catch (IOException) { |