summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2015-11-10 10:22:39 +0100
committerStephan Bergmann <sbergman@redhat.com>2015-11-10 10:31:36 +0100
commitde29ac09535d814e4be7e1bf0f10beb9f0f847e3 (patch)
tree139f75d657cb825622e812254b8b7df4e509140b /sc/source/ui/unoobj
parent60c40af090e420a8619b5236bde1ff4ef79100c6 (diff)
loplugin:nullptr (automatic rewrite)
Change-Id: I765d2a600f9c57da50c85354688e3ae796750d94
Diffstat (limited to 'sc/source/ui/unoobj')
-rw-r--r--sc/source/ui/unoobj/ChartRangeSelectionListener.cxx2
-rw-r--r--sc/source/ui/unoobj/addruno.cxx2
-rw-r--r--sc/source/ui/unoobj/afmtuno.cxx8
-rw-r--r--sc/source/ui/unoobj/appluno.cxx6
-rw-r--r--sc/source/ui/unoobj/cellsuno.cxx190
-rw-r--r--sc/source/ui/unoobj/chart2uno.cxx4
-rw-r--r--sc/source/ui/unoobj/chartuno.cxx16
-rw-r--r--sc/source/ui/unoobj/condformatuno.cxx4
-rw-r--r--sc/source/ui/unoobj/confuno.cxx2
-rw-r--r--sc/source/ui/unoobj/dapiuno.cxx112
-rw-r--r--sc/source/ui/unoobj/datauno.cxx38
-rw-r--r--sc/source/ui/unoobj/defltuno.cxx4
-rw-r--r--sc/source/ui/unoobj/dispuno.cxx10
-rw-r--r--sc/source/ui/unoobj/docuno.cxx92
-rw-r--r--sc/source/ui/unoobj/drdefuno.cxx6
-rw-r--r--sc/source/ui/unoobj/editsrc.cxx8
-rw-r--r--sc/source/ui/unoobj/eventuno.cxx6
-rw-r--r--sc/source/ui/unoobj/filtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/fmtuno.cxx6
-rw-r--r--sc/source/ui/unoobj/forbiuno.cxx2
-rw-r--r--sc/source/ui/unoobj/funcuno.cxx12
-rw-r--r--sc/source/ui/unoobj/linkuno.cxx46
-rw-r--r--sc/source/ui/unoobj/nameuno.cxx54
-rw-r--r--sc/source/ui/unoobj/notesuno.cxx8
-rw-r--r--sc/source/ui/unoobj/optuno.cxx2
-rw-r--r--sc/source/ui/unoobj/scdetect.cxx2
-rw-r--r--sc/source/ui/unoobj/servuno.cxx8
-rw-r--r--sc/source/ui/unoobj/shapeuno.cxx16
-rw-r--r--sc/source/ui/unoobj/srchuno.cxx2
-rw-r--r--sc/source/ui/unoobj/styleuno.cxx36
-rw-r--r--sc/source/ui/unoobj/targuno.cxx6
-rw-r--r--sc/source/ui/unoobj/textuno.cxx28
-rw-r--r--sc/source/ui/unoobj/tokenuno.cxx2
-rw-r--r--sc/source/ui/unoobj/viewuno.cxx44
34 files changed, 395 insertions, 395 deletions
diff --git a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
index d46429204041..f4686de887e9 100644
--- a/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
+++ b/sc/source/ui/unoobj/ChartRangeSelectionListener.cxx
@@ -69,7 +69,7 @@ void SAL_CALL ScChartRangeSelectionListener::disposing( const lang::EventObject&
// ____ WeakComponentImplHelperBase ____
void SAL_CALL ScChartRangeSelectionListener::disposing()
{
- m_pViewShell = 0;
+ m_pViewShell = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/addruno.cxx b/sc/source/ui/unoobj/addruno.cxx
index 9a8a759adf9c..12b41b92cbb0 100644
--- a/sc/source/ui/unoobj/addruno.cxx
+++ b/sc/source/ui/unoobj/addruno.cxx
@@ -53,7 +53,7 @@ void ScAddressConversionObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // invalid
+ pDocShell = nullptr; // invalid
}
}
diff --git a/sc/source/ui/unoobj/afmtuno.cxx b/sc/source/ui/unoobj/afmtuno.cxx
index ab104f4a9ab0..c6230719b34c 100644
--- a/sc/source/ui/unoobj/afmtuno.cxx
+++ b/sc/source/ui/unoobj/afmtuno.cxx
@@ -186,7 +186,7 @@ ScAutoFormatObj* ScAutoFormatsObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
if (nIndex < ScGlobal::GetOrCreateAutoFormat()->size())
return new ScAutoFormatObj(nIndex);
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
ScAutoFormatObj* ScAutoFormatsObj::GetObjectByName_Impl(const OUString& aName)
@@ -196,7 +196,7 @@ ScAutoFormatObj* ScAutoFormatsObj::GetObjectByName_Impl(const OUString& aName)
if (lcl_FindAutoFormatIndex(
*ScGlobal::GetOrCreateAutoFormat(), aString, nIndex ))
return GetObjectByIndex_Impl(nIndex);
- return NULL;
+ return nullptr;
}
// container::XNameContainer
@@ -420,7 +420,7 @@ const uno::Sequence<sal_Int8>& ScAutoFormatObj::getUnoTunnelId()
ScAutoFormatObj* ScAutoFormatObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScAutoFormatObj* pRet = NULL;
+ ScAutoFormatObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScAutoFormatObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -439,7 +439,7 @@ ScAutoFormatFieldObj* ScAutoFormatObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
if ( IsInserted() && nIndex < SC_AF_FIELD_COUNT )
return new ScAutoFormatFieldObj( nFormatIndex, nIndex );
- return NULL;
+ return nullptr;
}
// container::XEnumerationAccess
diff --git a/sc/source/ui/unoobj/appluno.cxx b/sc/source/ui/unoobj/appluno.cxx
index 417a96e9f7d0..f5036f1b8f6d 100644
--- a/sc/source/ui/unoobj/appluno.cxx
+++ b/sc/source/ui/unoobj/appluno.cxx
@@ -98,7 +98,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory(
const sal_Char * pImplName, void * pServiceManager, void * /* pRegistryKey */ )
{
if (!pServiceManager)
- return NULL;
+ return nullptr;
uno::Reference<lang::XSingleServiceFactory> xFactory;
OUString aImpl(OUString::createFromAscii(pImplName));
@@ -160,7 +160,7 @@ SAL_DLLPUBLIC_EXPORT void * SAL_CALL sc_component_getFactory(
ScDocument_getSupportedServiceNames() ));
}
- void* pRet = NULL;
+ void* pRet = nullptr;
if (xFactory.is())
{
xFactory->acquire();
@@ -501,7 +501,7 @@ void SAL_CALL ScRecentFunctionsObj::setRecentFunctionIds(
sal_uInt16 nCount = (sal_uInt16) std::min( aRecentFunctionIds.getLength(), (sal_Int32) LRU_MAX );
const sal_Int32* pAry = aRecentFunctionIds.getConstArray();
- std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : NULL);
+ std::unique_ptr<sal_uInt16[]> pFuncs(nCount ? new sal_uInt16[nCount] : nullptr);
for (sal_uInt16 i=0; i<nCount; i++)
pFuncs[i] = (sal_uInt16)pAry[i]; //! auf gueltige Werte testen?
diff --git a/sc/source/ui/unoobj/cellsuno.cxx b/sc/source/ui/unoobj/cellsuno.cxx
index 145ed0c048e2..6bb18847787a 100644
--- a/sc/source/ui/unoobj/cellsuno.cxx
+++ b/sc/source/ui/unoobj/cellsuno.cxx
@@ -935,12 +935,12 @@ const ::editeng::SvxBorderLine* lcl_getBorderLine(
{
// Convert from 1/100mm to Twips.
if (!SvxBoxItem::LineToSvxLine( rStruct, rLine, true))
- return NULL;
+ return nullptr;
if ( rLine.GetOutWidth() || rLine.GetInWidth() || rLine.GetDistance() )
return &rLine;
else
- return NULL;
+ return nullptr;
}
}
@@ -1047,7 +1047,7 @@ void ScHelperFunctions::ApplyBorder( ScDocShell* pDocShell, const ScRangeList& r
{
ScDocument& rDoc = pDocShell->GetDocument();
bool bUndo(rDoc.IsUndoEnabled());
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
size_t nCount = rRanges.size();
@@ -1117,7 +1117,7 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
return false;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bUndo )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1215,7 +1215,7 @@ static bool lcl_PutDataArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste(
&rDocShell, ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab),
- aDestMark, pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
+ aDestMark, pUndoDoc, nullptr, InsertDeleteFlags::CONTENTS, nullptr, false));
}
if (!bHeight)
@@ -1256,7 +1256,7 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
return false;
}
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bUndo )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1316,7 +1316,7 @@ static bool lcl_PutFormulaArray( ScDocShell& rDocShell, const ScRange& rRange,
rDocShell.GetUndoManager()->AddUndoAction(
new ScUndoPaste( &rDocShell,
ScRange(nStartCol, nStartRow, nTab, nEndCol, nEndRow, nTab), aDestMark,
- pUndoDoc, NULL, InsertDeleteFlags::CONTENTS, NULL, false));
+ pUndoDoc, nullptr, InsertDeleteFlags::CONTENTS, nullptr, false));
}
if (!bHeight)
@@ -1389,12 +1389,12 @@ static OUString lcl_GetInputString( ScDocument& rDoc, const ScAddress& rPos, boo
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
- pValueListener( NULL ),
- pCurrentFlat( NULL ),
- pCurrentDeep( NULL ),
- pCurrentDataSet( NULL ),
- pNoDfltCurrentDataSet( NULL ),
- pMarkData( NULL ),
+ pValueListener( nullptr ),
+ pCurrentFlat( nullptr ),
+ pCurrentDeep( nullptr ),
+ pCurrentDataSet( nullptr ),
+ pNoDfltCurrentDataSet( nullptr ),
+ pMarkData( nullptr ),
nObjectId( 0 ),
bChartColAsHdr( false ),
bChartRowAsHdr( false ),
@@ -1426,12 +1426,12 @@ ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRange& rR) :
ScCellRangesBase::ScCellRangesBase(ScDocShell* pDocSh, const ScRangeList& rR) :
pPropSet(lcl_GetCellsPropertySet()),
pDocShell( pDocSh ),
- pValueListener( NULL ),
- pCurrentFlat( NULL ),
- pCurrentDeep( NULL ),
- pCurrentDataSet( NULL ),
- pNoDfltCurrentDataSet( NULL ),
- pMarkData( NULL ),
+ pValueListener( nullptr ),
+ pCurrentFlat( nullptr ),
+ pCurrentDeep( nullptr ),
+ pCurrentDataSet( nullptr ),
+ pNoDfltCurrentDataSet( nullptr ),
+ pMarkData( nullptr ),
aRanges( rR ),
nObjectId( 0 ),
bChartColAsHdr( false ),
@@ -1482,10 +1482,10 @@ void ScCellRangesBase::ForgetCurrentAttrs()
delete pCurrentDeep;
delete pCurrentDataSet;
delete pNoDfltCurrentDataSet;
- pCurrentFlat = NULL;
- pCurrentDeep = NULL;
- pCurrentDataSet = NULL;
- pNoDfltCurrentDataSet = NULL;
+ pCurrentFlat = nullptr;
+ pCurrentDeep = nullptr;
+ pCurrentDataSet = nullptr;
+ pNoDfltCurrentDataSet = nullptr;
// #i62483# pMarkData can remain unchanged, is deleted only if the range changes (RefChanged)
}
@@ -1493,7 +1493,7 @@ void ScCellRangesBase::ForgetCurrentAttrs()
void ScCellRangesBase::ForgetMarkData()
{
delete pMarkData;
- pMarkData = NULL;
+ pMarkData = nullptr;
}
const ScPatternAttr* ScCellRangesBase::GetCurrentAttrsFlat()
@@ -1602,7 +1602,7 @@ void ScCellRangesBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( nId == SFX_HINT_DYING )
{
ForgetCurrentAttrs();
- pDocShell = NULL; // invalid
+ pDocShell = nullptr; // invalid
if ( !aValueListeners.empty() )
{
@@ -1693,7 +1693,7 @@ ScDocument* ScCellRangesBase::GetDocument() const
if (pDocShell)
return &pDocShell->GetDocument();
else
- return NULL;
+ return nullptr;
}
void ScCellRangesBase::InitInsertRange(ScDocShell* pDocSh, const ScRange& rR)
@@ -3069,7 +3069,7 @@ ScMemChart* ScCellRangesBase::CreateMemChart_Impl() const
return aArr.CreateMemChart();
}
- return NULL;
+ return nullptr;
}
uno::Sequence< uno::Sequence<double> > SAL_CALL ScCellRangesBase::getData()
@@ -3473,7 +3473,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
SCCOL nCol = 0, nLastCol;
while (nCol <= MAXCOL)
{
- if (rDoc.ColHidden(nCol, nTab, NULL, &nLastCol))
+ if (rDoc.ColHidden(nCol, nTab, nullptr, &nLastCol))
// hidden columns. Unselect them.
aMarkData.SetMultiMarkArea(ScRange(nCol, 0, nTab, nLastCol, MAXROW, nTab), false);
@@ -3483,7 +3483,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
SCROW nRow = 0, nLastRow;
while (nRow <= MAXROW)
{
- if (rDoc.RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (rDoc.RowHidden(nRow, nTab, nullptr, &nLastRow))
// These rows are hidden. Unselect them.
aMarkData.SetMultiMarkArea(ScRange(0, nRow, nTab, MAXCOL, nLastRow, nTab), false);
@@ -3495,7 +3495,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryVisibleC
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCells()
@@ -3530,7 +3530,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryEmptyCel
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentCells(
@@ -3610,7 +3610,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryContentC
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaCells(
@@ -3665,7 +3665,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryFormulaC
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
@@ -3749,7 +3749,7 @@ uno::Reference<sheet::XSheetCellRanges> ScCellRangesBase::QueryDifferences_Impl(
return new ScCellRangesObj( pDocShell, aNewRanges ); // aNewRanges kann leer sein
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges > SAL_CALL ScCellRangesBase::queryColumnDifferences(
@@ -3837,7 +3837,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryPreceden
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependents(
@@ -3896,7 +3896,7 @@ uno::Reference<sheet::XSheetCellRanges> SAL_CALL ScCellRangesBase::queryDependen
return new ScCellRangesObj( pDocShell, aNewRanges );
}
- return NULL;
+ return nullptr;
}
// XSearchable
@@ -4000,7 +4000,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findFirst(
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return Find_Impl( xDesc, NULL );
+ return Find_Impl( xDesc, nullptr );
}
uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
@@ -4022,7 +4022,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScCellRangesBase::findNext(
}
}
}
- return NULL;
+ return nullptr;
}
// XReplaceable
@@ -4073,7 +4073,7 @@ sal_Int32 SAL_CALL ScCellRangesBase::replaceAll( const uno::Reference<util::XSea
SCROW nRow = 0;
OUString aUndoStr;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -4143,7 +4143,7 @@ const uno::Sequence<sal_Int8>& ScCellRangesBase::getUnoTunnelId()
ScCellRangesBase* ScCellRangesBase::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScCellRangesBase* pRet = NULL;
+ ScCellRangesBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellRangesBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -4241,7 +4241,7 @@ ScCellRangeObj* ScCellRangesObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
return new ScCellRangeObj( pDocSh, aRange );
}
- return NULL; // keine DocShell oder falscher Index
+ return nullptr; // keine DocShell oder falscher Index
}
uno::Sequence<table::CellRangeAddress> SAL_CALL ScCellRangesObj::getRangeAddresses()
@@ -4281,7 +4281,7 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellRangesObj::getCells
ScDocShell* pDocSh = GetDocShell();
if (pDocSh)
return new ScCellsObj( pDocSh, rRanges );
- return NULL;
+ return nullptr;
}
OUString SAL_CALL ScCellRangesObj::getRangeAddressesAsString()
@@ -4777,7 +4777,7 @@ uno::Reference<table::XCellRange> ScCellRangeObj::CreateRangeFromDoc( ScDocument
SfxObjectShell* pObjSh = pDoc->GetDocumentShell();
if ( pObjSh && dynamic_cast<const ScDocShell*>( pObjSh) != nullptr )
return new ScCellRangeObj( static_cast<ScDocShell*>(pObjSh), rR );
- return NULL;
+ return nullptr;
}
ScCellRangeObj::ScCellRangeObj(ScDocShell* pDocSh, const ScRange& rR) :
@@ -5018,7 +5018,7 @@ uno::Reference<table::XTableColumns> SAL_CALL ScCellRangeObj::getColumns() throw
aRange.aStart.Col(), aRange.aEnd.Col() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::RuntimeException, std::exception)
@@ -5030,7 +5030,7 @@ uno::Reference<table::XTableRows> SAL_CALL ScCellRangeObj::getRows() throw(uno::
aRange.aStart.Row(), aRange.aEnd.Row() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
// XAddressableCellRange
@@ -5054,7 +5054,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScCellRangeObj::getSpreadsheet()
return new ScTableSheetObj( pDocSh, aRange.aStart.Tab() );
OSL_FAIL("Dokument ungueltig");
- return NULL;
+ return nullptr;
}
// XArrayFormulaRange
@@ -5106,7 +5106,7 @@ void ScCellRangeObj::SetArrayFormula_Impl(const OUString& rFormula,
throw uno::RuntimeException();
}
- pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, NULL, rFormula, true, true, rFormulaNmsp, eGrammar );
+ pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, nullptr, rFormula, true, true, rFormulaNmsp, eGrammar );
}
else
{
@@ -5183,7 +5183,7 @@ void SAL_CALL ScCellRangeObj::setArrayTokens( const uno::Sequence<sheet::Formula
// Actually GRAM_PODF_A1 is a don't-care here because of the token
// array being set, it fits with other API compatibility grammars
// though.
- pDocSh->GetDocFunc().EnterMatrix( aRange, NULL, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
+ pDocSh->GetDocFunc().EnterMatrix( aRange, nullptr, &aTokenArray, EMPTY_OUSTRING, true, true, EMPTY_OUSTRING, formula::FormulaGrammar::GRAM_PODF_A1 );
}
else
{
@@ -5349,7 +5349,7 @@ void SAL_CALL ScCellRangeObj::setTableOperation( const table::CellRangeAddress&
}
if (!bError)
- pDocSh->GetDocFunc().TabOp( aRange, NULL, aParam, true, true );
+ pDocSh->GetDocFunc().TabOp( aRange, nullptr, aParam, true, true );
}
}
@@ -5454,7 +5454,7 @@ void SAL_CALL ScCellRangeObj::fillSeries( sheet::FillDirection nFillDirection,
}
if (!bError)
- pDocSh->GetDocFunc().FillSeries( aRange, NULL, eDir, eCmd, eDateCmd,
+ pDocSh->GetDocFunc().FillSeries( aRange, nullptr, eDir, eCmd, eDateCmd,
MAXDOUBLE, fStep, fEndValue, true, true );
}
}
@@ -5499,7 +5499,7 @@ void SAL_CALL ScCellRangeObj::fillAuto( sheet::FillDirection nFillDirection,
bError = true;
if (!bError)
- pDocSh->GetDocFunc().FillAuto( aSourceRange, NULL, eDir, nCount, true, true );
+ pDocSh->GetDocFunc().FillAuto( aSourceRange, nullptr, eDir, nCount, true, true );
}
}
@@ -5518,7 +5518,7 @@ void SAL_CALL ScCellRangeObj::autoFormat( const OUString& aName )
{
ScAutoFormat::const_iterator itBeg = pAutoFormat->begin();
size_t nIndex = std::distance(itBeg, it);
- pDocSh->GetDocFunc().AutoFormat(aRange, NULL, nIndex, true, true);
+ pDocSh->GetDocFunc().AutoFormat(aRange, nullptr, nIndex, true, true);
}
else
throw lang::IllegalArgumentException();
@@ -5707,7 +5707,7 @@ void SAL_CALL ScCellRangeObj::filter( const uno::Reference<sheet::XSheetFilterDe
//! if created by createFilterDescriptorByObject ???
ScDBDocFunc aFunc(*pDocSh);
- aFunc.Query( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.Query( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5768,12 +5768,12 @@ uno::Reference<sheet::XSheetFilterDescriptor> SAL_CALL ScCellRangeObj::createFil
else
{
delete pNew;
- return NULL; // ungueltig -> null
+ return nullptr; // ungueltig -> null
}
}
OSL_FAIL("kein Dokument oder kein Bereich");
- return NULL;
+ return nullptr;
}
// XSubTotalSource
@@ -5854,7 +5854,7 @@ void SAL_CALL ScCellRangeObj::applySubTotals(
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5881,7 +5881,7 @@ void SAL_CALL ScCellRangeObj::removeSubTotals() throw(uno::RuntimeException, std
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh);
- aFunc.DoSubTotals( nTab, aParam, NULL, true, true ); // Bereich muss angelegt sein
+ aFunc.DoSubTotals( nTab, aParam, nullptr, true, true ); // Bereich muss angelegt sein
}
}
@@ -5925,7 +5925,7 @@ void SAL_CALL ScCellRangeObj::doImport( const uno::Sequence<beans::PropertyValue
pDocSh->GetDBData( aRange, SC_DB_MAKE, SC_DBSEL_FORCE_MARK ); // ggf. Bereich anlegen
ScDBDocFunc aFunc(*pDocSh); // Bereich muss angelegt sein
- aFunc.DoImport( nTab, aParam, NULL, true ); //! Api-Flag as parameter
+ aFunc.DoImport( nTab, aParam, nullptr, true ); //! Api-Flag as parameter
}
}
@@ -5938,7 +5938,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getCellFormatRa
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScCellFormatsObj( pDocSh, aRange );
- return NULL;
+ return nullptr;
}
// XUniqueCellFormatRangesSupplier
@@ -5950,7 +5950,7 @@ uno::Reference<container::XIndexAccess> SAL_CALL ScCellRangeObj::getUniqueCellFo
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
return new ScUniqueCellFormatsObj( pDocSh, aRange );
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Range-Properties
@@ -6619,7 +6619,7 @@ uno::Reference<sheet::XSheetAnnotation> SAL_CALL ScCellObj::getAnnotation()
return new ScAnnotationObj( pDocSh, aCellPos );
OSL_FAIL("getAnnotation ohne DocShell");
- return NULL;
+ return nullptr;
}
// XFieldTypesSupplier
@@ -6635,14 +6635,14 @@ uno::Reference<container::XEnumerationAccess> SAL_CALL ScCellObj::getTextFields(
return new ScCellFieldsObj(xContent, pDocSh, aCellPos);
}
- return NULL;
+ return nullptr;
}
uno::Reference<container::XNameAccess> SAL_CALL ScCellObj::getTextFieldMasters()
throw(uno::RuntimeException, std::exception)
{
// sowas gibts nicht im Calc (?)
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Zell-Properties
@@ -6928,7 +6928,7 @@ uno::Reference<table::XTableCharts> SAL_CALL ScTableSheetObj::getCharts() throw(
return new ScChartsObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTables()
@@ -6940,7 +6940,7 @@ uno::Reference<sheet::XDataPilotTables> SAL_CALL ScTableSheetObj::getDataPilotTa
return new ScDataPilotTablesObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw(uno::RuntimeException, std::exception)
@@ -6952,7 +6952,7 @@ uno::Reference<sheet::XScenarios> SAL_CALL ScTableSheetObj::getScenarios() throw
return new ScScenariosObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotations()
@@ -6965,7 +6965,7 @@ uno::Reference<sheet::XSheetAnnotations> SAL_CALL ScTableSheetObj::getAnnotation
return new ScAnnotationsObj( pDocSh, GetTab_Impl() );
OSL_FAIL("kein Dokument");
- return NULL;
+ return nullptr;
}
uno::Reference<table::XCellRange> SAL_CALL ScTableSheetObj::getCellRangeByName(
@@ -6986,7 +6986,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursor()
SCTAB nTab = GetTab_Impl();
return new ScCellCursorObj( pDocSh, ScRange( 0,0,nTab, MAXCOL,MAXROW,nTab ) );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorByRange(
@@ -7005,7 +7005,7 @@ uno::Reference<sheet::XSheetCellCursor> SAL_CALL ScTableSheetObj::createCursorBy
return new ScCellCursorObj( pDocSh, *rRanges[ 0 ] );
}
}
- return NULL;
+ return nullptr;
}
// XSheetCellRange
@@ -7180,7 +7180,7 @@ uno::Reference<drawing::XDrawPage> SAL_CALL ScTableSheetObj::getDrawPage()
// Das DrawPage-Objekt meldet sich als Listener am SdrModel an
// und sollte von dort alle Aktionen mitbekommen
}
- return NULL;
+ return nullptr;
}
// XCellMovement
@@ -7211,7 +7211,7 @@ void SAL_CALL ScTableSheetObj::insertCells( const table::CellRangeAddress& rRang
OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
- pDocSh->GetDocFunc().InsertCells( aScRange, NULL, eCmd, true, true );
+ pDocSh->GetDocFunc().InsertCells( aScRange, nullptr, eCmd, true, true );
}
}
}
@@ -7242,7 +7242,7 @@ void SAL_CALL ScTableSheetObj::removeRange( const table::CellRangeAddress& rRang
OSL_ENSURE( rRangeAddress.Sheet == GetTab_Impl(), "falsche Tabelle in CellRangeAddress" );
ScRange aScRange;
ScUnoConversion::FillScRange( aScRange, rRangeAddress );
- pDocSh->GetDocFunc().DeleteCells( aScRange, NULL, eCmd, true, true );
+ pDocSh->GetDocFunc().DeleteCells( aScRange, nullptr, eCmd, true, true );
}
}
}
@@ -7302,7 +7302,7 @@ void ScTableSheetObj::PrintAreaUndo_Impl( ScPrintRangeSaver* pOldRanges )
rDoc.CreatePrintRangeSaver())); // create new ranges
// #i120105# ownership of old ranges has changed, mark as consumed
- pOldRanges = 0;
+ pOldRanges = nullptr;
}
ScPrintFunc(pDocSh, pDocSh->GetPrinter(), nTab).UpdatePages();
@@ -7358,7 +7358,7 @@ void SAL_CALL ScTableSheetObj::setPrintAreas(
ScDocShell* pDocSh = GetDocShell();
if ( pDocSh )
{
- ScPrintRangeSaver* pOldRanges = NULL;
+ ScPrintRangeSaver* pOldRanges = nullptr;
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
@@ -7391,7 +7391,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleColumns() throw(uno::RuntimeExce
{
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- return ( rDoc.GetRepeatColRange(nTab) != NULL );
+ return ( rDoc.GetRepeatColRange(nTab) != nullptr );
}
return false;
}
@@ -7417,7 +7417,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleColumns( sal_Bool bPrintTitleColumns
}
}
else
- rDoc.SetRepeatColRange( nTab, NULL ); // abschalten
+ rDoc.SetRepeatColRange( nTab, nullptr ); // abschalten
PrintAreaUndo_Impl( pOldRanges ); // Undo, Umbrueche, Modified etc.
@@ -7472,7 +7472,7 @@ sal_Bool SAL_CALL ScTableSheetObj::getPrintTitleRows() throw(uno::RuntimeExcepti
{
ScDocument& rDoc = pDocSh->GetDocument();
SCTAB nTab = GetTab_Impl();
- return ( rDoc.GetRepeatRowRange(nTab) != NULL );
+ return ( rDoc.GetRepeatRowRange(nTab) != nullptr );
}
return false;
}
@@ -7498,7 +7498,7 @@ void SAL_CALL ScTableSheetObj::setPrintTitleRows( sal_Bool bPrintTitleRows )
}
}
else
- rDoc.SetRepeatRowRange( nTab, NULL ); // abschalten
+ rDoc.SetRepeatRowRange( nTab, nullptr ); // abschalten
PrintAreaUndo_Impl( pOldRanges ); // Undo, Umbrueche, Modified etc.
@@ -8098,7 +8098,7 @@ uno::Reference<container::XNameReplace> SAL_CALL ScTableSheetObj::getEvents() th
if ( pDocSh )
return new ScSheetEventsObj( pDocSh, GetTab_Impl() );
- return NULL;
+ return nullptr;
}
// XPropertySet erweitert fuer Sheet-Properties
@@ -8662,7 +8662,7 @@ const uno::Sequence<sal_Int8>& ScTableSheetObj::getUnoTunnelId()
ScTableSheetObj* ScTableSheetObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScTableSheetObj* pRet = NULL;
+ ScTableSheetObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableSheetObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -9049,7 +9049,7 @@ void ScCellsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9061,7 +9061,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellsObj::createEnumeration()
SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellsEnumeration( pDocShell, aRanges );
- return NULL;
+ return nullptr;
}
uno::Type SAL_CALL ScCellsObj::getElementType() throw(uno::RuntimeException, std::exception)
@@ -9087,7 +9087,7 @@ sal_Bool SAL_CALL ScCellsObj::hasElements() throw(uno::RuntimeException, std::ex
ScCellsEnumeration::ScCellsEnumeration(ScDocShell* pDocSh, const ScRangeList& rR) :
pDocShell( pDocSh ),
aRanges( rR ),
- pMark( NULL ),
+ pMark( nullptr ),
bAtEnd( false )
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -9168,7 +9168,7 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
pRefHint->GetDx(), pRefHint->GetDy(), pRefHint->GetDz() );
delete pMark; // aus verschobenen Bereichen neu erzeugen
- pMark = NULL;
+ pMark = nullptr;
if (!bAtEnd) // aPos anpassen
{
@@ -9187,7 +9187,7 @@ void ScCellsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9242,7 +9242,7 @@ void ScCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9250,7 +9250,7 @@ ScCellRangeObj* ScCellFormatsObj::GetObjectByIndex_Impl(long nIndex) const
{
//! direkt auf die AttrArrays zugreifen !!!!
- ScCellRangeObj* pRet = NULL;
+ ScCellRangeObj* pRet = nullptr;
if (pDocShell)
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -9334,13 +9334,13 @@ uno::Reference<container::XEnumeration> SAL_CALL ScCellFormatsObj::createEnumera
SolarMutexGuard aGuard;
if (pDocShell)
return new ScCellFormatsEnumeration( pDocShell, aTotalRange );
- return NULL;
+ return nullptr;
}
ScCellFormatsEnumeration::ScCellFormatsEnumeration(ScDocShell* pDocSh, const ScRange& rRange) :
pDocShell( pDocSh ),
nTab( rRange.aStart.Tab() ),
- pIter( NULL ),
+ pIter( nullptr ),
bAtEnd( false ),
bDirty( false )
{
@@ -9390,7 +9390,7 @@ void ScCellFormatsEnumeration::Advance_Impl()
ScCellRangeObj* ScCellFormatsEnumeration::NextObject_Impl()
{
- ScCellRangeObj* pRet = NULL;
+ ScCellRangeObj* pRet = nullptr;
if (pDocShell && !bAtEnd)
{
if ( aNext.aStart == aNext.aEnd )
@@ -9413,9 +9413,9 @@ void ScCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
delete pIter;
- pIter = NULL;
+ pIter = nullptr;
}
else if ( nId == SFX_HINT_DATACHANGED )
{
@@ -9475,7 +9475,7 @@ void ScUniqueCellFormatsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -9704,7 +9704,7 @@ uno::Reference<container::XEnumeration> SAL_CALL ScUniqueCellFormatsObj::createE
SolarMutexGuard aGuard;
if (pDocShell)
return new ScUniqueCellFormatsEnumeration( pDocShell, aRangeLists );
- return NULL;
+ return nullptr;
}
ScUniqueCellFormatsEnumeration::ScUniqueCellFormatsEnumeration(ScDocShell* pDocSh, const ScMyRangeLists& rRangeLists) :
@@ -9733,7 +9733,7 @@ void ScUniqueCellFormatsEnumeration::Notify( SfxBroadcaster&, const SfxHint& rHi
{
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/chart2uno.cxx b/sc/source/ui/unoobj/chart2uno.cxx
index fb4746c0ce0d..0ef1b0e2707f 100644
--- a/sc/source/ui/unoobj/chart2uno.cxx
+++ b/sc/source/ui/unoobj/chart2uno.cxx
@@ -140,7 +140,7 @@ OUString lcl_createTableNumberList( const ::std::list< SCTAB > & rTableList )
uno::Reference< frame::XModel > lcl_GetXModel( ScDocument * pDoc )
{
uno::Reference< frame::XModel > xModel;
- SfxObjectShell * pObjSh( pDoc ? pDoc->GetDocumentShell() : 0 );
+ SfxObjectShell * pObjSh( pDoc ? pDoc->GetDocumentShell() : nullptr );
if( pObjSh )
xModel.set( pObjSh->GetModel());
return xModel;
@@ -1587,7 +1587,7 @@ ScChart2DataProvider::createDataSource(
if( nOldIndex < aSeqVector.size() )
{
pDS->AddLabeledSequence( aSeqVector[nOldIndex] );
- aSeqVector[nOldIndex] = 0;
+ aSeqVector[nOldIndex] = nullptr;
}
}
diff --git a/sc/source/ui/unoobj/chartuno.cxx b/sc/source/ui/unoobj/chartuno.cxx
index 58fc2584e4c6..f5a09a4b94ce 100644
--- a/sc/source/ui/unoobj/chartuno.cxx
+++ b/sc/source/ui/unoobj/chartuno.cxx
@@ -84,7 +84,7 @@ static SdrOle2Obj* lcl_FindChartObj( ScDocShell* pDocShell, SCTAB nTab, const OU
}
}
}
- return NULL;
+ return nullptr;
}
ScChartsObj::ScChartsObj(ScDocShell* pDocSh, SCTAB nT) :
@@ -109,7 +109,7 @@ void ScChartsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -150,14 +150,14 @@ ScChartObj* ScChartsObj::GetObjectByIndex_Impl(long nIndex) const
if (!aName.isEmpty())
return new ScChartObj( pDocShell, nTab, aName );
- return NULL;
+ return nullptr;
}
ScChartObj* ScChartsObj::GetObjectByName_Impl(const OUString& aName) const
{
if ( lcl_FindChartObj( pDocShell, nTab, aName ) )
return new ScChartObj( pDocShell, nTab, aName );
- return NULL;
+ return nullptr;
}
// XTableCharts
@@ -437,7 +437,7 @@ sal_Bool SAL_CALL ScChartsObj::hasByName( const OUString& aName )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return ( lcl_FindChartObj( pDocShell, nTab, aName ) != NULL );
+ return ( lcl_FindChartObj( pDocShell, nTab, aName ) != nullptr );
}
ScChartObj::ScChartObj(ScDocShell* pDocSh, SCTAB nT, const OUString& rN)
@@ -470,7 +470,7 @@ void ScChartObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -528,7 +528,7 @@ void ScChartObj::GetData_Impl( ScRangeListRef& rRanges, bool& rColHeaders, bool&
}
if( !bFound )
{
- rRanges = 0;
+ rRanges = nullptr;
rColHeaders = false;
rRowHeaders = false;
}
@@ -770,7 +770,7 @@ uno::Reference<lang::XComponent> SAL_CALL ScChartObj::getEmbeddedObject() throw(
return uno::Reference < lang::XComponent > ( pObject->GetObjRef()->getComponent(), uno::UNO_QUERY );
}
- return NULL;
+ return nullptr;
}
// XNamed
diff --git a/sc/source/ui/unoobj/condformatuno.cxx b/sc/source/ui/unoobj/condformatuno.cxx
index e561ddfa1158..ef9542e5ea83 100644
--- a/sc/source/ui/unoobj/condformatuno.cxx
+++ b/sc/source/ui/unoobj/condformatuno.cxx
@@ -327,7 +327,7 @@ void ScCondFormatsObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- mpDocShell = NULL; // ungueltig geworden
+ mpDocShell = nullptr; // ungueltig geworden
}
}
@@ -477,7 +477,7 @@ void ScCondFormatObj::createEntry(const sal_Int32 nType, const sal_Int32 nPos)
if (nPos > sal_Int32(pFormat->size()))
throw lang::IllegalArgumentException();
- ScFormatEntry* pNewEntry = NULL;
+ ScFormatEntry* pNewEntry = nullptr;
ScDocument* pDoc = &mpDocShell->GetDocument();
switch (nType)
{
diff --git a/sc/source/ui/unoobj/confuno.cxx b/sc/source/ui/unoobj/confuno.cxx
index e4ff166f8e79..ff102347e5b7 100644
--- a/sc/source/ui/unoobj/confuno.cxx
+++ b/sc/source/ui/unoobj/confuno.cxx
@@ -104,7 +104,7 @@ void ScDocumentConfiguration::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/dapiuno.cxx b/sc/source/ui/unoobj/dapiuno.cxx
index b5e43b94e4cc..8958182dbaf6 100644
--- a/sc/source/ui/unoobj/dapiuno.cxx
+++ b/sc/source/ui/unoobj/dapiuno.cxx
@@ -248,7 +248,7 @@ static ScDPObject* lcl_GetDPObject( ScDocShell* pDocShell, SCTAB nTab, const OUS
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
static OUString lcl_CreatePivotName( ScDocShell* pDocShell )
@@ -302,7 +302,7 @@ void ScDataPilotTablesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -334,14 +334,14 @@ ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByIndex_Impl( sal_Int32 nInd
}
}
}
- return NULL;
+ return nullptr;
}
ScDataPilotTableObj* ScDataPilotTablesObj::GetObjectByName_Impl(const OUString& rName)
{
if (hasByName(rName))
return new ScDataPilotTableObj( pDocShell, nTab, rName );
- return 0;
+ return nullptr;
}
Reference<XDataPilotDescriptor> SAL_CALL ScDataPilotTablesObj::createDataPilotDescriptor()
@@ -350,7 +350,7 @@ Reference<XDataPilotDescriptor> SAL_CALL ScDataPilotTablesObj::createDataPilotDe
SolarMutexGuard aGuard;
if (pDocShell)
return new ScDataPilotDescriptor(pDocShell);
- return NULL;
+ return nullptr;
}
static bool lcl_IsDuplicated(const Reference<XPropertySet>& rDimProps)
@@ -647,7 +647,7 @@ void ScDataPilotDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1045,7 +1045,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotDescriptorBase::getDataLayoutFi
}
}
}
- return 0;
+ return nullptr;
}
// XUnoTunnel
@@ -1074,7 +1074,7 @@ const Sequence<sal_Int8>& ScDataPilotDescriptorBase::getUnoTunnelId()
ScDataPilotDescriptorBase* ScDataPilotDescriptorBase::getImplementation(const Reference<XDataPilotDescriptor>& rObj )
{
- ScDataPilotDescriptorBase* pRet = NULL;
+ ScDataPilotDescriptorBase* pRet = nullptr;
Reference<lang::XUnoTunnel> xUT(rObj, UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScDataPilotDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1379,7 +1379,7 @@ void ScDataPilotTableObj::Refreshed_Impl()
ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
ScDataPilotDescriptorBase( pDocSh ),
- mpDPObject(new ScDPObject(pDocSh ? &pDocSh->GetDocument() : NULL) )
+ mpDPObject(new ScDPObject(pDocSh ? &pDocSh->GetDocument() : nullptr) )
{
ScDPSaveData aSaveData;
// set defaults like in ScPivotParam constructor
@@ -1388,7 +1388,7 @@ ScDataPilotDescriptor::ScDataPilotDescriptor(ScDocShell* pDocSh) :
aSaveData.SetIgnoreEmptyRows( false );
aSaveData.SetRepeatIfEmpty( false );
mpDPObject->SetSaveData(aSaveData);
- ScSheetSourceDesc aSheetDesc(pDocSh ? &pDocSh->GetDocument() : NULL);
+ ScSheetSourceDesc aSheetDesc(pDocSh ? &pDocSh->GetDocument() : nullptr);
mpDPObject->SetSheetDesc(aSheetDesc);
mpDPObject->GetSource();
}
@@ -1501,7 +1501,7 @@ ScDPSaveDimension* ScDataPilotChildObjBase::GetDPDimension( ScDPObject** ppDPObj
}
}
}
- return 0;
+ return nullptr;
}
sal_Int32 ScDataPilotChildObjBase::GetMemberCount() const
@@ -1693,7 +1693,7 @@ ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByIndex_Impl( sal_Int32 nInd
if (lcl_GetFieldDataByIndex( pObj->GetSource(), maOrient, nIndex, aFieldId ))
return new ScDataPilotFieldObj( mrParent, aFieldId, maOrient );
}
- return 0;
+ return nullptr;
}
ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -1704,7 +1704,7 @@ ScDataPilotFieldObj* ScDataPilotFieldsObj::GetObjectByName_Impl(const OUString&
if (lcl_GetFieldDataByName( pDPObj, aName, aFieldId ))
return new ScDataPilotFieldObj( mrParent, aFieldId, maOrient );
}
- return 0;
+ return nullptr;
}
// XEnumerationAccess
@@ -1787,7 +1787,7 @@ sal_Bool SAL_CALL ScDataPilotFieldsObj::hasByName( const OUString& aName )
{
SolarMutexGuard aGuard;
- return GetObjectByName_Impl(aName) != NULL;
+ return GetObjectByName_Impl(aName) != nullptr;
}
ScDataPilotFieldObj::ScDataPilotFieldObj(
@@ -1835,7 +1835,7 @@ void SAL_CALL ScDataPilotFieldObj::setName(const OUString& rName)
throw (RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
ScDPSaveDimension* pDim = GetDPDimension( &pDPObj );
if( pDim && !pDim->IsDataLayout() )
{
@@ -1895,7 +1895,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
{
if (!cppu::any2bool(aValue))
- setAutoShowInfo(NULL);
+ setAutoShowInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
@@ -1906,7 +1906,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
{
if (!cppu::any2bool(aValue))
- setLayoutInfo(NULL);
+ setLayoutInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
@@ -1917,7 +1917,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASREFERENCE )
{
if (!cppu::any2bool(aValue))
- setReference(NULL);
+ setReference(nullptr);
}
else if ( aNameString == SC_UNONAME_REFERENCE )
{
@@ -1928,7 +1928,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_HASSORTINFO )
{
if (!cppu::any2bool(aValue))
- setSortInfo(NULL);
+ setSortInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_SORTINFO )
{
@@ -1939,7 +1939,7 @@ void SAL_CALL ScDataPilotFieldObj::setPropertyValue( const OUString& aPropertyNa
else if ( aNameString == SC_UNONAME_ISGROUP )
{
if (!cppu::any2bool(aValue))
- setGroupInfo(NULL);
+ setGroupInfo(nullptr);
}
else if ( aNameString == SC_UNONAME_GROUPINFO )
{
@@ -1976,7 +1976,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString == SC_UNONAME_USESELPAGE )
aRet <<= false;
else if ( aNameString == SC_UNONAME_HASAUTOSHOW )
- aRet <<= (getAutoShowInfo() != NULL);
+ aRet <<= (getAutoShowInfo() != nullptr);
else if ( aNameString == SC_UNONAME_AUTOSHOW )
{
const DataPilotFieldAutoShowInfo* pInfo = getAutoShowInfo();
@@ -1984,7 +1984,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldAutoShowInfo(*pInfo);
}
else if ( aNameString == SC_UNONAME_HASLAYOUTINFO )
- aRet <<= (getLayoutInfo() != NULL);
+ aRet <<= (getLayoutInfo() != nullptr);
else if ( aNameString == SC_UNONAME_LAYOUTINFO )
{
const DataPilotFieldLayoutInfo* pInfo = getLayoutInfo();
@@ -1992,7 +1992,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldLayoutInfo(*pInfo);
}
else if ( aNameString == SC_UNONAME_HASREFERENCE )
- aRet <<= (getReference() != NULL);
+ aRet <<= (getReference() != nullptr);
else if ( aNameString == SC_UNONAME_REFERENCE )
{
const DataPilotFieldReference* pRef = getReference();
@@ -2000,7 +2000,7 @@ Any SAL_CALL ScDataPilotFieldObj::getPropertyValue( const OUString& aPropertyNam
aRet <<= DataPilotFieldReference(*pRef);
}
else if ( aNameString == SC_UNONAME_HASSORTINFO )
- aRet <<= (getSortInfo() != NULL);
+ aRet <<= (getSortInfo() != nullptr);
else if ( aNameString == SC_UNONAME_SORTINFO )
{
const DataPilotFieldSortInfo* pInfo = getSortInfo();
@@ -2047,7 +2047,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
if (maOrient.hasValue() && (eNew == maOrient.get< DataPilotFieldOrientation >()))
return;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -2060,7 +2060,7 @@ void ScDataPilotFieldObj::setOrientation(DataPilotFieldOrientation eNew)
(eNew == DataPilotFieldOrientation_DATA) )
{
- ScDPSaveDimension* pNewDim = 0;
+ ScDPSaveDimension* pNewDim = nullptr;
// look for existing duplicate with orientation "hidden"
@@ -2118,14 +2118,14 @@ GeneralFunction ScDataPilotFieldObj::getFunction() const
void ScDataPilotFieldObj::setFunction(GeneralFunction eNewFunc)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( pDim->GetOrientation() != DataPilotFieldOrientation_DATA )
{
// for non-data fields, property Function is the subtotals
if ( eNewFunc == GeneralFunction_NONE )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
{
sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( eNewFunc );
@@ -2162,7 +2162,7 @@ Sequence< GeneralFunction > ScDataPilotFieldObj::getSubtotals() const
void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubtotals )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( pDim->GetOrientation() != DataPilotFieldOrientation_DATA )
@@ -2172,7 +2172,7 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
{
// count 1: all values are allowed (including NONE and AUTO)
if( rSubtotals[ 0 ] == GeneralFunction_NONE )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
{
sal_uInt16 nFunc = sal::static_int_cast<sal_uInt16>( rSubtotals[ 0 ] );
@@ -2196,7 +2196,7 @@ void ScDataPilotFieldObj::setSubtotals( const Sequence< GeneralFunction >& rSubt
}
// set values from vector to ScDPSaveDimension
if ( aSubt.empty() )
- pDim->SetSubTotals( 0, NULL );
+ pDim->SetSubTotals( 0, nullptr );
else
pDim->SetSubTotals( static_cast< long >( aSubt.size() ), &aSubt.front() );
}
@@ -2213,7 +2213,7 @@ OUString ScDataPilotFieldObj::getCurrentPage()
void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetCurrentPage( &rPage );
@@ -2224,7 +2224,7 @@ void ScDataPilotFieldObj::setCurrentPage( const OUString& rPage )
void ScDataPilotFieldObj::setUseCurrentPage( bool bUse )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( bUse )
@@ -2235,7 +2235,7 @@ void ScDataPilotFieldObj::setUseCurrentPage( bool bUse )
pDim->SetCurrentPage( &aPage );
}
else
- pDim->SetCurrentPage( 0 );
+ pDim->SetCurrentPage( nullptr );
SetDPObject( pDPObj );
}
}
@@ -2244,13 +2244,13 @@ const DataPilotFieldAutoShowInfo* ScDataPilotFieldObj::getAutoShowInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetAutoShowInfo() : 0;
+ return pDim ? pDim->GetAutoShowInfo() : nullptr;
}
void ScDataPilotFieldObj::setAutoShowInfo( const DataPilotFieldAutoShowInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetAutoShowInfo( pInfo );
@@ -2262,13 +2262,13 @@ const DataPilotFieldLayoutInfo* ScDataPilotFieldObj::getLayoutInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetLayoutInfo() : 0;
+ return pDim ? pDim->GetLayoutInfo() : nullptr;
}
void ScDataPilotFieldObj::setLayoutInfo( const DataPilotFieldLayoutInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetLayoutInfo( pInfo );
@@ -2280,13 +2280,13 @@ const DataPilotFieldReference* ScDataPilotFieldObj::getReference()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetReferenceValue() : 0;
+ return pDim ? pDim->GetReferenceValue() : nullptr;
}
void ScDataPilotFieldObj::setReference( const DataPilotFieldReference* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetReferenceValue( pInfo );
@@ -2298,13 +2298,13 @@ const DataPilotFieldSortInfo* ScDataPilotFieldObj::getSortInfo()
{
SolarMutexGuard aGuard;
ScDPSaveDimension* pDim = GetDPDimension();
- return pDim ? pDim->GetSortInfo() : 0;
+ return pDim ? pDim->GetSortInfo() : nullptr;
}
void ScDataPilotFieldObj::setSortInfo( const DataPilotFieldSortInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetSortInfo( pInfo );
@@ -2322,7 +2322,7 @@ bool ScDataPilotFieldObj::getShowEmpty() const
void ScDataPilotFieldObj::setShowEmpty( bool bShow )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetShowEmpty( bShow );
@@ -2340,7 +2340,7 @@ bool ScDataPilotFieldObj::getRepeatItemLabels() const
void ScDataPilotFieldObj::setRepeatItemLabels( bool bShow )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
pDim->SetRepeatItemLabels( bShow );
@@ -2351,7 +2351,7 @@ void ScDataPilotFieldObj::setRepeatItemLabels( bool bShow )
bool ScDataPilotFieldObj::hasGroupInfo()
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
return pDimData->GetNamedGroupDim( pDim->GetName() ) || pDimData->GetNumGroupDim( pDim->GetName() );
@@ -2362,7 +2362,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
{
SolarMutexGuard aGuard;
DataPilotFieldGroupInfo aInfo;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
if( const ScDPDimensionSaveData* pDimData = pDPObj->GetSaveData()->GetExistingDimensionData() )
@@ -2420,7 +2420,7 @@ DataPilotFieldGroupInfo ScDataPilotFieldObj::getGroupInfo()
void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( /*ScDPSaveDimension* pDim =*/ GetDPDimension( &pDPObj ) )
{
ScDPSaveData* pSaveData = pDPObj->GetSaveData();
@@ -2501,7 +2501,7 @@ void ScDataPilotFieldObj::setGroupInfo( const DataPilotFieldGroupInfo* pInfo )
}
else // null passed as argument
{
- pSaveData->SetDimensionData( 0 );
+ pSaveData->SetDimensionData( nullptr );
}
pDPObj->SetSaveData( *pSaveData );
@@ -2537,7 +2537,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
if( !rItems.hasElements() )
throw IllegalArgumentException();
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
OUString aDimName = pDim->GetName();
@@ -2582,11 +2582,11 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
}
}
- ScDPSaveGroupDimension* pNewGroupDim = 0;
+ ScDPSaveGroupDimension* pNewGroupDim = nullptr;
if ( !pGroupDimension )
{
// create a new group dimension
- sNewDim = pDimData->CreateGroupDimName( aBaseDimName, *pDPObj, false, NULL );
+ sNewDim = pDimData->CreateGroupDimName( aBaseDimName, *pDPObj, false, nullptr );
pNewGroupDim = new ScDPSaveGroupDimension( aBaseDimName, sNewDim );
pGroupDimension = pNewGroupDim; // make changes to the new dim if none existed
@@ -2658,7 +2658,7 @@ Reference< XDataPilotField > SAL_CALL ScDataPilotFieldObj::createNameGroup( cons
delete pNewGroupDim; // AddGroupDimension copies the object
// don't access pGroupDimension after here
}
- pGroupDimension = pNewGroupDim = NULL;
+ pGroupDimension = pNewGroupDim = nullptr;
// set orientation
ScDPSaveDimension* pSaveDimension = aSaveData.GetDimensionByName( aGroupDimName );
@@ -2714,7 +2714,7 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
throw IllegalArgumentException();
OUString aGroupDimName;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
ScDPNumGroupInfo aInfo;
@@ -2776,7 +2776,7 @@ Reference < XDataPilotField > SAL_CALL ScDataPilotFieldObj::createDateGroup( con
else if( (nDateParts & rInfo.GroupBy) == 0 ) // do nothing if date field exists already
{
// create new named group dimension for additional date groups
- aGroupDimName = rDimData.CreateDateGroupDimName( rInfo.GroupBy, *pDPObj, true, 0 );
+ aGroupDimName = rDimData.CreateDateGroupDimName( rInfo.GroupBy, *pDPObj, true, nullptr );
ScDPSaveGroupDimension aGroupDim( aSrcDimName, aGroupDimName, aInfo, rInfo.GroupBy );
rDimData.AddGroupDimension( aGroupDim );
@@ -3237,7 +3237,7 @@ ScDataPilotItemsObj::~ScDataPilotItemsObj()
ScDataPilotItemObj* ScDataPilotItemsObj::GetObjectByIndex_Impl( sal_Int32 nIndex ) const
{
return ((0 <= nIndex) && (nIndex < GetMemberCount())) ?
- new ScDataPilotItemObj( mrParent, maFieldId, nIndex ) : 0;
+ new ScDataPilotItemObj( mrParent, maFieldId, nIndex ) : nullptr;
}
// XNameAccess
@@ -3390,7 +3390,7 @@ void SAL_CALL ScDataPilotItemObj::setPropertyValue( const OUString& aPropertyNam
RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- ScDPObject* pDPObj = 0;
+ ScDPObject* pDPObj = nullptr;
if( ScDPSaveDimension* pDim = GetDPDimension( &pDPObj ) )
{
Reference<XNameAccess> xMembers = GetMembers();
diff --git a/sc/source/ui/unoobj/datauno.cxx b/sc/source/ui/unoobj/datauno.cxx
index 2c98dc3f81b7..5a38f7dd0289 100644
--- a/sc/source/ui/unoobj/datauno.cxx
+++ b/sc/source/ui/unoobj/datauno.cxx
@@ -525,8 +525,8 @@ void SAL_CALL ScSubTotalFieldObj::setSubTotalColumns(
}
else
{
- aParam.pSubTotals[nPos] = NULL;
- aParam.pFunctions[nPos] = NULL;
+ aParam.pSubTotals[nPos] = nullptr;
+ aParam.pFunctions[nPos] = nullptr;
}
}
//! sonst Exception oder so? (zuviele Spalten)
@@ -549,7 +549,7 @@ ScSubTotalFieldObj* ScSubTotalDescriptorBase::GetObjectByIndex_Impl(sal_uInt16 n
{
if ( nIndex < getCount() )
return new ScSubTotalFieldObj( this, nIndex );
- return NULL;
+ return nullptr;
}
void SAL_CALL ScSubTotalDescriptorBase::clear() throw(uno::RuntimeException, std::exception)
@@ -604,8 +604,8 @@ void SAL_CALL ScSubTotalDescriptorBase::addNew(
}
else
{
- aParam.pSubTotals[nPos] = NULL;
- aParam.pFunctions[nPos] = NULL;
+ aParam.pSubTotals[nPos] = nullptr;
+ aParam.pFunctions[nPos] = nullptr;
}
}
else // too many fields / columns
@@ -779,7 +779,7 @@ const uno::Sequence<sal_Int8>& ScSubTotalDescriptorBase::getUnoTunnelId()
ScSubTotalDescriptorBase* ScSubTotalDescriptorBase::getImplementation(const uno::Reference<sheet::XSubTotalDescriptor>& rObj)
{
- ScSubTotalDescriptorBase* pRet = NULL;
+ ScSubTotalDescriptorBase* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScSubTotalDescriptorBase*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -997,7 +997,7 @@ void ScFilterDescriptorBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocSh = NULL; // invalid
+ pDocSh = nullptr; // invalid
}
}
}
@@ -1651,7 +1651,7 @@ void ScDatabaseRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
else if ( dynamic_cast<const ScDBRangeRefreshedHint*>(&rHint) )
{
ScDBData* pDBData = GetDBData_Impl();
@@ -1667,7 +1667,7 @@ void ScDatabaseRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScDBData* ScDatabaseRangeObj::GetDBData_Impl() const
{
- ScDBData* pRet = NULL;
+ ScDBData* pRet = nullptr;
if (pDocShell)
{
if (bIsUnnamed)
@@ -1919,7 +1919,7 @@ void SAL_CALL ScDatabaseRangeObj::refresh() throw(uno::RuntimeException, std::ex
SCCOL nDummyCol;
SCROW nDummyRow;
pData->GetArea( nTab, nDummyCol,nDummyRow,nDummyCol,nDummyRow );
- bContinue = aFunc.DoImport( nTab, aImportParam, NULL, true ); //! Api-Flag as parameter
+ bContinue = aFunc.DoImport( nTab, aImportParam, nullptr, true ); //! Api-Flag as parameter
}
// interne Operationen (sort, query, subtotal) nur, wenn kein Fehler
@@ -1985,7 +1985,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScDatabaseRangeObj::getReferredCells(
else
return new ScCellRangeObj( pDocShell, aRange );
}
- return NULL;
+ return nullptr;
}
// XPropertySet
@@ -2048,7 +2048,7 @@ void SAL_CALL ScDatabaseRangeObj::setPropertyValue(
aNewData.SetAdvancedQuerySource(&aRange);
}
else
- aNewData.SetAdvancedQuerySource(NULL);
+ aNewData.SetAdvancedQuerySource(nullptr);
}
else if (aString == SC_UNONAME_FLTCRT )
{
@@ -2226,7 +2226,7 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -2235,15 +2235,15 @@ void ScDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByIndex_Impl(size_t nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (!pNames)
- return NULL;
+ return nullptr;
const ScDBCollection::NamedDBs& rDBs = pNames->getNamedDBs();
if (rDBs.empty() || nIndex >= rDBs.size())
- return NULL;
+ return nullptr;
ScDBCollection::NamedDBs::const_iterator itr = rDBs.begin();
::std::advance(itr, nIndex); // boundary check is done above.
@@ -2257,7 +2257,7 @@ ScDatabaseRangeObj* ScDatabaseRangesObj::GetObjectByName_Impl(const OUString& aN
OUString aString(aName);
return new ScDatabaseRangeObj( pDocShell, aString );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScDatabaseRangesObj::addNewByName( const OUString& aName,
@@ -2397,7 +2397,7 @@ sal_Bool SAL_CALL ScDatabaseRangesObj::hasByName( const OUString& aName )
{
ScDBCollection* pNames = pDocShell->GetDocument().GetDBCollection();
if (pNames)
- return pNames->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aName)) != NULL;
+ return pNames->getNamedDBs().findByUpperName(ScGlobal::pCharClass->uppercase(aName)) != nullptr;
}
return false;
}
@@ -2423,7 +2423,7 @@ void ScUnnamedDatabaseRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
diff --git a/sc/source/ui/unoobj/defltuno.cxx b/sc/source/ui/unoobj/defltuno.cxx
index 9e3b939c03d1..f7a02ce8aedd 100644
--- a/sc/source/ui/unoobj/defltuno.cxx
+++ b/sc/source/ui/unoobj/defltuno.cxx
@@ -93,7 +93,7 @@ void ScDocDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
@@ -279,7 +279,7 @@ beans::PropertyState SAL_CALL ScDocDefaultsObj::getPropertyState( const OUString
// check if pool default is set
ScDocumentPool* pPool = pDocShell->GetDocument().GetPool();
- if ( pPool->GetPoolDefaultItem( nWID ) != NULL )
+ if ( pPool->GetPoolDefaultItem( nWID ) != nullptr )
eRet = beans::PropertyState_DIRECT_VALUE;
}
diff --git a/sc/source/ui/unoobj/dispuno.cxx b/sc/source/ui/unoobj/dispuno.cxx
index 4fc02fabc82d..f04281e47c26 100644
--- a/sc/source/ui/unoobj/dispuno.cxx
+++ b/sc/source/ui/unoobj/dispuno.cxx
@@ -84,7 +84,7 @@ void ScDispatchProviderInterceptor::Notify( SfxBroadcaster&, const SfxHint& rHin
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
// XDispatchProvider
@@ -181,9 +181,9 @@ void SAL_CALL ScDispatchProviderInterceptor::disposing( const lang::EventObject&
if (xInterceptedComponent.is())
xInterceptedComponent->removeEventListener(static_cast<lang::XEventListener*>(this));
- m_xMyDispatch = NULL;
+ m_xMyDispatch = nullptr;
}
- m_xIntercepted = NULL;
+ m_xIntercepted = nullptr;
}
ScDispatch::ScDispatch(ScTabViewShell* pViewSh) :
@@ -211,7 +211,7 @@ void ScDispatch::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
// XDispatch
@@ -380,7 +380,7 @@ void SAL_CALL ScDispatch::disposing( const css::lang::EventObject& rSource )
for ( size_t n=0; n<aDataSourceListeners.size(); n++ )
aDataSourceListeners[n]->disposing( aEvent );
- pViewShell = NULL;
+ pViewShell = nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 69a5cb3133ae..36ba321ce0e7 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -368,8 +368,8 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
SfxBaseModel( pDocSh ),
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
- pPrintFuncCache( NULL ),
- pPrinterOptions( NULL ),
+ pPrintFuncCache( nullptr ),
+ pPrinterOptions( nullptr ),
maChangesListeners( m_aMutex )
{
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
@@ -410,7 +410,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
}
// beim setDelegator darf die zusaetzliche Ref nicht mehr existieren
- xFormatter = NULL;
+ xFormatter = nullptr;
if (xNumberAgg.is())
xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
@@ -423,7 +423,7 @@ ScDocument* ScModelObj::GetDocument() const
{
if (pDocShell)
return &pDocShell->GetDocument();
- return NULL;
+ return nullptr;
}
SfxObjectShell* ScModelObj::GetEmbeddedObject() const
@@ -453,7 +453,7 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
{
if (pDocShell)
return pDocShell->GetSheetSaveData();
- return NULL;
+ return nullptr;
}
void ScModelObj::RepaintRange( const ScRange& rRange )
@@ -724,7 +724,7 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy
if (( pShell = dynamic_cast<ScEditShell*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )) )
xTransferable = pShell->GetEditView()->GetTransferable();
- else if ( 0 != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
+ else if ( nullptr != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
{
ScDrawView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
@@ -1034,14 +1034,14 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // has become invalid
+ pDocShell = nullptr; // has become invalid
if (xNumberAgg.is())
{
SvNumberFormatsSupplierObj* pNumFmt =
SvNumberFormatsSupplierObj::getImplementation(
uno::Reference<util::XNumberFormatsSupplier>(xNumberAgg, uno::UNO_QUERY) );
if ( pNumFmt )
- pNumFmt->SetNumberFormatter( NULL );
+ pNumFmt->SetNumberFormatter( nullptr );
}
DELETEZ( pPrintFuncCache ); // must be deleted because it has a pointer to the DocShell
@@ -1100,7 +1100,7 @@ uno::Reference<sheet::XSpreadsheets> SAL_CALL ScModelObj::getSheets() throw(uno:
SolarMutexGuard aGuard;
if (pDocShell)
return new ScTableSheetsObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XStyleFamiliesSupplier
@@ -1111,14 +1111,14 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getStyleFamilies()
SolarMutexGuard aGuard;
if (pDocShell)
return new ScStyleFamiliesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XRenderable
static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyValue>& rOptions )
{
- OutputDevice* pRet = NULL;
+ OutputDevice* pRet = nullptr;
const beans::PropertyValue* pPropArray = rOptions.getConstArray();
long nPropCount = rOptions.getLength();
for (long i = 0; i < nPropCount; i++)
@@ -1285,7 +1285,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
if ( pSelObj && pSelObj->GetDocShell() == pDocShell )
{
- bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
+ bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != nullptr );
bool bCursor = pSelObj->IsCursorOnly();
const ScRangeList& rRanges = pSelObj->GetRangeList();
@@ -1506,7 +1506,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1524,7 +1524,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, nullptr );
ScRange aCellRange;
bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
@@ -1592,7 +1592,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScDocument& rDoc = pDocShell->GetDocument();
- FmFormView* pDrawView = NULL;
+ FmFormView* pDrawView = nullptr;
ScDrawLayer* pModel = rDoc.GetDrawLayer();
@@ -1604,7 +1604,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1654,7 +1654,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, nullptr );
// resolve the hyperlinks for PDF export
@@ -1761,7 +1761,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
SolarMutexGuard aGuard;
if (pDocShell)
return new ScLinkTargetTypesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XActionLockable
@@ -1926,7 +1926,7 @@ uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(un
return new ScDrawPagesObj(pDocShell);
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return NULL;
+ return nullptr;
}
// XGoalSeek
@@ -2307,7 +2307,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
}
else if ( aString == SC_UNO_HASDRAWPAGES )
{
- ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != 0) );
+ ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != nullptr) );
}
else if ( aString == SC_UNO_BASICLIBRARIES )
{
@@ -2446,7 +2446,7 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create(
try
{
- xRet = arguments == 0
+ xRet = arguments == nullptr
? SvxFmMSFactory::createInstance(aServiceSpecifier)
: SvxFmMSFactory::createInstanceWithArguments(
aServiceSpecifier, *arguments);
@@ -2475,7 +2475,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
throw(uno::Exception, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return create(aServiceSpecifier, 0);
+ return create(aServiceSpecifier, nullptr);
}
uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstanceWithArguments(
@@ -2593,7 +2593,7 @@ const uno::Sequence<sal_Int8>& ScModelObj::getUnoTunnelId()
ScModelObj* ScModelObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScModelObj* pRet = NULL;
+ ScModelObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScModelObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -2958,7 +2958,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -2978,7 +2978,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int
}
}
}
- return NULL;
+ return nullptr;
}
// XDrawPages
@@ -3070,7 +3070,7 @@ void ScTableSheetsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3081,7 +3081,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
return new ScTableSheetObj( pDocShell, static_cast<SCTAB>(nIndex) );
- return NULL;
+ return nullptr;
}
ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3092,7 +3092,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) c
if ( pDocShell->GetDocument().GetTable( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nIndex );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int16 nPosition )
@@ -3482,7 +3482,7 @@ void ScTableColumnsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3494,7 +3494,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) con
if ( pDocShell && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3505,7 +3505,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3518,7 +3518,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
{
ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
(SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSCOLS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSCOLS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3534,7 +3534,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
{
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELCOLS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELCOLS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3750,7 +3750,7 @@ void ScTableRowsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3762,7 +3762,7 @@ ScTableRowObj* ScTableRowsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nRow <= nEndRow )
return new ScTableRowObj( pDocShell, nRow, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3775,7 +3775,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
{
ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSROWS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSROWS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3791,7 +3791,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
{
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELROWS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELROWS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3972,7 +3972,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString == SC_UNONAME_CELLVIS )
{
SCROW nLastRow;
- bool bVis = !rDoc.RowHidden(nStartRow, nTab, NULL, &nLastRow);
+ bool bVis = !rDoc.RowHidden(nStartRow, nTab, nullptr, &nLastRow);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
else if ( aNameString == SC_UNONAME_CELLFILT )
@@ -4025,7 +4025,7 @@ void ScSpreadsheetSettingsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4035,7 +4035,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettingsObj::getPr
throw(uno::RuntimeException, std::exception)
{
//! muss noch
- return NULL;
+ return nullptr;
}
void SAL_CALL ScSpreadsheetSettingsObj::setPropertyValue(
@@ -4079,7 +4079,7 @@ void ScAnnotationsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4101,7 +4101,7 @@ ScAnnotationObj* ScAnnotationsObj::GetObjectByIndex_Impl( sal_Int32 nIndex ) con
if ( GetAddressByIndex_Impl( nIndex, aPos ) )
return new ScAnnotationObj( pDocShell, aPos );
}
- return NULL;
+ return nullptr;
}
// XSheetAnnotations
@@ -4115,7 +4115,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
{
OSL_ENSURE( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
- pDocShell->GetDocFunc().ReplaceNote( aPos, rText, 0, 0, true );
+ pDocShell->GetDocFunc().ReplaceNote( aPos, rText, nullptr, nullptr, true );
}
}
@@ -4213,7 +4213,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4246,7 +4246,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 );
- return NULL; // kein Dokument oder falscher Index
+ return nullptr; // kein Dokument oder falscher Index
}
ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
@@ -4255,7 +4255,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nTab+nIndex+1 );
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
void SAL_CALL ScScenariosObj::addNewByName( const OUString& aName,
diff --git a/sc/source/ui/unoobj/drdefuno.cxx b/sc/source/ui/unoobj/drdefuno.cxx
index 8aa5ca94af51..fcfbfc3fb91e 100644
--- a/sc/source/ui/unoobj/drdefuno.cxx
+++ b/sc/source/ui/unoobj/drdefuno.cxx
@@ -24,7 +24,7 @@
using namespace ::com::sun::star;
ScDrawDefaultsObj::ScDrawDefaultsObj(ScDocShell* pDocSh) :
- SvxUnoDrawPool( NULL ),
+ SvxUnoDrawPool( nullptr ),
pDocShell( pDocSh )
{
// SvxUnoDrawPool is initialized without model,
@@ -46,13 +46,13 @@ void ScDrawDefaultsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
SfxItemPool* ScDrawDefaultsObj::getModelPool( bool bReadOnly ) throw()
{
- SfxItemPool* pRet = NULL;
+ SfxItemPool* pRet = nullptr;
try
{
diff --git a/sc/source/ui/unoobj/editsrc.cxx b/sc/source/ui/unoobj/editsrc.cxx
index 892708d78fb1..219d74b7b559 100644
--- a/sc/source/ui/unoobj/editsrc.cxx
+++ b/sc/source/ui/unoobj/editsrc.cxx
@@ -110,8 +110,8 @@ ScEditEngineDefaulter* ScCellEditSource::GetEditEngine()
ScAnnotationEditSource::ScAnnotationEditSource(ScDocShell* pDocSh, const ScAddress& rP) :
pDocShell( pDocSh ),
aCellPos( rP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
bDataValid( false )
{
if (pDocShell)
@@ -137,7 +137,7 @@ SvxEditSource* ScAnnotationEditSource::Clone() const
SdrObject* ScAnnotationEditSource::GetCaptionObj()
{
ScPostIt* pNote = pDocShell->GetDocument().GetNote(aCellPos);
- return pNote ? pNote->GetOrCreateCaption( aCellPos ) : 0;
+ return pNote ? pNote->GetOrCreateCaption( aCellPos ) : nullptr;
}
SvxTextForwarder* ScAnnotationEditSource::GetTextForwarder()
@@ -205,7 +205,7 @@ void ScAnnotationEditSource::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
diff --git a/sc/source/ui/unoobj/eventuno.cxx b/sc/source/ui/unoobj/eventuno.cxx
index 01e42c44a982..4edcceb92672 100644
--- a/sc/source/ui/unoobj/eventuno.cxx
+++ b/sc/source/ui/unoobj/eventuno.cxx
@@ -49,7 +49,7 @@ void ScSheetEventsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- mpDocShell = NULL;
+ mpDocShell = nullptr;
}
}
@@ -109,7 +109,7 @@ void SAL_CALL ScSheetEventsObj::replaceByName( const OUString& aName, const uno:
if (!aScript.isEmpty())
aNewEvents.SetScript( nEvent, &aScript );
else
- aNewEvents.SetScript( nEvent, NULL ); // reset
+ aNewEvents.SetScript( nEvent, nullptr ); // reset
mpDocShell->GetDocument().SetSheetEvents( mnTab, &aNewEvents );
mpDocShell->SetDocumentModified();
@@ -125,7 +125,7 @@ uno::Any SAL_CALL ScSheetEventsObj::getByName( const OUString& aName )
if (nEvent == ScSheetEventId::NOTFOUND)
throw container::NoSuchElementException();
- const OUString* pScript = NULL;
+ const OUString* pScript = nullptr;
if (mpDocShell)
{
const ScSheetEvents* pEvents = mpDocShell->GetDocument().GetSheetEvents(mnTab);
diff --git a/sc/source/ui/unoobj/filtuno.cxx b/sc/source/ui/unoobj/filtuno.cxx
index 69336affb287..bcb87b94998f 100644
--- a/sc/source/ui/unoobj/filtuno.cxx
+++ b/sc/source/ui/unoobj/filtuno.cxx
@@ -180,7 +180,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
if ( xInputStream.is() )
pInStream.reset(utl::UcbStreamHelper::CreateStream( xInputStream ));
- std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( NULL, aPrivDatName, pInStream.get(), SC_IMPORTFILE));
+ std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg( nullptr, aPrivDatName, pInStream.get(), SC_IMPORTFILE));
OSL_ENSURE(pDlg, "Dialog create fail!");
if ( pDlg->Execute() == RET_OK )
{
@@ -199,7 +199,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
{
// HTML import.
std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg(
- pFact->CreateScTextImportOptionsDlg(NULL));
+ pFact->CreateScTextImportOptionsDlg(nullptr));
if (pDlg->Execute() == RET_OK)
{
@@ -281,7 +281,7 @@ sal_Int16 SAL_CALL ScFilterOptionsObj::execute() throw(uno::RuntimeException, st
ScImportOptions aOptions( cAsciiDel, cStrDel, eEncoding);
- std::unique_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(NULL,
+ std::unique_ptr<AbstractScImportOptionsDlg> pDlg(pFact->CreateScImportOptionsDlg(nullptr,
bAscii, &aOptions, &aTitle, bMultiByte, bDBEnc,
!bExport));
OSL_ENSURE(pDlg, "Dialog create fail!");
diff --git a/sc/source/ui/unoobj/fmtuno.cxx b/sc/source/ui/unoobj/fmtuno.cxx
index 02cf321ed616..4a66d9f712f3 100644
--- a/sc/source/ui/unoobj/fmtuno.cxx
+++ b/sc/source/ui/unoobj/fmtuno.cxx
@@ -245,7 +245,7 @@ void ScTableConditionalFormat::AddEntry_Impl(const ScCondFormatEntryItem& aEntry
ScTableConditionalEntry* ScTableConditionalFormat::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
{
- return nIndex < aEntries.size() ? aEntries[nIndex] : NULL;
+ return nIndex < aEntries.size() ? aEntries[nIndex] : nullptr;
}
void SAL_CALL ScTableConditionalFormat::addNew(
@@ -492,7 +492,7 @@ const uno::Sequence<sal_Int8>& ScTableConditionalFormat::getUnoTunnelId()
ScTableConditionalFormat* ScTableConditionalFormat::getImplementation(const uno::Reference<sheet::XSheetConditionalEntries>& rObj)
{
- ScTableConditionalFormat* pRet = NULL;
+ ScTableConditionalFormat* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableConditionalFormat*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1017,7 +1017,7 @@ const uno::Sequence<sal_Int8>& ScTableValidationObj::getUnoTunnelId()
ScTableValidationObj* ScTableValidationObj::getImplementation(const uno::Reference<beans::XPropertySet>& rObj)
{
- ScTableValidationObj* pRet = NULL;
+ ScTableValidationObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTableValidationObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
diff --git a/sc/source/ui/unoobj/forbiuno.cxx b/sc/source/ui/unoobj/forbiuno.cxx
index c6fe2d438d9b..708543bd58e3 100644
--- a/sc/source/ui/unoobj/forbiuno.cxx
+++ b/sc/source/ui/unoobj/forbiuno.cxx
@@ -64,7 +64,7 @@ void ScForbiddenCharsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
}
diff --git a/sc/source/ui/unoobj/funcuno.cxx b/sc/source/ui/unoobj/funcuno.cxx
index 84ed978b6295..5dc09a3d9c66 100644
--- a/sc/source/ui/unoobj/funcuno.cxx
+++ b/sc/source/ui/unoobj/funcuno.cxx
@@ -80,7 +80,7 @@ ScDocument* ScTempDocSource::CreateDocument()
ScTempDocSource::ScTempDocSource( ScTempDocCache& rDocCache ) :
rCache( rDocCache ),
- pTempDoc( NULL )
+ pTempDoc( nullptr )
{
if ( rCache.IsInUse() )
pTempDoc = CreateDocument();
@@ -109,7 +109,7 @@ ScDocument* ScTempDocSource::GetDocument()
}
ScTempDocCache::ScTempDocCache() :
- pDoc( NULL ),
+ pDoc( nullptr ),
bInUse( false )
{
}
@@ -130,7 +130,7 @@ void ScTempDocCache::Clear()
{
OSL_ENSURE( !bInUse, "ScTempDocCache::Clear: bInUse" );
delete pDoc;
- pDoc = NULL;
+ pDoc = nullptr;
}
// copy results from one document into another
@@ -167,14 +167,14 @@ static bool lcl_CopyData( ScDocument* pSrcDoc, const ScRange& rSrcRange,
ScMarkData aDestMark;
aDestMark.SelectOneTable( nDestTab );
aDestMark.SetMarkArea( aNewRange );
- pDestDoc->CopyFromClip( aNewRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA, NULL, pClipDoc, false );
+ pDestDoc->CopyFromClip( aNewRange, aDestMark, InsertDeleteFlags::ALL & ~InsertDeleteFlags::FORMULA, nullptr, pClipDoc, false );
delete pClipDoc;
return true;
}
ScFunctionAccess::ScFunctionAccess() :
- pOptions( NULL ),
+ pOptions( nullptr ),
aPropertyMap( ScDocOptionsHelper::GetPropertyMap() ),
mbArray( true ), // default according to behaviour of older Office versions
mbValid( true )
@@ -620,7 +620,7 @@ uno::Any SAL_CALL ScFunctionAccess::callFunction( const OUString& aName,
// call GetMatrix before GetErrCode because GetMatrix always recalculates
// if there is no matrix result
- const ScMatrix* pMat = (mbArray && pFormula) ? pFormula->GetMatrix() : 0;
+ const ScMatrix* pMat = (mbArray && pFormula) ? pFormula->GetMatrix() : nullptr;
sal_uInt16 nErrCode = pFormula ? pFormula->GetErrCode() : errIllegalArgument;
if ( nErrCode == 0 )
{
diff --git a/sc/source/ui/unoobj/linkuno.cxx b/sc/source/ui/unoobj/linkuno.cxx
index 5d2694e75757..d4d388b0c320 100644
--- a/sc/source/ui/unoobj/linkuno.cxx
+++ b/sc/source/ui/unoobj/linkuno.cxx
@@ -97,7 +97,7 @@ void ScSheetLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -124,7 +124,7 @@ ScTableLink* ScSheetLinkObj::GetLink_Impl() const
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
// XNamed
@@ -149,7 +149,7 @@ void SAL_CALL ScSheetLinkObj::refresh()
SolarMutexGuard aGuard;
ScTableLink* pLink = GetLink_Impl();
if (pLink)
- pLink->Refresh( pLink->GetFileName(), pLink->GetFilterName(), NULL, pLink->GetRefreshDelay() );
+ pLink->Refresh( pLink->GetFileName(), pLink->GetFilterName(), nullptr, pLink->GetRefreshDelay() );
}
void SAL_CALL ScSheetLinkObj::addRefreshListener(
@@ -330,7 +330,7 @@ void ScSheetLinkObj::setFilter(const OUString& Filter)
if (pLink)
{
OUString aFilterStr(Filter);
- pLink->Refresh( aFileName, aFilterStr, NULL, pLink->GetRefreshDelay() );
+ pLink->Refresh( aFileName, aFilterStr, nullptr, pLink->GetRefreshDelay() );
}
}
@@ -392,7 +392,7 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -401,7 +401,7 @@ void ScSheetLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
typedef std::unordered_set<OUString, OUStringHash> StrSetType;
StrSetType aNames;
@@ -423,7 +423,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
}
}
- return NULL; // kein Dokument oder Index zu gross
+ return nullptr; // kein Dokument oder Index zu gross
}
ScSheetLinkObj* ScSheetLinksObj::GetObjectByName_Impl(const OUString& aName)
@@ -446,7 +446,7 @@ ScSheetLinkObj* ScSheetLinksObj::GetObjectByName_Impl(const OUString& aName)
}
}
- return NULL;
+ return nullptr;
}
// XEnumerationAccess
@@ -593,7 +593,7 @@ static ScAreaLink* lcl_GetAreaLink( ScDocShell* pDocShell, size_t nPos )
}
}
}
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
ScAreaLinkObj::ScAreaLinkObj(ScDocShell* pDocSh, size_t nP) :
@@ -621,7 +621,7 @@ void ScAreaLinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -657,7 +657,7 @@ void ScAreaLinkObj::Modify_Impl( const OUString* pNewFile, const OUString* pNewF
sfx2::LinkManager* pLinkManager = pDocShell->GetDocument().GetLinkManager();
pLinkManager->Remove( pLink );
- pLink = NULL; // bei Remove geloescht
+ pLink = nullptr; // bei Remove geloescht
bool bFitBlock = true; // verschieben, wenn durch Update Groesse geaendert
if (pNewFile)
@@ -827,7 +827,7 @@ OUString ScAreaLinkObj::getFileName() const
void ScAreaLinkObj::setFileName(const OUString& rNewName)
{
SolarMutexGuard aGuard;
- Modify_Impl( &rNewName, NULL, NULL, NULL, NULL );
+ Modify_Impl( &rNewName, nullptr, nullptr, nullptr, nullptr );
}
OUString ScAreaLinkObj::getFilter() const
@@ -843,7 +843,7 @@ OUString ScAreaLinkObj::getFilter() const
void ScAreaLinkObj::setFilter(const OUString& Filter)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, &Filter, NULL, NULL, NULL );
+ Modify_Impl( nullptr, &Filter, nullptr, nullptr, nullptr );
}
OUString ScAreaLinkObj::getFilterOptions() const
@@ -859,7 +859,7 @@ OUString ScAreaLinkObj::getFilterOptions() const
void ScAreaLinkObj::setFilterOptions(const OUString& FilterOptions)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, &FilterOptions, NULL, NULL );
+ Modify_Impl( nullptr, nullptr, &FilterOptions, nullptr, nullptr );
}
sal_Int32 ScAreaLinkObj::getRefreshDelay() const
@@ -894,7 +894,7 @@ void SAL_CALL ScAreaLinkObj::setSourceArea( const OUString& aSourceArea )
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, NULL, &aSourceArea, NULL );
+ Modify_Impl( nullptr, nullptr, nullptr, &aSourceArea, nullptr );
}
table::CellRangeAddress SAL_CALL ScAreaLinkObj::getDestArea() throw(uno::RuntimeException, std::exception)
@@ -911,7 +911,7 @@ void SAL_CALL ScAreaLinkObj::setDestArea( const table::CellRangeAddress& aDestAr
throw(uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- Modify_Impl( NULL, NULL, NULL, NULL, &aDestArea );
+ Modify_Impl( nullptr, nullptr, nullptr, nullptr, &aDestArea );
}
ScAreaLinksObj::ScAreaLinksObj(ScDocShell* pDocSh) :
@@ -935,7 +935,7 @@ void ScAreaLinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -946,7 +946,7 @@ ScAreaLinkObj* ScAreaLinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < getCount() )
return new ScAreaLinkObj( pDocShell, (size_t)nIndex );
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
void SAL_CALL ScAreaLinksObj::insertAtPosition( const table::CellAddress& aDestPos,
@@ -1065,7 +1065,7 @@ void ScDDELinkObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
if ( pSimpleHint )
{
if ( pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // pointer is invalid
+ pDocShell = nullptr; // pointer is invalid
}
else if ( dynamic_cast<const ScLinkRefreshedHint*>(&rHint) )
{
@@ -1260,7 +1260,7 @@ void ScDDELinksObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1274,7 +1274,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell->GetDocument().GetDdeLinkData( (size_t)nIndex, aAppl, aTopic, aItem ) )
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
- return NULL;
+ return nullptr;
}
ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const OUString& aName)
@@ -1293,7 +1293,7 @@ ScDDELinkObj* ScDDELinksObj::GetObjectByName_Impl(const OUString& aName)
return new ScDDELinkObj( pDocShell, aAppl, aTopic, aItem );
}
}
- return NULL;
+ return nullptr;
}
// XEnumerationAccess
@@ -1620,7 +1620,7 @@ sal_Bool SAL_CALL ScExternalDocLinkObj::hasByName(const OUString &aName)
// #i116940# be consistent with getByName: allow only table names which have a cache already
ScExternalRefCache::TableTypeRef pTable = mpRefMgr->getCacheTable(mnFileId, aName, false);
- return (pTable.get() != NULL);
+ return (pTable.get() != nullptr);
}
sal_Int32 SAL_CALL ScExternalDocLinkObj::getCount()
diff --git a/sc/source/ui/unoobj/nameuno.cxx b/sc/source/ui/unoobj/nameuno.cxx
index f4e328217f0a..2e390f68d068 100644
--- a/sc/source/ui/unoobj/nameuno.cxx
+++ b/sc/source/ui/unoobj/nameuno.cxx
@@ -104,14 +104,14 @@ void ScNamedRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
// Helper functions
ScRangeData* ScNamedRangeObj::GetRangeData_Impl()
{
- ScRangeData* pRet = NULL;
+ ScRangeData* pRet = nullptr;
if (pDocShell)
{
ScRangeName* pNames;
@@ -189,7 +189,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
if (pNewType)
nType = *pNewType;
- ScRangeData* pNew = NULL;
+ ScRangeData* pNew = nullptr;
if (pNewTokens)
pNew = new ScRangeData( &rDoc, aInsName, *pNewTokens, aPos, nType );
else
@@ -206,7 +206,7 @@ void ScNamedRangeObj::Modify_Impl( const OUString* pNewName, const ScTokenArray*
}
else
{
- pNew = NULL; //! uno::Exception/Error or something
+ pNew = nullptr; //! uno::Exception/Error or something
delete pNewRanges;
}
}
@@ -225,7 +225,7 @@ void SAL_CALL ScNamedRangeObj::setName( const OUString& aNewName )
OUString aNewStr(aNewName);
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( &aNewStr, NULL, NULL, NULL, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( &aNewStr, nullptr, nullptr, nullptr, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
if ( aName != aNewStr ) // some error occurred...
throw uno::RuntimeException(); // no other exceptions specified
@@ -248,7 +248,7 @@ void SAL_CALL ScNamedRangeObj::setContent( const OUString& aContent )
SolarMutexGuard aGuard;
OUString aContStr(aContent);
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, &aContStr, NULL, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, &aContStr, nullptr, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
}
table::CellAddress SAL_CALL ScNamedRangeObj::getReferencePosition()
@@ -283,7 +283,7 @@ void SAL_CALL ScNamedRangeObj::setReferencePosition( const table::CellAddress& a
SolarMutexGuard aGuard;
ScAddress aPos( (SCCOL)aReferencePosition.Column, (SCROW)aReferencePosition.Row, aReferencePosition.Sheet );
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, NULL, &aPos, NULL,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, nullptr, &aPos, nullptr,formula::FormulaGrammar::GRAM_PODF_A1 );
}
sal_Int32 SAL_CALL ScNamedRangeObj::getType() throw(uno::RuntimeException, std::exception)
@@ -315,7 +315,7 @@ void SAL_CALL ScNamedRangeObj::setType( sal_Int32 nUnoType )
if ( nUnoType & sheet::NamedRangeFlag::ROW_HEADER ) nNewType |= RT_ROWHEADER;
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, NULL, NULL, NULL, &nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, nullptr, nullptr, nullptr, &nNewType,formula::FormulaGrammar::GRAM_PODF_A1 );
}
// XFormulaTokens
@@ -344,7 +344,7 @@ void SAL_CALL ScNamedRangeObj::setTokens( const uno::Sequence<sheet::FormulaToke
ScTokenArray aTokenArray;
(void)ScTokenConversion::ConvertToTokenArray( pDocShell->GetDocument(), aTokenArray, rTokens );
// GRAM_PODF_A1 for API compatibility.
- Modify_Impl( NULL, &aTokenArray, NULL, NULL, NULL, formula::FormulaGrammar::GRAM_PODF_A1 );
+ Modify_Impl( nullptr, &aTokenArray, nullptr, nullptr, nullptr, formula::FormulaGrammar::GRAM_PODF_A1 );
}
}
@@ -365,7 +365,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScNamedRangeObj::getReferredCells()
else
return new ScCellRangeObj( pDocShell, aRange );
}
- return NULL;
+ return nullptr;
}
// beans::XPropertySet
@@ -489,7 +489,7 @@ void ScNamedRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
}
@@ -527,7 +527,7 @@ void SAL_CALL ScNamedRangesObj::addNewByName( const OUString& aName,
}
else
{
- pNew = NULL;
+ pNew = nullptr;
delete pNewRanges;
}
}
@@ -832,11 +832,11 @@ ScGlobalNamedRangesObj::~ScGlobalNamedRangesObj()
ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex)
{
if (!pDocShell)
- return NULL;
+ return nullptr;
ScRangeName* pNames = pDocShell->GetDocument().GetRangeName();
if (!pNames)
- return NULL;
+ return nullptr;
ScRangeName::const_iterator itr = pNames->begin(), itrEnd = pNames->end();
sal_uInt16 nPos = 0;
@@ -849,14 +849,14 @@ ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByIndex_Impl(sal_uInt16 nIndex
}
++nPos;
}
- return NULL;
+ return nullptr;
}
ScNamedRangeObj* ScGlobalNamedRangesObj::GetObjectByName_Impl(const OUString& aName)
{
if ( pDocShell && hasByName(aName) )
return new ScNamedRangeObj(this, pDocShell, aName);
- return NULL;
+ return nullptr;
}
ScRangeName* ScGlobalNamedRangesObj::GetRangeName_Impl()
@@ -885,24 +885,24 @@ ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByName_Impl(const OUString& aNa
{
if ( pDocShell && hasByName( aName ) )
return new ScNamedRangeObj( this, pDocShell, aName, mxSheet);
- return NULL;
+ return nullptr;
}
ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByIndex_Impl( sal_uInt16 nIndex )
{
if (!pDocShell)
- return NULL;
+ return nullptr;
OUString aName = mxSheet->getName();
ScDocument& rDoc = pDocShell->GetDocument();
SCTAB nTab;
if (!rDoc.GetTable(aName, nTab))
- return NULL;
+ return nullptr;
ScRangeName* pNames = rDoc.GetRangeName( nTab );
if (!pNames)
- return NULL;
+ return nullptr;
ScRangeName::const_iterator itr = pNames->begin(), itrEnd = pNames->end();
sal_uInt16 nPos = 0;
@@ -915,7 +915,7 @@ ScNamedRangeObj* ScLocalNamedRangesObj::GetObjectByIndex_Impl( sal_uInt16 nIndex
}
++nPos;
}
- return NULL;
+ return nullptr;
}
ScRangeName* ScLocalNamedRangesObj::GetRangeName_Impl()
@@ -953,14 +953,14 @@ void ScLabelRangeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
// Helper functions
ScRangePair* ScLabelRangeObj::GetData_Impl()
{
- ScRangePair* pRet = NULL;
+ ScRangePair* pRet = nullptr;
if (pDocShell)
{
ScDocument& rDoc = pDocShell->GetDocument();
@@ -1030,7 +1030,7 @@ void SAL_CALL ScLabelRangeObj::setLabelArea( const table::CellRangeAddress& aLab
SolarMutexGuard aGuard;
ScRange aLabelRange;
ScUnoConversion::FillScRange( aLabelRange, aLabelArea );
- Modify_Impl( &aLabelRange, NULL );
+ Modify_Impl( &aLabelRange, nullptr );
}
table::CellRangeAddress SAL_CALL ScLabelRangeObj::getDataArea()
@@ -1050,7 +1050,7 @@ void SAL_CALL ScLabelRangeObj::setDataArea( const table::CellRangeAddress& aData
SolarMutexGuard aGuard;
ScRange aDataRange;
ScUnoConversion::FillScRange( aDataRange, aDataArea );
- Modify_Impl( NULL, &aDataRange );
+ Modify_Impl( nullptr, &aDataRange );
}
ScLabelRangesObj::ScLabelRangesObj(ScDocShell* pDocSh, bool bCol) :
@@ -1075,7 +1075,7 @@ void ScLabelRangesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // became invalid
+ pDocShell = nullptr; // became invalid
}
}
@@ -1094,7 +1094,7 @@ ScLabelRangeObj* ScLabelRangesObj::GetObjectByIndex_Impl(size_t nIndex)
return new ScLabelRangeObj( pDocShell, bColumn, pData->GetRange(0) );
}
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScLabelRangesObj::addNew( const table::CellRangeAddress& aLabelArea,
diff --git a/sc/source/ui/unoobj/notesuno.cxx b/sc/source/ui/unoobj/notesuno.cxx
index 73b15fd6824b..ad2f39948878 100644
--- a/sc/source/ui/unoobj/notesuno.cxx
+++ b/sc/source/ui/unoobj/notesuno.cxx
@@ -58,7 +58,7 @@ SC_SIMPLE_SERVICE_INFO( ScAnnotationObj, "ScAnnotationObj", "com.sun.star.sheet.
ScAnnotationObj::ScAnnotationObj(ScDocShell* pDocSh, const ScAddress& rPos) :
pDocShell( pDocSh ),
aCellPos( rPos ),
- pUnoText( NULL )
+ pUnoText( nullptr )
{
pDocShell->GetDocument().AddUnoObject(*this);
@@ -88,7 +88,7 @@ void ScAnnotationObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -104,7 +104,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScAnnotationObj::getParent() throw(uno:
if (pDocShell)
return static_cast<cppu::OWeakObject*>(new ScCellObj( pDocShell, aCellPos ));
- return NULL;
+ return nullptr;
}
void SAL_CALL ScAnnotationObj::setParent( const uno::Reference<uno::XInterface>& /* Parent */ )
@@ -249,6 +249,6 @@ SvxUnoText& ScAnnotationObj::GetUnoText()
const ScPostIt* ScAnnotationObj::ImplGetNote() const
{
- return pDocShell ? pDocShell->GetDocument().GetNote(aCellPos) : 0;
+ return pDocShell ? pDocShell->GetDocument().GetNote(aCellPos) : nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/unoobj/optuno.cxx b/sc/source/ui/unoobj/optuno.cxx
index 5315b098b0d6..b158b0e7a2df 100644
--- a/sc/source/ui/unoobj/optuno.cxx
+++ b/sc/source/ui/unoobj/optuno.cxx
@@ -179,7 +179,7 @@ uno::Any ScDocOptionsHelper::getPropertyValue(
}
ScDocOptionsObj::ScDocOptionsObj( const ScDocOptions& rOpt ) :
- ScModelObj( NULL ),
+ ScModelObj( nullptr ),
aOptions( rOpt )
{
}
diff --git a/sc/source/ui/unoobj/scdetect.cxx b/sc/source/ui/unoobj/scdetect.cxx
index 12a11be841e0..eac13bb4dff8 100644
--- a/sc/source/ui/unoobj/scdetect.cxx
+++ b/sc/source/ui/unoobj/scdetect.cxx
@@ -261,7 +261,7 @@ OUString SAL_CALL ScFilterDetect::detect( uno::Sequence<beans::PropertyValue>& l
// No stream, no detection.
return OUString();
- const char* pSearchFilterName = NULL;
+ const char* pSearchFilterName = nullptr;
if (aTypeName == "calc_Lotus")
{
if (!detectThisFormat(*pStream, pLotus) && !detectThisFormat(*pStream, pLotusNew) && !detectThisFormat(*pStream, pLotus2))
diff --git a/sc/source/ui/unoobj/servuno.cxx b/sc/source/ui/unoobj/servuno.cxx
index 7cefcd509960..bf51c6a0fdc8 100644
--- a/sc/source/ui/unoobj/servuno.cxx
+++ b/sc/source/ui/unoobj/servuno.cxx
@@ -435,7 +435,7 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
{
case SC_SERVICE_SHEET:
// noch nicht eingefuegt - DocShell=Null
- xRet.set(static_cast<sheet::XSpreadsheet*>(new ScTableSheetObj(NULL,0)));
+ xRet.set(static_cast<sheet::XSpreadsheet*>(new ScTableSheetObj(nullptr,0)));
break;
case SC_SERVICE_URLFIELD:
case SC_SERVICE_PAGEFIELD:
@@ -449,14 +449,14 @@ uno::Reference<uno::XInterface> ScServiceProvider::MakeInstance(
{
uno::Reference<text::XTextRange> xNullContent;
xRet.set(static_cast<text::XTextField*>(
- new ScEditFieldObj(xNullContent, NULL, getFieldType(nType), ESelection())));
+ new ScEditFieldObj(xNullContent, nullptr, getFieldType(nType), ESelection())));
}
break;
case SC_SERVICE_CELLSTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PARA, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PARA, OUString() )));
break;
case SC_SERVICE_PAGESTYLE:
- xRet.set(static_cast<style::XStyle*>(new ScStyleObj( NULL, SFX_STYLE_FAMILY_PAGE, OUString() )));
+ xRet.set(static_cast<style::XStyle*>(new ScStyleObj( nullptr, SFX_STYLE_FAMILY_PAGE, OUString() )));
break;
case SC_SERVICE_AUTOFORMAT:
xRet.set(static_cast<container::XIndexAccess*>(new ScAutoFormatObj( SC_AFMTOBJ_INVALID )));
diff --git a/sc/source/ui/unoobj/shapeuno.cxx b/sc/source/ui/unoobj/shapeuno.cxx
index c7e87878f209..019f576376be 100644
--- a/sc/source/ui/unoobj/shapeuno.cxx
+++ b/sc/source/ui/unoobj/shapeuno.cxx
@@ -67,7 +67,7 @@ const SvEventDescription* ScShapeObj::GetSupportedMacroItems()
{
static const SvEventDescription aMacroDescriptionsImpl[] =
{
- { 0, NULL }
+ { 0, nullptr }
};
return aMacroDescriptionsImpl;
}
@@ -77,7 +77,7 @@ ScMacroInfo* ScShapeObj_getShapeHyperMacroInfo( ScShapeObj* pShape, bool bCreate
if( pShape )
if( SdrObject* pObj = pShape->GetSdrObject() )
return ScDrawLayer::GetMacroInfo( pObj, bCreate );
- return 0;
+ return nullptr;
}
namespace
@@ -90,8 +90,8 @@ namespace
}
ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
- pShapePropertySet(NULL),
- pShapePropertyState(NULL),
+ pShapePropertySet(nullptr),
+ pShapePropertyState(nullptr),
bIsTextShape(false),
bIsNoteCaption(false),
bInitializedNotifier(false)
@@ -105,13 +105,13 @@ ScShapeObj::ScShapeObj( uno::Reference<drawing::XShape>& xShape ) :
if (mxShapeAgg.is())
{
- xShape = NULL; // during setDelegator, mxShapeAgg must be the only ref
+ xShape = nullptr; // during setDelegator, mxShapeAgg must be the only ref
mxShapeAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
xShape.set(uno::Reference<drawing::XShape>( mxShapeAgg, uno::UNO_QUERY ));
- bIsTextShape = ( SvxUnoTextBase::getImplementation( mxShapeAgg ) != NULL );
+ bIsTextShape = ( SvxUnoTextBase::getImplementation( mxShapeAgg ) != nullptr );
}
{
@@ -1309,7 +1309,7 @@ uno::Reference< uno::XInterface > SAL_CALL ScShapeObj::getParent() throw (uno::R
}
}
- return 0;
+ return nullptr;
}
void SAL_CALL ScShapeObj::setParent( const uno::Reference< uno::XInterface >& ) throw (lang::NoSupportException, uno::RuntimeException, std::exception)
@@ -1354,7 +1354,7 @@ SdrObject* ScShapeObj::GetSdrObject() const throw()
return pShape->GetSdrObject();
}
- return NULL;
+ return nullptr;
}
#define SC_EVENTACC_ONCLICK "OnClick"
diff --git a/sc/source/ui/unoobj/srchuno.cxx b/sc/source/ui/unoobj/srchuno.cxx
index 08bcccba422c..edc4809ed342 100644
--- a/sc/source/ui/unoobj/srchuno.cxx
+++ b/sc/source/ui/unoobj/srchuno.cxx
@@ -235,7 +235,7 @@ const uno::Sequence<sal_Int8>& ScCellSearchObj::getUnoTunnelId()
ScCellSearchObj* ScCellSearchObj::getImplementation(const uno::Reference<util::XSearchDescriptor>& rObj)
{
- ScCellSearchObj* pRet = NULL;
+ ScCellSearchObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellSearchObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
diff --git a/sc/source/ui/unoobj/styleuno.cxx b/sc/source/ui/unoobj/styleuno.cxx
index c0d33728dbe6..6dd6b5701a47 100644
--- a/sc/source/ui/unoobj/styleuno.cxx
+++ b/sc/source/ui/unoobj/styleuno.cxx
@@ -416,7 +416,7 @@ void ScStyleFamiliesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -432,7 +432,7 @@ ScStyleFamilyObj*ScStyleFamiliesObj::GetObjectByType_Impl(sal_uInt16 nType) cons
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
}
OSL_FAIL("getStyleFamilyByType: keine DocShell oder falscher Typ");
- return NULL;
+ return nullptr;
}
ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) const
@@ -440,7 +440,7 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByIndex_Impl(sal_uInt32 nIndex) c
if ( nIndex < SC_STYLE_FAMILY_COUNT )
return GetObjectByType_Impl(aStyleFamilyTypes[nIndex]);
- return NULL; // ungueltiger Index
+ return nullptr; // ungueltiger Index
}
ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName) const
@@ -454,7 +454,7 @@ ScStyleFamilyObj* ScStyleFamiliesObj::GetObjectByName_Impl(const OUString& aName
return new ScStyleFamilyObj( pDocShell, SFX_STYLE_FAMILY_PAGE );
}
// no assertion - called directly from getByName
- return NULL;
+ return nullptr;
}
// container::XIndexAccess
@@ -633,7 +633,7 @@ void ScStyleFamilyObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -656,7 +656,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByIndex_Impl(sal_uInt32 nIndex)
}
}
}
- return NULL;
+ return nullptr;
}
ScStyleObj* ScStyleFamilyObj::GetObjectByName_Impl(const OUString& aName)
@@ -670,7 +670,7 @@ ScStyleObj* ScStyleFamilyObj::GetObjectByName_Impl(const OUString& aName)
if ( pStylePool->Find( aString, eFamily ) )
return new ScStyleObj( pDocShell, eFamily, aString );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScStyleFamilyObj::insertByName( const OUString& aName, const uno::Any& aElement )
@@ -1011,7 +1011,7 @@ const uno::Sequence<sal_Int8>& ScStyleObj::getUnoTunnelId()
ScStyleObj* ScStyleObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScStyleObj* pRet = NULL;
+ ScStyleObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScStyleObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -1025,7 +1025,7 @@ void ScStyleObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -1037,7 +1037,7 @@ SfxStyleSheetBase* ScStyleObj::GetStyle_Impl()
ScStyleSheetPool* pStylePool = rDoc.GetStyleSheetPool();
return pStylePool->Find( aStyleName, eFamily );
}
- return NULL;
+ return nullptr;
}
// style::XStyle
@@ -1183,7 +1183,7 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
SfxStyleSheetBase* pStyle = GetStyle_Impl();
if (pStyle)
{
- const SfxItemPropertySimpleEntry* pEntry = NULL;
+ const SfxItemPropertySimpleEntry* pEntry = nullptr;
if ( eFamily == SFX_STYLE_FAMILY_PAGE )
{
pEntry = lcl_GetHeaderStyleMap()->getByName( rPropName );
@@ -1207,8 +1207,8 @@ const SfxItemSet* ScStyleObj::GetStyleItemSet_Impl( const OUString& rPropName,
}
}
- rpResultEntry = NULL;
- return NULL;
+ rpResultEntry = nullptr;
+ return nullptr;
}
beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPropertyName )
@@ -1217,7 +1217,7 @@ beans::PropertyState SAL_CALL ScStyleObj::getPropertyState( const OUString& aPro
SolarMutexGuard aGuard;
beans::PropertyState eRet = beans::PropertyState_DIRECT_VALUE;
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
@@ -1278,7 +1278,7 @@ void SAL_CALL ScStyleObj::setPropertyToDefault( const OUString& aPropertyName )
if ( !pEntry )
throw beans::UnknownPropertyException();
- SetOnePropertyValue( aPropertyName, pEntry, NULL );
+ SetOnePropertyValue( aPropertyName, pEntry, nullptr );
}
uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName )
@@ -1288,7 +1288,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyDefault( const OUString& aPropertyName
SolarMutexGuard aGuard;
uno::Any aAny;
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pStyleSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pStyleSet && pResultEntry )
@@ -1506,7 +1506,7 @@ void SAL_CALL ScStyleObj::setPropertiesToDefault( const uno::Sequence<OUString>&
for (sal_Int32 i = 0; i < nCount; i++)
{
const SfxItemPropertySimpleEntry* pEntry = rPropertyMap.getByName( pNames[i] );
- SetOnePropertyValue( pNames[i], pEntry, NULL );
+ SetOnePropertyValue( pNames[i], pEntry, nullptr );
}
}
}
@@ -1883,7 +1883,7 @@ uno::Any SAL_CALL ScStyleObj::getPropertyValue( const OUString& aPropertyName )
}
else
{
- const SfxItemPropertySimpleEntry* pResultEntry = NULL;
+ const SfxItemPropertySimpleEntry* pResultEntry = nullptr;
const SfxItemSet* pItemSet = GetStyleItemSet_Impl( aPropertyName, pResultEntry );
if ( pItemSet && pResultEntry )
diff --git a/sc/source/ui/unoobj/targuno.cxx b/sc/source/ui/unoobj/targuno.cxx
index d4032eb5fd6b..17da342e3ab8 100644
--- a/sc/source/ui/unoobj/targuno.cxx
+++ b/sc/source/ui/unoobj/targuno.cxx
@@ -85,7 +85,7 @@ void ScLinkTargetTypesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
// container::XNameAccess
@@ -154,7 +154,7 @@ void ScLinkTargetTypeObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pDocShell = NULL; // document gone
+ pDocShell = nullptr; // document gone
}
// document::XLinkTargetSupplier
@@ -185,7 +185,7 @@ uno::Reference< container::XNameAccess > SAL_CALL ScLinkTargetTypeObj::getLinks
// beans::XPropertySet as ElementType in container::XNameAccess.
if ( xCollection.is() )
return new ScLinkTargetsObj( xCollection );
- return NULL;
+ return nullptr;
}
// beans::XPropertySet
diff --git a/sc/source/ui/unoobj/textuno.cxx b/sc/source/ui/unoobj/textuno.cxx
index ac01ca7d63cf..736e96140b3f 100644
--- a/sc/source/ui/unoobj/textuno.cxx
+++ b/sc/source/ui/unoobj/textuno.cxx
@@ -176,11 +176,11 @@ rtl::Reference<ScHeaderFooterContentObj> ScHeaderFooterContentObj::getImplementa
ScHeaderFooterTextData::ScHeaderFooterTextData(
rtl::Reference<ScHeaderFooterContentObj> const & rContent, sal_uInt16 nP, const EditTextObject* pTextObj) :
- mpTextObj(pTextObj ? pTextObj->Clone() : NULL),
+ mpTextObj(pTextObj ? pTextObj->Clone() : nullptr),
rContentObj( rContent ),
nPart( nP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
bDataValid(false)
{
}
@@ -517,7 +517,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScHeaderFooterTextObj::getTextFi
throw(uno::RuntimeException, std::exception)
{
// sowas gibts nicht im Calc (?)
- return NULL;
+ return nullptr;
}
// XTextRangeMover
@@ -649,7 +649,7 @@ const uno::Sequence<sal_Int8>& ScCellTextCursor::getUnoTunnelId()
ScCellTextCursor* ScCellTextCursor::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScCellTextCursor* pRet = NULL;
+ ScCellTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScCellTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -744,7 +744,7 @@ const uno::Sequence<sal_Int8>& ScHeaderFooterTextCursor::getUnoTunnelId()
ScHeaderFooterTextCursor* ScHeaderFooterTextCursor::getImplementation(
const uno::Reference<uno::XInterface>& rObj)
{
- ScHeaderFooterTextCursor* pRet = NULL;
+ ScHeaderFooterTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScHeaderFooterTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -837,7 +837,7 @@ const uno::Sequence<sal_Int8>& ScDrawTextCursor::getUnoTunnelId()
ScDrawTextCursor* ScDrawTextCursor::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScDrawTextCursor* pRet = NULL;
+ ScDrawTextCursor* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScDrawTextCursor*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -850,7 +850,7 @@ ScSimpleEditSourceHelper::ScSimpleEditSourceHelper()
pEnginePool->SetDefaultMetric( SFX_MAPUNIT_100TH_MM );
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true); // TRUE: become owner of pool
+ pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true); // TRUE: become owner of pool
pForwarder = new SvxEditEngineForwarder( *pEditEngine );
pOriginalSource = new ScSimpleEditSource( pForwarder );
}
@@ -890,9 +890,9 @@ EditTextObject* ScEditEngineTextObj::CreateTextObject()
ScCellTextData::ScCellTextData(ScDocShell* pDocSh, const ScAddress& rP) :
pDocShell( pDocSh ),
aCellPos( rP ),
- pEditEngine( NULL ),
- pForwarder( NULL ),
- pOriginalSource( NULL ),
+ pEditEngine( nullptr ),
+ pForwarder( nullptr ),
+ pOriginalSource( nullptr ),
bDataValid( false ),
bInUpdate( false ),
bDirty( false ),
@@ -948,7 +948,7 @@ SvxTextForwarder* ScCellTextData::GetTextForwarder()
{
SfxItemPool* pEnginePool = EditEngine::CreatePool();
pEnginePool->FreezeIdRanges();
- pEditEngine = new ScFieldEditEngine(NULL, pEnginePool, NULL, true);
+ pEditEngine = new ScFieldEditEngine(nullptr, pEnginePool, nullptr, true);
}
// currently, GetPortions doesn't work if UpdateMode is sal_False,
// this will be fixed (in EditEngine) by src600
@@ -1002,7 +1002,7 @@ void ScCellTextData::UpdateData()
{
if ( bDoUpdate )
{
- OSL_ENSURE(pEditEngine != NULL, "no EditEngine for UpdateData()");
+ OSL_ENSURE(pEditEngine != nullptr, "no EditEngine for UpdateData()");
if ( pDocShell && pEditEngine )
{
// during the own UpdateData call, bDataValid must not be reset,
@@ -1032,7 +1032,7 @@ void ScCellTextData::Notify( SfxBroadcaster&, const SfxHint& rHint )
sal_uLong nId = static_cast<const SfxSimpleHint&>(rHint).GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // invalid now
+ pDocShell = nullptr; // invalid now
DELETEZ( pForwarder );
DELETEZ( pEditEngine ); // EditEngine uses document's pool
diff --git a/sc/source/ui/unoobj/tokenuno.cxx b/sc/source/ui/unoobj/tokenuno.cxx
index 81cecbdaa3c2..6e769d03bd61 100644
--- a/sc/source/ui/unoobj/tokenuno.cxx
+++ b/sc/source/ui/unoobj/tokenuno.cxx
@@ -82,7 +82,7 @@ void ScFormulaParserObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- mpDocShell = NULL;
+ mpDocShell = nullptr;
}
// XFormulaParser
diff --git a/sc/source/ui/unoobj/viewuno.cxx b/sc/source/ui/unoobj/viewuno.cxx
index 1eed0551b3d5..e9a385f2823d 100644
--- a/sc/source/ui/unoobj/viewuno.cxx
+++ b/sc/source/ui/unoobj/viewuno.cxx
@@ -138,7 +138,7 @@ void ScViewPaneBase::Notify( SfxBroadcaster&, const SfxHint& rHint )
{
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
- pViewShell = NULL;
+ pViewShell = nullptr;
}
uno::Any SAL_CALL ScViewPaneBase::queryInterface( const uno::Type& rType )
@@ -296,7 +296,7 @@ uno::Reference<table::XCellRange> SAL_CALL ScViewPaneBase::getReferredCells()
return new ScCellRangeObj( pDocSh, aRange );
}
- return NULL;
+ return nullptr;
}
namespace
@@ -313,7 +313,7 @@ namespace
_rpWindow = _pViewShell->GetWindowByPos( eWhich );
_rpSdrView = _pViewShell->GetSdrView();
_rpFormShell = _pViewShell->GetFormShell();
- return ( _rpFormShell != NULL ) && ( _rpSdrView != NULL )&& ( _rpWindow != NULL );
+ return ( _rpFormShell != nullptr ) && ( _rpSdrView != nullptr )&& ( _rpWindow != nullptr );
}
}
@@ -324,9 +324,9 @@ uno::Reference< form::runtime::XFormController > SAL_CALL ScViewPaneBase::getFor
uno::Reference< form::runtime::XFormController > xController;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
xController = FmFormShell::GetFormController( _Form, *pSdrView, *pWindow );
@@ -339,7 +339,7 @@ sal_Bool SAL_CALL ScViewPaneBase::isFormDesignMode( ) throw (uno::RuntimeExcept
bool bIsFormDesignMode( true );
- FmFormShell* pFormShell( pViewShell ? pViewShell->GetFormShell() : NULL );
+ FmFormShell* pFormShell( pViewShell ? pViewShell->GetFormShell() : nullptr );
if ( pFormShell )
bIsFormDesignMode = pFormShell->IsDesignMode();
@@ -350,9 +350,9 @@ void SAL_CALL ScViewPaneBase::setFormDesignMode( sal_Bool _DesignMode ) throw (u
{
SolarMutexGuard aGuard;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
pFormShell->SetDesignMode( _DesignMode );
}
@@ -367,9 +367,9 @@ uno::Reference<awt::XControl> SAL_CALL ScViewPaneBase::getControl(
uno::Reference<awt::XControl> xRet;
- vcl::Window* pWindow( NULL );
- SdrView* pSdrView( NULL );
- FmFormShell* pFormShell( NULL );
+ vcl::Window* pWindow( nullptr );
+ SdrView* pSdrView( nullptr );
+ FmFormShell* pFormShell( nullptr );
if ( lcl_prepareFormShellCall( pViewShell, nPane, pFormShell, pWindow, pSdrView ) )
pFormShell->GetFormControl( xModel, *pSdrView, *pWindow, xRet );
@@ -807,7 +807,7 @@ sal_Bool SAL_CALL ScTabViewObj::select( const uno::Any& aSelection )
long nCount = xShapeColl->getCount();
if (nCount)
{
- SdrPageView* pPV = NULL;
+ SdrPageView* pPV = nullptr;
bool bAllMarked(true);
for ( long i = 0; i < nCount; i++ )
{
@@ -865,7 +865,7 @@ uno::Any SAL_CALL ScTabViewObj::getSelection()
{
SolarMutexGuard aGuard;
ScTabViewShell* pViewSh = GetViewShell();
- ScCellRangesBase* pObj = NULL;
+ ScCellRangesBase* pObj = nullptr;
if (pViewSh)
{
// Ist auf dem Drawing-Layer etwas selektiert?
@@ -1067,7 +1067,7 @@ ScViewPaneObj* ScTabViewObj::GetObjectByIndex_Impl(sal_uInt16 nIndex) const
return new ScViewPaneObj( pViewSh, sal::static_int_cast<sal_uInt16>(eWhich) );
}
- return NULL;
+ return nullptr;
}
uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
@@ -1081,7 +1081,7 @@ uno::Reference<sheet::XSpreadsheet> SAL_CALL ScTabViewObj::getActiveSheet()
SCTAB nTab = rViewData.GetTabNo();
return new ScTableSheetObj( rViewData.GetDocShell(), nTab );
}
- return NULL;
+ return nullptr;
}
// support expand (but not replace) the active sheet
@@ -1129,7 +1129,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
ScDocument* pDoc = rData.GetDocument();
if (pDoc && pDoc->GetDrawLayer())
{
- SdrPage* pDrawPage = NULL;
+ SdrPage* pDrawPage = nullptr;
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
if (pDrawLayer->HasObjects() && (pDrawLayer->GetPageCount() > nTab))
pDrawPage = pDrawLayer->GetPage(static_cast<sal_uInt16>(nTab));
@@ -1149,7 +1149,7 @@ uno::Reference< uno::XInterface > ScTabViewObj::GetClickedObject(const Point& rP
for (size_t i = 0; i < nCount && !bFound; ++i)
{
SdrObject* pObj = pDrawPage->GetObj(i);
- if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), 0, false))
+ if (pObj && SdrObjectPrimitiveHit(*pObj, aPos, nHitLog, *pDrawView->GetSdrPageView(), nullptr, false))
{
xTarget.set(pObj->getUnoShape(), uno::UNO_QUERY);
bFound = true;
@@ -1955,7 +1955,7 @@ uno::Any SAL_CALL ScTabViewObj::getPropertyValue( const OUString& aPropertyName
vcl::Window* pActiveWin = rViewData.GetActiveWin();
if ( pActiveWin )
{
- Rectangle aRect = pActiveWin->GetWindowExtentsRelative( NULL );
+ Rectangle aRect = pActiveWin->GetWindowExtentsRelative( nullptr );
aRet <<= AWTRectangle( aRect );
}
}
@@ -2205,7 +2205,7 @@ const uno::Sequence<sal_Int8>& ScTabViewObj::getUnoTunnelId()
ScTabViewObj* ScTabViewObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScTabViewObj* pRet = NULL;
+ ScTabViewObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScTabViewObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -2339,7 +2339,7 @@ void ScPreviewObj::Notify(SfxBroadcaster&, const SfxHint& rHint)
{
const SfxSimpleHint* p = dynamic_cast<const SfxSimpleHint*>(&rHint);
if (p && p->GetId() == SFX_HINT_DYING)
- mpViewShell = NULL;
+ mpViewShell = nullptr;
}
uno::Sequence<sal_Int32> ScPreviewObj::getSelectedSheets()