summaryrefslogtreecommitdiff
path: root/sax/source/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:22:34 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:35 +0100
commit60c40af090e420a8619b5236bde1ff4ef79100c6 (patch)
treeec8f50b4325045bec03708e14dcd996631c6c828 /sax/source/tools
parentde63cac20fba1e7661687a4f1c1ce91182f4dfa0 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I54bf272b404d2302cafbde73ec5061ea2cd966ab
Diffstat (limited to 'sax/source/tools')
-rw-r--r--sax/source/tools/converter.cxx18
-rw-r--r--sax/source/tools/fastserializer.cxx4
-rw-r--r--sax/source/tools/fastserializer.hxx4
3 files changed, 13 insertions, 13 deletions
diff --git a/sax/source/tools/converter.cxx b/sax/source/tools/converter.cxx
index 911da6ff79f7..b4eb276813ee 100644
--- a/sax/source/tools/converter.cxx
+++ b/sax/source/tools/converter.cxx
@@ -126,8 +126,8 @@ bool Converter::convertMeasure( sal_Int32& rValue,
{
OSL_ENSURE( MeasureUnit::TWIP == nTargetUnit || MeasureUnit::POINT == nTargetUnit ||
MeasureUnit::MM_100TH == nTargetUnit || MeasureUnit::MM_10TH == nTargetUnit, "unit is not supported");
- const sal_Char *aCmpsL[2] = { 0, 0 };
- const sal_Char *aCmpsU[2] = { 0, 0 };
+ const sal_Char *aCmpsL[2] = { nullptr, nullptr };
+ const sal_Char *aCmpsU[2] = { nullptr, nullptr };
double aScales[2] = { 1., 1. };
if( MeasureUnit::TWIP == nTargetUnit )
@@ -209,7 +209,7 @@ bool Converter::convertMeasure( sal_Int32& rValue,
}
}
- if( aCmpsL[0] == NULL )
+ if( aCmpsL[0] == nullptr )
return false;
double nScale = 0.;
@@ -286,7 +286,7 @@ void Converter::convertMeasure( OUStringBuffer& rBuffer,
long nMul = 1000;
long nDiv = 1;
long nFac = 100;
- const sal_Char* psUnit = 0;
+ const sal_Char* psUnit = nullptr;
switch( nSourceUnit )
{
case MeasureUnit::TWIP:
@@ -1409,7 +1409,7 @@ bool Converter::parseDateTime( util::DateTime& rDateTime,
const OUString& rString )
{
bool isDateTime;
- return parseDateOrDateTime(0, rDateTime, isDateTime, pTimeZoneOffset,
+ return parseDateOrDateTime(nullptr, rDateTime, isDateTime, pTimeZoneOffset,
rString);
}
@@ -1864,7 +1864,7 @@ bool Converter::parseTimeOrDateTime(
{
bool dummy;
return lcl_parseDateTime(
- 0, rDateTime, dummy, pTimeZoneOffset, rString, true);
+ nullptr, rDateTime, dummy, pTimeZoneOffset, rString, true);
}
/** convert ISO "date" or "dateTime" string to util::DateTime or util::Date */
@@ -2094,7 +2094,7 @@ double Converter::GetConversionFactor(OUStringBuffer& rUnit, sal_Int16 nSourceUn
if(nSourceUnit != nTargetUnit)
{
- const sal_Char* psUnit = 0;
+ const sal_Char* psUnit = nullptr;
switch(nSourceUnit)
{
@@ -2610,7 +2610,7 @@ bool Converter::convertAny(OUStringBuffer& rsValue,
aTempValue.Seconds = 0;
aTempValue.Minutes = 0;
aTempValue.Hours = 0;
- ::sax::Converter::convertDateTime(rsValue, aTempValue, 0);
+ ::sax::Converter::convertDateTime(rsValue, aTempValue, nullptr);
}
else
if (rValue >>= aTime)
@@ -2632,7 +2632,7 @@ bool Converter::convertAny(OUStringBuffer& rsValue,
{
rsType.append("date");
bConverted = true;
- ::sax::Converter::convertDateTime(rsValue, aDateTime, 0);
+ ::sax::Converter::convertDateTime(rsValue, aDateTime, nullptr);
}
}
break;
diff --git a/sax/source/tools/fastserializer.cxx b/sax/source/tools/fastserializer.cxx
index 56d2fe82b1b6..37ed847c6066 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -59,7 +59,7 @@ namespace sax_fastparser {
: maCachedOutputStream()
, maMarkStack()
, mbMarkStackEmpty(true)
- , mpDoubleStr(NULL)
+ , mpDoubleStr(nullptr)
, mnDoubleStrCapacity(RTL_STR_MAX_VALUEOFDOUBLE)
{
rtl_string_new_WithLength(&mpDoubleStr, mnDoubleStrCapacity);
@@ -83,7 +83,7 @@ namespace sax_fastparser {
{
rtl_math_doubleToString(
&mpDoubleStr, &mnDoubleStrCapacity, 0, value, rtl_math_StringFormat_G,
- RTL_STR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', 0,
+ RTL_STR_MAX_VALUEOFDOUBLE - RTL_CONSTASCII_LENGTH("-x.E-xxx"), '.', nullptr,
0, sal_True);
write(mpDoubleStr->buffer, mpDoubleStr->length);
diff --git a/sax/source/tools/fastserializer.hxx b/sax/source/tools/fastserializer.hxx
index 7a56524c0f22..e73b4021d1cf 100644
--- a/sax/source/tools/fastserializer.hxx
+++ b/sax/source/tools/fastserializer.hxx
@@ -80,7 +80,7 @@ public:
from the element.
*/
- void startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = NULL );
+ void startFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
/** receives notification of the end of an known element.
@see startFastElement
@@ -104,7 +104,7 @@ public:
from the element.
*/
- void singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = NULL );
+ void singleFastElement( ::sal_Int32 Element, FastAttributeList* pAttrList = nullptr );
// C++ helpers
void writeId( ::sal_Int32 Element );