summaryrefslogtreecommitdiff
path: root/sc/source/ui/unoobj/docuno.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sc/source/ui/unoobj/docuno.cxx')
-rw-r--r--sc/source/ui/unoobj/docuno.cxx92
1 files changed, 46 insertions, 46 deletions
diff --git a/sc/source/ui/unoobj/docuno.cxx b/sc/source/ui/unoobj/docuno.cxx
index 69a5cb3133ae..36ba321ce0e7 100644
--- a/sc/source/ui/unoobj/docuno.cxx
+++ b/sc/source/ui/unoobj/docuno.cxx
@@ -368,8 +368,8 @@ ScModelObj::ScModelObj( ScDocShell* pDocSh ) :
SfxBaseModel( pDocSh ),
aPropSet( lcl_GetDocOptPropertyMap() ),
pDocShell( pDocSh ),
- pPrintFuncCache( NULL ),
- pPrinterOptions( NULL ),
+ pPrintFuncCache( nullptr ),
+ pPrinterOptions( nullptr ),
maChangesListeners( m_aMutex )
{
// pDocShell may be NULL if this is the base of a ScDocOptionsObj
@@ -410,7 +410,7 @@ uno::Reference< uno::XAggregation> ScModelObj::GetFormatter()
}
// beim setDelegator darf die zusaetzliche Ref nicht mehr existieren
- xFormatter = NULL;
+ xFormatter = nullptr;
if (xNumberAgg.is())
xNumberAgg->setDelegator( static_cast<cppu::OWeakObject*>(this) );
@@ -423,7 +423,7 @@ ScDocument* ScModelObj::GetDocument() const
{
if (pDocShell)
return &pDocShell->GetDocument();
- return NULL;
+ return nullptr;
}
SfxObjectShell* ScModelObj::GetEmbeddedObject() const
@@ -453,7 +453,7 @@ ScSheetSaveData* ScModelObj::GetSheetSaveData()
{
if (pDocShell)
return pDocShell->GetSheetSaveData();
- return NULL;
+ return nullptr;
}
void ScModelObj::RepaintRange( const ScRange& rRange )
@@ -724,7 +724,7 @@ OString ScModelObj::getTextSelection(const char* pMimeType, OString& rUsedMimeTy
if (( pShell = dynamic_cast<ScEditShell*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) )) )
xTransferable = pShell->GetEditView()->GetTransferable();
- else if ( 0 != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
+ else if ( nullptr != dynamic_cast<ScDrawTextObjectBar*>( pViewData->GetViewShell()->GetViewFrame()->GetDispatcher()->GetShell(0) ))
{
ScDrawView* pView = pViewData->GetScDrawView();
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
@@ -1034,14 +1034,14 @@ void ScModelObj::Notify( SfxBroadcaster& rBC, const SfxHint& rHint )
sal_uLong nId = pSimpleHint->GetId();
if ( nId == SFX_HINT_DYING )
{
- pDocShell = NULL; // has become invalid
+ pDocShell = nullptr; // has become invalid
if (xNumberAgg.is())
{
SvNumberFormatsSupplierObj* pNumFmt =
SvNumberFormatsSupplierObj::getImplementation(
uno::Reference<util::XNumberFormatsSupplier>(xNumberAgg, uno::UNO_QUERY) );
if ( pNumFmt )
- pNumFmt->SetNumberFormatter( NULL );
+ pNumFmt->SetNumberFormatter( nullptr );
}
DELETEZ( pPrintFuncCache ); // must be deleted because it has a pointer to the DocShell
@@ -1100,7 +1100,7 @@ uno::Reference<sheet::XSpreadsheets> SAL_CALL ScModelObj::getSheets() throw(uno:
SolarMutexGuard aGuard;
if (pDocShell)
return new ScTableSheetsObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XStyleFamiliesSupplier
@@ -1111,14 +1111,14 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getStyleFamilies()
SolarMutexGuard aGuard;
if (pDocShell)
return new ScStyleFamiliesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XRenderable
static OutputDevice* lcl_GetRenderDevice( const uno::Sequence<beans::PropertyValue>& rOptions )
{
- OutputDevice* pRet = NULL;
+ OutputDevice* pRet = nullptr;
const beans::PropertyValue* pPropArray = rOptions.getConstArray();
long nPropCount = rOptions.getLength();
for (long i = 0; i < nPropCount; i++)
@@ -1285,7 +1285,7 @@ bool ScModelObj::FillRenderMarkData( const uno::Any& aSelection,
uno::Reference< drawing::XShapes > xShapes( xInterface, uno::UNO_QUERY );
if ( pSelObj && pSelObj->GetDocShell() == pDocShell )
{
- bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != NULL );
+ bool bSheet = ( ScTableSheetObj::getImplementation( xInterface ) != nullptr );
bool bCursor = pSelObj->IsCursorOnly();
const ScRangeList& rRanges = pSelObj->GetRangeList();
@@ -1506,7 +1506,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1524,7 +1524,7 @@ uno::Sequence<beans::PropertyValue> SAL_CALL ScModelObj::getRenderer( sal_Int32
long nDisplayStart = pPrintFuncCache->GetDisplayStart( nTab );
long nTabStart = pPrintFuncCache->GetTabStart( nTab );
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, false, nullptr );
ScRange aCellRange;
bool bWasCellRange = aFunc.GetLastSourceRange( aCellRange );
@@ -1592,7 +1592,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
SCTAB nTab = pPrintFuncCache->GetTabForPage( nRenderer );
ScDocument& rDoc = pDocShell->GetDocument();
- FmFormView* pDrawView = NULL;
+ FmFormView* pDrawView = nullptr;
ScDrawLayer* pModel = rDoc.GetDrawLayer();
@@ -1604,7 +1604,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
ScRange aRange;
- const ScRange* pSelRange = NULL;
+ const ScRange* pSelRange = nullptr;
if ( aMark.IsMarked() )
{
aMark.GetMarkArea( aRange );
@@ -1654,7 +1654,7 @@ void SAL_CALL ScModelObj::render( sal_Int32 nSelRenderer, const uno::Any& aSelec
}
}
- (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, NULL );
+ (void)aFunc.DoPrint( aPage, nTabStart, nDisplayStart, true, nullptr );
// resolve the hyperlinks for PDF export
@@ -1761,7 +1761,7 @@ uno::Reference<container::XNameAccess> SAL_CALL ScModelObj::getLinks() throw(uno
SolarMutexGuard aGuard;
if (pDocShell)
return new ScLinkTargetTypesObj(pDocShell);
- return NULL;
+ return nullptr;
}
// XActionLockable
@@ -1926,7 +1926,7 @@ uno::Reference<drawing::XDrawPages> SAL_CALL ScModelObj::getDrawPages() throw(un
return new ScDrawPagesObj(pDocShell);
OSL_FAIL("keine DocShell"); //! Exception oder so?
- return NULL;
+ return nullptr;
}
// XGoalSeek
@@ -2307,7 +2307,7 @@ uno::Any SAL_CALL ScModelObj::getPropertyValue( const OUString& aPropertyName )
}
else if ( aString == SC_UNO_HASDRAWPAGES )
{
- ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != 0) );
+ ScUnoHelpFunctions::SetBoolInAny( aRet, (pDocShell->GetDocument().GetDrawLayer() != nullptr) );
}
else if ( aString == SC_UNO_BASICLIBRARIES )
{
@@ -2446,7 +2446,7 @@ css::uno::Reference<css::uno::XInterface> ScModelObj::create(
try
{
- xRet = arguments == 0
+ xRet = arguments == nullptr
? SvxFmMSFactory::createInstance(aServiceSpecifier)
: SvxFmMSFactory::createInstanceWithArguments(
aServiceSpecifier, *arguments);
@@ -2475,7 +2475,7 @@ uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstance(
throw(uno::Exception, uno::RuntimeException, std::exception)
{
SolarMutexGuard aGuard;
- return create(aServiceSpecifier, 0);
+ return create(aServiceSpecifier, nullptr);
}
uno::Reference<uno::XInterface> SAL_CALL ScModelObj::createInstanceWithArguments(
@@ -2593,7 +2593,7 @@ const uno::Sequence<sal_Int8>& ScModelObj::getUnoTunnelId()
ScModelObj* ScModelObj::getImplementation(const uno::Reference<uno::XInterface>& rObj)
{
- ScModelObj* pRet = NULL;
+ ScModelObj* pRet = nullptr;
uno::Reference<lang::XUnoTunnel> xUT(rObj, uno::UNO_QUERY);
if (xUT.is())
pRet = reinterpret_cast<ScModelObj*>(sal::static_int_cast<sal_IntPtr>(xUT->getSomething(getUnoTunnelId())));
@@ -2958,7 +2958,7 @@ void ScDrawPagesObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -2978,7 +2978,7 @@ uno::Reference<drawing::XDrawPage> ScDrawPagesObj::GetObjectByIndex_Impl(sal_Int
}
}
}
- return NULL;
+ return nullptr;
}
// XDrawPages
@@ -3070,7 +3070,7 @@ void ScTableSheetsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3081,7 +3081,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nIndex >= 0 && nIndex < pDocShell->GetDocument().GetTableCount() )
return new ScTableSheetObj( pDocShell, static_cast<SCTAB>(nIndex) );
- return NULL;
+ return nullptr;
}
ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3092,7 +3092,7 @@ ScTableSheetObj* ScTableSheetsObj::GetObjectByName_Impl(const OUString& aName) c
if ( pDocShell->GetDocument().GetTable( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nIndex );
}
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableSheetsObj::insertNewByName( const OUString& aName, sal_Int16 nPosition )
@@ -3482,7 +3482,7 @@ void ScTableColumnsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3494,7 +3494,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) con
if ( pDocShell && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName) const
@@ -3505,7 +3505,7 @@ ScTableColumnObj* ScTableColumnsObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && nCol >= nStartCol && nCol <= nEndCol )
return new ScTableColumnObj( pDocShell, nCol, nTab );
- return NULL;
+ return nullptr;
}
void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3518,7 +3518,7 @@ void SAL_CALL ScTableColumnsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 n
{
ScRange aRange( (SCCOL)(nStartCol+nPosition), 0, nTab,
(SCCOL)(nStartCol+nPosition+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSCOLS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSCOLS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3534,7 +3534,7 @@ void SAL_CALL ScTableColumnsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCou
{
ScRange aRange( (SCCOL)(nStartCol+nIndex), 0, nTab,
(SCCOL)(nStartCol+nIndex+nCount-1), MAXROW, nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELCOLS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELCOLS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3750,7 +3750,7 @@ void ScTableRowsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -3762,7 +3762,7 @@ ScTableRowObj* ScTableRowsObj::GetObjectByIndex_Impl(sal_Int32 nIndex) const
if ( pDocShell && nRow <= nEndRow )
return new ScTableRowObj( pDocShell, nRow, nTab );
- return NULL; // falscher Index
+ return nullptr; // falscher Index
}
void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCount )
@@ -3775,7 +3775,7 @@ void SAL_CALL ScTableRowsObj::insertByIndex( sal_Int32 nPosition, sal_Int32 nCou
{
ScRange aRange( 0, (SCROW)(nStartRow+nPosition), nTab,
MAXCOL, (SCROW)(nStartRow+nPosition+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().InsertCells( aRange, NULL, INS_INSROWS_BEFORE, true, true );
+ bDone = pDocShell->GetDocFunc().InsertCells( aRange, nullptr, INS_INSROWS_BEFORE, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3791,7 +3791,7 @@ void SAL_CALL ScTableRowsObj::removeByIndex( sal_Int32 nIndex, sal_Int32 nCount
{
ScRange aRange( 0, (SCROW)(nStartRow+nIndex), nTab,
MAXCOL, (SCROW)(nStartRow+nIndex+nCount-1), nTab );
- bDone = pDocShell->GetDocFunc().DeleteCells( aRange, NULL, DEL_DELROWS, true, true );
+ bDone = pDocShell->GetDocFunc().DeleteCells( aRange, nullptr, DEL_DELROWS, true, true );
}
if (!bDone)
throw uno::RuntimeException(); // no other exceptions specified
@@ -3972,7 +3972,7 @@ uno::Any SAL_CALL ScTableRowsObj::getPropertyValue( const OUString& aPropertyNam
else if ( aNameString == SC_UNONAME_CELLVIS )
{
SCROW nLastRow;
- bool bVis = !rDoc.RowHidden(nStartRow, nTab, NULL, &nLastRow);
+ bool bVis = !rDoc.RowHidden(nStartRow, nTab, nullptr, &nLastRow);
ScUnoHelpFunctions::SetBoolInAny( aAny, bVis );
}
else if ( aNameString == SC_UNONAME_CELLFILT )
@@ -4025,7 +4025,7 @@ void ScSpreadsheetSettingsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4035,7 +4035,7 @@ uno::Reference<beans::XPropertySetInfo> SAL_CALL ScSpreadsheetSettingsObj::getPr
throw(uno::RuntimeException, std::exception)
{
//! muss noch
- return NULL;
+ return nullptr;
}
void SAL_CALL ScSpreadsheetSettingsObj::setPropertyValue(
@@ -4079,7 +4079,7 @@ void ScAnnotationsObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4101,7 +4101,7 @@ ScAnnotationObj* ScAnnotationsObj::GetObjectByIndex_Impl( sal_Int32 nIndex ) con
if ( GetAddressByIndex_Impl( nIndex, aPos ) )
return new ScAnnotationObj( pDocShell, aPos );
}
- return NULL;
+ return nullptr;
}
// XSheetAnnotations
@@ -4115,7 +4115,7 @@ void SAL_CALL ScAnnotationsObj::insertNew(
{
OSL_ENSURE( aPosition.Sheet == nTab, "addAnnotation mit falschem Sheet" );
ScAddress aPos( (SCCOL)aPosition.Column, (SCROW)aPosition.Row, nTab );
- pDocShell->GetDocFunc().ReplaceNote( aPos, rText, 0, 0, true );
+ pDocShell->GetDocFunc().ReplaceNote( aPos, rText, nullptr, nullptr, true );
}
}
@@ -4213,7 +4213,7 @@ void ScScenariosObj::Notify( SfxBroadcaster&, const SfxHint& rHint )
else if ( dynamic_cast<const SfxSimpleHint*>(&rHint) &&
static_cast<const SfxSimpleHint&>(rHint).GetId() == SFX_HINT_DYING )
{
- pDocShell = NULL; // ungueltig geworden
+ pDocShell = nullptr; // ungueltig geworden
}
}
@@ -4246,7 +4246,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByIndex_Impl(sal_Int32 nIndex)
if ( pDocShell && nIndex >= 0 && nIndex < nCount )
return new ScTableSheetObj( pDocShell, nTab+static_cast<SCTAB>(nIndex)+1 );
- return NULL; // kein Dokument oder falscher Index
+ return nullptr; // kein Dokument oder falscher Index
}
ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
@@ -4255,7 +4255,7 @@ ScTableSheetObj* ScScenariosObj::GetObjectByName_Impl(const OUString& aName)
if ( pDocShell && GetScenarioIndex_Impl( aName, nIndex ) )
return new ScTableSheetObj( pDocShell, nTab+nIndex+1 );
- return NULL; // nicht gefunden
+ return nullptr; // nicht gefunden
}
void SAL_CALL ScScenariosObj::addNewByName( const OUString& aName,