summaryrefslogtreecommitdiff
path: root/xmloff/source/xforms
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:29:15 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:32:01 +0100
commit51b45df6bba163dec7ba91c700de695ad517e5dd (patch)
tree566633496f4048112c75edbbe250b0f01d86a8dd /xmloff/source/xforms
parent87bae0e188aa3ce3c31d1aa91707c0fad6b81b65 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I8690de2cb68dcfedc9f2239ce66cea06fd94bc16
Diffstat (limited to 'xmloff/source/xforms')
-rw-r--r--xmloff/source/xforms/SchemaRestrictionContext.cxx6
-rw-r--r--xmloff/source/xforms/SchemaSimpleTypeContext.cxx4
-rw-r--r--xmloff/source/xforms/TokenContext.cxx8
-rw-r--r--xmloff/source/xforms/TokenContext.hxx4
-rw-r--r--xmloff/source/xforms/XFormsBindContext.cxx4
-rw-r--r--xmloff/source/xforms/XFormsInstanceContext.cxx6
-rw-r--r--xmloff/source/xforms/XFormsModelContext.cxx2
-rw-r--r--xmloff/source/xforms/XFormsSubmissionContext.cxx2
-rw-r--r--xmloff/source/xforms/xformsexport.cxx8
9 files changed, 22 insertions, 22 deletions
diff --git a/xmloff/source/xforms/SchemaRestrictionContext.cxx b/xmloff/source/xforms/SchemaRestrictionContext.cxx
index f9622aaa8bc0..b7ab05eee0e5 100644
--- a/xmloff/source/xforms/SchemaRestrictionContext.cxx
+++ b/xmloff/source/xforms/SchemaRestrictionContext.cxx
@@ -202,7 +202,7 @@ Any xforms_date( const OUString& rValue )
Any xforms_dateTime( const OUString& rValue )
{
util::DateTime aDateTime;
- bool const bSuccess = ::sax::Converter::parseDateTime(aDateTime, 0, rValue);
+ bool const bSuccess = ::sax::Converter::parseDateTime(aDateTime, nullptr, rValue);
return bSuccess ? makeAny( aDateTime ) : Any();
}
@@ -240,7 +240,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild(
// determine property name + suitable converter
OUString sPropertyName;
- convert_t pConvert = NULL;
+ convert_t pConvert = nullptr;
switch( nToken )
{
case XML_LENGTH:
@@ -355,7 +355,7 @@ SvXMLImportContext* SchemaRestrictionContext::HandleChild(
CreateDataType();
if( mxDataType.is()
&& !sPropertyName.isEmpty()
- && pConvert != NULL
+ && pConvert != nullptr
&& mxDataType->getPropertySetInfo()->hasPropertyByName(sPropertyName) )
{
try
diff --git a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
index d0e1a8db4eed..671ef25c9d78 100644
--- a/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
+++ b/xmloff/source/xforms/SchemaSimpleTypeContext.cxx
@@ -85,7 +85,7 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild(
const OUString& rLocalName,
const Reference<XAttributeList>& )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch( nToken )
{
case XML_RESTRICTION:
@@ -97,7 +97,7 @@ SvXMLImportContext* SchemaSimpleTypeContext::HandleChild(
OSL_FAIL( "Booo!" );
}
- return ( pContext != NULL )
+ return ( pContext != nullptr )
? pContext
: new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
}
diff --git a/xmloff/source/xforms/TokenContext.cxx b/xmloff/source/xforms/TokenContext.cxx
index 981c15e50659..8751b9d0771c 100644
--- a/xmloff/source/xforms/TokenContext.cxx
+++ b/xmloff/source/xforms/TokenContext.cxx
@@ -60,7 +60,7 @@ void TokenContext::StartElement(
// - if in map: call HandleAttribute
// - xmlns:... : ignore
// - other: warning
- DBG_ASSERT( mpAttributes != NULL, "no token map for attributes" );
+ DBG_ASSERT( mpAttributes != nullptr, "no token map for attributes" );
SvXMLTokenMap aMap( mpAttributes );
sal_Int16 nCount = xAttributeList->getLength();
@@ -98,9 +98,9 @@ SvXMLImportContext* TokenContext::CreateChildContext(
{
// call HandleChild for elements in token map. Ignore other content.
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
- DBG_ASSERT( mpChildren != NULL, "no token map for child elements" );
+ DBG_ASSERT( mpChildren != nullptr, "no token map for child elements" );
SvXMLTokenMap aMap( mpChildren );
sal_uInt16 nToken = aMap.Get( nPrefix, rLocalName );
if( nToken != XML_TOK_UNKNOWN )
@@ -110,7 +110,7 @@ SvXMLImportContext* TokenContext::CreateChildContext(
}
// error handling: create default context and generate warning
- if( pContext == NULL )
+ if( pContext == nullptr )
{
GetImport().SetError( XMLERROR_UNKNOWN_ELEMENT, rLocalName );
pContext = new SvXMLImportContext( GetImport(), nPrefix, rLocalName );
diff --git a/xmloff/source/xforms/TokenContext.hxx b/xmloff/source/xforms/TokenContext.hxx
index b7bed1b64d40..8a8531063556 100644
--- a/xmloff/source/xforms/TokenContext.hxx
+++ b/xmloff/source/xforms/TokenContext.hxx
@@ -44,8 +44,8 @@ public:
TokenContext( SvXMLImport& rImport,
sal_uInt16 nPrefix,
const OUString& rLocalName,
- const SvXMLTokenMapEntry* pAttributes = NULL,
- const SvXMLTokenMapEntry* pChildren = NULL );
+ const SvXMLTokenMapEntry* pAttributes = nullptr,
+ const SvXMLTokenMapEntry* pChildren = nullptr );
virtual ~TokenContext();
diff --git a/xmloff/source/xforms/XFormsBindContext.cxx b/xmloff/source/xforms/XFormsBindContext.cxx
index c7eb92855dfe..0e43c1db9e88 100644
--- a/xmloff/source/xforms/XFormsBindContext.cxx
+++ b/xmloff/source/xforms/XFormsBindContext.cxx
@@ -72,7 +72,7 @@ XFormsBindContext::XFormsBindContext(
const Reference<XModel2>& xModel ) :
TokenContext( rImport, nPrefix, rLocalName, aAttributeMap, aEmptyMap ),
mxModel( xModel ),
- mxBinding( NULL )
+ mxBinding( nullptr )
{
// attach binding to model
mxBinding = mxModel->createBinding();
@@ -146,7 +146,7 @@ SvXMLImportContext* XFormsBindContext::HandleChild(
const Reference<XAttributeList>& )
{
OSL_FAIL( "no children supported" );
- return NULL;
+ return nullptr;
}
diff --git a/xmloff/source/xforms/XFormsInstanceContext.cxx b/xmloff/source/xforms/XFormsInstanceContext.cxx
index e0503b7eb1f6..b75751fd22cc 100644
--- a/xmloff/source/xforms/XFormsInstanceContext.cxx
+++ b/xmloff/source/xforms/XFormsInstanceContext.cxx
@@ -80,7 +80,7 @@ SvXMLImportContext* XFormsInstanceContext::CreateChildContext(
const OUString& rLocalName,
const Reference<XAttributeList>& )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
// only the first element child of an xforms:instance element
// is used as an instance. The other children remainder must be
@@ -99,7 +99,7 @@ SvXMLImportContext* XFormsInstanceContext::CreateChildContext(
pContext = pInstance;
}
- DBG_ASSERT( pContext != NULL, "no context!" );
+ DBG_ASSERT( pContext != nullptr, "no context!" );
return pContext;
}
@@ -144,7 +144,7 @@ SvXMLImportContext* XFormsInstanceContext::HandleChild(
const Reference<XAttributeList>& )
{
OSL_FAIL( "to be handled by CreateChildContext" );
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/xforms/XFormsModelContext.cxx b/xmloff/source/xforms/XFormsModelContext.cxx
index 10bd88b43797..ecede75093f4 100644
--- a/xmloff/source/xforms/XFormsModelContext.cxx
+++ b/xmloff/source/xforms/XFormsModelContext.cxx
@@ -105,7 +105,7 @@ SvXMLImportContext* XFormsModelContext::HandleChild(
const OUString& rLocalName,
const Reference<XAttributeList>& )
{
- SvXMLImportContext* pContext = NULL;
+ SvXMLImportContext* pContext = nullptr;
switch( nToken )
{
diff --git a/xmloff/source/xforms/XFormsSubmissionContext.cxx b/xmloff/source/xforms/XFormsSubmissionContext.cxx
index fb2398171069..c7bc2154905a 100644
--- a/xmloff/source/xforms/XFormsSubmissionContext.cxx
+++ b/xmloff/source/xforms/XFormsSubmissionContext.cxx
@@ -163,7 +163,7 @@ SvXMLImportContext* XFormsSubmissionContext::HandleChild(
const Reference<XAttributeList>& )
{
OSL_FAIL( "no children supported" );
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/xmloff/source/xforms/xformsexport.cxx b/xmloff/source/xforms/xformsexport.cxx
index 1954b640a622..5ae21eee72dc 100644
--- a/xmloff/source/xforms/xformsexport.cxx
+++ b/xmloff/source/xforms/xformsexport.cxx
@@ -124,7 +124,7 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet,
const ExportTable* pTable );
#define TABLE_ENTRY(NAME,NAMESPACE,TOKEN,CONVERTER) { NAME,sizeof(NAME)-1,XML_NAMESPACE_##NAMESPACE,xmloff::token::XML_##TOKEN, CONVERTER }
-#define TABLE_END { NULL, 0, 0, 0, NULL }
+#define TABLE_END { nullptr, 0, 0, 0, nullptr }
// any conversion functions
OUString xforms_string( const Any& );
@@ -442,7 +442,7 @@ static void lcl_exportDataTypeFacets( SvXMLExport& rExport,
{
Reference<XPropertySetInfo> xInfo = rPropertySet->getPropertySetInfo();
for( const ExportTable* pCurrent = pTable;
- pCurrent->pPropertyName != NULL;
+ pCurrent->pPropertyName != nullptr;
pCurrent++ )
{
OUString sName( OUString::createFromAscii( pCurrent->pPropertyName ) );
@@ -605,7 +605,7 @@ static void lcl_export( const Reference<XPropertySet>& rPropertySet,
const ExportTable* pTable )
{
for( const ExportTable* pCurrent = pTable;
- pCurrent->pPropertyName != NULL;
+ pCurrent->pPropertyName != nullptr;
pCurrent++ )
{
Any aAny = rPropertySet->getPropertyValue(
@@ -685,7 +685,7 @@ void xforms_formatTime( OUStringBuffer& aBuffer, const com::sun::star::util::Tim
void xforms_formatDateTime( OUStringBuffer& aBuffer, const util::DateTime& aDateTime )
{
- ::sax::Converter::convertDateTime(aBuffer, aDateTime, 0);
+ ::sax::Converter::convertDateTime(aBuffer, aDateTime, nullptr);
}
OUString xforms_whitespace( const Any& rAny )