summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uno
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:25:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:53 +0100
commit01b49802c7cda7fd4d5ba71263cef7bc95234b89 (patch)
treeb8d92f1c6abf5ac548d0bcb0c581ebfcffd8bfac /sw/source/uibase/uno
parent6cd7bf2043146a630925a2e49336f02c802f707a (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I01e11fa956a249974e77dce9deebe79311f098d0
Diffstat (limited to 'sw/source/uibase/uno')
-rw-r--r--sw/source/uibase/uno/SwXDocumentSettings.cxx26
-rw-r--r--sw/source/uibase/uno/SwXFilterOptions.cxx6
-rw-r--r--sw/source/uibase/uno/dlelstnr.cxx10
-rw-r--r--sw/source/uibase/uno/unoatxt.cxx52
-rw-r--r--sw/source/uibase/uno/unodefaults.cxx2
-rw-r--r--sw/source/uibase/uno/unodispatch.cxx12
-rw-r--r--sw/source/uibase/uno/unofreg.cxx2
-rw-r--r--sw/source/uibase/uno/unomailmerge.cxx22
-rw-r--r--sw/source/uibase/uno/unomod.cxx20
-rw-r--r--sw/source/uibase/uno/unotxdoc.cxx124
-rw-r--r--sw/source/uibase/uno/unotxvw.cxx46
11 files changed, 161 insertions, 161 deletions
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index a48e970561ed..0cb66cbf2018 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -237,9 +237,9 @@ SwXDocumentSettings::SwXDocumentSettings ( SwXTextDocument * pModel )
&Application::GetSolarMutex () )
, mxModel ( pModel )
, mpModel ( pModel )
-, mpDocSh ( NULL )
-, mpDoc ( NULL )
-, mpPrinter( NULL )
+, mpDocSh ( nullptr )
+, mpDoc ( nullptr )
+, mpPrinter( nullptr )
{
registerSlave ( new SwXPrintSettings ( PRINT_SETTINGS_DOCUMENT, mpModel->GetDocShell()->GetDoc() ) );
}
@@ -303,11 +303,11 @@ void SwXDocumentSettings::_preSetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -315,7 +315,7 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
throw (beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::RuntimeException, std::exception)
{
if (rInfo.mnAttributes & PropertyAttribute::READONLY)
- throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( 0 ) );
+ throw PropertyVetoException ("Property is read-only: " + rInfo.maName, static_cast < cppu::OWeakObject * > ( nullptr ) );
switch( rInfo.mnHandle )
{
@@ -859,19 +859,19 @@ void SwXDocumentSettings::_postSetValues ()
mpDoc->getIDocumentDeviceAccess().setPrinter( mpPrinter, true, true );
}
- mpPrinter = 0;
- mpDocSh = 0;
- mpDoc = 0;
+ mpPrinter = nullptr;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
void SwXDocumentSettings::_preGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
mpDocSh = mpModel->GetDocShell();
- if (NULL == mpDocSh)
+ if (nullptr == mpDocSh)
throw UnknownPropertyException();
mpDoc = mpDocSh->GetDoc();
- if (NULL == mpDoc)
+ if (nullptr == mpDoc)
throw UnknownPropertyException();
}
@@ -1244,8 +1244,8 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
void SwXDocumentSettings::_postGetValues ()
throw(beans::UnknownPropertyException, beans::PropertyVetoException, lang::IllegalArgumentException, lang::WrappedTargetException )
{
- mpDocSh = 0;
- mpDoc = 0;
+ mpDocSh = nullptr;
+ mpDoc = nullptr;
}
// XServiceInfo
diff --git a/sw/source/uibase/uno/SwXFilterOptions.cxx b/sw/source/uibase/uno/SwXFilterOptions.cxx
index d2bec2560321..252c740db290 100644
--- a/sw/source/uibase/uno/SwXFilterOptions.cxx
+++ b/sw/source/uibase/uno/SwXFilterOptions.cxx
@@ -95,12 +95,12 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream ));
uno::Reference< XUnoTunnel > xTunnel(xModel, uno::UNO_QUERY);
- SwDocShell* pDocShell = 0;
+ SwDocShell* pDocShell = nullptr;
if(xTunnel.is())
{
SwXTextDocument* pXDoc = reinterpret_cast< SwXTextDocument * >(
sal::static_int_cast< sal_IntPtr >(xTunnel->getSomething(SwXTextDocument::getUnoTunnelId())));
- pDocShell = pXDoc ? pXDoc->GetDocShell() : 0;
+ pDocShell = pXDoc ? pXDoc->GetDocShell() : nullptr;
}
if(pDocShell)
{
@@ -108,7 +108,7 @@ sal_Int16 SwXFilterOptions::execute() throw (uno::RuntimeException, std::excepti
SwAbstractDialogFactory* pFact = SwAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "SwAbstractDialogFactory fail!");
- std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(NULL, *pDocShell,
+ std::unique_ptr<AbstractSwAsciiFilterDlg> pAsciiDlg(pFact->CreateSwAsciiFilterDlg(nullptr, *pDocShell,
pInStream.get()));
OSL_ENSURE(pAsciiDlg, "Dialog creation failed!");
if(RET_OK == pAsciiDlg->Execute())
diff --git a/sw/source/uibase/uno/dlelstnr.cxx b/sw/source/uibase/uno/dlelstnr.cxx
index b3c7ba28cd02..fea9981242f1 100644
--- a/sw/source/uibase/uno/dlelstnr.cxx
+++ b/sw/source/uibase/uno/dlelstnr.cxx
@@ -109,9 +109,9 @@ void SAL_CALL SwLinguServiceEventListener::disposing(
SolarMutexGuard aGuard;
if (xLngSvcMgr.is() && rEventObj.Source == xLngSvcMgr)
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xLngSvcMgr.is() && rEventObj.Source == xGCIterator)
- xGCIterator = 0;
+ xGCIterator = nullptr;
}
void SAL_CALL SwLinguServiceEventListener::queryTermination(
@@ -129,10 +129,10 @@ void SAL_CALL SwLinguServiceEventListener::notifyTermination(
if (xDesktop.is() && rEventObj.Source == xDesktop)
{
if (xLngSvcMgr.is())
- xLngSvcMgr = 0;
+ xLngSvcMgr = nullptr;
if (xGCIterator.is())
- xGCIterator = 0;
- xDesktop = NULL;
+ xGCIterator = nullptr;
+ xDesktop = nullptr;
}
}
diff --git a/sw/source/uibase/uno/unoatxt.cxx b/sw/source/uibase/uno/unoatxt.cxx
index f42b4b5ba50e..ddba7056014b 100644
--- a/sw/source/uibase/uno/unoatxt.cxx
+++ b/sw/source/uibase/uno/unoatxt.cxx
@@ -253,7 +253,7 @@ SwXAutoTextGroup::~SwXAutoTextGroup()
uno::Sequence< OUString > SwXAutoTextGroup::getTitles() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -275,7 +275,7 @@ void SwXAutoTextGroup::renameByName(const OUString& aElementName,
// throw exception only if the programmatic name is to be changed into an existing name
if(aNewElementName != aElementName && hasByName(aNewElementName))
throw container::ElementExistException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex( aElementName);
@@ -314,7 +314,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
{
SwDoc *const pDoc((pxCursor) ? pxCursor->GetDoc() : &pxRange->GetDoc());
SwPaM aPam(pDoc->GetNodes());
- SwPaM * pPam(0);
+ SwPaM * pPam(nullptr);
if(pxCursor)
{
pPam = pxCursor->GetPaM();
@@ -332,7 +332,7 @@ static bool lcl_CopySelToDoc( SwDoc* pInsDoc, OTextCursorHelper* pxCursor, SwXTe
pInsDoc->getIDocumentFieldsAccess().UnlockExpFields();
if( !pInsDoc->getIDocumentFieldsAccess().IsExpFieldsLocked() )
- pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(NULL, true);
+ pInsDoc->getIDocumentFieldsAccess().UpdateExpFields(nullptr, true);
return bRet;
}
@@ -347,14 +347,14 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
if(!xTextRange.is())
throw uno::RuntimeException();
- SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0;
+ SwTextBlocks* pGlosGroup = pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr;
OUString sShortName(aName);
OUString sLongName(aTitle);
if (pGlosGroup && !pGlosGroup->GetError())
{
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pxRange = 0;
- OTextCursorHelper* pxCursor = 0;
+ SwXTextRange* pxRange = nullptr;
+ OTextCursorHelper* pxCursor = nullptr;
if(xRangeTunnel.is())
{
pxRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -364,7 +364,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
}
OUString sOnlyText;
- OUString* pOnlyText = 0;
+ OUString* pOnlyText = nullptr;
bool bNoAttr = !pxCursor && !pxRange;
if(bNoAttr)
{
@@ -439,7 +439,7 @@ uno::Reference< text::XAutoTextEntry > SwXAutoTextGroup::insertNewByName(const
void SwXAutoTextGroup::removeByName(const OUString& aEntryName) throw( container::NoSuchElementException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(pGlosGroup && !pGlosGroup->GetError())
{
sal_uInt16 nIdx = pGlosGroup->GetIndex(aEntryName);
@@ -501,7 +501,7 @@ void SwXAutoTextGroup::setName(const OUString& rName) throw( uno::RuntimeExcepti
sal_Int32 SwXAutoTextGroup::getCount() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return static_cast<sal_Int32>(pGlosGroup->GetCount());
@@ -511,7 +511,7 @@ uno::Any SwXAutoTextGroup::getByIndex(sal_Int32 nIndex)
throw( lang::IndexOutOfBoundsException, lang::WrappedTargetException, uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
const sal_uInt16 nCount = pGlosGroup->GetCount();
@@ -529,7 +529,7 @@ uno::Type SwXAutoTextGroup::getElementType() throw( uno::RuntimeException, std::
sal_Bool SwXAutoTextGroup::hasElements() throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
return pGlosGroup->GetCount() > 0;
@@ -550,7 +550,7 @@ uno::Sequence< OUString > SwXAutoTextGroup::getElementNames()
throw( uno::RuntimeException, std::exception )
{
SolarMutexGuard aGuard;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -568,7 +568,7 @@ sal_Bool SwXAutoTextGroup::hasByName(const OUString& rName)
{
SolarMutexGuard aGuard;
bool bRet = false;
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if (!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -603,7 +603,7 @@ void SwXAutoTextGroup::setPropertyValue(
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
switch(pEntry->nWID)
@@ -631,7 +631,7 @@ uno::Any SwXAutoTextGroup::getPropertyValue(const OUString& rPropertyName)
if(!pEntry)
throw beans::UnknownPropertyException();
- std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : 0);
+ std::unique_ptr<SwTextBlocks> pGlosGroup(pGlossaries ? pGlossaries->GetGroupDoc(m_sGroupName) : nullptr);
if(!pGlosGroup || pGlosGroup->GetError())
throw uno::RuntimeException();
@@ -674,7 +674,7 @@ void SwXAutoTextGroup::removeVetoableChangeListener(
void SwXAutoTextGroup::Invalidate()
{
- pGlossaries = 0;
+ pGlossaries = nullptr;
sName.clear();
m_sGroupName.clear();
}
@@ -724,7 +724,7 @@ SwXAutoTextEntry::SwXAutoTextEntry(SwGlossaries* pGlss, const OUString& rGroupNa
pGlossaries(pGlss),
sGroupName(rGroupName),
sEntryName(rEntryName),
- pBodyText ( NULL )
+ pBodyText ( nullptr )
{
}
@@ -783,7 +783,7 @@ void SwXAutoTextEntry::Notify( SfxBroadcaster& _rBC, const SfxHint& _rHint )
if(SFX_EVENT_PREPARECLOSEDOC == static_cast< const SfxEventHint& >( _rHint ).GetEventId())
{
implFlushDocument();
- xBodyText = 0;
+ xBodyText = nullptr;
EndListening( *&xDocSh );
xDocSh.Clear();
}
@@ -907,9 +907,9 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
// in the meantime
uno::Reference<lang::XUnoTunnel> xTunnel( xTextRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- OTextCursorHelper* pCursor = 0;
- SwXText *pText = 0;
+ SwXTextRange* pRange = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
+ SwXText *pText = nullptr;
if(xTunnel.is())
{
@@ -921,7 +921,7 @@ void SwXAutoTextEntry::applyTo(const uno::Reference< text::XTextRange > & xTextR
( xTunnel->getSomething( SwXText::getUnoTunnelId() ) );
}
- SwDoc* pDoc = 0;
+ SwDoc* pDoc = nullptr;
if (pRange)
pDoc = &pRange->GetDoc();
else if ( pCursor )
@@ -990,7 +990,7 @@ const struct SvEventDescription aAutotextEvents[] =
{
{ SW_EVENT_START_INS_GLOSSARY, "OnInsertStart" },
{ SW_EVENT_END_INS_GLOSSARY, "OnInsertDone" },
- { 0, NULL }
+ { 0, nullptr }
};
SwAutoTextEventDescriptor::SwAutoTextEventDescriptor(
@@ -1021,7 +1021,7 @@ void SwAutoTextEventDescriptor::replaceByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(),
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(),
"Strangely enough, the AutoText vanished!" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
@@ -1058,7 +1058,7 @@ void SwAutoTextEventDescriptor::getByName(
lang::WrappedTargetException,
uno::RuntimeException)
{
- OSL_ENSURE( NULL != rAutoTextEntry.GetGlossaries(), "no AutoText" );
+ OSL_ENSURE( nullptr != rAutoTextEntry.GetGlossaries(), "no AutoText" );
OSL_ENSURE( (nEvent == SW_EVENT_END_INS_GLOSSARY) ||
(nEvent == SW_EVENT_START_INS_GLOSSARY) ,
"Unknown event ID" );
diff --git a/sw/source/uibase/uno/unodefaults.cxx b/sw/source/uibase/uno/unodefaults.cxx
index a1cc59ca1f74..66e1eb38880a 100644
--- a/sw/source/uibase/uno/unodefaults.cxx
+++ b/sw/source/uibase/uno/unodefaults.cxx
@@ -46,7 +46,7 @@ SfxItemPool* SwSvxUnoDrawPool::getModelPool( bool /*bReadOnly*/ ) throw()
m_pDoc->getIDocumentDrawModelAccess().GetOrCreateDrawModel();
return &(m_pDoc->GetAttrPool());
}
- return 0;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/uno/unodispatch.cxx b/sw/source/uibase/uno/unodispatch.cxx
index e1b95428eca7..534aea55b09a 100644
--- a/sw/source/uibase/uno/unodispatch.cxx
+++ b/sw/source/uibase/uno/unodispatch.cxx
@@ -141,9 +141,9 @@ void SwXDispatchProviderInterceptor::disposing( const lang::EventObject& )
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
+ m_xIntercepted = nullptr;
}
namespace
@@ -178,10 +178,10 @@ void SwXDispatchProviderInterceptor::Invalidate()
uno::Reference< lang::XComponent> xInterceptedComponent(m_xIntercepted, uno::UNO_QUERY);
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xDispatch = 0;
+ m_xDispatch = nullptr;
}
- m_xIntercepted = NULL;
- m_pView = 0;
+ m_xIntercepted = nullptr;
+ m_pView = nullptr;
}
SwXDispatch::SwXDispatch(SwView& rVw) :
@@ -380,7 +380,7 @@ void SwXDispatch::disposing( const lang::EventObject& rSource ) throw(uno::Runti
StatusStruct_Impl aStatus = *aListIter;
aStatus.xListener->disposing(aObject);
}
- m_pView = 0;
+ m_pView = nullptr;
}
const sal_Char* SwXDispatch::GetDBChangeURL()
diff --git a/sw/source/uibase/uno/unofreg.cxx b/sw/source/uibase/uno/unofreg.cxx
index a5f6468771ea..7834a954a415 100644
--- a/sw/source/uibase/uno/unofreg.cxx
+++ b/sw/source/uibase/uno/unofreg.cxx
@@ -46,7 +46,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sw_component_getFactory(
void * pServiceManager,
void * )
{
- void * pRet = 0;
+ void * pRet = nullptr;
if( pServiceManager )
{
uno::Reference< XMultiServiceFactory > xMSF(
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 371080ea7e63..f8ff1a5370bf 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -101,7 +101,7 @@ static CloseResult CloseModelAndDocSh(
{
CloseResult eResult = eSuccess;
- rxDocSh = 0;
+ rxDocSh = nullptr;
//! models/documents should never be disposed (they may still be
//! used for printing which is called asynchronously for example)
@@ -153,13 +153,13 @@ static bool LoadFromURL_impl(
}
// try to get the DocShell
- SwDocShell *pTmpDocShell = 0;
+ SwDocShell *pTmpDocShell = nullptr;
Reference < XUnoTunnel > xTunnel( xTmpModel, UNO_QUERY );
if (xTunnel.is())
{
SwXTextDocument* pTextDoc = reinterpret_cast<SwXTextDocument *>(
xTunnel->getSomething( SwXTextDocument::getUnoTunnelId() ));
- pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : 0;
+ pTmpDocShell = pTextDoc ? pTextDoc->GetDocShell() : nullptr;
}
bool bRes = false;
@@ -348,8 +348,8 @@ static bool DeleteTmpFile_Impl(
bDelete = false;
}
- rxModel = 0;
- rxDocSh = 0; // destroy doc shell
+ rxModel = nullptr;
+ rxDocSh = nullptr; // destroy doc shell
if ( bDelete )
{
@@ -379,7 +379,7 @@ SwXMailMerge::SwXMailMerge() :
m_bSendAsAttachment(false),
m_bSaveAsSingleFile(false),
m_bDisposing(false),
- m_pMgr(0)
+ m_pMgr(nullptr)
{
// create empty document
// like in: SwModule::InsertEnv (appenv.cxx)
@@ -403,8 +403,8 @@ SwXMailMerge::~SwXMailMerge()
if ( eVetoed == CloseModelAndDocSh( m_xModel, m_xDocSh ) )
OSL_FAIL("ownership transferred to vetoing object!" );
- m_xModel = 0;
- m_xDocSh = 0; // destroy doc shell
+ m_xModel = nullptr;
+ m_xDocSh = nullptr; // destroy doc shell
}
}
@@ -419,7 +419,7 @@ public:
~MailMergeExecuteFinalizer()
{
osl::MutexGuard pMgrGuard( GetMailMergeMutex() );
- m_pMailMerge->m_pMgr = 0;
+ m_pMailMerge->m_pMgr = nullptr;
}
private:
@@ -595,7 +595,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
}
SfxViewFrame* pFrame = SfxViewFrame::GetFirst( xCurDocSh, false);
- SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : NULL;
+ SwView *pView = pFrame ? dynamic_cast<SwView*>( pFrame->GetViewShell() ) : nullptr;
if (!pView)
throw RuntimeException();
SwWrtShell &rSh = *pView->GetWrtShellPtr();
@@ -889,7 +889,7 @@ void SAL_CALL SwXMailMerge::setPropertyValue(
throw PropertyVetoException();
else
{
- void *pData = NULL;
+ void *pData = nullptr;
switch (pCur->nWID)
{
case WID_SELECTION : pData = &m_aSelection; break;
diff --git a/sw/source/uibase/uno/unomod.cxx b/sw/source/uibase/uno/unomod.cxx
index fa4fbb2e97fc..15aef1f25db7 100644
--- a/sw/source/uibase/uno/unomod.cxx
+++ b/sw/source/uibase/uno/unomod.cxx
@@ -209,7 +209,7 @@ Reference< XPropertySet > SwXModule::getViewSettings() throw( uno::RuntimeExcep
if(!mxViewSettings.is())
{
OSL_FAIL("Web or Text?");
- mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, 0 ) );
+ mxViewSettings = static_cast < HelperBaseNoState * > ( new SwXViewSettings( false, nullptr ) );
}
return mxViewSettings;
}
@@ -245,7 +245,7 @@ Sequence< OUString > SwXModule::getSupportedServiceNames() throw( RuntimeExcepti
SwXPrintSettings::SwXPrintSettings(SwXPrintSettingsType eType, SwDoc* pDoc)
: ChainableHelperNoState ( lcl_createPrintSettingsInfo (), &Application::GetSolarMutex() )
, meType(eType)
-, mpPrtOpt ( NULL )
+, mpPrtOpt ( nullptr )
, mpDoc ( pDoc )
{
}
@@ -415,7 +415,7 @@ void SwXPrintSettings::_postSetValues()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
void SwXPrintSettings::_preGetValues()
@@ -518,7 +518,7 @@ void SwXPrintSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo,
void SwXPrintSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpPrtOpt = NULL;
+ mpPrtOpt = nullptr;
}
OUString SwXPrintSettings::getImplementationName() throw( RuntimeException, std::exception )
@@ -542,8 +542,8 @@ Sequence< OUString > SwXPrintSettings::getSupportedServiceNames() throw( Runtime
SwXViewSettings::SwXViewSettings(bool bWebView, SwView* pVw)
: ChainableHelperNoState( lcl_createViewSettingsInfo (), &Application::GetSolarMutex() )
, pView(pVw)
- , mpViewOption(NULL)
- , mpConstViewOption(NULL)
+ , mpViewOption(nullptr)
+ , mpConstViewOption(nullptr)
, bObjectValid(true)
, bWeb(bWebView)
, mbApplyZoom(false)
@@ -569,7 +569,7 @@ void SwXViewSettings::_preSetValues ()
IllegalArgumentException, WrappedTargetException,
RuntimeException)
{
- const SwViewOption* pVOpt = 0;
+ const SwViewOption* pVOpt = nullptr;
if(pView)
{
if(!IsValid())
@@ -695,7 +695,7 @@ void SwXViewSettings::_setSingleValue( const comphelper::PropertyInfo & rInfo, c
break;
default:
throw IllegalArgumentException(
- "SwXViewSettings: invalid zoom type", 0, 0);
+ "SwXViewSettings: invalid zoom type", nullptr, 0);
}
mpViewOption->SetZoomType( eZoom );
mbApplyZoom = true;
@@ -819,7 +819,7 @@ void SwXViewSettings::_postSetValues()
: VIEWOPT_DEST_TEXT );
delete mpViewOption;
- mpViewOption = NULL;
+ mpViewOption = nullptr;
}
void SwXViewSettings::_preGetValues ()
@@ -984,7 +984,7 @@ void SwXViewSettings::_getSingleValue( const comphelper::PropertyInfo & rInfo, u
void SwXViewSettings::_postGetValues ()
throw(UnknownPropertyException, PropertyVetoException, IllegalArgumentException, WrappedTargetException )
{
- mpConstViewOption = NULL;
+ mpConstViewOption = nullptr;
}
OUString SwXViewSettings::getImplementationName() throw( RuntimeException, std::exception )
diff --git a/sw/source/uibase/uno/unotxdoc.cxx b/sw/source/uibase/uno/unotxdoc.cxx
index 83416d69e336..2ab018bc95d8 100644
--- a/sw/source/uibase/uno/unotxdoc.cxx
+++ b/sw/source/uibase/uno/unotxdoc.cxx
@@ -174,13 +174,13 @@ static SwPrintUIOptions * lcl_GetPrintUIOptions(
const SfxViewShell * pView )
{
if (!pDocShell)
- return NULL;
+ return nullptr;
- const bool bWebDoc = NULL != dynamic_cast< const SwWebDocShell * >(pDocShell);
- const bool bSwSrcView = NULL != dynamic_cast< const SwSrcView * >(pView);
+ const bool bWebDoc = nullptr != dynamic_cast< const SwWebDocShell * >(pDocShell);
+ const bool bSwSrcView = nullptr != dynamic_cast< const SwSrcView * >(pView);
const SwView * pSwView = dynamic_cast< const SwView * >(pView);
const bool bHasSelection = pSwView && pSwView->HasSelection( false ); // check for any selection, not just text selection
- const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), 0 );
+ const bool bHasPostIts = sw_GetPostIts( &pDocShell->GetDoc()->getIDocumentFieldsAccess(), nullptr );
// get default values to use in dialog from documents SwPrintData
const SwPrintData &rPrintData = pDocShell->GetDoc()->getIDocumentDeviceAccess().getPrintData();
@@ -375,11 +375,11 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
pDocShell(pShell),
- bObjectValid(pShell != 0),
+ bObjectValid(pShell != nullptr),
- pDrawPage(0),
+ pDrawPage(nullptr),
mxXDrawPage(),
- pBodyText(0),
+ pBodyText(nullptr),
mxXNumberingRules(),
mxXFootnotes(),
mxXFootnoteSettings(),
@@ -402,10 +402,10 @@ SwXTextDocument::SwXTextDocument(SwDocShell* pShell)
mxXLineNumberingProperties(),
mxLinkTargetSupplier(),
mxXRedlines(),
- m_pHiddenViewFrame(0),
- pPropertyHelper(0),
- m_pPrintUIOptions( NULL ),
- m_pRenderData( NULL ),
+ m_pHiddenViewFrame(nullptr),
+ pPropertyHelper(nullptr),
+ m_pPrintUIOptions( nullptr ),
+ m_pRenderData( nullptr ),
// #i117783#
bApplyPagePrintSettingsFromXPagePrintable( false )
{
@@ -418,7 +418,7 @@ SwXTextDocument::~SwXTextDocument()
{
Reference< XInterface > x0;
xNumFormatAgg->setDelegator(x0);
- xNumFormatAgg = 0;
+ xNumFormatAgg = nullptr;
}
delete m_pPrintUIOptions;
if (m_pRenderData && m_pRenderData->IsViewOptionAdjust())
@@ -461,7 +461,7 @@ void SwXTextDocument::GetNumberFormatter()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -763,7 +763,7 @@ sal_Int32 SwXTextDocument::replaceAll(const Reference< util::XSearchDescriptor >
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0,
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr,
&aReplace );
}
else if(pSearch->bStyles)
@@ -820,13 +820,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
if(xLastResult.is())
{
Reference<XUnoTunnel> xCursorTunnel( xLastResult, UNO_QUERY);
- OTextCursorHelper* pPosCrsr = 0;
+ OTextCursorHelper* pPosCrsr = nullptr;
if(xCursorTunnel.is())
{
pPosCrsr = reinterpret_cast<OTextCursorHelper*>(xCursorTunnel->getSomething(
OTextCursorHelper::getUnoTunnelId()));
}
- SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : 0;
+ SwPaM* pCrsr = pPosCrsr ? pPosCrsr->GetPaM() : nullptr;
if(pCrsr)
{
*pUnoCrsr->GetPoint() = *pCrsr->End();
@@ -834,7 +834,7 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
}
else
{
- SwXTextRange* pRange = 0;
+ SwXTextRange* pRange = nullptr;
if(xCursorTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xCursorTunnel->getSomething(
@@ -893,13 +893,13 @@ SwUnoCrsr* SwXTextDocument::FindAny(const Reference< util::XSearchDescriptor > &
nResult = (sal_Int32)pUnoCrsr->Find( aSearch, !pSearch->bStyles,
eStart, eEnd, bCancel,
(FindRanges)eRanges,
- !pSearch->sSearchText.isEmpty() ? &aSearchOpt : 0 );
+ !pSearch->sSearchText.isEmpty() ? &aSearchOpt : nullptr );
}
else if(pSearch->bStyles)
{
SwTextFormatColl *pSearchColl = lcl_GetParaStyle(pSearch->sSearchText, pUnoCrsr->GetDoc());
//pSearch->sReplaceText
- SwTextFormatColl *pReplaceColl = 0;
+ SwTextFormatColl *pReplaceColl = nullptr;
bool bCancel;
nResult = (sal_Int32)pUnoCrsr->Find( *pSearchColl,
eStart, eEnd, bCancel,
@@ -1375,18 +1375,18 @@ void SwXTextDocument::Invalidate()
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
pNumFormat = reinterpret_cast<SvNumberFormatsSupplierObj*>(
xNumTunnel->getSomething(SvNumberFormatsSupplierObj::getUnoTunnelId()));
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
OSL_ENSURE(pNumFormat, "No number formatter available");
}
InitNewDoc();
- pDocShell = 0;
+ pDocShell = nullptr;
lang::EventObject const ev(static_cast<SwXTextDocumentBaseClass &>(*this));
m_pImpl->m_RefreshListeners.disposeAndClear(ev);
}
@@ -1432,15 +1432,15 @@ void SwXTextDocument::InitNewDoc()
if(xBodyText.is())
{
- xBodyText = 0;
- pBodyText = 0;
+ xBodyText = nullptr;
+ pBodyText = nullptr;
}
if(xNumFormatAgg.is())
{
const uno::Type& rTunnelType = cppu::UnoType<XUnoTunnel>::get();
Any aNumTunnel = xNumFormatAgg->queryAggregation(rTunnelType);
- SvNumberFormatsSupplierObj* pNumFormat = 0;
+ SvNumberFormatsSupplierObj* pNumFormat = nullptr;
Reference< XUnoTunnel > xNumTunnel;
if(aNumTunnel >>= xNumTunnel)
{
@@ -1450,7 +1450,7 @@ void SwXTextDocument::InitNewDoc()
}
OSL_ENSURE(pNumFormat, "No number formatter available");
if (pNumFormat)
- pNumFormat->SetNumberFormatter(0);
+ pNumFormat->SetNumberFormatter(nullptr);
}
if(mxXTextFieldTypes.is())
@@ -1580,8 +1580,8 @@ void SwXTextDocument::InitNewDoc()
if(xPropertyHelper.is())
{
pPropertyHelper->Invalidate();
- xPropertyHelper = 0;
- pPropertyHelper = 0;
+ xPropertyHelper = nullptr;
+ pPropertyHelper = nullptr;
}
}
@@ -1667,7 +1667,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
aTmpServiceName = "com.sun.star.drawing.OLE2Shape";
}
Reference<XInterface> xTmp(
- arguments == 0
+ arguments == nullptr
? SvxFmMSFactory::createInstance(aTmpServiceName)
: SvxFmMSFactory::createInstanceWithArguments(
aTmpServiceName, *arguments));
@@ -1686,7 +1686,7 @@ css::uno::Reference<css::uno::XInterface> SwXTextDocument::create(
Reference< XInterface > SwXTextDocument::createInstance(const OUString& rServiceName)
throw( Exception, RuntimeException, std::exception )
{
- return create(rServiceName, 0);
+ return create(rServiceName, nullptr);
}
Reference< XInterface > SwXTextDocument::createInstanceWithArguments(
@@ -1889,7 +1889,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bAuto = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetAutoControlFocus( bAuto );
else if (bAuto)
{
@@ -1909,7 +1909,7 @@ void SwXTextDocument::setPropertyValue(const OUString& rPropertyName, const Any&
SwDrawModel * pDrawDoc;
bool bMode = *static_cast<sal_Bool const *>(aValue.getValue());
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
pDrawDoc->SetOpenInDesignMode( bMode );
else if (!bMode)
{
@@ -2056,7 +2056,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bAuto;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bAuto = pDrawDoc->GetAutoControlFocus();
else
bAuto = false;
@@ -2067,7 +2067,7 @@ Any SwXTextDocument::getPropertyValue(const OUString& rPropertyName)
{
SwDrawModel * pDrawDoc;
bool bMode;
- if ( 0 != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
+ if ( nullptr != ( pDrawDoc = pDocShell->GetDoc()->getIDocumentDrawModelAccess().GetDrawModel() ) )
bMode = pDrawDoc->GetOpenInDesignMode();
else
bMode = true;
@@ -2313,7 +2313,7 @@ SfxViewShell * SwXTextDocument::GetRenderView(
bool bIsPDFExport )
{
// get view shell to use
- SfxViewShell *pView = 0;
+ SfxViewShell *pView = nullptr;
if (bIsPDFExport)
pView = GuessViewShell( rbIsSwSrcView );
else
@@ -2353,7 +2353,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
const uno::Any& rSelection,
bool bIsPDFExport )
{
- SwDoc *pDoc = 0;
+ SwDoc *pDoc = nullptr;
uno::Reference< frame::XModel > xModel;
rSelection >>= xModel;
@@ -2386,7 +2386,7 @@ SwDoc * SwXTextDocument::GetRenderDoc(
if (!m_pRenderData)
{
OSL_FAIL("GetRenderDoc: no renderdata");
- return 0;
+ return nullptr;
}
SwView *const pSwView(static_cast<SwView *>(rpView));
SfxObjectShellLock xDocSh(m_pRenderData->GetTempDocShell());
@@ -2482,7 +2482,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pViewShell = 0;
+ SwViewShell* pViewShell = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
{
@@ -2543,7 +2543,7 @@ sal_Int32 SAL_CALL SwXTextDocument::getRendererCount(
{
// PDF export should not make use of the SwPrtOptions
const SwPrintData *pPrtOptions = (bIsPDFExport)
- ? NULL : m_pRenderData->GetSwPrtOptions();
+ ? nullptr : m_pRenderData->GetSwPrtOptions();
m_pRenderData->ViewOptionAdjust( pPrtOptions );
}
@@ -2657,7 +2657,7 @@ uno::Sequence< beans::PropertyValue > SAL_CALL SwXTextDocument::getRenderer(
throw IllegalArgumentException();
// TODO/mba: we really need a generic way to get the SwViewShell!
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
SwView* pSwView = dynamic_cast<SwView*>( pView );
if ( pSwView )
pVwSh = pSwView->GetWrtShellPtr();
@@ -2848,10 +2848,10 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
// #130810# SfxViewShell::Current() / SfxViewShell::GetObjectShell()
// must not be used (see comment from MBA)
- SfxViewShell *pView = 0;
- SwView *pSwView = 0;
- SwPagePreview *pSwPagePreview = 0;
- SwSrcView *pSwSrcView = 0;
+ SfxViewShell *pView = nullptr;
+ SwView *pSwView = nullptr;
+ SwPagePreview *pSwPagePreview = nullptr;
+ SwSrcView *pSwSrcView = nullptr;
SfxViewFrame *pFrame = SfxViewFrame::GetFirst( pDocShell, false );
// look for the view shell with the same controller in use,
@@ -2876,7 +2876,7 @@ SfxViewShell * SwXTextDocument::GuessViewShell(
OSL_ENSURE( pSwView || pSwPagePreview || pSwSrcView, "failed to get view shell" );
if (pView)
- rbIsSwSrcView = pSwSrcView != 0;
+ rbIsSwSrcView = pSwSrcView != nullptr;
return pView;
}
@@ -2942,7 +2942,7 @@ void SAL_CALL SwXTextDocument::render(
// or SwPagePreview for PDF export of the page preview
//!! (check for SwView first as in GuessViewShell) !!
OSL_ENSURE( pView, "!! view missing !!" );
- SwViewShell* pVwSh = 0;
+ SwViewShell* pVwSh = nullptr;
if (pView)
{
// TODO/mba: we really need a generic way to get the SwViewShell!
@@ -2978,7 +2978,7 @@ void SAL_CALL SwXTextDocument::render(
SwWrtShell* pWrtShell = dynamic_cast< const SwView *>( pView ) != nullptr ?
static_cast<SwView*>(pView)->GetWrtShellPtr() :
- 0;
+ nullptr;
SwPrintData const& rSwPrtOptions =
*m_pRenderData->GetSwPrtOptions();
@@ -3020,7 +3020,7 @@ void SAL_CALL SwXTextDocument::render(
if (m_pHiddenViewFrame)
{
lcl_DisposeView( m_pHiddenViewFrame, pDocShell );
- m_pHiddenViewFrame = 0;
+ m_pHiddenViewFrame = nullptr;
// prevent crash described in #i108805
SwDocShell *pRenderDocShell = pDoc->GetDocShell();
@@ -3035,8 +3035,8 @@ void SAL_CALL SwXTextDocument::render(
}
if( bLastPage )
{
- delete m_pRenderData; m_pRenderData = NULL;
- delete m_pPrintUIOptions; m_pPrintUIOptions = NULL;
+ delete m_pRenderData; m_pRenderData = nullptr;
+ delete m_pPrintUIOptions; m_pPrintUIOptions = nullptr;
}
}
@@ -3386,7 +3386,7 @@ void SwXTextDocument::resetSelection()
SolarMutexGuard aGuard;
SwWrtShell* pWrtShell = pDocShell->GetWrtShell();
- pWrtShell->ResetSelect(0, false);
+ pWrtShell->ResetSelect(nullptr, false);
}
void SAL_CALL SwXTextDocument::paintTile( const ::css::uno::Any& Parent, ::sal_Int32 nOutputWidth, ::sal_Int32 nOutputHeight, ::sal_Int32 nTilePosX, ::sal_Int32 nTilePosY, ::sal_Int32 nTileWidth, ::sal_Int32 nTileHeight ) throw (::css::uno::RuntimeException, ::std::exception)
@@ -3743,7 +3743,7 @@ uno::Type SwXLinkTargetSupplier::getElementType()
sal_Bool SwXLinkTargetSupplier::hasElements() throw( RuntimeException, std::exception )
{
- return 0 != pxDoc;
+ return nullptr != pxDoc;
}
OUString SwXLinkTargetSupplier::getImplementationName() throw( RuntimeException, std::exception )
@@ -3772,7 +3772,7 @@ SwXLinkNameAccessWrapper::SwXLinkNameAccessWrapper(
pPropSet(aSwMapProvider.GetPropertySet(PROPERTY_MAP_LINK_TARGET)),
sLinkSuffix(sSuffix),
sLinkDisplayName(rLinkDisplayName),
- pxDoc(0)
+ pxDoc(nullptr)
{
}
@@ -4196,14 +4196,14 @@ Reference<XInterface> SwXDocumentPropertyHelper::GetDrawTable(short nWhich)
void SwXDocumentPropertyHelper::Invalidate()
{
- xDashTable = 0;
- xGradientTable = 0;
- xHatchTable = 0;
- xBitmapTable = 0;
- xTransGradientTable = 0;
- xMarkerTable = 0;
- xDrawDefaults = 0;
- m_pDoc = 0;
+ xDashTable = nullptr;
+ xGradientTable = nullptr;
+ xHatchTable = nullptr;
+ xBitmapTable = nullptr;
+ xTransGradientTable = nullptr;
+ xMarkerTable = nullptr;
+ xDrawDefaults = nullptr;
+ m_pDoc = nullptr;
SvxUnoForbiddenCharsTable::mxForbiddenChars.clear();
}
@@ -4279,7 +4279,7 @@ SwViewOptionAdjust_Impl::AdjustViewOptions(SwPrintData const*const pPrtOptions)
if (m_aOldViewOptions != aRenderViewOptions) // check if reformatting is necessary
{
- aRenderViewOptions.SetPrinting( pPrtOptions != NULL );
+ aRenderViewOptions.SetPrinting( pPrtOptions != nullptr );
m_pShell->ApplyViewOptions( aRenderViewOptions );
}
}
diff --git a/sw/source/uibase/uno/unotxvw.cxx b/sw/source/uibase/uno/unotxvw.cxx
index dc012f1a0183..dd4c778914f2 100644
--- a/sw/source/uibase/uno/unotxvw.cxx
+++ b/sw/source/uibase/uno/unotxvw.cxx
@@ -128,7 +128,7 @@ void SwXTextView::Invalidate()
}
m_refCount--;
- m_pView = 0;
+ m_pView = nullptr;
}
Sequence< uno::Type > SAL_CALL SwXTextView::getTypes( ) throw(uno::RuntimeException, std::exception)
@@ -248,11 +248,11 @@ sal_Bool SwXTextView::select(const uno::Any& aInterface)
}
else
{
- SwPaM * pPaM(0);
+ SwPaM * pPaM(nullptr);
std::pair<OUString, FlyCntType> frame;
OUString tableName;
- SwUnoTableCrsr const* pTableCursor(0);
- ::sw::mark::IMark const* pMark(0);
+ SwUnoTableCrsr const* pTableCursor(nullptr);
+ ::sw::mark::IMark const* pMark(nullptr);
SwUnoCursorHelper::GetSelectableFromAny(xInterface, *pDoc,
pPaM, frame, tableName, pTableCursor, pMark, sdrObjects);
if (pPaM)
@@ -438,13 +438,13 @@ SdrObject* SwXTextView::GetControl(
uno::Reference< awt::XControl >& xToFill )
{
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::GetControl: how could I?" );
- SdrObject* pControl = NULL;
+ SdrObject* pControl = nullptr;
if ( pFormShell && pDrawView && pWindow )
pControl = pFormShell->GetFormControl( xModel, *pDrawView, *pWindow, xToFill );
return pControl;
@@ -464,9 +464,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL SwXTextView::getFormCo
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
- SdrView* pDrawView = pView2 ? pView2->GetDrawView() : NULL;
- vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
+ SdrView* pDrawView = pView2 ? pView2->GetDrawView() : nullptr;
+ vcl::Window* pWindow = pView2 ? pView2->GetWrtShell().GetWin() : nullptr;
OSL_ENSURE( pFormShell && pDrawView && pWindow, "SwXTextView::getFormController: how could I?" );
uno::Reference< form::runtime::XFormController > xController;
@@ -479,7 +479,7 @@ sal_Bool SAL_CALL SwXTextView::isFormDesignMode( ) throw (uno::RuntimeException
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
return !pFormShell || pFormShell->IsDesignMode();
}
@@ -487,7 +487,7 @@ void SAL_CALL SwXTextView::setFormDesignMode( sal_Bool _DesignMode ) throw (Runt
{
SolarMutexGuard aGuard;
SwView* pView2 = GetView();
- FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : NULL;
+ FmFormShell* pFormShell = pView2 ? pView2->GetFormShell() : nullptr;
if ( pFormShell )
pFormShell->SetDesignMode( _DesignMode );
}
@@ -1068,9 +1068,9 @@ void SwXTextViewCursor::gotoRange(
}
uno::Reference<lang::XUnoTunnel> xRangeTunnel( xRange, uno::UNO_QUERY);
- SwXTextRange* pRange = 0;
- SwXParagraph* pPara = 0;
- OTextCursorHelper* pCursor = 0;
+ SwXTextRange* pRange = nullptr;
+ SwXParagraph* pPara = nullptr;
+ OTextCursorHelper* pCursor = nullptr;
if(xRangeTunnel.is())
{
pRange = reinterpret_cast<SwXTextRange*>(xRangeTunnel->getSomething(
@@ -1081,7 +1081,7 @@ void SwXTextViewCursor::gotoRange(
SwXParagraph::getUnoTunnelId()));
}
- const FrmTypeFlags nFrmType = rSh.GetFrmType(0,true);
+ const FrmTypeFlags nFrmType = rSh.GetFrmType(nullptr,true);
SwStartNodeType eSearchNodeType = SwNormalStartNode;
if(nFrmType & FrmTypeFlags::FLY_ANY)
@@ -1098,7 +1098,7 @@ void SwXTextViewCursor::gotoRange(
const SwStartNode* pOwnStartNode = aOwnPaM.GetNode().
FindSttNodeByType(eSearchNodeType);
- const SwNode* pSrcNode = 0;
+ const SwNode* pSrcNode = nullptr;
if(pCursor && pCursor->GetPaM())
{
pSrcNode = &pCursor->GetPaM()->GetNode();
@@ -1115,7 +1115,7 @@ void SwXTextViewCursor::gotoRange(
{
pSrcNode = pPara->GetTextNode();
}
- const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : 0;
+ const SwStartNode* pTmp = pSrcNode ? pSrcNode->FindSttNodeByType(eSearchNodeType) : nullptr;
//Skip SectionNodes
while(pTmp && pTmp->IsSectionNode())
@@ -1386,7 +1386,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getStart()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->Start(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1406,7 +1406,7 @@ uno::Reference< text::XTextRange > SwXTextViewCursor::getEnd()
SwWrtShell& rSh = m_pView->GetWrtShell();
SwPaM* pShellCrsr = rSh.GetCrsr();
SwDoc* pDoc = m_pView->GetDocShell()->GetDoc();
- xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), 0);
+ xRet = SwXTextRange::CreateXTextRange(*pDoc, *pShellCrsr->End(), nullptr);
}
else
throw uno::RuntimeException();
@@ -1762,13 +1762,13 @@ IMPLEMENT_FORWARD_XINTERFACE2(SwXTextViewCursor,SwXTextViewCursor_Base,OTextCurs
const SwDoc* SwXTextViewCursor::GetDoc() const
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
SwDoc* SwXTextViewCursor::GetDoc()
{
SwWrtShell& rSh = m_pView->GetWrtShell();
- return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : 0;
+ return rSh.GetCrsr() ? rSh.GetCrsr()->GetDoc() : nullptr;
}
const SwPaM* SwXTextViewCursor::GetPaM() const