summaryrefslogtreecommitdiff
path: root/include/unotools
diff options
context:
space:
mode:
authorNorbert Thiebaud <nthiebaud@gmail.com>2013-07-01 10:33:48 -0500
committerFridrich Strba <fridrich@documentfoundation.org>2013-07-02 07:31:30 +0000
commit6a08067902ddc0ec61a7c7b4b0035b303f643a50 (patch)
treecd49d1824cd169d9d224925b836eaa70de27414e /include/unotools
parent82a1d75ee59c46e6bb361b98c520cc4eff2e770c (diff)
OUString convertion for unotools
Change-Id: Ifae7f344e3827875e32afa3cda23c771f5735707 Reviewed-on: https://gerrit.libreoffice.org/4659 Tested-by: LibreOffice gerrit bot <gerrit@libreoffice.org> Reviewed-by: Fridrich Strba <fridrich@documentfoundation.org> Tested-by: Fridrich Strba <fridrich@documentfoundation.org>
Diffstat (limited to 'include/unotools')
-rw-r--r--include/unotools/calendarwrapper.hxx7
-rw-r--r--include/unotools/charclass.hxx66
-rw-r--r--include/unotools/defaultoptions.hxx4
-rw-r--r--include/unotools/fontcfg.hxx18
-rw-r--r--include/unotools/fontcvt.hxx11
-rw-r--r--include/unotools/fontdefs.hxx6
-rw-r--r--include/unotools/pathoptions.hxx96
-rw-r--r--include/unotools/syslocaleoptions.hxx35
-rw-r--r--include/unotools/tempfile.hxx24
-rw-r--r--include/unotools/textsearch.hxx40
-rw-r--r--include/unotools/transliterationwrapper.hxx28
-rw-r--r--include/unotools/ucblockbytes.hxx34
-rw-r--r--include/unotools/ucbstreamhelper.hxx14
13 files changed, 189 insertions, 194 deletions
diff --git a/include/unotools/calendarwrapper.hxx b/include/unotools/calendarwrapper.hxx
index d7e66dea0f33..2f3c48f4cc23 100644
--- a/include/unotools/calendarwrapper.hxx
+++ b/include/unotools/calendarwrapper.hxx
@@ -21,7 +21,6 @@
#define _UNOTOOLS_CALENDARWRAPPER_HXX
#include <tools/datetime.hxx>
-#include <tools/string.hxx>
#include <com/sun/star/uno/Reference.hxx>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/i18n/Calendar2.hpp>
@@ -73,13 +72,13 @@ public:
// wrapper implementations of XCalendar
void setValue( sal_Int16 nFieldIndex, sal_Int16 nValue );
- sal_Bool isValid() const;
+ bool isValid() const;
sal_Int16 getValue( sal_Int16 nFieldIndex ) const;
void addValue( sal_Int16 nFieldIndex, sal_Int32 nAmount );
sal_Int16 getFirstDayOfWeek() const;
sal_Int16 getNumberOfMonthsInYear() const;
sal_Int16 getNumberOfDaysInWeek() const;
- String getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const;
+ OUString getDisplayName( sal_Int16 nCalendarDisplayIndex, sal_Int16 nIdx, sal_Int16 nNameType ) const;
/** Convenience method to get timezone offset in milliseconds, taking both
fields ZONE_OFFSET and ZONE_OFFSET_SECOND_MILLIS into account. */
@@ -91,7 +90,7 @@ public:
// wrapper implementations of XExtendedCalendar
- String getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
+ OUString getDisplayString( sal_Int32 nCalendarDisplayCode, sal_Int16 nNativeNumberMode ) const;
// wrapper implementations of XCalendar3
diff --git a/include/unotools/charclass.hxx b/include/unotools/charclass.hxx
index 3ff83458b0af..1eb2954a0491 100644
--- a/include/unotools/charclass.hxx
+++ b/include/unotools/charclass.hxx
@@ -33,7 +33,7 @@
#include <osl/mutex.hxx>
#include <rtl/character.hxx>
-class String;
+
namespace com { namespace sun { namespace star {
namespace uno {
class XComponentContext;
@@ -93,48 +93,48 @@ public:
/// isdigit() on ascii values
- static inline sal_Bool isAsciiDigit( sal_Unicode c )
+ static inline bool isAsciiDigit( sal_Unicode c )
{
return rtl::isAsciiDigit( c );
}
/// isalpha() on ascii values
- static inline sal_Bool isAsciiAlpha( sal_Unicode c )
+ static inline bool isAsciiAlpha( sal_Unicode c )
{
return rtl::isAsciiAlpha( c );
}
/// isalnum() on ascii values
- static inline sal_Bool isAsciiAlphaNumeric( sal_Unicode c )
+ static inline bool isAsciiAlphaNumeric( sal_Unicode c )
{
return rtl::isAsciiAlphanumeric( c );
}
/// isdigit() on ascii values of entire string
- static sal_Bool isAsciiNumeric( const String& rStr );
+ static bool isAsciiNumeric( const OUString& rStr );
/// isalpha() on ascii values of entire string
- static sal_Bool isAsciiAlpha( const String& rStr );
+ static bool isAsciiAlpha( const OUString& rStr );
/// isalnum() on ascii values of entire string
- static sal_Bool isAsciiAlphaNumeric( const String& rStr );
+ static bool isAsciiAlphaNumeric( const OUString& rStr );
/// whether type is pure alpha or not, e.g. return of getStringType
- static inline sal_Bool isAlphaType( sal_Int32 nType )
+ static inline bool isAlphaType( sal_Int32 nType )
{
return ((nType & nCharClassAlphaType) != 0) &&
((nType & ~(nCharClassAlphaTypeMask)) == 0);
}
/// whether type is pure numeric or not, e.g. return of getStringType
- static inline sal_Bool isNumericType( sal_Int32 nType )
+ static inline bool isNumericType( sal_Int32 nType )
{
return ((nType & nCharClassNumericType) != 0) &&
((nType & ~(nCharClassNumericTypeMask)) == 0);
}
/// whether type is pure alphanumeric or not, e.g. return of getStringType
- static inline sal_Bool isAlphaNumericType( sal_Int32 nType )
+ static inline bool isAlphaNumericType( sal_Int32 nType )
{
return ((nType & (nCharClassAlphaType |
nCharClassNumericType)) != 0) &&
@@ -143,14 +143,14 @@ public:
}
/// whether type is pure letter or not, e.g. return of getStringType
- static inline sal_Bool isLetterType( sal_Int32 nType )
+ static inline bool isLetterType( sal_Int32 nType )
{
return ((nType & nCharClassLetterType) != 0) &&
((nType & ~(nCharClassLetterTypeMask)) == 0);
}
/// whether type is pure letternumeric or not, e.g. return of getStringType
- static inline sal_Bool isLetterNumericType( sal_Int32 nType )
+ static inline bool isLetterNumericType( sal_Int32 nType )
{
return ((nType & (nCharClassLetterType |
nCharClassNumericType)) != 0) &&
@@ -178,42 +178,42 @@ public:
return titlecase(_rStr, 0, _rStr.getLength());
}
- sal_Int16 getType( const String& rStr, xub_StrLen nPos ) const;
- sal_Int16 getCharacterDirection( const String& rStr, xub_StrLen nPos ) const;
- sal_Int16 getScript( const String& rStr, xub_StrLen nPos ) const;
- sal_Int32 getCharacterType( const String& rStr, xub_StrLen nPos ) const;
- sal_Int32 getStringType( const String& rStr, xub_StrLen nPos, xub_StrLen nCount ) const;
+ sal_Int16 getType( const OUString& rStr, sal_Int32 nPos ) const;
+ sal_Int16 getCharacterDirection( const OUString& rStr, sal_Int32 nPos ) const;
+ sal_Int16 getScript( const OUString& rStr, sal_Int32 nPos ) const;
+ sal_Int32 getCharacterType( const OUString& rStr, sal_Int32 nPos ) const;
+ sal_Int32 getStringType( const OUString& rStr, sal_Int32 nPos, sal_Int32 nCount ) const;
::com::sun::star::i18n::ParseResult parseAnyToken(
- const String& rStr,
+ const OUString& rStr,
sal_Int32 nPos,
sal_Int32 nStartCharFlags,
- const String& userDefinedCharactersStart,
+ const OUString& userDefinedCharactersStart,
sal_Int32 nContCharFlags,
- const String& userDefinedCharactersCont ) const;
+ const OUString& userDefinedCharactersCont ) const;
::com::sun::star::i18n::ParseResult parsePredefinedToken(
sal_Int32 nTokenType,
- const String& rStr,
+ const OUString& rStr,
sal_Int32 nPos,
sal_Int32 nStartCharFlags,
- const String& userDefinedCharactersStart,
+ const OUString& userDefinedCharactersStart,
sal_Int32 nContCharFlags,
- const String& userDefinedCharactersCont ) const;
+ const OUString& userDefinedCharactersCont ) const;
// Functionality of class International methods
- sal_Bool isAlpha( const String& rStr, xub_StrLen nPos ) const;
- sal_Bool isLetter( const String& rStr, xub_StrLen nPos ) const;
- sal_Bool isDigit( const String& rStr, xub_StrLen nPos ) const;
- sal_Bool isAlphaNumeric( const String& rStr, xub_StrLen nPos ) const;
- sal_Bool isLetterNumeric( const String& rStr, xub_StrLen nPos ) const;
- sal_Bool isAlpha( const String& rStr ) const;
- sal_Bool isLetter( const String& rStr ) const;
- sal_Bool isNumeric( const String& rStr ) const;
- sal_Bool isAlphaNumeric( const String& rStr ) const;
- sal_Bool isLetterNumeric( const String& rStr ) const;
+ bool isAlpha( const OUString& rStr, sal_Int32 nPos ) const;
+ bool isLetter( const OUString& rStr, sal_Int32 nPos ) const;
+ bool isDigit( const OUString& rStr, sal_Int32 nPos ) const;
+ bool isAlphaNumeric( const OUString& rStr, sal_Int32 nPos ) const;
+ bool isLetterNumeric( const OUString& rStr, sal_Int32 nPos ) const;
+ bool isAlpha( const OUString& rStr ) const;
+ bool isLetter( const OUString& rStr ) const;
+ bool isNumeric( const OUString& rStr ) const;
+ bool isAlphaNumeric( const OUString& rStr ) const;
+ bool isLetterNumeric( const OUString& rStr ) const;
private:
diff --git a/include/unotools/defaultoptions.hxx b/include/unotools/defaultoptions.hxx
index 175fd3239f7a..692c1463010e 100644
--- a/include/unotools/defaultoptions.hxx
+++ b/include/unotools/defaultoptions.hxx
@@ -20,10 +20,10 @@
#define INCLUDED_unotools_DEFAULTOPTIONS_HXX
#include "unotools/unotoolsdllapi.h"
+#include <rtl/ustring.hxx>
#include "tools/solar.h"
#include <unotools/options.hxx>
-class String;
class SvtDefaultOptions_Impl;
// class SvtDefaultOptions -----------------------------------------------
@@ -39,7 +39,7 @@ public:
SvtDefaultOptions();
virtual ~SvtDefaultOptions();
- String GetDefaultPath( sal_uInt16 nId ) const;
+ OUString GetDefaultPath( sal_uInt16 nId ) const;
};
#endif // #ifndef INCLUDED_unotools_DEFAULTOPTIONS_HXX
diff --git a/include/unotools/fontcfg.hxx b/include/unotools/fontcfg.hxx
index 23ea55140655..3e7f0ac95200 100644
--- a/include/unotools/fontcfg.hxx
+++ b/include/unotools/fontcfg.hxx
@@ -20,7 +20,7 @@
#define _UNOTOOLS_FONTCFG_HXX
#include <unotools/unotoolsdllapi.h>
-#include <tools/string.hxx>
+#include <tools/solar.h>
#include <tools/fontenum.hxx>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
@@ -154,11 +154,11 @@ class UNOTOOLS_DLLPUBLIC DefaultFontConfiguration
struct UNOTOOLS_DLLPUBLIC FontNameAttr
{
- String Name;
- ::std::vector< String > Substitutions;
- ::std::vector< String > MSSubstitutions;
- ::std::vector< String > PSSubstitutions;
- ::std::vector< String > HTMLSubstitutions;
+ OUString Name;
+ ::std::vector< OUString > Substitutions;
+ ::std::vector< OUString > MSSubstitutions;
+ ::std::vector< OUString > PSSubstitutions;
+ ::std::vector< OUString > HTMLSubstitutions;
FontWeight Weight;
FontWidth Width;
unsigned long Type; // bitfield of IMPL_FONT_ATTR_*
@@ -190,7 +190,7 @@ private:
void fillSubstVector( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
const OUString& rType,
- std::vector< String >& rSubstVector ) const;
+ std::vector< OUString >& rSubstVector ) const;
FontWeight getSubstWeight( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
const OUString& rType ) const;
FontWidth getSubstWidth( const com::sun::star::uno::Reference< com::sun::star::container::XNameAccess > xFont,
@@ -205,13 +205,13 @@ public:
static FontSubstConfiguration& get();
const FontNameAttr* getSubstInfo(
- const String& rFontName,
+ const OUString& rFontName,
const com::sun::star::lang::Locale& rLocale =
com::sun::star::lang::Locale( OUString( "en" ),
OUString(),
OUString() )
) const;
- static void getMapName( const String& rOrgName, String& rShortName, String& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType );
+ static void getMapName( const OUString& rOrgName, OUString& rShortName, OUString& rFamilyName, FontWeight& rWeight, FontWidth& rWidth, sal_uLong& rType );
};
} // namespace utl
diff --git a/include/unotools/fontcvt.hxx b/include/unotools/fontcvt.hxx
index 6386e615951d..216ebcac101b 100644
--- a/include/unotools/fontcvt.hxx
+++ b/include/unotools/fontcvt.hxx
@@ -21,7 +21,8 @@
#define _UNOTOOLS_FONTCVT_HXX
#include <unotools/unotoolsdllapi.h>
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
+#include <tools/solar.h>
// ------------------
// - FontToSubsFont -
@@ -32,10 +33,10 @@
#define FONTTOSUBSFONT_ONLYOLDSOSYMBOLFONTS ((sal_uLong)0x00000004)
typedef void* FontToSubsFontConverter;
-UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const String& rFontName, sal_uLong nFlags );
+UNOTOOLS_DLLPUBLIC FontToSubsFontConverter CreateFontToSubsFontConverter( const OUString& 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 );
+UNOTOOLS_DLLPUBLIC OUString GetFontToSubsFontName( FontToSubsFontConverter hConverter );
// ---------------------------
// - StarSymbolToMSMultiFont -
@@ -48,7 +49,7 @@ public:
//mapped to. Sets rChar to the correct position for that font. If no
//match found, then no name is returned, and rChar is unchanged. If you
//want to convert a string, you don't want to use this.
- virtual String ConvertChar(sal_Unicode &rChar) = 0;
+ virtual OUString ConvertChar(sal_Unicode &rChar) = 0;
//Starts converting the string at position rIndex. It converts as much of
//the string that can be converted to the same symbol font and returns the
@@ -57,7 +58,7 @@ public:
//rString.Len() and handle each section as separate 8bit strings using
//separate fonts. Will return an empty string for a continous section
//that has no possible mapping.
- virtual String ConvertString(String &rString, xub_StrLen &rIndex) = 0;
+ virtual OUString ConvertString(OUString &rString, sal_Int32 &rIndex) = 0;
virtual ~StarSymbolToMSMultiFont() {}
};
diff --git a/include/unotools/fontdefs.hxx b/include/unotools/fontdefs.hxx
index e57abd491057..1e88372a1548 100644
--- a/include/unotools/fontdefs.hxx
+++ b/include/unotools/fontdefs.hxx
@@ -21,7 +21,7 @@
#include <unotools/unotoolsdllapi.h>
#include <sal/types.h>
-#include <tools/string.hxx>
+#include <tools/solar.h>
#include <rtl/ustring.hxx>
#include <rtl/ustrbuf.hxx>
@@ -43,7 +43,7 @@ UNOTOOLS_DLLPUBLIC OUString GetSubsFontName( const OUString& rName, sal_uLong nF
UNOTOOLS_DLLPUBLIC void AddTokenFontName( OUString& rName, const OUString& rNewToken );
-struct UNOTOOLS_DLLPUBLIC FontNameHash { int operator()(const String&) const; };
+struct UNOTOOLS_DLLPUBLIC FontNameHash { int operator()(const OUString&) const; };
// ---------------
// - ConvertChar -
@@ -57,7 +57,7 @@ public:
sal_Unicode (*mpCvtFunc)( sal_Unicode );
sal_Unicode RecodeChar( sal_Unicode c ) const;
void RecodeString( OUString& rStra, sal_Int32 nIndex, sal_Int32 nLen ) const;
- static const ConvertChar* GetRecodeData( const String& rOrgFontName, const String& rMapFontName );
+ static const ConvertChar* GetRecodeData( const OUString& rOrgFontName, const OUString& rMapFontName );
};
diff --git a/include/unotools/pathoptions.hxx b/include/unotools/pathoptions.hxx
index 8b5f9da48733..426524dbff8e 100644
--- a/include/unotools/pathoptions.hxx
+++ b/include/unotools/pathoptions.hxx
@@ -68,61 +68,61 @@ public:
virtual ~SvtPathOptions();
// get the paths, not const because of using a mutex
- const String& GetAddinPath() const;
- const String& GetAutoCorrectPath() const;
- const String& GetAutoTextPath() const;
- const String& GetBackupPath() const;
- const String& GetBasicPath() const;
- const String& GetBitmapPath() const;
- const String& GetConfigPath() const;
- const String& GetDictionaryPath() const;
- const String& GetFavoritesPath() const;
- const String& GetFilterPath() const;
- const String& GetGalleryPath() const;
- const String& GetGraphicPath() const;
- const String& GetHelpPath() const;
- const String& GetLinguisticPath() const;
- const String& GetModulePath() const;
- const String& GetPalettePath() const;
- const String& GetPluginPath() const;
- const String& GetStoragePath() const;
- const String& GetTempPath() const;
- const String& GetTemplatePath() const;
- const String& GetUserConfigPath() const;
- const String& GetWorkPath() const;
- const String& GetUIConfigPath() const;
- const String& GetFingerprintPath() const;
+ const OUString& GetAddinPath() const;
+ const OUString& GetAutoCorrectPath() const;
+ const OUString& GetAutoTextPath() const;
+ const OUString& GetBackupPath() const;
+ const OUString& GetBasicPath() const;
+ const OUString& GetBitmapPath() const;
+ const OUString& GetConfigPath() const;
+ const OUString& GetDictionaryPath() const;
+ const OUString& GetFavoritesPath() const;
+ const OUString& GetFilterPath() const;
+ const OUString& GetGalleryPath() const;
+ const OUString& GetGraphicPath() const;
+ const OUString& GetHelpPath() const;
+ const OUString& GetLinguisticPath() const;
+ const OUString& GetModulePath() const;
+ const OUString& GetPalettePath() const;
+ const OUString& GetPluginPath() const;
+ const OUString& GetStoragePath() const;
+ const OUString& GetTempPath() const;
+ const OUString& GetTemplatePath() const;
+ const OUString& GetUserConfigPath() const;
+ const OUString& GetWorkPath() const;
+ const OUString& GetUIConfigPath() const;
+ const OUString& GetFingerprintPath() const;
// set the paths
- void SetAddinPath( const String& rPath );
- void SetAutoCorrectPath( const String& rPath );
- void SetAutoTextPath( const String& rPath );
- void SetBackupPath( const String& rPath );
- void SetBasicPath( const String& rPath );
- void SetBitmapPath( const String& rPath );
- void SetConfigPath( const String& rPath );
- void SetDictionaryPath( const String& rPath );
- void SetFavoritesPath( const String& rPath );
- void SetFilterPath( const String& rPath );
- void SetGalleryPath( const String& rPath );
- void SetGraphicPath( const String& rPath );
- void SetHelpPath( const String& rPath );
- void SetLinguisticPath( const String& rPath );
- void SetModulePath( const String& rPath );
- void SetPalettePath( const String& rPath );
- void SetPluginPath( const String& rPath );
- void SetStoragePath( const String& rPath );
- void SetTempPath( const String& rPath );
- void SetTemplatePath( const String& rPath );
- void SetUserConfigPath( const String& rPath );
- void SetWorkPath( const String& rPath );
+ void SetAddinPath( const OUString& rPath );
+ void SetAutoCorrectPath( const OUString& rPath );
+ void SetAutoTextPath( const OUString& rPath );
+ void SetBackupPath( const OUString& rPath );
+ void SetBasicPath( const OUString& rPath );
+ void SetBitmapPath( const OUString& rPath );
+ void SetConfigPath( const OUString& rPath );
+ void SetDictionaryPath( const OUString& rPath );
+ void SetFavoritesPath( const OUString& rPath );
+ void SetFilterPath( const OUString& rPath );
+ void SetGalleryPath( const OUString& rPath );
+ void SetGraphicPath( const OUString& rPath );
+ void SetHelpPath( const OUString& rPath );
+ void SetLinguisticPath( const OUString& rPath );
+ void SetModulePath( const OUString& rPath );
+ void SetPalettePath( const OUString& rPath );
+ void SetPluginPath( const OUString& rPath );
+ void SetStoragePath( const OUString& rPath );
+ void SetTempPath( const OUString& rPath );
+ void SetTemplatePath( const OUString& rPath );
+ void SetUserConfigPath( const OUString& rPath );
+ void SetWorkPath( const OUString& rPath );
OUString SubstituteVariable( const OUString& rVar ) const;
OUString ExpandMacros( const OUString& rPath ) const;
OUString UseVariable( const OUString& rVar ) const;
- sal_Bool SearchFile( String& rIniFile, Paths ePath = PATH_USERCONFIG );
+ bool SearchFile( OUString& rIniFile, Paths ePath = PATH_USERCONFIG );
const LanguageTag& GetLanguageTag() const;
- sal_Bool IsReadonly() const;
+ bool IsReadonly() const;
};
#endif // #ifndef INCLUDED_unotools_PATHOPTIONS_HXX
diff --git a/include/unotools/syslocaleoptions.hxx b/include/unotools/syslocaleoptions.hxx
index 8c9378938ce0..9bf0578ee10f 100644
--- a/include/unotools/syslocaleoptions.hxx
+++ b/include/unotools/syslocaleoptions.hxx
@@ -27,7 +27,6 @@
#include <tools/link.hxx>
#include <i18nlangtag/lang.h>
#include <i18nlangtag/languagetag.hxx>
-#include <tools/string.hxx>
#include <unotools/options.hxx>
// bits for broadcasting hints of changes in a SfxSimpleHint, may be combined
@@ -64,7 +63,7 @@ public:
// ConfigItem methods
- sal_Bool IsModified();
+ bool IsModified();
void Commit();
/** Add a listener to react on config changes
@@ -88,16 +87,16 @@ public:
@ATTENTION
All SvtSysLocaleOptions instances point to exactly one refcounted
internal representation instance and broadcast blocks are counted.
- Thus if you issue a BlockBroadcasts(sal_True) you MUST issue a matching
- BlockBroadcasts(sal_False) or otherwise pending hints would never be
+ Thus if you issue a BlockBroadcasts(true) you MUST issue a matching
+ BlockBroadcasts(false) or otherwise pending hints would never be
broadcasted again.
*/
- virtual void BlockBroadcasts( bool bBlock );
+ virtual void BlockBroadcasts( bool bBlock );
// config value access methods
/// The config string may be empty to denote the SYSTEM locale
- const OUString& GetLocaleConfigString() const;
+ const OUString& GetLocaleConfigString() const;
void SetLocaleConfigString( const OUString& rStr );
/** Get locale set, if empty denotes SYSTEM locale, not resolved
to the real locale. */
@@ -111,39 +110,39 @@ public:
const LanguageTag& GetRealUILanguageTag() const;
/// The config string may be empty to denote the default currency of the locale
- const OUString& GetCurrencyConfigString() const;
+ const OUString& GetCurrencyConfigString() const;
void SetCurrencyConfigString( const OUString& rStr );
/** The config string may be empty to denote the default
DateAcceptancePatterns of the locale */
- const OUString& GetDatePatternsConfigString() const;
+ const OUString& GetDatePatternsConfigString() const;
void SetDatePatternsConfigString( const OUString& rStr );
// determine whether the decimal separator defined in the keyboard layout is used
// or the one approriate to the locale
- sal_Bool IsDecimalSeparatorAsLocale() const;
- void SetDecimalSeparatorAsLocale( sal_Bool bSet);
+ bool IsDecimalSeparatorAsLocale() const;
+ void SetDecimalSeparatorAsLocale( bool bSet);
// determine whether to ignore changes to the system keyboard/locale/language when
// determining the language for newly entered text
- sal_Bool IsIgnoreLanguageChange() const;
- void SetIgnoreLanguageChange( sal_Bool bSet);
+ bool IsIgnoreLanguageChange() const;
+ void SetIgnoreLanguageChange( bool bSet);
// convenience methods
/// Get currency abbreviation and locale from an USD-en-US or EUR-de-DE string
static void GetCurrencyAbbrevAndLanguage(
- String& rAbbrev,
+ OUString& rAbbrev,
LanguageType& eLang,
const OUString& rConfigString );
/// Create an USD-en-US or EUR-de-DE string
- static OUString CreateCurrencyConfigString(
- const String& rAbbrev,
+ static OUString CreateCurrencyConfigString(
+ const OUString& rAbbrev,
LanguageType eLang );
void GetCurrencyAbbrevAndLanguage(
- String& rAbbrev,
+ OUString& rAbbrev,
LanguageType& eLang ) const
{
GetCurrencyAbbrevAndLanguage( rAbbrev,
@@ -151,7 +150,7 @@ public:
}
void SetCurrencyAbbrevAndLanguage(
- const String& rAbbrev,
+ const OUString& rAbbrev,
LanguageType eLang )
{
SetCurrencyConfigString(
@@ -169,7 +168,7 @@ public:
static const Link& GetCurrencyChangeLink();
/** return the readonly state of the queried option. */
- sal_Bool IsReadOnly( EOption eOption ) const;
+ bool IsReadOnly( EOption eOption ) const;
};
#endif // INCLUDED_SVTOOLS_SYSLOCALEOPTIONS_HXX
diff --git a/include/unotools/tempfile.hxx b/include/unotools/tempfile.hxx
index 6cf2cb0cd98c..da3a472e8f60 100644
--- a/include/unotools/tempfile.hxx
+++ b/include/unotools/tempfile.hxx
@@ -48,7 +48,7 @@ struct TempFile_Impl;
class UNOTOOLS_DLLPUBLIC TempFile
{
TempFile_Impl* pImp;
- sal_Bool bKillingFileEnabled;
+ bool bKillingFileEnabled;
protected:
@@ -59,15 +59,15 @@ public:
The temporary object is created in the local file system, even if there is no UCB that can access it.
If the given folder is part of the local file system, the TempFile is created in this folder.
*/
- TempFile( const String* pParent=NULL, sal_Bool bDirectory=sal_False );
+ TempFile( const OUString* pParent=NULL, bool bDirectory=false );
/**
Same as above; additionally the name starts with some given characters followed by a counter ( example:
rLeadingChars="abc" means "abc0","abc1" and so on, depending on existing files in the folder ).
The extension string may be f.e. ".txt" or "", if no extension string is given, ".tmp" is used
*/
- TempFile( const String& rLeadingChars, const String* pExtension=NULL, const String* pParent=NULL,
- sal_Bool bDirectory=sal_False);
+ TempFile( const OUString& rLeadingChars, const OUString* pExtension=NULL, const OUString* pParent=NULL,
+ bool bDirectory=false);
/**
Same as above; additionally the name starts with some given characters followed by a counter ( example:
@@ -75,7 +75,7 @@ public:
The extension string may be f.e. ".txt" or "", if no extension string is given, ".tmp" is used
@param _bStartWithZero If set to false names will be generated like "abc","abc0","abc1"
*/
- TempFile( const String& rLeadingChars,sal_Bool _bStartWithZero, const String* pExtension=NULL, const String* pParent=NULL,sal_Bool bDirectory=sal_False);
+ TempFile( const OUString& rLeadingChars, bool _bStartWithZero, const OUString* pExtension=NULL, const OUString* pParent=NULL, bool bDirectory=false);
/**
TempFile will be removed from disk in dtor if EnableKillingTempFile was called before.
@@ -86,7 +86,7 @@ public:
/**
Returns sal_True if it has a valid file name.
*/
- sal_Bool IsValid() const;
+ bool IsValid() const;
/**
Returns the "UCB compatible" URL of the tempfile object.
@@ -96,7 +96,7 @@ public:
If no UCP is available for the local file system, an empty URL is returned. In this case you can't access
the file as a UCB content !
*/
- String GetURL() const;
+ OUString GetURL() const;
/**
Returns the "physical" name of the tempfile in host notation ( should only be used for 3rd party code
@@ -104,7 +104,7 @@ public:
If you want to have the URL, use the GetURL() method of this object, but never use any external
conversion functions for "physical" names into URLs.
*/
- String GetFileName() const;
+ OUString GetFileName() const;
/**
Returns a stream to the tempfiles data; the stream is owned by the tempfile object, so you have to keep this
@@ -121,10 +121,10 @@ public:
/**
If enabled the file will be removed from disk when the dtor is called ( default is not enabled )
*/
- void EnableKillingFile( sal_Bool bEnable=sal_True )
+ void EnableKillingFile( bool bEnable=true )
{ bKillingFileEnabled = bEnable; }
- sal_Bool IsKillingFileEnabled() const
+ bool IsKillingFileEnabled() const
{ return bKillingFileEnabled; }
/**
@@ -133,7 +133,7 @@ public:
If you want to convert file name into a URL, always use class LocalFileHelper, but never use any
conversion functions of osl.
*/
- static String CreateTempName( const String* pParent=NULL );
+ static OUString CreateTempName( const OUString* pParent=NULL );
/**
The TempNameBaseDirectory is a subfolder in the folder that is passed as a "physical" file name in the
@@ -144,7 +144,7 @@ public:
The return value of both methods is the complete "physical" name of the tempname base folder.
It is not a URL because alle URLs must be "UCB compatible", so there may be no suitable URL at all.
*/
- static String SetTempNameBaseDirectory( const String &rBaseName );
+ static OUString SetTempNameBaseDirectory( const OUString &rBaseName );
};
}
diff --git a/include/unotools/textsearch.hxx b/include/unotools/textsearch.hxx
index 0b826102cb91..0880c13ff3f4 100644
--- a/include/unotools/textsearch.hxx
+++ b/include/unotools/textsearch.hxx
@@ -22,7 +22,6 @@
#define _UNOTOOLS_TEXTSEARCH_HXX
#include <i18nlangtag/lang.h>
#include <rtl/ustring.hxx>
-#include <tools/string.hxx>
#include <com/sun/star/uno/Reference.h>
#include <com/sun/star/lang/Locale.hpp>
#include <com/sun/star/util/XTextSearch.hpp>
@@ -52,8 +51,8 @@ public:
enum SearchType{ SRCH_NORMAL, SRCH_REGEXP, SRCH_LEVDIST };
private:
- String sSrchStr; // the search string
- String sReplaceStr; // the replace string
+ OUString sSrchStr; // the search string
+ OUString sReplaceStr; // the replace string
SearchType m_eSrchType; // search normal/regular/LevDist
@@ -73,16 +72,16 @@ private:
public:
SearchParam( const OUString &rText,
SearchType eSrchType = SearchParam::SRCH_NORMAL,
- sal_Bool bCaseSensitive = sal_True,
- sal_Bool bWordOnly = sal_False,
- sal_Bool bSearchInSelection = sal_False );
+ bool bCaseSensitive = true,
+ bool bWordOnly = false,
+ bool bSearchInSelection = false );
SearchParam( const SearchParam& );
~SearchParam();
- const String& GetSrchStr() const { return sSrchStr; }
- const String& GetReplaceStr() const { return sReplaceStr; }
+ const OUString& GetSrchStr() const { return sSrchStr; }
+ const OUString& GetReplaceStr() const { return sReplaceStr; }
SearchType GetSrchType() const { return m_eSrchType; }
int IsCaseSensitive() const { return m_bCaseSense; }
@@ -90,8 +89,8 @@ public:
int IsSrchWordOnly() const { return m_bWordOnly; }
- void SetSrchStr( const String& rStr ) { sSrchStr = rStr; }
- void SetReplaceStr( const String& rStr ) { sReplaceStr = rStr; }
+ void SetSrchStr( const OUString& rStr ) { sSrchStr = rStr; }
+ void SetReplaceStr( const OUString& rStr ) { sReplaceStr = rStr; }
void SetSrchType( SearchType eType ) { m_eSrchType = eType; }
void SetCaseSensitive( int bFlag ) { m_bCaseSense = bFlag; }
@@ -145,35 +144,32 @@ public:
pStart - start position for the search
pEnde - end position for the search
- RETURN values == sal_True: something is found
+ RETURN values == 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.
- == sal_False: nothing found, pStart,pEnde unchanged.
+ == false: nothing found, pStart,pEnde unchanged.
Definitions: start pos always inclusive, end pos always exclusive!
The position must always in the right direction!
search forward: start <= end
search backward: end <= start
*/
- int SearchFrwrd( const String &rStr,
- xub_StrLen* pStart, xub_StrLen* pEnde,
- ::com::sun::star::util::SearchResult* pSrchResult = 0 );
- sal_Bool SearchForward( const OUString &rStr,
- sal_Int32* pStart, sal_Int32* pEnd,
- ::com::sun::star::util::SearchResult* pRes = 0 );
- int SearchBkwrd( const String &rStr,
- xub_StrLen* pStart, xub_StrLen* pEnde,
- ::com::sun::star::util::SearchResult* pSrchResult = 0 );
+ bool SearchForward( const OUString &rStr,
+ sal_Int32* pStart, sal_Int32* pEnd,
+ ::com::sun::star::util::SearchResult* pRes = 0 );
+ bool SearchBackward( const OUString &rStr,
+ sal_Int32* pStart, sal_Int32* pEnd,
+ ::com::sun::star::util::SearchResult* pRes = 0 );
void SetLocale( const ::com::sun::star::util::SearchOptions& rOpt,
const ::com::sun::star::lang::Locale& rLocale );
/* replace back references in the replace string by the sub expressions from the search result */
- void ReplaceBackReferences( String& rReplaceStr, const String &rStr, const ::com::sun::star::util::SearchResult& rResult );
+ void ReplaceBackReferences( OUString& rReplaceStr, const OUString &rStr, const ::com::sun::star::util::SearchResult& rResult );
};
diff --git a/include/unotools/transliterationwrapper.hxx b/include/unotools/transliterationwrapper.hxx
index 6d64d40a92f1..fbc845b218be 100644
--- a/include/unotools/transliterationwrapper.hxx
+++ b/include/unotools/transliterationwrapper.hxx
@@ -20,7 +20,7 @@
#ifndef _UNOTOOLS_TRANSLITERATIONWRAPPER_HXX
#define _UNOTOOLS_TRANSLITERATIONWRAPPER_HXX
-#include <tools/string.hxx>
+#include <rtl/ustring.hxx>
#include <tools/solar.h>
#include <i18nlangtag/languagetag.hxx>
#include <com/sun/star/i18n/XExtendedTransliteration.hpp>
@@ -40,7 +40,7 @@ class UNOTOOLS_DLLPUBLIC TransliterationWrapper
::com::sun::star::i18n::XExtendedTransliteration > xTrans;
LanguageTag aLanguageTag;
sal_uInt32 nType;
- mutable sal_Bool bFirstCall;
+ mutable bool bFirstCall;
// not implemented, prevent usage
TransliterationWrapper( const TransliterationWrapper& );
@@ -62,7 +62,7 @@ public:
sal_uInt32 getType() const { return nType; }
- sal_Bool needLanguageForTheMode() const;
+ bool needLanguageForTheMode() const;
/** set a new language and load the corresponding transliteration module if
needed for the mode set with nType in the ctor */
@@ -80,19 +80,19 @@ public:
those may load a different module and overwrite this setting. Only the
transliterate() method that takes no LanguageType parameter may be used
for a specific module loaded with this method. */
- void loadModuleByImplName( const String& rModuleName, sal_uInt16 nLang );
+ void loadModuleByImplName( const OUString& rModuleName, sal_uInt16 nLang );
/** This transliteration method corresponds with the loadModuleByImplName()
method. It relies on a module being loaded and does not try load one.
If for any reason the string can't be transliterated the original
string is returned. */
- String transliterate( const String& rStr,
- xub_StrLen nStart, xub_StrLen nLen,
+ OUString transliterate( const OUString& rStr,
+ sal_Int32 nStart, sal_Int32 nLen,
::com::sun::star::uno::Sequence <sal_Int32>* pOffset ) const;
// Wrapper implementations of class Transliteration
- String transliterate( const String& rStr, sal_uInt16 nLanguage,
- xub_StrLen nStart, xub_StrLen nLen,
+ OUString transliterate( const OUString& rStr, sal_uInt16 nLanguage,
+ sal_Int32 nStart, sal_Int32 nLen,
::com::sun::star::uno::Sequence <sal_Int32>* pOffset );
/** If two strings are equal per this transliteration.
@@ -103,11 +103,11 @@ public:
equals( "aab", 0, 3, nMatch1, "aaa", 0, 3, nMatch2 )
returns false and nMatch:=2 and nMatch2:=2
*/
- sal_Bool equals(
- const String& rStr1, sal_Int32 nPos1, sal_Int32 nCount1, sal_Int32& nMatch1,
- const String& rStr2, sal_Int32 nPos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) const;
+ bool equals(
+ const OUString& rStr1, sal_Int32 nPos1, sal_Int32 nCount1, sal_Int32& nMatch1,
+ const OUString& rStr2, sal_Int32 nPos2, sal_Int32 nCount2, sal_Int32& nMatch2 ) const;
- sal_Int32 compareString( const String& rStr1, const String& rStr2 ) const;
+ sal_Int32 compareString( const OUString& rStr1, const OUString& rStr2 ) const;
// helpers
@@ -116,11 +116,11 @@ public:
one string is matching the start of the other. Use this method instead
of compareString()==0 because it is much faster.
*/
- sal_Bool isEqual( const String& rStr1, const String& rStr2 ) const;
+ bool isEqual( const OUString& rStr1, const OUString& rStr2 ) const;
/** If string rStr1 matches the start of string rStr2, i.e. "a" in "aaa"
*/
- sal_Bool isMatch( const String& rStr1, const String& rStr2 ) const;
+ bool isMatch( const OUString& rStr1, const OUString& rStr2 ) const;
};
diff --git a/include/unotools/ucblockbytes.hxx b/include/unotools/ucblockbytes.hxx
index acd79928e3a8..6df93af9e7b9 100644
--- a/include/unotools/ucblockbytes.hxx
+++ b/include/unotools/ucblockbytes.hxx
@@ -28,11 +28,11 @@
#include <osl/thread.hxx>
#include <osl/conditn.hxx>
#include <osl/mutex.hxx>
+#include <rtl/ustring.hxx>
#include <tools/stream.hxx>
#include <tools/link.hxx>
#include <tools/errcode.hxx>
#include <tools/datetime.hxx>
-#include <tools/string.hxx>
namespace com
{
@@ -69,7 +69,7 @@ SV_DECL_REF( UcbLockBytes )
class UcbLockBytesHandler : public SvRefBase
{
- sal_Bool m_bActive;
+ bool m_bActive;
public:
enum LoadHandlerItem
{
@@ -83,8 +83,8 @@ public:
{}
virtual void Handle( LoadHandlerItem nWhich, UcbLockBytesRef xLockBytes ) = 0;
- void Activate( sal_Bool bActivate = sal_True ) { m_bActive = bActivate; }
- sal_Bool IsActive() const { return m_bActive; }
+ void Activate( bool bActivate = true ) { m_bActive = bActivate; }
+ bool IsActive() const { return m_bActive; }
};
SV_DECL_IMPL_REF( UcbLockBytesHandler )
@@ -95,8 +95,8 @@ class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
osl::Condition m_aTerminated;
osl::Mutex m_aMutex;
- String m_aContentType;
- String m_aRealURL;
+ OUString m_aContentType;
+ OUString m_aRealURL;
DateTime m_aExpireDate;
::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > m_xInputStream;
@@ -109,9 +109,9 @@ class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
sal_uInt32 m_nSize;
ErrCode m_nError;
- sal_Bool m_bTerminated : 1;
- sal_Bool m_bDontClose : 1;
- sal_Bool m_bStreamValid : 1;
+ bool m_bTerminated;
+ bool m_bDontClose;
+ bool m_bStreamValid;
DECL_LINK( DataAvailHdl, void * );
@@ -145,16 +145,16 @@ public:
{ return m_nError; }
// the following properties are available when and after the first DataAvailable callback has been executed
- String GetContentType() const;
- String GetRealURL() const;
+ OUString GetContentType() const;
+ OUString GetRealURL() const;
DateTime GetExpireDate() const;
// calling this method delegates the responsibility to call closeinput to the caller!
::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > getInputStream();
- sal_Bool setInputStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > &rxInputStream,
- sal_Bool bSetXSeekable = sal_True );
- sal_Bool setStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > &rxStream );
+ bool setInputStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > &rxInputStream,
+ bool bSetXSeekable = true );
+ bool setStream_Impl( const ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > &rxStream );
void terminate_Impl (void);
::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > getInputStream_Impl() const
@@ -175,7 +175,7 @@ public:
return m_xSeekable;
}
- sal_Bool hasInputStream_Impl() const
+ bool hasInputStream_Impl() const
{
osl::MutexGuard aGuard( (const_cast< UcbLockBytes* >(this))->m_aMutex );
return m_xInputStream.is();
@@ -184,8 +184,8 @@ public:
void setDontClose_Impl()
{ m_bDontClose = sal_True; }
- void SetContentType_Impl( const String& rType ) { m_aContentType = rType; }
- void SetRealURL_Impl( const String& rURL ) { m_aRealURL = rURL; }
+ void SetContentType_Impl( const OUString& rType ) { m_aContentType = rType; }
+ void SetRealURL_Impl( const OUString& rURL ) { m_aRealURL = rURL; }
void SetExpireDate_Impl( const DateTime& rDateTime ) { m_aExpireDate = rDateTime; }
void SetStreamValid_Impl();
};
diff --git a/include/unotools/ucbstreamhelper.hxx b/include/unotools/ucbstreamhelper.hxx
index 85de1f36c741..44552d652cd1 100644
--- a/include/unotools/ucbstreamhelper.hxx
+++ b/include/unotools/ucbstreamhelper.hxx
@@ -53,13 +53,13 @@ namespace utl
class UNOTOOLS_DLLPUBLIC UcbStreamHelper : public SvStream
{
public:
- static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
- UcbLockBytesHandler* pHandler=0 );
- static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
- ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler >,
- UcbLockBytesHandler* pHandler=0 );
- static SvStream* CreateStream( const String& rFileName, StreamMode eOpenMode,
- sal_Bool bFileExists,
+ static SvStream* CreateStream( const OUString& rFileName, StreamMode eOpenMode,
+ UcbLockBytesHandler* pHandler=0 );
+ static SvStream* CreateStream( const OUString& rFileName, StreamMode eOpenMode,
+ ::com::sun::star::uno::Reference < ::com::sun::star::task::XInteractionHandler >,
+ UcbLockBytesHandler* pHandler=0 );
+ static SvStream* CreateStream( const OUString& rFileName, StreamMode eOpenMode,
+ bool bFileExists,
UcbLockBytesHandler* pHandler=0 );
static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XInputStream > xStream );
static SvStream* CreateStream( ::com::sun::star::uno::Reference < ::com::sun::star::io::XStream > xStream );