summaryrefslogtreecommitdiff
path: root/svl/source/numbers
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:24:53 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:47 +0100
commitbf057fab3c0d17bf2832c8d9fc6d34b1b859e660 (patch)
tree7792f30782655fa9f0830b7320f9ff988c598fb1 /svl/source/numbers
parent6f06230da10c6a51c5538f1b5515b341475ea043 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I0f2f81dae91f62639e79799b1bed1b2df1fd79ab
Diffstat (limited to 'svl/source/numbers')
-rw-r--r--svl/source/numbers/numfmuno.cxx36
-rw-r--r--svl/source/numbers/numuno.cxx4
-rw-r--r--svl/source/numbers/supservs.cxx8
-rw-r--r--svl/source/numbers/zforfind.cxx16
-rw-r--r--svl/source/numbers/zforfind.hxx14
-rw-r--r--svl/source/numbers/zforlist.cxx44
-rw-r--r--svl/source/numbers/zformat.cxx32
-rw-r--r--svl/source/numbers/zforscan.cxx2
8 files changed, 78 insertions, 78 deletions
diff --git a/svl/source/numbers/numfmuno.cxx b/svl/source/numbers/numfmuno.cxx
index 89b54db038b1..60bbbfd56bcb 100644
--- a/svl/source/numbers/numfmuno.cxx
+++ b/svl/source/numbers/numfmuno.cxx
@@ -149,7 +149,7 @@ sal_Int32 SAL_CALL SvNumberFormatterServiceObj::detectNumberFormat( sal_Int32 nK
::osl::MutexGuard aGuard( m_aMutex );
sal_Int32 nRet = 0;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
sal_uInt32 nUKey = nKey;
@@ -171,7 +171,7 @@ double SAL_CALL SvNumberFormatterServiceObj::convertStringToNumber( sal_Int32 nK
::osl::MutexGuard aGuard( m_aMutex );
double fRet = 0.0;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
sal_uInt32 nUKey = nKey;
@@ -193,10 +193,10 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToString( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aRet, &pColor);
}
else
@@ -213,11 +213,11 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForNumber( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(fValue, nKey, aStr, &pColor);
if (pColor)
nRet = pColor->GetColor();
@@ -236,10 +236,10 @@ OUString SAL_CALL SvNumberFormatterServiceObj::formatString( sal_Int32 nKey,
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aRet, &pColor);
}
else
@@ -257,11 +257,11 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryColorForString( sal_Int32
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aStr;
- Color* pColor = NULL;
+ Color* pColor = nullptr;
pFormatter->GetOutputString(aString, nKey, aStr, &pColor);
if (pColor)
{
@@ -283,7 +283,7 @@ OUString SAL_CALL SvNumberFormatterServiceObj::getInputString( sal_Int32 nKey, d
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
pFormatter->GetInputLineString(fValue, nKey, aRet);
else
@@ -303,11 +303,11 @@ OUString SAL_CALL SvNumberFormatterServiceObj::convertNumberToPreviewString( con
::osl::MutexGuard aGuard( m_aMutex );
OUString aRet;
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = NULL;
+ Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
@@ -334,12 +334,12 @@ util::Color SAL_CALL SvNumberFormatterServiceObj::queryPreviewColorForNumber( co
::osl::MutexGuard aGuard( m_aMutex );
util::Color nRet = aDefaultColor; // color = sal_Int32
- SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : NULL;
+ SvNumberFormatter* pFormatter = xSupplier.is() ? xSupplier->GetNumberFormatter() : nullptr;
if (pFormatter)
{
OUString aOutString;
LanguageType eLang = lcl_GetLanguage( nLocale );
- Color* pColor = NULL;
+ Color* pColor = nullptr;
bool bOk;
if ( bAllowEnglish )
@@ -405,7 +405,7 @@ uno::Reference<beans::XPropertySet> SAL_CALL SvNumberFormatsObj::getByKey( sal_I
::osl::MutexGuard aGuard( m_aMutex );
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
return new SvNumberFormatObj( rSupplier, nKey, m_aMutex );
else
@@ -717,7 +717,7 @@ uno::Any SAL_CALL SvNumberFormatObj::getPropertyValue( const OUString& aProperty
uno::Any aRet;
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
{
bool bThousand, bRed;
@@ -844,7 +844,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL SvNumberFormatObj::getPropertyValue
::osl::MutexGuard aGuard( m_aMutex );
SvNumberFormatter* pFormatter = rSupplier.GetNumberFormatter();
- const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : NULL;
+ const SvNumberformat* pFormat = pFormatter ? pFormatter->GetEntry(nKey) : nullptr;
if (pFormat)
{
OUString aSymbol, aExt;
diff --git a/svl/source/numbers/numuno.cxx b/svl/source/numbers/numuno.cxx
index 4bfb4a4282b4..5f7bd780d1bc 100644
--- a/svl/source/numbers/numuno.cxx
+++ b/svl/source/numbers/numuno.cxx
@@ -41,7 +41,7 @@ public:
// Default ctor for getReflection
SvNumberFormatsSupplierObj::SvNumberFormatsSupplierObj()
{
- pImpl = new SvNumFmtSuppl_Impl(NULL);
+ pImpl = new SvNumFmtSuppl_Impl(nullptr);
}
SvNumberFormatsSupplierObj::SvNumberFormatsSupplierObj(SvNumberFormatter* pForm)
@@ -117,7 +117,7 @@ const uno::Sequence<sal_Int8>& SvNumberFormatsSupplierObj::getUnoTunnelId()
SvNumberFormatsSupplierObj* SvNumberFormatsSupplierObj::getImplementation(
const uno::Reference<util::XNumberFormatsSupplier>& rObj )
{
- SvNumberFormatsSupplierObj* pRet = NULL;
+ SvNumberFormatsSupplierObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<SvNumberFormatsSupplierObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething( getUnoTunnelId() )));
diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx
index d3d07e71756e..2c5c777d3681 100644
--- a/svl/source/numbers/supservs.cxx
+++ b/svl/source/numbers/supservs.cxx
@@ -41,7 +41,7 @@ using namespace ::utl;
SvNumberFormatsSupplierServiceObject::SvNumberFormatsSupplierServiceObject(const css::uno::Reference< css::uno::XComponentContext >& _rxORB)
- :m_pOwnFormatter(NULL)
+ :m_pOwnFormatter(nullptr)
,m_xORB(_rxORB)
{
}
@@ -51,7 +51,7 @@ SvNumberFormatsSupplierServiceObject::~SvNumberFormatsSupplierServiceObject()
if (m_pOwnFormatter)
{
delete m_pOwnFormatter;
- m_pOwnFormatter = NULL;
+ m_pOwnFormatter = nullptr;
}
}
@@ -72,14 +72,14 @@ void SAL_CALL SvNumberFormatsSupplierServiceObject::initialize( const Sequence<
{
::osl::MutexGuard aGuard( getSharedMutex() );
- DBG_ASSERT(m_pOwnFormatter == NULL,
+ DBG_ASSERT(m_pOwnFormatter == nullptr,
"SvNumberFormatsSupplierServiceObject::initialize : already initialized !");
// maybe you already called a method which needed the formatter
// you should use XMultiServiceFactory::createInstanceWithArguments to avoid that
if (m_pOwnFormatter)
{ // !!! this is only a emergency handling, normally this should not occur !!!
delete m_pOwnFormatter;
- m_pOwnFormatter = NULL;
+ m_pOwnFormatter = nullptr;
SetNumberFormatter(m_pOwnFormatter);
}
diff --git a/svl/source/numbers/zforfind.cxx b/svl/source/numbers/zforfind.cxx
index 07d9dd10f9f8..da04cfca494e 100644
--- a/svl/source/numbers/zforfind.cxx
+++ b/svl/source/numbers/zforfind.cxx
@@ -69,14 +69,14 @@ static const sal_Unicode cNarrowNoBreakSpace = 0x202F;
ImpSvNumberInputScan::ImpSvNumberInputScan( SvNumberFormatter* pFormatterP )
:
- pUpperMonthText( NULL ),
- pUpperAbbrevMonthText( NULL ),
- pUpperGenitiveMonthText( NULL ),
- pUpperGenitiveAbbrevMonthText( NULL ),
- pUpperPartitiveMonthText( NULL ),
- pUpperPartitiveAbbrevMonthText( NULL ),
- pUpperDayText( NULL ),
- pUpperAbbrevDayText( NULL ),
+ pUpperMonthText( nullptr ),
+ pUpperAbbrevMonthText( nullptr ),
+ pUpperGenitiveMonthText( nullptr ),
+ pUpperGenitiveAbbrevMonthText( nullptr ),
+ pUpperPartitiveMonthText( nullptr ),
+ pUpperPartitiveAbbrevMonthText( nullptr ),
+ pUpperDayText( nullptr ),
+ pUpperAbbrevDayText( nullptr ),
bTextInitialized( false ),
bScanGenitiveMonths( false ),
bScanPartitiveMonths( false ),
diff --git a/svl/source/numbers/zforfind.hxx b/svl/source/numbers/zforfind.hxx
index 9c7ae84d8736..5d940a3277df 100644
--- a/svl/source/numbers/zforfind.hxx
+++ b/svl/source/numbers/zforfind.hxx
@@ -46,7 +46,7 @@ public:
bool IsNumberFormat( const OUString& rString, /// input string
short& F_Type, /// format type (in + out)
double& fOutNumber, /// value determined (out)
- const SvNumberformat* pFormat = NULL); /// optional a number format to which compare against
+ const SvNumberformat* pFormat = nullptr); /// optional a number format to which compare against
/// after IsNumberFormat: get decimal position
short GetDecPos() const { return nDecPos; }
@@ -295,7 +295,7 @@ private:
// Get currency symbol and advance string position
bool GetCurrency( const OUString& rString,
sal_Int32& nPos,
- const SvNumberformat* pFormat = NULL ); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr ); // optional number format to match against
// Get symbol AM or PM and advance string position
bool GetTimeAmPm( const OUString& rString,
@@ -336,21 +336,21 @@ private:
// Conversion of date to number
bool GetDateRef( double& fDays, // OUT: days diff to null date
sal_uInt16& nCounter, // Count of date substrings
- const SvNumberformat* pFormat = NULL ); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr ); // optional number format to match against
// Analyze start of string
bool ScanStartString( const OUString& rString,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Analyze middle substring
bool ScanMidString( const OUString& rString,
sal_uInt16 nStringPos,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Analyze end of string
bool ScanEndString( const OUString& rString,
- const SvNumberformat* pFormat = NULL );
+ const SvNumberformat* pFormat = nullptr );
// Compare rString to substring of array indexed by nString
// nString == 0xFFFF => last substring
@@ -370,7 +370,7 @@ private:
// Main analyzing function
bool IsNumberFormatMain( const OUString& rString,
- const SvNumberformat* pFormat = NULL); // optional number format to match against
+ const SvNumberformat* pFormat = nullptr); // optional number format to match against
static inline bool MyIsdigit( sal_Unicode c );
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index bbae9c00332a..53b421376b8c 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -227,7 +227,7 @@ void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBro
-SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = NULL;
+SvNumberFormatterRegistry_Impl* SvNumberFormatter::pFormatterRegistry = nullptr;
bool SvNumberFormatter::bCurrencyTableInitialized = false;
namespace
{
@@ -267,7 +267,7 @@ SvNumberFormatter::~SvNumberFormatter()
if ( !pFormatterRegistry->Count() )
{
delete pFormatterRegistry;
- pFormatterRegistry = NULL;
+ pFormatterRegistry = nullptr;
}
}
@@ -309,10 +309,10 @@ void SvNumberFormatter::ImpConstruct( LanguageType eLang )
pStringScanner = new ImpSvNumberInputScan( this );
pFormatScanner = new ImpSvNumberformatScan( this );
- pFormatTable = NULL;
+ pFormatTable = nullptr;
MaxCLOffset = 0;
ImpGenerateFormats( 0, false ); // 0 .. 999 for initialized language formats
- pMergeTable = NULL;
+ pMergeTable = nullptr;
bNoZero = false;
::osl::MutexGuard aGuard( GetMutex() );
@@ -347,7 +347,7 @@ void SvNumberFormatter::ChangeIntl(LanguageType eLnge)
// static
::osl::Mutex& SvNumberFormatter::GetMutex()
{
- static ::osl::Mutex* pMutex = NULL;
+ static ::osl::Mutex* pMutex = nullptr;
if( !pMutex )
{
::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
@@ -387,7 +387,7 @@ Color* SvNumberFormatter::GetUserDefColor(sal_uInt16 nIndex)
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -1471,7 +1471,7 @@ void SvNumberFormatter::GetOutputString(const OUString& sString,
}
if (!pFormat->IsTextFormat() && !pFormat->HasTextFormat())
{
- *ppColor = NULL;
+ *ppColor = nullptr;
sOutString = sString;
}
else
@@ -1704,7 +1704,7 @@ bool SvNumberFormatter::GetPreviewString( const OUString& sFormatString,
}
else
{
- *ppColor = NULL;
+ *ppColor = nullptr;
sOutString = sPreviewString;
}
}
@@ -1791,7 +1791,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
- return NULL;
+ return nullptr;
}
if ( rCode.Index >= NF_INDEX_TABLE_LOCALE_DATA_DEFAULTS )
{
@@ -1823,7 +1823,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
}
}
delete pFormat;
- return NULL;
+ return nullptr;
}
else if ( nPos - nCLOffset >= SV_COUNTRY_LANGUAGE_OFFSET )
{
@@ -1836,7 +1836,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
LocaleDataWrapper::outputCheckMessage( xLocaleData->appendLocaleInfo( aMsg));
}
delete pFormat;
- return NULL;
+ return nullptr;
}
}
if ( !aFTable.insert( make_pair( nPos, pFormat) ).second )
@@ -1856,7 +1856,7 @@ SvNumberformat* SvNumberFormatter::ImpInsertFormat( const css::i18n::NumberForma
SAL_WARN( "svl.numbers", "SvNumberFormatter::ImpInsertFormat: dup position");
}
delete pFormat;
- return NULL;
+ return nullptr;
}
if ( rCode.Default )
pFormat->SetStandard();
@@ -2131,7 +2131,7 @@ SvNumberformat* SvNumberFormatter::GetFormatEntry( sal_uInt32 nKey )
SvNumberFormatTable::iterator it = aFTable.find( nKey);
if (it != aFTable.end())
return it->second;
- return 0;
+ return nullptr;
}
const SvNumberformat* SvNumberFormatter::GetFormatEntry( sal_uInt32 nKey ) const
@@ -2144,7 +2144,7 @@ const SvNumberformat* SvNumberFormatter::GetEntry( sal_uInt32 nKey ) const
SvNumberFormatTable::const_iterator it = aFTable.find( nKey);
if (it != aFTable.end())
return it->second;
- return 0;
+ return nullptr;
}
void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditionalFormats )
@@ -2159,7 +2159,7 @@ void SvNumberFormatter::ImpGenerateFormats( sal_uInt32 CLOffset, bool bNoAdditio
NumberFormatCodeWrapper aNumberFormatCode( m_xContext,
GetLanguageTag().getLocale() );
- SvNumberformat* pNewFormat = NULL;
+ SvNumberformat* pNewFormat = nullptr;
sal_Int32 nIdx;
bool bDefault;
@@ -3147,7 +3147,7 @@ const NfCurrencyEntry* SvNumberFormatter::MatchSystemCurrency()
{
// MUST call GetTheCurrencyTable() before accessing nSystemCurrencyPosition
const NfCurrencyTable& rTable = GetTheCurrencyTable();
- return nSystemCurrencyPosition ? &rTable[nSystemCurrencyPosition] : NULL;
+ return nSystemCurrencyPosition ? &rTable[nSystemCurrencyPosition] : nullptr;
}
@@ -3188,7 +3188,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry(const OUString& rAbbr
return &rTable[j];
}
}
- return NULL;
+ return nullptr;
}
@@ -3210,7 +3210,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetLegacyOnlyCurrencyEntry( const OUSt
return &rTable[j];
}
}
- return NULL;
+ return nullptr;
}
@@ -3375,7 +3375,7 @@ bool SvNumberFormatter::ImpLookupCurrencyEntryLoopBody(
{
if ( pFoundEntry && pFoundEntry != pData )
{
- pFoundEntry = NULL;
+ pFoundEntry = nullptr;
return false; // break loop, not unique
}
if ( nPos == 0 )
@@ -3406,7 +3406,7 @@ bool SvNumberFormatter::GetNewCurrencySymbolString( sal_uInt32 nFormat, OUString
bool* pBank /* = NULL */ ) const
{
if ( ppEntry )
- *ppEntry = NULL;
+ *ppEntry = nullptr;
if ( pBank )
*pBank = false;
@@ -3489,7 +3489,7 @@ const NfCurrencyEntry* SvNumberFormatter::GetCurrencyEntry( bool & bFoundBank,
{
eExtLang = LANGUAGE_DONTKNOW;
}
- const NfCurrencyEntry* pFoundEntry = NULL;
+ const NfCurrencyEntry* pFoundEntry = nullptr;
const NfCurrencyTable& rTable = GetTheCurrencyTable();
sal_uInt16 nCount = rTable.size();
bool bCont = true;
@@ -3788,7 +3788,7 @@ void SvNumberFormatter::ImpInitCurrencyTable()
"SvNumberFormatter::ImpInitCurrencyTable: system currency not in I18N locale data.");
}
pLocaleData.reset();
- SvtSysLocaleOptions::SetCurrencyChangeLink( LINK( NULL, SvNumberFormatter, CurrencyChangeLink ) );
+ SvtSysLocaleOptions::SetCurrencyChangeLink( LINK( nullptr, SvNumberFormatter, CurrencyChangeLink ) );
bInitializing = false;
bCurrencyTableInitialized = true;
}
diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index c740cbe81ded..479b28aacd80 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -337,15 +337,15 @@ sal_uInt8 SvNumberNatNum::MapNatNumToDBNum( sal_uInt8 nNatNum, LanguageType eLan
ImpSvNumFor::ImpSvNumFor()
{
nAnzStrings = 0;
- aI.nTypeArray = NULL;
- aI.sStrArray = NULL;
+ aI.nTypeArray = nullptr;
+ aI.sStrArray = nullptr;
aI.eScannedType = css::util::NumberFormat::UNDEFINED;
aI.bThousand = false;
aI.nThousand = 0;
aI.nCntPre = 0;
aI.nCntPost = 0;
aI.nCntExp = 0;
- pColor = NULL;
+ pColor = nullptr;
}
ImpSvNumFor::~ImpSvNumFor()
@@ -368,8 +368,8 @@ void ImpSvNumFor::Enlarge(sal_uInt16 nAnz)
}
else
{
- aI.nTypeArray = NULL;
- aI.sStrArray = NULL;
+ aI.nTypeArray = nullptr;
+ aI.sStrArray = nullptr;
}
}
}
@@ -481,7 +481,7 @@ void SvNumberformat::ImpCopyNumberformat( const SvNumberformat& rFormat )
bAdditionalBuiltin = rFormat.bAdditionalBuiltin;
// #121103# when copying between documents, get color pointers from own scanner
- ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : NULL;
+ ImpSvNumberformatScan* pColorSc = ( &rScan != &rFormat.rScan ) ? &rScan : nullptr;
for (sal_uInt16 i = 0; i < 4; i++)
{
@@ -719,7 +719,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
switch ( eSymbolType )
{
case BRACKET_SYMBOLTYPE_COLOR :
- if ( NumFor[nIndex].GetColor() != NULL )
+ if ( NumFor[nIndex].GetColor() != nullptr )
{ // error, more than one color
bCancel = true; // break for
nCheckPos = nPosOld;
@@ -728,7 +728,7 @@ SvNumberformat::SvNumberformat(OUString& rString,
{
Color* pColor = pSc->GetColor( sStr);
NumFor[nIndex].SetColor( pColor, sStr);
- if (pColor == NULL)
+ if (pColor == nullptr)
{ // error
bCancel = true; // break for
nCheckPos = nPosOld;
@@ -1894,7 +1894,7 @@ bool SvNumberformat::GetOutputString(const OUString& sString,
}
else
{
- *ppColor = NULL; // no change of color
+ *ppColor = nullptr; // no change of color
return false;
}
*ppColor = NumFor[nIx].GetColor();
@@ -2090,7 +2090,7 @@ bool SvNumberformat::GetOutputString(double fNumber,
bool bRes = false;
OUStringBuffer sBuff;
OutString.clear();
- *ppColor = NULL; // No color change
+ *ppColor = nullptr; // No color change
if (eType & css::util::NumberFormat::LOGICAL)
{
if (fNumber)
@@ -4462,12 +4462,12 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
{
if ( nNumFor > 3 )
{
- return NULL;
+ return nullptr;
}
sal_uInt16 nAnz = NumFor[nNumFor].GetCount();
if ( !nAnz )
{
- return NULL;
+ return nullptr;
}
if ( nPos == 0xFFFF )
{
@@ -4483,13 +4483,13 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
}
if ( (*pType != NF_SYMBOLTYPE_STRING) && (*pType != NF_SYMBOLTYPE_CURRENCY) )
{
- return NULL;
+ return nullptr;
}
}
}
else if ( nPos > nAnz - 1 )
{
- return NULL;
+ return nullptr;
}
else if ( bString )
{
@@ -4504,7 +4504,7 @@ const OUString* SvNumberformat::GetNumForString( sal_uInt16 nNumFor, sal_uInt16
if ( nPos >= nAnz || ((*pType != NF_SYMBOLTYPE_STRING) &&
(*pType != NF_SYMBOLTYPE_CURRENCY)) )
{
- return NULL;
+ return nullptr;
}
}
return &NumFor[nNumFor].Info().sStrArray[nPos];
@@ -4685,7 +4685,7 @@ Color* SvNumberformat::GetColor( sal_uInt16 nNumFor ) const
{
if ( nNumFor > 3 )
{
- return NULL;
+ return nullptr;
}
return NumFor[nNumFor].GetColor();
}
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 5d77fe849291..3dd3d7c08d05 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -482,7 +482,7 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
}
}
- Color* pResult = NULL;
+ Color* pResult = nullptr;
if (i >= NF_MAX_DEFAULT_COLORS)
{
const OUString& rColorWord = rKeyword[NF_KEY_COLOR];