summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-03-31 09:05:32 +0200
committerNoel Grandin <noel@peralex.com>2014-03-31 12:39:02 +0200
commit0e8ab0fa298ad5c801aa94fb3e3fd2daa93d634c (patch)
treeb5cc18a766a3377df1210adb8bbb7db7aff4ef8c
parent6ac6fb820f9e12649507cb5233c3b1727d67f2fd (diff)
xmloff: sal_Bool->bool
Change-Id: Ib4a73215187923dccd72fc7793ffd4bcbef24ab9
-rw-r--r--include/xmloff/xmlimp.hxx18
-rw-r--r--include/xmloff/xmlimppr.hxx8
-rw-r--r--include/xmloff/xmlnume.hxx12
-rw-r--r--include/xmloff/xmlnumfe.hxx36
-rw-r--r--include/xmloff/xmlnumfi.hxx40
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx2
-rw-r--r--xmloff/source/chart/PropertyMaps.cxx2
-rw-r--r--xmloff/source/chart/XMLSymbolImageContext.cxx2
-rw-r--r--xmloff/source/core/xmlexp.cxx4
-rw-r--r--xmloff/source/core/xmlimp.cxx36
-rw-r--r--xmloff/source/draw/ximpshap.cxx2
-rw-r--r--xmloff/source/forms/elementimport.cxx2
-rw-r--r--xmloff/source/forms/layerexport.cxx2
-rw-r--r--xmloff/source/style/ImageStyle.cxx2
-rw-r--r--xmloff/source/style/XMLBackgroundImageContext.cxx2
-rw-r--r--xmloff/source/style/xmlimppr.cxx22
-rw-r--r--xmloff/source/style/xmlnume.cxx22
-rw-r--r--xmloff/source/style/xmlnumfe.cxx228
-rw-r--r--xmloff/source/style/xmlnumfi.cxx204
-rw-r--r--xmloff/source/style/xmlnumi.cxx3
-rw-r--r--xmloff/source/text/XMLTextListAutoStylePool.cxx2
21 files changed, 325 insertions, 326 deletions
diff --git a/include/xmloff/xmlimp.hxx b/include/xmloff/xmlimp.hxx
index 4368b5df15eb..d4a748047b00 100644
--- a/include/xmloff/xmlimp.hxx
+++ b/include/xmloff/xmlimp.hxx
@@ -146,7 +146,7 @@ class XMLOFF_DLLPUBLIC SvXMLImport : public ::cppu::WeakImplHelper6<
protected:
::com::sun::star::uno::Reference< com::sun::star::task::XStatusIndicator > mxStatusIndicator;
- sal_Bool mbIsFormsSupported;
+ bool mbIsFormsSupported;
bool mbIsTableShapeSupported;
bool mbIsGraphicLoadOnDemandSupported;
@@ -159,7 +159,7 @@ protected:
virtual XMLTextImportHelper* CreateTextImport();
inline void ClearTextImport() { mxTextImport = 0; }
virtual XMLShapeImportHelper* CreateShapeImport();
- inline sal_Bool HasShapeImport() const { return mxShapeImport.is(); }
+ inline bool HasShapeImport() const { return mxShapeImport.is(); }
inline void ClearShapeImport() { mxShapeImport = 0; }
virtual SchXMLImportHelper* CreateChartImport();
@@ -170,7 +170,7 @@ protected:
void SetAutoStyles( SvXMLStylesContext *pAutoStyles );
void SetMasterStyles( SvXMLStylesContext *pMasterStyles );
- sal_Bool IsODFVersionConsistent( const OUString& aODFVersion );
+ bool IsODFVersionConsistent( const OUString& aODFVersion );
const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEmbeddedObjectResolver >& GetEmbeddedResolver() const { return mxEmbeddedResolver; }
inline void SetEmbeddedResolver( com::sun::star::uno::Reference< com::sun::star::document::XEmbeddedObjectResolver >& _xEmbeddedResolver );
@@ -257,7 +257,7 @@ public:
// get import helper for text
inline UniReference< XMLTextImportHelper > GetTextImport();
- sal_Bool HasTextImport() const { return mxTextImport.is(); }
+ bool HasTextImport() const { return mxTextImport.is(); }
inline SvXMLNumFmtHelper* GetDataStylesImport();
// get import helper for shapes
@@ -297,13 +297,13 @@ public:
// Convert a local packe URL into either a graphic manager or a
// internal package URL. The later one happens only if bLoadURL is true
- OUString ResolveGraphicObjectURL( const OUString& rURL, sal_Bool bLoadOnDemand );
+ OUString ResolveGraphicObjectURL( const OUString& rURL, bool bLoadOnDemand );
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
GetStreamForGraphicObjectURLFromBase64();
OUString ResolveGraphicObjectURLFromBase64(
const ::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >& rOut );
- sal_Bool IsPackageURL( const OUString& rURL ) const;
+ bool IsPackageURL( const OUString& rURL ) const;
OUString ResolveEmbeddedObjectURL( const OUString& rURL,
const OUString& rClassId );
::com::sun::star::uno::Reference< ::com::sun::star::io::XOutputStream >
@@ -337,7 +337,7 @@ public:
const SvXMLStylesContext *GetAutoStyles() const;
sal_uInt16 getImportFlags() const { return mnImportFlags; }
- sal_Bool IsFormsSupported() const { return mbIsFormsSupported; }
+ bool IsFormsSupported() const { return mbIsFormsSupported; }
OUString GetAbsoluteReference(const OUString& rValue) const;
sal_Unicode ConvStarBatsCharToStarSymbol( sal_Unicode c );
@@ -384,9 +384,9 @@ public:
GetComponentContext() const;
// Convert drawing object positions from OOo file format to OASIS file format and vice versa (#i28749#)
- sal_Bool IsShapePositionInHoriL2R() const;
+ bool IsShapePositionInHoriL2R() const;
- sal_Bool IsTextDocInOOoFileFormat() const;
+ bool IsTextDocInOOoFileFormat() const;
OUString GetBaseURL() const;
OUString GetDocumentBase() const;
diff --git a/include/xmloff/xmlimppr.hxx b/include/xmloff/xmlimppr.hxx
index 8a932816ff6a..bf493b201209 100644
--- a/include/xmloff/xmlimppr.hxx
+++ b/include/xmloff/xmlimppr.hxx
@@ -110,7 +110,7 @@ public:
::com::sun::star::beans::XPropertySet > rPropSet,
_ContextID_Index_Pair* pSpecialContextIds ) const;
- sal_Bool FillPropertySet(
+ bool FillPropertySet(
const ::std::vector< XMLPropertyState >& aProperties,
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet > rPropSet,
@@ -128,7 +128,7 @@ public:
/** implementation helper for FillPropertySet: fill an XPropertySet.
* Exceptions will be asserted. */
- static sal_Bool _FillPropertySet(
+ static bool _FillPropertySet(
const ::std::vector<XMLPropertyState> & rProperties,
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XPropertySet> & rPropSet,
@@ -143,7 +143,7 @@ public:
/** implementation helper for FillPropertySet: fill an XMultiPropertySet.
* If unsuccessul, set return value. */
- static sal_Bool _FillMultiPropertySet(
+ static bool _FillMultiPropertySet(
const ::std::vector<XMLPropertyState> & rProperties,
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XMultiPropertySet> & rMultiPropSet,
@@ -157,7 +157,7 @@ public:
/** implementation helper for FillPropertySet: fill an XTolerantMultiPropertySet.
* If unsuccessul, set return value. */
- static sal_Bool _FillTolerantMultiPropertySet(
+ static bool _FillTolerantMultiPropertySet(
const ::std::vector<XMLPropertyState> & rProperties,
const ::com::sun::star::uno::Reference<
::com::sun::star::beans::XTolerantMultiPropertySet> & rTolPropSet,
diff --git a/include/xmloff/xmlnume.hxx b/include/xmloff/xmlnume.hxx
index 31e858c83704..f98c7b92f11a 100644
--- a/include/xmloff/xmlnume.hxx
+++ b/include/xmloff/xmlnume.hxx
@@ -54,13 +54,13 @@ class SvxXMLNumRuleExport
void exportLevelStyles(
const ::com::sun::star::uno::Reference<
::com::sun::star::container::XIndexReplace > & xNumRule,
- sal_Bool bOutline=sal_False );
+ bool bOutline=false );
void exportLevelStyle(
sal_Int32 nLevel,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::PropertyValue>& rProps,
- sal_Bool bOutline=sal_False );
+ bool bOutline=false );
protected:
@@ -68,7 +68,7 @@ protected:
// element.
virtual void AddListStyleAttributes();
- sal_Bool exportStyle( const ::com::sun::star::uno::Reference<
+ bool exportStyle( const ::com::sun::star::uno::Reference<
::com::sun::star::style::XStyle >& rStyle );
void exportOutline();
@@ -79,11 +79,11 @@ public:
SvxXMLNumRuleExport( SvXMLExport& rExport );
virtual ~SvxXMLNumRuleExport();
- void exportStyles( sal_Bool bUsed,
+ void exportStyles( bool bUsed,
XMLTextListAutoStylePool *pPool,
- sal_Bool bExportChapterNumbering = sal_True );
+ bool bExportChapterNumbering = true );
void exportNumberingRule(
- const OUString& rName, sal_Bool bIsHidden,
+ const OUString& rName, bool bIsHidden,
const ::com::sun::star::uno::Reference<
::com::sun::star::container::XIndexReplace > & xNumRule );
};
diff --git a/include/xmloff/xmlnumfe.hxx b/include/xmloff/xmlnumfe.hxx
index e047de32b623..86f43516dbc3 100644
--- a/include/xmloff/xmlnumfe.hxx
+++ b/include/xmloff/xmlnumfe.hxx
@@ -52,8 +52,8 @@ private:
LocaleDataWrapper* pLocaleData;
SAL_DLLPRIVATE void AddCalendarAttr_Impl( const OUString& rCalendar );
- SAL_DLLPRIVATE void AddStyleAttr_Impl( sal_Bool bLong );
- SAL_DLLPRIVATE void AddTextualAttr_Impl( sal_Bool bText );
+ SAL_DLLPRIVATE void AddStyleAttr_Impl( bool bLong );
+ SAL_DLLPRIVATE void AddTextualAttr_Impl( bool bText );
SAL_DLLPRIVATE void AddLanguageAttr_Impl( sal_Int32 nLang );
SAL_DLLPRIVATE void AddToTextElement_Impl( const OUString& rString );
@@ -61,36 +61,36 @@ private:
SAL_DLLPRIVATE void WriteColorElement_Impl( const Color& rColor );
SAL_DLLPRIVATE void WriteNumberElement_Impl( sal_Int32 nDecimals, sal_Int32 nInteger,
- const OUString& rDashStr, sal_Bool bVarDecimals,
- sal_Bool bGrouping, sal_Int32 nTrailingThousands,
+ const OUString& rDashStr, bool bVarDecimals,
+ bool bGrouping, sal_Int32 nTrailingThousands,
const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries );
SAL_DLLPRIVATE void WriteScientificElement_Impl( sal_Int32 nDecimals, sal_Int32 nInteger,
- sal_Bool bGrouping, sal_Int32 nExp );
- SAL_DLLPRIVATE void WriteFractionElement_Impl( sal_Int32 nInteger, sal_Bool bGrouping,
+ bool bGrouping, sal_Int32 nExp );
+ SAL_DLLPRIVATE void WriteFractionElement_Impl( sal_Int32 nInteger, bool bGrouping,
sal_Int32 nNumeratorDigits, sal_Int32 nDenominatorDigits, sal_Int32 nDenominator );
SAL_DLLPRIVATE void WriteCurrencyElement_Impl( const OUString& rString,
const OUString& rExt );
SAL_DLLPRIVATE void WriteBooleanElement_Impl();
SAL_DLLPRIVATE void WriteTextContentElement_Impl();
- SAL_DLLPRIVATE void WriteDayElement_Impl( const OUString& rCalendar, sal_Bool bLong );
- SAL_DLLPRIVATE void WriteMonthElement_Impl( const OUString& rCalendar, sal_Bool bLong, sal_Bool bText );
- SAL_DLLPRIVATE void WriteYearElement_Impl( const OUString& rCalendar, sal_Bool bLong );
- SAL_DLLPRIVATE void WriteEraElement_Impl( const OUString& rCalendar, sal_Bool bLong );
- SAL_DLLPRIVATE void WriteDayOfWeekElement_Impl( const OUString& rCalendar, sal_Bool bLong );
+ SAL_DLLPRIVATE void WriteDayElement_Impl( const OUString& rCalendar, bool bLong );
+ SAL_DLLPRIVATE void WriteMonthElement_Impl( const OUString& rCalendar, bool bLong, bool bText );
+ SAL_DLLPRIVATE void WriteYearElement_Impl( const OUString& rCalendar, bool bLong );
+ SAL_DLLPRIVATE void WriteEraElement_Impl( const OUString& rCalendar, bool bLong );
+ SAL_DLLPRIVATE void WriteDayOfWeekElement_Impl( const OUString& rCalendar, bool bLong );
SAL_DLLPRIVATE void WriteWeekElement_Impl( const OUString& rCalendar );
- SAL_DLLPRIVATE void WriteQuarterElement_Impl( const OUString& rCalendar, sal_Bool bLong );
- SAL_DLLPRIVATE void WriteHoursElement_Impl( sal_Bool bLong );
- SAL_DLLPRIVATE void WriteMinutesElement_Impl( sal_Bool bLong );
- SAL_DLLPRIVATE void WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDecimals );
+ SAL_DLLPRIVATE void WriteQuarterElement_Impl( const OUString& rCalendar, bool bLong );
+ SAL_DLLPRIVATE void WriteHoursElement_Impl( bool bLong );
+ SAL_DLLPRIVATE void WriteMinutesElement_Impl( bool bLong );
+ SAL_DLLPRIVATE void WriteSecondsElement_Impl( bool bLong, sal_uInt16 nDecimals );
SAL_DLLPRIVATE void WriteAMPMElement_Impl();
SAL_DLLPRIVATE void WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
sal_Int32 nKey, sal_Int32 nPart );
SAL_DLLPRIVATE void WriteRepeatedElement_Impl( sal_Unicode ch );
- SAL_DLLPRIVATE sal_Bool WriteTextWithCurrency_Impl( const OUString& rString,
+ SAL_DLLPRIVATE bool WriteTextWithCurrency_Impl( const OUString& rString,
const ::com::sun::star::lang::Locale& rLocale );
SAL_DLLPRIVATE void ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt32 nKey,
- sal_uInt16 nPart, sal_Bool bDefPart );
+ sal_uInt16 nPart, bool bDefPart );
SAL_DLLPRIVATE void ExportFormat_Impl( const SvNumberformat& rFormat, sal_uInt32 nKey );
@@ -106,7 +106,7 @@ public:
virtual ~SvXMLNumFmtExport();
// core API
- void Export( sal_Bool bIsAutoStyle);
+ void Export( bool bIsAutoStyle);
// mark number format as used
void SetUsed( sal_uInt32 nKey );
diff --git a/include/xmloff/xmlnumfi.hxx b/include/xmloff/xmlnumfi.hxx
index aabba99d17e4..201c4022cc28 100644
--- a/include/xmloff/xmlnumfi.hxx
+++ b/include/xmloff/xmlnumfi.hxx
@@ -108,7 +108,7 @@ public:
SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth,
SvXMLDateElementAttributes eYear, SvXMLDateElementAttributes eHours,
SvXMLDateElementAttributes eMins, SvXMLDateElementAttributes eSecs,
- sal_Bool bSystem );
+ bool bSystem );
};
struct MyCondition
@@ -129,20 +129,20 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
// OUString sMapName;
OUString sCalendar;
OUString sFormatString;
- LanguageType nFormatLang;
+ LanguageType nFormatLang;
com::sun::star::lang::Locale aLocale;
- sal_Bool bAutoOrder;
- sal_Bool bFromSystem;
- sal_Bool bTruncate;
- sal_Bool bAutoDec; // set in AddNumber
- sal_Bool bAutoInt; // set in AddNumber
- sal_Bool bHasExtraText;
+ bool bAutoOrder;
+ bool bFromSystem;
+ bool bTruncate;
+ bool bAutoDec; // set in AddNumber
+ bool bAutoInt; // set in AddNumber
+ bool bHasExtraText;
OUStringBuffer aFormatCode;
OUStringBuffer aConditions;
- sal_Bool bHasLongDoW;
- sal_Bool bHasEra;
- sal_Bool bHasDateTime;
- sal_Bool bRemoveAfterUse;
+ bool bHasLongDoW;
+ bool bHasEra;
+ bool bHasDateTime;
+ bool bRemoveAfterUse;
// contained date elements, used to recognize default date formats
SvXMLDateElementAttributes eDateDOW;
@@ -152,7 +152,7 @@ class XMLOFF_DLLPUBLIC SvXMLNumFormatContext : public SvXMLStyleContext
SvXMLDateElementAttributes eDateHours;
SvXMLDateElementAttributes eDateMins;
SvXMLDateElementAttributes eDateSecs;
- sal_Bool bDateNoDefault;
+ bool bDateNoDefault;
SAL_DLLPRIVATE sal_Int32 PrivateGetKey();
@@ -184,11 +184,11 @@ public:
sal_Int32 CreateAndInsert( com::sun::star::uno::Reference< com::sun::star::util::XNumberFormatsSupplier >& xFormatsSupplier );
sal_uInt16 GetType() const { return nType; } // SvXMLStylesTokens
- sal_Bool IsFromSystem() const { return bFromSystem; }
- sal_Bool HasLongDoW() const { return bHasLongDoW; }
- void SetHasLongDoW(sal_Bool bSet) { bHasLongDoW = bSet; }
- sal_Bool HasEra() const { return bHasEra; }
- void SetHasEra(sal_Bool bSet) { bHasEra = bSet; }
+ bool IsFromSystem() const { return bFromSystem; }
+ bool HasLongDoW() const { return bHasLongDoW; }
+ void SetHasLongDoW(bool bSet) { bHasLongDoW = bSet; }
+ bool HasEra() const { return bHasEra; }
+ void SetHasEra(bool bSet) { bHasEra = bSet; }
void UpdateCalendar( const OUString& rNewCalendar );
@@ -200,13 +200,13 @@ public:
void AddCurrency( const OUString& rContent, LanguageType nLang );
void AddNfKeyword( sal_uInt16 nIndex );
- sal_Bool ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nNew );
+ bool ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nNew );
void AddCondition( const sal_Int32 nIndex );
void AddCondition( const OUString& rCondition, const OUString& rApplyName );
void AddColor( sal_uInt32 const nColor );
/// determine whether number format uses the system language
- sal_Bool IsSystemLanguage();
+ bool IsSystemLanguage();
};
#endif
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index 11696dc84f79..f161d366c295 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -87,7 +87,7 @@ void SwXMLBrushItemImportContext::ProcessAttrs(
{
case XML_TOK_BGIMG_HREF:
SvXMLImportItemMapper::PutXMLValue(
- *pItem, GetImport().ResolveGraphicObjectURL( rValue,sal_False),
+ *pItem, GetImport().ResolveGraphicObjectURL( rValue, false),
MID_GRAPHIC_LINK, rUnitConv );
break;
case XML_TOK_BGIMG_TYPE:
diff --git a/xmloff/source/chart/PropertyMaps.cxx b/xmloff/source/chart/PropertyMaps.cxx
index 4359a812ad28..38f31263f505 100644
--- a/xmloff/source/chart/PropertyMaps.cxx
+++ b/xmloff/source/chart/PropertyMaps.cxx
@@ -628,7 +628,7 @@ bool XMLChartImportPropertyMapper::handleSpecialItem(
// deprecated from 6.0 beta on
case XML_SCH_CONTEXT_SPECIAL_SYMBOL_IMAGE_NAME:
- rProperty.maValue <<= mrImport.ResolveGraphicObjectURL( rValue, sal_False );
+ rProperty.maValue <<= mrImport.ResolveGraphicObjectURL( rValue, false );
break;
case XML_SCH_CONTEXT_SPECIAL_REGRESSION_TYPE:
diff --git a/xmloff/source/chart/XMLSymbolImageContext.cxx b/xmloff/source/chart/XMLSymbolImageContext.cxx
index 4c7f79226522..a1feba24a2d9 100644
--- a/xmloff/source/chart/XMLSymbolImageContext.cxx
+++ b/xmloff/source/chart/XMLSymbolImageContext.cxx
@@ -121,7 +121,7 @@ void XMLSymbolImageContext::EndElement()
if( !msURL.isEmpty() )
{
- sResolvedURL = GetImport().ResolveGraphicObjectURL( msURL, sal_False );
+ sResolvedURL = GetImport().ResolveGraphicObjectURL( msURL, false );
}
else if( mxBase64Stream.is() )
{
diff --git a/xmloff/source/core/xmlexp.cxx b/xmloff/source/core/xmlexp.cxx
index da03b1859e33..7f0491951ec0 100644
--- a/xmloff/source/core/xmlexp.cxx
+++ b/xmloff/source/core/xmlexp.cxx
@@ -1882,13 +1882,13 @@ void SvXMLExport::addDataStyle(const sal_Int32 nNumberFormat, bool /*bTimeFormat
void SvXMLExport::exportDataStyles()
{
if(mpNumExport)
- mpNumExport->Export(sal_False);
+ mpNumExport->Export(false);
}
void SvXMLExport::exportAutoDataStyles()
{
if(mpNumExport)
- mpNumExport->Export(sal_True);
+ mpNumExport->Export(true);
if (mxFormExport.is())
mxFormExport->exportAutoControlNumberStyles();
diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 95742c402d78..9116b34a966b 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -288,8 +288,8 @@ public:
// Boolean, indicating that position attributes
// of shapes are given in horizontal left-to-right layout. This is the case
// for the OpenOffice.org file format. (#i28749#)
- sal_Bool mbShapePositionInHoriL2R;
- sal_Bool mbTextDocInOOoFileFormat;
+ bool mbShapePositionInHoriL2R;
+ bool mbTextDocInOOoFileFormat;
const uno::Reference< uno::XComponentContext > mxComponentContext;
OUString implementationName;
@@ -308,8 +308,8 @@ public:
, mbOwnEmbeddedResolver( false )
, mbIsOOoXML(false)
// Convert drawing object positions from OOo file format to OASIS (#i28749#)
- , mbShapePositionInHoriL2R( sal_False )
- , mbTextDocInOOoFileFormat( sal_False )
+ , mbShapePositionInHoriL2R( false )
+ , mbTextDocInOOoFileFormat( false )
, mxComponentContext( rxContext )
, implementationName(theImplementationName)
, mpRDFaHelper() // lazy
@@ -425,7 +425,7 @@ SvXMLImport::SvXMLImport(
mpStyleMap(0),
mnImportFlags( nImportFlags ),
mnErrorFlags(0),
- mbIsFormsSupported( sal_True ),
+ mbIsFormsSupported( true ),
mbIsTableShapeSupported( false ),
mbIsGraphicLoadOnDemandSupported( true )
{
@@ -1176,28 +1176,28 @@ const Reference< container::XNameContainer > & SvXMLImport::GetDashHelper()
return mxDashHelper;
}
-sal_Bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
+bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
{
// if, and only if, only parts are imported, then we're in a package
const sal_uInt32 nTest = IMPORT_META|IMPORT_STYLES|IMPORT_CONTENT|IMPORT_SETTINGS;
if( (mnImportFlags & nTest) == nTest )
- return sal_False;
+ return false;
// Some quick tests: Some may rely on the package structure!
sal_Int32 nLen = rURL.getLength();
if( (nLen > 0 && '/' == rURL[0]) )
// RFC2396 net_path or abs_path
- return sal_False;
+ return false;
else if( nLen > 1 && '.' == rURL[0] )
{
if( '.' == rURL[1] )
// ../: We are never going up one level, so we know
// it's not an external URI
- return sal_False;
+ return false;
else if( '/' == rURL[1] )
// we are remaining on a level, so it's an package URI
- return sal_True;
+ return true;
}
// Now check for a RFC2396 schema
@@ -1208,10 +1208,10 @@ sal_Bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
{
case '/':
// a relative path segement
- return sal_True;
+ return true;
case ':':
// a schema
- return sal_False;
+ return false;
default:
break;
// we don't care about any other characters
@@ -1219,11 +1219,11 @@ sal_Bool SvXMLImport::IsPackageURL( const OUString& rURL ) const
++nPos;
}
- return sal_True;
+ return true;
}
OUString SvXMLImport::ResolveGraphicObjectURL( const OUString& rURL,
- sal_Bool bLoadOnDemand )
+ bool bLoadOnDemand )
{
OUString sRet;
@@ -1582,10 +1582,10 @@ OUString SvXMLImport::GetAbsoluteReference(const OUString& rValue) const
return rValue;
}
-sal_Bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
+bool SvXMLImport::IsODFVersionConsistent( const OUString& aODFVersion )
{
// the check returns sal_False only if the storage version could be retrieved
- sal_Bool bResult = sal_True;
+ bool bResult = true;
if ( !aODFVersion.isEmpty() && aODFVersion.compareTo( ODFVER_012_TEXT ) >= 0 )
{
@@ -1798,12 +1798,12 @@ OUString SvXMLImport::GetStreamName() const
}
// Convert drawing object positions from OOo file format to OASIS (#i28749#)
-sal_Bool SvXMLImport::IsShapePositionInHoriL2R() const
+bool SvXMLImport::IsShapePositionInHoriL2R() const
{
return mpImpl->mbShapePositionInHoriL2R;
}
-sal_Bool SvXMLImport::IsTextDocInOOoFileFormat() const
+bool SvXMLImport::IsTextDocInOOoFileFormat() const
{
return mpImpl->mbTextDocInOOoFileFormat;
}
diff --git a/xmloff/source/draw/ximpshap.cxx b/xmloff/source/draw/ximpshap.cxx
index a41a10c07d9f..df6b191954f3 100644
--- a/xmloff/source/draw/ximpshap.cxx
+++ b/xmloff/source/draw/ximpshap.cxx
@@ -783,7 +783,7 @@ void SdXMLShapeContext::SetThumbnail()
// load the thumbnail graphic and export it to a wmf stream so we can set
// it at the api
- const OUString aInternalURL( GetImport().ResolveGraphicObjectURL( maThumbnailURL, sal_False ) );
+ const OUString aInternalURL( GetImport().ResolveGraphicObjectURL( maThumbnailURL, false ) );
xPropSet->setPropertyValue( sProperty, uno::makeAny( aInternalURL ) );
}
}
diff --git a/xmloff/source/forms/elementimport.cxx b/xmloff/source/forms/elementimport.cxx
index 8cbfeae9a445..dfc3195b00d1 100644
--- a/xmloff/source/forms/elementimport.cxx
+++ b/xmloff/source/forms/elementimport.cxx
@@ -1301,7 +1301,7 @@ namespace xmloff
// we don't want say form url targets to be resolved
// using ResolveGraphicObjectURL
if ( _rLocalName.equalsAscii( s_pImageDataAttributeName ) )
- sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, sal_False );
+ sAdjustedValue = m_rContext.getGlobalContext().ResolveGraphicObjectURL( _rValue, false );
else
sAdjustedValue = m_rContext.getGlobalContext().GetAbsoluteReference( _rValue );
return OImagePositionImport::handleAttribute( _nNamespaceKey, _rLocalName, sAdjustedValue );
diff --git a/xmloff/source/forms/layerexport.cxx b/xmloff/source/forms/layerexport.cxx
index 7e213f721e49..dce6f3da7bbe 100644
--- a/xmloff/source/forms/layerexport.cxx
+++ b/xmloff/source/forms/layerexport.cxx
@@ -252,7 +252,7 @@ namespace xmloff
void OFormLayerXMLExport_Impl::exportAutoControlNumberStyles()
{
if ( m_pControlNumberStyles )
- m_pControlNumberStyles->Export( sal_True );
+ m_pControlNumberStyles->Export( true );
}
void OFormLayerXMLExport_Impl::exportAutoStyles()
diff --git a/xmloff/source/style/ImageStyle.cxx b/xmloff/source/style/ImageStyle.cxx
index 5e355ff23f53..745dc277a2dc 100644
--- a/xmloff/source/style/ImageStyle.cxx
+++ b/xmloff/source/style/ImageStyle.cxx
@@ -149,7 +149,7 @@ bool XMLImageStyle::ImpImportXML( const uno::Reference< xml::sax::XAttributeList
break;
case XML_TOK_IMAGE_URL:
{
- aStrURL = rImport.ResolveGraphicObjectURL( rStrValue, sal_False );
+ aStrURL = rImport.ResolveGraphicObjectURL( rStrValue, false );
bHasHRef = true;
}
break;
diff --git a/xmloff/source/style/XMLBackgroundImageContext.cxx b/xmloff/source/style/XMLBackgroundImageContext.cxx
index eb511f22af5a..daf86f1a1885 100644
--- a/xmloff/source/style/XMLBackgroundImageContext.cxx
+++ b/xmloff/source/style/XMLBackgroundImageContext.cxx
@@ -376,7 +376,7 @@ void XMLBackgroundImageContext::EndElement()
{
if( !sURL.isEmpty() )
{
- sURL = GetImport().ResolveGraphicObjectURL( sURL, sal_False );
+ sURL = GetImport().ResolveGraphicObjectURL( sURL, false );
}
else if( xBase64Stream.is() )
{
diff --git a/xmloff/source/style/xmlimppr.cxx b/xmloff/source/style/xmlimppr.cxx
index 33ca7e329ed4..6a284dc068c3 100644
--- a/xmloff/source/style/xmlimppr.cxx
+++ b/xmloff/source/style/xmlimppr.cxx
@@ -407,12 +407,12 @@ void SvXMLImportPropertyMapper::CheckSpecialContext(
}
-sal_Bool SvXMLImportPropertyMapper::FillPropertySet(
+bool SvXMLImportPropertyMapper::FillPropertySet(
const vector< XMLPropertyState >& aProperties,
const Reference< XPropertySet > rPropSet,
_ContextID_Index_Pair* pSpecialContextIds ) const
{
- sal_Bool bSet = sal_False;
+ bool bSet = false;
Reference< XTolerantMultiPropertySet > xTolPropSet( rPropSet, UNO_QUERY );
if (xTolPropSet.is())
@@ -446,7 +446,7 @@ sal_Bool SvXMLImportPropertyMapper::FillPropertySet(
return bSet;
}
-sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
+bool SvXMLImportPropertyMapper::_FillPropertySet(
const vector<XMLPropertyState> & rProperties,
const Reference<XPropertySet> & rPropSet,
const Reference<XPropertySetInfo> & rPropSetInfo,
@@ -458,7 +458,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
OSL_ENSURE( rPropSetInfo.is(), "need an XPropertySetInfo" );
// preliminaries
- sal_Bool bSet = sal_False;
+ bool bSet = false;
sal_Int32 nCount = rProperties.size();
// iterate over property states that we want to set
@@ -482,7 +482,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillPropertySet(
try
{
rPropSet->setPropertyValue( rPropName, rProp.maValue );
- bSet = sal_True;
+ bSet = true;
}
catch ( const IllegalArgumentException& e )
{
@@ -647,7 +647,7 @@ void SvXMLImportPropertyMapper::_PrepareForMultiPropertySet(
}
}
-sal_Bool SvXMLImportPropertyMapper::_FillMultiPropertySet(
+bool SvXMLImportPropertyMapper::_FillMultiPropertySet(
const vector<XMLPropertyState> & rProperties,
const Reference<XMultiPropertySet> & rMultiPropSet,
const Reference<XPropertySetInfo> & rPropSetInfo,
@@ -657,7 +657,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillMultiPropertySet(
OSL_ENSURE( rMultiPropSet.is(), "Need multi property set. ");
OSL_ENSURE( rPropSetInfo.is(), "Need property set info." );
- sal_Bool bSuccessful = sal_False;
+ bool bSuccessful = false;
Sequence<OUString> aNames;
Sequence<Any> aValues;
@@ -669,7 +669,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillMultiPropertySet(
try
{
rMultiPropSet->setPropertyValues( aNames, aValues );
- bSuccessful = sal_True;
+ bSuccessful = true;
}
catch ( ... )
{
@@ -679,7 +679,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillMultiPropertySet(
return bSuccessful;
}
-sal_Bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet(
+bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet(
const vector<XMLPropertyState> & rProperties,
const Reference<XTolerantMultiPropertySet> & rTolMultiPropSet,
const UniReference<XMLPropertySetMapper> & rPropMapper,
@@ -688,7 +688,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet(
{
OSL_ENSURE( rTolMultiPropSet.is(), "Need tolerant multi property set. ");
- sal_Bool bSuccessful = sal_False;
+ bool bSuccessful = false;
Sequence<OUString> aNames;
Sequence<Any> aValues;
@@ -701,7 +701,7 @@ sal_Bool SvXMLImportPropertyMapper::_FillTolerantMultiPropertySet(
{
Sequence< SetPropertyTolerantFailed > aResults(rTolMultiPropSet->setPropertyValuesTolerant( aNames, aValues ));
if (aResults.getLength() == 0)
- bSuccessful = sal_True;
+ bSuccessful = true;
else
{
sal_Int32 nCount(aResults.getLength());
diff --git a/xmloff/source/style/xmlnume.cxx b/xmloff/source/style/xmlnume.cxx
index b3f21ecfcb72..a5718fd5921a 100644
--- a/xmloff/source/style/xmlnume.cxx
+++ b/xmloff/source/style/xmlnume.cxx
@@ -60,7 +60,7 @@ using namespace ::com::sun::star::beans;
using namespace ::xmloff::token;
void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::star::container::XIndexReplace > & xNumRule,
- sal_Bool bOutline )
+ bool bOutline )
{
sal_Int32 nCount = xNumRule ->getCount();
for( sal_Int32 i=0; i<nCount; i++ )
@@ -76,7 +76,7 @@ void SvxXMLNumRuleExport::exportLevelStyles( const uno::Reference< ::com::sun::s
void SvxXMLNumRuleExport::exportLevelStyle( sal_Int32 nLevel,
const uno::Sequence<beans::PropertyValue>& rProps,
- sal_Bool bOutline )
+ bool bOutline )
{
sal_Int16 eType = NumberingType::CHAR_SPECIAL;
@@ -649,7 +649,7 @@ SvxXMLNumRuleExport::~SvxXMLNumRuleExport()
}
void SvxXMLNumRuleExport::exportNumberingRule(
- const OUString& rName, sal_Bool bIsHidden,
+ const OUString& rName, bool bIsHidden,
const Reference< XIndexReplace >& rNumRule )
{
Reference< XPropertySet > xPropSet( rNumRule, UNO_QUERY );
@@ -696,7 +696,7 @@ void SvxXMLNumRuleExport::exportNumberingRule(
}
}
-sal_Bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
+bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
{
Reference< XPropertySet > xPropSet( rStyle, UNO_QUERY );
Reference< XPropertySetInfo > xPropSetInfo = xPropSet->getPropertySetInfo();
@@ -709,7 +709,7 @@ sal_Bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
{
aAny = xPropSet->getPropertyValue( sIsPhysical );
if( !*(sal_Bool *)aAny.getValue() )
- return sal_False;
+ return false;
}
aAny = xPropSet->getPropertyValue( sNumberingRules );
@@ -727,7 +727,7 @@ sal_Bool SvxXMLNumRuleExport::exportStyle( const Reference< XStyle >& rStyle )
exportNumberingRule( sName, bHidden, xNumRule );
- return sal_True;
+ return true;
}
void SvxXMLNumRuleExport::exportOutline()
@@ -762,7 +762,7 @@ void SvxXMLNumRuleExport::exportOutline()
nODFVersion == SvtSaveOptions::ODFVER_011 ) &&
GetExport().writeOutlineStyleAsNormalListStyle() )
{
- exportNumberingRule( sOutlineStyleName, sal_False, xNumRule );
+ exportNumberingRule( sOutlineStyleName, false, xNumRule );
}
else
{
@@ -785,15 +785,15 @@ void SvxXMLNumRuleExport::exportOutline()
}
SvXMLElementExport aElem( GetExport(), XML_NAMESPACE_TEXT,
XML_OUTLINE_STYLE, true, true );
- exportLevelStyles( xNumRule, sal_True );
+ exportLevelStyles( xNumRule, true );
}
}
}
}
-void SvxXMLNumRuleExport::exportStyles( sal_Bool bUsed,
- XMLTextListAutoStylePool *pPool,
- sal_Bool bExportChapterNumbering )
+void SvxXMLNumRuleExport::exportStyles( bool bUsed,
+ XMLTextListAutoStylePool *pPool,
+ bool bExportChapterNumbering )
{
if( bExportChapterNumbering )
exportOutline();
diff --git a/xmloff/source/style/xmlnumfe.cxx b/xmloff/source/style/xmlnumfe.cxx
index 7ea94fae4bbb..125035c50c49 100644
--- a/xmloff/source/style/xmlnumfe.cxx
+++ b/xmloff/source/style/xmlnumfe.cxx
@@ -56,7 +56,7 @@ using namespace ::svt;
struct LessuInt32
{
- sal_Bool operator() (const sal_uInt32 rValue1, const sal_uInt32 rValue2) const
+ bool operator() (const sal_uInt32 rValue1, const sal_uInt32 rValue2) const
{
return rValue1 < rValue2;
}
@@ -76,13 +76,13 @@ public:
SvXMLNumUsedList_Impl();
~SvXMLNumUsedList_Impl();
- void SetUsed( sal_uInt32 nKey );
- sal_Bool IsUsed( sal_uInt32 nKey ) const;
- sal_Bool IsWasUsed( sal_uInt32 nKey ) const;
- void Export();
+ void SetUsed( sal_uInt32 nKey );
+ bool IsUsed( sal_uInt32 nKey ) const;
+ bool IsWasUsed( sal_uInt32 nKey ) const;
+ void Export();
- sal_Bool GetFirstUsed(sal_uInt32& nKey);
- sal_Bool GetNextUsed(sal_uInt32& nKey);
+ bool GetFirstUsed(sal_uInt32& nKey);
+ bool GetNextUsed(sal_uInt32& nKey);
void GetWasUsed(uno::Sequence<sal_Int32>& rWasUsed);
void SetWasUsed(const uno::Sequence<sal_Int32>& rWasUsed);
@@ -122,13 +122,13 @@ void SvXMLNumUsedList_Impl::SetUsed( sal_uInt32 nKey )
}
}
-sal_Bool SvXMLNumUsedList_Impl::IsUsed( sal_uInt32 nKey ) const
+bool SvXMLNumUsedList_Impl::IsUsed( sal_uInt32 nKey ) const
{
SvXMLuInt32Set::const_iterator aItr = aUsed.find(nKey);
return (aItr != aUsed.end());
}
-sal_Bool SvXMLNumUsedList_Impl::IsWasUsed( sal_uInt32 nKey ) const
+bool SvXMLNumUsedList_Impl::IsWasUsed( sal_uInt32 nKey ) const
{
SvXMLuInt32Set::const_iterator aItr = aWasUsed.find(nKey);
return (aItr != aWasUsed.end());
@@ -148,29 +148,29 @@ void SvXMLNumUsedList_Impl::Export()
nUsedCount = 0;
}
-sal_Bool SvXMLNumUsedList_Impl::GetFirstUsed(sal_uInt32& nKey)
+bool SvXMLNumUsedList_Impl::GetFirstUsed(sal_uInt32& nKey)
{
- sal_Bool bRet(sal_False);
+ bool bRet(false);
aCurrentUsedPos = aUsed.begin();
if(nUsedCount)
{
DBG_ASSERT(aCurrentUsedPos != aUsed.end(), "something went wrong");
nKey = *aCurrentUsedPos;
- bRet = sal_True;
+ bRet = true;
}
return bRet;
}
-sal_Bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey)
+bool SvXMLNumUsedList_Impl::GetNextUsed(sal_uInt32& nKey)
{
- sal_Bool bRet(sal_False);
+ bool bRet(false);
if (aCurrentUsedPos != aUsed.end())
{
++aCurrentUsedPos;
if (aCurrentUsedPos != aUsed.end())
{
nKey = *aCurrentUsedPos;
- bRet = sal_True;
+ bRet = true;
}
}
return bRet;
@@ -282,7 +282,7 @@ SvXMLNumFmtExport::~SvXMLNumFmtExport()
// helper methods
-static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, sal_Bool bDefPart, const OUString& rPrefix )
+static OUString lcl_CreateStyleName( sal_Int32 nKey, sal_Int32 nPart, bool bDefPart, const OUString& rPrefix )
{
OUStringBuffer aFmtName( 10L );
aFmtName.append( rPrefix );
@@ -303,7 +303,7 @@ void SvXMLNumFmtExport::AddCalendarAttr_Impl( const OUString& rCalendar )
}
}
-void SvXMLNumFmtExport::AddTextualAttr_Impl( sal_Bool bText )
+void SvXMLNumFmtExport::AddTextualAttr_Impl( bool bText )
{
if ( bText ) // non-textual
{
@@ -311,7 +311,7 @@ void SvXMLNumFmtExport::AddTextualAttr_Impl( sal_Bool bText )
}
}
-void SvXMLNumFmtExport::AddStyleAttr_Impl( sal_Bool bLong )
+void SvXMLNumFmtExport::AddStyleAttr_Impl( bool bLong )
{
if ( bLong ) // short is default
{
@@ -401,7 +401,7 @@ void SvXMLNumFmtExport::WriteTextContentElement_Impl()
// date elements
-void SvXMLNumFmtExport::WriteDayElement_Impl( const OUString& rCalendar, sal_Bool bLong )
+void SvXMLNumFmtExport::WriteDayElement_Impl( const OUString& rCalendar, bool bLong )
{
FinishTextElement_Impl();
@@ -412,7 +412,7 @@ void SvXMLNumFmtExport::WriteDayElement_Impl( const OUString& rCalendar, sal_Boo
true, false );
}
-void SvXMLNumFmtExport::WriteMonthElement_Impl( const OUString& rCalendar, sal_Bool bLong, sal_Bool bText )
+void SvXMLNumFmtExport::WriteMonthElement_Impl( const OUString& rCalendar, bool bLong, bool bText )
{
FinishTextElement_Impl();
@@ -424,7 +424,7 @@ void SvXMLNumFmtExport::WriteMonthElement_Impl( const OUString& rCalendar, sal_B
true, false );
}
-void SvXMLNumFmtExport::WriteYearElement_Impl( const OUString& rCalendar, sal_Bool bLong )
+void SvXMLNumFmtExport::WriteYearElement_Impl( const OUString& rCalendar, bool bLong )
{
FinishTextElement_Impl();
@@ -435,7 +435,7 @@ void SvXMLNumFmtExport::WriteYearElement_Impl( const OUString& rCalendar, sal_Bo
true, false );
}
-void SvXMLNumFmtExport::WriteEraElement_Impl( const OUString& rCalendar, sal_Bool bLong )
+void SvXMLNumFmtExport::WriteEraElement_Impl( const OUString& rCalendar, bool bLong )
{
FinishTextElement_Impl();
@@ -446,7 +446,7 @@ void SvXMLNumFmtExport::WriteEraElement_Impl( const OUString& rCalendar, sal_Boo
true, false );
}
-void SvXMLNumFmtExport::WriteDayOfWeekElement_Impl( const OUString& rCalendar, sal_Bool bLong )
+void SvXMLNumFmtExport::WriteDayOfWeekElement_Impl( const OUString& rCalendar, bool bLong )
{
FinishTextElement_Impl();
@@ -467,7 +467,7 @@ void SvXMLNumFmtExport::WriteWeekElement_Impl( const OUString& rCalendar )
true, false );
}
-void SvXMLNumFmtExport::WriteQuarterElement_Impl( const OUString& rCalendar, sal_Bool bLong )
+void SvXMLNumFmtExport::WriteQuarterElement_Impl( const OUString& rCalendar, bool bLong )
{
FinishTextElement_Impl();
@@ -480,7 +480,7 @@ void SvXMLNumFmtExport::WriteQuarterElement_Impl( const OUString& rCalendar, sal
// time elements
-void SvXMLNumFmtExport::WriteHoursElement_Impl( sal_Bool bLong )
+void SvXMLNumFmtExport::WriteHoursElement_Impl( bool bLong )
{
FinishTextElement_Impl();
@@ -490,7 +490,7 @@ void SvXMLNumFmtExport::WriteHoursElement_Impl( sal_Bool bLong )
true, false );
}
-void SvXMLNumFmtExport::WriteMinutesElement_Impl( sal_Bool bLong )
+void SvXMLNumFmtExport::WriteMinutesElement_Impl( bool bLong )
{
FinishTextElement_Impl();
@@ -508,7 +508,7 @@ void SvXMLNumFmtExport::WriteRepeatedElement_Impl( sal_Unicode nChar )
rExport.Characters( OUString( nChar ) );
}
-void SvXMLNumFmtExport::WriteSecondsElement_Impl( sal_Bool bLong, sal_uInt16 nDecimals )
+void SvXMLNumFmtExport::WriteSecondsElement_Impl( bool bLong, sal_uInt16 nDecimals )
{
FinishTextElement_Impl();
@@ -535,8 +535,8 @@ void SvXMLNumFmtExport::WriteAMPMElement_Impl()
void SvXMLNumFmtExport::WriteNumberElement_Impl(
sal_Int32 nDecimals, sal_Int32 nInteger,
- const OUString& rDashStr, sal_Bool bVarDecimals,
- sal_Bool bGrouping, sal_Int32 nTrailingThousands,
+ const OUString& rDashStr, bool bVarDecimals,
+ bool bGrouping, sal_Int32 nTrailingThousands,
const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries )
{
FinishTextElement_Impl();
@@ -612,7 +612,7 @@ void SvXMLNumFmtExport::WriteNumberElement_Impl(
void SvXMLNumFmtExport::WriteScientificElement_Impl(
sal_Int32 nDecimals, sal_Int32 nInteger,
- sal_Bool bGrouping, sal_Int32 nExp )
+ bool bGrouping, sal_Int32 nExp )
{
FinishTextElement_Impl();
@@ -649,7 +649,7 @@ void SvXMLNumFmtExport::WriteScientificElement_Impl(
}
void SvXMLNumFmtExport::WriteFractionElement_Impl(
- sal_Int32 nInteger, sal_Bool bGrouping,
+ sal_Int32 nInteger, bool bGrouping,
sal_Int32 nNumeratorDigits, sal_Int32 nDenominatorDigits, sal_Int32 nDenominator )
{
FinishTextElement_Impl();
@@ -723,7 +723,7 @@ void SvXMLNumFmtExport::WriteMapElement_Impl( sal_Int32 nOp, double fLimit,
aCondStr.makeStringAndClear() );
rExport.AddAttribute( XML_NAMESPACE_STYLE, XML_APPLY_STYLE_NAME,
- rExport.EncodeStyleName( lcl_CreateStyleName( nKey, nPart, sal_False,
+ rExport.EncodeStyleName( lcl_CreateStyleName( nKey, nPart, false,
sPrefix ) ) );
SvXMLElementExport aElem( rExport, XML_NAMESPACE_STYLE, XML_MAP,
@@ -770,12 +770,12 @@ sal_Int32 lcl_FindSymbol( const OUString& sUpperStr, const OUString& sCurString
return -1;
}
-sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
+bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
const ::com::sun::star::lang::Locale& rLocale )
{
- // returns sal_True if currency element was written
+ // returns true if currency element was written
- sal_Bool bRet = sal_False;
+ bool bRet = false;
LanguageTag aLanguageTag( rLocale );
pFormatter->ChangeIntl( aLanguageTag.getLanguageType( false) );
@@ -799,7 +799,7 @@ sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
// currency symbol (empty string -> default)
OUString sEmpty;
WriteCurrencyElement_Impl( sEmpty, sEmpty );
- bRet = sal_True;
+ bRet = true;
// text after currency symbol
if ( nCont < nLength )
@@ -812,7 +812,7 @@ sal_Bool SvXMLNumFmtExport::WriteTextWithCurrency_Impl( const OUString& rString,
AddToTextElement_Impl( rString ); // simple text
}
- return bRet; // sal_True: currency element written
+ return bRet; // true: currency element written
}
static OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageType nLang )
@@ -827,30 +827,30 @@ static OUString lcl_GetDefaultCalendar( SvNumberFormatter* pFormatter, LanguageT
uno::Sequence<OUString> aCals = pCalendar->getAllCalendars( aLocale );
sal_Int32 nCnt = aCals.getLength();
- sal_Bool bFound = sal_False;
+ bool bFound = false;
for ( sal_Int32 j=0; j < nCnt && !bFound; j++ )
{
if ( aCals[j] != "gregorian" )
{
aCalendar = aCals[j];
- bFound = sal_True;
+ bFound = true;
}
}
}
return aCalendar;
}
-static sal_Bool lcl_IsInEmbedded( const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries, sal_uInt16 nPos )
+static bool lcl_IsInEmbedded( const SvXMLEmbeddedTextEntryArr& rEmbeddedEntries, sal_uInt16 nPos )
{
sal_uInt16 nCount = rEmbeddedEntries.size();
for (sal_uInt16 i=0; i<nCount; i++)
if ( rEmbeddedEntries[i].nSourcePos == nPos )
- return sal_True;
+ return true;
- return sal_False; // not found
+ return false; // not found
}
-static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool bSystemDate, NfIndexTableOffset eBuiltIn )
+static bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, bool bSystemDate, NfIndexTableOffset eBuiltIn )
{
// make an extra loop to collect date elements, to check if it is a default format
// before adding the automatic-order attribute
@@ -862,10 +862,10 @@ static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool
SvXMLDateElementAttributes eDateHours = XML_DEA_NONE;
SvXMLDateElementAttributes eDateMins = XML_DEA_NONE;
SvXMLDateElementAttributes eDateSecs = XML_DEA_NONE;
- sal_Bool bDateNoDefault = sal_False;
+ bool bDateNoDefault = false;
sal_uInt16 nPos = 0;
- sal_Bool bEnd = sal_False;
+ bool bEnd = false;
short nLastType = 0;
while (!bEnd)
{
@@ -874,8 +874,8 @@ static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool
{
case 0:
if ( nLastType == NF_SYMBOLTYPE_STRING )
- bDateNoDefault = sal_True; // text at the end -> no default date format
- bEnd = sal_True; // end of format reached
+ bDateNoDefault = true; // text at the end -> no default date format
+ bEnd = true; // end of format reached
break;
case NF_SYMBOLTYPE_STRING:
case NF_SYMBOLTYPE_DATESEP:
@@ -904,14 +904,14 @@ static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool
case NF_KEY_AP:
case NF_KEY_AMPM: break; // AM/PM may or may not be in date/time formats -> ignore by itself
default:
- bDateNoDefault = sal_True; // any other element -> no default format
+ bDateNoDefault = true; // any other element -> no default format
}
nLastType = nElemType;
++nPos;
}
if ( bDateNoDefault )
- return sal_False; // additional elements
+ return false; // additional elements
else
{
NfIndexTableOffset eFound = (NfIndexTableOffset) SvXMLNumFmtDefaults::GetDefaultDateFormat(
@@ -924,7 +924,7 @@ static sal_Bool lcl_IsDefaultDateFormat( const SvNumberformat& rFormat, sal_Bool
// export one part (condition)
void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt32 nKey,
- sal_uInt16 nPart, sal_Bool bDefPart )
+ sal_uInt16 nPart, bool bDefPart )
{
//! for the default part, pass the coditions from the other parts!
@@ -988,7 +988,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
DBG_ASSERT( eType != XML_TOKEN_INVALID, "unknown format type" );
OUString sAttrValue;
- sal_Bool bUserDef = ( ( rFormat.GetType() & NUMBERFORMAT_DEFINED ) != 0 );
+ bool bUserDef = ( ( rFormat.GetType() & NUMBERFORMAT_DEFINED ) != 0 );
// common attributes for format
@@ -1014,7 +1014,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// automatic ordering for currency and date formats
// only used for some built-in formats
- sal_Bool bAutoOrder = ( eBuiltIn == NF_CURRENCY_1000INT || eBuiltIn == NF_CURRENCY_1000DEC2 ||
+ bool bAutoOrder = ( eBuiltIn == NF_CURRENCY_1000INT || eBuiltIn == NF_CURRENCY_1000DEC2 ||
eBuiltIn == NF_CURRENCY_1000INT_RED || eBuiltIn == NF_CURRENCY_1000DEC2_RED ||
eBuiltIn == NF_CURRENCY_1000DEC2_DASHED ||
eBuiltIn == NF_DATE_SYSTEM_SHORT || eBuiltIn == NF_DATE_SYSTEM_LONG ||
@@ -1027,16 +1027,16 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// format source (for date and time formats)
// only used for some built-in formats
- sal_Bool bSystemDate = ( eBuiltIn == NF_DATE_SYSTEM_SHORT ||
+ bool bSystemDate = ( eBuiltIn == NF_DATE_SYSTEM_SHORT ||
eBuiltIn == NF_DATE_SYSTEM_LONG ||
eBuiltIn == NF_DATETIME_SYSTEM_SHORT_HHMM );
- sal_Bool bLongSysDate = ( eBuiltIn == NF_DATE_SYSTEM_LONG );
+ bool bLongSysDate = ( eBuiltIn == NF_DATE_SYSTEM_LONG );
// check if the format definition matches the key
if ( bAutoOrder && ( nFmtType == NUMBERFORMAT_DATE || nFmtType == NUMBERFORMAT_DATETIME ) &&
!lcl_IsDefaultDateFormat( rFormat, bSystemDate, eBuiltIn ) )
{
- bAutoOrder = bSystemDate = bLongSysDate = sal_False; // don't write automatic-order attribute then
+ bAutoOrder = bSystemDate = bLongSysDate = false; // don't write automatic-order attribute then
}
if ( bAutoOrder &&
@@ -1100,7 +1100,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// detect if there is "real" content, excluding color and maps
//! move to implementation of Write... methods?
- sal_Bool bAnyContent = sal_False;
+ bool bAnyContent = false;
// format elements
@@ -1108,31 +1108,31 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
if ( eBuiltIn == NF_NUMBER_STANDARD )
{
// default number format contains just one number element
- WriteNumberElement_Impl( -1, 1, OUString(), sal_False, sal_False, 0, aEmbeddedEntries );
- bAnyContent = sal_True;
+ WriteNumberElement_Impl( -1, 1, OUString(), false, false, 0, aEmbeddedEntries );
+ bAnyContent = true;
}
else if ( eBuiltIn == NF_BOOLEAN )
{
// boolean format contains just one boolean element
WriteBooleanElement_Impl();
- bAnyContent = sal_True;
+ bAnyContent = true;
}
else
{
// first loop to collect attributes
- sal_Bool bDecDashes = sal_False;
- sal_Bool bVarDecimals = sal_False;
- sal_Bool bExpFound = sal_False;
- sal_Bool bCurrFound = sal_False;
- sal_Bool bInInteger = sal_True;
+ bool bDecDashes = false;
+ bool bVarDecimals = false;
+ bool bExpFound = false;
+ bool bCurrFound = false;
+ bool bInInteger = true;
sal_Int32 nExpDigits = 0;
sal_Int32 nIntegerSymbols = 0; // for embedded-text, including "#"
sal_Int32 nTrailingThousands = 0; // thousands-separators after all digits
OUString sCurrExt;
OUString aCalendar;
sal_uInt16 nPos = 0;
- sal_Bool bEnd = sal_False;
+ bool bEnd = false;
while (!bEnd)
{
short nElemType = rFormat.GetNumForType( nPart, nPos, false );
@@ -1141,36 +1141,36 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
switch ( nElemType )
{
case 0:
- bEnd = sal_True; // end of format reached
+ bEnd = true; // end of format reached
break;
case NF_SYMBOLTYPE_DIGIT:
if ( bExpFound && pElemStr )
nExpDigits += pElemStr->getLength();
else if ( !bDecDashes && pElemStr && (*pElemStr)[0] == '-' )
- bDecDashes = sal_True;
+ bDecDashes = true;
else if ( !bVarDecimals && !bInInteger && pElemStr && (*pElemStr)[0] == '#' )
{
// If the decimal digits string starts with a '#', variable
// decimals is assumed (for 0.###, but not 0.0##).
- bVarDecimals = sal_True;
+ bVarDecimals = true;
}
if ( bInInteger && pElemStr )
nIntegerSymbols += pElemStr->getLength();
nTrailingThousands = 0;
break;
case NF_SYMBOLTYPE_DECSEP:
- bInInteger = sal_False;
+ bInInteger = false;
break;
case NF_SYMBOLTYPE_THSEP:
if (pElemStr)
nTrailingThousands += pElemStr->getLength(); // is reset to 0 if digits follow
break;
case NF_SYMBOLTYPE_EXP:
- bExpFound = sal_True; // following digits are exponent digits
- bInInteger = sal_False;
+ bExpFound = true; // following digits are exponent digits
+ bInInteger = false;
break;
case NF_SYMBOLTYPE_CURRENCY:
- bCurrFound = sal_True;
+ bCurrFound = true;
break;
case NF_SYMBOLTYPE_CURREXT:
if (pElemStr)
@@ -1192,14 +1192,14 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// collect strings for embedded-text (must be known before number element is written)
- sal_Bool bAllowEmbedded = ( nFmtType == 0 || nFmtType == NUMBERFORMAT_NUMBER ||
+ bool bAllowEmbedded = ( nFmtType == 0 || nFmtType == NUMBERFORMAT_NUMBER ||
nFmtType == NUMBERFORMAT_CURRENCY ||
nFmtType == NUMBERFORMAT_PERCENT );
if ( bAllowEmbedded )
{
sal_Int32 nDigitsPassed = 0;
nPos = 0;
- bEnd = sal_False;
+ bEnd = false;
while (!bEnd)
{
short nElemType = rFormat.GetNumForType( nPart, nPos, false );
@@ -1208,7 +1208,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
switch ( nElemType )
{
case 0:
- bEnd = sal_True; // end of format reached
+ bEnd = true; // end of format reached
break;
case NF_SYMBOLTYPE_DIGIT:
if ( pElemStr )
@@ -1243,11 +1243,11 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// final loop to write elements
- sal_Bool bNumWritten = sal_False;
- sal_Bool bCurrencyWritten = sal_False;
+ bool bNumWritten = false;
+ bool bCurrencyWritten = false;
short nPrevType = 0;
nPos = 0;
- bEnd = sal_False;
+ bEnd = false;
while (!bEnd)
{
short nElemType = rFormat.GetNumForType( nPart, nPos, false );
@@ -1256,7 +1256,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
switch ( nElemType )
{
case 0:
- bEnd = sal_True; // end of format reached
+ bEnd = true; // end of format reached
break;
case NF_SYMBOLTYPE_STRING:
case NF_SYMBOLTYPE_DATESEP:
@@ -1285,7 +1285,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// normal text -> search for the symbol
bCurrencyWritten = WriteTextWithCurrency_Impl( *pElemStr,
LanguageTag::convertToLocale( nLang ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
else
AddToTextElement_Impl( *pElemStr );
@@ -1303,7 +1303,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
}
break;
case NF_KEY_GENERAL :
- WriteNumberElement_Impl( -1, 1, OUString(), sal_False, sal_False, 0, aEmbeddedEntries );
+ WriteNumberElement_Impl( -1, 1, OUString(), false, false, 0, aEmbeddedEntries );
break;
case NF_KEY_CCC:
if (pElemStr)
@@ -1317,8 +1317,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// pElemStr is "CCC"
WriteCurrencyElement_Impl( *pElemStr, OUString() );
- bAnyContent = sal_True;
- bCurrencyWritten = sal_True;
+ bAnyContent = true;
+ bCurrencyWritten = true;
}
}
break;
@@ -1330,8 +1330,8 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
else
{
WriteCurrencyElement_Impl( *pElemStr, sCurrExt );
- bAnyContent = sal_True;
- bCurrencyWritten = sal_True;
+ bAnyContent = true;
+ bCurrencyWritten = true;
}
}
break;
@@ -1372,7 +1372,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
WriteNumberElement_Impl(nDecimals, nInteger, sDashStr.makeStringAndClear(),
bVarDecimals, bThousand, nTrailingThousands, aEmbeddedEntries);
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
case NUMBERFORMAT_SCIENTIFIC:
@@ -1380,7 +1380,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
// as integer digits: use nIntegerSymbols instead of nLeading
// (use of '#' to select multiples in exponent might be added later)
WriteScientificElement_Impl( nPrecision, nIntegerSymbols, bThousand, nExpDigits );
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
case NUMBERFORMAT_FRACTION:
{
@@ -1394,12 +1394,12 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
}
sal_Int32 nDenominator = rFormat.GetForcedDenominatorForType( nPart );
WriteFractionElement_Impl( nInteger, bThousand, nPrecision, nPrecision, nDenominator );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
}
- bNumWritten = sal_True;
+ bNumWritten = true;
}
break;
case NF_SYMBOLTYPE_DECSEP:
@@ -1417,7 +1417,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
if ( pElemStr && comphelper::string::equals(*pElemStr, '@') )
{
WriteTextContentElement_Impl();
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
@@ -1431,9 +1431,9 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_KEY_D:
case NF_KEY_DD:
{
- sal_Bool bLong = ( nElemType == NF_KEY_DD );
+ bool bLong = ( nElemType == NF_KEY_DD );
WriteDayElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : bLong ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
case NF_KEY_DDD:
@@ -1452,10 +1452,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
aCalAttr = lcl_GetDefaultCalendar( pFormatter, nLang );
}
- sal_Bool bLong = ( nElemType == NF_KEY_NNN || nElemType == NF_KEY_NNNN ||
+ bool bLong = ( nElemType == NF_KEY_NNN || nElemType == NF_KEY_NNNN ||
nElemType == NF_KEY_DDDD || nElemType == NF_KEY_AAAA );
WriteDayOfWeekElement_Impl( aCalAttr, ( bSystemDate ? bLongSysDate : bLong ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
if ( nElemType == NF_KEY_NNNN )
{
// write additional text element for separator
@@ -1470,11 +1470,11 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_KEY_MMMM:
case NF_KEY_MMMMM: //! first letter of month name, no attribute available
{
- sal_Bool bLong = ( nElemType == NF_KEY_MM || nElemType == NF_KEY_MMMM );
- sal_Bool bText = ( nElemType == NF_KEY_MMM || nElemType == NF_KEY_MMMM ||
+ bool bLong = ( nElemType == NF_KEY_MM || nElemType == NF_KEY_MMMM );
+ bool bText = ( nElemType == NF_KEY_MMM || nElemType == NF_KEY_MMMM ||
nElemType == NF_KEY_MMMMM );
WriteMonthElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : bLong ), bText );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
case NF_KEY_YY:
@@ -1485,10 +1485,10 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
{
//! distinguish EE and R
// calendar attribute for E and EE and R is set in first loop
- sal_Bool bLong = ( nElemType == NF_KEY_YYYY || nElemType == NF_KEY_EEC ||
+ bool bLong = ( nElemType == NF_KEY_YYYY || nElemType == NF_KEY_EEC ||
nElemType == NF_KEY_R );
WriteYearElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : bLong ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
case NF_KEY_G:
@@ -1497,27 +1497,27 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_KEY_RR: //! RR acts as GGGEE, no attribute available
{
//! distinguish GG and GGG and RR
- sal_Bool bLong = ( nElemType == NF_KEY_GGG || nElemType == NF_KEY_RR );
+ bool bLong = ( nElemType == NF_KEY_GGG || nElemType == NF_KEY_RR );
WriteEraElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : bLong ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
if ( nElemType == NF_KEY_RR )
{
// calendar attribute for RR is set in first loop
- WriteYearElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : sal_True ) );
+ WriteYearElement_Impl( aCalendar, ( bSystemDate || bLongSysDate ) );
}
}
break;
case NF_KEY_Q:
case NF_KEY_QQ:
{
- sal_Bool bLong = ( nElemType == NF_KEY_QQ );
+ bool bLong = ( nElemType == NF_KEY_QQ );
WriteQuarterElement_Impl( aCalendar, ( bSystemDate ? bLongSysDate : bLong ) );
- bAnyContent = sal_True;
+ bAnyContent = true;
}
break;
case NF_KEY_WW:
WriteWeekElement_Impl( aCalendar );
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
// time elements (bSystemDate is not used):
@@ -1525,22 +1525,22 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
case NF_KEY_H:
case NF_KEY_HH:
WriteHoursElement_Impl( nElemType == NF_KEY_HH );
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
case NF_KEY_MI:
case NF_KEY_MMI:
WriteMinutesElement_Impl( nElemType == NF_KEY_MMI );
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
case NF_KEY_S:
case NF_KEY_SS:
WriteSecondsElement_Impl( ( nElemType == NF_KEY_SS ), nPrecision );
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
case NF_KEY_AMPM:
case NF_KEY_AP:
WriteAMPMElement_Impl(); // short/long?
- bAnyContent = sal_True;
+ bAnyContent = true;
break;
case NF_SYMBOLTYPE_STAR :
// export only if ODF 1.2 extensions are enabled
@@ -1557,7 +1557,7 @@ void SvXMLNumFmtExport::ExportPart_Impl( const SvNumberformat& rFormat, sal_uInt
}
if ( !sTextContent.isEmpty() )
- bAnyContent = sal_True; // element written in FinishTextElement_Impl
+ bAnyContent = true; // element written in FinishTextElement_Impl
FinishTextElement_Impl(); // final text element - before maps
@@ -1638,21 +1638,21 @@ void SvXMLNumFmtExport::ExportFormat_Impl( const SvNumberformat& rFormat, sal_uI
for (nPart=0; nPart<nUsedParts; nPart++)
{
- sal_Bool bDefault = ( nPart+1 == nUsedParts ); // last = default
+ bool bDefault = ( nPart+1 == nUsedParts ); // last = default
ExportPart_Impl( rFormat, nKey, nPart, bDefault );
}
}
// export method called by application
-void SvXMLNumFmtExport::Export( sal_Bool bIsAutoStyle )
+void SvXMLNumFmtExport::Export( bool bIsAutoStyle )
{
if ( !pFormatter )
return; // no formatter -> no entries
sal_uInt32 nKey;
const SvNumberformat* pFormat = NULL;
- sal_Bool bNext(pUsedList->GetFirstUsed(nKey));
+ bool bNext(pUsedList->GetFirstUsed(nKey));
while(bNext)
{
pFormat = pFormatter->GetEntry(nKey);
@@ -1695,7 +1695,7 @@ void SvXMLNumFmtExport::Export( sal_Bool bIsAutoStyle )
OUString SvXMLNumFmtExport::GetStyleName( sal_uInt32 nKey )
{
if(pUsedList->IsUsed(nKey) || pUsedList->IsWasUsed(nKey))
- return lcl_CreateStyleName( nKey, 0, sal_True, sPrefix );
+ return lcl_CreateStyleName( nKey, 0, true, sPrefix );
else
{
OSL_FAIL("There is no written Data-Style");
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index a09911e17557..a9cf3dc36bad 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -52,10 +52,10 @@ using namespace ::xmloff::token;
struct SvXMLNumFmtEntry
{
OUString aName;
- sal_uInt32 nKey;
- sal_Bool bRemoveAfterUse;
+ sal_uInt32 nKey;
+ bool bRemoveAfterUse;
- SvXMLNumFmtEntry( const OUString& rN, sal_uInt32 nK, sal_Bool bR ) :
+ SvXMLNumFmtEntry( const OUString& rN, sal_uInt32 nK, bool bR ) :
aName(rN), nKey(nK), bRemoveAfterUse(bR) {}
};
@@ -70,8 +70,8 @@ struct SvXMLEmbeddedElement
nFormatPos(nFP), aText(rT) {}
// comparison operators for PTRARR sorting - sorted by position
- sal_Bool operator ==( const SvXMLEmbeddedElement& r ) const { return nFormatPos == r.nFormatPos; }
- sal_Bool operator < ( const SvXMLEmbeddedElement& r ) const { return nFormatPos < r.nFormatPos; }
+ bool operator ==( const SvXMLEmbeddedElement& r ) const { return nFormatPos == r.nFormatPos; }
+ bool operator < ( const SvXMLEmbeddedElement& r ) const { return nFormatPos < r.nFormatPos; }
};
typedef boost::ptr_set<SvXMLEmbeddedElement> SvXMLEmbeddedElementArr;
@@ -101,7 +101,7 @@ public:
const SvXMLTokenMap& GetStyleElemAttrTokenMap();
const LocaleDataWrapper& GetLocaleData( LanguageType nLang );
sal_uInt32 GetKeyForName( const OUString& rName );
- void AddKey( sal_uInt32 nKey, const OUString& rName, sal_Bool bRemoveAfterUse );
+ void AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemoveAfterUse );
void SetUsed( sal_uInt32 nKey );
void RemoveVolatileFormats();
};
@@ -114,16 +114,16 @@ struct SvXMLNumberInfo
sal_Int32 nNumerDigits;
sal_Int32 nDenomDigits;
sal_Int32 nFracDenominator;
- sal_Bool bGrouping;
- sal_Bool bDecReplace;
- sal_Bool bVarDecimals;
+ bool bGrouping;
+ bool bDecReplace;
+ bool bVarDecimals;
double fDisplayFactor;
SvXMLEmbeddedElementArr aEmbeddedElements;
SvXMLNumberInfo()
{
nDecimals = nInteger = nExpDigits = nNumerDigits = nDenomDigits = nFracDenominator = -1;
- bGrouping = bDecReplace = bVarDecimals = sal_False;
+ bGrouping = bDecReplace = bVarDecimals = false;
fDisplayFactor = 1.0;
}
};
@@ -132,12 +132,12 @@ class SvXMLNumFmtElementContext : public SvXMLImportContext
{
SvXMLNumFormatContext& rParent;
sal_uInt16 nType;
- OUStringBuffer aContent;
+ OUStringBuffer aContent;
SvXMLNumberInfo aNumInfo;
LanguageType nElementLang;
- sal_Bool bLong;
- sal_Bool bTextual;
- OUString sCalendar;
+ bool bLong;
+ bool bTextual;
+ OUString sCalendar;
public:
SvXMLNumFmtElementContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
@@ -205,7 +205,7 @@ class SvXMLNumFmtPropContext : public SvXMLImportContext
{
SvXMLNumFormatContext& rParent;
sal_Int32 m_nColor;
- sal_Bool bColSet;
+ bool bColSet;
public:
SvXMLNumFmtPropContext( SvXMLImport& rImport, sal_uInt16 nPrfx,
@@ -338,27 +338,27 @@ struct SvXMLDefaultDateFormat
SvXMLDateElementAttributes eHours;
SvXMLDateElementAttributes eMins;
SvXMLDateElementAttributes eSecs;
- sal_Bool bSystem;
+ bool bSystem;
};
static const SvXMLDefaultDateFormat aDefaultDateFormats[] =
{
// format day-of-week day month year hours minutes seconds format-source
- { NF_DATE_SYSTEM_SHORT, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_True },
- { NF_DATE_SYSTEM_LONG, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_True },
- { NF_DATE_SYS_MMYY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DDMMM, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_TEXTSHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DDMMYYYY, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DDMMYY, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DMMMYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DMMMYYYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_DMMMMYYYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_NNDMMMYY, XML_DEA_SHORT, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_NNDMMMMYYYY, XML_DEA_SHORT, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATE_SYS_NNNNDMMMMYYYY, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, sal_False },
- { NF_DATETIME_SYSTEM_SHORT_HHMM, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, sal_True },
- { NF_DATETIME_SYS_DDMMYYYY_HHMMSS, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, sal_False }
+ { NF_DATE_SYSTEM_SHORT, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, true },
+ { NF_DATE_SYSTEM_LONG, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, true },
+ { NF_DATE_SYS_MMYY, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DDMMM, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_TEXTSHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DDMMYYYY, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DDMMYY, XML_DEA_NONE, XML_DEA_LONG, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DMMMYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DMMMYYYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_DMMMMYYYY, XML_DEA_NONE, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_NNDMMMYY, XML_DEA_SHORT, XML_DEA_SHORT, XML_DEA_TEXTSHORT, XML_DEA_SHORT, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_NNDMMMMYYYY, XML_DEA_SHORT, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATE_SYS_NNNNDMMMMYYYY, XML_DEA_LONG, XML_DEA_SHORT, XML_DEA_TEXTLONG, XML_DEA_LONG, XML_DEA_NONE, XML_DEA_NONE, XML_DEA_NONE, false },
+ { NF_DATETIME_SYSTEM_SHORT_HHMM, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_NONE, true },
+ { NF_DATETIME_SYS_DDMMYYYY_HHMMSS, XML_DEA_NONE, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, XML_DEA_ANY, false }
};
@@ -400,7 +400,7 @@ sal_uInt32 SvXMLNumImpData::GetKeyForName( const OUString& rName )
return NUMBERFORMAT_ENTRY_NOT_FOUND;
}
-void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, sal_Bool bRemoveAfterUse )
+void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, bool bRemoveAfterUse )
{
if ( bRemoveAfterUse )
{
@@ -413,7 +413,7 @@ void SvXMLNumImpData::AddKey( sal_uInt32 nKey, const OUString& rName, sal_Bool b
SvXMLNumFmtEntry* pObj = &aNameEntries[i];
if ( pObj->nKey == nKey && !pObj->bRemoveAfterUse )
{
- bRemoveAfterUse = sal_False; // clear flag for new entry
+ bRemoveAfterUse = false; // clear flag for new entry
break;
}
}
@@ -436,7 +436,7 @@ void SvXMLNumImpData::SetUsed( sal_uInt32 nKey )
SvXMLNumFmtEntry* pObj = &aNameEntries[i];
if ( pObj->nKey == nKey )
{
- pObj->bRemoveAfterUse = sal_False; // used -> don't remove
+ pObj->bRemoveAfterUse = false; // used -> don't remove
// continue searching - there may be several entries for the same key
// (with different names), the format must not be deleted if any one of
@@ -658,7 +658,7 @@ SvXMLNumFmtPropContext::SvXMLNumFmtPropContext( SvXMLImport& rImport,
const uno::Reference<xml::sax::XAttributeList>& xAttrList ) :
SvXMLImportContext( rImport, nPrfx, rLName ),
rParent( rParentContext ),
- bColSet( sal_False )
+ bColSet( false )
{
sal_Int16 nAttrCount = xAttrList.is() ? xAttrList->getLength() : 0;
for( sal_Int16 i=0; i < nAttrCount; i++ )
@@ -747,7 +747,7 @@ void SvXMLNumFmtEmbeddedTextContext::EndElement()
rParent.AddEmbeddedElement( nTextPosition, aContent.makeStringAndClear() );
}
-static sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent )
+static bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& rParent )
{
sal_uInt16 nFormatType = rParent.GetType();
@@ -766,7 +766,7 @@ static sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& r
// because the same character can be a date separator that should not be quoted
// in date formats.
- return sal_False; // force quotes
+ return false; // force quotes
}
// see ImpSvNumberformatScan::Next_Symbol
@@ -777,25 +777,25 @@ static sal_Bool lcl_ValidChar( sal_Unicode cChar, const SvXMLNumFormatContext& r
cChar == ',' ||
cChar == ':' ||
cChar == '\'' )
- return sal_True; // for all format types
+ return true; // for all format types
// percent sign must be used without quotes for percentage styles only
if ( nFormatType == XML_TOK_STYLES_PERCENTAGE_STYLE && cChar == '%' )
- return sal_True;
+ return true;
// don't put quotes around single parentheses (often used for negative numbers)
if ( ( nFormatType == XML_TOK_STYLES_NUMBER_STYLE ||
nFormatType == XML_TOK_STYLES_CURRENCY_STYLE ||
nFormatType == XML_TOK_STYLES_PERCENTAGE_STYLE ) &&
( cChar == '(' || cChar == ')' ) )
- return sal_True;
+ return true;
- return sal_False;
+ return false;
}
static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumFormatContext& rParent )
{
- sal_Bool bQuote = sal_True;
+ bool bQuote = true;
sal_Int32 nLength = rContent.getLength();
if ( ( nLength == 1 &&
@@ -806,7 +806,7 @@ static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumForm
{
// don't quote single separator characters like space or percent,
// or separator characters followed by space (used in date formats)
- bQuote = sal_False;
+ bQuote = false;
}
else if ( rParent.GetType() == XML_TOK_STYLES_PERCENTAGE_STYLE && nLength > 1 )
{
@@ -843,7 +843,7 @@ static void lcl_EnquoteIfNecessary( OUStringBuffer& rContent, const SvXMLNumForm
rContent.insert( 0, '"' );
}
}
- bQuote = sal_False;
+ bQuote = false;
}
// else: normal quoting (below)
}
@@ -909,8 +909,8 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
rParent( rParentContext ),
nType( nNewType ),
nElementLang( LANGUAGE_SYSTEM ),
- bLong( sal_False ),
- bTextual( sal_False )
+ bLong( false ),
+ bTextual( false )
{
LanguageTagODF aLanguageTagODF;
sal_Int32 nAttrVal;
@@ -949,9 +949,9 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
break;
case XML_TOK_ELEM_ATTR_DECIMAL_REPLACEMENT:
if ( !sValue.isEmpty() )
- aNumInfo.bDecReplace = sal_True; // only a default string is supported
+ aNumInfo.bDecReplace = true; // only a default string is supported
else
- aNumInfo.bVarDecimals = sal_True; // empty replacement string: variable decimals
+ aNumInfo.bVarDecimals = true; // empty replacement string: variable decimals
break;
case XML_TOK_ELEM_ATTR_MIN_EXPONENT_DIGITS:
if (::sax::Converter::convertNumber( nAttrVal, sValue, 0 ))
@@ -983,7 +983,7 @@ SvXMLNumFmtElementContext::SvXMLNumFmtElementContext( SvXMLImport& rImport,
break;
case XML_TOK_ELEM_ATTR_STYLE:
if ( SvXMLUnitConverter::convertEnum( nAttrEnum, sValue, aStyleValueMap ) )
- bLong = (sal_Bool) nAttrEnum;
+ bLong = (bool) nAttrEnum;
break;
case XML_TOK_ELEM_ATTR_TEXTUAL:
if (::sax::Converter::convertBool( bAttrBool, sValue ))
@@ -1053,7 +1053,7 @@ void SvXMLNumFmtElementContext::AddEmbeddedElement( sal_Int32 nFormatPos, const
void SvXMLNumFmtElementContext::EndElement()
{
- sal_Bool bEffLong = bLong;
+ bool bEffLong = bLong;
switch (nType)
{
case XML_TOK_STYLE_TEXT:
@@ -1068,7 +1068,7 @@ void SvXMLNumFmtElementContext::EndElement()
aContent = OUStringBuffer();
}
- rParent.SetHasLongDoW( sal_False ); // only once
+ rParent.SetHasLongDoW( false ); // only once
}
if ( !aContent.isEmpty() )
{
@@ -1237,7 +1237,7 @@ sal_uInt16 SvXMLNumFmtDefaults::GetDefaultDateFormat( SvXMLDateElementAttributes
SvXMLDateElementAttributes eDay, SvXMLDateElementAttributes eMonth,
SvXMLDateElementAttributes eYear, SvXMLDateElementAttributes eHours,
SvXMLDateElementAttributes eMins, SvXMLDateElementAttributes eSecs,
- sal_Bool bSystem )
+ bool bSystem )
{
static const sal_uInt16 nCount = sizeof(aDefaultDateFormats) / sizeof(SvXMLDefaultDateFormat);
for (sal_uInt16 nPos=0; nPos<nCount; nPos++)
@@ -1275,16 +1275,16 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
nType( nNewType ),
nKey(-1),
nFormatLang( LANGUAGE_SYSTEM ),
- bAutoOrder( sal_False ),
- bFromSystem( sal_False ),
- bTruncate( sal_True ),
- bAutoDec( sal_False ),
- bAutoInt( sal_False ),
- bHasExtraText( sal_False ),
- bHasLongDoW( sal_False ),
- bHasEra( sal_False ),
- bHasDateTime( sal_False ),
- bRemoveAfterUse( sal_False ),
+ bAutoOrder( false ),
+ bFromSystem( false ),
+ bTruncate( true ),
+ bAutoDec( false ),
+ bAutoInt( false ),
+ bHasExtraText( false ),
+ bHasLongDoW( false ),
+ bHasEra( false ),
+ bHasDateTime( false ),
+ bRemoveAfterUse( false ),
eDateDOW( XML_DEA_NONE ),
eDateDay( XML_DEA_NONE ),
eDateMonth( XML_DEA_NONE ),
@@ -1292,7 +1292,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
eDateHours( XML_DEA_NONE ),
eDateMins( XML_DEA_NONE ),
eDateSecs( XML_DEA_NONE ),
- bDateNoDefault( sal_False )
+ bDateNoDefault( false )
{
LanguageTagODF aLanguageTagODF;
OUString sNatNumAttrScript, sNatNumAttrRfcLanguageTag;
@@ -1335,7 +1335,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
break;
case XML_TOK_STYLE_ATTR_FORMAT_SOURCE:
if ( SvXMLUnitConverter::convertEnum( nAttrEnum, sValue, aFormatSourceMap ) )
- bFromSystem = (sal_Bool) nAttrEnum;
+ bFromSystem = (bool) nAttrEnum;
break;
case XML_TOK_STYLE_ATTR_TRUNCATE_ON_OVERFLOW:
if (::sax::Converter::convertBool( bAttrBool, sValue ))
@@ -1414,16 +1414,16 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
nType( 0 ),
nKey(nTempKey),
nFormatLang( LANGUAGE_SYSTEM ),
- bAutoOrder( sal_False ),
- bFromSystem( sal_False ),
- bTruncate( sal_True ),
- bAutoDec( sal_False ),
- bAutoInt( sal_False ),
- bHasExtraText( sal_False ),
- bHasLongDoW( sal_False ),
- bHasEra( sal_False ),
- bHasDateTime( sal_False ),
- bRemoveAfterUse( sal_False ),
+ bAutoOrder( false ),
+ bFromSystem( false ),
+ bTruncate( true ),
+ bAutoDec( false ),
+ bAutoInt( false ),
+ bHasExtraText( false ),
+ bHasLongDoW( false ),
+ bHasEra( false ),
+ bHasDateTime( false ),
+ bRemoveAfterUse( false ),
eDateDOW( XML_DEA_NONE ),
eDateDay( XML_DEA_NONE ),
eDateMonth( XML_DEA_NONE ),
@@ -1431,7 +1431,7 @@ SvXMLNumFormatContext::SvXMLNumFormatContext( SvXMLImport& rImport,
eDateHours( XML_DEA_NONE ),
eDateMins( XML_DEA_NONE ),
eDateSecs( XML_DEA_NONE ),
- bDateNoDefault( sal_False )
+ bDateNoDefault( false )
{
SetAttribute(XML_NAMESPACE_STYLE, GetXMLToken(XML_NAME), rLName);
}
@@ -1499,7 +1499,7 @@ sal_Int32 SvXMLNumFormatContext::GetKey()
if (bRemoveAfterUse)
{
// format is used -> don't remove
- bRemoveAfterUse = sal_False;
+ bRemoveAfterUse = false;
if (pData)
pData->SetUsed(nKey);
@@ -1512,7 +1512,7 @@ sal_Int32 SvXMLNumFormatContext::GetKey()
else
{
// reset bRemoveAfterUse before CreateAndInsert, so AddKey is called without bRemoveAfterUse set
- bRemoveAfterUse = sal_False;
+ bRemoveAfterUse = false;
CreateAndInsert(true);
return nKey;
}
@@ -1569,7 +1569,7 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
for (sal_uInt32 i = 0; i < aMyConditions.size(); i++)
{
SvXMLNumFormatContext* pStyle = (SvXMLNumFormatContext *)pStyles->FindStyleChildContext(
- XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName, sal_False);
+ XML_STYLE_FAMILY_DATA_STYLE, aMyConditions[i].sMapName, false);
if (pStyle)
{
if ((pStyle->PrivateGetKey() > -1)) // don't reset pStyle's bRemoveAfterUse flag
@@ -1639,14 +1639,14 @@ sal_Int32 SvXMLNumFormatContext::CreateAndInsert(SvNumberFormatter* pFormatter)
{
sal_Int32 nErrPos = 0;
short l_nType = 0;
- sal_Bool bOk = pFormatter->PutEntry( aFormatStr, nErrPos, l_nType, nIndex, nFormatLang );
+ bool bOk = pFormatter->PutEntry( aFormatStr, nErrPos, l_nType, nIndex, nFormatLang );
if ( !bOk && nErrPos == 0 && aFormatStr != sFormat )
{
// if the string was modified by PutEntry, look for an existing format
// with the modified string
nIndex = pFormatter->GetEntryKey( aFormatStr, nFormatLang );
if ( nIndex != NUMBERFORMAT_ENTRY_NOT_FOUND )
- bOk = sal_True;
+ bOk = true;
}
if (!bOk)
nIndex = NUMBERFORMAT_ENTRY_NOT_FOUND;
@@ -1720,13 +1720,13 @@ const LocaleDataWrapper& SvXMLNumFormatContext::GetLocaleData() const
void SvXMLNumFormatContext::AddToCode( sal_Unicode c )
{
aFormatCode.append( c );
- bHasExtraText = sal_True;
+ bHasExtraText = true;
}
void SvXMLNumFormatContext::AddToCode( const OUString& rString )
{
aFormatCode.append( rString );
- bHasExtraText = sal_True;
+ bHasExtraText = true;
}
void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
@@ -1774,10 +1774,10 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
if ( rInfo.bDecReplace || rInfo.bVarDecimals )
nGenPrec = 0; // generate format without decimals...
- sal_Bool bGrouping = rInfo.bGrouping;
+ bool bGrouping = rInfo.bGrouping;
sal_uInt16 nEmbeddedCount = rInfo.aEmbeddedElements.size();
if ( nEmbeddedCount )
- bGrouping = sal_False; // grouping and embedded characters can't be used together
+ bGrouping = false; // grouping and embedded characters can't be used together
sal_uInt32 nStdIndex = pFormatter->GetStandardIndex( nFormatLang );
OUStringBuffer aNumStr = pFormatter->GenerateFormat( nStdIndex, nFormatLang,
@@ -1869,7 +1869,7 @@ void SvXMLNumFormatContext::AddNumber( const SvXMLNumberInfo& rInfo )
void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType nLang )
{
- sal_Bool bAutomatic = sal_False;
+ bool bAutomatic = false;
OUString aSymbol = rContent;
if ( aSymbol.isEmpty())
{
@@ -1881,13 +1881,13 @@ void SvXMLNumFormatContext::AddCurrency( const OUString& rContent, LanguageType
pFormatter->GetCompatibilityCurrency( sCurString, sDummy );
aSymbol = sCurString;
- bAutomatic = sal_True;
+ bAutomatic = true;
}
}
else if ( nLang == LANGUAGE_SYSTEM && aSymbol.equalsAscii("CCC") )
{
// "CCC" is used for automatic long symbol
- bAutomatic = sal_True;
+ bAutomatic = true;
}
if ( bAutomatic )
@@ -1941,12 +1941,12 @@ void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex )
return;
if ( nIndex == NF_KEY_G || nIndex == NF_KEY_GG || nIndex == NF_KEY_GGG )
- bHasEra = sal_True;
+ bHasEra = true;
if ( nIndex == NF_KEY_NNNN )
{
nIndex = NF_KEY_NNN;
- bHasLongDoW = sal_True; // to remove string constant with separator
+ bHasLongDoW = true; // to remove string constant with separator
}
OUString sKeyword = pFormatter->GetKeyword( nFormatLang, nIndex );
@@ -1964,7 +1964,7 @@ void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex )
{
aFormatCode.append( sKeyword );
}
- bHasDateTime = sal_True;
+ bHasDateTime = true;
}
else
{
@@ -1993,33 +1993,33 @@ void SvXMLNumFormatContext::AddNfKeyword( sal_uInt16 nIndex )
case NF_KEY_AP:
case NF_KEY_AMPM: break; // AM/PM may or may not be in date/time formats -> ignore by itself
default:
- bDateNoDefault = sal_True; // any other element -> no default format
+ bDateNoDefault = true; // any other element -> no default format
}
}
-static sal_Bool lcl_IsAtEnd( OUStringBuffer& rBuffer, const OUString& rToken )
+static bool lcl_IsAtEnd( OUStringBuffer& rBuffer, const OUString& rToken )
{
sal_Int32 nBufLen = rBuffer.getLength();
sal_Int32 nTokLen = rToken.getLength();
if ( nTokLen > nBufLen )
- return sal_False;
+ return false;
sal_Int32 nStartPos = nBufLen - nTokLen;
for ( sal_Int32 nTokPos = 0; nTokPos < nTokLen; nTokPos++ )
if ( rToken[ nTokPos ] != rBuffer[nStartPos + nTokPos] )
- return sal_False;
+ return false;
- return sal_True;
+ return true;
}
-sal_Bool SvXMLNumFormatContext::ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nNew )
+bool SvXMLNumFormatContext::ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nNew )
{
// replaces one keyword with another if it is found at the end of the code
SvNumberFormatter* pFormatter = pData->GetNumberFormatter();
if (!pFormatter)
- return sal_False;
+ return false;
OUString sOldStr = pFormatter->GetKeyword( nFormatLang, nOld );
if ( lcl_IsAtEnd( aFormatCode, sOldStr ) )
@@ -2031,9 +2031,9 @@ sal_Bool SvXMLNumFormatContext::ReplaceNfKeyword( sal_uInt16 nOld, sal_uInt16 nN
OUString sNewStr = pFormatter->GetKeyword( nFormatLang, nNew );
aFormatCode.append( sNewStr );
- return sal_True; // changed
+ return true; // changed
}
- return sal_False; // not found
+ return false; // not found
}
void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
@@ -2052,18 +2052,18 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
//! test for default conditions
OUString sRealCond = rCondition.copy( nValLen, rCondition.getLength() - nValLen );
- sal_Bool bDefaultCond = sal_False;
+ bool bDefaultCond = false;
//! collect all conditions first and adjust default to >=0, >0 or <0 depending on count
//! allow blanks in conditions
if ( aConditions.isEmpty() && aMyConditions.size() == 1 && sRealCond.equalsAscii( ">=0" ) )
- bDefaultCond = sal_True;
+ bDefaultCond = true;
if ( nType == XML_TOK_STYLES_TEXT_STYLE && nIndex == 2 )
{
// The third condition in a number format with a text part can only be
// "all other numbers", the condition string must be empty.
- bDefaultCond = sal_True;
+ bDefaultCond = true;
}
if (!bDefaultCond)
@@ -2133,7 +2133,7 @@ void SvXMLNumFormatContext::UpdateCalendar( const OUString& rNewCalendar )
}
}
-sal_Bool SvXMLNumFormatContext::IsSystemLanguage()
+bool SvXMLNumFormatContext::IsSystemLanguage()
{
return nFormatLang == LANGUAGE_SYSTEM;
}
diff --git a/xmloff/source/style/xmlnumi.cxx b/xmloff/source/style/xmlnumi.cxx
index eb911bd4c40b..bdd57891bdb8 100644
--- a/xmloff/source/style/xmlnumi.cxx
+++ b/xmloff/source/style/xmlnumi.cxx
@@ -544,8 +544,7 @@ Sequence<beans::PropertyValue> SvxXMLListLevelStyleContext_Impl::GetProperties(
OUString sStr( sImageURL );
if( !sImageURL.isEmpty() )
{
- sStr = GetImport().ResolveGraphicObjectURL( sImageURL,
- sal_False );
+ sStr = GetImport().ResolveGraphicObjectURL( sImageURL, false );
}
else if( xBase64Stream.is() )
{
diff --git a/xmloff/source/text/XMLTextListAutoStylePool.cxx b/xmloff/source/text/XMLTextListAutoStylePool.cxx
index 99cfaa55a437..c24d693568bc 100644
--- a/xmloff/source/text/XMLTextListAutoStylePool.cxx
+++ b/xmloff/source/text/XMLTextListAutoStylePool.cxx
@@ -266,7 +266,7 @@ void XMLTextListAutoStylePool::exportXML() const
for( i=0; i < nCount; i++ )
{
XMLTextListAutoStylePoolEntry_Impl *pEntry = aExpEntries[i];
- aNumRuleExp.exportNumberingRule( pEntry->GetName(), sal_False,
+ aNumRuleExp.exportNumberingRule( pEntry->GetName(), false,
pEntry->GetNumRules() );
}
delete [] aExpEntries;