summaryrefslogtreecommitdiff
path: root/sw/source/filter/xml
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/filter/xml')
-rw-r--r--sw/source/filter/xml/XMLRedlineImportHelper.cxx46
-rw-r--r--sw/source/filter/xml/swxml.cxx34
-rw-r--r--sw/source/filter/xml/wrtxml.cxx14
-rw-r--r--sw/source/filter/xml/wrtxml.hxx2
-rw-r--r--sw/source/filter/xml/xmlbrsh.cxx4
-rw-r--r--sw/source/filter/xml/xmlexp.cxx18
-rw-r--r--sw/source/filter/xml/xmlexpit.cxx28
-rw-r--r--sw/source/filter/xml/xmlexpit.hxx2
-rw-r--r--sw/source/filter/xml/xmlfmt.cxx26
-rw-r--r--sw/source/filter/xml/xmlfonte.cxx2
-rw-r--r--sw/source/filter/xml/xmlimp.cxx66
-rw-r--r--sw/source/filter/xml/xmlimp.hxx4
-rw-r--r--sw/source/filter/xml/xmlimpit.cxx24
-rw-r--r--sw/source/filter/xml/xmliteme.cxx2
-rw-r--r--sw/source/filter/xml/xmlitemi.cxx4
-rw-r--r--sw/source/filter/xml/xmlithlp.cxx4
-rw-r--r--sw/source/filter/xml/xmlitmap.hxx2
-rw-r--r--sw/source/filter/xml/xmlitmpr.cxx2
-rw-r--r--sw/source/filter/xml/xmlmeta.cxx26
-rw-r--r--sw/source/filter/xml/xmlscript.cxx2
-rw-r--r--sw/source/filter/xml/xmltble.cxx42
-rw-r--r--sw/source/filter/xml/xmltbli.cxx138
-rw-r--r--sw/source/filter/xml/xmltbli.hxx20
-rw-r--r--sw/source/filter/xml/xmltext.cxx4
-rw-r--r--sw/source/filter/xml/xmltexte.cxx6
-rw-r--r--sw/source/filter/xml/xmltexti.cxx56
26 files changed, 289 insertions, 289 deletions
diff --git a/sw/source/filter/xml/XMLRedlineImportHelper.cxx b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
index 099d0c6e8318..73b6d293d3f3 100644
--- a/sw/source/filter/xml/XMLRedlineImportHelper.cxx
+++ b/sw/source/filter/xml/XMLRedlineImportHelper.cxx
@@ -55,7 +55,7 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextCursor> & rCursor )
OTextCursorHelper *const pXCursor =
::sw::UnoTunnelGetImplementation<OTextCursorHelper>(xTunnel);
OSL_ENSURE( pXCursor, "OTextCursorHelper missing" );
- return (pXCursor) ? pXCursor->GetDoc() : 0;
+ return (pXCursor) ? pXCursor->GetDoc() : nullptr;
}
static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
@@ -66,7 +66,7 @@ static SwDoc* lcl_GetDocViaTunnel( Reference<XTextRange> & rRange )
::sw::UnoTunnelGetImplementation<SwXTextRange>(xTunnel);
// #i115174#: this may be a SvxUnoTextRange
// OSL_ENSURE( pXRange, "SwXTextRange missing" );
- return (pXRange) ? &pXRange->GetDoc() : 0;
+ return (pXRange) ? &pXRange->GetDoc() : nullptr;
}
// XTextRangeOrNodeIndexPosition: store a position into the text
@@ -97,8 +97,8 @@ public:
};
XTextRangeOrNodeIndexPosition::XTextRangeOrNodeIndexPosition() :
- xRange(NULL),
- pIndex(NULL)
+ xRange(nullptr),
+ pIndex(nullptr)
{
}
@@ -110,21 +110,21 @@ XTextRangeOrNodeIndexPosition::~XTextRangeOrNodeIndexPosition()
void XTextRangeOrNodeIndexPosition::Set( Reference<XTextRange> & rRange )
{
xRange = rRange->getStart(); // set bookmark
- if (NULL != pIndex)
+ if (nullptr != pIndex)
{
delete pIndex;
- pIndex = NULL;
+ pIndex = nullptr;
}
}
void XTextRangeOrNodeIndexPosition::Set( SwNodeIndex& rIndex )
{
- if (NULL != pIndex)
+ if (nullptr != pIndex)
delete pIndex;
pIndex = new SwNodeIndex(rIndex);
(*pIndex)-- ; // previous node!!!
- xRange = NULL;
+ xRange = nullptr;
}
void XTextRangeOrNodeIndexPosition::SetAsNodeIndex(
@@ -154,7 +154,7 @@ XTextRangeOrNodeIndexPosition::CopyPositionInto(SwPosition& rPos, SwDoc & rDoc)
OSL_ENSURE(IsValid(), "Can't get Position");
// create PAM from start cursor (if no node index is present)
- if (NULL == pIndex)
+ if (nullptr == pIndex)
{
SwUnoInternalPaM aUnoPaM(rDoc);
bool bSuccess = ::sw::XTextRangeToSwPaM(aUnoPaM, xRange);
@@ -174,12 +174,12 @@ SwDoc* XTextRangeOrNodeIndexPosition::GetDoc()
{
OSL_ENSURE(IsValid(), "Can't get Doc");
- return (NULL != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
+ return (nullptr != pIndex) ? pIndex->GetNodes().GetDoc() : lcl_GetDocViaTunnel(xRange);
}
bool XTextRangeOrNodeIndexPosition::IsValid()
{
- return ( xRange.is() || (pIndex != NULL) );
+ return ( xRange.is() || (pIndex != nullptr) );
}
// RedlineInfo: temporary storage for redline data
@@ -224,8 +224,8 @@ RedlineInfo::RedlineInfo() :
bMergeLastParagraph( false ),
aAnchorStart(),
aAnchorEnd(),
- pContentIndex(NULL),
- pNextRedline(NULL),
+ pContentIndex(nullptr),
+ pNextRedline(nullptr),
bNeedsAdjustment( false )
{
}
@@ -428,7 +428,7 @@ void XMLRedlineImportHelper::Add(
// find last element
RedlineInfo* pInfoChain;
for( pInfoChain = aRedlineMap[rId];
- NULL != pInfoChain->pNextRedline;
+ nullptr != pInfoChain->pNextRedline;
pInfoChain = pInfoChain->pNextRedline) ; // empty loop
// insert as last element
@@ -456,7 +456,7 @@ Reference<XTextCursor> XMLRedlineImportHelper::CreateRedlineTextSection(
{
OSL_TRACE("XMLRedlineImportHelper::CreateRedlineTextSection: "
"no SwDoc => cannot create section.");
- return 0;
+ return nullptr;
}
// create text section for redline
@@ -577,7 +577,7 @@ inline bool XMLRedlineImportHelper::IsReady(RedlineInfo* pRedline)
void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
{
- OSL_ENSURE(NULL != pRedlineInfo, "need redline info");
+ OSL_ENSURE(nullptr != pRedlineInfo, "need redline info");
OSL_ENSURE(IsReady(pRedlineInfo), "redline info not complete yet!");
// this method will modify the document directly -> lock SolarMutex
@@ -615,7 +615,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
// a) bIgnoreRedline (e.g. insert mode)
// b) illegal PaM range (CheckNodesRange())
// 3) normal case: insert redline
- if( !aPaM.HasMark() && (pRedlineInfo->pContentIndex == NULL) )
+ if( !aPaM.HasMark() && (pRedlineInfo->pContentIndex == nullptr) )
{
// these redlines have no function, and will thus be ignored (just as
// in sw3io), so no action here
@@ -632,7 +632,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
pDoc->getIDocumentContentOperations().DeleteRange(aPaM);
// And what about the "deleted nodes"?
// They have to be deleted as well (#i80689)!
- if( bIgnoreRedlines && pRedlineInfo->pContentIndex != NULL )
+ if( bIgnoreRedlines && pRedlineInfo->pContentIndex != nullptr )
{
SwNodeIndex aIdx( *pRedlineInfo->pContentIndex );
const SwNode* pEnd = aIdx.GetNode().EndOfSectionNode();
@@ -663,7 +663,7 @@ void XMLRedlineImportHelper::InsertIntoDocument(RedlineInfo* pRedlineInfo)
}
// set content node (if necessary)
- if (NULL != pRedlineInfo->pContentIndex)
+ if (nullptr != pRedlineInfo->pContentIndex)
{
sal_uLong nPoint = aPaM.GetPoint()->nNode.GetIndex();
if( nPoint < pRedlineInfo->pContentIndex->GetIndex() ||
@@ -688,7 +688,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
{
// convert info:
// 1) Author String -> Author ID (default to zero)
- sal_uInt16 nAuthorId = (NULL == pDoc) ? 0 :
+ sal_uInt16 nAuthorId = (nullptr == pDoc) ? 0 :
pDoc->getIDocumentRedlineAccess().InsertRedlineAuthor( pRedlineInfo->sAuthor );
// 2) util::DateTime -> DateTime
@@ -703,8 +703,8 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
// 3) recursively convert next redline
// ( check presence and sanity of hierarchical redline info )
- SwRedlineData* pNext = NULL;
- if ( (NULL != pRedlineInfo->pNextRedline) &&
+ SwRedlineData* pNext = nullptr;
+ if ( (nullptr != pRedlineInfo->pNextRedline) &&
(nsRedlineType_t::REDLINE_DELETE == pRedlineInfo->eType) &&
(nsRedlineType_t::REDLINE_INSERT == pRedlineInfo->pNextRedline->eType) )
{
@@ -716,7 +716,7 @@ SwRedlineData* XMLRedlineImportHelper::ConvertRedline(
nAuthorId, aDT,
pRedlineInfo->sComment,
pNext, // next data (if available)
- NULL); // no extra data
+ nullptr); // no extra data
return pData;
}
diff --git a/sw/source/filter/xml/swxml.cxx b/sw/source/filter/xml/swxml.cxx
index c0a265443363..1812e511639d 100644
--- a/sw/source/filter/xml/swxml.cxx
+++ b/sw/source/filter/xml/swxml.cxx
@@ -85,7 +85,7 @@ using namespace ::com::sun::star::lang;
static void lcl_EnsureValidPam( SwPaM& rPam )
{
- if( rPam.GetContentNode() != NULL )
+ if( rPam.GetContentNode() != nullptr )
{
// set proper point content
if( rPam.GetContentNode() != rPam.GetPoint()->nContent.GetIdxReg() )
@@ -95,7 +95,7 @@ static void lcl_EnsureValidPam( SwPaM& rPam )
// else: point was already valid
// if mark is invalid, we delete it
- if( ( rPam.GetContentNode( false ) == NULL ) ||
+ if( ( rPam.GetContentNode( false ) == nullptr ) ||
( rPam.GetContentNode( false ) != rPam.GetMark()->nContent.GetIdxReg() ) )
{
rPam.DeleteMark();
@@ -139,7 +139,7 @@ sal_Int32 ReadThroughComponent(
OSL_ENSURE(xInputStream.is(), "input stream missing");
OSL_ENSURE(xModelComponent.is(), "document missing");
OSL_ENSURE(rxContext.is(), "factory missing");
- OSL_ENSURE(NULL != pFilterName,"I need a service name for the component!");
+ OSL_ENSURE(nullptr != pFilterName,"I need a service name for the component!");
// prepare ParserInputSrouce
xml::sax::InputSource aParserInput;
@@ -288,7 +288,7 @@ sal_Int32 ReadThroughComponent(
bool bMustBeSuccessfull)
{
OSL_ENSURE(xStorage.is(), "Need storage!");
- OSL_ENSURE(NULL != pStreamName, "Please, please, give me a name!");
+ OSL_ENSURE(nullptr != pStreamName, "Please, please, give me a name!");
// open stream (and set parser input)
OUString sStreamName = OUString::createFromAscii(pStreamName);
@@ -307,7 +307,7 @@ sal_Int32 ReadThroughComponent(
// if no stream can be opened, return immediately with OK signal
// do we even have an alternative name?
- if ( NULL == pCompatibilityStreamName )
+ if ( nullptr == pCompatibilityStreamName )
return 0;
// if so, does the stream exist?
@@ -398,7 +398,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
aOutlineLevelAssigned[ i ] = false;
- aCreatedDefaultOutlineStyles[ i ] = 0L;
+ aCreatedDefaultOutlineStyles[ i ] = nullptr;
}
}
@@ -415,7 +415,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
for ( sal_uInt8 i = 0; i < MAXLEVEL; ++i )
{
- if ( aCreatedDefaultOutlineStyles[ i ] == 0L &&
+ if ( aCreatedDefaultOutlineStyles[ i ] == nullptr &&
pColl->GetName() == aDefOutlStyleNames[i] )
{
aCreatedDefaultOutlineStyles[ i ] = pColl;
@@ -433,7 +433,7 @@ static void lcl_AdjustOutlineStylesForOOo(SwDoc& _rDoc)
// Do not change assignment of already created default outline style
// to a certain outline level.
if ( !aOutlineLevelAssigned[ i ] &&
- aCreatedDefaultOutlineStyles[ i ] != 0 &&
+ aCreatedDefaultOutlineStyles[ i ] != nullptr &&
! aCreatedDefaultOutlineStyles[ i ]->IsAssignedToListLevelOfOutlineStyle() )
{
// apply outline level at created default outline style
@@ -498,9 +498,9 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
uno::Reference< io::XActiveDataSource > xSource;
uno::Reference< XInterface > xPipe;
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
- SvXMLGraphicHelper *pGraphicHelper = 0;
+ SvXMLGraphicHelper *pGraphicHelper = nullptr;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
// get the input stream (storage or stream)
uno::Reference<io::XInputStream> xInputStream;
@@ -721,14 +721,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
else if( bInsertMode )
{
const uno::Reference<text::XTextRange> xInsertTextRange =
- SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), 0);
+ SwXTextRange::CreateXTextRange(rDoc, *rPaM.GetPoint(), nullptr);
xInfoSet->setPropertyValue( "TextInsertModeRange",
makeAny(xInsertTextRange) );
}
else
{
- rPaM.GetBound().nContent.Assign(0, 0);
- rPaM.GetBound(false).nContent.Assign(0, 0);
+ rPaM.GetBound().nContent.Assign(nullptr, 0);
+ rPaM.GetBound(false).nContent.Assign(nullptr, 0);
}
if( IsBlockMode() )
@@ -851,14 +851,14 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
bInsertMode) )
{
nWarn2 = ReadThroughComponent(
- xStorage, xModelComp, "settings.xml", NULL, xContext,
+ xStorage, xModelComp, "settings.xml", nullptr, xContext,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisSettingsImporter"
: "com.sun.star.comp.Writer.XMLSettingsImporter"),
aFilterArgs, rName, false );
}
nRet = ReadThroughComponent(
- xStorage, xModelComp, "styles.xml", NULL, xContext,
+ xStorage, xModelComp, "styles.xml", nullptr, xContext,
(bOASIS ? "com.sun.star.comp.Writer.XMLOasisStylesImporter"
: "com.sun.star.comp.Writer.XMLStylesImporter"),
aFilterArgs, rName, true );
@@ -923,10 +923,10 @@ sal_uLong XMLReader::Read( SwDoc &rDoc, const OUString& rBaseURL, SwPaM &rPaM, c
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
- xGraphicResolver = 0;
+ xGraphicResolver = nullptr;
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
- xObjectResolver = 0;
+ xObjectResolver = nullptr;
(void)rDoc.release();
if ( !bOASIS )
diff --git a/sw/source/filter/xml/wrtxml.cxx b/sw/source/filter/xml/wrtxml.cxx
index c7bdb8367088..0f5392f39b0c 100644
--- a/sw/source/filter/xml/wrtxml.cxx
+++ b/sw/source/filter/xml/wrtxml.cxx
@@ -80,9 +80,9 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
uno::Reference< io::XOutputStream > xOut;
tools::SvRef<SotStorageStream> xDocStream;
uno::Reference< document::XGraphicObjectResolver > xGraphicResolver;
- SvXMLGraphicHelper *pGraphicHelper = 0;
+ SvXMLGraphicHelper *pGraphicHelper = nullptr;
uno::Reference< document::XEmbeddedObjectResolver > xObjectResolver;
- SvXMLEmbeddedObjectHelper *pObjectHelper = 0;
+ SvXMLEmbeddedObjectHelper *pObjectHelper = nullptr;
OSL_ENSURE( xStg.is(), "Where is my storage?" );
pGraphicHelper = SvXMLGraphicHelper::Create( xStg,
@@ -393,11 +393,11 @@ sal_uInt32 SwXMLWriter::_Write( const uno::Reference < task::XStatusIndicator >&
if( pGraphicHelper )
SvXMLGraphicHelper::Destroy( pGraphicHelper );
- xGraphicResolver = 0;
+ xGraphicResolver = nullptr;
if( pObjectHelper )
SvXMLEmbeddedObjectHelper::Destroy( pObjectHelper );
- xObjectResolver = 0;
+ xObjectResolver = nullptr;
// restore redline mode
aAny = xInfoSet->getPropertyValue( sShowChanges );
@@ -469,8 +469,8 @@ bool SwXMLWriter::WriteThroughComponent(
const Sequence<beans::PropertyValue> & rMediaDesc )
{
OSL_ENSURE( xStg.is(), "Need storage!" );
- OSL_ENSURE( NULL != pStreamName, "Need stream name!" );
- OSL_ENSURE( NULL != pServiceName, "Need service name!" );
+ OSL_ENSURE( nullptr != pStreamName, "Need stream name!" );
+ OSL_ENSURE( nullptr != pServiceName, "Need service name!" );
SAL_INFO( "sw.filter", "SwXMLWriter::WriteThroughComponent : stream " << pStreamName );
// open stream
@@ -529,7 +529,7 @@ bool SwXMLWriter::WriteThroughComponent(
{
OSL_ENSURE( xOutputStream.is(), "I really need an output stream!" );
OSL_ENSURE( xComponent.is(), "Need component!" );
- OSL_ENSURE( NULL != pServiceName, "Need component name!" );
+ OSL_ENSURE( nullptr != pServiceName, "Need component name!" );
// get component
uno::Reference< xml::sax::XWriter > xSaxWriter = xml::sax::Writer::create(rxContext);
diff --git a/sw/source/filter/xml/wrtxml.hxx b/sw/source/filter/xml/wrtxml.hxx
index 78bf7b0208a3..a9a45bcfec15 100644
--- a/sw/source/filter/xml/wrtxml.hxx
+++ b/sw/source/filter/xml/wrtxml.hxx
@@ -51,7 +51,7 @@ public:
SwXMLWriter( const OUString& rBaseURL );
virtual ~SwXMLWriter();
- virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = 0 ) override;
+ virtual sal_uLong Write( SwPaM&, SfxMedium&, const OUString* = nullptr ) override;
private:
diff --git a/sw/source/filter/xml/xmlbrsh.cxx b/sw/source/filter/xml/xmlbrsh.cxx
index 4e07c24a1fe2..9b1bcc5960c0 100644
--- a/sw/source/filter/xml/xmlbrsh.cxx
+++ b/sw/source/filter/xml/xmlbrsh.cxx
@@ -115,7 +115,7 @@ SvXMLImportContext *SwXMLBrushItemImportContext::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( xmloff::token::IsXMLToken( rLocalName,
xmloff::token::XML_BINARY_DATA ) )
{
@@ -146,7 +146,7 @@ void SwXMLBrushItemImportContext::EndElement()
if( xBase64Stream.is() )
{
const OUString sURL( GetImport().ResolveGraphicObjectURLFromBase64( xBase64Stream ) );
- xBase64Stream = 0;
+ xBase64Stream = nullptr;
SvXMLImportItemMapper::PutXMLValue( *pItem, sURL, MID_GRAPHIC_LINK, GetImport().GetMM100UnitConverter() );
}
diff --git a/sw/source/filter/xml/xmlexp.cxx b/sw/source/filter/xml/xmlexp.cxx
index 67289a7b40ae..dfce3ca52921 100644
--- a/sw/source/filter/xml/xmlexp.cxx
+++ b/sw/source/filter/xml/xmlexp.cxx
@@ -87,12 +87,12 @@ SwXMLExport::SwXMLExport(
OUString const & implementationName, SvXMLExportFlags nExportFlags)
: SvXMLExport( util::MeasureUnit::INCH, rContext, implementationName, XML_TEXT,
nExportFlags ),
- pTableItemMapper( 0 ),
- pTableLines( 0 ),
+ pTableItemMapper( nullptr ),
+ pTableLines( nullptr ),
bBlock( false ),
bShowProgress( true ),
bSavedShowChanges( false ),
- doc( NULL ),
+ doc( nullptr ),
sNumberFormat("NumberFormat"),
sIsProtected("IsProtected"),
sCell("Cell")
@@ -163,7 +163,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
for( sal_uInt32 i = 0; i < nItems; ++i )
{
const SfxPoolItem* const pItem = rPool.GetItem2( nWhichId , i );
- if( 0 != pItem )
+ if( nullptr != pItem )
{
const SvXMLAttrContainerItem *pUnknown =
dynamic_cast<const SvXMLAttrContainerItem*>( pItem );
@@ -250,7 +250,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
// we don't need it here.
// else: keep default pClass that we received
- SvXMLGraphicHelper *pGraphicResolver = 0;
+ SvXMLGraphicHelper *pGraphicResolver = nullptr;
if( !GetGraphicResolver().is() )
{
pGraphicResolver = SvXMLGraphicHelper::Create( GRAPHICHELPER_MODE_WRITE );
@@ -258,7 +258,7 @@ sal_uInt32 SwXMLExport::exportDoc( enum XMLTokenEnum eClass )
SetGraphicResolver( xGraphicResolver );
}
- SvXMLEmbeddedObjectHelper *pEmbeddedResolver = 0;
+ SvXMLEmbeddedObjectHelper *pEmbeddedResolver = nullptr;
if( !GetEmbeddedResolver().is() )
{
SfxObjectShell *pPersist = pDoc->GetPersist();
@@ -523,7 +523,7 @@ sal_Int64 SAL_CALL SwXMLExport::getSomething( const Sequence< sal_Int8 >& rId )
SwDoc* SwXMLExport::getDoc()
{
- if( doc != NULL )
+ if( doc != nullptr )
return doc;
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
@@ -531,9 +531,9 @@ SwDoc* SwXMLExport::getDoc()
assert( xTextTunnel.is());
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- assert( pText != NULL );
+ assert( pText != nullptr );
doc = pText->GetDoc();
- assert( doc != NULL );
+ assert( doc != nullptr );
return doc;
}
diff --git a/sw/source/filter/xml/xmlexpit.cxx b/sw/source/filter/xml/xmlexpit.cxx
index 637ec9e17a83..c556a4da7983 100644
--- a/sw/source/filter/xml/xmlexpit.cxx
+++ b/sw/source/filter/xml/xmlexpit.cxx
@@ -149,7 +149,7 @@ void SvXMLExportItemMapper::exportXML( const SvXMLExport& rExport,
}
if( dynamic_cast<const SvXMLAttrContainerItem*>( &rItem) != nullptr )
{
- SvXMLNamespaceMap *pNewNamespaceMap = 0;
+ SvXMLNamespaceMap *pNewNamespaceMap = nullptr;
const SvXMLNamespaceMap *pNamespaceMap = &rNamespaceMap;
const SvXMLAttrContainerItem *pUnknown =
@@ -274,7 +274,7 @@ const SfxPoolItem* SvXMLExportItemMapper::GetItem( const SfxItemSet& rSet,
}
else
{
- return NULL;
+ return nullptr;
}
}
@@ -594,8 +594,8 @@ bool SvXMLExportItemMapper::QueryXMLValue(
case TOP_BORDER:
case BOTTOM_BORDER:
{
- bool bEqual = ( NULL == pTop && NULL == pBottom &&
- NULL == pLeft && NULL == pRight ) ||
+ bool bEqual = ( nullptr == pTop && nullptr == pBottom &&
+ nullptr == pLeft && nullptr == pRight ) ||
( pTop && pBottom && pLeft && pRight &&
*pTop == *pBottom && *pTop == *pLeft &&
*pTop == *pRight );
@@ -617,10 +617,10 @@ bool SvXMLExportItemMapper::QueryXMLValue(
if( !pTop && !pBottom && !pLeft && !pRight )
return false;
- bool bEqual = NULL != pTop &&
- NULL != pBottom &&
- NULL != pLeft &&
- NULL != pRight;
+ bool bEqual = nullptr != pTop &&
+ nullptr != pBottom &&
+ nullptr != pLeft &&
+ nullptr != pRight;
if( bEqual )
{
@@ -651,25 +651,25 @@ bool SvXMLExportItemMapper::QueryXMLValue(
return false;
break;
case LEFT_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pLeft ||
+ if( bEqual || nullptr == pLeft ||
0 == pLeft->GetDistance() ||
!lcl_isOdfDoubleLine( pLeft ) )
return false;
break;
case RIGHT_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pRight ||
+ if( bEqual || nullptr == pRight ||
0 == pRight->GetDistance() ||
!lcl_isOdfDoubleLine( pRight ) )
return false;
break;
case TOP_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pTop ||
+ if( bEqual || nullptr == pTop ||
0 == pTop->GetDistance() ||
!lcl_isOdfDoubleLine( pTop ) )
return false;
break;
case BOTTOM_BORDER_LINE_WIDTH:
- if( bEqual || NULL == pBottom ||
+ if( bEqual || nullptr == pBottom ||
0 == pBottom->GetDistance() ||
!lcl_isOdfDoubleLine( pBottom ) )
return false;
@@ -721,11 +721,11 @@ bool SvXMLExportItemMapper::QueryXMLValue(
pLine = pBottom;
break;
default:
- pLine = NULL;
+ pLine = nullptr;
break;
}
- if( NULL != pLine )
+ if( nullptr != pLine )
{
sal_Int32 nWidth = pLine->GetWidth();
diff --git a/sw/source/filter/xml/xmlexpit.hxx b/sw/source/filter/xml/xmlexpit.hxx
index 4ae4612d1dc1..66ab4202b52f 100644
--- a/sw/source/filter/xml/xmlexpit.hxx
+++ b/sw/source/filter/xml/xmlexpit.hxx
@@ -82,7 +82,7 @@ public:
const SfxPoolItem& rItem,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const SfxItemSet *pSet = NULL ) const;
+ const SfxItemSet *pSet = nullptr ) const;
/** this method is called for every item that has the
MID_SW_FLAG_NO_ITEM_EXPORT flag set */
diff --git a/sw/source/filter/xml/xmlfmt.cxx b/sw/source/filter/xml/xmlfmt.cxx
index f8e9e33ddc0b..acf62efd26a6 100644
--- a/sw/source/filter/xml/xmlfmt.cxx
+++ b/sw/source/filter/xml/xmlfmt.cxx
@@ -316,7 +316,7 @@ SwXMLTextStyleContext_Impl::SwXMLTextStyleContext_Impl( SwXMLImport& rImport,
sal_uInt16 nFamily,
SvXMLStylesContext& rStyles ) :
XMLTextStyleContext( rImport, nPrfx, rLName, xAttrList, rStyles, nFamily ),
- pConditions( 0 )
+ pConditions( nullptr )
{
}
@@ -339,7 +339,7 @@ SvXMLImportContext *SwXMLTextStyleContext_Impl::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_STYLE == nPrefix && IsXMLToken( rLocalName, XML_MAP ) )
{
@@ -374,7 +374,7 @@ void SwXMLTextStyleContext_Impl::Finish( bool bOverwrite )
if( !xStyle.is() )
return;
- const SwXStyle* pStyle = 0;
+ const SwXStyle* pStyle = nullptr;
uno::Reference<lang::XUnoTunnel> xStyleTunnel( xStyle, uno::UNO_QUERY);
if( xStyleTunnel.is() )
{
@@ -510,7 +510,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
OSL_ENSURE( !pItemSet,
"SwXMLItemSetStyleContext_Impl::CreateItemSetContext: item set exists" );
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
SwDoc* pDoc = SwImport::GetDocFromXMLImport( GetSwImport() );
@@ -541,7 +541,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateItemSetContext(
if( !pContext )
{
delete pItemSet;
- pItemSet = 0;
+ pItemSet = nullptr;
}
return pContext;
@@ -555,8 +555,8 @@ SwXMLItemSetStyleContext_Impl::SwXMLItemSetStyleContext_Impl( SwXMLImport& rImpo
SvXMLStylesContext& rStylesC,
sal_uInt16 nFamily ) :
SvXMLStyleContext( rImport, nPrfx, rLName, xAttrList, nFamily ),
- pItemSet( 0 ),
- pTextStyle( 0 ),
+ pItemSet( nullptr ),
+ pTextStyle( nullptr ),
rStyles( rStylesC ),
bHasMasterPageName( false ),
bPageDescConnected( false ),
@@ -580,7 +580,7 @@ SvXMLImportContext *SwXMLItemSetStyleContext_Impl::CreateChildContext(
const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_STYLE == nPrefix )
{
@@ -653,7 +653,7 @@ void SwXMLItemSetStyleContext_Impl::ConnectPageDesc()
}
const SfxPoolItem *pItem;
- SwFormatPageDesc *pFormatPageDesc = 0;
+ SwFormatPageDesc *pFormatPageDesc = nullptr;
if( SfxItemState::SET == pItemSet->GetItemState( RES_PAGEDESC, false,
&pItem ) )
{
@@ -750,7 +750,7 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateStyleStyleChildContext(
sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLStyleContext *pStyle = 0;
+ SvXMLStyleContext *pStyle = nullptr;
switch( nFamily )
{
@@ -786,7 +786,7 @@ SvXMLStyleContext *SwXMLStylesContext_Impl::CreateDefaultStyleStyleChildContext(
sal_uInt16 nFamily, sal_uInt16 nPrefix, const OUString& rLocalName,
const uno::Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLStyleContext *pStyle = 0;
+ SvXMLStyleContext *pStyle = nullptr;
switch( nFamily )
{
@@ -1041,7 +1041,7 @@ bool SwXMLImport::FindAutomaticStyle(
const SfxItemSet **ppItemSet,
OUString *pParent ) const
{
- SwXMLItemSetStyleContext_Impl *pStyle = 0;
+ SwXMLItemSetStyleContext_Impl *pStyle = nullptr;
if( GetAutoStyles() )
{
pStyle = const_cast<SwXMLItemSetStyleContext_Impl*>(dynamic_cast< const SwXMLItemSetStyleContext_Impl* >(
@@ -1072,7 +1072,7 @@ bool SwXMLImport::FindAutomaticStyle(
}
}
- return pStyle != 0;
+ return pStyle != nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/filter/xml/xmlfonte.cxx b/sw/source/filter/xml/xmlfonte.cxx
index a59ae3a3aa15..73bee7ba6d89 100644
--- a/sw/source/filter/xml/xmlfonte.cxx
+++ b/sw/source/filter/xml/xmlfonte.cxx
@@ -58,7 +58,7 @@ SwXMLFontAutoStylePool_Impl::SwXMLFontAutoStylePool_Impl(
sal_uInt32 nItems = rPool.GetItemCount2( nWhichId );
for( sal_uInt32 j = 0; j < nItems; ++j )
{
- if( 0 != (pItem = rPool.GetItem2( nWhichId, j ) ) )
+ if( nullptr != (pItem = rPool.GetItem2( nWhichId, j ) ) )
{
const SvxFontItem *pFont =
static_cast<const SvxFontItem *>(pItem);
diff --git a/sw/source/filter/xml/xmlimp.cxx b/sw/source/filter/xml/xmlimp.cxx
index bd8d5538e209..78ee5864f0fa 100644
--- a/sw/source/filter/xml/xmlimp.cxx
+++ b/sw/source/filter/xml/xmlimp.cxx
@@ -196,7 +196,7 @@ SvXMLImportContext *SwXMLDocContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetSwImport().GetDocElemTokenMap();
switch( rTokenMap.Get( nPrefix, rLocalName ) )
@@ -368,7 +368,7 @@ SvXMLImportContext *SwXMLImport::CreateContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
// #i69629# - own subclasses for <office:document> and <office:document-styles>
if( XML_NAMESPACE_OFFICE==nPrefix &&
@@ -406,13 +406,13 @@ SwXMLImport::SwXMLImport(
const uno::Reference< uno::XComponentContext >& rContext,
OUString const & implementationName, SvXMLImportFlags nImportFlags)
: SvXMLImport( rContext, implementationName, nImportFlags ),
- pSttNdIdx( 0 ),
- pTableItemMapper( 0 ),
- pDocElemTokenMap( 0 ),
- pTableElemTokenMap( 0 ),
- pTableCellAttrTokenMap( 0 ),
- pGraphicResolver( 0 ),
- pEmbeddedResolver( 0 ),
+ pSttNdIdx( nullptr ),
+ pTableItemMapper( nullptr ),
+ pDocElemTokenMap( nullptr ),
+ pTableElemTokenMap( nullptr ),
+ pTableCellAttrTokenMap( nullptr ),
+ pGraphicResolver( nullptr ),
+ pEmbeddedResolver( nullptr ),
nStyleFamilyMask( SFX_STYLE_FAMILY_ALL ),
bLoadDoc( true ),
bInsert( false ),
@@ -421,7 +421,7 @@ SwXMLImport::SwXMLImport(
bOrganizerMode( false ),
bInititedXForms( false ),
bPreserveRedlineMode( true ),
- doc( NULL )
+ doc( nullptr )
{
_InitItemImport();
@@ -491,7 +491,7 @@ static OTextCursorHelper *lcl_xml_GetSwXTextCursor( const Reference < XTextCurso
Reference<XUnoTunnel> xCrsrTunnel( rTextCursor, UNO_QUERY );
OSL_ENSURE( xCrsrTunnel.is(), "missing XUnoTunnel for Cursor" );
if( !xCrsrTunnel.is() )
- return 0;
+ return nullptr;
OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper *>(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
OSL_ENSURE( pTextCrsr, "SwXTextCursor missing" );
@@ -596,7 +596,7 @@ void SwXMLImport::startDocument()
// We also might change into the insert mode later, so we have to make
// sure to first set the insert mode and then create the text import
// helper. Otherwise it won't have the insert flag set!
- OTextCursorHelper *pTextCrsr = 0;
+ OTextCursorHelper *pTextCrsr = nullptr;
Reference < XTextCursor > xTextCursor;
if( HasTextImport() )
xTextCursor = GetTextImport()->GetCursor();
@@ -605,8 +605,8 @@ void SwXMLImport::startDocument()
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
xTextCursor = xText->createTextCursor();
- SwCrsrShell *pCrsrSh = 0;
- SwDoc *pDoc = 0;
+ SwCrsrShell *pCrsrSh = nullptr;
+ SwDoc *pDoc = nullptr;
if( SvXMLImportFlags::ALL == getImportFlags() )
{
pTextCrsr = lcl_xml_GetSwXTextCursor( xTextCursor );
@@ -629,10 +629,10 @@ void SwXMLImport::startDocument()
{
const uno::Reference<text::XTextRange> xInsertTextRange(
SwXTextRange::CreateXTextRange(
- *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), 0 ) );
+ *pDoc, *pCrsrSh->GetCrsr()->GetPoint(), nullptr ) );
setTextInsertMode( xInsertTextRange );
xTextCursor = GetTextImport()->GetCursor();
- pTextCrsr = 0;
+ pTextCrsr = nullptr;
}
else
GetTextImport()->SetCursor( xTextCursor );
@@ -730,7 +730,7 @@ void SwXMLImport::endDocument()
if( HasShapeImport() )
ClearShapeImport();
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
if( (getImportFlags() & SvXMLImportFlags::CONTENT) && !IsStylesOnlyMode() )
{
Reference<XUnoTunnel> xCrsrTunnel( GetTextImport()->GetCursor(),
@@ -819,13 +819,13 @@ void SwXMLImport::endDocument()
if( pCNd && pCNd->StartOfSectionIndex()+2 <
pCNd->EndOfSectionIndex() )
{
- pPaM->GetBound().nContent.Assign( 0, 0 );
- pPaM->GetBound(false).nContent.Assign( 0, 0 );
+ pPaM->GetBound().nContent.Assign( nullptr, 0 );
+ pPaM->GetBound(false).nContent.Assign( nullptr, 0 );
pDoc->GetNodes().Delete( pPaM->GetPoint()->nNode );
}
}
}
- else if( 0 != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTextNode()) )
+ else if( nullptr != (pCurrNd = pDoc->GetNodes()[nNodeIdx]->GetTextNode()) )
{
// Id we're in insert mode, the empty node is joined with
// the next and the previous one.
@@ -846,7 +846,7 @@ void SwXMLImport::endDocument()
}
else if (pCurrNd->GetText().isEmpty())
{
- pPos->nContent.Assign( 0, 0 );
+ pPos->nContent.Assign( nullptr, 0 );
pPaM->SetMark(); pPaM->DeleteMark();
pDoc->GetNodes().Delete( pPos->nNode );
pPaM->Move( fnMoveBackward );
@@ -870,7 +870,7 @@ void SwXMLImport::endDocument()
GetTextImport()->ResetCursor();
delete pSttNdIdx;
- pSttNdIdx = 0;
+ pSttNdIdx = nullptr;
// SJ: #i49801# -> now permitting repaints
if ( pDoc )
@@ -1168,10 +1168,10 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
bool bPropLineSpacingShrinksFirstLine = false;
bool bSubtractFlysAnchoredAtFlys = false;
- const PropertyValue* currentDatabaseDataSource = NULL;
- const PropertyValue* currentDatabaseCommand = NULL;
- const PropertyValue* currentDatabaseCommandType = NULL;
- const PropertyValue* embeddedDatabaseName = 0;
+ const PropertyValue* currentDatabaseDataSource = nullptr;
+ const PropertyValue* currentDatabaseCommand = nullptr;
+ const PropertyValue* currentDatabaseCommandType = nullptr;
+ const PropertyValue* embeddedDatabaseName = nullptr;
while( nCount-- )
{
@@ -1274,11 +1274,11 @@ void SwXMLImport::SetConfigurationSettings(const Sequence < PropertyValue > & aC
try
{
- if( currentDatabaseDataSource != NULL )
+ if( currentDatabaseDataSource != nullptr )
xProps->setPropertyValue( currentDatabaseDataSource->Name, currentDatabaseDataSource->Value );
- if( currentDatabaseCommand != NULL )
+ if( currentDatabaseCommand != nullptr )
xProps->setPropertyValue( currentDatabaseCommand->Name, currentDatabaseCommand->Value );
- if( currentDatabaseCommandType != NULL )
+ if( currentDatabaseCommandType != nullptr )
xProps->setPropertyValue( currentDatabaseCommandType->Name, currentDatabaseCommandType->Value );
if (embeddedDatabaseName)
xProps->setPropertyValue(embeddedDatabaseName->Name, embeddedDatabaseName->Value);
@@ -1530,7 +1530,7 @@ void SwXMLImport::initXForms()
return;
SwXTextDocument* pXTextDocument = reinterpret_cast<SwXTextDocument*>(
xDocTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ) );
- if( pXTextDocument == NULL )
+ if( pXTextDocument == nullptr )
return;
SwDoc *pDoc = pXTextDocument->GetDocShell()->GetDoc();
@@ -1545,7 +1545,7 @@ void SwXMLImport::initXForms()
SwDoc* SwXMLImport::getDoc()
{
- if( doc != NULL )
+ if( doc != nullptr )
return doc;
Reference < XTextDocument > xTextDoc( GetModel(), UNO_QUERY );
Reference < XText > xText = xTextDoc->getText();
@@ -1553,9 +1553,9 @@ SwDoc* SwXMLImport::getDoc()
assert( xTextTunnel.is());
SwXText *pText = reinterpret_cast< SwXText *>(
sal::static_int_cast< sal_IntPtr >( xTextTunnel->getSomething( SwXText::getUnoTunnelId() )));
- assert( pText != NULL );
+ assert( pText != nullptr );
doc = pText->GetDoc();
- assert( doc != NULL );
+ assert( doc != nullptr );
return doc;
}
diff --git a/sw/source/filter/xml/xmlimp.hxx b/sw/source/filter/xml/xmlimp.hxx
index c5e461445c7c..28ea68aeb946 100644
--- a/sw/source/filter/xml/xmlimp.hxx
+++ b/sw/source/filter/xml/xmlimp.hxx
@@ -166,8 +166,8 @@ public:
bool FindAutomaticStyle( sal_uInt16 nFamily,
const OUString& rName,
- const SfxItemSet **ppItemSet=0,
- OUString *pParent=0 ) const;
+ const SfxItemSet **ppItemSet=nullptr,
+ OUString *pParent=nullptr ) const;
virtual void SetStatistics(
const css::uno::Sequence< css::beans::NamedValue> & i_rStats) override;
diff --git a/sw/source/filter/xml/xmlimpit.cxx b/sw/source/filter/xml/xmlimpit.cxx
index 90a17b7c2c73..2a0d155f9f93 100644
--- a/sw/source/filter/xml/xmlimpit.cxx
+++ b/sw/source/filter/xml/xmlimpit.cxx
@@ -83,7 +83,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
sal_Int16 nAttr = xAttrList->getLength();
- SvXMLAttrContainerItem *pUnknownItem = 0;
+ SvXMLAttrContainerItem *pUnknownItem = nullptr;
for( sal_Int16 i=0; i < nAttr; i++ )
{
const OUString& rAttrName = xAttrList->getNameByIndex( i );
@@ -106,7 +106,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
MID_SW_FLAG_ELEMENT_ITEM_IMPORT)) )
{
// first get item from itemset
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
SfxItemState eState = rSet.GetItemState( pEntry->nWhichId, true,
&pItem );
@@ -154,7 +154,7 @@ void SvXMLImportItemMapper::importXML( SfxItemSet& rSet,
{
if( !pUnknownItem )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( SfxItemState::SET == rSet.GetItemState( nUnknownWhich, true,
&pItem ) )
{
@@ -231,14 +231,14 @@ struct BoxHolder : private boost::noncopyable
explicit BoxHolder(SvxBoxItem& rBox)
{
- pTop = rBox.GetTop() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetTop() );
- pBottom = rBox.GetBottom() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetBottom() );
- pLeft = rBox.GetLeft() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetLeft() );
- pRight = rBox.GetRight() == NULL ?
- NULL : new SvxBorderLine( *rBox.GetRight() );
+ pTop = rBox.GetTop() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetTop() );
+ pBottom = rBox.GetBottom() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetBottom() );
+ pLeft = rBox.GetLeft() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetLeft() );
+ pRight = rBox.GetRight() == nullptr ?
+ nullptr : new SvxBorderLine( *rBox.GetRight() );
}
~BoxHolder()
@@ -932,7 +932,7 @@ bool SvXMLImportItemMapper::PutXMLValue(
const XMLPropertyHandler* pWritingModeHandler =
XMLPropertyHandlerFactory::CreatePropertyHandler(
XML_TYPE_TEXT_WRITING_MODE_WITH_DEFAULT );
- if( pWritingModeHandler != NULL )
+ if( pWritingModeHandler != nullptr )
{
Any aAny;
bOk = pWritingModeHandler->importXML( rValue, aAny,
diff --git a/sw/source/filter/xml/xmliteme.cxx b/sw/source/filter/xml/xmliteme.cxx
index 2b28b352f7df..538e720388cb 100644
--- a/sw/source/filter/xml/xmliteme.cxx
+++ b/sw/source/filter/xml/xmliteme.cxx
@@ -75,7 +75,7 @@ public:
const SfxPoolItem& rItem,
const SvXMLUnitConverter& rUnitConverter,
const SvXMLNamespaceMap& rNamespaceMap,
- const SfxItemSet *pSet = NULL ) const override;
+ const SfxItemSet *pSet = nullptr ) const override;
virtual void handleElementItem(
SvXMLExport& rExport,
diff --git a/sw/source/filter/xml/xmlitemi.cxx b/sw/source/filter/xml/xmlitemi.cxx
index ddecdccc0c35..b2030a6ad5c5 100644
--- a/sw/source/filter/xml/xmlitemi.cxx
+++ b/sw/source/filter/xml/xmlitemi.cxx
@@ -212,7 +212,7 @@ void SwXMLImportTableItemMapper_Impl::finished(
continue; // already read fo:margin-top etc.
}
// first get item from itemset
- SfxPoolItem const* pItem = 0;
+ SfxPoolItem const* pItem = nullptr;
SfxItemState eState =
rSet.GetItemState(Ids[i][0], true, &pItem);
@@ -294,7 +294,7 @@ SvXMLImportContext *SwXMLItemSetContext_Impl::CreateChildContext(
const SvXMLItemMapEntry& rEntry,
const SvXMLUnitConverter& _rUnitConv )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
switch( rEntry.nWhichId )
{
diff --git a/sw/source/filter/xml/xmlithlp.cxx b/sw/source/filter/xml/xmlithlp.cxx
index 2ad46ab74ee5..9d57fb6c7cd4 100644
--- a/sw/source/filter/xml/xmlithlp.cxx
+++ b/sw/source/filter/xml/xmlithlp.cxx
@@ -165,11 +165,11 @@ bool sw_frmitems_setXMLBorder( SvxBorderLine*& rpLine,
if( (bHasStyle && API_LINE_NONE == nStyle) ||
(bHasWidth && USHRT_MAX == nNamedWidth && 0 == nWidth) )
{
- bool bRet = 0 != rpLine;
+ bool bRet = nullptr != rpLine;
if( rpLine )
{
delete rpLine;
- rpLine = 0;
+ rpLine = nullptr;
}
return bRet;
diff --git a/sw/source/filter/xml/xmlitmap.hxx b/sw/source/filter/xml/xmlitmap.hxx
index d9738a83c7c3..00c7fcac027d 100644
--- a/sw/source/filter/xml/xmlitmap.hxx
+++ b/sw/source/filter/xml/xmlitmap.hxx
@@ -66,7 +66,7 @@ public:
SvXMLItemMapEntry* getByName( sal_uInt16 nNameSpace,
const OUString& rString,
- SvXMLItemMapEntry* pStartAt = NULL ) const;
+ SvXMLItemMapEntry* pStartAt = nullptr ) const;
SvXMLItemMapEntry& getByIndex( sal_uInt16 nIndex ) const;
sal_uInt16 getCount() const;
diff --git a/sw/source/filter/xml/xmlitmpr.cxx b/sw/source/filter/xml/xmlitmpr.cxx
index 7a119e7d0885..cec6e645f8fb 100644
--- a/sw/source/filter/xml/xmlitmpr.cxx
+++ b/sw/source/filter/xml/xmlitmpr.cxx
@@ -64,7 +64,7 @@ SvXMLItemMapEntry* SvXMLItemMapEntries::getByName( sal_uInt16 nNameSpace,
pMap++;
}
- return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : NULL;
+ return (pMap && (pMap->eLocalName != XML_TOKEN_INVALID)) ? pMap : nullptr;
}
SvXMLItemMapEntry& SvXMLItemMapEntries::getByIndex( sal_uInt16 nIndex ) const
diff --git a/sw/source/filter/xml/xmlmeta.cxx b/sw/source/filter/xml/xmlmeta.cxx
index 9a201702688f..b79dcc5a2764 100644
--- a/sw/source/filter/xml/xmlmeta.cxx
+++ b/sw/source/filter/xml/xmlmeta.cxx
@@ -46,7 +46,7 @@ SwXMLImport::GetDocumentProperties() const
if (IsOrganizerMode() || IsStylesOnlyMode() ||
IsBlockMode() || IsInsertMode())
{
- return 0;
+ return nullptr;
}
uno::Reference<document::XDocumentPropertiesSupplier> const xDPS(
GetModel(), UNO_QUERY_THROW);
@@ -56,7 +56,7 @@ SwXMLImport::GetDocumentProperties() const
SvXMLImportContext *SwXMLImport::CreateMetaContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if (getImportFlags() & SvXMLImportFlags::META)
{
@@ -94,15 +94,15 @@ struct statistic {
};
static const struct statistic s_stats [] = {
- { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTable, 0 },
- { XML_TOK_META_STAT_IMAGE, "ImageCount", &SwDocStat::nGrf, 0 },
- { XML_TOK_META_STAT_OLE, "ObjectCount", &SwDocStat::nOLE, 0 },
- { XML_TOK_META_STAT_PAGE, "PageCount", 0, &SwDocStat::nPage },
- { XML_TOK_META_STAT_PARA, "ParagraphCount", 0, &SwDocStat::nPara },
- { XML_TOK_META_STAT_WORD, "WordCount", 0, &SwDocStat::nWord },
- { XML_TOK_META_STAT_CHAR, "CharacterCount", 0, &SwDocStat::nChar },
- { XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR, "NonWhitespaceCharacterCount", 0, &SwDocStat::nCharExcludingSpaces },
- { XML_TOK_META_STAT_END, 0, 0, 0 }
+ { XML_TOK_META_STAT_TABLE, "TableCount", &SwDocStat::nTable, nullptr },
+ { XML_TOK_META_STAT_IMAGE, "ImageCount", &SwDocStat::nGrf, nullptr },
+ { XML_TOK_META_STAT_OLE, "ObjectCount", &SwDocStat::nOLE, nullptr },
+ { XML_TOK_META_STAT_PAGE, "PageCount", nullptr, &SwDocStat::nPage },
+ { XML_TOK_META_STAT_PARA, "ParagraphCount", nullptr, &SwDocStat::nPara },
+ { XML_TOK_META_STAT_WORD, "WordCount", nullptr, &SwDocStat::nWord },
+ { XML_TOK_META_STAT_CHAR, "CharacterCount", nullptr, &SwDocStat::nChar },
+ { XML_TOK_META_STAT_NON_WHITE_SPACE_CHAR, "NonWhitespaceCharacterCount", nullptr, &SwDocStat::nCharExcludingSpaces },
+ { XML_TOK_META_STAT_END, nullptr, nullptr, nullptr }
};
void SwXMLImport::SetStatistics(
@@ -119,12 +119,12 @@ void SwXMLImport::SetStatistics(
sal_uInt32 nTokens = 0;
for (sal_Int32 i = 0; i < i_rStats.getLength(); ++i) {
- for (struct statistic const* pStat = s_stats; pStat->name != 0;
+ for (struct statistic const* pStat = s_stats; pStat->name != nullptr;
++pStat) {
if (i_rStats[i].Name.equalsAscii(pStat->name)) {
sal_Int32 val = 0;
if (i_rStats[i].Value >>= val) {
- if (pStat->target16 != 0) {
+ if (pStat->target16 != nullptr) {
aDocStat.*(pStat->target16)
= static_cast<sal_uInt16> (val);
} else {
diff --git a/sw/source/filter/xml/xmlscript.cxx b/sw/source/filter/xml/xmlscript.cxx
index 39b8dda5a884..7b514596fcb8 100644
--- a/sw/source/filter/xml/xmlscript.cxx
+++ b/sw/source/filter/xml/xmlscript.cxx
@@ -29,7 +29,7 @@ using namespace ::com::sun::star;
SvXMLImportContext *SwXMLImport::CreateScriptContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !(IsStylesOnlyMode() || IsInsertMode()) )
{
diff --git a/sw/source/filter/xml/xmltble.cxx b/sw/source/filter/xml/xmltble.cxx
index 66b1388b377c..1852787fb193 100644
--- a/sw/source/filter/xml/xmltble.cxx
+++ b/sw/source/filter/xml/xmltble.cxx
@@ -191,9 +191,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nLine )
{
- const SwFormatFrmSize *pFrmSize = 0;
- const SwFormatRowSplit* pRowSplit = 0;
- const SvxBrushItem *pBrush = 0;
+ const SwFormatFrmSize *pFrmSize = nullptr;
+ const SwFormatRowSplit* pRowSplit = nullptr;
+ const SvxBrushItem *pBrush = nullptr;
const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet();
const SfxPoolItem *pItem;
@@ -215,9 +215,9 @@ bool SwXMLTableFrameFormatsSort_Impl::AddRow( SwFrameFormat& rFrameFormat,
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
- const SwFormatFrmSize *pTestFrmSize = 0;
- const SwFormatRowSplit* pTestRowSplit = 0;
- const SvxBrushItem *pTestBrush = 0;
+ const SwFormatFrmSize *pTestFrmSize = nullptr;
+ const SwFormatRowSplit* pTestRowSplit = nullptr;
+ const SvxBrushItem *pTestBrush = nullptr;
const SwFrameFormat *pTestFormat = *i;
const SfxItemSet& rTestSet = pTestFormat->GetAttrSet();
if( SfxItemState::SET == rTestSet.GetItemState( RES_FRM_SIZE, false,
@@ -307,11 +307,11 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
const OUString& rNamePrefix,
sal_uInt32 nCol, sal_uInt32 nRow, bool bTop )
{
- const SwFormatVertOrient *pVertOrient = 0;
- const SvxBrushItem *pBrush = 0;
- const SvxBoxItem *pBox = 0;
- const SwTableBoxNumFormat *pNumFormat = 0;
- const SvxFrameDirectionItem *pFrameDir = 0;
+ const SwFormatVertOrient *pVertOrient = nullptr;
+ const SvxBrushItem *pBrush = nullptr;
+ const SvxBoxItem *pBox = nullptr;
+ const SwTableBoxNumFormat *pNumFormat = nullptr;
+ const SvxFrameDirectionItem *pFrameDir = nullptr;
const SfxItemSet& rItemSet = rFrameFormat.GetAttrSet();
const SfxPoolItem *pItem;
@@ -346,11 +346,11 @@ bool SwXMLTableFrameFormatsSort_Impl::AddCell( SwFrameFormat& rFrameFormat,
SwXMLFrameFormats_Impl::iterator i;
for( i = aFormatList.begin(); i < aFormatList.end(); ++i )
{
- const SwFormatVertOrient *pTestVertOrient = 0;
- const SvxBrushItem *pTestBrush = 0;
- const SvxBoxItem *pTestBox = 0;
- const SwTableBoxNumFormat *pTestNumFormat = 0;
- const SvxFrameDirectionItem *pTestFrameDir = 0;
+ const SwFormatVertOrient *pTestVertOrient = nullptr;
+ const SvxBrushItem *pTestBrush = nullptr;
+ const SvxBoxItem *pTestBox = nullptr;
+ const SwTableBoxNumFormat *pTestNumFormat = nullptr;
+ const SvxFrameDirectionItem *pTestFrameDir = nullptr;
const SwFrameFormat* pTestFormat = *i;
const SfxItemSet& rTestSet = pTestFormat->GetAttrSet();
if( SfxItemState::SET == rTestSet.GetItemState( RES_VERT_ORIENT, false,
@@ -948,7 +948,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
if( !pTableLines || pTableLines->empty() )
return;
- SwXMLTableLines_Impl* pLines = NULL;
+ SwXMLTableLines_Impl* pLines = nullptr;
size_t nInfoPos;
for( nInfoPos=0; nInfoPos < pTableLines->size(); nInfoPos++ )
{
@@ -972,7 +972,7 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
if( pTableLines->empty() )
{
delete pTableLines ;
- pTableLines = NULL;
+ pTableLines = nullptr;
}
// pass 2: export columns
@@ -980,12 +980,12 @@ void SwXMLExport::ExportTableLines( const SwTableLines& rLines,
size_t nColumn = 0U;
const size_t nColumns = rCols.size();
sal_Int32 nColRep = 1;
- SwXMLTableColumn_Impl *pColumn = (nColumns > 0) ? rCols[0U] : 0;
+ SwXMLTableColumn_Impl *pColumn = (nColumns > 0) ? rCols[0U] : nullptr;
while( pColumn )
{
nColumn++;
SwXMLTableColumn_Impl *pNextColumn =
- (nColumn < nColumns) ? rCols[nColumn] : 0;
+ (nColumn < nColumns) ? rCols[nColumn] : nullptr;
if( pNextColumn &&
pNextColumn->GetStyleName() == pColumn->GetStyleName() )
{
@@ -1128,7 +1128,7 @@ void SwXMLTextParagraphExport::exportTable(
OSL_ENSURE( xTextTable.is(), "text table missing" );
if( xTextTable.is() )
{
- const SwXTextTable *pXTable = 0;
+ const SwXTextTable *pXTable = nullptr;
Reference<XUnoTunnel> xTableTunnel( rTextContent, UNO_QUERY);
if( xTableTunnel.is() )
{
diff --git a/sw/source/filter/xml/xmltbli.cxx b/sw/source/filter/xml/xmltbli.cxx
index 386326a22f88..8999e9c7c285 100644
--- a/sw/source/filter/xml/xmltbli.cxx
+++ b/sw/source/filter/xml/xmltbli.cxx
@@ -188,7 +188,7 @@ public:
SwXMLTableCell_Impl( sal_uInt32 nRSpan=1UL, sal_uInt32 nCSpan=1UL ) :
dValue( 0.0 ),
- pStartNode( 0 ),
+ pStartNode( nullptr ),
nRowSpan( nRSpan ),
nColSpan( nCSpan ),
bProtected( false ),
@@ -208,7 +208,7 @@ public:
OUString const*const pStringValue,
OUString const& i_rXmlId);
- bool IsUsed() const { return pStartNode!=0 ||
+ bool IsUsed() const { return pStartNode!=nullptr ||
xSubTable.Is() || bProtected;}
sal_uInt32 GetRowSpan() const { return nRowSpan; }
@@ -222,7 +222,7 @@ public:
bool IsCovered() const { return mbCovered; }
bool HasStringValue() const { return m_bHasStringValue; }
OUString const* GetStringValue() const {
- return (m_bHasStringValue) ? &m_StringValue : 0;
+ return (m_bHasStringValue) ? &m_StringValue : nullptr;
}
const SwStartNode *GetStartNode() const { return pStartNode; }
@@ -257,7 +257,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
{
m_StringValue = *pStringValue;
}
- m_bHasStringValue = (pStringValue != 0);
+ m_bHasStringValue = (pStringValue != nullptr);
bProtected = bProtect;
if (!mbCovered) // ensure uniqueness
@@ -266,7 +266,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
}
// set formula, if valid
- if (pFormula != NULL)
+ if (pFormula != nullptr)
{
sFormula = *pFormula;
}
@@ -275,7 +275,7 @@ inline void SwXMLTableCell_Impl::Set( const OUString& rStyleName,
inline void SwXMLTableCell_Impl::SetStartNode( const SwStartNode *pSttNd )
{
pStartNode = pSttNd;
- xSubTable = 0;
+ xSubTable = nullptr;
}
inline SwXMLTableContext *SwXMLTableCell_Impl::GetSubTable() const
@@ -286,7 +286,7 @@ inline SwXMLTableContext *SwXMLTableCell_Impl::GetSubTable() const
inline void SwXMLTableCell_Impl::Dispose()
{
if( xSubTable.Is() )
- xSubTable = 0;
+ xSubTable = nullptr;
}
class SwXMLTableRow_Impl
@@ -300,7 +300,7 @@ class SwXMLTableRow_Impl
public:
SwXMLTableRow_Impl( const OUString& rStyleName, sal_uInt32 nCells,
- const OUString *pDfltCellStyleName = 0,
+ const OUString *pDfltCellStyleName = nullptr,
const OUString& i_rXmlId = OUString() );
~SwXMLTableRow_Impl() {}
@@ -576,14 +576,14 @@ SwXMLTableCellContext_Impl::~SwXMLTableCellContext_Impl()
inline void SwXMLTableCellContext_Impl::_InsertContent()
{
- SwStartNode const*const pStartNode( GetTable()->InsertTableSection(0,
+ SwStartNode const*const pStartNode( GetTable()->InsertTableSection(nullptr,
(m_bHasStringValue && m_bValueTypeIsString &&
- !aStyleName.isEmpty()) ? & aStyleName : 0) );
+ !aStyleName.isEmpty()) ? & aStyleName : nullptr) );
GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan,
pStartNode,
mXmlId,
- NULL, bProtect, &sFormula, bHasValue, fValue,
- (m_bHasStringValue && m_bValueTypeIsString) ? &m_StringValue : 0);
+ nullptr, bProtect, &sFormula, bHasValue, fValue,
+ (m_bHasStringValue && m_bValueTypeIsString) ? &m_StringValue : nullptr);
}
inline void SwXMLTableCellContext_Impl::InsertContent()
@@ -602,7 +602,7 @@ inline void SwXMLTableCellContext_Impl::InsertContentIfNotThere()
inline void SwXMLTableCellContext_Impl::InsertContent(
SwXMLTableContext *pTable )
{
- GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan, 0, mXmlId, pTable, bProtect );
+ GetTable()->InsertCell( aStyleName, nRowSpan, nColSpan, nullptr, mXmlId, pTable, bProtect );
bHasTableContent = true;
}
@@ -611,7 +611,7 @@ SvXMLImportContext *SwXMLTableCellContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
OUString sXmlId;
bool bSubTable = false;
@@ -793,7 +793,7 @@ SwXMLTableColContext_Impl::SwXMLTableColContext_Impl(
if( !aStyleName.isEmpty() )
{
const SfxPoolItem *pItem;
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_COLUMN,
aStyleName, &pAutoItemSet ) &&
@@ -859,7 +859,7 @@ SvXMLImportContext *SwXMLTableColsContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix &&
IsXMLToken( rLocalName, XML_TABLE_COLUMN ) &&
@@ -970,7 +970,7 @@ SvXMLImportContext *SwXMLTableRowContext_Impl::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix || XML_NAMESPACE_LO_EXT == nPrefix )
{
@@ -1040,7 +1040,7 @@ SvXMLImportContext *SwXMLTableRowsContext_Impl::CreateChildContext(
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( XML_NAMESPACE_TABLE == nPrefix &&
IsXMLToken( rLocalName, XML_TABLE_ROW ) &&
@@ -1163,7 +1163,7 @@ static OUString lcl_GenerateFieldTypeName(const OUString& sPrefix, SwTableNode*
++nCount;
sName = sPrefixStr + OUString::number(nCount);
}
- while (NULL != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
+ while (nullptr != pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
return sName;
}
@@ -1186,7 +1186,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
OUString sName(pContext->GetConnectionName());
// field type to be returned
- SwDDEFieldType* pType = NULL;
+ SwDDEFieldType* pType = nullptr;
// valid name?
if (sName.isEmpty())
@@ -1198,7 +1198,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
{
// check for existing DDE field type with the same name
SwDDEFieldType* pOldType = static_cast<SwDDEFieldType*>(pTableNode->GetDoc()->getIDocumentFieldsAccess().GetFieldType(RES_DDEFLD, sName, false));
- if (NULL != pOldType)
+ if (nullptr != pOldType)
{
// same values -> return old type
if ( (pOldType->GetCmd() == sCommand) &&
@@ -1218,7 +1218,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
}
// create new field type (unless we already have one)
- if (NULL == pType)
+ if (nullptr == pType)
{
// create new field type and return
SwDDEFieldType aDDEFieldType(sName, sCommand, nType);
@@ -1226,7 +1226,7 @@ static SwDDEFieldType* lcl_GetDDEFieldType(SwXMLDDETableContext_Impl* pContext,
GetDoc()->getIDocumentFieldsAccess().InsertFieldType(aDDEFieldType));
}
- OSL_ENSURE(NULL != pType, "We really want a SwDDEFieldType here!");
+ OSL_ENSURE(nullptr != pType, "We really want a SwDDEFieldType here!");
return pType;
}
@@ -1280,15 +1280,15 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
const OUString& rLName,
const Reference< xml::sax::XAttributeList > & xAttrList ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- pColumnDefaultCellStyleNames( 0 ),
+ pColumnDefaultCellStyleNames( nullptr ),
m_pRows( new SwXMLTableRows_Impl ),
- pTableNode( 0 ),
- pBox1( 0 ),
- pSttNd1( 0 ),
- pBoxFormat( 0 ),
- pLineFormat( 0 ),
- pSharedBoxFormats(NULL),
- pDDESource(NULL),
+ pTableNode( nullptr ),
+ pBox1( nullptr ),
+ pSttNd1( nullptr ),
+ pBoxFormat( nullptr ),
+ pLineFormat( nullptr ),
+ pSharedBoxFormats(nullptr),
+ pDDESource(nullptr),
bFirstSection( true ),
bRelWidth( true ),
bHasSubTables( false ),
@@ -1346,7 +1346,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
}
Reference< XTextTable > xTable;
- const SwXTextTable *pXTable = 0;
+ const SwXTextTable *pXTable = nullptr;
Reference<XMultiServiceFactory> xFactory( GetImport().GetModel(),
UNO_QUERY );
OSL_ENSURE( xFactory.is(), "factory missing" );
@@ -1370,7 +1370,7 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
}
catch( IllegalArgumentException& )
{
- xTable = 0;
+ xTable = nullptr;
}
}
@@ -1420,16 +1420,16 @@ SwXMLTableContext::SwXMLTableContext( SwXMLImport& rImport,
const Reference< xml::sax::XAttributeList > &,
SwXMLTableContext *pTable ) :
XMLTextTableContext( rImport, nPrfx, rLName ),
- pColumnDefaultCellStyleNames( 0 ),
+ pColumnDefaultCellStyleNames( nullptr ),
m_pRows( new SwXMLTableRows_Impl ),
pTableNode( pTable->pTableNode ),
- pBox1( 0 ),
- pSttNd1( 0 ),
- pBoxFormat( 0 ),
- pLineFormat( 0 ),
- pSharedBoxFormats(NULL),
+ pBox1( nullptr ),
+ pSttNd1( nullptr ),
+ pBoxFormat( nullptr ),
+ pLineFormat( nullptr ),
+ pSharedBoxFormats(nullptr),
xParentTable( pTable ),
- pDDESource(NULL),
+ pDDESource(nullptr),
bFirstSection( false ),
bRelWidth( true ),
bHasSubTables( false ),
@@ -1454,7 +1454,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
const SvXMLTokenMap& rTokenMap = GetSwImport().GetTableElemTokenMap();
bool bHeader = false;
@@ -1491,7 +1491,7 @@ SvXMLImportContext *SwXMLTableContext::CreateChildContext( sal_uInt16 nPrefix,
// save context for later processing (discard old context, if approp.)
if( IsValid() )
{
- if (pDDESource != NULL)
+ if (pDDESource != nullptr)
{
pDDESource->ReleaseRef();
}
@@ -1730,7 +1730,7 @@ void SwXMLTableContext::InsertRepRows( sal_uInt32 nCount )
pSrcCell->GetColSpan(),
InsertTableSection(),
OUString(),
- 0, pSrcCell->IsProtected(),
+ nullptr, pSrcCell->IsProtected(),
&pSrcCell->GetFormula(),
pSrcCell->HasValue(), pSrcCell->GetValue(),
pSrcCell->GetStringValue() );
@@ -1757,7 +1757,7 @@ void SwXMLTableContext::FinishRow()
const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
sal_uInt32 nCol ) const
{
- const SwXMLTableCell_Impl *pPrevCell = 0;
+ const SwXMLTableCell_Impl *pPrevCell = nullptr;
if( GetColumnCount() == nCol )
{
// The last cell is the right one here.
@@ -1774,7 +1774,7 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
pPrevCell = GetCell( nRow-1UL, GetColumnCount()-1UL );
}
- const SwStartNode *pSttNd = 0;
+ const SwStartNode *pSttNd = nullptr;
if( pPrevCell )
{
if( pPrevCell->GetStartNode() )
@@ -1784,7 +1784,7 @@ const SwStartNode *SwXMLTableContext::GetPrevStartNode( sal_uInt32 nRow,
else if ( pPrevCell->GetSubTable() )
pSttNd = pPrevCell->GetSubTable()->GetLastStartNode();
- OSL_ENSURE( pSttNd != 0,
+ OSL_ENSURE( pSttNd != nullptr,
"table corrupt" );
}
@@ -1803,7 +1803,7 @@ void SwXMLTableContext::FixRowSpan( sal_uInt32 nRow, sal_uInt32 nCol,
while( pCell && pCell->GetRowSpan() > 1UL )
{
pCell->SetRowSpan( nRowSpan++ );
- pCell = j > 0UL ? GetCell( --j, i ) : 0;
+ pCell = j > 0UL ? GetCell( --j, i ) : nullptr;
}
}
}
@@ -1844,7 +1844,7 @@ SwTableBox *SwXMLTableContext::NewTableBox( const SwStartNode *pStNd,
// created box, we use this box
pBox = pBox1;
pBox->SetUpper( pUpper );
- pBox1 = 0;
+ pBox1 = nullptr;
}
else
pBox = new SwTableBox( pBoxFormat, *pStNd, pUpper );
@@ -1861,7 +1861,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat(
bool& bNew,
bool* pModifyLocked )
{
- if ( pSharedBoxFormats == NULL )
+ if ( pSharedBoxFormats == nullptr )
pSharedBoxFormats = new map_BoxFormat();
SwTableBoxFormat* pBoxFormat2;
@@ -1897,7 +1897,7 @@ SwTableBoxFormat* SwXMLTableContext::GetSharedBoxFormat(
}
// lock format (if so desired)
- if ( pModifyLocked != NULL )
+ if ( pModifyLocked != nullptr )
{
(*pModifyLocked) = pBoxFormat2->IsModifyLocked();
pBoxFormat2->LockModify();
@@ -2039,7 +2039,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
if ( bNew )
{
// set style
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( pCell->GetStartNode() && !sStyleName.isEmpty() &&
GetSwImport().FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_CELL, sStyleName, &pAutoItemSet ) )
@@ -2078,13 +2078,13 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
!sStyleName.isEmpty() )
{
// default num format?
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pBoxFormat2->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
== SfxItemState::SET )
{
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( ( pNumFormat != NULL ) && ( pNumFormat->GetValue() == 0 ) )
+ if( ( pNumFormat != nullptr ) && ( pNumFormat->GetValue() == 0 ) )
{
// only one text node?
SwNodeIndex aNodeIndex( *(pCell->GetStartNode()), 1 );
@@ -2092,7 +2092,7 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
aNodeIndex.GetNode().StartOfSectionIndex() ) == 2 )
{
SwTextNode* pTextNode= aNodeIndex.GetNode().GetTextNode();
- if( pTextNode != NULL )
+ if( pTextNode != nullptr )
{
// check text: does it look like some form of 0.0?
const OUString& rText = pTextNode->GetText();
@@ -2133,16 +2133,16 @@ SwTableBox *SwXMLTableContext::MakeTableBox(
// No value but a non-textual format, i.e. a number format
// Solution: the number format will be removed,
// the cell gets the default text format.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pBoxFormat->GetItemState( RES_BOXATR_FORMAT, false, &pItem )
== SfxItemState::SET )
{
const SwDoc* pDoc = pBoxFormat->GetDoc();
const SvNumberFormatter* pNumberFormatter = pDoc ?
- pDoc->GetNumberFormatter() : 0;
+ pDoc->GetNumberFormatter() : nullptr;
const SwTableBoxNumFormat* pNumFormat =
static_cast<const SwTableBoxNumFormat*>( pItem );
- if( pNumFormat != NULL && pNumberFormatter &&
+ if( pNumFormat != nullptr && pNumberFormatter &&
!pNumberFormatter->GetEntry( pNumFormat->GetValue() )->IsTextFormat() )
pBoxFormat->ResetFormatAttr( RES_BOXATR_FORMAT );
}
@@ -2199,7 +2199,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
pFrameFormat->ResetAllFormatAttr(); // #i73790# - method renamed
pFrameFormat->SetFormatAttr( aFillOrder );
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
const OUString& rStyleName = (*m_pRows)[nTopRow]->GetStyleName();
if( 1UL == (nBottomRow - nTopRow) &&
!rStyleName.isEmpty() &&
@@ -2266,7 +2266,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
SwXMLTableCell_Impl *pCell = GetCell(nTopRow,nCol);
// #i95726# - some fault tolerance
- if ( pCell == 0 )
+ if ( pCell == nullptr )
{
OSL_FAIL( "table seems to be corrupt." );
break;
@@ -2297,7 +2297,7 @@ SwTableLine *SwXMLTableContext::MakeTableLine( SwTableBox *pUpper,
if( bSplit )
{
- SwTableBox* pBox = 0;
+ SwTableBox* pBox = nullptr;
SwXMLTableCell_Impl *pCell = GetCell( nTopRow, nStartCol );
// #i95726# - some fault tolerance
if( ( !bHasSubTables || ( pCell->GetRowSpan() == (nBottomRow-nTopRow) ) ) &&
@@ -2646,9 +2646,9 @@ void SwXMLTableContext::MakeTable()
{
OSL_FAIL("invalid table: no cells; deleting...");
pTableNode->GetDoc()->getIDocumentContentOperations().DeleteSection( pTableNode );
- pTableNode = 0;
- pBox1 = 0;
- pSttNd1 = 0;
+ pTableNode = nullptr;
+ pBox1 = nullptr;
+ pSttNd1 = nullptr;
return;
}
@@ -2664,14 +2664,14 @@ void SwXMLTableContext::MakeTable()
pTableNode->GetTable().SetRowsToRepeat( nHeaderRows );
pTableNode->GetTable().SetTableModel( !bHasSubTables );
- const SfxItemSet *pAutoItemSet = 0;
+ const SfxItemSet *pAutoItemSet = nullptr;
if( !aStyleName.isEmpty() &&
rSwImport.FindAutomaticStyle(
XML_STYLE_FAMILY_TABLE_TABLE, aStyleName, &pAutoItemSet ) &&
pAutoItemSet )
{
const SfxPoolItem *pItem;
- const SvxLRSpaceItem *pLRSpace = 0;
+ const SvxLRSpaceItem *pLRSpace = nullptr;
if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_LR_SPACE, false,
&pItem ) )
pLRSpace = static_cast<const SvxLRSpaceItem *>(pItem);
@@ -2705,7 +2705,7 @@ void SwXMLTableContext::MakeTable()
bSetHoriOrient = true;
}
- const SwFormatFrmSize *pSize = 0;
+ const SwFormatFrmSize *pSize = nullptr;
if( SfxItemState::SET == pAutoItemSet->GetItemState( RES_FRM_SIZE, false,
&pItem ) )
pSize = static_cast<const SwFormatFrmSize *>(pItem);
@@ -2788,7 +2788,7 @@ void SwXMLTableContext::MakeTable()
(*m_pRows)[i]->Dispose();
// now that table is complete, change into DDE table (if appropriate)
- if (NULL != pDDESource)
+ if (nullptr != pDDESource)
{
// change existing table into DDE table:
// 1) Get DDE field type (get data from dde-source context),
@@ -2876,7 +2876,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
pStNd = pDoc->GetNodes().MakeTextSection( aIdx, SwTableBoxStartNode,
pColl );
// Consider the case that a table is defined without a row.
- if( !pPrevSttNd && pBox1 != NULL )
+ if( !pPrevSttNd && pBox1 != nullptr )
{
pBox1->m_pStartNode = pStNd;
@@ -2886,7 +2886,7 @@ const SwStartNode *SwXMLTableContext::InsertTableSection(
aPos.nContent.Assign( pCNd, 0U );
const uno::Reference< text::XTextRange > xTextRange =
- SwXTextRange::CreateXTextRange( *pDoc, aPos, 0 );
+ SwXTextRange::CreateXTextRange( *pDoc, aPos, nullptr );
Reference < XText > xText = xTextRange->getText();
Reference < XTextCursor > xTextCursor =
xText->createTextCursorByRange( xTextRange );
diff --git a/sw/source/filter/xml/xmltbli.hxx b/sw/source/filter/xml/xmltbli.hxx
index a8662e8864a8..ff23336ce92d 100644
--- a/sw/source/filter/xml/xmltbli.hxx
+++ b/sw/source/filter/xml/xmltbli.hxx
@@ -103,7 +103,7 @@ class SwXMLTableContext : public XMLTextTableContext
sal_uInt32 nTopRow, sal_uInt32 nLeftCol,
sal_uInt32 nBottomRow, sal_uInt32 nRightCol );
- void _MakeTable( SwTableBox *pBox=0 );
+ void _MakeTable( SwTableBox *pBox=nullptr );
void MakeTable( SwTableBox *pBox, sal_Int32 nWidth );
void MakeTable();
@@ -146,7 +146,7 @@ public:
SwXMLImport& GetSwImport() { return static_cast<SwXMLImport&>(GetImport()); }
void InsertColumn( sal_Int32 nWidth, bool bRelWidth,
- const OUString *pDfltCellStyleName = 0 );
+ const OUString *pDfltCellStyleName = nullptr );
sal_Int32 GetColumnWidth( sal_uInt32 nCol, sal_uInt32 nColSpan=1UL ) const;
OUString GetColumnDefaultCellStyleName( sal_uInt32 nCol ) const;
inline sal_uInt32 GetColumnCount() const;
@@ -155,18 +155,18 @@ public:
bool IsInsertCellPossible() const { return nCurCol < GetColumnCount(); }
bool IsInsertColPossible() const { return nCurCol < USHRT_MAX; }
bool IsInsertRowPossible() const { return nCurRow < USHRT_MAX; }
- bool IsValid() const { return pTableNode != 0; }
+ bool IsValid() const { return pTableNode != nullptr; }
void InsertCell( const OUString& rStyleName,
sal_uInt32 nRowSpan=1U, sal_uInt32 nColSpan=1U,
- const SwStartNode *pStNd=0,
+ const SwStartNode *pStNd=nullptr,
const OUString & i_rXmlId = OUString(),
- SwXMLTableContext *pTable=0,
+ SwXMLTableContext *pTable=nullptr,
bool bIsProtected = false,
- const OUString *pFormula=0,
+ const OUString *pFormula=nullptr,
bool bHasValue = false,
double fValue = 0.0,
- OUString const*const pStringValue = 0);
+ OUString const*const pStringValue = nullptr);
void InsertRow( const OUString& rStyleName,
const OUString& rDfltCellStyleName,
bool bInHead,
@@ -175,8 +175,8 @@ public:
void InsertRepRows( sal_uInt32 nCount );
const SwXMLTableCell_Impl *GetCell( sal_uInt32 nRow, sal_uInt32 nCol ) const;
SwXMLTableCell_Impl *GetCell( sal_uInt32 nRow, sal_uInt32 nCol );
- const SwStartNode *InsertTableSection(const SwStartNode *pPrevSttNd = 0,
- OUString const* pStringValueStyleName = 0);
+ const SwStartNode *InsertTableSection(const SwStartNode *pPrevSttNd = nullptr,
+ OUString const* pStringValueStyleName = nullptr);
virtual void EndElement() override;
@@ -200,7 +200,7 @@ inline const SwStartNode *SwXMLTableContext::GetLastStartNode() const
inline bool SwXMLTableContext::HasColumnDefaultCellStyleNames() const
{
- return pColumnDefaultCellStyleNames != 0;
+ return pColumnDefaultCellStyleNames != nullptr;
}
#endif
diff --git a/sw/source/filter/xml/xmltext.cxx b/sw/source/filter/xml/xmltext.cxx
index debc85c5fd6e..e20a181cb769 100644
--- a/sw/source/filter/xml/xmltext.cxx
+++ b/sw/source/filter/xml/xmltext.cxx
@@ -58,7 +58,7 @@ SvXMLImportContext *SwXMLBodyContentContext_Impl::CreateChildContext(
sal_uInt16 nPrefix, const OUString& rLocalName,
const Reference< xml::sax::XAttributeList > & xAttrList )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
pContext = GetSwImport().GetTextImport()->CreateTextChildContext(
GetImport(), nPrefix, rLocalName, xAttrList,
@@ -78,7 +78,7 @@ void SwXMLBodyContentContext_Impl::EndElement()
SvXMLImportContext *SwXMLImport::CreateBodyContentContext(
const OUString& rLocalName )
{
- SvXMLImportContext *pContext = 0;
+ SvXMLImportContext *pContext = nullptr;
if( !IsStylesOnlyMode() )
pContext = new SwXMLBodyContentContext_Impl( *this, XML_NAMESPACE_OFFICE,
diff --git a/sw/source/filter/xml/xmltexte.cxx b/sw/source/filter/xml/xmltexte.cxx
index fe2a0730b91d..1091ddd46739 100644
--- a/sw/source/filter/xml/xmltexte.cxx
+++ b/sw/source/filter/xml/xmltexte.cxx
@@ -83,7 +83,7 @@ void SwXMLTextParagraphExport::exportStyleContent(
const Reference< XStyle > & rStyle )
{
- const SwXStyle* pStyle = 0;
+ const SwXStyle* pStyle = nullptr;
Reference<XUnoTunnel> xStyleTunnel( rStyle, UNO_QUERY);
if( xStyleTunnel.is() )
{
@@ -326,7 +326,7 @@ void SwXMLTextParagraphExport::_collectTextEmbeddedAutoStyles(
if( !rObjRef.is() )
return;
- const XMLPropertyState *aStates[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
SvGlobalName aClassId( rObjRef->getClassID() );
if( aIFrameClassId == aClassId )
@@ -395,7 +395,7 @@ void SwXMLTextParagraphExport::_exportTextEmbedded(
aAny >>= sStyle;
}
- const XMLPropertyState *aStates[8] = { 0, 0, 0, 0, 0, 0, 0, 0 };
+ const XMLPropertyState *aStates[8] = { nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr, nullptr };
switch( nType )
{
case SV_EMBEDDED_FRAME:
diff --git a/sw/source/filter/xml/xmltexti.cxx b/sw/source/filter/xml/xmltexti.cxx
index deaf437e6ca9..7f7a3481ac9d 100644
--- a/sw/source/filter/xml/xmltexti.cxx
+++ b/sw/source/filter/xml/xmltexti.cxx
@@ -91,11 +91,11 @@ const XMLServiceMapEntry_Impl aServiceMap[] =
SERVICE_MAP_ENTRY( IMPRESS, SIMPRESS ),
SERVICE_MAP_ENTRY( CHART, SCH ),
SERVICE_MAP_ENTRY( MATH, SM ),
- { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
+ { nullptr, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }
};
static void lcl_putHeightAndWidth ( SfxItemSet &rItemSet,
sal_Int32 nHeight, sal_Int32 nWidth,
- long *pTwipHeight=0, long *pTwipWidth=0 )
+ long *pTwipHeight=nullptr, long *pTwipWidth=nullptr )
{
if( nWidth > 0 && nHeight > 0 )
{
@@ -151,7 +151,7 @@ SwXMLTextImportHelper::SwXMLTextImportHelper(
bool /*bPreserveRedlineMode*/ ) :
XMLTextImportHelper( rModel, rImport, bInsertM, bStylesOnlyM, _bProgress,
bBlockM, bOrganizerM ),
- pRedlineHelper( NULL )
+ pRedlineHelper( nullptr )
{
uno::Reference<XPropertySet> xDocPropSet( rModel, UNO_QUERY );
pRedlineHelper = new XMLRedlineImportHelper(
@@ -189,14 +189,14 @@ bool SwXMLTextImportHelper::IsInHeaderFooter() const
OTextCursorHelper *pTextCrsr = reinterpret_cast< OTextCursorHelper * >(
sal::static_int_cast< sal_IntPtr >( xCrsrTunnel->getSomething( OTextCursorHelper::getUnoTunnelId() )));
SAL_WARN_IF(!pTextCrsr, "sw.uno", "SwXTextCursor missing");
- SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : NULL;
+ SwDoc *pDoc = pTextCrsr ? pTextCrsr->GetDoc() : nullptr;
return pDoc && pDoc->IsInHeaderFooter( pTextCrsr->GetPaM()->GetPoint()->nNode );
}
static SwOLENode *lcl_GetOLENode( const SwFrameFormat *pFrameFormat )
{
- SwOLENode *pOLENd = 0;
+ SwOLENode *pOLENd = nullptr;
if( pFrameFormat )
{
const SwFormatContent& rContent = pFrameFormat->GetContent();
@@ -242,8 +242,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
lcl_putHeightAndWidth( aItemSet, nHeight, nWidth,
&aTwipSize.Height(), &aTwipSize.Width() );
- SwFrameFormat *pFrameFormat = 0;
- SwOLENode *pOLENd = 0;
+ SwFrameFormat *pFrameFormat = nullptr;
+ SwOLENode *pOLENd = nullptr;
if( rHRef.copy( 0, nPos ) == "vnd.sun.star.ServiceName" )
{
bool bInsert = false;
@@ -291,8 +291,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
pOLENd = lcl_GetOLENode( pFrameFormat );
}
@@ -344,7 +344,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
// TODO/LATER: Actually it should be set here
if( pTextCrsr )
{
- pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, NULL, NULL );
+ pFrameFormat = pDoc->getIDocumentContentOperations().InsertOLE( *pTextCrsr->GetPaM(), aName, embed::Aspects::MSOLE_CONTENT, &aItemSet, nullptr, nullptr );
pOLENd = lcl_GetOLENode( pFrameFormat );
}
aObjName = aName;
@@ -445,7 +445,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOLEObject(
}
sal_Int64 nDrawAspect = 0;
- const XMLPropStyleContext *pStyle = 0;
+ const XMLPropStyleContext *pStyle = nullptr;
bool bHasSizeProps = false;
if( !rStyleName.isEmpty() )
{
@@ -596,8 +596,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertOOoLink(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL );
+ nullptr,
+ nullptr );
// TODO/LATER: in future may need a way to set replacement image url to the link ( may be even to the object ), needs oasis cws???
@@ -658,8 +658,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertApplet(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( aAppletImpl.GetApplet(), embed::Aspects::MSOLE_CONTENT ),
&aAppletImpl.GetItemSet(),
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -733,8 +733,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertPlugin(
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -775,7 +775,7 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
bool bHasBorder = false;
bool bIsBorderSet = false;
Size aMargin( SIZE_NOT_SET, SIZE_NOT_SET );
- const XMLPropStyleContext *pStyle = 0;
+ const XMLPropStyleContext *pStyle = nullptr;
if( !rStyleName.isEmpty() )
{
pStyle = FindAutoFrameStyle( rStyleName );
@@ -886,8 +886,8 @@ uno::Reference< XPropertySet > SwXMLTextImportHelper::createAndInsertFloatingFra
SwFrameFormat *pFrameFormat = pDoc->getIDocumentContentOperations().Insert( *pTextCrsr->GetPaM(),
::svt::EmbeddedObjectRef( xObj, embed::Aspects::MSOLE_CONTENT ),
&aItemSet,
- NULL,
- NULL);
+ nullptr,
+ nullptr);
xPropSet.set(SwXTextEmbeddedObject::CreateXTextEmbeddedObject(
*pDoc, pFrameFormat), uno::UNO_QUERY);
if( pDoc->getIDocumentDrawModelAccess().GetDrawModel() )
@@ -976,8 +976,8 @@ void SwXMLTextImportHelper::RedlineAdd(
bool bMergeLastPara)
{
// create redline helper on demand
- OSL_ENSURE(NULL != pRedlineHelper, "helper should have been created in constructor");
- if (NULL != pRedlineHelper)
+ OSL_ENSURE(nullptr != pRedlineHelper, "helper should have been created in constructor");
+ if (nullptr != pRedlineHelper)
pRedlineHelper->Add(rType, rId, rAuthor, rComment, rDateTime,
bMergeLastPara);
}
@@ -988,7 +988,7 @@ uno::Reference<XTextCursor> SwXMLTextImportHelper::RedlineCreateText(
{
uno::Reference<XTextCursor> xRet;
- if (NULL != pRedlineHelper)
+ if (nullptr != pRedlineHelper)
{
xRet = pRedlineHelper->CreateRedlineTextSection(rOldCursor, rId);
}
@@ -1001,7 +1001,7 @@ void SwXMLTextImportHelper::RedlineSetCursor(
bool bStart,
bool bIsOutsideOfParagraph)
{
- if (NULL != pRedlineHelper) {
+ if (nullptr != pRedlineHelper) {
uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
pRedlineHelper->SetCursor(rId, bStart, xTextRange,
bIsOutsideOfParagraph);
@@ -1013,7 +1013,7 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor(
bool bStart)
{
OUString rId = GetOpenRedlineId();
- if ((NULL != pRedlineHelper) && !rId.isEmpty())
+ if ((nullptr != pRedlineHelper) && !rId.isEmpty())
{
uno::Reference<XTextRange> xTextRange( GetCursor()->getStart() );
pRedlineHelper->AdjustStartNodeCursor(rId, bStart, xTextRange );
@@ -1024,20 +1024,20 @@ void SwXMLTextImportHelper::RedlineAdjustStartNodeCursor(
void SwXMLTextImportHelper::SetShowChanges( bool bShowChanges )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetShowChanges( bShowChanges );
}
void SwXMLTextImportHelper::SetRecordChanges( bool bRecordChanges )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetRecordChanges( bRecordChanges );
}
void SwXMLTextImportHelper::SetChangesProtectionKey(
const Sequence<sal_Int8> & rKey )
{
- if ( NULL != pRedlineHelper )
+ if ( nullptr != pRedlineHelper )
pRedlineHelper->SetProtectionKey( rKey );
}