summaryrefslogtreecommitdiff
path: root/sc/source/ui/view
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/view')
-rw-r--r--sc/source/ui/view/cellsh.cxx14
-rw-r--r--sc/source/ui/view/cellsh1.cxx6
-rw-r--r--sc/source/ui/view/cellsh2.cxx20
-rw-r--r--sc/source/ui/view/cellsh3.cxx16
-rw-r--r--sc/source/ui/view/cellsh4.cxx6
-rw-r--r--sc/source/ui/view/colrowba.cxx2
-rw-r--r--sc/source/ui/view/dbfunc.cxx10
-rw-r--r--sc/source/ui/view/dbfunc3.cxx42
-rw-r--r--sc/source/ui/view/drawutil.cxx2
-rw-r--r--sc/source/ui/view/drawvie3.cxx6
-rw-r--r--sc/source/ui/view/drawvie4.cxx10
-rw-r--r--sc/source/ui/view/drawview.cxx30
-rw-r--r--sc/source/ui/view/editsh.cxx10
-rw-r--r--sc/source/ui/view/formatsh.cxx58
-rw-r--r--sc/source/ui/view/gridwin.cxx52
-rw-r--r--sc/source/ui/view/gridwin2.cxx2
-rw-r--r--sc/source/ui/view/gridwin3.cxx2
-rw-r--r--sc/source/ui/view/gridwin4.cxx8
-rw-r--r--sc/source/ui/view/gridwin5.cxx22
-rw-r--r--sc/source/ui/view/imapwrap.cxx2
-rw-r--r--sc/source/ui/view/notemark.cxx6
-rw-r--r--sc/source/ui/view/olinewin.cxx8
-rw-r--r--sc/source/ui/view/output.cxx52
-rw-r--r--sc/source/ui/view/output2.cxx62
-rw-r--r--sc/source/ui/view/output3.cxx2
-rw-r--r--sc/source/ui/view/pfuncache.cxx4
-rw-r--r--sc/source/ui/view/preview.cxx24
-rw-r--r--sc/source/ui/view/prevloc.cxx14
-rw-r--r--sc/source/ui/view/prevwsh.cxx10
-rw-r--r--sc/source/ui/view/printfun.cxx66
-rw-r--r--sc/source/ui/view/reffact.cxx12
-rw-r--r--sc/source/ui/view/scextopt.cxx2
-rw-r--r--sc/source/ui/view/select.cxx4
-rw-r--r--sc/source/ui/view/spellcheckcontext.cxx2
-rw-r--r--sc/source/ui/view/spelldialog.cxx20
-rw-r--r--sc/source/ui/view/spelleng.cxx4
-rw-r--r--sc/source/ui/view/tabcont.cxx2
-rw-r--r--sc/source/ui/view/tabview.cxx18
-rw-r--r--sc/source/ui/view/tabview2.cxx12
-rw-r--r--sc/source/ui/view/tabview3.cxx10
-rw-r--r--sc/source/ui/view/tabview5.cxx24
-rw-r--r--sc/source/ui/view/tabvwsh2.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh3.cxx14
-rw-r--r--sc/source/ui/view/tabvwsh4.cxx66
-rw-r--r--sc/source/ui/view/tabvwsh8.cxx2
-rw-r--r--sc/source/ui/view/tabvwsh9.cxx2
-rw-r--r--sc/source/ui/view/tabvwsha.cxx18
-rw-r--r--sc/source/ui/view/tabvwshb.cxx10
-rw-r--r--sc/source/ui/view/tabvwshc.cxx8
-rw-r--r--sc/source/ui/view/tabvwshe.cxx2
-rw-r--r--sc/source/ui/view/tabvwshf.cxx18
-rw-r--r--sc/source/ui/view/tabvwshh.cxx2
-rw-r--r--sc/source/ui/view/viewdata.cxx36
-rw-r--r--sc/source/ui/view/viewfun2.cxx34
-rw-r--r--sc/source/ui/view/viewfun3.cxx58
-rw-r--r--sc/source/ui/view/viewfun4.cxx26
-rw-r--r--sc/source/ui/view/viewfun5.cxx10
-rw-r--r--sc/source/ui/view/viewfun7.cxx14
-rw-r--r--sc/source/ui/view/viewfunc.cxx32
-rw-r--r--sc/source/ui/view/viewutil.cxx4
60 files changed, 518 insertions, 518 deletions
diff --git a/sc/source/ui/view/cellsh.cxx b/sc/source/ui/view/cellsh.cxx
index 735e2c7e8527..94952800fa03 100644
--- a/sc/source/ui/view/cellsh.cxx
+++ b/sc/source/ui/view/cellsh.cxx
@@ -182,7 +182,7 @@ void ScCellShell::GetBlockState( SfxItemSet& rSet )
case FID_FILL_SERIES: // fill block
case SID_OPENDLG_TABOP: // multiple-cell operations, are at least 2 cells marked?
- if (pDoc->GetChangeTrack()!=NULL &&nWhich ==SID_OPENDLG_TABOP)
+ if (pDoc->GetChangeTrack()!=nullptr &&nWhich ==SID_OPENDLG_TABOP)
bDisable = true;
else
bDisable = (!bSimpleArea) || (nCol1 == nCol2 && nRow1 == nRow2);
@@ -406,7 +406,7 @@ static bool lcl_TestFormat( SvxClipboardFormatItem& rFormats, const Transferable
void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFormatItem& rFormats )
{
vcl::Window* pWin = GetViewData()->GetActiveWin();
- bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != NULL );
+ bool bDraw = ( ScDrawTransferObj::GetOwnClipboard( pWin ) != nullptr );
TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( pWin ) );
@@ -438,7 +438,7 @@ void ScCellShell::GetPossibleClipboardFormats( SvxClipboardFormatItem& rFormats
static bool lcl_IsCellPastePossible( const TransferableDataHelper& rData )
{
bool bPossible = false;
- if ( ScTransferObj::GetOwnClipboard( NULL ) || ScDrawTransferObj::GetOwnClipboard( NULL ) )
+ if ( ScTransferObj::GetOwnClipboard( nullptr ) || ScDrawTransferObj::GetOwnClipboard( nullptr ) )
bPossible = true;
else
{
@@ -876,7 +876,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
{
//! test for data pilot operation
}
- else if (pDoc->GetChangeTrack()!=NULL || GetViewData()->IsMultiMarked())
+ else if (pDoc->GetChangeTrack()!=nullptr || GetViewData()->IsMultiMarked())
{
rSet.DisableItem( nWhich );
}
@@ -1030,7 +1030,7 @@ void ScCellShell::GetState(SfxItemSet &rSet)
case SID_OPENDLG_CONSOLIDATE:
case SCITEM_CONSOLIDATEDATA:
{
- if(pDoc->GetChangeTrack()!=NULL)
+ if(pDoc->GetChangeTrack()!=nullptr)
rSet.DisableItem( nWhich);
}
break;
@@ -1070,11 +1070,11 @@ void ScCellShell::GetState(SfxItemSet &rSet)
if ( pDoc && pData && pDoc->IsTabProtected( pData->GetTabNo() ) )
{
bool bVisible = false;
- SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : NULL );
+ SfxViewFrame* pViewFrame = ( pTabViewShell ? pTabViewShell->GetViewFrame() : nullptr );
if ( pViewFrame && pViewFrame->HasChildWindow( nWhich ) )
{
SfxChildWindow* pChild = pViewFrame->GetChildWindow( nWhich );
- vcl::Window* pWin = ( pChild ? pChild->GetWindow() : NULL );
+ vcl::Window* pWin = ( pChild ? pChild->GetWindow() : nullptr );
if ( pWin && pWin->IsVisible() )
{
bVisible = true;
diff --git a/sc/source/ui/view/cellsh1.cxx b/sc/source/ui/view/cellsh1.cxx
index 27eb61498720..4c332daaeeca 100644
--- a/sc/source/ui/view/cellsh1.cxx
+++ b/sc/source/ui/view/cellsh1.cxx
@@ -750,7 +750,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( ! rReq.IsAPI() )
{
OUString aPara;
- Color* pColor=0;
+ Color* pColor=nullptr;
switch( eFillDir )
{
@@ -1746,7 +1746,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
if( xInit.is() )
{
// initialize dialog
- Reference< awt::XWindow > xDialogParentWindow(0);
+ Reference< awt::XWindow > xDialogParentWindow(nullptr);
Sequence<Any> aSeq(1);
Any* pArray = aSeq.getArray();
PropertyValue aParam;
@@ -2314,7 +2314,7 @@ void ScCellShell::ExecuteEdit( SfxRequest& rReq )
{
OUString aChars, aFontName;
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
diff --git a/sc/source/ui/view/cellsh2.cxx b/sc/source/ui/view/cellsh2.cxx
index 578f47e45bbf..c2c19baa525e 100644
--- a/sc/source/ui/view/cellsh2.cxx
+++ b/sc/source/ui/view/cellsh2.cxx
@@ -549,7 +549,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_FILTER with arguments?");
pTabViewShell->Query( static_cast<const ScQueryItem&>(
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, true );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), nullptr, true );
rReq.Done();
}
else
@@ -570,7 +570,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
{
OSL_FAIL("SID_SPECIAL_FILTER with arguments?");
pTabViewShell->Query( static_cast<const ScQueryItem&>(
- pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), NULL, true );
+ pArgs->Get( SCITEM_QUERYDATA )).GetQueryData(), nullptr, true );
rReq.Done();
}
else
@@ -608,7 +608,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
if (rQueryItem.GetAdvancedQuerySource(aAdvSource))
pTabViewShell->Query( rQueryItem.GetQueryData(), &aAdvSource, true );
else
- pTabViewShell->Query( rQueryItem.GetQueryData(), NULL, true );
+ pTabViewShell->Query( rQueryItem.GetQueryData(), nullptr, true );
rReq.Done( *pReqArgs );
}
}
@@ -624,7 +624,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).bDoQuery = false;
aParam.bDuplicate = true;
- pTabViewShell->Query( aParam, NULL, true );
+ pTabViewShell->Query( aParam, nullptr, true );
rReq.Done();
}
break;
@@ -844,7 +844,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
}
// cell range picker
- SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg(NULL, &aArgSet, pTabViewShell);
+ SfxAbstractTabDialog* pDlg = pFact->CreateScValidationDlg(nullptr, &aArgSet, pTabViewShell);
assert(pDlg); //Dialog create fail!
short nResult = pDlg->Execute();
@@ -976,7 +976,7 @@ void ScCellShell::ExecuteDB( SfxRequest& rReq )
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE( pFact, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pFact is null!" );
std::unique_ptr<AbstractScImportAsciiDlg> pDlg(pFact->CreateScImportAsciiDlg(
- NULL, OUString(), &aStream, SC_TEXTTOCOLUMNS));
+ nullptr, OUString(), &aStream, SC_TEXTTOCOLUMNS));
OSL_ENSURE( pDlg, "ScCellShell::ExecuteDB: SID_TEXT_TO_COLUMNS - pDlg is null!" );
if ( pDlg->Execute() == RET_OK )
@@ -1031,7 +1031,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
// or filter,sort,subtotal (also without import)
bool bOk = false;
ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
- if (pDBData && rDoc.GetChangeTrack() == NULL)
+ if (pDBData && rDoc.GetChangeTrack() == nullptr)
{
if ( pDBData->HasImportParam() )
bOk = !pDBData->HasImportSelection();
@@ -1068,7 +1068,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
{
//! move ReadOnly check to idl flags
- if ( pDocSh->IsReadOnly() || rDoc.GetChangeTrack()!=NULL ||
+ if ( pDocSh->IsReadOnly() || rDoc.GetChangeTrack()!=nullptr ||
GetViewData()->IsMultiMarked() )
{
rSet.DisableItem( nWhich );
@@ -1081,7 +1081,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
// only imported data without selection
ScDBData* pDBData = pTabViewShell->GetDBData(false,SC_DB_OLD);
if (!pDBData || !pDBData->HasImportParam() || pDBData->HasImportSelection() ||
- rDoc.GetChangeTrack()!=NULL)
+ rDoc.GetChangeTrack()!=nullptr)
{
rSet.DisableItem( nWhich );
}
@@ -1094,7 +1094,7 @@ void ScCellShell::GetDBState( SfxItemSet& rSet )
rSet.Put(SfxVisibilityItem(nWhich, false));
else
// get state (BoolItem) from SfxViewFrame
- pTabViewShell->GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ pTabViewShell->GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
}
break;
case SID_SBA_BRW_INSERT:
diff --git a/sc/source/ui/view/cellsh3.cxx b/sc/source/ui/view/cellsh3.cxx
index 934295b1c6d2..d2fd259467b8 100644
--- a/sc/source/ui/view/cellsh3.cxx
+++ b/sc/source/ui/view/cellsh3.cxx
@@ -219,7 +219,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_INPUTLINE_BLOCK:
case FID_INPUTLINE_MATRIX:
{
- if( pReqArgs == 0 ) //XXX temporary HACK to avoid GPF
+ if( pReqArgs == nullptr ) //XXX temporary HACK to avoid GPF
break;
const ScInputStatusItem* pStatusItem
@@ -259,7 +259,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
const SfxPoolItem* aArgs[2];
aArgs[0] = &aItem;
- aArgs[1] = NULL;
+ aArgs[1] = nullptr;
rBindings.Execute( SID_ENTER_STRING, aArgs );
}
else
@@ -273,7 +273,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
else if (nSlot == FID_INPUTLINE_BLOCK)
{
- pTabViewShell->EnterBlock( aString, NULL );
+ pTabViewShell->EnterBlock( aString, nullptr );
rReq.Done();
}
else
@@ -316,7 +316,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_CELL_FORMAT:
{
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
// set cell attribute without dialog:
@@ -331,7 +331,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
ATTR_PATTERN_START,
ATTR_PATTERN_END ));
- const SfxPoolItem* pAttr = NULL;
+ const SfxPoolItem* pAttr = nullptr;
sal_uInt16 nWhich = 0;
for ( nWhich=ATTR_PATTERN_START; nWhich<=ATTR_PATTERN_END; nWhich++ )
@@ -345,7 +345,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
rReq.Done();
}
- else if ( pReqArgs == NULL )
+ else if ( pReqArgs == nullptr )
{
pTabViewShell->ExecuteCellFormatDlg( rReq );
}
@@ -466,7 +466,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
}
while ( !bValid && i <= MAXTAB + 2 );
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
OUString aArgName;
OUString aArgComment;
@@ -729,7 +729,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
case FID_MERGE_TOGGLE:
{
bCenter = true;
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
if( rBindings.QueryState( nSlot, pItem ) >= SfxItemState::DEFAULT )
bMerge = !static_cast< SfxBoolItem* >( pItem )->GetValue();
diff --git a/sc/source/ui/view/cellsh4.cxx b/sc/source/ui/view/cellsh4.cxx
index 0cd2a9fd64f7..5fe24c6716c3 100644
--- a/sc/source/ui/view/cellsh4.cxx
+++ b/sc/source/ui/view/cellsh4.cxx
@@ -40,7 +40,7 @@ void ScCellShell::ExecuteCursor( SfxRequest& rReq )
bool bSel = false;
bool bKeep = false;
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
@@ -208,7 +208,7 @@ void ScCellShell::ExecuteCursorSel( SfxRequest& rReq )
SCsCOLROW nRepeat = 1;
const SfxItemSet* pReqArgs = rReq.GetArgs();
// get repetition
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_1, &pItem))
@@ -396,7 +396,7 @@ void ScCellShell::ExecutePage( SfxRequest& rReq )
bool bSel = false;
bool bKeep = false;
- if ( pReqArgs != NULL )
+ if ( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if (pReqArgs->HasItem(FN_PARAM_2, &pItem))
diff --git a/sc/source/ui/view/colrowba.cxx b/sc/source/ui/view/colrowba.cxx
index d56a18a8a1ea..027bf58b0cd3 100644
--- a/sc/source/ui/view/colrowba.cxx
+++ b/sc/source/ui/view/colrowba.cxx
@@ -235,7 +235,7 @@ sal_uInt16 ScRowBar::GetEntrySize( SCCOLROW nEntryNo ) const
ScDocument* pDoc = pViewData->GetDocument();
SCTAB nTab = pViewData->GetTabNo();
SCROW nLastRow = -1;
- if (pDoc->RowHidden(nEntryNo, nTab, NULL, &nLastRow))
+ if (pDoc->RowHidden(nEntryNo, nTab, nullptr, &nLastRow))
return 0;
else
return (sal_uInt16) ScViewData::ToPixel( pDoc->GetOriginalHeight( nEntryNo,
diff --git a/sc/source/ui/view/dbfunc.cxx b/sc/source/ui/view/dbfunc.cxx
index f9c3c4b7f099..c1de01ee4a33 100644
--- a/sc/source/ui/view/dbfunc.cxx
+++ b/sc/source/ui/view/dbfunc.cxx
@@ -78,7 +78,7 @@ void ScDBFunc::GotoDBArea( const OUString& rDBName )
ScDBData* ScDBFunc::GetDBData( bool bMark, ScGetDBMode eMode, ScGetDBSelection eSel )
{
ScDocShell* pDocSh = GetViewData().GetDocShell();
- ScDBData* pData = NULL;
+ ScDBData* pData = nullptr;
ScRange aRange;
ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
if ( eMarkType == SC_MARK_SIMPLE || eMarkType == SC_MARK_SIMPLE_FILTERED )
@@ -154,7 +154,7 @@ ScDBData* ScDBFunc::GetDBData( bool bMark, ScGetDBMode eMode, ScGetDBSelection e
eMode, SC_DBSEL_KEEP );
if (!pData)
- return NULL;
+ return nullptr;
if (bMark)
{
@@ -171,7 +171,7 @@ ScDBData* ScDBFunc::GetAnonymousDBData()
ScRange aRange;
ScMarkType eMarkType = GetViewData().GetSimpleArea(aRange);
if (eMarkType != SC_MARK_SIMPLE && eMarkType != SC_MARK_SIMPLE_FILTERED)
- return NULL;
+ return nullptr;
// Expand to used data area if not explicitly marked.
const ScMarkData& rMarkData = GetViewData().GetMarkData();
@@ -340,7 +340,7 @@ void ScDBFunc::ToggleAutoFilter()
for (SCSIZE i=0; i<nEC; i++)
aParam.GetEntry(i).bDoQuery = false;
aParam.bDuplicate = true;
- Query( aParam, NULL, true );
+ Query( aParam, nullptr, true );
pDocSh->GetUndoManager()->LeaveListAction();
@@ -451,7 +451,7 @@ bool ScDBFunc::ImportData( const ScImportParam& rParam, bool bRecord )
}
ScDBDocFunc aDBDocFunc( *GetViewData().GetDocShell() );
- return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, NULL, bRecord );
+ return aDBDocFunc.DoImport( GetViewData().GetTabNo(), rParam, nullptr, bRecord );
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 4e48e43275bf..02bc6c82e5bb 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -147,7 +147,7 @@ void ScDBFunc::TestRemoveOutline( bool& rCol, bool& rRow )
{
ScOutlineArray& rArray = pTable->GetColArray();
ScSubOutlineIterator aColIter( &rArray );
- while ((pEntry=aColIter.GetNext()) != NULL && !bColFound)
+ while ((pEntry=aColIter.GetNext()) != nullptr && !bColFound)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -162,7 +162,7 @@ void ScDBFunc::TestRemoveOutline( bool& rCol, bool& rRow )
{
ScOutlineArray& rArray = pTable->GetRowArray();
ScSubOutlineIterator aRowIter( &rArray );
- while ((pEntry=aRowIter.GetNext()) != NULL && !bRowFound)
+ while ((pEntry=aRowIter.GetNext()) != nullptr && !bRowFound)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -277,7 +277,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
ScOutlineArray& rColArray = pTable->GetColArray();
ScSubOutlineIterator aColIter( &rColArray );
- while ((pEntry=aColIter.GetNext()) != NULL && !bEnable)
+ while ((pEntry=aColIter.GetNext()) != nullptr && !bEnable)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -299,7 +299,7 @@ bool ScDBFunc::OutlinePossible(bool bHide)
ScOutlineArray& rRowArray = pTable->GetRowArray();
ScSubOutlineIterator aRowIter( &rRowArray );
- while ((pEntry=aRowIter.GetNext()) != NULL)
+ while ((pEntry=aRowIter.GetNext()) != nullptr)
{
nStart = pEntry->GetStart();
nEnd = pEntry->GetEnd();
@@ -409,10 +409,10 @@ void ScDBFunc::DoSubTotals( const ScSubTotalParam& rParam, bool bRecord,
ScDocShellModificator aModificator( *pDocSh );
ScSubTotalParam aNewParam( rParam ); // change end of range
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord) // record old data
{
@@ -616,7 +616,7 @@ bool ScDBFunc::MakePivotTable(
else
aObj.SetSaveData( rData );
- bool bAllowMove = (pDPObj != NULL); // allow re-positioning when editing existing table
+ bool bAllowMove = (pDPObj != nullptr); // allow re-positioning when editing existing table
ScDBDocFunc aFunc( *pDocSh );
bool bSuccess = aFunc.DataPilotUpdate(pDPObj, &aObj, true, false, bAllowMove);
@@ -1111,12 +1111,12 @@ void ScDBFunc::GroupDataPilot()
}
}
- ScDPSaveGroupDimension* pNewGroupDim = NULL;
+ ScDPSaveGroupDimension* pNewGroupDim = nullptr;
if ( !pGroupDimension )
{
// create a new group dimension
OUString aGroupDimName =
- pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, NULL);
+ pDimData->CreateGroupDimName(aBaseDimName, *pDPObj, false, nullptr);
pNewGroupDim = new ScDPSaveGroupDimension( aBaseDimName, aGroupDimName );
pGroupDimension = pNewGroupDim; // make changes to the new dim if none existed
@@ -1174,7 +1174,7 @@ void ScDBFunc::GroupDataPilot()
delete pNewGroupDim; // AddGroupDimension copies the object
// don't access pGroupDimension after here
}
- pGroupDimension = pNewGroupDim = NULL;
+ pGroupDimension = pNewGroupDim = nullptr;
// set orientation
ScDPSaveDimension* pSaveDimension = aData.GetDimensionByName( aGroupDimName );
@@ -1588,7 +1588,7 @@ void ScDBFunc::DataPilotInput( const ScAddress& rPos, const OUString& rString )
static void lcl_MoveToEnd( ScDPSaveDimension& rDim, const OUString& rItemName )
{
- ScDPSaveMember* pNewMember = NULL;
+ ScDPSaveMember* pNewMember = nullptr;
const ScDPSaveMember* pOldMember = rDim.GetExistingMemberByName( rItemName );
if ( pOldMember )
pNewMember = new ScDPSaveMember( *pOldMember );
@@ -1908,7 +1908,7 @@ void ScDBFunc::SetDataPilotDetails(bool bShow, const OUString* pNewDimensionName
// add the new dimension with the same orientation, at the end
ScDPSaveDimension* pNewDim = aData.GetDimensionByName( *pNewDimensionName );
- ScDPSaveDimension* pDuplicated = NULL;
+ ScDPSaveDimension* pDuplicated = nullptr;
if ( pNewDim->GetOrientation() == sheet::DataPilotFieldOrientation_DATA )
{
// Need to duplicate the dimension, create column/row in addition to data:
@@ -2105,10 +2105,10 @@ void ScDBFunc::RepeatDB( bool bRecord )
//! undo only needed data ?
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
- ScRangeName* pUndoRange = NULL;
- ScDBCollection* pUndoDB = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
+ ScRangeName* pUndoRange = nullptr;
+ ScDBCollection* pUndoDB = nullptr;
if (bRecord)
{
@@ -2174,7 +2174,7 @@ void ScDBFunc::RepeatDB( bool bRecord )
Query( aQueryParam, &aAdvSource, false );
}
else
- Query( aQueryParam, NULL, false );
+ Query( aQueryParam, nullptr, false );
// if not inplace the sheet may have changed
if ( !aQueryParam.bInplace && aQueryParam.nDestTab != nTab )
@@ -2194,8 +2194,8 @@ void ScDBFunc::RepeatDB( bool bRecord )
SCROW nDummyRow, nNewEndRow;
pDBData->GetArea( nDummyTab, nDummyCol,nDummyRow, nDummyCol,nNewEndRow );
- const ScRange* pOld = NULL;
- const ScRange* pNew = NULL;
+ const ScRange* pOld = nullptr;
+ const ScRange* pNew = nullptr;
if (bQuerySize)
{
ScDBData* pDest = pDoc->GetDBAtCursor( aQueryParam.nDestCol, aQueryParam.nDestRow,
diff --git a/sc/source/ui/view/drawutil.cxx b/sc/source/ui/view/drawutil.cxx
index 668337aac0da..ea4a83fa0d37 100644
--- a/sc/source/ui/view/drawutil.cxx
+++ b/sc/source/ui/view/drawutil.cxx
@@ -45,7 +45,7 @@ void ScDrawUtil::CalcScale( ScDocument* pDoc, SCTAB nTab,
for (SCROW nRow = nStartRow; nRow <= nEndRow-1; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (pDoc->RowHidden(nRow, nTab, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
diff --git a/sc/source/ui/view/drawvie3.cxx b/sc/source/ui/view/drawvie3.cxx
index 43bf80d1206f..85228549b314 100644
--- a/sc/source/ui/view/drawvie3.cxx
+++ b/sc/source/ui/view/drawvie3.cxx
@@ -40,8 +40,8 @@ ScDrawView::ScDrawView( OutputDevice* pOut, ScViewData* pData ) :
pDev( pOut ),
pDoc( pData->GetDocument() ),
nTab( pData->GetTabNo() ),
- pDropMarker( NULL ),
- pDropMarkObj( NULL ),
+ pDropMarker( nullptr ),
+ pDropMarkObj( nullptr ),
bInConstruct( true )
{
// #i73602# Use default from the configuration
@@ -202,7 +202,7 @@ void ScDrawView::UpdateIMap( SdrObject* pObj )
Graphic aGraphic;
TargetList aTargetList;
ScIMapInfo* pIMapInfo = ScDrawLayer::GetIMapInfo( pObj );
- const ImageMap* pImageMap = NULL;
+ const ImageMap* pImageMap = nullptr;
if ( pIMapInfo )
pImageMap = &pIMapInfo->GetImageMap();
diff --git a/sc/source/ui/view/drawvie4.cxx b/sc/source/ui/view/drawvie4.cxx
index 2100793ffdf8..000d36480e79 100644
--- a/sc/source/ui/view/drawvie4.cxx
+++ b/sc/source/ui/view/drawvie4.cxx
@@ -113,7 +113,7 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
}
ScDrawLayer::SetGlobalDrawPersist(aDragShellRef);
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
@@ -133,7 +133,7 @@ bool ScDrawView::BeginDrag( vcl::Window* pWindow, const Point& rStartPos )
pTransferObj->SetDrawPersist( &aDragShellRef ); // keep persist for ole objects alive
pTransferObj->SetDragSource( this ); // copies selection
- SC_MOD()->SetDragObject( NULL, pTransferObj ); // for internal D&D
+ SC_MOD()->SetDragObject( nullptr, pTransferObj ); // for internal D&D
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
@@ -371,7 +371,7 @@ void ScDrawView::DoCopy()
copyChartRefDataToClipDoc(pDoc, &rClipDoc, aRanges);
}
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
@@ -394,7 +394,7 @@ void ScDrawView::DoCopy()
}
pTransferObj->CopyToClipboard( pViewData->GetActiveWin() ); // system clipboard
- SC_MOD()->SetClipObject( NULL, pTransferObj ); // internal clipboard
+ SC_MOD()->SetClipObject( nullptr, pTransferObj ); // internal clipboard
}
uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
@@ -406,7 +406,7 @@ uno::Reference<datatransfer::XTransferable> ScDrawView::CopyToTransferable()
// update ScGlobal::xDrawClipDocShellRef
ScDrawLayer::SetGlobalDrawPersist( ScTransferObj::SetDrawClipDoc( bAnyOle ) );
SdrModel* pModel = GetMarkedObjModel();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
// Charts now always copy their data in addition to the source reference, so
// there's no need to call SchDLL::Update for the charts in the clipboard doc.
diff --git a/sc/source/ui/view/drawview.cxx b/sc/source/ui/view/drawview.cxx
index 0ff91a2e2a57..a4827144b7f5 100644
--- a/sc/source/ui/view/drawview.cxx
+++ b/sc/source/ui/view/drawview.cxx
@@ -123,7 +123,7 @@ void ScDrawView::ImplClearCalcDropMarker()
if(pDropMarker)
{
delete pDropMarker;
- pDropMarker = 0L;
+ pDropMarker = nullptr;
}
}
@@ -378,8 +378,8 @@ void ScDrawView::MarkListHasChanged()
// Select Ole object?
- SdrOle2Obj* pOle2Obj = NULL;
- SdrGrafObj* pGrafObj = NULL;
+ SdrOle2Obj* pOle2Obj = nullptr;
+ SdrGrafObj* pGrafObj = nullptr;
const SdrMarkList& rMarkList = GetMarkedObjectList();
const size_t nMarkCount = rMarkList.GetMarkCount();
@@ -592,7 +592,7 @@ void ScDrawView::ModelHasChanged()
{
// SdrObjEditView::ModelHasChanged will end text edit in this case,
// so make sure the EditEngine's undo manager is no longer used.
- pViewData->GetViewShell()->SetDrawTextUndo(NULL);
+ pViewData->GetViewShell()->SetDrawTextUndo(nullptr);
SetCreateMode(); // don't leave FuText in a funny state
}
@@ -649,7 +649,7 @@ SdrObject* ScDrawView::GetObjectByName(const OUString& rName)
}
}
}
- return 0;
+ return nullptr;
}
//realize multi-selection of objects
@@ -657,7 +657,7 @@ SdrObject* ScDrawView::GetObjectByName(const OUString& rName)
bool ScDrawView::SelectCurrentViewObject( const OUString& rName )
{
sal_uInt16 nObjectTab = 0;
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
bool bUnMark = false;
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pShell)
@@ -712,7 +712,7 @@ bool ScDrawView::SelectObject( const OUString& rName )
UnmarkAll();
SCTAB nObjectTab = 0;
- SdrObject* pFound = NULL;
+ SdrObject* pFound = nullptr;
SfxObjectShell* pShell = pDoc->GetDocumentShell();
if (pShell)
@@ -765,7 +765,7 @@ bool ScDrawView::SelectObject( const OUString& rName )
MarkObj( pFound, pPV );
}
- return ( pFound != NULL );
+ return ( pFound != nullptr );
}
//If object is marked , return true , else return false .
@@ -806,7 +806,7 @@ SdrObject* ScDrawView::GetMarkedNoteCaption( ScDrawObjData** ppCaptData )
return pObj;
}
}
- return 0;
+ return nullptr;
}
void ScDrawView::LockCalcLayer( SdrLayerID nLayer, bool bLock )
@@ -828,13 +828,13 @@ void ScDrawView::MakeVisible( const Rectangle& rRect, vcl::Window& rWin )
void ScDrawView::DeleteMarked()
{
// try to delete a note caption object with its cell note in the Calc document
- ScDrawObjData* pCaptData = 0;
+ ScDrawObjData* pCaptData = nullptr;
if( SdrObject* pCaptObj = GetMarkedNoteCaption( &pCaptData ) )
{
(void)pCaptObj; // prevent 'unused variable' compiler warning in pro builds
ScDrawLayer* pDrawLayer = pDoc->GetDrawLayer();
- ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : 0;
- ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : 0;
+ ScDocShell* pDocShell = pViewData ? pViewData->GetDocShell() : nullptr;
+ ::svl::IUndoManager* pUndoMgr = pDocShell ? pDocShell->GetUndoManager() : nullptr;
bool bUndo = pDrawLayer && pDocShell && pUndoMgr && pDoc->IsUndoEnabled();
// remove the cell note from document, we are its owner now
@@ -870,7 +870,7 @@ SdrEndTextEditKind ScDrawView::ScEndTextEdit()
SdrEndTextEditKind eKind = SdrEndTextEdit();
if ( bIsTextEdit && pViewData )
- pViewData->GetViewShell()->SetDrawTextUndo(NULL); // the "normal" undo manager
+ pViewData->GetViewShell()->SetDrawTextUndo(nullptr); // the "normal" undo manager
return eKind;
}
@@ -943,7 +943,7 @@ void ScDrawView::SyncForGrid( SdrObject* pObj )
// support enhanced text edit for draw objects
SdrUndoManager* ScDrawView::getSdrUndoManagerForEnhancedTextEdit() const
{
- return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : 0;
+ return pDoc ? dynamic_cast< SdrUndoManager* >(pDoc->GetUndoManager()) : nullptr;
}
// #i123922# helper to apply a Graphic to an existing SdrObject
@@ -980,7 +980,7 @@ SdrObject* ScDrawView::ApplyGraphicToObject(
return &rHitObject;
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sc/source/ui/view/editsh.cxx b/sc/source/ui/view/editsh.cxx
index 79a1f1092175..2a795a1b7ea2 100644
--- a/sc/source/ui/view/editsh.cxx
+++ b/sc/source/ui/view/editsh.cxx
@@ -94,7 +94,7 @@ void ScEditShell::InitInterface_Impl()
ScEditShell::ScEditShell(EditView* pView, ScViewData* pData) :
pEditView (pView),
pViewData (pData),
- pClipEvtLstnr (NULL),
+ pClipEvtLstnr (nullptr),
bPastePossible (false),
bIsInsertMode (true)
{
@@ -386,14 +386,14 @@ void ScEditShell::Execute( SfxRequest& rReq )
SvxFontItem aNewItem( EE_CHAR_FONTINFO );
const SfxItemSet *pArgs = rReq.GetArgs();
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if( pArgs )
pArgs->GetItemState(GetPool().GetWhich(SID_CHARMAP), false, &pItem);
if ( pItem )
{
aString = static_cast<const SfxStringItem*>(pItem)->GetValue();
- const SfxPoolItem* pFtItem = NULL;
+ const SfxPoolItem* pFtItem = nullptr;
pArgs->GetItemState( GetPool().GetWhich(SID_ATTR_SPECIALCHAR), false, &pFtItem);
const SfxStringItem* pFontItem = dynamic_cast<const SfxStringItem*>( pFtItem );
if ( pFontItem )
@@ -796,7 +796,7 @@ const SvxURLField* ScEditShell::GetURLField()
}
}
- return NULL;
+ return nullptr;
}
IMPL_LINK_TYPED( ScEditShell, ClipboardChanged, TransferableDataHelper*, pDataHelper, void )
@@ -1265,7 +1265,7 @@ void ScEditShell::GetUndoState(SfxItemSet &rSet)
sal_uInt16 nWhich = aIter.FirstWhich();
while( nWhich )
{
- pViewFrm->GetSlotState( nWhich, NULL, &rSet );
+ pViewFrm->GetSlotState( nWhich, nullptr, &rSet );
nWhich = aIter.NextWhich();
}
}
diff --git a/sc/source/ui/view/formatsh.cxx b/sc/source/ui/view/formatsh.cxx
index f10a078d1789..0ca101c976f0 100644
--- a/sc/source/ui/view/formatsh.cxx
+++ b/sc/source/ui/view/formatsh.cxx
@@ -196,7 +196,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
SCTAB nCurTab = GetViewData()->GetTabNo();
OUString aPageStyle = pDoc->GetPageStyle( nCurTab );
SfxStyleSheet* pStyleSheet = pStylePool ? static_cast<SfxStyleSheet*>(pStylePool->
- Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : NULL;
+ Find( aPageStyle, SFX_STYLE_FAMILY_PAGE )) : nullptr;
if ( pStyleSheet )
rSet.Put( SfxTemplateItem( nSlotId, aPageStyle ) );
@@ -213,7 +213,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_UPDATE_BY_EXAMPLE:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
@@ -230,7 +230,7 @@ void ScFormatShell::GetStyleState( SfxItemSet& rSet )
case SID_STYLE_HIDE:
case SID_STYLE_SHOW:
{
- SfxPoolItem* pItem = NULL;
+ SfxPoolItem* pItem = nullptr;
pTabViewShell->GetViewFrame()->GetBindings().QueryState(SID_STYLE_FAMILY, pItem);
SfxUInt16Item* pFamilyItem = dynamic_cast<SfxUInt16Item*>(pItem);
bool bPage = pFamilyItem && SFX_STYLE_FAMILY_PAGE == SfxTemplate::NIdToSfxFamilyId(pFamilyItem->GetValue());
@@ -325,7 +325,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
ScPatternAttr aAttr( *rDoc.GetSelectionPattern( aPreviewMark ) );
if ( ScStyleSheet* pPreviewStyle = rDoc.GetPreviewCellStyle() )
aAttr.SetStyleSheet( pPreviewStyle );
- rDoc.SetPreviewCellStyle(NULL);
+ rDoc.SetPreviewCellStyle(nullptr);
SfxItemSet aItemSet( GetPool() );
@@ -348,7 +348,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
|| (nSlotId == SID_STYLE_NEW_BY_EXAMPLE)
|| (nSlotId == SID_STYLE_UPDATE_BY_EXAMPLE) )
{
- SfxStyleSheetBase* pStyleSheet = NULL;
+ SfxStyleSheetBase* pStyleSheet = nullptr;
bool bStyleToMarked = false;
bool bListAction = false;
@@ -382,10 +382,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
if (pArgs && SfxItemState::SET == pArgs->GetItemState( nSlotId, true, &pNameItem ))
aStyleName = static_cast<const SfxStringItem*>(pNameItem)->GetValue();
- const SfxPoolItem* pRefItem=NULL;
+ const SfxPoolItem* pRefItem=nullptr;
if (pArgs && SfxItemState::SET == pArgs->GetItemState( SID_STYLE_REFERENCE, true, &pRefItem ))
{
- if(pRefItem!=NULL)
+ if(pRefItem!=nullptr)
aRefName = static_cast<const SfxStringItem*>(pRefItem)->GetValue();
}
@@ -549,7 +549,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// create/replace style sheet by attributes
// at cursor position:
- const ScPatternAttr* pAttrItem = NULL;
+ const ScPatternAttr* pAttrItem = nullptr;
// The query if marked, was always wrong here,
// so now no more, and just from the cursor.
@@ -585,7 +585,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// when a new style is present and is used in the selection,
// then the parent can not be adopted:
if ( pStyleSheet && pSheetInUse && pStyleSheet == pSheetInUse )
- pSheetInUse = NULL;
+ pSheetInUse = nullptr;
// if already present, first remove ...
if ( pStyleSheet )
@@ -663,7 +663,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
{
case SID_STYLE_DELETE:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet )
{
if ( rDoc.RemovePageStyleInUse( pStyleSheet->GetName() ) )
@@ -684,7 +684,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_HIDE:
case SID_STYLE_SHOW:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet )
{
pStyleSheet->SetHidden( nSlotId == SID_STYLE_HIDE );
@@ -697,10 +697,10 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
case SID_STYLE_APPLY:
{
- nRetMask = sal_uInt16( NULL != pStyleSheet );
+ nRetMask = sal_uInt16( nullptr != pStyleSheet );
if ( pStyleSheet && !pScMod->GetIsWaterCan() )
{
- ScUndoApplyPageStyle* pUndoAction = 0;
+ ScUndoApplyPageStyle* pUndoAction = nullptr;
SCTAB nTabCount = rDoc.GetTableCount();
ScMarkData::iterator itr = rMark.begin(), itrEnd = rMark.end();
for (; itr != itrEnd && *itr < nTabCount; ++itr)
@@ -853,7 +853,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
// -> Use NULL if a modal dialog is open, to enable the Dialog's
// default parent handling.
if ( Application::IsInModalMode() )
- pParent = NULL;
+ pParent = nullptr;
else
pParent = pTabViewShell->GetDialogParent();
}
@@ -884,7 +884,7 @@ void ScFormatShell::ExecuteStyle( SfxRequest& rReq )
bool bNumFormatChanged;
if ( ScGlobal::CheckWidthInvalidate(
bNumFormatChanged, rNewSet, aOldSet ) )
- rDoc.InvalidateTextWidth( NULL, NULL, bNumFormatChanged );
+ rDoc.InvalidateTextWidth( nullptr, nullptr, bNumFormatChanged );
SCTAB nTabCount = rDoc.GetTableCount();
for (SCTAB nTab=0; nTab<nTabCount; nTab++)
@@ -1270,7 +1270,7 @@ void ScFormatShell::ExecuteAlignment( SfxRequest& rReq )
default:
if( pSet )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( pSet->GetItemState(GetPool().GetWhich(nSlot), true, &pItem ) == SfxItemState::SET )
{
@@ -1341,7 +1341,7 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
const ScPatternAttr* pAttrs = pTabViewShell->GetSelectionPattern();
const SfxItemSet* pSet = rReq.GetArgs();
sal_uInt16 nSlot = rReq.GetSlot();
- SfxAllItemSet* pNewSet = 0;
+ SfxAllItemSet* pNewSet = nullptr;
pTabViewShell->HideListBox(); // Autofilter-DropDown-Listbox
@@ -1489,9 +1489,9 @@ void ScFormatShell::ExecuteTextAttr( SfxRequest& rReq )
*/
const SfxItemSet& rAttrSet = pTabViewShell->GetSelectionPattern()->GetItemSet();
- const SfxPoolItem* pItem = NULL;
- const SvxHorJustifyItem* pHorJustify = NULL;
- const SvxVerJustifyItem* pVerJustify = NULL;
+ const SfxPoolItem* pItem = nullptr;
+ const SvxHorJustifyItem* pHorJustify = nullptr;
+ const SvxVerJustifyItem* pVerJustify = nullptr;
SvxCellHorJustify eHorJustify = SVX_HOR_JUSTIFY_STANDARD;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
@@ -1629,7 +1629,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
case SID_ATTR_CHAR_ENDPREVIEW_FONT:
{
- pDoc->SetPreviewFont(NULL);
+ pDoc->SetPreviewFont(nullptr);
pTabViewShell->UpdateSelectionArea( pDoc->GetPreviewSelection() );
break;
}
@@ -1759,7 +1759,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
::editeng::SvxBorderLine aDefLine( &aColorBlack, 20,
table::BorderLineStyle::SOLID );
pTabViewShell->SetDefaultFrameLine( &aDefLine );
- pTabViewShell->SetSelectionFrameLines( NULL, false );
+ pTabViewShell->SetSelectionFrameLines( nullptr, false );
}
}
break;
@@ -1807,7 +1807,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
Get( ATTR_BORDER );
// Evaluate border items from controller:
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( pNewAttrs->GetItemState( ATTR_BORDER, true, &pItem )
== SfxItemState::SET )
@@ -1844,8 +1844,8 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
else
{
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
- aBoxInfoItem.SetLine( NULL, SvxBoxInfoItemLine::HORI );
- aBoxInfoItem.SetLine( NULL, SvxBoxInfoItemLine::VERT );
+ aBoxInfoItem.SetLine( nullptr, SvxBoxInfoItemLine::HORI );
+ aBoxInfoItem.SetLine( nullptr, SvxBoxInfoItemLine::VERT );
pNewSet->Put( aBoxInfoItem );
}
@@ -1860,7 +1860,7 @@ void ScFormatShell::ExecuteAttr( SfxRequest& rReq )
const ScPatternAttr* pOldAttrs = pTabViewShell->GetSelectionPattern();
std::unique_ptr<SfxItemSet> pOldSet(new SfxItemSet(pOldAttrs->GetItemSet()));
std::unique_ptr<SfxItemSet> pNewSet(new SfxItemSet(pOldAttrs->GetItemSet()));
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if(SID_ATTR_BORDER_DIAG_TLBR == nSlot)
{
@@ -1977,7 +1977,7 @@ void ScFormatShell::GetAttrState( SfxItemSet& rSet )
{
// handled together because both need the cell border information for decisions
Color aCol = 0;
- editeng::SvxBorderLine aLine(0,0,0,false);
+ editeng::SvxBorderLine aLine(nullptr,0,0,false);
bool bCol = false;
bool bColDisable = false, bStyleDisable = false;
SvxBoxItem aBoxItem(ATTR_BORDER);
@@ -2201,8 +2201,8 @@ void ScFormatShell::GetTextAttrState( SfxItemSet& rSet )
// horizontal alignment
- const SvxHorJustifyItem* pHorJustify = NULL;
- const SvxVerJustifyItem* pVerJustify = NULL;
+ const SvxHorJustifyItem* pHorJustify = nullptr;
+ const SvxVerJustifyItem* pVerJustify = nullptr;
SvxCellVerJustify eVerJustify = SVX_VER_JUSTIFY_STANDARD;
sal_uInt16 nWhich = 0;
bool bJustifyStd = false;
diff --git a/sc/source/ui/view/gridwin.cxx b/sc/source/ui/view/gridwin.cxx
index 9d6639b3be99..94b0be9c5cdd 100644
--- a/sc/source/ui/view/gridwin.cxx
+++ b/sc/source/ui/view/gridwin.cxx
@@ -370,7 +370,7 @@ void ScFilterFloatingWindow::dispose()
vcl::Window* ScFilterFloatingWindow::GetPreferredKeyInputWindow()
{
// redirect keyinput in the child window
- return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : NULL; // will be the FilterBox
+ return GetWindow(GetWindowType::FirstChild) ? GetWindow(GetWindowType::FirstChild)->GetPreferredKeyInputWindow() : nullptr; // will be the FilterBox
}
static bool lcl_IsEditableMatrix( ScDocument* pDoc, const ScRange& rRange )
@@ -395,7 +395,7 @@ static void lcl_UnLockComment( ScDrawView* pView, const Point& rPos, ScViewData*
ScDocument& rDoc = *pViewData->GetDocument();
ScAddress aCellPos( pViewData->GetCurX(), pViewData->GetCurY(), pViewData->GetTabNo() );
ScPostIt* pNote = rDoc.GetNote( aCellPos );
- SdrObject* pObj = pNote ? pNote->GetCaption() : 0;
+ SdrObject* pObj = pNote ? pNote->GetCaption() : nullptr;
if( pObj && pObj->GetLogicRect().IsInside( rPos ) && ScDrawLayer::IsNoteCaption( pObj ) )
{
const ScProtectionAttr* pProtAttr = static_cast< const ScProtectionAttr* > (rDoc.GetAttr( aCellPos.Col(), aCellPos.Row(), aCellPos.Tab(), ATTR_PROTECTION ) );
@@ -454,7 +454,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
mpOODragRect(),
mpOOHeader(),
mpOOShrink(),
- mpAutoFillRect(static_cast<Rectangle*>(NULL)),
+ mpAutoFillRect(static_cast<Rectangle*>(nullptr)),
pViewData( pData ),
eWhich( eWhichPos ),
mpNoteMarker(),
@@ -468,7 +468,7 @@ ScGridWindow::ScGridWindow( vcl::Window* pParent, ScViewData* pData, ScSplitPos
nMouseStatus( SC_GM_NONE ),
nNestedButtonState( SC_NESTEDBUTTON_NONE ),
nDPField( 0 ),
- pDragDPObj( NULL ),
+ pDragDPObj( nullptr ),
nRFIndex( 0 ),
nRFAddX( 0 ),
nRFAddY( 0 ),
@@ -619,7 +619,7 @@ void ScGridWindow::ExecPageFieldSelect( SCCOL nCol, SCROW nRow, bool bHasSelecti
pDim->SetCurrentPage( &aName );
}
else
- pDim->SetCurrentPage( NULL );
+ pDim->SetCurrentPage( nullptr );
ScDPObject aNewObj( *pDPObj );
aNewObj.SetSaveData( aSaveData );
@@ -910,7 +910,7 @@ void ScGridWindow::UpdateAutoFilterFromMenu(AutoFilterMode eMode)
}
}
- pViewData->GetView()->Query(aParam, NULL, true);
+ pViewData->GetView()->Query(aParam, nullptr, true);
pDBData->SetQueryParam(aParam);
}
@@ -1514,7 +1514,7 @@ void ScGridWindow::ExecFilter( sal_uLong nSel,
pViewData->GetViewShell()->UpdateInputHandler();
}
- pViewData->GetView()->Query( aParam, NULL, true );
+ pViewData->GetView()->Query( aParam, nullptr, true );
pDBData->SetQueryParam( aParam ); // save
}
else // "Too many conditions"
@@ -2472,7 +2472,7 @@ void ScGridWindow::MouseButtonUp( const MouseEvent& rMEvt )
aBuf.append('#');
aBuf.append(aExtInfo.maTabName);
aBuf.append('.');
- OUString aRefCalcA1(aTempAddr.Format(SCA_ABS, NULL, formula::FormulaGrammar::CONV_OOO));
+ OUString aRefCalcA1(aTempAddr.Format(SCA_ABS, nullptr, formula::FormulaGrammar::CONV_OOO));
aBuf.append(aRefCalcA1);
ScGlobal::OpenURL(aBuf.makeStringAndClear(), aTarget);
}
@@ -2944,7 +2944,7 @@ static void lcl_SetTextCursorPos( ScViewData* pViewData, ScSplitPos eWhich, vcl:
{
SCCOL nCol = pViewData->GetCurX();
SCROW nRow = pViewData->GetCurY();
- Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, NULL, true );
+ Rectangle aEditArea = pViewData->GetEditArea( eWhich, nCol, nRow, pWin, nullptr, true );
aEditArea.Right() = aEditArea.Left();
aEditArea = pWin->PixelToLogic( aEditArea );
pWin->SetCursorRect( &aEditArea );
@@ -3583,7 +3583,7 @@ static bool lcl_TestScenarioRedliningDrop( ScDocument* pDoc, const ScRange& aDra
SCTAB nTab = aDragRange.aStart.Tab();
SCTAB nTabCount = pDoc->GetTableCount();
- if(pDoc->GetChangeTrack()!=NULL)
+ if(pDoc->GetChangeTrack()!=nullptr)
{
if( pDoc->IsScenario(nTab) && pDoc->HasScenarioRange(nTab, aDragRange))
{
@@ -3721,8 +3721,8 @@ sal_Int8 ScGridWindow::AcceptPrivateDrop( const AcceptDropEvent& rEvt )
Window::PointerState aState = GetPointerState();
// check for datapilot item sorting
- ScDPObject* pDPObj = NULL;
- if ( pThisDoc == pSourceDoc && ( pDPObj = pThisDoc->GetDPAtCursor( nNewDragX, nNewDragY, nTab ) ) != NULL )
+ ScDPObject* pDPObj = nullptr;
+ if ( pThisDoc == pSourceDoc && ( pDPObj = pThisDoc->GetDPAtCursor( nNewDragX, nNewDragY, nTab ) ) != nullptr )
{
// drop on DataPilot table: sort or nothing
@@ -3847,7 +3847,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
const ScDragData& rData = SC_MOD()->GetDragData();
if ( rEvt.mbLeaving )
{
- DrawMarkDropObj( NULL );
+ DrawMarkDropObj( nullptr );
if ( rData.pCellTransfer )
return AcceptPrivateDrop( rEvt ); // hide drop marker for internal D&D
else
@@ -3920,7 +3920,7 @@ sal_Int8 ScGridWindow::AcceptDrop( const AcceptDropEvent& rEvt )
}
}
if (!nRet)
- DrawMarkDropObj( NULL );
+ DrawMarkDropObj( nullptr );
if (!nRet)
{
@@ -4249,7 +4249,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
if ( nThisTab == nSourceTab )
@@ -4302,7 +4302,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
( eCmd == DEL_CELLSLEFT && nDestPosY == aSource.aStart.Row() ) )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().DeleteCells( aSource, NULL, eCmd, true /*bRecord*/, true /*bApi*/ );
+ bDone = pDocSh->GetDocFunc().DeleteCells( aSource, nullptr, eCmd, true /*bRecord*/, true /*bApi*/ );
if ( bDone )
{
if ( eCmd == DEL_CELLSUP && nDestPosY > aSource.aEnd.Row() )
@@ -4388,7 +4388,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4448,7 +4448,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
if ( meDragInsertMode != INS_NONE )
{
// call with bApi = sal_True to avoid error messages in drop handler
- bDone = pDocSh->GetDocFunc().InsertCells( aDest, NULL, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
+ bDone = pDocSh->GetDocFunc().InsertCells( aDest, nullptr, meDragInsertMode, true /*bRecord*/, true /*bApi*/, true /*bPartOfPaste*/ );
if ( bDone )
{
pDocSh->UpdateOle( pViewData );
@@ -4481,7 +4481,7 @@ sal_Int8 ScGridWindow::DropTransferObj( ScTransferObj* pTransObj, SCCOL nDestPos
sal_Int8 ScGridWindow::ExecuteDrop( const ExecuteDropEvent& rEvt )
{
- DrawMarkDropObj( NULL ); // drawing layer
+ DrawMarkDropObj( nullptr ); // drawing layer
ScModule* pScMod = SC_MOD();
const ScDragData& rData = pScMod->GetDragData();
@@ -4699,7 +4699,7 @@ void ScGridWindow::UpdateEditViewPos()
else
{
// bForceToTop = sal_True for editing
- Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, NULL, true );
+ Rectangle aPixRect = pViewData->GetEditArea( eWhich, nCol, nRow, this, nullptr, true );
Point aScrPos = PixelToLogic( aPixRect.TopLeft(), pViewData->GetLogicMode() );
Rectangle aRect = pView->GetOutputArea();
@@ -5333,10 +5333,10 @@ bool ScGridWindow::GetEditUrl( const Point& rPos,
OUString* pName, OUString* pUrl, OUString* pTarget )
{
ScTabViewShell* pViewSh = pViewData->GetViewShell();
- ScInputHandler* pInputHdl = NULL;
+ ScInputHandler* pInputHdl = nullptr;
if (pViewSh)
pInputHdl = pViewSh->GetInputHandler();
- EditView* pView = (pInputHdl && pInputHdl->IsInputMode()) ? pInputHdl->GetTableView() : NULL;
+ EditView* pView = (pInputHdl && pInputHdl->IsInputMode()) ? pInputHdl->GetTableView() : nullptr;
if (pView)
return extractURLInfo(pView->GetFieldUnderMousePointer(), pName, pUrl, pTarget);
@@ -5608,7 +5608,7 @@ bool ScGridWindow::ContinueOnlineSpelling()
return false;
ScDocument* pDoc = pViewData->GetDocument();
- ScDPCollection* pDPs = NULL;
+ ScDPCollection* pDPs = nullptr;
if (pDoc->HasPivotTable())
pDPs = pDoc->GetDPCollection();
@@ -5764,10 +5764,10 @@ void ScGridWindow::SetAutoSpellData( SCCOL nPosX, SCROW nPosY, const std::vector
const std::vector<editeng::MisspellRanges>* ScGridWindow::GetAutoSpellData( SCCOL nPosX, SCROW nPosY )
{
if (!mpSpellCheckCxt)
- return NULL;
+ return nullptr;
if (!maVisibleRange.isInside(nPosX, nPosY))
- return NULL;
+ return nullptr;
return mpSpellCheckCxt->getMisspellRanges(nPosX, nPosY);
}
@@ -5943,7 +5943,7 @@ void ScGridWindow::UpdateCopySourceOverlay()
*
* @param pLogicRects - if not 0, then don't invoke the callback, just collect the rectangles in the pointed vector.
*/
-static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = 0)
+static void updateLibreOfficeKitSelection(ScViewData* pViewData, ScDrawLayer* pDrawLayer, const std::vector<Rectangle>& rRectangles, std::vector<Rectangle>* pLogicRects = nullptr)
{
if (!pDrawLayer->isTiledRendering())
return;
diff --git a/sc/source/ui/view/gridwin2.cxx b/sc/source/ui/view/gridwin2.cxx
index cfa402f302bb..f0b07687998d 100644
--- a/sc/source/ui/view/gridwin2.cxx
+++ b/sc/source/ui/view/gridwin2.cxx
@@ -1063,7 +1063,7 @@ void ScGridWindow::PagebreakMove( const MouseEvent& rMEvt, bool bUp )
else if (!bHide)
aNewRanges = aPagebreakDrag.Format(SCA_VALID);
- pViewFunc->SetPrintRanges( rDoc.IsPrintEntireSheet( nTab ), &aNewRanges, NULL, NULL, false );
+ pViewFunc->SetPrintRanges( rDoc.IsPrintEntireSheet( nTab ), &aNewRanges, nullptr, nullptr, false );
}
}
diff --git a/sc/source/ui/view/gridwin3.cxx b/sc/source/ui/view/gridwin3.cxx
index 2937507e1e68..97d149c24f34 100644
--- a/sc/source/ui/view/gridwin3.cxx
+++ b/sc/source/ui/view/gridwin3.cxx
@@ -325,7 +325,7 @@ SdrObject* ScGridWindow::GetEditObject()
return pDrView->GetTextEditObject();
}
- return NULL;
+ return nullptr;
}
void ScGridWindow::UpdateStatusPosSize()
diff --git a/sc/source/ui/view/gridwin4.cxx b/sc/source/ui/view/gridwin4.cxx
index 51ae5fdc8397..e15cb1e1b0c1 100644
--- a/sc/source/ui/view/gridwin4.cxx
+++ b/sc/source/ui/view/gridwin4.cxx
@@ -572,7 +572,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
aOutputData.SetPagebreakMode( pViewData->GetView()->GetPageBreakData() );
}
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
bool bEditMode = pViewData->HasEditView(eWhich);
if ( bEditMode && pViewData->GetRefTabNo() == nTab )
{
@@ -630,7 +630,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
}
OutputDevice* pContentDev = &rDevice; // device for document content, used by overlay manager
- SdrPaintWindow* pTargetPaintWindow = 0; // #i74769# work with SdrPaintWindow directly
+ SdrPaintWindow* pTargetPaintWindow = nullptr; // #i74769# work with SdrPaintWindow directly
{
// init redraw
@@ -782,7 +782,7 @@ void ScGridWindow::DrawContent(OutputDevice &rDevice, const ScTableInfo& rTableI
SCTAB nTabCount = rDoc.GetTableCount();
const std::vector<ScHighlightEntry> &rHigh = pViewData->GetView()->GetHighlightRanges();
bool bHasScenario = ( nTab+1<nTabCount && rDoc.IsScenario(nTab+1) && !rDoc.IsScenario(nTab) );
- bool bHasChange = ( rDoc.GetChangeTrack() != NULL );
+ bool bHasChange = ( rDoc.GetChangeTrack() != nullptr );
if ( bHasChange || bHasScenario || !rHigh.empty() )
{
@@ -1320,7 +1320,7 @@ void ScGridWindow::DrawButtons(SCCOL nX1, SCCOL nX2, const ScTableInfo& rTabInfo
SCSIZE nArrY;
SCSIZE nQuery;
SCTAB nTab = pViewData->GetTabNo();
- ScDBData* pDBData = NULL;
+ ScDBData* pDBData = nullptr;
std::unique_ptr<ScQueryParam> pQueryParam;
RowInfo* pRowInfo = rTabInfo.mpRowInfo;
diff --git a/sc/source/ui/view/gridwin5.cxx b/sc/source/ui/view/gridwin5.cxx
index 2e044cb7e048..2d853957135f 100644
--- a/sc/source/ui/view/gridwin5.cxx
+++ b/sc/source/ui/view/gridwin5.cxx
@@ -71,9 +71,9 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
ScChangeViewSettings* pSettings = pDoc->GetChangeViewSettings();
if ( pTrack && pTrack->GetFirst() && pSettings && pSettings->ShowChanges())
{
- const ScChangeAction* pFound = NULL;
- const ScChangeAction* pFoundContent = NULL;
- const ScChangeAction* pFoundMove = NULL;
+ const ScChangeAction* pFound = nullptr;
+ const ScChangeAction* pFoundContent = nullptr;
+ const ScChangeAction* pFoundMove = nullptr;
long nModified = 0;
const ScChangeAction* pAction = pTrack->GetFirst();
while (pAction)
@@ -190,9 +190,9 @@ bool ScGridWindow::ShowNoteMarker( SCsCOL nPosX, SCsROW nPosY, bool bKeyboard )
bool bVSplit = pViewData->GetVSplitMode() != SC_SPLIT_NONE;
vcl::Window* pLeft = pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPLEFT : SC_SPLIT_BOTTOMLEFT );
- vcl::Window* pRight = bHSplit ? pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ) : 0;
- vcl::Window* pBottom = bVSplit ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMLEFT ) : 0;
- vcl::Window* pDiagonal = (bHSplit && bVSplit) ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMRIGHT ) : 0;
+ vcl::Window* pRight = bHSplit ? pViewData->GetView()->GetWindowByPos( bVSplit ? SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT ) : nullptr;
+ vcl::Window* pBottom = bVSplit ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMLEFT ) : nullptr;
+ vcl::Window* pDiagonal = (bHSplit && bVSplit) ? pViewData->GetView()->GetWindowByPos( SC_SPLIT_BOTTOMRIGHT ) : nullptr;
OSL_ENSURE( pLeft, "ScGridWindow::ShowNoteMarker - missing top-left grid window" );
/* If caption is shown from right or bottom windows, adjust
@@ -302,7 +302,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
MouseEvent aMEvt( aPosPixel, 1, MouseEventModifiers::NONE, MOUSE_LEFT );
SdrHitKind eHit = pDrView->PickAnything( aMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt );
- if ( eHit != SDRHIT_NONE && aVEvt.pObj != NULL )
+ if ( eHit != SDRHIT_NONE && aVEvt.pObj != nullptr )
{
// URL for IMapObject below Pointer is help text
if ( ScDrawLayer::GetIMapInfo( aVEvt.pObj ) )
@@ -340,14 +340,14 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
}
else
{
- SdrObject* pObj = 0;
- SdrPageView* pPV = 0;
+ SdrObject* pObj = nullptr;
+ SdrPageView* pPV = nullptr;
Point aMDPos = PixelToLogic( aPosPixel );
if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pObj, pPV, SdrSearchOptions::ALSOONMASTER) )
{
if ( pObj->IsGroupObject() )
{
- SdrObject* pHit = 0;
+ SdrObject* pHit = nullptr;
if ( pDrView->PickObj(aMDPos, pDrView->getHitTolLog(), pHit, pPV, SdrSearchOptions::DEEP ) )
pObj = pHit;
}
@@ -377,7 +377,7 @@ void ScGridWindow::RequestHelp(const HelpEvent& rHEvt)
if ( aHelpText.isEmpty() ) // Text-URL
{
OUString aUrl;
- if ( GetEditUrl( aPosPixel, NULL, &aUrl ) )
+ if ( GetEditUrl( aPosPixel, nullptr, &aUrl ) )
{
aHelpText = INetURLObject::decode( aUrl,
INetURLObject::DECODE_UNAMBIGUOUS );
diff --git a/sc/source/ui/view/imapwrap.cxx b/sc/source/ui/view/imapwrap.cxx
index 423fb2314a60..9a1ffa400291 100644
--- a/sc/source/ui/view/imapwrap.cxx
+++ b/sc/source/ui/view/imapwrap.cxx
@@ -38,7 +38,7 @@ const void* ScIMapDlgGetObj( SvxIMapDlg* pDlg )
if ( pDlg )
return pDlg->GetEditingObject();
else
- return NULL;
+ return nullptr;
}
const ImageMap& ScIMapDlgGetMap( SvxIMapDlg* pDlg )
diff --git a/sc/source/ui/view/notemark.cxx b/sc/source/ui/view/notemark.cxx
index 24ae12da2063..2af819f9094f 100644
--- a/sc/source/ui/view/notemark.cxx
+++ b/sc/source/ui/view/notemark.cxx
@@ -47,8 +47,8 @@ ScNoteMarker::ScNoteMarker( vcl::Window* pWin, vcl::Window* pRight, vcl::Window*
aMapMode( rMap ),
bLeft( bLeftEdge ),
bByKeyboard( bKeyboard ),
- pModel( NULL ),
- pObject( NULL ),
+ pModel( nullptr ),
+ pObject( nullptr ),
bVisible( false )
{
Size aSizePixel = pWindow->GetOutputSizePixel();
@@ -77,7 +77,7 @@ IMPL_LINK_NOARG_TYPED(ScNoteMarker, TimeHdl, Timer *, void)
{
SvtPathOptions aPathOpt;
OUString aPath = aPathOpt.GetPalettePath();
- pModel = new SdrModel(aPath, NULL, NULL, false, false);
+ pModel = new SdrModel(aPath, nullptr, nullptr, false, false);
pModel->SetScaleUnit(MAP_100TH_MM);
SfxItemPool& rPool = pModel->GetItemPool();
rPool.SetDefaultMetric(SFX_MAPUNIT_100TH_MM);
diff --git a/sc/source/ui/view/olinewin.cxx b/sc/source/ui/view/olinewin.cxx
index 90cc0a40a75d..e80cfd346c56 100644
--- a/sc/source/ui/view/olinewin.cxx
+++ b/sc/source/ui/view/olinewin.cxx
@@ -45,7 +45,7 @@ ScOutlineWindow::ScOutlineWindow( vcl::Window* pParent, ScOutlineMode eMode, ScV
mbHoriz( eMode == SC_OUTLINE_HOR ),
mbMirrorEntries( false ), // updated in SetHeaderSize
mbMirrorLevels( false ), // updated in SetHeaderSize
- mpSymbols( NULL ),
+ mpSymbols( nullptr ),
maLineColor( COL_BLACK ),
mnHeaderSize( 0 ),
mnHeaderPos( 0 ),
@@ -162,14 +162,14 @@ void ScOutlineWindow::InitSettings()
const ScOutlineArray* ScOutlineWindow::GetOutlineArray() const
{
const ScOutlineTable* pTable = GetDoc().GetOutlineTable( GetTab() );
- if ( !pTable ) return NULL;
+ if ( !pTable ) return nullptr;
return mbHoriz ? &pTable->GetColArray() : &pTable->GetRowArray();
}
const ScOutlineEntry* ScOutlineWindow::GetOutlineEntry( size_t nLevel, size_t nEntry ) const
{
const ScOutlineArray* pArray = GetOutlineArray();
- return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : NULL;
+ return pArray ? pArray->GetEntry( sal::static_int_cast<sal_uInt16>(nLevel), sal::static_int_cast<sal_uInt16>(nEntry) ) : nullptr;
}
bool ScOutlineWindow::IsHidden( SCCOLROW nColRowIndex ) const
@@ -304,7 +304,7 @@ bool ScOutlineWindow::GetEntryPos(
// do not cover previous collapsed image
bool bDoNoCover = !bHidden && nEntry;
- const ScOutlineEntry* pPrevEntry = bDoNoCover ? GetOutlineEntry(nLevel, nEntry - 1) : NULL;
+ const ScOutlineEntry* pPrevEntry = bDoNoCover ? GetOutlineEntry(nLevel, nEntry - 1) : nullptr;
if (pPrevEntry)
{
SCCOLROW nPrevEnd = pPrevEntry->GetEnd();
diff --git a/sc/source/ui/view/output.cxx b/sc/source/ui/view/output.cxx
index 83c879875e21..12970ceb0dee 100644
--- a/sc/source/ui/view/output.cxx
+++ b/sc/source/ui/view/output.cxx
@@ -163,9 +163,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
eType( eNewType ),
mnPPTX( nPixelPerTwipsX ),
mnPPTY( nPixelPerTwipsY ),
- pEditObj( NULL ),
- pViewShell( NULL ),
- pDrawView( NULL ),
+ pEditObj( nullptr ),
+ pViewShell( nullptr ),
+ pDrawView( nullptr ),
bEditMode( false ),
nEditCol( 0 ),
nEditRow( 0 ),
@@ -176,9 +176,9 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
mbUseStyleColor( false ),
mbForceAutoColor( SC_MOD()->GetAccessOptions().GetIsAutomaticFontColor() ),
mbSyntaxMode( false ),
- pValueColor( NULL ),
- pTextColor( NULL ),
- pFormulaColor( NULL ),
+ pValueColor( nullptr ),
+ pTextColor( nullptr ),
+ pFormulaColor( nullptr ),
aGridColor( COL_BLACK ),
mbShowNullValues( true ),
mbShowFormulas( false ),
@@ -187,8 +187,8 @@ ScOutputData::ScOutputData( OutputDevice* pNewDev, ScOutputType eNewType,
bSnapPixel( false ),
bAnyRotated( false ),
bAnyClipped( false ),
- mpTargetPaintWindow(NULL), // #i74769# use SdrPaintWindow direct
- mpSpellCheckCxt(NULL)
+ mpTargetPaintWindow(nullptr), // #i74769# use SdrPaintWindow direct
+ mpSpellCheckCxt(nullptr)
{
if (pZoomX)
aZoomX = *pZoomX;
@@ -494,7 +494,7 @@ void ScOutputData::DrawGrid(vcl::RenderContext& rRenderContext, bool bGrid, bool
for (SCROW i = nYplus1; i <= MAXROW; ++i)
{
if (i > nHiddenEndRow)
- bHiddenRow = mpDoc->RowHidden(i, nTab, NULL, &nHiddenEndRow);
+ bHiddenRow = mpDoc->RowHidden(i, nTab, nullptr, &nHiddenEndRow);
/* TODO: optimize the row break thing for large hidden
* segments where HasRowBreak() has to be called
* nevertheless for each row, as a row break is drawn also
@@ -944,23 +944,23 @@ void drawCells(vcl::RenderContext& rRenderContext, const Color* pColor, const Sv
if (!pOldColor || *pOldColor != *pColor)
pOldColor = pColor;
- pOldBackground = NULL;
+ pOldBackground = nullptr;
}
else if(pBackground)
{
pOldBackground = pBackground;
- pOldColor = NULL;
+ pOldColor = nullptr;
}
if(pDataBarInfo)
pOldDataBarInfo = pDataBarInfo;
else
- pOldDataBarInfo = NULL;
+ pOldDataBarInfo = nullptr;
if(pIconSetInfo)
pOldIconSetInfo = pIconSetInfo;
else
- pOldIconSetInfo = NULL;
+ pOldIconSetInfo = nullptr;
}
}
@@ -1031,11 +1031,11 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
aRect = rRenderContext.PixelToLogic(aRect); // internal data in pixels, but we'll be drawing in logic units
- const SvxBrushItem* pOldBackground = NULL;
+ const SvxBrushItem* pOldBackground = nullptr;
const SvxBrushItem* pBackground;
- const Color* pOldColor = NULL;
- const ScDataBarInfo* pOldDataBarInfo = NULL;
- const ScIconSetInfo* pOldIconSetInfo = NULL;
+ const Color* pOldColor = nullptr;
+ const ScDataBarInfo* pOldDataBarInfo = nullptr;
+ const ScIconSetInfo* pOldIconSetInfo = nullptr;
SCCOL nMergedCells = 1;
SCCOL nOldMerged = 0;
@@ -1063,7 +1063,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
pBackground = ScGlobal::GetEmptyBrushItem();
}
else
- pBackground = NULL;
+ pBackground = nullptr;
}
else
pBackground = pInfo->pBackground;
@@ -1111,7 +1111,7 @@ void ScOutputData::DrawBackground(vcl::RenderContext& rRenderContext)
if (bWorksInPixels)
nPosXLogic = rRenderContext.PixelToLogic(Point(nPosX, 0)).X();
- drawCells(rRenderContext, NULL, NULL, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, NULL, pOldDataBarInfo, NULL, pOldIconSetInfo);
+ drawCells(rRenderContext, nullptr, nullptr, pOldColor, pOldBackground, aRect, nPosXLogic, nLayoutSign, nOneXLogic, nOneYLogic, nullptr, pOldDataBarInfo, nullptr, pOldIconSetInfo);
nArrY += nSkip;
}
@@ -1358,7 +1358,7 @@ void ScOutputData::DrawFrame(vcl::RenderContext& rRenderContext)
bUseSingleColor = true;
}
- const Color* pForceColor = bUseSingleColor ? &aSingleColor : 0;
+ const Color* pForceColor = bUseSingleColor ? &aSingleColor : nullptr;
if (bAnyRotated)
DrawRotatedFrame(rRenderContext, pForceColor); // removes the lines that must not be painted here
@@ -1454,7 +1454,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
bool bTopLine )
{
if ( nRotDir != SC_ROTDIR_LEFT && nRotDir != SC_ROTDIR_RIGHT )
- return NULL;
+ return nullptr;
bool bFound = false;
while (!bFound)
@@ -1465,7 +1465,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( nCol < MAXCOL )
++nCol;
else
- return NULL; // couldn't find it
+ return nullptr; // couldn't find it
}
else
{
@@ -1473,7 +1473,7 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( nCol > 0 )
--nCol;
else
- return NULL; // couldn't find it
+ return nullptr; // couldn't find it
}
const ScPatternAttr* pPattern = pDoc->GetPattern( nCol, nRow, nTab );
const SfxItemSet* pCondSet = pDoc->GetCondResult( nCol, nRow, nTab );
@@ -1489,12 +1489,12 @@ static const ::editeng::SvxBorderLine* lcl_FindHorLine( ScDocument* pDoc,
if ( ValidRow(nRow) )
pThisBottom = static_cast<const SvxBoxItem*>(pDoc->GetAttr( nCol, nRow, nTab, ATTR_BORDER ))->GetBottom();
else
- pThisBottom = NULL;
+ pThisBottom = nullptr;
const ::editeng::SvxBorderLine* pNextTop;
if ( nRow < MAXROW )
pNextTop = static_cast<const SvxBoxItem*>(pDoc->GetAttr( nCol, nRow+1, nTab, ATTR_BORDER ))->GetTop();
else
- pNextTop = NULL;
+ pNextTop = nullptr;
if ( ScHasPriority( pThisBottom, pNextTop ) )
return pThisBottom;
@@ -1863,7 +1863,7 @@ drawinglayer::processor2d::BaseProcessor2D* ScOutputData::CreateProcessor2D( )
mpDoc->InitDrawLayer(mpDoc->GetDocumentShell());
ScDrawLayer* pDrawLayer = mpDoc->GetDrawLayer();
if (!pDrawLayer)
- return NULL;
+ return nullptr;
basegfx::B2DRange aViewRange;
SdrPage *pDrawPage = pDrawLayer->GetPage( static_cast< sal_uInt16 >( nTab ) );
diff --git a/sc/source/ui/view/output2.cxx b/sc/source/ui/view/output2.cxx
index d40483a16624..e6f57ddf58b6 100644
--- a/sc/source/ui/view/output2.cxx
+++ b/sc/source/ui/view/output2.cxx
@@ -184,15 +184,15 @@ private:
ScDrawStringsVars::ScDrawStringsVars(ScOutputData* pData, bool bPTL) :
pOutput ( pData ),
- pPattern ( NULL ),
- pCondSet ( NULL ),
+ pPattern ( nullptr ),
+ pCondSet ( nullptr ),
nAscentPixel(0),
eAttrOrient ( SVX_ORIENTATION_STANDARD ),
eAttrHorJust( SVX_HOR_JUSTIFY_STANDARD ),
eAttrVerJust( SVX_VER_JUSTIFY_BOTTOM ),
eAttrHorJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
eAttrVerJustMethod( SVX_JUSTIFY_METHOD_AUTO ),
- pMargin ( NULL ),
+ pMargin ( nullptr ),
nIndent ( 0 ),
bRotated ( false ),
nOriginalWidth( 0 ),
@@ -311,7 +311,7 @@ void ScDrawStringsVars::SetPattern(
eColorMode = SC_AUTOCOL_PRINT;
if ( bPixelToLogic )
- pPattern->GetFont( aFont, eColorMode, pFmtDevice, NULL, pCondSet, nScript,
+ pPattern->GetFont( aFont, eColorMode, pFmtDevice, nullptr, pCondSet, nScript,
&aBackConfigColor, &aTextConfigColor );
else
pPattern->GetFont( aFont, eColorMode, pFmtDevice, &pOutput->aZoomY, pCondSet, nScript,
@@ -1110,7 +1110,7 @@ bool ScOutputData::IsEmptyCellText( RowInfo* pThisRowInfo, SCCOL nX, SCROW nY )
void ScOutputData::GetVisibleCell( SCCOL nCol, SCROW nRow, SCTAB nTabP, ScRefCellValue& rCell )
{
rCell.assign(*mpDoc, ScAddress(nCol, nRow, nTabP));
- if (!rCell.isEmpty() && IsEmptyCellText(NULL, nCol, nRow))
+ if (!rCell.isEmpty() && IsEmptyCellText(nullptr, nCol, nRow))
rCell.clear();
}
@@ -1121,7 +1121,7 @@ bool ScOutputData::IsAvailable( SCCOL nX, SCROW nY )
// where a note is empty as well as a cell that's hidden by protection settings
ScRefCellValue aCell(*mpDoc, ScAddress(nX, nY, nTab));
- if (!aCell.isEmpty() && !IsEmptyCellText(NULL, nX, nY))
+ if (!aCell.isEmpty() && !IsEmptyCellText(nullptr, nX, nY))
return false;
const ScPatternAttr* pPattern = mpDoc->GetPattern( nX, nY, nTab );
@@ -1463,10 +1463,10 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
OutputAreaParam aAreaParam;
bool bCellIsValue = false;
long nNeededWidth = 0;
- const ScPatternAttr* pPattern = NULL;
- const SfxItemSet* pCondSet = NULL;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const SfxItemSet* pCondSet = nullptr;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
SvtScriptType nOldScript = SvtScriptType::NONE;
// alternative pattern instances in case we need to modify the pattern
@@ -1679,7 +1679,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
if ( bFormulaCell )
lcl_CreateInterpretProgress(bProgress, mpDoc, aCell.mpFormula);
if ( aVars.SetText(aCell) )
- pOldPattern = NULL;
+ pOldPattern = nullptr;
bNeedEdit = aVars.HasEditCharacters() || (bFormulaCell && aCell.mpFormula->IsMultilineResult());
}
long nTotalMargin = 0;
@@ -1758,7 +1758,7 @@ Rectangle ScOutputData::LayoutStrings(bool bPixelToLogic, bool bPaint, const ScA
aAreaParam.mnLeftClipLength = aAreaParam.mnRightClipLength = 0;
}
- pOldPattern = NULL;
+ pOldPattern = nullptr;
}
}
}
@@ -2335,15 +2335,15 @@ ScOutputData::DrawEditParam::DrawEditParam(const ScPatternAttr* pPattern, const
mbAsianVertical(false),
mbPixelToLogic(false),
mbHyphenatorSet(false),
- mpEngine(NULL),
+ mpEngine(nullptr),
mpPattern(pPattern),
mpCondSet(pCondSet),
- mpPreviewFontSet(NULL),
- mpOldPattern(NULL),
- mpOldCondSet(NULL),
- mpOldPreviewFontSet(NULL),
- mpThisRowInfo(NULL),
- mpMisspellRanges(NULL)
+ mpPreviewFontSet(nullptr),
+ mpOldPattern(nullptr),
+ mpOldCondSet(nullptr),
+ mpOldPreviewFontSet(nullptr),
+ mpThisRowInfo(nullptr),
+ mpMisspellRanges(nullptr)
{}
bool ScOutputData::DrawEditParam::readCellContent(
@@ -3035,7 +3035,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -3087,7 +3087,7 @@ void ScOutputData::DrawEditStandard(DrawEditParam& rParam)
// horizontal alignment
if (rParam.adjustHorAlignment(rParam.mpEngine))
// reset adjustment for the next cell
- rParam.mpOldPattern = NULL;
+ rParam.mpOldPattern = nullptr;
}
if (rParam.meVerJust==SVX_VER_JUSTIFY_BOTTOM ||
@@ -3165,7 +3165,7 @@ void ScOutputData::ShowClipMarks( DrawEditParam& rParam, long nEngineHeight, con
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4009,7 +4009,7 @@ void ScOutputData::DrawEditStacked(DrawEditParam& rParam)
rParam.mbBreak && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4356,7 +4356,7 @@ void ScOutputData::DrawEditAsianVertical(DrawEditParam& rParam)
!rParam.mbAsianVertical && bMarkClipped &&
( rParam.mpEngine->GetParagraphCount() > 1 || rParam.mpEngine->GetLineCount(0) > 1 ) )
{
- CellInfo* pClipMarkCell = NULL;
+ CellInfo* pClipMarkCell = nullptr;
if ( bMerged )
{
// anywhere in the merged area...
@@ -4450,9 +4450,9 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
{
std::unique_ptr<ScFieldEditEngine> pEngine;
bool bHyphenatorSet = false;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
- const SfxItemSet* pOldPreviewFontSet = NULL;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
+ const SfxItemSet* pOldPreviewFontSet = nullptr;
ScRefCellValue aCell;
long nInitPosX = nScrX;
@@ -4530,8 +4530,8 @@ void ScOutputData::DrawEdit(bool bPixelToLogic)
if ( bDoCell && bEditMode && nCellX == nEditCol && nCellY == nEditRow )
bDoCell = false;
- const ScPatternAttr* pPattern = NULL;
- const SfxItemSet* pCondSet = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const SfxItemSet* pCondSet = nullptr;
if (bDoCell)
{
if ( nCellY == nY && nCellX >= nX1 && nCellX <= nX2 &&
@@ -4654,8 +4654,8 @@ void ScOutputData::DrawRotated(bool bPixelToLogic)
bool bHyphenatorSet = false;
const ScPatternAttr* pPattern;
const SfxItemSet* pCondSet;
- const ScPatternAttr* pOldPattern = NULL;
- const SfxItemSet* pOldCondSet = NULL;
+ const ScPatternAttr* pOldPattern = nullptr;
+ const SfxItemSet* pOldCondSet = nullptr;
ScRefCellValue aCell;
long nInitPosX = nScrX;
diff --git a/sc/source/ui/view/output3.cxx b/sc/source/ui/view/output3.cxx
index 496cc5adfa65..42eeeace7160 100644
--- a/sc/source/ui/view/output3.cxx
+++ b/sc/source/ui/view/output3.cxx
@@ -119,7 +119,7 @@ void ScOutputData::PostPrintDrawingLayer(const Point& rMMOffset) // #i74768#
{
// #i74769# work with SdrPaintWindow directly
pLocalDrawView->EndDrawLayers(*mpTargetPaintWindow, true);
- mpTargetPaintWindow = 0;
+ mpTargetPaintWindow = nullptr;
}
}
diff --git a/sc/source/ui/view/pfuncache.cxx b/sc/source/ui/view/pfuncache.cxx
index 556cd2f42935..4c4024d187f9 100644
--- a/sc/source/ui/view/pfuncache.cxx
+++ b/sc/source/ui/view/pfuncache.cxx
@@ -40,7 +40,7 @@ ScPrintFuncCache::ScPrintFuncCache( ScDocShell* pD, const ScMarkData& rMark,
SfxPrinter* pPrinter = pDocSh->GetPrinter();
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aRange );
@@ -84,7 +84,7 @@ void ScPrintFuncCache::InitLocations( const ScMarkData& rMark, OutputDevice* pDe
return; // initialize only once
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( rMark.IsMarked() )
{
rMark.GetMarkArea( aRange );
diff --git a/sc/source/ui/view/preview.cxx b/sc/source/ui/view/preview.cxx
index d1f4a3f2baf8..a2cc775db2a7 100644
--- a/sc/source/ui/view/preview.cxx
+++ b/sc/source/ui/view/preview.cxx
@@ -98,8 +98,8 @@ ScPreview::ScPreview( vcl::Window* pParent, ScDocShell* pDocSh, ScPreviewShell*
aDate( Date::SYSTEM ),
aTime( tools::Time::SYSTEM ),
nTotalPages( 0 ),
- pLocationData( NULL ),
- pDrawView( NULL ),
+ pLocationData( nullptr ),
+ pDrawView( nullptr ),
pDocShell( pDocSh ),
pViewShell( pViewSh ),
bInGetState( false ),
@@ -165,7 +165,7 @@ void ScPreview::UpdateDrawView() // nTab must be right
{
// convert the displayed Page of drawView (see below) does not work?!?
delete pDrawView;
- pDrawView = NULL;
+ pDrawView = nullptr;
}
if ( !pDrawView ) // New Drawing?
@@ -182,7 +182,7 @@ void ScPreview::UpdateDrawView() // nTab must be right
else if ( pDrawView )
{
delete pDrawView; // for this Chart is not needed
- pDrawView = NULL;
+ pDrawView = nullptr;
}
}
@@ -264,7 +264,7 @@ void ScPreview::CalcPages()
long nAttrPage = i > 0 ? nFirstAttr[i-1] : 1;
long nThisStart = nTotalPages;
- ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, NULL, &aOptions );
+ ScPrintFunc aPrintFunc( this, pDocShell, i, nAttrPage, 0, nullptr, &aOptions );
long nThisTab = aPrintFunc.GetTotalPages();
if (!aPrintFunc.HasPrintRange())
mbHasEmptyRangeTable = true;
@@ -353,7 +353,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
Fraction aHorPrevZoom( (long)( 100 * nZoom / pDocShell->GetOutputFactor() ), 10000 );
MapMode aMMMode( MAP_100TH_MM, Point(), aHorPrevZoom, aPreviewZoom );
- bool bDoPrint = ( pFillLocation == NULL );
+ bool bDoPrint = ( pFillLocation == nullptr );
bool bValidPage = ( nPageNo < nTotalPages );
ScModule* pScMod = SC_MOD();
@@ -392,7 +392,7 @@ void ScPreview::DoPrint( ScPreviewLocationData* pFillLocation )
if (bStateValid)
pPrintFunc = new ScPrintFunc( this, pDocShell, aState, &aOptions );
else
- pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
+ pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions );
pPrintFunc->SetOffset(aOffset);
pPrintFunc->SetManualZoom(nZoom);
@@ -630,7 +630,7 @@ void ScPreview::Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle&
if (bPageMargin)
GetLocationData(); // fill location data for column positions
- DoPrint( NULL );
+ DoPrint( nullptr );
pViewShell->UpdateScrollBars();
bInPaint = bWasInPaint;
@@ -897,7 +897,7 @@ void ScPreview::DoInvalidate()
// The Invalidate must come behind asynchronously
if (bInGetState)
- Application::PostUserEvent( LINK( this, ScPreview, InvalidateHdl ), NULL, true );
+ Application::PostUserEvent( LINK( this, ScPreview, InvalidateHdl ), nullptr, true );
else
StaticInvalidate(); // Immediately
}
@@ -1185,7 +1185,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
}
else if( bHeaderRulerMove && bHeaderRulerChange )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if ( rStyleSet.GetItemState( ATTR_PAGE_HEADERSET, false, &pItem ) == SfxItemState::SET )
{
const SfxItemSet& pHeaderSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
@@ -1200,7 +1200,7 @@ void ScPreview::MouseButtonUp( const MouseEvent& rMEvt )
}
else if( bFooterRulerMove && bFooterRulerChange )
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
if( rStyleSet.GetItemState( ATTR_PAGE_FOOTERSET, false, &pItem ) == SfxItemState::SET )
{
const SfxItemSet& pFooterSet = static_cast<const SvxSetItem*>(pItem)->GetItemSet();
@@ -1318,7 +1318,7 @@ void ScPreview::MouseMove( const MouseEvent& rMEvt )
if (bStateValid)
pPrintFunc = new ScPrintFunc( this, pDocShell, aState, &aOptions );
else
- pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, NULL, &aOptions );
+ pPrintFunc = new ScPrintFunc( this, pDocShell, nTab, nFirstAttr[nTab], nTotalPages, nullptr, &aOptions );
nLeftMargin = (long)( pPrintFunc->GetLeftMargin() * HMM_PER_TWIPS - aOffset.X() );
nRightMargin = (long)( pPrintFunc->GetRightMargin() * HMM_PER_TWIPS );
diff --git a/sc/source/ui/view/prevloc.cxx b/sc/source/ui/view/prevloc.cxx
index b0e407c223e0..aa65184d4aca 100644
--- a/sc/source/ui/view/prevloc.cxx
+++ b/sc/source/ui/view/prevloc.cxx
@@ -60,8 +60,8 @@ ScPreviewTableInfo::ScPreviewTableInfo() :
nTab(0),
nCols(0),
nRows(0),
- pColInfo(NULL),
- pRowInfo(NULL)
+ pColInfo(nullptr),
+ pRowInfo(nullptr)
{
}
@@ -115,7 +115,7 @@ void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea )
SetColInfo( nNewCount, pNewInfo );
}
else
- SetColInfo( 0, NULL ); // all invisible
+ SetColInfo( 0, nullptr ); // all invisible
}
}
@@ -142,7 +142,7 @@ void ScPreviewTableInfo::LimitToArea( const Rectangle& rPixelArea )
SetRowInfo( nNewCount, pNewInfo );
}
else
- SetRowInfo( 0, NULL ); // all invisible
+ SetRowInfo( 0, nullptr ); // all invisible
}
}
}
@@ -276,7 +276,7 @@ static ScPreviewLocationEntry* lcl_GetEntryByAddress(
return it.get();
}
- return NULL;
+ return nullptr;
}
Rectangle ScPreviewLocationData::GetOffsetPixel( const ScAddress& rCellPos, const ScRange& rRange ) const
@@ -592,7 +592,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
rInfo.SetColInfo( nColCount, pColInfo );
}
else
- rInfo.SetColInfo( 0, NULL );
+ rInfo.SetColInfo( 0, nullptr );
// get row info
@@ -659,7 +659,7 @@ void ScPreviewLocationData::GetTableInfo( const Rectangle& rVisiblePixel, ScPrev
rInfo.SetRowInfo( nRowCount, pRowInfo );
}
else
- rInfo.SetRowInfo( 0, NULL );
+ rInfo.SetRowInfo( 0, nullptr );
// limit to visible area
diff --git a/sc/source/ui/view/prevwsh.cxx b/sc/source/ui/view/prevwsh.cxx
index b31044a42176..73b90360f6de 100644
--- a/sc/source/ui/view/prevwsh.cxx
+++ b/sc/source/ui/view/prevwsh.cxx
@@ -151,10 +151,10 @@ ScPreviewShell::ScPreviewShell( SfxViewFrame* pViewFrame,
SfxViewShell* pOldSh ) :
SfxViewShell( pViewFrame, SfxViewShellFlags::CAN_PRINT | SfxViewShellFlags::HAS_PRINTOPTIONS ),
pDocShell( static_cast<ScDocShell*>(pViewFrame->GetObjectShell()) ),
- mpFrameWindow(NULL),
+ mpFrameWindow(nullptr),
nSourceDesignMode( TRISTATE_INDET ),
nMaxVertPos(0),
- pAccessibilityBroadcaster( NULL )
+ pAccessibilityBroadcaster( nullptr )
{
Construct( &pViewFrame->GetWindow() );
@@ -196,7 +196,7 @@ ScPreviewShell::~ScPreviewShell()
EndListening(*SfxGetpApp());
EndListening(*pDocShell);
- SetWindow(0);
+ SetWindow(nullptr);
pPreview.disposeAndClear();
pHorScroll.disposeAndClear();
pVerScroll.disposeAndClear();
@@ -550,7 +550,7 @@ void ScPreviewShell::Activate(bool bMDI)
// InputHdl is now mostly Null, no moreasssertion!
ScInputHandler* pInputHdl = SC_MOD()->GetInputHdl();
if ( pInputHdl )
- pInputHdl->NotifyChange( NULL );
+ pInputHdl->NotifyChange( nullptr );
}
}
@@ -645,7 +645,7 @@ void ScPreviewShell::Execute( SfxRequest& rReq )
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
if(pFact)
{
- std::unique_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(NULL, aSet));
+ std::unique_ptr<AbstractSvxZoomDialog> pDlg(pFact->CreateSvxZoomDialog(nullptr, aSet));
OSL_ENSURE(pDlg, "Dialog creation failed!");
pDlg->SetLimits( 20, 400 );
pDlg->HideButton( ZoomButtonId::OPTIMAL );
diff --git a/sc/source/ui/view/printfun.cxx b/sc/source/ui/view/printfun.cxx
index 8512061f164e..ac16552460d1 100644
--- a/sc/source/ui/view/printfun.cxx
+++ b/sc/source/ui/view/printfun.cxx
@@ -90,7 +90,7 @@ ScPageRowEntry::ScPageRowEntry(const ScPageRowEntry& r)
memcpy( pHidden, r.pHidden, nPagesX * sizeof(bool) );
}
else
- pHidden = NULL;
+ pHidden = nullptr;
}
const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
@@ -106,7 +106,7 @@ const ScPageRowEntry& ScPageRowEntry::operator=(const ScPageRowEntry& r)
memcpy( pHidden, r.pHidden, nPagesX * sizeof(bool) );
}
else
- pHidden = NULL;
+ pHidden = nullptr;
return *this;
}
@@ -117,7 +117,7 @@ void ScPageRowEntry::SetPagesX(size_t nNew)
{
OSL_FAIL("SetPagesX nicht nach SetHidden");
delete[] pHidden;
- pHidden = NULL;
+ pHidden = nullptr;
}
nPagesX = nNew;
}
@@ -177,12 +177,12 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
// else, EditEngine outputs different text heights
pDev->SetMapMode(MAP_PIXEL);
- pBorderItem = NULL;
- pBackgroundItem = NULL;
- pShadowItem = NULL;
+ pBorderItem = nullptr;
+ pBackgroundItem = nullptr;
+ pShadowItem = nullptr;
- pEditEngine = NULL;
- pEditDefaults = NULL;
+ pEditEngine = nullptr;
+ pEditDefaults = nullptr;
ScStyleSheetPool* pStylePool = pDoc->GetStyleSheetPool();
SfxStyleSheetBase* pStyleSheet = pStylePool->Find(
@@ -193,7 +193,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
else
{
OSL_FAIL("Seitenvorlage nicht gefunden" );
- pParamSet = NULL;
+ pParamSet = nullptr;
}
if (!bState)
@@ -205,7 +205,7 @@ void ScPrintFunc::Construct( const ScPrintOptions* pOptions )
InitParam(pOptions);
- pPageData = NULL; // is only needed for initialisation
+ pPageData = nullptr; // is only needed for initialisation
}
ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTab,
@@ -214,7 +214,7 @@ ScPrintFunc::ScPrintFunc( ScDocShell* pShell, SfxPrinter* pNewPrinter, SCTAB nTa
ScPageBreakData* pData )
: pDocShell ( pShell ),
pPrinter ( pNewPrinter ),
- pDrawView ( NULL ),
+ pDrawView ( nullptr ),
nPrintTab ( nTab ),
nPageStart ( nPage ),
nDocPages ( nDocP ),
@@ -240,8 +240,8 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
long nPage, long nDocP, const ScRange* pArea,
const ScPrintOptions* pOptions )
: pDocShell ( pShell ),
- pPrinter ( NULL ),
- pDrawView ( NULL ),
+ pPrinter ( nullptr ),
+ pDrawView ( nullptr ),
nPrintTab ( nTab ),
nPageStart ( nPage ),
nDocPages ( nDocP ),
@@ -256,7 +256,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
nPagesX(0),
nPagesY(0),
nTotalY(0),
- pPageData ( NULL )
+ pPageData ( nullptr )
{
pDev = pOutDev;
Construct( pOptions );
@@ -265,9 +265,9 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell, SCTAB nTab,
ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
const ScPrintState& rState, const ScPrintOptions* pOptions )
: pDocShell ( pShell ),
- pPrinter ( NULL ),
- pDrawView ( NULL ),
- pUserArea ( NULL ),
+ pPrinter ( nullptr ),
+ pDrawView ( nullptr ),
+ pUserArea ( nullptr ),
bSourceRangeValid ( false ),
bPrintCurrentTable ( false ),
bMultiArea ( false ),
@@ -275,7 +275,7 @@ ScPrintFunc::ScPrintFunc( OutputDevice* pOutDev, ScDocShell* pShell,
nPagesX(0),
nPagesY(0),
nTotalY(0),
- pPageData ( NULL )
+ pPageData ( nullptr )
{
pDev = pOutDev;
@@ -596,12 +596,12 @@ static void lcl_FillHFParam( ScPrintHFParam& rParam, const SfxItemSet* pHFSet )
{
// nDistance must be initialized differently before
- if ( pHFSet == NULL )
+ if ( pHFSet == nullptr )
{
rParam.bEnable = false;
- rParam.pBorder = NULL;
- rParam.pBack = NULL;
- rParam.pShadow = NULL;
+ rParam.pBorder = nullptr;
+ rParam.pBack = nullptr;
+ rParam.pShadow = nullptr;
}
else
{
@@ -823,7 +823,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aHdr.pRight = static_cast<const ScPageHFItem*>( &pParamSet->Get(ATTR_PAGE_HEADERRIGHT) );
const SvxSetItem* pHeaderSetItem;
- const SfxItemSet* pHeaderSet = NULL;
+ const SfxItemSet* pHeaderSet = nullptr;
if ( pParamSet->GetItemState( ATTR_PAGE_HEADERSET, false,
reinterpret_cast<const SfxPoolItem**>(&pHeaderSetItem) ) == SfxItemState::SET )
{
@@ -839,7 +839,7 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
aFtr.pRight = static_cast<const ScPageHFItem*>( &pParamSet->Get(ATTR_PAGE_FOOTERRIGHT) );
const SvxSetItem* pFooterSetItem;
- const SfxItemSet* pFooterSet = NULL;
+ const SfxItemSet* pFooterSet = nullptr;
if ( pParamSet->GetItemState( ATTR_PAGE_FOOTERSET, false,
reinterpret_cast<const SfxPoolItem**>(&pFooterSetItem) ) == SfxItemState::SET )
{
@@ -853,9 +853,9 @@ void ScPrintFunc::InitParam( const ScPrintOptions* pOptions )
// TabPage "Table"
- const SfxUInt16Item* pScaleItem = NULL;
- const ScPageScaleToItem* pScaleToItem = NULL;
- const SfxUInt16Item* pScaleToPagesItem = NULL;
+ const SfxUInt16Item* pScaleItem = nullptr;
+ const ScPageScaleToItem* pScaleToItem = nullptr;
+ const SfxUInt16Item* pScaleToPagesItem = nullptr;
SfxItemState eState;
eState = pParamSet->GetItemState( ATTR_PAGE_SCALE, false,
@@ -1187,7 +1187,7 @@ static void lcl_DrawGraphic( const SvxBrushItem &rBrush, vcl::RenderContext *pOu
const double Abitmap( k1/k2 * aSize.Width()*aSize.Height() );
aObject.DrawTiled( pOut, rOrg, aGrfSize, Size(0,0),
- NULL, GraphicManagerDrawFlags::STANDARD,
+ nullptr, GraphicManagerDrawFlags::STANDARD,
::std::max( 128, static_cast<int>( sqrt(sqrt( Abitmap)) + .5 ) ) );
}
else
@@ -1223,7 +1223,7 @@ void ScPrintFunc::DrawBorder( long nScrX, long nScrY, long nScrW, long nScrH,
if (pBorderData)
if ( !pBorderData->GetTop() && !pBorderData->GetBottom() && !pBorderData->GetLeft() &&
!pBorderData->GetRight() )
- pBorderData = NULL;
+ pBorderData = nullptr;
if (!pBorderData && !pBackground && !pShadow)
return; // nothing to do
@@ -2522,7 +2522,7 @@ long ScPrintFunc::CountNotePages()
long nNoteAdd;
do
{
- nNoteAdd = PrintNotes( nPages, nNoteNr, false, NULL );
+ nNoteAdd = PrintNotes( nPages, nNoteNr, false, nullptr );
if (nNoteAdd)
{
nNoteNr += nNoteAdd;
@@ -2705,7 +2705,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
{
bool bPageSelected = rPageRanges.IsSelected( nPageNo+nStartPage+1 );
nNoteAdd = PrintNotes( nPageNo+nStartPage, nNoteNr, bDoPrint && bPageSelected,
- ( bPageSelected ? pLocationData : NULL ) );
+ ( bPageSelected ? pLocationData : nullptr ) );
if ( nNoteAdd )
{
nNoteNr += nNoteAdd;
@@ -2731,7 +2731,7 @@ long ScPrintFunc::DoPrint( const MultiSelection& rPageRanges,
void ScPrintFunc::CalcZoom( sal_uInt16 nRangeNo ) // calculate zoom
{
sal_uInt16 nRCount = pDoc->GetPrintRangeCount( nPrintTab );
- const ScRange* pThisRange = NULL;
+ const ScRange* pThisRange = nullptr;
if ( nRangeNo != RANGENO_NORANGE || nRangeNo < nRCount )
pThisRange = pDoc->GetPrintRange( nPrintTab, nRangeNo );
if ( pThisRange )
@@ -3069,7 +3069,7 @@ void ScPrintFunc::CalcPages() // calculates aPageRect and pages fr
}
SCROW nLastRow = -1;
- if (!pDoc->RowHidden(nRow, nPrintTab, NULL, &nLastRow))
+ if (!pDoc->RowHidden(nRow, nPrintTab, nullptr, &nLastRow))
{
bVisRow = true;
nLastVisibleRow = nLastRow;
diff --git a/sc/source/ui/view/reffact.cxx b/sc/source/ui/view/reffact.cxx
index 4c986dd94f2f..565d989d9ba1 100644
--- a/sc/source/ui/view/reffact.cxx
+++ b/sc/source/ui/view/reffact.cxx
@@ -140,7 +140,7 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP,
: SfxChildWindow(pParentP, nId)
{
- ScTabViewShell* pViewShell = NULL;
+ ScTabViewShell* pViewShell = nullptr;
SfxDispatcher* pDisp = p->GetDispatcher();
if ( pDisp )
{
@@ -151,14 +151,14 @@ ScSimpleRefDlgWrapper::ScSimpleRefDlgWrapper( vcl::Window* pParentP,
OSL_ENSURE( pViewShell, "missing view shell :-(" );
- if(pInfo!=NULL && bScSimpleRefFlag)
+ if(pInfo!=nullptr && bScSimpleRefFlag)
{
pInfo->aPos.X()=nScSimpleRefX;
pInfo->aPos.Y()=nScSimpleRefY;
pInfo->aSize.Height()=nScSimpleRefHeight;
pInfo->aSize.Width()=nScSimpleRefWidth;
}
- SetWindow(NULL);
+ SetWindow(nullptr);
if(bAutoReOpen && pViewShell)
SetWindow( pViewShell->CreateRefDialog( p, this, pInfo, pParentP, WID_SIMPLE_REF) );
@@ -244,7 +244,7 @@ ScAcceptChgDlgWrapper::ScAcceptChgDlgWrapper( vcl::Window* pParentP,
static_cast<ScAcceptChgDlg*>(GetWindow())->Initialize( pInfo );
}
else
- SetWindow( NULL );
+ SetWindow( nullptr );
if (pViewShell && !GetWindow())
pViewShell->GetViewFrame()->SetChildWindow( nId, false );
}
@@ -275,7 +275,7 @@ namespace
if( SfxViewShell* pViewSh = pFrm->GetViewShell() )
return dynamic_cast<ScTabViewShell*>( pViewSh );
- return NULL;
+ return nullptr;
}
}
@@ -286,7 +286,7 @@ ScValidityRefChildWin::ScValidityRefChildWin( vcl::Window* pParent
: SfxChildWindow(pParentP, nId),
m_bVisibleLock( false ),
m_bFreeWindowLock( false ),
- m_pSavedWndParent( NULL )
+ m_pSavedWndParent( nullptr )
{
SetWantsFocus( false );
VclPtr<ScValidationDlg> pDlg = ScValidationDlg::Find1AliveObject( pParentP );
diff --git a/sc/source/ui/view/scextopt.cxx b/sc/source/ui/view/scextopt.cxx
index dea6e14a6d1b..97475e8ee6fd 100644
--- a/sc/source/ui/view/scextopt.cxx
+++ b/sc/source/ui/view/scextopt.cxx
@@ -94,7 +94,7 @@ ScExtTabSettingsCont& ScExtTabSettingsCont::operator=( const ScExtTabSettingsCon
const ScExtTabSettings* ScExtTabSettingsCont::GetTabSettings( SCTAB nTab ) const
{
ScExtTabSettingsMap::const_iterator aIt = maMap.find( nTab );
- return (aIt == maMap.end()) ? 0 : aIt->second.get();
+ return (aIt == maMap.end()) ? nullptr : aIt->second.get();
}
ScExtTabSettings& ScExtTabSettingsCont::GetOrCreateTabSettings( SCTAB nTab )
diff --git a/sc/source/ui/view/select.cxx b/sc/source/ui/view/select.cxx
index acbb0f3c95d7..a9b4a20ff2b6 100644
--- a/sc/source/ui/view/select.cxx
+++ b/sc/source/ui/view/select.cxx
@@ -48,7 +48,7 @@ static bool bDidSwitch = false;
// View (Gridwin / keyboard)
ScViewFunctionSet::ScViewFunctionSet( ScViewData* pNewViewData ) :
pViewData( pNewViewData ),
- pEngine( NULL ),
+ pEngine( nullptr ),
bAnchor( false ),
bStarted( false )
{
@@ -206,7 +206,7 @@ void ScViewFunctionSet::BeginDrag()
if ( pWindow->IsTracking() )
pWindow->EndTracking( TrackingEventFlags::Cancel ); // abort selecting
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
pTransferObj->StartDrag( pWindow, nDragActions );
return; // dragging started
diff --git a/sc/source/ui/view/spellcheckcontext.cxx b/sc/source/ui/view/spellcheckcontext.cxx
index 66c218e679b5..a01df2221058 100644
--- a/sc/source/ui/view/spellcheckcontext.cxx
+++ b/sc/source/ui/view/spellcheckcontext.cxx
@@ -66,7 +66,7 @@ const std::vector<editeng::MisspellRanges>* SpellCheckContext::getMisspellRanges
{
CellMapType::const_iterator it = maMisspellCells.find(CellPos(nCol,nRow));
if (it == maMisspellCells.end())
- return NULL;
+ return nullptr;
return &it->second;
}
diff --git a/sc/source/ui/view/spelldialog.cxx b/sc/source/ui/view/spelldialog.cxx
index 033bcd207394..5ee00f9bde01 100644
--- a/sc/source/ui/view/spelldialog.cxx
+++ b/sc/source/ui/view/spelldialog.cxx
@@ -42,10 +42,10 @@ SFX_IMPL_CHILDWINDOW_WITHID( ScSpellDialogChildWindow, SID_SPELL_DIALOG )
ScSpellDialogChildWindow::ScSpellDialogChildWindow( vcl::Window* pParentP, sal_uInt16 nId,
SfxBindings* pBindings, SfxChildWinInfo* pInfo ) :
svx::SpellDialogChildWindow( pParentP, nId, pBindings, pInfo ),
- mpViewShell( 0 ),
- mpViewData( 0 ),
- mpDocShell( 0 ),
- mpDoc( 0 ),
+ mpViewShell( nullptr ),
+ mpViewData( nullptr ),
+ mpDocShell( nullptr ),
+ mpDoc( nullptr ),
mbNeedNextObj( false ),
mbOldIdleEnabled(true)
{
@@ -140,7 +140,7 @@ void ScSpellDialogChildWindow::Reset()
mpDocShell->SetDocumentModified();
}
- mpViewData->SetSpellingView( 0 );
+ mpViewData->SetSpellingView( nullptr );
mpViewShell->KillEditView( true );
mpDocShell->PostPaintGridAll();
mpViewShell->UpdateInputHandler();
@@ -151,10 +151,10 @@ void ScSpellDialogChildWindow::Reset()
mxRedoDoc.reset();
mxOldSel.reset();
mxOldRangeList.reset();
- mpViewShell = 0;
- mpViewData = 0;
- mpDocShell = 0;
- mpDoc = 0;
+ mpViewShell = nullptr;
+ mpViewData = nullptr;
+ mpDocShell = nullptr;
+ mpDoc = nullptr;
mbNeedNextObj = false;
mbOldIdleEnabled = true;
}
@@ -163,7 +163,7 @@ void ScSpellDialogChildWindow::Init()
{
if( mpViewShell )
return;
- if( (mpViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() )) == 0 )
+ if( (mpViewShell = dynamic_cast<ScTabViewShell*>( SfxViewShell::Current() )) == nullptr )
return;
mpViewData = &mpViewShell->GetViewData();
diff --git a/sc/source/ui/view/spelleng.cxx b/sc/source/ui/view/spelleng.cxx
index 9b9f4c2572e1..871de86d2c0e 100644
--- a/sc/source/ui/view/spelleng.cxx
+++ b/sc/source/ui/view/spelleng.cxx
@@ -79,8 +79,8 @@ bool ScConversionEngineBase::FindNextConversionCell()
{
ScMarkData& rMark = mrViewData.GetMarkData();
ScTabViewShell* pViewShell = mrViewData.GetViewShell();
- const ScPatternAttr* pPattern = NULL;
- const ScPatternAttr* pLastPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
+ const ScPatternAttr* pLastPattern = nullptr;
std::unique_ptr<SfxItemSet> pEditDefaults(new SfxItemSet(GetEmptyItemSet()));
diff --git a/sc/source/ui/view/tabcont.cxx b/sc/source/ui/view/tabcont.cxx
index ca8c67e62e4e..e10a0a129728 100644
--- a/sc/source/ui/view/tabcont.cxx
+++ b/sc/source/ui/view/tabcont.cxx
@@ -478,7 +478,7 @@ void ScTabControl::DoDrag( const vcl::Region& /* rRegion */ )
pTransferObj->SetDragSource( pDocSh, aTabMark );
vcl::Window* pWindow = pViewData->GetActiveWin();
- SC_MOD()->SetDragObject( pTransferObj, NULL ); // for internal D&D
+ SC_MOD()->SetDragObject( pTransferObj, nullptr ); // for internal D&D
pTransferObj->StartDrag( pWindow, DND_ACTION_COPYMOVE | DND_ACTION_LINK );
}
diff --git a/sc/source/ui/view/tabview.cxx b/sc/source/ui/view/tabview.cxx
index 46cbafea8d08..e8a1918844d3 100644
--- a/sc/source/ui/view/tabview.cxx
+++ b/sc/source/ui/view/tabview.cxx
@@ -194,11 +194,11 @@ bool lcl_HasRowOutline( const ScViewData& rViewData )
ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell* pViewShell ) :
pFrameWin( pParent ),
aViewData( &rDocSh, pViewShell ),
- pSelEngine( NULL ),
+ pSelEngine( nullptr ),
aFunctionSet( &aViewData ),
- pHdrSelEng( NULL ),
+ pHdrSelEng( nullptr ),
aHdrFunc( &aViewData ),
- pDrawView( NULL ),
+ pDrawView( nullptr ),
aVScrollTop( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ) ),
aVScrollBottom( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_VSCROLL | WB_DRAG ) ) ),
aHScrollLeft( VclPtr<ScrollBar>::Create( pFrameWin, WinBits( WB_HSCROLL | WB_DRAG ) ) ),
@@ -206,11 +206,11 @@ ScTabView::ScTabView( vcl::Window* pParent, ScDocShell& rDocSh, ScTabViewShell*
aCornerButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, false ) ),
aTopButton( VclPtr<ScCornerButton>::Create( pFrameWin, &aViewData, true ) ),
aScrollBarBox( VclPtr<ScrollBarBox>::Create( pFrameWin, WB_SIZEABLE ) ),
- mpInputHintWindow( NULL ),
- pPageBreakData( NULL ),
- pBrushDocument( NULL ),
- pDrawBrushSet( NULL ),
- pTimerWindow( NULL ),
+ mpInputHintWindow( nullptr ),
+ pPageBreakData( nullptr ),
+ pBrushDocument( nullptr ),
+ pDrawBrushSet( nullptr ),
+ pTimerWindow( nullptr ),
nTipVisible( 0 ),
nPrevDragPos( 0 ),
meBlockMode(None),
@@ -266,7 +266,7 @@ void ScTabView::SetTimer( ScGridWindow* pWin, const MouseEvent& rMEvt )
void ScTabView::ResetTimer()
{
aScrollTimer.Stop();
- pTimerWindow = NULL;
+ pTimerWindow = nullptr;
}
IMPL_LINK_NOARG_TYPED(ScTabView, TimerHdl, Timer *, void)
diff --git a/sc/source/ui/view/tabview2.cxx b/sc/source/ui/view/tabview2.cxx
index 68744a0c21cc..2d4dbe59ebdf 100644
--- a/sc/source/ui/view/tabview2.cxx
+++ b/sc/source/ui/view/tabview2.cxx
@@ -80,7 +80,7 @@ void moveCursorByProtRule(
{
SCCOL nNewUnhiddenCol = rCol + 1;
SCCOL nEndCol = 0;
- while(pDoc->ColHidden(nNewUnhiddenCol, nTab, NULL, &nEndCol))
+ while(pDoc->ColHidden(nNewUnhiddenCol, nTab, nullptr, &nEndCol))
{
if(nNewUnhiddenCol >= MAXCOL)
return;
@@ -121,7 +121,7 @@ void moveCursorByProtRule(
{
SCROW nNewUnhiddenRow = rRow + 1;
SCROW nEndRow = 0;
- while(pDoc->RowHidden(nNewUnhiddenRow, nTab, NULL, &nEndRow))
+ while(pDoc->RowHidden(nNewUnhiddenRow, nTab, nullptr, &nEndRow))
{
if(nNewUnhiddenRow >= MAXROW)
return;
@@ -501,7 +501,7 @@ void ScTabView::MarkCursor( SCCOL nCurX, SCROW nCurY, SCTAB nCurZ,
SCsROW nCurYOffset = 0;
SCsROW nBlockStartYOffset = 0;
bool bBlockStartMerged = false;
- const ScMergeAttr* pMergeAttr = NULL;
+ const ScMergeAttr* pMergeAttr = nullptr;
ScDocument* pDocument = aViewData.GetDocument();
// The following block checks whether or not the "BlockStart" (anchor)
@@ -802,7 +802,7 @@ void ScTabView::SkipCursorVertical(SCsCOL& rCurX, SCsROW& rCurY, SCsROW nOldY, S
do
{
SCROW nLastRow = -1;
- bSkipCell = pDoc->RowHidden(rCurY, nTab, NULL, &nLastRow) || pDoc->IsVerOverlapped( rCurX, rCurY, nTab );
+ bSkipCell = pDoc->RowHidden(rCurY, nTab, nullptr, &nLastRow) || pDoc->IsVerOverlapped( rCurX, rCurY, nTab );
if (bSkipProtected && !bSkipCell)
bSkipCell = pDoc->HasAttrib(rCurX, rCurY, nTab, rCurX, rCurY, nTab, HASATTR_PROTECTED);
if (bSkipUnprotected && !bSkipCell)
@@ -1426,7 +1426,7 @@ void ScTabView::ErrorMessage( sal_uInt16 nGlobStrId )
void ScTabView::UpdatePageBreakData( bool bForcePaint )
{
- ScPageBreakData* pNewData = NULL;
+ ScPageBreakData* pNewData = nullptr;
if (aViewData.IsPagebreakMode())
{
@@ -1439,7 +1439,7 @@ void ScTabView::UpdatePageBreakData( bool bForcePaint )
nCount = 1;
pNewData = new ScPageBreakData(nCount);
- ScPrintFunc aPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab, 0,0,NULL, NULL, pNewData );
+ ScPrintFunc aPrintFunc( pDocSh, pDocSh->GetPrinter(), nTab, 0,0,nullptr, nullptr, pNewData );
// ScPrintFunc fills the PageBreakData in ctor
if ( nCount > 1 )
{
diff --git a/sc/source/ui/view/tabview3.cxx b/sc/source/ui/view/tabview3.cxx
index c864d2d053d2..8e6d1432f30a 100644
--- a/sc/source/ui/view/tabview3.cxx
+++ b/sc/source/ui/view/tabview3.cxx
@@ -323,7 +323,7 @@ void ScTabView::CheckSelectionTransfer()
// remove own selection
pOld->ForgetView();
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
TransferableHelper::ClearSelection( GetActiveWin() ); // may delete pOld
}
// else: selection from outside: leave unchanged
@@ -449,7 +449,7 @@ void ScTabView::CursorPosChanged()
// Broadcast, so that other Views of the document also switch
ScDocument* pDoc = aViewData.GetDocument();
- bool bDP = NULL != pDoc->GetDPAtCursor(
+ bool bDP = nullptr != pDoc->GetDPAtCursor(
aViewData.GetCurX(), aViewData.GetCurY(), aViewData.GetTabNo() );
aViewData.GetViewShell()->SetPivotShell(bDP);
@@ -659,7 +659,7 @@ void ScTabView::TestHintWindow()
bool ScTabView::HasHintWindow() const
{
- return mpInputHintWindow.get() != NULL;
+ return mpInputHintWindow.get() != nullptr;
}
void ScTabView::RemoveHintWindow()
@@ -696,7 +696,7 @@ static vcl::Window* lcl_GetCareWin(SfxViewFrame* pViewFrm)
}
}
- return NULL;
+ return nullptr;
}
// adjust screen with respect to cursor position
@@ -1734,7 +1734,7 @@ void ScTabView::SetTabNo( SCTAB nTab, bool bNew, bool bExtendSelection, bool bSa
sal_uInt16 nCurRefDlgId=pScMod->GetCurRefDlgId();
SfxViewFrame* pViewFrm = aViewData.GetViewShell()->GetViewFrame();
SfxChildWindow* pChildWnd = pViewFrm->GetChildWindow( nCurRefDlgId );
- IAnyRefDialog* pRefDlg = pChildWnd ? dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()) : NULL;
+ IAnyRefDialog* pRefDlg = pChildWnd ? dynamic_cast<IAnyRefDialog*>(pChildWnd->GetWindow()) : nullptr;
if (pRefDlg)
{
pRefDlg->ViewShellChanged();
diff --git a/sc/source/ui/view/tabview5.cxx b/sc/source/ui/view/tabview5.cxx
index a91af4d4c39c..cca6f0bac2e6 100644
--- a/sc/source/ui/view/tabview5.cxx
+++ b/sc/source/ui/view/tabview5.cxx
@@ -76,7 +76,7 @@ void ScTabView::Init()
aScrollTimer.SetTimeoutHdl( LINK( this, ScTabView, TimerHdl ) );
for (i=0; i<4; i++)
- pGridWin[i] = NULL;
+ pGridWin[i] = nullptr;
pGridWin[SC_SPLIT_BOTTOMLEFT] = VclPtr<ScGridWindow>::Create( pFrameWin, &aViewData, SC_SPLIT_BOTTOMLEFT );
pSelEngine = new ScViewSelectionEngine( pGridWin[SC_SPLIT_BOTTOMLEFT], this,
@@ -87,12 +87,12 @@ void ScTabView::Init()
pColBar[SC_SPLIT_LEFT] = VclPtr<ScColBar>::Create( pFrameWin, &aViewData, SC_SPLIT_LEFT,
&aHdrFunc, pHdrSelEng );
- pColBar[SC_SPLIT_RIGHT] = NULL;
+ pColBar[SC_SPLIT_RIGHT] = nullptr;
pRowBar[SC_SPLIT_BOTTOM] = VclPtr<ScRowBar>::Create( pFrameWin, &aViewData, SC_SPLIT_BOTTOM,
&aHdrFunc, pHdrSelEng );
- pRowBar[SC_SPLIT_TOP] = NULL;
+ pRowBar[SC_SPLIT_TOP] = nullptr;
for (i=0; i<2; i++)
- pColOutline[i] = pRowOutline[i] = NULL;
+ pColOutline[i] = pRowOutline[i] = nullptr;
pHSplitter = VclPtr<ScTabSplitter>::Create( pFrameWin, WinBits( WB_HSCROLL ), &aViewData );
pVSplitter = VclPtr<ScTabSplitter>::Create( pFrameWin, WinBits( WB_VSCROLL ), &aViewData );
@@ -130,8 +130,8 @@ void ScTabView::Init()
// UpdateShow kommt beim Resize, oder bei Kopie einer bestehenden View aus dem ctor
- pDrawActual = NULL;
- pDrawOld = NULL;
+ pDrawActual = nullptr;
+ pDrawOld = nullptr;
// DrawView darf nicht im TabView - ctor angelegt werden,
// wenn die ViewShell noch nicht konstruiert ist...
@@ -150,7 +150,7 @@ ScTabView::~ScTabView()
if ( pOld && pOld->GetView() == this )
{
pOld->ForgetView();
- pScMod->SetSelectionTransfer( NULL );
+ pScMod->SetSelectionTransfer( nullptr );
TransferableHelper::ClearSelection( GetActiveWin() ); // may delete pOld
}
@@ -219,7 +219,7 @@ void ScTabView::MakeDrawView( TriState nForceDesignMode )
if (pGridWin[i])
{
if ( SC_SPLIT_BOTTOMLEFT != (ScSplitPos)i )
- pDrawView->AddWindowToPaintView(pGridWin[i], 0);
+ pDrawView->AddWindowToPaintView(pGridWin[i], nullptr);
}
pDrawView->RecalcScale();
for (i=0; i<4; i++)
@@ -254,7 +254,7 @@ void ScTabView::DoAddWin( ScGridWindow* pWin )
{
if (pDrawView)
{
- pDrawView->AddWindowToPaintView(pWin, 0);
+ pDrawView->AddWindowToPaintView(pWin, nullptr);
pWin->DrawLayerCreated();
}
@@ -602,7 +602,7 @@ void ScTabView::SetBrushDocument( ScDocument* pNew, bool bLock )
delete pDrawBrushSet;
pBrushDocument = pNew;
- pDrawBrushSet = NULL;
+ pDrawBrushSet = nullptr;
bLockPaintBrush = bLock;
@@ -614,7 +614,7 @@ void ScTabView::SetDrawBrushSet( SfxItemSet* pNew, bool bLock )
delete pBrushDocument;
delete pDrawBrushSet;
- pBrushDocument = NULL;
+ pBrushDocument = nullptr;
pDrawBrushSet = pNew;
bLockPaintBrush = bLock;
@@ -626,7 +626,7 @@ void ScTabView::ResetBrushDocument()
{
if ( HasPaintBrush() )
{
- SetBrushDocument( NULL, false );
+ SetBrushDocument( nullptr, false );
SetActivePointer( Pointer( PointerStyle::Arrow ) ); // switch pointers also when ended with escape key
}
}
diff --git a/sc/source/ui/view/tabvwsh2.cxx b/sc/source/ui/view/tabvwsh2.cxx
index 0f3b1d177edc..6aa2bb3c5b89 100644
--- a/sc/source/ui/view/tabvwsh2.cxx
+++ b/sc/source/ui/view/tabvwsh2.cxx
@@ -241,7 +241,7 @@ void ScTabViewShell::ExecDraw(SfxRequest& rReq)
pTabView->GetDrawFuncPtr()->Deactivate();
pTabView->SetDrawFuncOldPtr(pTabView->GetDrawFuncPtr());
- pTabView->SetDrawFuncPtr(NULL);
+ pTabView->SetDrawFuncPtr(nullptr);
}
SfxRequest aNewReq(rReq);
diff --git a/sc/source/ui/view/tabvwsh3.cxx b/sc/source/ui/view/tabvwsh3.cxx
index d4badd8cd2d5..957fa3fdfc94 100644
--- a/sc/source/ui/view/tabvwsh3.cxx
+++ b/sc/source/ui/view/tabvwsh3.cxx
@@ -199,11 +199,11 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
const SfxPoolItem* pItem;
if ( pReqArgs->GetItemState( SID_DEFINE_PRINTAREA, true, &pItem ) == SfxItemState::SET )
aPrintStr = static_cast<const SfxStringItem*>(pItem)->GetValue();
- SetPrintRanges( false, &aPrintStr, NULL, NULL, bAdd );
+ SetPrintRanges( false, &aPrintStr, nullptr, nullptr, bAdd );
}
else
{
- SetPrintRanges( false, NULL, NULL, NULL, bAdd ); // from selection
+ SetPrintRanges( false, nullptr, nullptr, nullptr, bAdd ); // from selection
rReq.Done();
}
}
@@ -214,7 +214,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
// Clear currently defined print range if any, and reset it to
// print entire sheet which is the default.
OUString aEmpty;
- SetPrintRanges(true, &aEmpty, NULL, NULL, false);
+ SetPrintRanges(true, &aEmpty, nullptr, nullptr, false);
rReq.Done();
}
break;
@@ -472,7 +472,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
OUString aStrDocName( static_cast<const SfxStringItem&>(pReqArgs->
Get(nSlot)).GetValue() );
- SfxViewFrame* pViewFrame = NULL;
+ SfxViewFrame* pViewFrame = nullptr;
ScDocShell* pDocSh = static_cast<ScDocShell*>(SfxObjectShell::GetFirst());
bool bFound = false;
@@ -483,7 +483,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
if ( pDocSh->GetTitle() == aStrDocName )
{
pViewFrame = SfxViewFrame::GetFirst( pDocSh );
- bFound = ( NULL != pViewFrame );
+ bFound = ( nullptr != pViewFrame );
}
pDocSh = static_cast<ScDocShell*>(SfxObjectShell::GetNext( *pDocSh ));
@@ -623,7 +623,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
{
sal_uInt16 nId = ScInputWindowWrapper::GetChildWindowId();
SfxChildWindow* pWnd = pThisFrame->GetChildWindow( nId );
- bool bSet = ( pWnd == NULL );
+ bool bSet = ( pWnd == nullptr );
const SfxPoolItem* pItem;
if ( pReqArgs && pReqArgs->GetItemState(nSlot, true, &pItem) == SfxItemState::SET )
bSet = static_cast<const SfxBoolItem*>(pItem)->GetValue();
@@ -748,7 +748,7 @@ void ScTabViewShell::Execute( SfxRequest& rReq )
case SID_ATTR_ZOOMSLIDER:
{
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
bool bSyncZoom = SC_MOD()->GetAppOptions().GetSynchronizeZoom();
if ( pReqArgs && pReqArgs->GetItemState(SID_ATTR_ZOOMSLIDER, true, &pItem) == SfxItemState::SET )
{
diff --git a/sc/source/ui/view/tabvwsh4.cxx b/sc/source/ui/view/tabvwsh4.cxx
index 15c4194706b8..faa12b474655 100644
--- a/sc/source/ui/view/tabvwsh4.cxx
+++ b/sc/source/ui/view/tabvwsh4.cxx
@@ -137,7 +137,7 @@ void ScTabViewShell::Activate(bool bMDI)
ScInputHandler* pOldHdl=pWin->GetInputHandler();
SfxViewShell* pSh = SfxViewShell::GetFirst( true, checkSfxViewShell<ScTabViewShell> );
- while ( pSh!=NULL && pOldHdl!=NULL)
+ while ( pSh!=nullptr && pOldHdl!=nullptr)
{
if (static_cast<ScTabViewShell*>(pSh)->GetInputHandler() == pOldHdl)
{
@@ -225,7 +225,7 @@ void ScTabViewShell::Deactivate(bool bMDI)
ScChangeTrack* pChanges=pDoc->GetChangeTrack();
- if(pChanges!=NULL)
+ if(pChanges!=nullptr)
{
Link<ScChangeTrack&,void> aLink;
pChanges->SetModifiedLink(aLink);
@@ -248,10 +248,10 @@ void ScTabViewShell::Deactivate(bool bMDI)
GetViewData().GetDocShell()->UpdateOle(&GetViewData(), true);
if ( pHdl )
- pHdl->NotifyChange( NULL, true ); // timer-delayed due to document switching
+ pHdl->NotifyChange( nullptr, true ); // timer-delayed due to document switching
if (pScActiveViewShell == this)
- pScActiveViewShell = NULL;
+ pScActiveViewShell = nullptr;
bDontSwitch = bOldDontSwitch;
}
@@ -824,14 +824,14 @@ void ScTabViewShell::SetCurSubShell(ObjectSelectionType eOST, bool bForce)
{
if (svx::checkForSelectedCustomShapes(
GetScDrawView(), true /* bOnlyExtruded */ )) {
- if (pExtrusionBarShell == 0)
+ if (pExtrusionBarShell == nullptr)
pExtrusionBarShell = new svx::ExtrusionBar(this);
AddSubShell( *pExtrusionBarShell );
}
sal_uInt32 nCheckStatus = 0;
if (svx::checkForSelectedFontWork(
GetScDrawView(), nCheckStatus )) {
- if (pFontworkBarShell == 0)
+ if (pFontworkBarShell == nullptr)
pFontworkBarShell = new svx::FontworkBar(this);
AddSubShell( *pFontworkBarShell );
}
@@ -994,7 +994,7 @@ SfxShell* ScTabViewShell::GetMySubShell() const
pSub = const_cast<ScTabViewShell*>(this)->GetSubShell(++nPos);
}
- return NULL; // none from mine present
+ return nullptr; // none from mine present
}
bool ScTabViewShell::IsDrawTextShell() const
@@ -1062,8 +1062,8 @@ VclPtr<SfxTabPage> ScTabViewShell::CreatePrintOptionsPage( vcl::Window *pParent,
void ScTabViewShell::StopEditShell()
{
- if ( pEditShell != NULL && !bDontSwitch )
- SetEditShell(NULL, false );
+ if ( pEditShell != nullptr && !bDontSwitch )
+ SetEditShell(nullptr, false );
}
// close handler to ensure function of dialog:
@@ -1086,7 +1086,7 @@ IMPL_LINK_NOARG_TYPED(ScTabViewShell, SimpleRefClose, const OUString*, void)
static ScTabViewObj* lcl_GetViewObj( ScTabViewShell& rShell )
{
- ScTabViewObj* pRet = NULL;
+ ScTabViewObj* pRet = nullptr;
SfxViewFrame* pViewFrame = rShell.GetViewFrame();
if (pViewFrame)
{
@@ -1634,26 +1634,26 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
nDrawSfxId(0),
nCtrlSfxId(USHRT_MAX),
nFormSfxId(USHRT_MAX),
- pDrawShell(NULL),
- pDrawTextShell(NULL),
- pEditShell(NULL),
- pPivotShell(NULL),
- pAuditingShell(NULL),
- pDrawFormShell(NULL),
- pCellShell(NULL),
- pOleObjectShell(NULL),
- pChartShell(NULL),
- pGraphicShell(NULL),
- pMediaShell(NULL),
- pPageBreakShell(NULL),
- pExtrusionBarShell(NULL),
- pFontworkBarShell(NULL),
- pFormShell(NULL),
- pInputHandler(NULL),
- pCurFrameLine(NULL),
+ pDrawShell(nullptr),
+ pDrawTextShell(nullptr),
+ pEditShell(nullptr),
+ pPivotShell(nullptr),
+ pAuditingShell(nullptr),
+ pDrawFormShell(nullptr),
+ pCellShell(nullptr),
+ pOleObjectShell(nullptr),
+ pChartShell(nullptr),
+ pGraphicShell(nullptr),
+ pMediaShell(nullptr),
+ pPageBreakShell(nullptr),
+ pExtrusionBarShell(nullptr),
+ pFontworkBarShell(nullptr),
+ pFormShell(nullptr),
+ pInputHandler(nullptr),
+ pCurFrameLine(nullptr),
aTarget(this),
- pDialogDPObject(NULL),
- pNavSettings(NULL),
+ pDialogDPObject(nullptr),
+ pNavSettings(nullptr),
bActiveDrawSh(false),
bActiveDrawTextSh(false),
bActivePivotSh(false),
@@ -1669,11 +1669,11 @@ ScTabViewShell::ScTabViewShell( SfxViewFrame* pViewFrame,
bInFormatDialog(false),
bPrintSelected(false),
bReadOnly(false),
- pScSbxObject(NULL),
+ pScSbxObject(nullptr),
bChartAreaValid(false),
bForceFocusOnCurCell(false),
nCurRefDlgId(0),
- pAccessibilityBroadcaster(NULL),
+ pAccessibilityBroadcaster(nullptr),
mbInSwitch(false)
{
const ScAppOptions& rAppOpt = SC_MOD()->GetAppOptions();
@@ -1729,7 +1729,7 @@ ScTabViewShell::~ScTabViewShell()
SC_MOD()->ViewShellGone(this);
RemoveSubShell(); // all
- SetWindow(0);
+ SetWindow(nullptr);
// all to NULL, in case the TabView-dtor tries to access them
//! (should not really! ??!?!)
@@ -1766,7 +1766,7 @@ void ScTabViewShell::SetDialogDPObject( const ScDPObject* pObj )
if (pObj)
pDialogDPObject = new ScDPObject( *pObj );
else
- pDialogDPObject = NULL;
+ pDialogDPObject = nullptr;
}
void ScTabViewShell::FillFieldData( ScHeaderFieldData& rData )
diff --git a/sc/source/ui/view/tabvwsh8.cxx b/sc/source/ui/view/tabvwsh8.cxx
index 7485f116f513..2f61df7ecf9e 100644
--- a/sc/source/ui/view/tabvwsh8.cxx
+++ b/sc/source/ui/view/tabvwsh8.cxx
@@ -35,7 +35,7 @@ void ScTabViewShell::SetDefaultFrameLine( const ::editeng::SvxBorderLine* pLine
else if ( pCurFrameLine )
{
delete pCurFrameLine;
- pCurFrameLine = NULL;
+ pCurFrameLine = nullptr;
}
}
diff --git a/sc/source/ui/view/tabvwsh9.cxx b/sc/source/ui/view/tabvwsh9.cxx
index d8bbc2f34b45..f0711a953bdc 100644
--- a/sc/source/ui/view/tabvwsh9.cxx
+++ b/sc/source/ui/view/tabvwsh9.cxx
@@ -122,7 +122,7 @@ void ScTabViewShell::ExecImageMap( SfxRequest& rReq )
case SID_IMAP_EXEC:
{
SdrView* pDrView = GetSdrView();
- SdrMark* pMark = pDrView ? pDrView->GetMarkedObjectList().GetMark(0) : 0;
+ SdrMark* pMark = pDrView ? pDrView->GetMarkedObjectList().GetMark(0) : nullptr;
if ( pMark )
{
diff --git a/sc/source/ui/view/tabvwsha.cxx b/sc/source/ui/view/tabvwsha.cxx
index f6ac626e1679..9c451be934ee 100644
--- a/sc/source/ui/view/tabvwsha.cxx
+++ b/sc/source/ui/view/tabvwsha.cxx
@@ -223,7 +223,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_CURRENTCELL:
{
ScAddress aScAddress( GetViewData().GetCurX(), GetViewData().GetCurY(), 0 );
- OUString aAddr(aScAddress.Format(SCA_ABS, NULL, pDoc->GetAddressConvention()));
+ OUString aAddr(aScAddress.Format(SCA_ABS, nullptr, pDoc->GetAddressConvention()));
SfxStringItem aPosItem( SID_CURRENTCELL, aAddr );
rSet.Put( aPosItem );
@@ -371,7 +371,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case SID_AUTO_OUTLINE:
{
- if (pDoc->GetChangeTrack()!=NULL || GetViewData().IsMultiMarked())
+ if (pDoc->GetChangeTrack()!=nullptr || GetViewData().IsMultiMarked())
{
rSet.DisableItem( nWhich );
}
@@ -382,7 +382,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
SCTAB nOlTab = GetViewData().GetTabNo();
ScOutlineTable* pOlTable = pDoc->GetOutlineTable( nOlTab );
- if (pOlTable == NULL)
+ if (pOlTable == nullptr)
rSet.DisableItem( nWhich );
}
break;
@@ -401,7 +401,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
case FID_CHG_SHOW:
{
- if ( pDoc->GetChangeTrack() == NULL || ( pDocShell && pDocShell->IsDocShared() ) )
+ if ( pDoc->GetChangeTrack() == nullptr || ( pDocShell && pDocShell->IsDocShared() ) )
rSet.DisableItem( nWhich );
}
break;
@@ -409,7 +409,7 @@ void ScTabViewShell::GetState( SfxItemSet& rSet )
{
rSet.Put(SfxBoolItem(FID_CHG_ACCEPT,
pThisFrame->HasChildWindow(FID_CHG_ACCEPT)));
- if(pDoc->GetChangeTrack()==NULL)
+ if(pDoc->GetChangeTrack()==nullptr)
{
if ( !pThisFrame->HasChildWindow(FID_CHG_ACCEPT) )
{
@@ -528,7 +528,7 @@ void ScTabViewShell::ExecuteCellFormatDlg(SfxRequest& rReq, const OString &rName
{
const SfxItemSet* pOutSet = pDlg->GetOutputItemSet();
- const SfxPoolItem* pItem=NULL;
+ const SfxPoolItem* pItem=nullptr;
if(pOutSet->GetItemState(SID_ATTR_NUMBERFORMAT_INFO,true,&pItem)==SfxItemState::SET)
{
@@ -602,7 +602,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
if ( pHdl )
{
OUString aString;
- const EditTextObject* pObject = NULL;
+ const EditTextObject* pObject = nullptr;
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
CellType eType;
@@ -675,7 +675,7 @@ void ScTabViewShell::UpdateInputHandler( bool bForce /* = sal_False */, bool bSt
// if using the view's local input handler, this view can always be set
// as current view inside NotifyChange.
- ScTabViewShell* pSourceSh = pInputHandler ? this : NULL;
+ ScTabViewShell* pSourceSh = pInputHandler ? this : nullptr;
pHdl->NotifyChange( &aState, bForce, pSourceSh, bStopEditing );
}
@@ -719,7 +719,7 @@ void ScTabViewShell::GetSaveState( SfxItemSet& rSet )
if ( nWhich != SID_SAVEDOC || !GetViewData().GetDocShell()->IsDocShared() )
{
// get state from DocShell
- pDocSh->GetSlotState( nWhich, NULL, &rSet );
+ pDocSh->GetSlotState( nWhich, nullptr, &rSet );
}
nWhich = aIter.NextWhich();
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index fdeeda14016e..223e6062cd6a 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -96,7 +96,7 @@ void ScTabViewShell::ConnectObject( SdrOle2Obj* pObj )
aRect.SetSize( aOleSize );
pClient->SetObjArea( aRect );
- static_cast<ScClient*>(pClient)->SetGrafEdit( NULL );
+ static_cast<ScClient*>(pClient)->SetGrafEdit( nullptr );
}
}
@@ -164,7 +164,7 @@ bool ScTabViewShell::ActivateObject( SdrOle2Obj* pObj, long nVerb )
aRect.SetSize( aOleSize );
pClient->SetObjArea( aRect );
- static_cast<ScClient*>(pClient)->SetGrafEdit( NULL );
+ static_cast<ScClient*>(pClient)->SetGrafEdit( nullptr );
nErr = pClient->DoVerb( nVerb );
bErrorShown = true;
@@ -221,7 +221,7 @@ ErrCode ScTabViewShell::DoVerb(long nVerb)
if (!pView)
return ERRCODE_SO_NOTIMPL; // should not be
- SdrOle2Obj* pOle2Obj = NULL;
+ SdrOle2Obj* pOle2Obj = nullptr;
ErrCode nErr = ERRCODE_NONE;
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
@@ -383,7 +383,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
//! merge with ScViewFunc::PasteDataFormat (SotClipboardFormatId::SBA_FIELDDATAEXCHANGE)?
ScDrawView* pDrView = GetScDrawView();
- SdrPageView* pPageView = pDrView ? pDrView->GetSdrPageView() : NULL;
+ SdrPageView* pPageView = pDrView ? pDrView->GetSdrPageView() : nullptr;
if(pPageView)
{
svx::ODataAccessDescriptor aDescriptor(pDescriptorItem->GetValue());
@@ -576,7 +576,7 @@ void ScTabViewShell::GetUndoState(SfxItemSet &rSet)
break;
default:
// get state from sfx view frame
- GetViewFrame()->GetSlotState( nWhich, NULL, &rSet );
+ GetViewFrame()->GetSlotState( nWhich, nullptr, &rSet );
}
nWhich = aIter.NextWhich();
diff --git a/sc/source/ui/view/tabvwshc.cxx b/sc/source/ui/view/tabvwshc.cxx
index 67a73b90b428..bfe6d8e72164 100644
--- a/sc/source/ui/view/tabvwshc.cxx
+++ b/sc/source/ui/view/tabvwshc.cxx
@@ -123,7 +123,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
// so that it does not re appear for instance after a crash (#42341#).
if ( SC_MOD()->GetCurRefDlgId() != nSlotId )
- return NULL;
+ return nullptr;
if ( nCurRefDlgId != nSlotId )
{
@@ -131,7 +131,7 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
// -> lock the dispatcher for this view (modal mode)
GetViewData().GetDispatcher().Lock( true ); // lock is reset when closing dialog
- return NULL;
+ return nullptr;
}
VclPtr<SfxModelessDialog> pResult;
@@ -477,11 +477,11 @@ VclPtr<SfxModelessDialog> ScTabViewShell::CreateRefDialog(
condformat::dialog::ScCondFormatDialogType aDialogType;
// Get the pool item stored it by Conditional Format Manager Dialog.
- const SfxPoolItem* pItem = NULL;
+ const SfxPoolItem* pItem = nullptr;
sal_uInt32 nItems(GetPool().GetItemCount2( SCITEM_STRING ));
for( sal_uInt32 nIter = 0; nIter < nItems; ++nIter )
{
- if( NULL != (pItem = GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
+ if( nullptr != (pItem = GetPool().GetItem2( SCITEM_STRING, nIter ) ) )
{
if ( ScCondFormatDlg::ParseXmlString(
static_cast<const SfxStringItem*>(pItem)->GetValue(),
diff --git a/sc/source/ui/view/tabvwshe.cxx b/sc/source/ui/view/tabvwshe.cxx
index f8b8d5cd6d98..f2528e7fa02a 100644
--- a/sc/source/ui/view/tabvwshe.cxx
+++ b/sc/source/ui/view/tabvwshe.cxx
@@ -182,7 +182,7 @@ void ScTabViewShell::InsertURLField( const OUString& rName, const OUString& rURL
}
// single url in cell is shown in the dialog and replaced
- bSelectFirst = HasBookmarkAtCursor( NULL );
+ bSelectFirst = HasBookmarkAtCursor( nullptr );
pScMod->SetInputMode( SC_INPUT_TABLE );
}
diff --git a/sc/source/ui/view/tabvwshf.cxx b/sc/source/ui/view/tabvwshf.cxx
index 132789c6d05f..cc64215a8696 100644
--- a/sc/source/ui/view/tabvwshf.cxx
+++ b/sc/source/ui/view/tabvwshf.cxx
@@ -76,7 +76,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
pDoc->GetName( nCurrentTab, aName );
bool bVisible=true;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
const SfxPoolItem* pItem;
if( pReqArgs->HasItem( FID_TABLE_VISIBLE, &pItem ) )
@@ -173,7 +173,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( !pDoc->IsDocEditable() )
break; // locked
- if ( pReqArgs != NULL ) // from basic
+ if ( pReqArgs != nullptr ) // from basic
{
bool bOk = false;
const SfxPoolItem* pTabItem;
@@ -318,7 +318,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
( pDoc->IsTabProtected( nTabNr ) || nTabSelCount > 1 ) )
break; // no rename
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
bool bDone = false;
const SfxPoolItem* pItem;
@@ -352,7 +352,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OUString aErrMsg ( ScGlobal::GetRscString( STR_INVALIDTABNAME ) );
OUString aName;
OUString aDlgTitle;
- const sal_Char* pHelpId = 0;
+ const sal_Char* pHelpId = nullptr;
switch ( nSlot )
{
@@ -425,7 +425,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
case FID_TAB_MOVE:
{
- if ( pDoc->GetChangeTrack() != NULL )
+ if ( pDoc->GetChangeTrack() != nullptr )
break; // if ChangeTracking is active, then no TabMove
bool bDoIt = false;
@@ -435,7 +435,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
OUString aDocName;
OUString aTabName;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
SCTAB nTableCount = pDoc->GetTableCount();
const SfxPoolItem* pItem;
@@ -455,7 +455,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if (!aDocName.isEmpty())
{
SfxObjectShell* pSh = SfxObjectShell::GetFirst();
- ScDocShell* pScSh = NULL;
+ ScDocShell* pScSh = nullptr;
sal_uInt16 i=0;
while ( pSh )
@@ -651,7 +651,7 @@ void ScTabViewShell::ExecuteTable( SfxRequest& rReq )
if ( pDoc->IsTabProtected( nTabNr ) ) // ||nTabSelCount > 1
break;
- if( pReqArgs != NULL )
+ if( pReqArgs != nullptr )
{
bool bDone = false;
const SfxPoolItem* pItem;
@@ -849,7 +849,7 @@ void ScTabViewShell::GetStateTable( SfxItemSet& rSet )
case FID_TAB_MOVE:
if ( !pDoc->IsDocEditable()
- || pDoc->GetChangeTrack() != NULL
+ || pDoc->GetChangeTrack() != nullptr
|| nTabCount > MAXTAB)
rSet.DisableItem( nWhich );
break;
diff --git a/sc/source/ui/view/tabvwshh.cxx b/sc/source/ui/view/tabvwshh.cxx
index a2ca96ec6883..6aa43f3c2ebd 100644
--- a/sc/source/ui/view/tabvwshh.cxx
+++ b/sc/source/ui/view/tabvwshh.cxx
@@ -254,7 +254,7 @@ void ScTabViewShell::BroadcastAccessibility( const SfxHint &rHint )
bool ScTabViewShell::HasAccessibilityObjects()
{
- return pAccessibilityBroadcaster != NULL;
+ return pAccessibilityBroadcaster != nullptr;
}
bool ScTabViewShell::ExecuteRetypePassDlg(ScPasswordHash eDesiredHash)
diff --git a/sc/source/ui/view/viewdata.cxx b/sc/source/ui/view/viewdata.cxx
index a899178b50d5..6df608ecd656 100644
--- a/sc/source/ui/view/viewdata.cxx
+++ b/sc/source/ui/view/viewdata.cxx
@@ -295,11 +295,11 @@ void ScViewDataTable::ReadUserDataSequence(const uno::Sequence <beans::PropertyV
ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
mpMarkData(new ScMarkData),
pDocShell ( pDocSh ),
- pDoc ( NULL ),
+ pDoc ( nullptr ),
pView ( pViewSh ),
pViewShell ( pViewSh ),
pOptions ( new ScViewOptions ),
- pSpellingView ( NULL ),
+ pSpellingView ( nullptr ),
aLogicMode ( MAP_100TH_MM ),
eDefZoomType( SvxZoomType::PERCENT ),
aDefZoomX ( 1,1 ),
@@ -344,7 +344,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
pThisTab = maTabData[nTabNo];
for (sal_uInt16 j=0; j<4; j++)
{
- pEditView[j] = NULL;
+ pEditView[j] = nullptr;
bEditActive[j] = false;
}
@@ -364,7 +364,7 @@ ScViewData::ScViewData( ScDocShell* pDocSh, ScTabViewShell* pViewSh ) :
while ( !pDoc->IsVisible(nTabNo) && pDoc->HasTable(nTabNo+1) )
{
++nTabNo;
- maTabData.push_back(NULL);
+ maTabData.push_back(nullptr);
}
maTabData[nTabNo] = new ScViewDataTable() ;
pThisTab = maTabData[nTabNo];
@@ -430,7 +430,7 @@ ScViewData::ScViewData( const ScViewData& rViewData ) :
pThisTab = maTabData[nTabNo];
for (sal_uInt16 j=0; j<4; j++)
{
- pEditView[j] = NULL;
+ pEditView[j] = nullptr;
bEditActive[j] = false;
}
@@ -454,7 +454,7 @@ ScDocument* ScViewData::GetDocument() const
return &pDocShell->GetDocument();
OSL_FAIL("no document on ViewData");
- return NULL;
+ return nullptr;
}
ScViewData::~ScViewData()
@@ -480,7 +480,7 @@ void ScViewData::UpdateCurrentTab()
void ScViewData::InsertTab( SCTAB nTab )
{
if( nTab >= static_cast<SCTAB>(maTabData.size()))
- maTabData.resize(nTab+1, NULL);
+ maTabData.resize(nTab+1, nullptr);
else
maTabData.insert( maTabData.begin() + nTab, nullptr );
CreateTabData( nTab );
@@ -492,10 +492,10 @@ void ScViewData::InsertTab( SCTAB nTab )
void ScViewData::InsertTabs( SCTAB nTab, SCTAB nNewSheets )
{
if( nTab+nNewSheets >= static_cast<SCTAB>(maTabData.size()))
- maTabData.resize(nTab+nNewSheets, NULL);
+ maTabData.resize(nTab+nNewSheets, nullptr);
else
{
- maTabData.insert( maTabData.begin() + nTab, nNewSheets, NULL );
+ maTabData.insert( maTabData.begin() + nTab, nNewSheets, nullptr );
}
for (SCTAB i = nTab; i < nTab + nNewSheets; ++i)
{
@@ -555,7 +555,7 @@ void ScViewData::MoveTab( SCTAB nSrcTab, SCTAB nDestTab )
{
if (nDestTab==SC_TAB_APPEND)
nDestTab = pDoc->GetTableCount() - 1;
- ScViewDataTable* pTab = NULL;
+ ScViewDataTable* pTab = nullptr;
if (nSrcTab < static_cast<SCTAB>(maTabData.size()))
{
pTab = maTabData[nSrcTab];
@@ -1383,7 +1383,7 @@ void ScViewData::EditGrowY( bool bInitial )
void ScViewData::ResetEditView()
{
- EditEngine* pEngine = NULL;
+ EditEngine* pEngine = nullptr;
for (sal_uInt16 i=0; i<4; i++)
if (pEditView[i])
{
@@ -1408,7 +1408,7 @@ void ScViewData::KillEditView()
if (bEditActive[i])
pEditView[i]->GetEditEngine()->RemoveView(pEditView[i]);
delete pEditView[i];
- pEditView[i] = NULL;
+ pEditView[i] = nullptr;
}
}
@@ -1447,7 +1447,7 @@ void ScViewData::EnsureTabDataSize(size_t nSize)
if (nSize >= maTabData.size())
{
size_t n = nSize - maTabData.size() + 1;
- maTabData.insert(maTabData.end(), n, NULL);
+ maTabData.insert(maTabData.end(), n, nullptr);
}
}
@@ -1725,7 +1725,7 @@ bool ScViewData::GetMergeSizePixel( SCCOL nX, SCROW nY, long& rSizeXPix, long& r
for (SCROW nRow = nY; nRow <= nY+nCountY-1; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowHidden(nRow, nTabNo, NULL, &nLastRow))
+ if (pDoc->RowHidden(nRow, nTabNo, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
@@ -1923,7 +1923,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
if ( nNewPosY > nOldPosY )
for ( i=nOldPosY; i<nNewPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ long nThis = pDoc->GetRowHeight( i, nTabNo, nullptr, &nHeightEndRow );
SCROW nRows = std::min( nNewPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY -= nThis * nRows;
@@ -1932,7 +1932,7 @@ void ScViewData::SetPosY( ScVSplitPos eWhich, SCROW nNewPosY )
else
for ( i=nNewPosY; i<nOldPosY; i++ )
{
- long nThis = pDoc->GetRowHeight( i, nTabNo, NULL, &nHeightEndRow );
+ long nThis = pDoc->GetRowHeight( i, nTabNo, nullptr, &nHeightEndRow );
SCROW nRows = std::min( nOldPosY, nHeightEndRow + 1) - i;
i = nHeightEndRow;
nTPosY += nThis * nRows;
@@ -3073,7 +3073,7 @@ void ScViewData::AddPixelsWhile( long & rScrY, long nEndPixels, SCROW & rPosY,
while (rScrY <= nEndPixels && nRow <= nEndRow)
{
SCROW nHeightEndRow;
- sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, NULL, &nHeightEndRow);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, nullptr, &nHeightEndRow);
if (nHeightEndRow > nEndRow)
nHeightEndRow = nEndRow;
if (!nHeight)
@@ -3112,7 +3112,7 @@ void ScViewData::AddPixelsWhileBackward( long & rScrY, long nEndPixels,
while (rScrY <= nEndPixels && nRow >= nStartRow)
{
SCROW nHeightStartRow;
- sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, NULL);
+ sal_uInt16 nHeight = pDoc->GetRowHeight( nRow, nTabNo, &nHeightStartRow, nullptr);
if (nHeightStartRow < nStartRow)
nHeightStartRow = nStartRow;
if (!nHeight)
diff --git a/sc/source/ui/view/viewfun2.cxx b/sc/source/ui/view/viewfun2.cxx
index 24dd690c9b41..843d4ce71c5e 100644
--- a/sc/source/ui/view/viewfun2.cxx
+++ b/sc/source/ui/view/viewfun2.cxx
@@ -483,7 +483,7 @@ bool ScViewFunc::GetAutoSumArea( ScRangeList& rRangeList )
void ScViewFunc::EnterAutoSum(const ScRangeList& rRangeList, bool bSubTotal, const ScAddress& rAddr)
{
OUString aFormula = GetAutoSumFormula( rRangeList, bSubTotal, rAddr );
- EnterBlock( aFormula, NULL );
+ EnterBlock( aFormula, nullptr );
}
bool ScViewFunc::AutoSum( const ScRange& rRange, bool bSubTotal, bool bSetCursor, bool bContinue )
@@ -764,7 +764,7 @@ void ScViewFunc::EnterBlock( const OUString& rString, const EditTextObject* pDat
if (!aTester.NeedsObject())
{
aNewStr = aEngine.GetText();
- pData = NULL;
+ pData = nullptr;
}
}
@@ -956,7 +956,7 @@ void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint,
if ( pRepCol )
{
if ( pRepCol->isEmpty() )
- rDoc.SetRepeatColRange( nTab, NULL );
+ rDoc.SetRepeatColRange( nTab, nullptr );
else
if ( aRange.ParseAny( *pRepCol, &rDoc, aDetails ) & SCA_VALID )
rDoc.SetRepeatColRange( nTab, &aRange );
@@ -967,7 +967,7 @@ void ScViewFunc::SetPrintRanges( bool bEntireSheet, const OUString* pPrint,
if ( pRepRow )
{
if ( pRepRow->isEmpty() )
- rDoc.SetRepeatRowRange( nTab, NULL );
+ rDoc.SetRepeatRowRange( nTab, nullptr );
else
if ( aRange.ParseAny( *pRepRow, &rDoc, aDetails ) & SCA_VALID )
rDoc.SetRepeatRowRange( nTab, &aRange );
@@ -1445,7 +1445,7 @@ void ScViewFunc::FillTab( InsertDeleteFlags nFlags, ScPasteFunc nFunction, bool
else
aMarkRange = ScRange( GetViewData().GetCurX(), GetViewData().GetCurY(), nTab );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bUndo)
{
@@ -1593,7 +1593,7 @@ void ScViewFunc::TransliterateText( sal_Int32 nType )
ScAutoFormatData* ScViewFunc::CreateAutoFormatData()
{
- ScAutoFormatData* pData = NULL;
+ ScAutoFormatData* pData = nullptr;
SCCOL nStartCol;
SCROW nStartRow;
SCTAB nStartTab;
@@ -1933,7 +1933,7 @@ void ScViewFunc::Solve( const ScSolveParam& rParam )
}
OUString aTargetValStr;
- if ( rParam.pStrTargetVal != NULL )
+ if ( rParam.pStrTargetVal != nullptr )
aTargetValStr = *(rParam.pStrTargetVal);
OUString aMsgStr;
@@ -2219,8 +2219,8 @@ bool ScViewFunc::DeleteTables(const vector<SCTAB> &TheTabs, bool bRecord )
--nNewTab;
bool bWasLinked = false;
- ScDocument* pUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -2538,9 +2538,9 @@ void ScViewFunc::MoveTable(
{
ScDocument* pDoc = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScDocument* pDestDoc = NULL;
- ScDocShell* pDestShell = NULL;
- ScTabViewShell* pDestViewSh = NULL;
+ ScDocument* pDestDoc = nullptr;
+ ScDocShell* pDestShell = nullptr;
+ ScTabViewShell* pDestViewSh = nullptr;
bool bUndo (pDoc->IsUndoEnabled());
bool bRename = pNewTabName && !pNewTabName->isEmpty();
@@ -3033,7 +3033,7 @@ void ScViewFunc::UpdateLineAttrs( SvxBorderLine& rLine,
aBoxItem.SetLine( &aLine, BOXLINE ); \
} \
else \
- aBoxItem.SetLine( NULL, BOXLINE ); \
+ aBoxItem.SetLine( nullptr, BOXLINE ); \
}
void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
@@ -3054,13 +3054,13 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
const ScPatternAttr* pSelAttrs = GetSelectionPattern();
const SfxItemSet& rSelItemSet = pSelAttrs->GetItemSet();
- const SfxPoolItem* pBorderAttr = NULL;
+ const SfxPoolItem* pBorderAttr = nullptr;
SfxItemState eItemState = rSelItemSet.GetItemState( ATTR_BORDER, true, &pBorderAttr );
- const SfxPoolItem* pTLBRItem = 0;
+ const SfxPoolItem* pTLBRItem = nullptr;
SfxItemState eTLBRState = rSelItemSet.GetItemState( ATTR_BORDER_TLBR, true, &pTLBRItem );
- const SfxPoolItem* pBLTRItem = 0;
+ const SfxPoolItem* pBLTRItem = nullptr;
SfxItemState eBLTRState = rSelItemSet.GetItemState( ATTR_BORDER_BLTR, true, &pBLTRItem );
// any of the lines visible?
@@ -3082,7 +3082,7 @@ void ScViewFunc::SetSelectionFrameLines( const SvxBorderLine* pLine,
if( pBorderAttr )
{
- const SvxBorderLine* pBoxLine = NULL;
+ const SvxBorderLine* pBoxLine = nullptr;
SvxBoxItem aBoxItem( *static_cast<const SvxBoxItem*>(pBorderAttr) );
SvxBoxInfoItem aBoxInfoItem( ATTR_BORDER_INNER );
diff --git a/sc/source/ui/view/viewfun3.cxx b/sc/source/ui/view/viewfun3.cxx
index 95ae35f073f7..027f4f86ae40 100644
--- a/sc/source/ui/view/viewfun3.cxx
+++ b/sc/source/ui/view/viewfun3.cxx
@@ -111,7 +111,7 @@ void ScViewFunc::CutToClip( ScDocument* pClipDoc, bool bIncludeObjects )
ScAddress aOldEnd( aRange.aEnd ); // combined cells in this range?
pDoc->ExtendMerge( aRange, true );
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if ( bRecord )
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -249,7 +249,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
if ( bSysClip )
{
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
ScGlobal::SetClipDocName( pDoc->GetDocumentShell()->GetTitle( SFX_TITLE_FULLNAME ) );
}
pClipDoc->ExtendMerge( aRange, true );
@@ -271,7 +271,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
}
pTransferObj->CopyToClipboard( GetActiveWin() );
- SC_MOD()->SetClipObject( pTransferObj, NULL );
+ SC_MOD()->SetClipObject( pTransferObj, nullptr );
}
bDone = true;
@@ -380,7 +380,7 @@ bool ScViewFunc::CopyToClip( ScDocument* pClipDoc, const ScRangeList& rRanges, b
}
pTransferObj->CopyToClipboard( GetActiveWin() ); // system clipboard
- SC_MOD()->SetClipObject( pTransferObj, NULL ); // internal clipboard
+ SC_MOD()->SetClipObject( pTransferObj, nullptr ); // internal clipboard
}
bSuccess = true;
@@ -416,7 +416,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
ScClipParam aClipParam(aRange, false);
pDoc->CopyToClip(aClipParam, pClipDoc, &rMark, false, false, true);
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
pClipDoc->ExtendMerge( aRange, true );
ScDocShell* pDocSh = GetViewData().GetDocShell();
@@ -428,7 +428,7 @@ ScTransferObj* ScViewFunc::CopyToTransferable()
}
}
- return NULL;
+ return nullptr;
}
// P A S T E
@@ -586,8 +586,8 @@ void ScViewFunc::PasteFromSystem()
void ScViewFunc::PasteFromTransferable( const uno::Reference<datatransfer::XTransferable>& rxTransferable )
{
- ScTransferObj *pOwnClip=0;
- ScDrawTransferObj *pDrawClip=0;
+ ScTransferObj *pOwnClip=nullptr;
+ ScDrawTransferObj *pDrawClip=nullptr;
uno::Reference<lang::XUnoTunnel> xTunnel( rxTransferable, uno::UNO_QUERY );
if ( xTunnel.is() )
{
@@ -726,7 +726,7 @@ bool ScViewFunc::PasteFromSystem( SotClipboardFormatId nFormatId, bool bApi )
bRet = PasteDataFormat( nFormatId, aDataHelper.GetTransferable(),
nPosX, nPosY,
- NULL, false, !bApi ); // allow warning dialog
+ nullptr, false, !bApi ); // allow warning dialog
if ( !bRet && !bApi )
ErrorMessage(STR_PASTE_ERROR);
@@ -891,7 +891,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bool bPasteDraw = ( pClipDoc->GetDrawLayer() && ( nFlags & (InsertDeleteFlags::OBJECTS|InsertDeleteFlags::NOTE) ) );
ScDocShellRef aTransShellRef; // for objects in xTransClip - must remain valid as long as xTransClip
- ScDocument* pOrigClipDoc = NULL;
+ ScDocument* pOrigClipDoc = nullptr;
::std::unique_ptr< ScDocument > xTransClip;
if ( bTranspose )
{
@@ -918,7 +918,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
pClipDoc->TransposeClip( xTransClip.get(), nFlags, bAsLink );
pClipDoc = xTransClip.get();
- ScDrawLayer::SetGlobalDrawPersist(NULL);
+ ScDrawLayer::SetGlobalDrawPersist(nullptr);
}
SCCOL nStartCol;
@@ -1179,11 +1179,11 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if (lcl_SelHasAttrib( pDoc, nStartCol,nStartRow, nUndoEndCol,nUndoEndRow, aFilteredMark, HASATTR_OVERLAPPED ))
{ // "Cell merge not possible if cells already merged"
ScDocAttrIterator aIter( pDoc, nStartTab, nStartCol, nStartRow, nUndoEndCol, nUndoEndRow );
- const ScPatternAttr* pPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
SCCOL nCol = -1;
SCROW nRow1 = -1;
SCROW nRow2 = -1;
- while ( ( pPattern = aIter.GetNext( nCol, nRow1, nRow2 ) ) != NULL )
+ while ( ( pPattern = aIter.GetNext( nCol, nRow1, nRow2 ) ) != nullptr )
{
const ScMergeAttr* pMergeFlag = static_cast<const ScMergeAttr*>( &pPattern->GetItem(ATTR_MERGE) );
const ScMergeFlagAttr* pMergeFlagAttr = static_cast<const ScMergeFlagAttr*>( &pPattern->GetItem(ATTR_MERGE_FLAG) );
@@ -1207,9 +1207,9 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
bool bColInfo = ( nStartRow==0 && nEndRow==MAXROW );
bool bRowInfo = ( nStartCol==0 && nEndCol==MAXCOL );
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRefUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRefUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if ( bRecord )
{
@@ -1273,7 +1273,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
// copy normally (original range)
pDoc->CopyFromClip( aUserRange, aFilteredMark, nNoObjFlags,
pRefUndoDoc, pClipDoc, true, false, bIncludeFiltered,
- bSkipEmpty, (bMarkIsFiltered ? &aRangeList : NULL) );
+ bSkipEmpty, (bMarkIsFiltered ? &aRangeList : nullptr) );
// adapt refs manually in case of transpose
if ( bTranspose && bCutMode && (nFlags & InsertDeleteFlags::CONTENTS) )
@@ -1307,13 +1307,13 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
AdjustBlockHeight(); // update row heights before pasting objects
::std::vector< OUString > aExcludedChartNames;
- SdrPage* pPage = NULL;
+ SdrPage* pPage = nullptr;
if ( nFlags & InsertDeleteFlags::OBJECTS )
{
ScDrawView* pScDrawView = GetScDrawView();
- SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : NULL );
- pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : NULL );
+ SdrModel* pModel = ( pScDrawView ? pScDrawView->GetModel() : nullptr );
+ pPage = ( pModel ? pModel->GetPage( static_cast< sal_uInt16 >( nStartTab ) ) : nullptr );
if ( pPage )
{
ScChartHelper::GetChartNames( aExcludedChartNames, pPage );
@@ -1342,7 +1342,7 @@ bool ScViewFunc::PasteFromClip( InsertDeleteFlags nFlags, ScDocument* pClipDoc,
if ( bRecord )
{
- ScDocument* pRedoDoc = NULL;
+ ScDocument* pRedoDoc = nullptr;
// copy redo data after appearance of the first undo
// don't create Redo-Doc without RefUndoDoc
@@ -1571,7 +1571,7 @@ bool ScViewFunc::PasteMultiRangesFromClip(
aOptions.eMoveMode = eMoveMode;
ScUndoPaste* pUndo = new ScUndoPaste(pDocSh,
- aMarkedRange, aMark, pUndoDoc.release(), NULL, nFlags|nUndoFlags, NULL, false, &aOptions);
+ aMarkedRange, aMark, pUndoDoc.release(), nullptr, nFlags|nUndoFlags, nullptr, false, &aOptions);
if (bInsertCells)
pUndoMgr->AddUndoAction(new ScUndoWrapper(pUndo), true);
@@ -1689,7 +1689,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, (nFlags & ~InsertDeleteFlags::OBJECTS), NULL, pClipDoc,
+ *aRanges[i], aMark, (nFlags & ~InsertDeleteFlags::OBJECTS), nullptr, pClipDoc,
false, false, true, bSkipEmpty);
}
@@ -1707,7 +1707,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
for (size_t i = 0, n = aRanges.size(); i < n; ++i)
{
pDoc->CopyFromClip(
- *aRanges[i], aMark, InsertDeleteFlags::OBJECTS, NULL, pClipDoc,
+ *aRanges[i], aMark, InsertDeleteFlags::OBJECTS, nullptr, pClipDoc,
false, false, true, bSkipEmpty);
}
}
@@ -1731,7 +1731,7 @@ bool ScViewFunc::PasteFromClipToMultiRanges(
aOptions.eMoveMode = eMoveMode;
ScUndoPaste* pUndo = new ScUndoPaste(
- pDocSh, aRanges, aMark, pUndoDoc.release(), NULL, nFlags|nUndoFlags, NULL, false, &aOptions);
+ pDocSh, aRanges, aMark, pUndoDoc.release(), nullptr, nFlags|nUndoFlags, nullptr, false, &aOptions);
pUndoMgr->AddUndoAction(pUndo);
pUndoMgr->LeaveListAction();
@@ -1918,9 +1918,9 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
if ( pDoc )
{
const bool bRecord( pDoc->IsUndoEnabled());
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRedoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRedoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
SCTAB nTab = GetViewData().GetTabNo();
SCTAB nStartTab = nTab;
SCTAB nEndTab = nTab;
@@ -1960,7 +1960,7 @@ void ScViewFunc::DataFormPutData( SCROW nCurrentRow ,
nStartCol, nCurrentRow, nStartTab,
nUndoEndCol, nUndoEndRow, nEndTab, rMark,
pUndoDoc, pRedoDoc, nUndoFlags,
- pUndoData, NULL, NULL, NULL,
+ pUndoData, nullptr, nullptr, nullptr,
false ); // FALSE = Redo data not yet copied
pUndoMgr->AddUndoAction( new ScUndoWrapper( pUndo ), true );
diff --git a/sc/source/ui/view/viewfun4.cxx b/sc/source/ui/view/viewfun4.cxx
index 9db01ae474fd..199813fe1d49 100644
--- a/sc/source/ui/view/viewfun4.cxx
+++ b/sc/source/ui/view/viewfun4.cxx
@@ -113,7 +113,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
if (nEndRow > MAXROW)
nEndRow = MAXROW;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -146,7 +146,7 @@ void ScViewFunc::PasteRTF( SCCOL nStartCol, SCROW nStartRow,
aDestMark.SetMarkArea( aMarkRange );
pDocSh->GetUndoManager()->AddUndoAction(
new ScUndoPaste( pDocSh, aMarkRange, aDestMark,
- pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, NULL));
+ pUndoDoc, pRedoDoc, InsertDeleteFlags::ALL, nullptr));
}
}
@@ -205,7 +205,7 @@ void ScViewFunc::DoRefConversion( bool bRecord )
ScDocShell* pDocSh = GetViewData().GetDocShell();
bool bOk = false;
- ScDocument* pUndoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -309,7 +309,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
ScMarkData& rMark = GetViewData().GetMarkData();
ScSplitPos eWhich = GetViewData().GetActivePart();
EESpellState eState;
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
std::unique_ptr<ESelection> pEditSel;
std::unique_ptr<ScEditEngineDefaulter> pThesaurusEngine;
bool bIsEditMode = GetViewData().HasEditView(eWhich);
@@ -352,7 +352,7 @@ void ScViewFunc::DoThesaurus( bool bRecord )
pThesaurusEngine->SetRefDevice(GetViewData().GetActiveWin());
pThesaurusEngine->SetSpeller(xSpeller);
MakeEditView(pThesaurusEngine.get(), nCol, nRow );
- const ScPatternAttr* pPattern = NULL;
+ const ScPatternAttr* pPattern = nullptr;
std::unique_ptr<SfxItemSet> pEditDefaults(
new SfxItemSet(pThesaurusEngine->GetEmptyItemSet()));
pPattern = rDoc.GetPattern(nCol, nRow, nTab);
@@ -435,7 +435,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
ScDocument& rDoc = pDocSh->GetDocument();
ScMarkData& rMark = rViewData.GetMarkData();
ScSplitPos eWhich = rViewData.GetActivePart();
- EditView* pEditView = NULL;
+ EditView* pEditView = nullptr;
bool bIsEditMode = rViewData.HasEditView(eWhich);
if (bRecord && !rDoc.IsUndoEnabled())
bRecord = false;
@@ -465,8 +465,8 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
}
}
- ScDocument* pUndoDoc = NULL;
- ScDocument* pRedoDoc = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScDocument* pRedoDoc = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -554,7 +554,7 @@ void ScViewFunc::DoSheetConversion( const ScConversionParam& rConvParam, bool bR
// *** final cleanup *** --------------------------------------------------
- rViewData.SetSpellingView( NULL );
+ rViewData.SetSpellingView( nullptr );
KillEditView(true);
pEngine.reset();
pDocSh->PostPaintGridAll();
@@ -575,7 +575,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
if( ::avmedia::MediaWindow::isMediaURL( aStrURL, ""/*TODO?*/ ) )
{
const SfxStringItem aMediaURLItem( SID_INSERT_AVMEDIA, aStrURL );
- return ( 0 != GetViewData().GetDispatcher().Execute(
+ return ( nullptr != GetViewData().GetDispatcher().Execute(
SID_INSERT_AVMEDIA, SfxCallMode::SYNCHRON,
&aMediaURLItem, 0L ) );
}
@@ -583,7 +583,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
if (!bLink) // for bLink only graphics or URL
{
// 1. can I open the file?
- const SfxFilter* pFlt = NULL;
+ const SfxFilter* pFlt = nullptr;
// search only for its own filters, without selection box (as in ScDocumentLoader)
SfxFilterMatcher aMatcher( ScDocShell::Factory().GetFilterContainer()->GetName() );
@@ -604,7 +604,7 @@ bool ScViewFunc::PasteFile( const Point& rPos, const OUString& rFile, bool bLink
// Open Asynchronously, because it can also happen from D&D
// and that is not so good for the MAC...
- return ( 0 != rDispatcher.Execute( SID_OPENDOC,
+ return ( nullptr != rDispatcher.Execute( SID_OPENDOC,
SfxCallMode::ASYNCHRON, &aFileNameItem, &aFilterItem, &aTargetItem, 0L) );
}
}
@@ -722,7 +722,7 @@ void ScViewFunc::InsertBookmark( const OUString& rDescription, const OUString& r
sal_Int32 nTxtLen = aEngine.GetTextLen(nPara);
ESelection aInsSel( nPara, nTxtLen, nPara, nTxtLen );
- if ( bTryReplace && HasBookmarkAtCursor( NULL ) )
+ if ( bTryReplace && HasBookmarkAtCursor( nullptr ) )
{
// if called from hyperlink slot and cell contains only a URL,
// replace old URL with new one
diff --git a/sc/source/ui/view/viewfun5.cxx b/sc/source/ui/view/viewfun5.cxx
index 3e0f57302a82..260f4f8efa46 100644
--- a/sc/source/ui/view/viewfun5.cxx
+++ b/sc/source/ui/view/viewfun5.cxx
@@ -307,7 +307,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
// make sense to do it for other data types too.
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
std::unique_ptr<AbstractScTextImportOptionsDlg> pDlg(
- pFact->CreateScTextImportOptionsDlg(NULL));
+ pFact->CreateScTextImportOptionsDlg(nullptr));
if (pDlg->Execute() == RET_OK)
{
@@ -336,7 +336,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScAbstractDialogFactory* pFact =
ScAbstractDialogFactory::Create();
std::unique_ptr<AbstractScImportAsciiDlg> pDlg(
- pFact->CreateScImportAsciiDlg( NULL, OUString(), &aStrm,
+ pFact->CreateScImportAsciiDlg( nullptr, OUString(), &aStrm,
SC_PASTETEXT));
if (pDlg->Execute() == RET_OK)
@@ -492,7 +492,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
ScDocShellRef aDragShellRef( new ScDocShell );
aDragShellRef->DoInitNew();
- std::unique_ptr<FmFormModel> pModel(new FmFormModel( aPath, NULL, aDragShellRef ));
+ std::unique_ptr<FmFormModel> pModel(new FmFormModel( aPath, nullptr, aDragShellRef ));
pModel->GetItemPool().FreezeIdRanges();
xStm->Seek(0);
@@ -544,7 +544,7 @@ bool ScViewFunc::PasteDataFormat( SotClipboardFormatId nFormatId,
{
ScRange aSource;
const ScExtDocOptions* pExtOpt = pInsDoc->GetExtDocOptions();
- const ScExtTabSettings* pTabSett = pExtOpt ? pExtOpt->GetTabSettings( nSrcTab ) : 0;
+ const ScExtTabSettings* pTabSett = pExtOpt ? pExtOpt->GetTabSettings( nSrcTab ) : nullptr;
if( pTabSett && pTabSett->maUsedArea.IsValid() )
{
aSource = pTabSett->maUsedArea;
@@ -693,7 +693,7 @@ bool ScViewFunc::PasteLink( const uno::Reference<datatransfer::XTransferable>& r
const OUString* pApp = &aStrs[0];
const OUString* pTopic = &aStrs[1];
const OUString* pItem = &aStrs[2];
- const OUString* pExtra = NULL;
+ const OUString* pExtra = nullptr;
if (aStrs.size() > 3)
pExtra = &aStrs[3];
diff --git a/sc/source/ui/view/viewfun7.cxx b/sc/source/ui/view/viewfun7.cxx
index 79da9e04d826..8cf5de5673a0 100644
--- a/sc/source/ui/view/viewfun7.cxx
+++ b/sc/source/ui/view/viewfun7.cxx
@@ -93,7 +93,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
bool bNegativePage = GetViewData().GetDocument()->IsNegativePage( GetViewData().GetTabNo() );
- SdrView* pDragEditView = NULL;
+ SdrView* pDragEditView = nullptr;
ScModule* pScMod = SC_MOD();
const ScDragData& rData = pScMod->GetDragData();
ScDrawTransferObj* pDrawTrans = rData.pDrawTransfer;
@@ -157,7 +157,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
SdrObject* pNeuObj=pObj->Clone();
- if (pNeuObj!=NULL)
+ if (pNeuObj!=nullptr)
{
pNeuObj->SetModel(pDrawModel);
pNeuObj->SetPage(pDestPage);
@@ -182,7 +182,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
ScDocument* pDocument = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr );
if ( pDocument && pDestPage && pModelObj && pDrawTrans )
{
const ScRangeListVector& rProtectedChartRangesVector( pDrawTrans->GetProtectedChartRangesVector() );
@@ -223,7 +223,7 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
if ( !bSameDocClipboard )
GetViewData().GetDocument()->SetPastingDrawFromOtherDoc( true );
- pScDrawView->Paste(*pModel, aPos, NULL, nOptions, rSrcShellID, rDestShellID);
+ pScDrawView->Paste(*pModel, aPos, nullptr, nOptions, rSrcShellID, rDestShellID);
if ( !bSameDocClipboard )
GetViewData().GetDocument()->SetPastingDrawFromOtherDoc( false );
@@ -251,8 +251,8 @@ void ScViewFunc::PasteDraw( const Point& rLogicPos, SdrModel* pModel,
ScDocument* pDocument = GetViewData().GetDocument();
ScDocShell* pDocShell = GetViewData().GetDocShell();
- ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : NULL );
- ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( NULL );
+ ScModelObj* pModelObj = ( pDocShell ? ScModelObj::getImplementation( pDocShell->GetModel() ) : nullptr );
+ ScDrawTransferObj* pTransferObj = ScDrawTransferObj::GetOwnClipboard( nullptr );
if ( pDocument && pPage && pModelObj && ( pTransferObj || pDrawTrans ) )
{
const ScRangeListVector& rProtectedChartRangesVector(
@@ -390,7 +390,7 @@ bool ScViewFunc::PasteGraphic( const Point& rPos, const Graphic& rGraphic,
SdrPageView* pPageView = pScDrawView->GetSdrPageView();
if (pPageView)
{
- SdrObject* pPickObj = 0;
+ SdrObject* pPickObj = nullptr;
if (pScDrawView->PickObj(rPos, pScDrawView->getHitTolLog(), pPickObj, pPageView))
{
const OUString aBeginUndo(ScGlobal::GetRscString(STR_UNDO_DRAGDROP));
diff --git a/sc/source/ui/view/viewfunc.cxx b/sc/source/ui/view/viewfunc.cxx
index 2bff93479c03..c5f6f8fda02c 100644
--- a/sc/source/ui/view/viewfunc.cxx
+++ b/sc/source/ui/view/viewfunc.cxx
@@ -662,7 +662,7 @@ void ScViewFunc::EnterData( SCCOL nCol, SCROW nRow, SCTAB nTab,
// undo
- EditTextObject* pUndoData = NULL;
+ EditTextObject* pUndoData = nullptr;
ScUndoEnterData::ValuesType aOldValues;
if (bRecord && !bSimple)
@@ -774,7 +774,7 @@ void ScViewFunc::EnterMatrix( const OUString& rString, ::formula::FormulaGrammar
{
ScDocShell* pDocSh = rData.GetDocShell();
bool bSuccess = pDocSh->GetDocFunc().EnterMatrix(
- aRange, &rMark, NULL, rString, false, false, EMPTY_OUSTRING, eGram );
+ aRange, &rMark, nullptr, rString, false, false, EMPTY_OUSTRING, eGram );
if (bSuccess)
pDocSh->UpdateOle(&GetViewData());
}
@@ -1148,8 +1148,8 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
SCROW nEndRow = aMarkRange.aEnd.Row();
SCTAB nEndTab = aMarkRange.aEnd.Tab();
- ScUndoSelectionAttr* pUndoAttr = NULL;
- ScEditDataArray* pEditDataArray = NULL;
+ ScUndoSelectionAttr* pUndoAttr = nullptr;
+ ScEditDataArray* pEditDataArray = nullptr;
if (bRecord)
{
ScRange aCopyRange = aMarkRange;
@@ -1188,16 +1188,16 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
SCROW nRow = rViewData.GetCurY();
SCTAB nTab = rViewData.GetTabNo();
- EditTextObject* pOldEditData = NULL;
- EditTextObject* pNewEditData = NULL;
+ EditTextObject* pOldEditData = nullptr;
+ EditTextObject* pNewEditData = nullptr;
ScAddress aPos(nCol, nRow, nTab);
if (rDoc.GetCellType(aPos) == CELLTYPE_EDIT)
{
const EditTextObject* pEditObj = rDoc.GetEditText(aPos);
- pOldEditData = pEditObj ? pEditObj->Clone() : NULL;
+ pOldEditData = pEditObj ? pEditObj->Clone() : nullptr;
rDoc.RemoveEditTextCharAttribs(aPos, rAttr);
pEditObj = rDoc.GetEditText(aPos);
- pNewEditData = pEditObj ? pEditObj->Clone() : NULL;
+ pNewEditData = pEditObj ? pEditObj->Clone() : nullptr;
}
aChangeRanges.Append(aPos);
@@ -1231,7 +1231,7 @@ void ScViewFunc::ApplySelectionPattern( const ScPatternAttr& rAttr,
PropertyEntryVector_t aPropVector = rMap.getPropertyEntries();
for ( sal_uInt16 nWhich = ATTR_PATTERN_START; nWhich <= ATTR_PATTERN_END; ++nWhich )
{
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
if ( rNewSet.GetItemState( nWhich, true, &pItem ) == SfxItemState::SET && pItem )
{
PropertyEntryVector_t::const_iterator aIt = aPropVector.begin();
@@ -1280,7 +1280,7 @@ const SfxStyleSheet* ScViewFunc::GetStyleSheetFromMarked()
// Don't use UnmarkFiltered in slot state functions, for performance reasons.
// The displayed state is always that of the whole selection including filtered rows.
- const ScStyleSheet* pSheet = NULL;
+ const ScStyleSheet* pSheet = nullptr;
ScViewData& rViewData = GetViewData();
ScDocument* pDoc = rViewData.GetDocument();
ScMarkData& rMark = rViewData.GetMarkData();
@@ -1640,8 +1640,8 @@ void ScViewFunc::DeleteMulti( bool bRows, bool bRecord )
WaitObject aWait( GetFrameWin() ); // important for TrackFormulas in UpdateReference
- ScDocument* pUndoDoc = NULL;
- ScRefUndoData* pUndoData = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScRefUndoData* pUndoData = nullptr;
if (bRecord)
{
pUndoDoc = new ScDocument( SCDOCMODE_UNDO );
@@ -1877,8 +1877,8 @@ void ScViewFunc::SetWidthOrHeight(
bFormula = rOpts.GetOption( VOPT_FORMULAS );
}
- ScDocument* pUndoDoc = NULL;
- ScOutlineTable* pUndoTab = NULL;
+ ScDocument* pUndoDoc = nullptr;
+ ScOutlineTable* pUndoTab = nullptr;
std::vector<sc::ColRowSpan> aUndoRanges;
if ( bRecord )
@@ -1945,7 +1945,7 @@ void ScViewFunc::SetWidthOrHeight(
for (SCROW nRow = nStartNo; nRow <= nEndNo; ++nRow)
{
SCROW nLastRow = nRow;
- if (rDoc.RowHidden(nRow, nTab, NULL, &nLastRow))
+ if (rDoc.RowHidden(nRow, nTab, nullptr, &nLastRow))
{
nRow = nLastRow;
continue;
@@ -2671,7 +2671,7 @@ bool ScViewFunc::InsertName( const OUString& rName, const OUString& rSymbol,
if ( pList->insert( pNewEntry ) )
bOk = true;
- pNewEntry = NULL; // never delete, insert took ownership
+ pNewEntry = nullptr; // never delete, insert took ownership
rDoc.CompileHybridFormula();
diff --git a/sc/source/ui/view/viewutil.cxx b/sc/source/ui/view/viewutil.cxx
index aba3a38b5e55..4f71d63bfc8e 100644
--- a/sc/source/ui/view/viewutil.cxx
+++ b/sc/source/ui/view/viewutil.cxx
@@ -256,7 +256,7 @@ void ScViewUtil::UnmarkFiltered( ScMarkData& rMark, ScDocument* pDoc )
for (SCROW nRow = nStartRow; nRow <= nEndRow; ++nRow)
{
SCROW nLastRow = nRow;
- if (pDoc->RowFiltered(nRow, nTab, NULL, &nLastRow))
+ if (pDoc->RowFiltered(nRow, nTab, nullptr, &nLastRow))
{
// use nStartCol/nEndCol, so the multi mark area isn't extended to all columns
// (visible in repaint for indentation)
@@ -368,7 +368,7 @@ bool ScViewUtil::ExecuteCharMap( const SvxFontItem& rOldFont,
bool ScViewUtil::IsFullScreen( SfxViewShell& rViewShell )
{
SfxBindings& rBindings = rViewShell.GetViewFrame()->GetBindings();
- SfxPoolItem* pItem = 0;
+ SfxPoolItem* pItem = nullptr;
bool bIsFullScreen = false;
if (rBindings.QueryState( SID_WIN_FULLSCREEN, pItem ) >= SfxItemState::DEFAULT)