summaryrefslogtreecommitdiff
path: root/forms/source/xforms/model_ui.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'forms/source/xforms/model_ui.cxx')
-rw-r--r--forms/source/xforms/model_ui.cxx40
1 files changed, 20 insertions, 20 deletions
diff --git a/forms/source/xforms/model_ui.cxx b/forms/source/xforms/model_ui.cxx
index 730a0f69b405..dd393299fe23 100644
--- a/forms/source/xforms/model_ui.cxx
+++ b/forms/source/xforms/model_ui.cxx
@@ -134,7 +134,7 @@ static void lcl_OutPosition( OUStringBuffer& rBuffer,
if( xNode->getParentNode().is() )
{
for( Reference<XNode> xIter = xNode->getParentNode()->getFirstChild();
- xIter != NULL;
+ xIter != nullptr;
xIter = xIter->getNextSibling() )
{
if( xIter->getNodeType() == xNode->getNodeType() &&
@@ -192,7 +192,7 @@ static void lcl_OutInstance( OUStringBuffer& rBuffer,
// get ID and instance
OUString sId;
Reference<XDocument> xInstance;
- getInstanceData( aValues, &sId, &xInstance, NULL, NULL );
+ getInstanceData( aValues, &sId, &xInstance, nullptr, nullptr );
// now check whether this was our instance:
if( xInstance == xDoc )
@@ -247,7 +247,7 @@ OUString Model::getDefaultBindingExpressionForNode(
default:
// unknown type? fail!
OSL_FAIL( "unknown node type!" );
- xCurrent.set( NULL );
+ xCurrent.set( nullptr );
aBuffer.makeStringAndClear();
// we'll remove the slash below
aBuffer.insert( 0, '/' );
@@ -399,7 +399,7 @@ void Model::removeBindingIfUseless( const XPropertySet_t& xBinding )
throw( RuntimeException, std::exception )
{
Binding* pBinding = Binding::getBinding( xBinding );
- if( pBinding != NULL )
+ if( pBinding != nullptr )
{
if( ! pBinding->isUseful() )
mpBindings->removeItem( pBinding );
@@ -450,7 +450,7 @@ sal_Int32 xforms::lcl_findInstance( const InstanceCollection* pInstances,
for( ; !bFound && n < nLength; n++ )
{
OUString sName;
- getInstanceData( pInstances->getItem( n ), &sName, NULL, NULL, NULL );
+ getInstanceData( pInstances->getItem( n ), &sName, nullptr, nullptr, nullptr );
bFound = ( sName == rName );
}
return bFound ? ( n - 1 ) : -1;
@@ -702,7 +702,7 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode,
// appropriateness of the respective binding for this node. The
// best one will be used. If we don't find any and bCreate is set,
// then we will create a suitable binding.
- Binding* pBestBinding = NULL;
+ Binding* pBestBinding = nullptr;
sal_Int32 nBestScore = 0;
for( sal_Int32 n = 0; n < mpBindings->countItems(); n++ )
@@ -710,7 +710,7 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode,
Binding* pBinding = Binding::getBinding(
mpBindings->Collection<XPropertySet_t>::getItem( n ) );
- OSL_ENSURE( pBinding != NULL, "no binding?" );
+ OSL_ENSURE( pBinding != nullptr, "no binding?" );
Reference<XNodeList> xNodeList = pBinding->getXNodeList();
sal_Int32 nNodes = xNodeList.is() ? xNodeList->getLength() : 0;
@@ -736,9 +736,9 @@ Model::XPropertySet_t Model::getBindingForNode( const XNode_t& xNode,
}
// create binding, if none was found and bCreate is set
- OSL_ENSURE( ( nBestScore == 0 ) == ( pBestBinding == NULL ),
+ OSL_ENSURE( ( nBestScore == 0 ) == ( pBestBinding == nullptr ),
"score != binding?" );
- if( bCreate && pBestBinding == NULL )
+ if( bCreate && pBestBinding == nullptr )
{
pBestBinding = new Binding();
pBestBinding->setBindingExpression(
@@ -905,7 +905,7 @@ OUString Model::getResultForExpression(
throw( RuntimeException, std::exception )
{
Binding* pBinding = Binding::getBinding( xBinding );
- if( pBinding == NULL )
+ if( pBinding == nullptr )
throw RuntimeException();
// prepare & evaluate expression
@@ -938,13 +938,13 @@ OUString Model::getResultForExpression(
sal_Bool Model::isValidXMLName( const OUString& sName )
throw( RuntimeException, std::exception )
{
- return isValidQName( sName, NULL );
+ return isValidQName( sName, nullptr );
}
sal_Bool Model::isValidPrefixName( const OUString& sName )
throw( RuntimeException, std::exception )
{
- return ::isValidPrefixName( sName, NULL );
+ return ::isValidPrefixName( sName, nullptr );
}
void Model::setNodeValue(
@@ -973,7 +973,7 @@ void xforms::getInstanceData(
{
const PropertyValue& rValue = pValues[n];
#define PROP(NAME) \
- if( p##NAME != NULL && \
+ if( p##NAME != nullptr && \
rValue.Name == #NAME ) \
rValue.Value >>= (*p##NAME)
PROP(ID);
@@ -997,13 +997,13 @@ void xforms::setInstanceData(
OUString sURL;
bool bURLOnce = false;
getInstanceData( aSequence, &sID, &xInstance, &sURL, &bURLOnce );
- const OUString* pID = !sID.isEmpty() ? &sID : NULL;
- const Reference<XDocument>* pInstance = xInstance.is() ? &xInstance : NULL;
- const OUString* pURL = !sURL.isEmpty() ? &sURL : NULL;
- const bool* pURLOnce = ( bURLOnce && pURL != NULL ) ? &bURLOnce : NULL;
+ const OUString* pID = !sID.isEmpty() ? &sID : nullptr;
+ const Reference<XDocument>* pInstance = xInstance.is() ? &xInstance : nullptr;
+ const OUString* pURL = !sURL.isEmpty() ? &sURL : nullptr;
+ const bool* pURLOnce = ( bURLOnce && pURL != nullptr ) ? &bURLOnce : nullptr;
// determine new instance data
-#define PROP(NAME) if( _p##NAME != NULL ) p##NAME = _p##NAME
+#define PROP(NAME) if( _p##NAME != nullptr ) p##NAME = _p##NAME
PROP(ID);
PROP(Instance);
PROP(URL);
@@ -1012,7 +1012,7 @@ void xforms::setInstanceData(
// count # of values we want to set
sal_Int32 nCount = 0;
-#define PROP(NAME) if( p##NAME != NULL ) nCount++
+#define PROP(NAME) if( p##NAME != nullptr ) nCount++
PROP(ID);
PROP(Instance);
PROP(URL);
@@ -1024,7 +1024,7 @@ void xforms::setInstanceData(
PropertyValue* pSequence = aSequence.getArray();
sal_Int32 nIndex = 0;
#define PROP(NAME) \
- if( p##NAME != NULL ) \
+ if( p##NAME != nullptr ) \
{ \
pSequence[ nIndex ].Name = #NAME; \
pSequence[ nIndex ].Value <<= *p##NAME; \