summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
Diffstat (limited to 'unotools')
-rw-r--r--unotools/inc/unotools/accelcfg.hxx2
-rw-r--r--unotools/inc/unotools/componentresmodule.hxx4
-rw-r--r--unotools/inc/unotools/configvaluecontainer.hxx4
-rw-r--r--unotools/inc/unotools/defaultoptions.hxx2
-rw-r--r--unotools/inc/unotools/fontcfg.hxx66
-rw-r--r--unotools/inc/unotools/fontcvt.hxx8
-rw-r--r--unotools/inc/unotools/fontdefs.hxx56
-rw-r--r--unotools/inc/unotools/intlwrapper.hxx6
-rw-r--r--unotools/inc/unotools/lingucfg.hxx118
-rw-r--r--unotools/inc/unotools/localedatawrapper.hxx56
-rw-r--r--unotools/inc/unotools/misccfg.hxx12
-rw-r--r--unotools/inc/unotools/pathoptions.hxx7
-rw-r--r--unotools/inc/unotools/searchopt.hxx110
-rwxr-xr-x[-rw-r--r--]unotools/inc/unotools/syslocaleoptions.hxx12
-rw-r--r--unotools/inc/unotools/textsearch.hxx10
-rw-r--r--unotools/inc/unotools/ucbhelper.hxx6
-rw-r--r--unotools/inc/unotools/ucblockbytes.hxx10
-rw-r--r--unotools/inc/unotools/unotunnelhelper.hxx3
-rw-r--r--unotools/inc/unotools/useroptions.hxx38
-rw-r--r--unotools/prj/build.lst4
-rw-r--r--unotools/prj/d.lst1
-rw-r--r--unotools/qa/complex/tempfile/TempFileUnitTest.java81
-rw-r--r--unotools/qa/complex/tempfile/Test01.java12
-rw-r--r--unotools/qa/complex/tempfile/Test02.java14
-rw-r--r--unotools/qa/complex/tempfile/TestHelper.java20
-rw-r--r--unotools/qa/complex/tempfile/makefile.mk70
-rw-r--r--unotools/source/config/accelcfg.cxx2
-rw-r--r--unotools/source/config/defaultoptions.cxx8
-rw-r--r--unotools/source/config/fltrcfg.cxx22
-rw-r--r--unotools/source/config/fontcfg.cxx10
-rw-r--r--unotools/source/config/lingucfg.cxx180
-rw-r--r--unotools/source/config/misccfg.cxx42
-rw-r--r--unotools/source/config/moduleoptions.cxx2
-rw-r--r--unotools/source/config/pathoptions.cxx84
-rw-r--r--unotools/source/config/regoptions.cxx6
-rw-r--r--unotools/source/config/saveopt.cxx60
-rw-r--r--unotools/source/config/searchopt.cxx170
-rwxr-xr-x[-rw-r--r--]unotools/source/config/syslocaleoptions.cxx6
-rw-r--r--unotools/source/config/useroptions.cxx12
-rw-r--r--unotools/source/config/viewoptions.cxx2
-rw-r--r--unotools/source/i18n/intlwrapper.cxx2
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx138
-rw-r--r--unotools/source/i18n/textsearch.cxx20
-rw-r--r--unotools/source/misc/fontcvt.cxx4
-rw-r--r--unotools/source/misc/fontdefs.cxx2
-rw-r--r--unotools/source/streaming/streamwrap.cxx4
-rw-r--r--unotools/source/ucbhelper/tempfile.cxx16
-rw-r--r--unotools/source/ucbhelper/ucbhelper.cxx24
-rw-r--r--unotools/source/ucbhelper/ucblockbytes.cxx31
-rw-r--r--unotools/source/ucbhelper/xtempfile.cxx54
-rw-r--r--unotools/util/makefile.mk8
-rw-r--r--unotools/util/utl.component34
52 files changed, 844 insertions, 831 deletions
diff --git a/unotools/inc/unotools/accelcfg.hxx b/unotools/inc/unotools/accelcfg.hxx
index 92ad6a0faaf5..9bc3f2178e34 100644
--- a/unotools/inc/unotools/accelcfg.hxx
+++ b/unotools/inc/unotools/accelcfg.hxx
@@ -79,7 +79,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 3f0924c5586a..5fa704951ac0 100644
--- a/unotools/inc/unotools/componentresmodule.hxx
+++ b/unotools/inc/unotools/componentresmodule.hxx
@@ -81,7 +81,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() ) { }
};
//====================================================================
@@ -120,7 +120,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 fc7f1d732f63..ed336373f703 100644
--- a/unotools/inc/unotools/configvaluecontainer.hxx
+++ b/unotools/inc/unotools/configvaluecontainer.hxx
@@ -188,7 +188,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
@@ -204,7 +204,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 1e7d04125aa4..ee6b005f05df 100644
--- a/unotools/inc/unotools/defaultoptions.hxx
+++ b/unotools/inc/unotools/defaultoptions.hxx
@@ -48,7 +48,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 5ba0c65552ed..d370350484c1 100644
--- a/unotools/inc/unotools/fontcfg.hxx
+++ b/unotools/inc/unotools/fontcfg.hxx
@@ -119,38 +119,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)
@@ -220,7 +220,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 b5f912d97c70..12d937cb62e4 100644
--- a/unotools/inc/unotools/fontcvt.hxx
+++ b/unotools/inc/unotools/fontcvt.hxx
@@ -36,12 +36,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 c48076f14b29..12d9c43a109d 100644
--- a/unotools/inc/unotools/fontdefs.hxx
+++ b/unotools/inc/unotools/fontdefs.hxx
@@ -41,12 +41,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 -
@@ -80,29 +80,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 4273d3611ddf..d614a2088e4e 100644
--- a/unotools/inc/unotools/intlwrapper.hxx
+++ b/unotools/inc/unotools/intlwrapper.hxx
@@ -70,7 +70,7 @@ private:
void ImplNewCharClass() const;
void ImplNewLocaleData() const;
void ImplNewCalendar() const;
- void ImplNewCollator( BOOL bCaseSensitive ) const;
+ void ImplNewCollator( sal_Bool bCaseSensitive ) const;
public:
@@ -109,14 +109,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 cecc0147b9d7..f1a2e119a2ed 100644
--- a/unotools/inc/unotools/lingucfg.hxx
+++ b/unotools/inc/unotools/lingucfg.hxx
@@ -53,89 +53,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();
};
@@ -197,29 +197,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 865bddb455b3..306316683b94 100644
--- a/unotools/inc/unotools/localedatawrapper.hxx
+++ b/unotools/inc/unotools/localedatawrapper.hxx
@@ -64,7 +64,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;
@@ -80,11 +80,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
@@ -118,8 +118,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();
@@ -241,19 +241,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.
@@ -282,37 +282,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 030a433bc6e3..39777fc0b3d7 100644
--- a/unotools/inc/unotools/misccfg.hxx
+++ b/unotools/inc/unotools/misccfg.hxx
@@ -44,14 +44,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 7b471ed68a1d..53e6ccaca463 100644
--- a/unotools/inc/unotools/pathoptions.hxx
+++ b/unotools/inc/unotools/pathoptions.hxx
@@ -102,7 +102,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
@@ -130,8 +130,9 @@ public:
void SetWorkPath( const String& rPath );
void SetPath( SvtPathOptions::Pathes ePath, const String& rNewPath );
- String SubstituteVariable( const String& rVar );
- String UseVariable( const String& rVar );
+ String SubstituteVariable( const String& rVar ) const;
+ String ExpandMacros( const String& rPath ) const;
+ String UseVariable( const String& rVar ) const;
sal_Bool SearchFile( String& rIniFile, Pathes ePath = PATH_USERCONFIG );
::com::sun::star::lang::Locale GetLocale() const;
sal_Bool IsReadonly() const;
diff --git a/unotools/inc/unotools/searchopt.hxx b/unotools/inc/unotools/searchopt.hxx
index d8cf6819f389..10ed2ca79bce 100644
--- a/unotools/inc/unotools/searchopt.hxx
+++ b/unotools/inc/unotools/searchopt.hxx
@@ -48,71 +48,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 dc3721bcaba7..7d70ebd589b3 100644..100755
--- a/unotools/inc/unotools/syslocaleoptions.hxx
+++ b/unotools/inc/unotools/syslocaleoptions.hxx
@@ -39,10 +39,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;
@@ -93,8 +93,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 664105bb8b47..bbc40cda01bd 100644
--- a/unotools/inc/unotools/textsearch.hxx
+++ b/unotools/inc/unotools/textsearch.hxx
@@ -82,9 +82,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; }
@@ -151,14 +151,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 7bfd0d4f4a8c..44af28b17ecc 100644
--- a/unotools/inc/unotools/ucbhelper.hxx
+++ b/unotools/inc/unotools/ucbhelper.hxx
@@ -74,12 +74,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 a7090d5efebc..d3c53e882fec 100644
--- a/unotools/inc/unotools/ucblockbytes.hxx
+++ b/unotools/inc/unotools/ucblockbytes.hxx
@@ -91,7 +91,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; }
};
@@ -152,11 +152,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/unotunnelhelper.hxx b/unotools/inc/unotools/unotunnelhelper.hxx
index de9c82da995a..b573fef7b883 100644
--- a/unotools/inc/unotools/unotunnelhelper.hxx
+++ b/unotools/inc/unotools/unotunnelhelper.hxx
@@ -34,8 +34,7 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <rtl/uuid.h>
#include <rtl/memory.h>
-
-#include <cppuhelper/extract.hxx>
+#include <comphelper/extract.hxx>
namespace utl
{
diff --git a/unotools/inc/unotools/useroptions.hxx b/unotools/inc/unotools/useroptions.hxx
index 7230e3bb2da6..17f4d52bc248 100644
--- a/unotools/inc/unotools/useroptions.hxx
+++ b/unotools/inc/unotools/useroptions.hxx
@@ -36,23 +36,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 --------------------------------------------------
@@ -112,8 +112,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/prj/build.lst b/unotools/prj/build.lst
index bb63ba975ed2..d6f10335c254 100644
--- a/unotools/prj/build.lst
+++ b/unotools/prj/build.lst
@@ -1,4 +1,4 @@
-ut unotools : comphelper cppuhelper offuh tools ucbhelper NULL
+ut unotools : LIBXSLT:libxslt comphelper cppuhelper offuh tools ucbhelper NULL
ut unotools usr1 - all ut_mkout NULL
ut unotools\inc nmake - all ut_inc NULL
ut unotools\source\misc nmake - all ut_misc ut_config ut_inc NULL
@@ -10,3 +10,5 @@ ut unotools\source\i18n nmake - all ut_i18n ut_inc NULL
ut unotools\source\property nmake - all ut_property ut_inc NULL
ut unotools\source\accessibility nmake - all ut_accessibility ut_inc NULL
ut unotools\util nmake - all ut_util ut_config ut_i18n ut_misc ut_procfact ut_streaming ut_ucbhelper ut_property ut_accessibility NULL
+
+ut unotools\qa\complex\tempfile nmake - all ut_qa_complex ut_util NULL
diff --git a/unotools/prj/d.lst b/unotools/prj/d.lst
index ad8a764055b2..38cafd0cc1f8 100644
--- a/unotools/prj/d.lst
+++ b/unotools/prj/d.lst
@@ -9,3 +9,4 @@
mkdir: %_DEST%\inc%_EXT%\unotools
..\inc\unotools\*.hxx %_DEST%\inc%_EXT%\unotools\*.hxx
..\inc\unotools\unotoolsdllapi.h %_DEST%\inc%_EXT%\unotools\unotoolsdllapi.h
+..\%__SRC%\misc\utl.component %_DEST%\xml%_EXT%\utl.component
diff --git a/unotools/qa/complex/tempfile/TempFileUnitTest.java b/unotools/qa/complex/tempfile/TempFileUnitTest.java
index 5cd0b7292105..e5f1f2d6d6b2 100644
--- a/unotools/qa/complex/tempfile/TempFileUnitTest.java
+++ b/unotools/qa/complex/tempfile/TempFileUnitTest.java
@@ -26,60 +26,89 @@
************************************************************************/
package complex.tempfile;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.ucb.XSimpleFileAccess;
import com.sun.star.uno.UnoRuntime;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openoffice.test.OfficeConnection;
+import static org.junit.Assert.*;
+
/* Document.
*/
-public class TempFileUnitTest extends ComplexTestCase {
+public class TempFileUnitTest /* extends ComplexTestCase */ {
private XMultiServiceFactory m_xMSF = null;
private XSimpleFileAccess m_xSFA = null;
- public String[] getTestMethodNames() {
- return new String[] {
- "ExecuteTest01",
- "ExecuteTest02"};
- }
-
- public String getTestObjectName() {
- return "TempFileUnitTest";
- }
+// public String[] getTestMethodNames() {
+// return new String[] {
+// "ExecuteTest01",
+// "ExecuteTest02"};
+// }
+//
+// public String getTestObjectName() {
+// return "TempFileUnitTest";
+// }
- public void before() {
- m_xMSF = (XMultiServiceFactory)param.getMSF();
+ @Before public void before() {
+ m_xMSF = getMSF();
if ( m_xMSF == null ) {
- failed ( "Cannot create service factory!" );
+ fail ( "Cannot create service factory!" );
}
try
{
Object oSFA = m_xMSF.createInstance( "com.sun.star.ucb.SimpleFileAccess" );
- m_xSFA = ( XSimpleFileAccess )UnoRuntime.queryInterface( XSimpleFileAccess.class,
- oSFA );
+ m_xSFA = UnoRuntime.queryInterface( XSimpleFileAccess.class, oSFA );
}
catch ( Exception e )
{
- failed ( "Cannot get simple file access! Exception: " + e);
+ fail ( "Cannot get simple file access! Exception: " + e);
}
if ( m_xSFA == null ) {
- failed ( "Cannot get simple file access!" );
+ fail ( "Cannot get simple file access!" );
}
}
- public void after() {
+ @After public void after() {
m_xMSF = null;
m_xSFA = null;
}
- public void ExecuteTest01() {
- TempFileTest aTest = new Test01( m_xMSF, m_xSFA, log );
- assure( "Test01 failed!", aTest.test() );
+ @Test public void ExecuteTest01() {
+ TempFileTest aTest = new Test01( m_xMSF, m_xSFA );
+ assertTrue( "Test01 failed!", aTest.test() );
+ }
+
+ @Test public void ExecuteTest02() {
+ TempFileTest aTest = new Test02( m_xMSF, m_xSFA );
+ assertTrue( "Test02 failed!", aTest.test() );
}
- public void ExecuteTest02() {
- TempFileTest aTest = new Test02( m_xMSF, m_xSFA, log );
- assure( "Test02 failed!", aTest.test() );
+ private XMultiServiceFactory getMSF()
+ {
+ final XMultiServiceFactory xMSF1 = UnoRuntime.queryInterface(XMultiServiceFactory.class, connection.getComponentContext().getServiceManager());
+ return xMSF1;
}
-}; \ No newline at end of file
+
+ // setup and close connections
+ @BeforeClass public static void setUpConnection() throws Exception {
+ System.out.println("setUpConnection()");
+ connection.setUp();
+ }
+
+ @AfterClass public static void tearDownConnection()
+ throws InterruptedException, com.sun.star.uno.Exception
+ {
+ System.out.println("tearDownConnection()");
+ connection.tearDown();
+ }
+
+ private static final OfficeConnection connection = new OfficeConnection();
+};
+
diff --git a/unotools/qa/complex/tempfile/Test01.java b/unotools/qa/complex/tempfile/Test01.java
index dbf3d6c15de2..3eac1c2ecf44 100644
--- a/unotools/qa/complex/tempfile/Test01.java
+++ b/unotools/qa/complex/tempfile/Test01.java
@@ -26,7 +26,7 @@
************************************************************************/
package complex.tempfile;
-import complexlib.ComplexTestCase;
+// import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.ucb.XSimpleFileAccess;
@@ -42,10 +42,10 @@ public class Test01 implements TempFileTest {
XSimpleFileAccess m_xSFA = null;
TestHelper m_aTestHelper = null;
- public Test01(XMultiServiceFactory xMSF, XSimpleFileAccess xSFA, LogWriter aLogWriter) {
+ public Test01(XMultiServiceFactory xMSF, XSimpleFileAccess xSFA) {
m_xMSF = xMSF;
m_xSFA = xSFA;
- m_aTestHelper = new TestHelper(aLogWriter, "Test01: ");
+ m_aTestHelper = new TestHelper( "Test01: ");
}
public boolean test() {
@@ -56,11 +56,9 @@ public class Test01 implements TempFileTest {
//create a temporary file.
try {
Object oTempFile = m_xMSF.createInstance( "com.sun.star.io.TempFile" );
- xTempFile = (XTempFile) UnoRuntime.queryInterface( XTempFile.class,
- oTempFile );
+ xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile);
m_aTestHelper.Message( "Tempfile created." );
- xTruncate = (XTruncate)UnoRuntime.queryInterface( XTruncate.class,
- oTempFile );
+ xTruncate = UnoRuntime.queryInterface(XTruncate.class, oTempFile);
} catch( Exception e ) {
m_aTestHelper.Error( "Cannot create TempFile. exception: " + e );
return false;
diff --git a/unotools/qa/complex/tempfile/Test02.java b/unotools/qa/complex/tempfile/Test02.java
index 18ca4de2e04b..79e27720b31e 100644
--- a/unotools/qa/complex/tempfile/Test02.java
+++ b/unotools/qa/complex/tempfile/Test02.java
@@ -26,15 +26,13 @@
************************************************************************/
package complex.tempfile;
-import complexlib.ComplexTestCase;
import com.sun.star.lang.XMultiServiceFactory;
import com.sun.star.ucb.XSimpleFileAccess;
import com.sun.star.io.*;
-import com.sun.star.lang.XServiceInfo;
+
import com.sun.star.uno.UnoRuntime;
import java.util.Random;
-import share.LogWriter;
public class Test02 implements TempFileTest {
@@ -42,10 +40,10 @@ public class Test02 implements TempFileTest {
XSimpleFileAccess m_xSFA;
TestHelper m_aTestHelper;
- public Test02(XMultiServiceFactory xMSF, XSimpleFileAccess xSFA, LogWriter aLogWriter) {
+ public Test02(XMultiServiceFactory xMSF, XSimpleFileAccess xSFA) {
m_xMSF = xMSF;
m_xSFA = xSFA;
- m_aTestHelper = new TestHelper(aLogWriter, "Test02: ");
+ m_aTestHelper = new TestHelper( "Test02: ");
}
public boolean test() {
@@ -57,11 +55,9 @@ public class Test02 implements TempFileTest {
//create a temporary file.
try {
oTempFile = m_xMSF.createInstance( "com.sun.star.io.TempFile" );
- xTempFile = (XTempFile) UnoRuntime.queryInterface( XTempFile.class,
- oTempFile );
+ xTempFile = UnoRuntime.queryInterface(XTempFile.class, oTempFile);
m_aTestHelper.Message( "Tempfile created." );
- xTruncate = (XTruncate)UnoRuntime.queryInterface( XTruncate.class,
- oTempFile );
+ xTruncate = UnoRuntime.queryInterface(XTruncate.class, oTempFile);
} catch(Exception e) {
m_aTestHelper.Error( "Cannot create TempFile. exception: " + e );
return false;
diff --git a/unotools/qa/complex/tempfile/TestHelper.java b/unotools/qa/complex/tempfile/TestHelper.java
index 6edc2c362fa8..cf93828624f5 100644
--- a/unotools/qa/complex/tempfile/TestHelper.java
+++ b/unotools/qa/complex/tempfile/TestHelper.java
@@ -26,22 +26,20 @@
************************************************************************/
package complex.tempfile;
-import complexlib.ComplexTestCase;
-import com.sun.star.lang.XMultiServiceFactory;
+
import com.sun.star.io.*;
import com.sun.star.uno.AnyConverter;
import com.sun.star.ucb.XSimpleFileAccess;
-import com.sun.star.uno.UnoRuntime;
-import share.LogWriter;
+
public class TestHelper {
- LogWriter m_aLogWriter;
+
String m_sTestPrefix;
- public TestHelper( LogWriter aLogWriter, String sTestPrefix ) {
- m_aLogWriter = aLogWriter;
+ public TestHelper( String sTestPrefix ) {
+
m_sTestPrefix = sTestPrefix;
}
public void SetTempFileRemove( XTempFile xTempFile, boolean b ) {
@@ -69,7 +67,7 @@ public class TestHelper {
} catch (Exception e) {
Error ( "Cannot get TempFileURL. exception: " + e );
}
- if ( sTempFileURL == null || sTempFileURL == "" ) {
+ if ( sTempFileURL == null || sTempFileURL.equals("") ) {
Error ( "Temporary file not valid." );
}
return sTempFileURL;
@@ -82,7 +80,7 @@ public class TestHelper {
} catch ( Exception e ) {
Error( "Cannot get TempFileName. exception: " + e );
}
- if ( sTempFileName == null || sTempFileName == "") {
+ if ( sTempFileName == null || sTempFileName.equals("") ) {
Error( "Temporary file not valid." );
}
return sTempFileName;
@@ -216,10 +214,10 @@ public class TestHelper {
}
public void Error( String sError ) {
- m_aLogWriter.println( m_sTestPrefix + "Error: " + sError );
+ System.out.println( m_sTestPrefix + "Error: " + sError );
}
public void Message( String sMessage ) {
- m_aLogWriter.println( m_sTestPrefix + sMessage );
+ System.out.println( m_sTestPrefix + sMessage );
}
}
diff --git a/unotools/qa/complex/tempfile/makefile.mk b/unotools/qa/complex/tempfile/makefile.mk
index 13d66ca3edd1..30a5eb7261ec 100644
--- a/unotools/qa/complex/tempfile/makefile.mk
+++ b/unotools/qa/complex/tempfile/makefile.mk
@@ -25,61 +25,33 @@
#
#*************************************************************************
-PRJ = ..$/..$/..
-TARGET = TempFileUnitTest
-PRJNAME = unotools
-PACKAGE = complex$/tempfile
-
-# --- Settings -----------------------------------------------------
-.INCLUDE: settings.mk
-
-
-#----- compile .java files -----------------------------------------
-
-JARFILES = ridl.jar unoil.jar jurt.jar juh.jar java_uno.jar OOoRunner.jar
-
-JAVAFILES =\
- TempFileUnitTest.java\
- TempFileTest.java\
- TestHelper.java\
- Test01.java\
- Test02.java
-
-JAVACLASSFILES = $(foreach,i,$(JAVAFILES) $(CLASSDIR)$/$(PACKAGE)$/$(i:b).class)
-
-#----- make a jar from compiled files ------------------------------
-
-MAXLINELENGTH = 100000
-
-JARCLASSDIRS = $(PACKAGE)
-JARTARGET = $(TARGET).jar
-JARCOMPRESS = TRUE
-
-# --- Parameters for the test --------------------------------------
-
-# start an office if the parameter is set for the makefile
-.IF "$(OFFICE)" == ""
-CT_APPEXECCOMMAND =
+.IF "$(OOO_SUBSEQUENT_TESTS)" == ""
+nothing .PHONY:
.ELSE
-CT_APPEXECCOMMAND = -AppExecutionCommand "$(OFFICE)$/soffice -accept=socket,host=localhost,port=8100;urp;"
-.ENDIF
-# test base is java complex
-CT_TESTBASE = -TestBase java_complex
+PRJ = ../../..
+PRJNAME = unotools
+TARGET = qa_complex_tempfile
-# test looks something like the.full.package.TestName
-CT_TEST = -o $(PACKAGE:s\$/\.\).$(JAVAFILES:b)
+.IF "$(OOO_JUNIT_JAR)" != ""
+PACKAGE = complex/tempfile
+JAVATESTFILES = \
+ TempFileUnitTest.java
-# start the runner application
-CT_APP = org.openoffice.Runner
+JAVAFILES = $(JAVATESTFILES) \
+ TempFileTest.java \
+ Test01.java \
+ Test02.java \
+ TestHelper.java
-# --- Targets ------------------------------------------------------
+JARFILES = OOoRunner.jar ridl.jar test.jar unoil.jar jurt.jar
+EXTRAJARFILES = $(OOO_JUNIT_JAR)
+.END
+.INCLUDE: settings.mk
.INCLUDE: target.mk
+.INCLUDE: installationtest.mk
-RUN: run
-
-run:
- +java -cp $(CLASSPATH) $(CT_APP) $(CT_TESTBASE) $(CT_APPEXECCOMMAND) $(CT_TEST)
-
+ALLTAR : javatest
+.END
diff --git a/unotools/source/config/accelcfg.cxx b/unotools/source/config/accelcfg.cxx
index 37482ebcd67a..c1748e3b411c 100644
--- a/unotools/source/config/accelcfg.cxx
+++ b/unotools/source/config/accelcfg.cxx
@@ -72,7 +72,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 963a76a8297d..0b9f1331b261 100644
--- a/unotools/source/config/defaultoptions.cxx
+++ b/unotools/source/config/defaultoptions.cxx
@@ -108,7 +108,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);
};
@@ -201,10 +201,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 )
{
@@ -357,7 +357,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 e380bcbb0b7e..805a38f98620 100644
--- a/unotools/source/config/fltrcfg.cxx
+++ b/unotools/source/config/fltrcfg.cxx
@@ -234,7 +234,7 @@ void SvtCalcFilterOptions_Impl::Load()
struct SvtFilterOptions_Impl
{
- ULONG nFlags;
+ sal_uLong nFlags;
SvtWriterFilterOptions_Impl aWriterCfg;
SvtCalcFilterOptions_Impl aCalcCfg;
SvtAppFilterOptions_Impl aImpressCfg;
@@ -262,8 +262,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();
@@ -272,7 +272,7 @@ struct SvtFilterOptions_Impl
}
};
-void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet )
+void SvtFilterOptions_Impl::SetFlag( sal_uLong nFlag, sal_Bool bSet )
{
switch(nFlag)
{
@@ -292,9 +292,9 @@ void SvtFilterOptions_Impl::SetFlag( ULONG nFlag, BOOL bSet )
}
}
-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;
@@ -356,9 +356,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;
@@ -393,7 +393,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);
@@ -415,7 +415,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);
}
}
@@ -440,7 +440,7 @@ void SvtFilterOptions::SetLoadWordBasicExecutable( sal_Bool bFlag )
SetModified();
}
-BOOL SvtFilterOptions::IsLoadWordBasicExecutable() const
+sal_Bool SvtFilterOptions::IsLoadWordBasicExecutable() const
{
return pImp->IsFlag( FILTERCFG_WORD_WBCTBL );
}
diff --git a/unotools/source/config/fontcfg.cxx b/unotools/source/config/fontcfg.cxx
index ac2e7f797f76..6ff32c0b6e71 100644
--- a/unotools/source/config/fontcfg.cxx
+++ b/unotools/source/config/fontcfg.cxx
@@ -615,7 +615,7 @@ static ImplFontAttrWidthSearchData const aImplWidthAttrSearchList[] =
struct ImplFontAttrTypeSearchData
{
const char* mpStr;
- ULONG mnType;
+ sal_uLong mnType;
};
static ImplFontAttrTypeSearchData const aImplTypeAttrSearchList[] =
@@ -779,23 +779,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 853d7d156d51..9805c14c362d 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -73,25 +73,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)
@@ -100,7 +100,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;
@@ -118,34 +118,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;
@@ -170,10 +170,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();
@@ -195,18 +195,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;
};
@@ -244,7 +244,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},
@@ -296,12 +296,12 @@ const uno::Sequence< OUString > & SvtLinguConfigItem::GetPropertyNames()
if (!bInitialized)
{
- INT32 nMax = SAL_N_ELEMENTS(aNamesToHdl);
+ sal_Int32 nMax = SAL_N_ELEMENTS(aNamesToHdl);
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)
@@ -314,8 +314,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 )
{
@@ -354,20 +354,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)
@@ -442,31 +442,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)
@@ -488,13 +488,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 :
@@ -534,41 +534,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;
}
}
@@ -580,34 +580,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 );
@@ -618,10 +618,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 )
{
@@ -682,11 +682,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;
@@ -712,7 +712,7 @@ BOOL SvtLinguConfigItem::LoadOptions( const uno::Sequence< OUString > &rProperyN
}
}
- bRes = TRUE;
+ bRes = sal_True;
}
DBG_ASSERT( bRes, "LoadOptions failed" );
@@ -720,19 +720,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();
@@ -788,22 +788,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)
@@ -919,47 +919,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
{
@@ -1000,7 +1000,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
@@ -1117,7 +1117,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 2ee1da91de96..733818d17132 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; }
@@ -90,9 +90,9 @@ public:
SfxMiscCfg::SfxMiscCfg() :
ConfigItem(OUString(RTL_CONSTASCII_USTRINGPARAM("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()");
@@ -104,21 +104,21 @@ SfxMiscCfg::~SfxMiscCfg()
{
}
-void SfxMiscCfg::SetNotFoundWarning( BOOL bSet)
+void SfxMiscCfg::SetNotFoundWarning( sal_Bool bSet)
{
if(bNotFound != bSet)
SetModified();
bNotFound = bSet;
}
-void SfxMiscCfg::SetPaperSizeWarning( BOOL bSet)
+void SfxMiscCfg::SetPaperSizeWarning( sal_Bool bSet)
{
if(bPaperSize != bSet)
SetModified();
bPaperSize = bSet;
}
-void SfxMiscCfg::SetPaperOrientationWarning( BOOL bSet)
+void SfxMiscCfg::SetPaperOrientationWarning( sal_Bool bSet)
{
if(bPaperOrientation != bSet)
SetModified();
@@ -240,32 +240,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 8d7419f7722c..56da35f59f26 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -858,7 +858,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 3d7eddf9c89f..8356064172c1 100644
--- a/unotools/source/config/pathoptions.cxx
+++ b/unotools/source/config/pathoptions.cxx
@@ -44,12 +44,14 @@
#include <unotools/ucbhelper.hxx>
#include <comphelper/processfactory.hxx>
+#include <comphelper/componentcontext.hxx>
#include <com/sun/star/beans/XFastPropertySet.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/XPropertySetInfo.hpp>
#include <com/sun/star/util/XStringSubstitution.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/util/XMacroExpander.hpp>
#include <rtl/instance.hxx>
#include <itemholder1.hxx>
@@ -136,6 +138,7 @@ class SvtPathOptions_Impl
std::vector< String > m_aPathArray;
Reference< XFastPropertySet > m_xPathSettings;
Reference< XStringSubstitution > m_xSubstVariables;
+ Reference< XMacroExpander > m_xMacroExpander;
mutable EnumToHandleMap m_aMapEnumToPropHandle;
VarNameToEnumMap m_aMapVarNamesToEnum;
@@ -198,13 +201,13 @@ class SvtPathOptions_Impl
void SetUserConfigPath( const String& rPath ) { SetPath( SvtPathOptions::PATH_USERCONFIG, rPath ); }
void SetWorkPath( const String& rPath ) { SetPath( SvtPathOptions::PATH_WORK, rPath ); }
- rtl::OUString SubstVar( const rtl::OUString& rVar );
- rtl::OUString SubstituteAndConvert( const rtl::OUString& rPath );
- rtl::OUString UsePathVariables( const rtl::OUString& rPath );
+ rtl::OUString SubstVar( const rtl::OUString& rVar ) const;
+ rtl::OUString ExpandMacros( const rtl::OUString& rPath ) const;
+ rtl::OUString UsePathVariables( const rtl::OUString& rPath ) const;
::com::sun::star::lang::Locale GetLocale() const { return m_aLocale; }
- BOOL IsPathReadonly(SvtPathOptions::Pathes ePath)const;
+ sal_Bool IsPathReadonly(SvtPathOptions::Pathes ePath)const;
};
// global ----------------------------------------------------------------
@@ -302,10 +305,10 @@ const String& SvtPathOptions_Impl::GetPath( SvtPathOptions::Pathes ePath )
return m_aEmptyString;
}
// -----------------------------------------------------------------------
-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);
@@ -363,29 +366,35 @@ void SvtPathOptions_Impl::SetPath( SvtPathOptions::Pathes ePath, const String& r
}
}
-// -----------------------------------------------------------------------
+//-------------------------------------------------------------------------
-OUString SvtPathOptions_Impl::SubstituteAndConvert( const rtl::OUString& rPath )
+OUString SvtPathOptions_Impl::ExpandMacros( const rtl::OUString& rPath ) const
{
- return SubstVar( rPath );
+ ::rtl::OUString sExpanded( rPath );
+
+ const INetURLObject aParser( rPath );
+ if ( aParser.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ sExpanded = m_xMacroExpander->expandMacros( aParser.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+
+ return sExpanded;
}
//-------------------------------------------------------------------------
-OUString SvtPathOptions_Impl::UsePathVariables( const OUString& rPath )
+OUString SvtPathOptions_Impl::UsePathVariables( const OUString& rPath ) const
{
return m_xSubstVariables->reSubstituteVariables( rPath );
}
// -----------------------------------------------------------------------
-OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar )
+OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar ) const
{
// Don't work at parameter-string directly. Copy it.
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
@@ -412,7 +421,7 @@ OUString SvtPathOptions_Impl::SubstVar( const OUString& rVar )
// 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;
@@ -474,18 +483,9 @@ SvtPathOptions_Impl::SvtPathOptions_Impl() :
Reference< XInterface >() );
}
- m_xSubstVariables = Reference< XStringSubstitution >( xSMgr->createInstance(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM(
- "com.sun.star.util.PathSubstitution" ))),
- UNO_QUERY );
- if ( !m_xSubstVariables.is() )
- {
- // #112719#: check for existance
- OSL_FAIL( "SvtPathOptions_Impl::SvtPathOptions_Impl(): #112719# happened again!" );
- throw RuntimeException(
- ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "Service com.sun.star.util.PathSubstitution cannot be created" )),
- Reference< XInterface >() );
- }
+ ::comphelper::ComponentContext aContext( xSMgr );
+ m_xSubstVariables.set( aContext.createComponent( "com.sun.star.util.PathSubstitution" ), UNO_QUERY_THROW );
+ m_xMacroExpander.set( aContext.getSingleton( "com.sun.star.util.theMacroExpander" ), UNO_QUERY_THROW );
// Create temporary hash map to have a mapping between property names and property handles
Reference< XPropertySet > xPropertySet = Reference< XPropertySet >( m_xPathSettings, UNO_QUERY );
@@ -896,13 +896,22 @@ void SvtPathOptions::SetWorkPath( const String& rPath )
// -----------------------------------------------------------------------
-String SvtPathOptions::SubstituteVariable( const String& rVar )
+String SvtPathOptions::SubstituteVariable( const String& rVar ) const
{
- String aRet = pImp->SubstituteAndConvert( rVar );
+ String aRet = pImp->SubstVar( rVar );
return aRet;
}
-String SvtPathOptions::UseVariable( const String& rPath )
+// -----------------------------------------------------------------------
+
+String SvtPathOptions::ExpandMacros( const String& rPath ) const
+{
+ return pImp->ExpandMacros( rPath );
+}
+
+// -----------------------------------------------------------------------
+
+String SvtPathOptions::UseVariable( const String& rPath ) const
{
String aRet = pImp->UsePathVariables( rPath );
return aRet;
@@ -973,7 +982,7 @@ sal_Bool SvtPathOptions::SearchFile( String& rIniFile, Pathes ePath )
case PATH_TEMPLATE: aPath = GetTemplatePath(); break;
case PATH_WORK: aPath = GetWorkPath(); break;
case PATH_UICONFIG: aPath = GetUIConfigPath(); break;
- case PATH_FINGERPRINT: aPath = GetFingerprintPath(); break;
+ case PATH_FINGERPRINT: aPath = GetFingerprintPath(); break;
case PATH_USERCONFIG:/*-Wall???*/ break;
case PATH_COUNT: /*-Wall???*/ break;
}
@@ -981,16 +990,27 @@ 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 );
}
+ if ( aObj.GetProtocol() == INET_PROT_VND_SUN_STAR_EXPAND )
+ {
+ ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XMacroExpander > xMacroExpander( aContext.getSingleton( "com.sun.star.util.theMacroExpander" ), UNO_QUERY );
+ OSL_ENSURE( xMacroExpander.is(), "SvtPathOptions::SearchFile: unable to access the MacroExpander singleton!" );
+ if ( xMacroExpander.is() )
+ {
+ const ::rtl::OUString sExpandedPath = xMacroExpander->expandMacros( aObj.GetURLPath( INetURLObject::DECODE_WITH_CHARSET ) );
+ aObj.SetURL( sExpandedPath );
+ }
+ }
xub_StrLen i, nCount = aIniFile.GetTokenCount( '/' );
for ( i = 0; i < nCount; ++i )
@@ -1020,7 +1040,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 4328ed3ebcfe..fcd4c767ef8a 100644
--- a/unotools/source/config/regoptions.cxx
+++ b/unotools/source/config/regoptions.cxx
@@ -79,9 +79,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 80ba32920550..754c65d63ccf 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 5da91ee1789a..800672c3ac95 100644
--- a/unotools/source/config/searchopt.cxx
+++ b/unotools/source/config/searchopt.cxx
@@ -53,19 +53,19 @@ using ::rtl::OUString;
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;
@@ -77,8 +77,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 );
};
@@ -89,7 +89,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 );
}
@@ -110,28 +110,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)
@@ -177,19 +177,19 @@ Sequence< OUString > SvtSearchOptions_Impl::GetPropertyNames() const
const int nCount = SAL_N_ELEMENTS( aPropNames );
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(),
@@ -198,16 +198,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)
@@ -222,13 +222,13 @@ BOOL SvtSearchOptions_Impl::Load()
else
{
OSL_FAIL( "unexpected type" );
- bSucc = FALSE;
+ bSucc = sal_False;
}
}
else
{
OSL_FAIL( "value missing" );
- bSucc = FALSE;
+ bSucc = sal_False;
}
}
}
@@ -238,12 +238,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();
@@ -252,13 +252,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;
}
@@ -278,9 +278,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;
@@ -325,312 +325,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 4e8dedc25db3..2b6f4f2cdc1b 100644..100755
--- a/unotools/source/config/syslocaleoptions.cxx
+++ b/unotools/source/config/syslocaleoptions.cxx
@@ -89,7 +89,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;
@@ -387,7 +387,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 );
@@ -431,7 +431,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 f02795bd9a60..ee88691535a2 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -128,8 +128,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:
@@ -802,7 +802,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();
@@ -921,7 +921,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)
@@ -1312,13 +1312,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/config/viewoptions.cxx b/unotools/source/config/viewoptions.cxx
index c2c46b47afb6..f622b8d893a4 100644
--- a/unotools/source/config/viewoptions.cxx
+++ b/unotools/source/config/viewoptions.cxx
@@ -781,7 +781,7 @@ css::uno::Reference< css::uno::XInterface > SvtViewOptionsBase_Impl::impl_getSet
xNode = ::comphelper::ConfigurationHelper::makeSureSetNodeExists(m_xRoot, m_sListName, sNode);
else
{
- if (m_xSet.is())
+ if (m_xSet.is() && m_xSet->hasByName(sNode) )
m_xSet->getByName(sNode) >>= xNode;
}
}
diff --git a/unotools/source/i18n/intlwrapper.cxx b/unotools/source/i18n/intlwrapper.cxx
index ccf039c7f63d..f98d6828efb3 100644
--- a/unotools/source/i18n/intlwrapper.cxx
+++ b/unotools/source/i18n/intlwrapper.cxx
@@ -95,7 +95,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 1c4856f07c67..656453dde274 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -57,8 +57,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;
@@ -77,7 +77,7 @@ namespace
{};
}
-BYTE LocaleDataWrapper::nLocaleDataChecking = 0;
+sal_uInt8 LocaleDataWrapper::nLocaleDataChecking = 0;
LocaleDataWrapper::LocaleDataWrapper(
const Reference< lang::XMultiServiceFactory > & xSF,
@@ -85,8 +85,8 @@ LocaleDataWrapper::LocaleDataWrapper(
)
:
xSMgr( xSF ),
- bLocaleDataItemValid( FALSE ),
- bReservedWordValid( FALSE )
+ bLocaleDataItemValid( sal_False ),
+ bReservedWordValid( sal_False )
{
setLocale( rLocale );
if ( xSMgr.is() )
@@ -168,7 +168,7 @@ void LocaleDataWrapper::invalidateData()
{
aLocaleItem[j].Erase();
}
- bLocaleDataItemValid = FALSE;
+ bLocaleDataItemValid = sal_False;
}
if ( bReservedWordValid )
{
@@ -176,7 +176,7 @@ void LocaleDataWrapper::invalidateData()
{
aReservedWord[j].Erase();
}
- bReservedWordValid = FALSE;
+ bReservedWordValid = sal_False;
}
xDefaultCalendar.reset();
if (aGrouping.getLength())
@@ -544,7 +544,7 @@ void LocaleDataWrapper::getOneLocaleItemImpl( sal_Int16 nItem )
if ( !bLocaleDataItemValid )
{
aLocaleDataItem = getLocaleItem();
- bLocaleDataItemValid = TRUE;
+ bLocaleDataItemValid = sal_True;
}
switch ( nItem )
{
@@ -610,7 +610,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() )
@@ -719,7 +719,7 @@ const String& LocaleDataWrapper::getCurrBankSymbol() const
}
-USHORT LocaleDataWrapper::getCurrPositiveFormat() const
+sal_uInt16 LocaleDataWrapper::getCurrPositiveFormat() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrPositiveFormat == nCurrFormatInvalid )
@@ -731,7 +731,7 @@ USHORT LocaleDataWrapper::getCurrPositiveFormat() const
}
-USHORT LocaleDataWrapper::getCurrNegativeFormat() const
+sal_uInt16 LocaleDataWrapper::getCurrNegativeFormat() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrNegativeFormat == nCurrFormatInvalid )
@@ -743,7 +743,7 @@ USHORT LocaleDataWrapper::getCurrNegativeFormat() const
}
-USHORT LocaleDataWrapper::getCurrDigits() const
+sal_uInt16 LocaleDataWrapper::getCurrDigits() const
{
::utl::ReadWriteGuard aGuard( aMutex );
if ( nCurrDigits == nCurrFormatInvalid )
@@ -802,13 +802,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
{
@@ -816,7 +816,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 )
@@ -1335,7 +1335,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" );
@@ -1350,7 +1350,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++;
@@ -1393,13 +1393,13 @@ 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;
+ sal_uInt16 nNumLen;
+ sal_uInt16 i = 0;
// negative number
if ( nNumber < 0 )
@@ -1411,7 +1411,7 @@ sal_Unicode* LocaleDataWrapper::ImplAddFormatNum( sal_Unicode* pBuf,
// 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 )
@@ -1457,7 +1457,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(
@@ -1478,11 +1478,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++;
@@ -1508,12 +1508,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
{
@@ -1524,39 +1524,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 )
{
@@ -1568,22 +1568,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 )
{
@@ -1615,7 +1615,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 ) );
@@ -1625,7 +1625,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() )
{
@@ -1654,7 +1654,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];
@@ -1663,31 +1663,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;
@@ -1699,8 +1699,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
@@ -1711,7 +1711,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;
@@ -1719,8 +1719,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];
@@ -1737,26 +1737,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;
@@ -1764,7 +1764,7 @@ String LocaleDataWrapper::getCurr( sal_Int64 nNumber, USHORT nDecimals,
{
if ( *pTempBuf != '0' )
{
- bZero = FALSE;
+ bZero = sal_False;
break;
}
@@ -1910,7 +1910,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;
@@ -1970,7 +1970,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 1c4d2b4b2fd5..abf2ce5af79e 100644
--- a/unotools/source/i18n/textsearch.cxx
+++ b/unotools/source/i18n/textsearch.cxx
@@ -49,9 +49,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;
@@ -63,7 +63,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;
@@ -304,8 +304,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 );
@@ -334,17 +334,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 95342a0f896b..abeb9cbb6f80 100644
--- a/unotools/source/misc/fontcvt.cxx
+++ b/unotools/source/misc/fontcvt.cxx
@@ -1378,7 +1378,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();
@@ -1462,7 +1462,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 58121bd85ed0..ba90cde2cced 100644
--- a/unotools/source/misc/fontdefs.cxx
+++ b/unotools/source/misc/fontdefs.cxx
@@ -520,7 +520,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 e064f2222b20..fc29a63bb1ac 100644
--- a/unotools/source/streaming/streamwrap.cxx
+++ b/unotools/source/streaming/streamwrap.cxx
@@ -182,7 +182,7 @@ void OInputStreamWrapper::checkError() const
//------------------------------------------------------------------------------
OSeekableInputStreamWrapper::OSeekableInputStreamWrapper(SvStream& _rStream)
{
- SetStream( &_rStream, FALSE );
+ SetStream( &_rStream, sal_False );
}
//------------------------------------------------------------------------------
@@ -329,7 +329,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/tempfile.cxx b/unotools/source/ucbhelper/tempfile.cxx
index 7a8c1f7e1fb9..b0ceb14b1a57 100644
--- a/unotools/source/ucbhelper/tempfile.cxx
+++ b/unotools/source/ucbhelper/tempfile.cxx
@@ -199,19 +199,19 @@ String ConstructTempDir_Impl( const String* pParent )
void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_True )
{
// add a suitable tempname
- // Prefix can have 5 chars, leaving 3 for numbers. 26 ** 3 == 17576
- // ER 13.07.00 why not radix 36 [0-9A-Z] ?!?
- const unsigned nRadix = 26;
+ // 36 ** 6 == 2176782336
+ unsigned const nRadix = 36;
+ unsigned long const nMax = (nRadix*nRadix*nRadix*nRadix*nRadix*nRadix);
String aName( rName );
aName += String::CreateFromAscii( "lu" );
rName.Erase();
- static unsigned long u = Time::GetSystemTicks();
- for ( unsigned long nOld = u; ++u != nOld; )
+ unsigned long nSeed = Time::GetSystemTicks() % nMax;
+ for ( unsigned long u = nSeed; ++u != nSeed; )
{
- u %= (nRadix*nRadix*nRadix);
+ u %= nMax;
String aTmp( aName );
- aTmp += String::CreateFromInt32( (sal_Int32) (unsigned) u, nRadix );
+ aTmp += String::CreateFromInt64( static_cast<sal_Int64>(u), nRadix );
aTmp += String::CreateFromAscii( ".tmp" );
if ( bDir )
@@ -243,7 +243,7 @@ void CreateTempName_Impl( String& rName, sal_Bool bKeep, sal_Bool bDir = sal_Tru
#ifdef UNX /* RW permission for the user only! */
mode_t old_mode = umask(077);
#endif
- FileBase::RC err = aFile.open(osl_File_OpenFlag_Create);
+ FileBase::RC err = aFile.open( osl_File_OpenFlag_Create | osl_File_OpenFlag_NoLock );
#ifdef UNX
umask(old_mode);
#endif
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx
index 789fe3f6bebb..76fc443fb8ae 100644
--- a/unotools/source/ucbhelper/ucbhelper.cxx
+++ b/unotools/source/ucbhelper/ucbhelper.cxx
@@ -629,9 +629,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!" );
@@ -646,7 +646,7 @@ ULONG UCBContentHelper::GetSize( const String& rContent )
catch( ::com::sun::star::uno::Exception& )
{
}
- nSize = (UINT32)nTemp;
+ nSize = (sal_uInt32)nTemp;
return nSize;
}
@@ -682,9 +682,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;
@@ -692,7 +692,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
@@ -743,7 +743,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
@@ -762,18 +762,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 ac97a15f4b24..c95608c3faaf 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -1248,7 +1248,7 @@ UcbLockBytes::UcbLockBytes( UcbLockBytesHandler* pHandler )
, m_bDontClose( sal_False )
, m_bStreamValid (sal_False)
{
- SetSynchronMode( TRUE );
+ SetSynchronMode( sal_True );
}
//----------------------------------------------------------------------------
@@ -1386,13 +1386,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() )
{
@@ -1451,13 +1451,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;
@@ -1501,16 +1501,25 @@ ErrCode UcbLockBytes::Flush() const
Reference <XOutputStream > xOutputStream = getOutputStream_Impl();
if ( !xOutputStream.is() )
return ERRCODE_IO_CANTWRITE;
- xOutputStream->flush();
+
+ try
+ {
+ xOutputStream->flush();
+ }
+ catch( Exception )
+ {
+ return ERRCODE_IO_CANTWRITE;
+ }
+
return ERRCODE_NONE;
}
//----------------------------------------------------------------------------
-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 )
{
@@ -1527,8 +1536,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;
@@ -1566,7 +1575,7 @@ ErrCode UcbLockBytes::Stat( SvLockBytesStat *pStat, SvLockBytesStatFlag) const
try
{
- pStat->nSize = ULONG(xSeekable->getLength());
+ pStat->nSize = sal_uLong(xSeekable->getLength());
}
catch (IOException)
{
diff --git a/unotools/source/ucbhelper/xtempfile.cxx b/unotools/source/ucbhelper/xtempfile.cxx
index cbe09fcd7a0f..7883a3e85cb2 100644
--- a/unotools/source/ucbhelper/xtempfile.cxx
+++ b/unotools/source/ucbhelper/xtempfile.cxx
@@ -29,8 +29,6 @@
#include <XTempFile.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/typeprovider.hxx>
-#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <unotools/tempfile.hxx>
#include <osl/file.hxx>
#include <unotools/configmgr.hxx>
@@ -486,43 +484,6 @@ throw ( ::css::uno::RuntimeException )
return ::cppu::createSingleComponentFactory( XTempFile_createInstance, getImplementationName_Static(), getSupportedServiceNames_Static() );
}
-static sal_Bool writeInfo( void * pRegistryKey,
- const ::rtl::OUString & rImplementationName,
- ::css::uno::Sequence< ::rtl::OUString > const & rServiceNames )
-{
- ::rtl::OUString aKeyName( RTL_CONSTASCII_USTRINGPARAM ( "/" ) );
- aKeyName += rImplementationName;
- aKeyName += ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM ( "/UNO/SERVICES" ) );
-
- ::css::uno::Reference< ::css::registry::XRegistryKey > xKey;
- try
- {
- xKey = static_cast< ::css::registry::XRegistryKey * >(
- pRegistryKey )->createKey( aKeyName );
- }
- catch ( ::css::registry::InvalidRegistryException const & )
- {
- }
-
- if ( !xKey.is() )
- return sal_False;
-
- sal_Bool bSuccess = sal_True;
-
- for ( sal_Int32 n = 0; n < rServiceNames.getLength(); ++n )
- {
- try
- {
- xKey->createKey( rServiceNames[ n ] );
- }
- catch ( ::css::registry::InvalidRegistryException const & )
- {
- bSuccess = sal_False;
- break;
- }
- }
- return bSuccess;
-}
// C functions to implement this as a component
extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnvironment(
@@ -532,21 +493,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT void SAL_CALL component_getImplementationEnviron
}
/**
- * This function creates an implementation section in the registry and another subkey
- * for each supported service.
- * @param pServiceManager generic uno interface providing a service manager
- * @param pRegistryKey generic uno interface providing registry key to write
- */
-extern "C" SAL_DLLPUBLIC_EXPORT sal_Bool SAL_CALL component_writeInfo( void* /*pServiceManager*/, void* pRegistryKey )
-{
- return pRegistryKey &&
- writeInfo (pRegistryKey,
- OTempFileService::getImplementationName_Static(),
- OTempFileService::getSupportedServiceNames_Static() );
-}
-
-
-/**
* This function is called to get service factories for an implementation.
* @param pImplName name of implementation
* @param pServiceManager generic uno interface providing a service manager to instantiate components
diff --git a/unotools/util/makefile.mk b/unotools/util/makefile.mk
index 9adb6d1466d1..dffbdf0b6953 100644
--- a/unotools/util/makefile.mk
+++ b/unotools/util/makefile.mk
@@ -93,3 +93,11 @@ $(MISC)$/$(SHL1TARGET).flt: makefile.mk
@echo UpdateToConfig >> $@
@echo _Impl >> $@
+
+ALLTAR : $(MISC)/utl.component
+
+$(MISC)/utl.component .ERRREMOVE : $(SOLARENV)/bin/createcomponent.xslt \
+ utl.component
+ $(XSLTPROC) --nonet --stringparam uri \
+ '$(COMPONENTPREFIX_BASIS_NATIVE)$(SHL1TARGETN:f)' -o $@ \
+ $(SOLARENV)/bin/createcomponent.xslt utl.component
diff --git a/unotools/util/utl.component b/unotools/util/utl.component
new file mode 100644
index 000000000000..8c8198741f55
--- /dev/null
+++ b/unotools/util/utl.component
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--**********************************************************************
+*
+* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+*
+* Copyright 2000, 2010 Oracle and/or its affiliates.
+*
+* OpenOffice.org - a multi-platform office productivity suite
+*
+* This file is part of OpenOffice.org.
+*
+* OpenOffice.org is free software: you can redistribute it and/or modify
+* it under the terms of the GNU Lesser General Public License version 3
+* only, as published by the Free Software Foundation.
+*
+* OpenOffice.org is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+* GNU Lesser General Public License version 3 for more details
+* (a copy is included in the LICENSE file that accompanied this code).
+*
+* You should have received a copy of the GNU Lesser General Public License
+* version 3 along with OpenOffice.org. If not, see
+* <http://www.openoffice.org/license.html>
+* for a copy of the LGPLv3 License.
+*
+**********************************************************************-->
+
+<component loader="com.sun.star.loader.SharedLibrary"
+ xmlns="http://openoffice.org/2010/uno-components">
+ <implementation name="com.sun.star.io.comp.TempFile">
+ <service name="com.sun.star.io.TempFile"/>
+ </implementation>
+</component>