summaryrefslogtreecommitdiff
path: root/svx/source/unodraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/unodraw')
-rw-r--r--svx/source/unodraw/UnoGraphicExporter.cxx26
-rw-r--r--svx/source/unodraw/UnoNameItemTable.cxx2
-rw-r--r--svx/source/unodraw/UnoNamespaceMap.cxx10
-rw-r--r--svx/source/unodraw/XPropertyTable.cxx20
-rw-r--r--svx/source/unodraw/recoveryui.cxx2
-rw-r--r--svx/source/unodraw/shapeimpl.hxx6
-rw-r--r--svx/source/unodraw/unobrushitemhelper.cxx2
-rw-r--r--svx/source/unodraw/unomlstr.cxx2
-rw-r--r--svx/source/unodraw/unomod.cxx12
-rw-r--r--svx/source/unodraw/unomtabl.cxx2
-rw-r--r--svx/source/unodraw/unopage.cxx58
-rw-r--r--svx/source/unodraw/unopool.cxx6
-rw-r--r--svx/source/unodraw/unoprov.cxx10
-rw-r--r--svx/source/unodraw/unoshap2.cxx16
-rw-r--r--svx/source/unodraw/unoshap3.cxx10
-rw-r--r--svx/source/unodraw/unoshap4.cxx8
-rw-r--r--svx/source/unodraw/unoshape.cxx166
-rw-r--r--svx/source/unodraw/unoshtxt.cxx88
18 files changed, 223 insertions, 223 deletions
diff --git a/svx/source/unodraw/UnoGraphicExporter.cxx b/svx/source/unodraw/UnoGraphicExporter.cxx
index dbd32b3951a4..a52ee9951aa4 100644
--- a/svx/source/unodraw/UnoGraphicExporter.cxx
+++ b/svx/source/unodraw/UnoGraphicExporter.cxx
@@ -262,7 +262,7 @@ namespace {
Size* CalcSize( sal_Int32 nWidth, sal_Int32 nHeight, const Size& aBoundSize, Size& aOutSize )
{
if( (nWidth == 0) && (nHeight == 0) )
- return NULL;
+ return nullptr;
if( (nWidth == 0) && (nHeight != 0) && (aBoundSize.Height() != 0) )
{
@@ -311,10 +311,10 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec
if(pObject)
{
SdrPage* pPage = mpCurrentPage;
- if( pPage == 0 )
+ if( pPage == nullptr )
pPage = pObject->GetPage();
- if( (pPage == 0) || pPage->checkVisibility(rOriginal, rDisplayInfo, false) )
+ if( (pPage == nullptr) || pPage->checkVisibility(rOriginal, rDisplayInfo, false) )
{
return sdr::contact::ViewObjectContactRedirector::createRedirectedPrimitive2DSequence(rOriginal, rDisplayInfo);
}
@@ -329,7 +329,7 @@ drawinglayer::primitive2d::Primitive2DSequence ImplExportCheckVisisbilityRedirec
}
GraphicExporter::GraphicExporter()
-: mpUnoPage( NULL ), mnPageNumber(-1), mpCurrentPage(0), mpDoc( NULL )
+: mpUnoPage( nullptr ), mnPageNumber(-1), mpCurrentPage(nullptr), mpDoc( nullptr )
{
}
@@ -384,7 +384,7 @@ IMPL_LINK_TYPED(GraphicExporter, CalcFieldValueHdl, EditFieldInfo*, pInfo, void)
maOldCalcFieldValueHdl.Call( pInfo );
if( pInfo && mpCurrentPage )
- pInfo->SetSdrPage( 0 );
+ pInfo->SetSdrPage( nullptr );
}
/** creates an virtual device for the given page
@@ -633,7 +633,7 @@ bool GraphicExporter::GetGraphic( ExportSettings& rSettings, Graphic& aGraphic,
EEControlBits nCntrl = nOldCntrl & ~EEControlBits::ONLINESPELLING;
rOutl.SetControlWord(nCntrl);
- SdrObject* pTempBackgroundShape = 0;
+ SdrObject* pTempBackgroundShape = nullptr;
std::vector< SdrObject* > aShapes;
bool bRet = true;
@@ -1001,10 +1001,10 @@ sal_Bool SAL_CALL GraphicExporter::filter( const Sequence< PropertyValue >& aDes
{
::SolarMutexGuard aGuard;
- if( NULL == mpUnoPage )
+ if( nullptr == mpUnoPage )
return sal_False;
- if( NULL == mpUnoPage->GetSdrPage() || NULL == mpDoc )
+ if( nullptr == mpUnoPage->GetSdrPage() || nullptr == mpDoc )
return sal_False;
GraphicFilter &rFilter = GraphicFilter::GetGraphicFilter();
@@ -1090,8 +1090,8 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
{
::SolarMutexGuard aGuard;
- mxShapes = NULL;
- mpUnoPage = NULL;
+ mxShapes = nullptr;
+ mpUnoPage = nullptr;
try
{
@@ -1114,13 +1114,13 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
}
else
{
- mxShapes = NULL;
+ mxShapes = nullptr;
}
// Step 2: try a shape
if( mxShape.is() )
{
- if( NULL == GetSdrObjectFromXShape( mxShape ) )
+ if( nullptr == GetSdrObjectFromXShape( mxShape ) )
break;
// get page for this shape
@@ -1148,7 +1148,7 @@ void SAL_CALL GraphicExporter::setSourceDocument( const Reference< lang::XCompon
mpUnoPage = SvxDrawPage::getImplementation( mxPage );
- if( NULL == mpUnoPage || NULL == mpUnoPage->GetSdrPage() )
+ if( nullptr == mpUnoPage || nullptr == mpUnoPage->GetSdrPage() )
break;
mpDoc = mpUnoPage->GetSdrPage()->GetModel();
diff --git a/svx/source/unodraw/UnoNameItemTable.cxx b/svx/source/unodraw/UnoNameItemTable.cxx
index 7ef71b97a4bc..e21736f7d7b1 100644
--- a/svx/source/unodraw/UnoNameItemTable.cxx
+++ b/svx/source/unodraw/UnoNameItemTable.cxx
@@ -37,7 +37,7 @@ using namespace ::cppu;
SvxUnoNameItemTable::SvxUnoNameItemTable( SdrModel* pModel, sal_uInt16 nWhich, sal_uInt8 nMemberId ) throw()
: mpModel( pModel ),
- mpModelPool( pModel ? &pModel->GetItemPool() : NULL ),
+ mpModelPool( pModel ? &pModel->GetItemPool() : nullptr ),
mnWhich( nWhich ), mnMemberId( nMemberId )
{
if( pModel )
diff --git a/svx/source/unodraw/UnoNamespaceMap.cxx b/svx/source/unodraw/UnoNamespaceMap.cxx
index 1df7662c6010..0db90fa6ad40 100644
--- a/svx/source/unodraw/UnoNamespaceMap.cxx
+++ b/svx/source/unodraw/UnoNamespaceMap.cxx
@@ -120,7 +120,7 @@ using namespace ::svx;
NamespaceIteratorImpl::NamespaceIteratorImpl( sal_uInt16* pWhichIds, SfxItemPool* pPool )
{
mpPool = pPool;
- mpCurrentAttr = NULL;
+ mpCurrentAttr = nullptr;
mnCurrentAttr = 0;
mpWhichId = pWhichIds;
@@ -142,11 +142,11 @@ bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
}
// we need the next namespace item
- mpCurrentAttr = NULL;
+ mpCurrentAttr = nullptr;
- const SfxPoolItem* pItem = 0;
+ const SfxPoolItem* pItem = nullptr;
// look for the next available item in the current pool
- while( (mnItem < mnItemCount) && ( NULL == (pItem = mpPool->GetItem2( *mpWhichId, mnItem ) ) ) )
+ while( (mnItem < mnItemCount) && ( nullptr == (pItem = mpPool->GetItem2( *mpWhichId, mnItem ) ) ) )
mnItem++;
// are we finished with the current whichid?
@@ -162,7 +162,7 @@ bool NamespaceIteratorImpl::next( OUString& rPrefix, OUString& rURL )
return next( rPrefix, rURL );
}
- pItem = NULL;
+ pItem = nullptr;
}
if( pItem )
diff --git a/svx/source/unodraw/XPropertyTable.cxx b/svx/source/unodraw/XPropertyTable.cxx
index 51f787c28ec9..1067674f17ec 100644
--- a/svx/source/unodraw/XPropertyTable.cxx
+++ b/svx/source/unodraw/XPropertyTable.cxx
@@ -89,7 +89,7 @@ XPropertyEntry* SvxUnoXPropertyTable::get( long index ) const
if( mpList )
return mpList->Get(index);
else
- return NULL;
+ return nullptr;
}
// XServiceInfo
@@ -105,7 +105,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const
{
SolarMutexGuard aGuard;
- if( NULL == mpList )
+ if( nullptr == mpList )
throw lang::IllegalArgumentException();
if( hasByName( aName ) )
@@ -114,7 +114,7 @@ void SAL_CALL SvxUnoXPropertyTable::insertByName( const OUString& aName, const
OUString aInternalName = SvxUnogetInternalNameForItem(mnWhich, aName);
XPropertyEntry* pNewEntry = getEntry( aInternalName, aElement );
- if( NULL == pNewEntry )
+ if( nullptr == pNewEntry )
throw lang::IllegalArgumentException();
if( mpList )
@@ -160,7 +160,7 @@ void SAL_CALL SvxUnoXPropertyTable::replaceByName( const OUString& aName, const
if (pEntry && aInternalName.equals(pEntry->GetName()))
{
XPropertyEntry* pNewEntry = getEntry( aInternalName, aElement );
- if( NULL == pNewEntry )
+ if( nullptr == pNewEntry )
throw lang::IllegalArgumentException();
if( mpList )
@@ -277,7 +277,7 @@ XPropertyEntry* SvxUnoXColorTable::getEntry( const OUString& rName, const uno::A
{
sal_Int32 nColor = 0;
if( !(rAny >>= nColor) )
- return NULL;
+ return nullptr;
const Color aColor( (ColorData)nColor );
return new XColorEntry( aColor, rName );
@@ -343,7 +343,7 @@ XPropertyEntry* SvxUnoXLineEndTable::getEntry( const OUString& rName, const uno:
{
if( !rAny.getValue() || rAny.getValueType() != cppu::UnoType<drawing::PolyPolygonBezierCoords>::get())
- return NULL;
+ return nullptr;
basegfx::B2DPolyPolygon aPolyPolygon;
drawing::PolyPolygonBezierCoords const * pCoords = static_cast<drawing::PolyPolygonBezierCoords const *>(rAny.getValue());
@@ -423,7 +423,7 @@ XPropertyEntry* SvxUnoXDashTable::getEntry( const OUString& rName, const uno::An
{
drawing::LineDash aLineDash;
if(!(rAny >>= aLineDash))
- return NULL;
+ return nullptr;
XDash aXDash;
@@ -502,7 +502,7 @@ XPropertyEntry* SvxUnoXHatchTable::getEntry( const OUString& rName, const uno::A
{
drawing::Hatch aUnoHatch;
if(!(rAny >>= aUnoHatch))
- return NULL;
+ return nullptr;
XHatch aXHatch;
aXHatch.SetHatchStyle( (css::drawing::HatchStyle)aUnoHatch.Style );
@@ -583,7 +583,7 @@ XPropertyEntry* SvxUnoXGradientTable::getEntry( const OUString& rName, const uno
{
awt::Gradient aGradient;
if(!(rAny >>= aGradient))
- return NULL;
+ return nullptr;
XGradient aXGradient;
@@ -661,7 +661,7 @@ XPropertyEntry* SvxUnoXBitmapTable::getEntry( const OUString& rName, const uno::
{
OUString aURL;
if(!(rAny >>= aURL))
- return NULL;
+ return nullptr;
const GraphicObject aGrafObj(GraphicObject::CreateGraphicObjectFromURL(aURL));
diff --git a/svx/source/unodraw/recoveryui.cxx b/svx/source/unodraw/recoveryui.cxx
index b65dcc3d2bf8..4ac50aaf46d1 100644
--- a/svx/source/unodraw/recoveryui.cxx
+++ b/svx/source/unodraw/recoveryui.cxx
@@ -119,7 +119,7 @@ class RecoveryUI : public ::cppu::WeakImplHelper< css::lang::XServiceInfo
RecoveryUI::RecoveryUI(const css::uno::Reference< css::uno::XComponentContext >& xContext)
: m_xContext (xContext )
- , m_pParentWindow(0 )
+ , m_pParentWindow(nullptr )
, m_eJob (RecoveryUI::E_JOB_UNKNOWN)
{
}
diff --git a/svx/source/unodraw/shapeimpl.hxx b/svx/source/unodraw/shapeimpl.hxx
index 8858859922d4..316887c22a70 100644
--- a/svx/source/unodraw/shapeimpl.hxx
+++ b/svx/source/unodraw/shapeimpl.hxx
@@ -42,7 +42,7 @@ public:
virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) throw (css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override;
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) override;
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = nullptr ) override;
};
class SvxAppletShape : public SvxOle2Shape
{
@@ -60,7 +60,7 @@ public:
virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) throw (css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override;
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) override;
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = nullptr ) override;
};
class SvxFrameShape : public SvxOle2Shape
{
@@ -83,7 +83,7 @@ public:
virtual void SAL_CALL setPropertyValues( const css::uno::Sequence< OUString >& aPropertyNames, const css::uno::Sequence< css::uno::Any >& aValues ) throw (css::beans::PropertyVetoException, css::lang::IllegalArgumentException, css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) override;
- virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = NULL ) throw (css::uno::RuntimeException, std::exception) override;
+ virtual void Create( SdrObject* pNewOpj, SvxDrawPage* pNewPage = nullptr ) throw (css::uno::RuntimeException, std::exception) override;
};
diff --git a/svx/source/unodraw/unobrushitemhelper.cxx b/svx/source/unodraw/unobrushitemhelper.cxx
index 1ae4c1475ef2..fef98fb558c4 100644
--- a/svx/source/unodraw/unobrushitemhelper.cxx
+++ b/svx/source/unodraw/unobrushitemhelper.cxx
@@ -154,7 +154,7 @@ void setSvxBrushItemAsFillAttributesToTargetSet(const SvxBrushItem& rBrush, SfxI
sal_uInt16 getTransparenceForSvxBrushItem(const SfxItemSet& rSourceSet, bool bSearchInParents)
{
sal_uInt16 nFillTransparence(static_cast< const XFillTransparenceItem& >(rSourceSet.Get(XATTR_FILLTRANSPARENCE, bSearchInParents)).GetValue());
- const SfxPoolItem* pGradientItem = 0;
+ const SfxPoolItem* pGradientItem = nullptr;
if(SfxItemState::SET == rSourceSet.GetItemState(XATTR_FILLFLOATTRANSPARENCE, bSearchInParents, &pGradientItem)
&& static_cast< const XFillFloatTransparenceItem* >(pGradientItem)->IsEnabled())
diff --git a/svx/source/unodraw/unomlstr.cxx b/svx/source/unodraw/unomlstr.cxx
index 265d3c2711ed..e764a10dc35f 100644
--- a/svx/source/unodraw/unomlstr.cxx
+++ b/svx/source/unodraw/unomlstr.cxx
@@ -54,7 +54,7 @@ void SvxUnoShapeModifyListener::disposing(const lang::EventObject& ) throw( uno:
// internal
void SvxUnoShapeModifyListener::invalidate() throw()
{
- mpObj = NULL;
+ mpObj = nullptr;
}
diff --git a/svx/source/unodraw/unomod.cxx b/svx/source/unodraw/unomod.cxx
index 7c6b9d748ac4..29f5d6c78dc6 100644
--- a/svx/source/unodraw/unomod.cxx
+++ b/svx/source/unodraw/unomod.cxx
@@ -100,7 +100,7 @@ static const SvEventDescription* ImplGetSupportedMacroItems()
{
{ SFX_EVENT_MOUSEOVER_OBJECT, "OnMouseOver" },
{ SFX_EVENT_MOUSEOUT_OBJECT, "OnMouseOut" },
- { 0, NULL }
+ { 0, nullptr }
};
return aMacroDescriptionsImpl;
@@ -115,8 +115,8 @@ static const SvEventDescription* ImplGetSupportedMacroItems()
*/
bool SvxUnoDrawMSFactory::createEvent( const SdrModel* pDoc, const SdrHint* pSdrHint, css::document::EventObject& aEvent )
{
- const SdrObject* pObj = NULL;
- const SdrPage* pPage = NULL;
+ const SdrObject* pObj = nullptr;
+ const SdrPage* pPage = nullptr;
switch( pSdrHint->GetKind() )
{
@@ -176,7 +176,7 @@ css::uno::Reference<css::uno::XInterface> create(
sal_uInt16 nT = (sal_uInt16)(nType & ~E3D_INVENTOR_FLAG);
sal_uInt32 nI = (nType & E3D_INVENTOR_FLAG)?E3dInventor:SdrInventor;
- return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI, 0, 0, referer )) );
+ return uno::Reference< uno::XInterface >( static_cast<drawing::XShape*>(SvxDrawPage::CreateShapeByTypeAndInventor( nT, nI, nullptr, nullptr, referer )) );
}
}
else if ( rServiceSpecifier == "com.sun.star.document.ImportGraphicObjectResolver" )
@@ -422,7 +422,7 @@ uno::Reference< uno::XInterface > SAL_CALL SvxUnoDrawingModel::createInstance( c
const OUString aPackagePrefix( "com.sun.star.presentation." );
if( aType.startsWith( aPackagePrefix ) )
{
- SvxShape* pShape = NULL;
+ SvxShape* pShape = nullptr;
sal_uInt16 nType = OBJ_TEXT;
OUString aTypeName = aType.copy( aPackagePrefix.getLength() );
@@ -713,7 +713,7 @@ uno::Sequence< OUString > SAL_CALL SvxUnoDrawPagesAccess::getSupportedServiceNam
css::uno::Reference< css::container::XIndexReplace > SvxCreateNumRule( SdrModel* pModel ) throw()
{
- const SvxNumRule* pDefaultRule = NULL;
+ const SvxNumRule* pDefaultRule = nullptr;
if( pModel )
{
const SvxNumBulletItem* pItem = static_cast<const SvxNumBulletItem*>( pModel->GetItemPool().GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET) );
diff --git a/svx/source/unodraw/unomtabl.cxx b/svx/source/unodraw/unomtabl.cxx
index c7b15c25704d..0b200a17a80f 100644
--- a/svx/source/unodraw/unomtabl.cxx
+++ b/svx/source/unodraw/unomtabl.cxx
@@ -336,7 +336,7 @@ static void createNamesForPool( SfxItemPool* pPool, sal_uInt16 nWhich, std::set<
{
const NameOrIndex* pItem = static_cast<const NameOrIndex*>(pPool->GetItem2( nWhich, nSurrogate ));
- if( pItem == NULL || pItem->GetName().isEmpty() )
+ if( pItem == nullptr || pItem->GetName().isEmpty() )
continue;
OUString aName = SvxUnogetApiNameForItem(XATTR_LINEEND, pItem->GetName());
diff --git a/svx/source/unodraw/unopage.cxx b/svx/source/unodraw/unopage.cxx
index 65ec23491c4f..0cee1fef5c2a 100644
--- a/svx/source/unodraw/unopage.cxx
+++ b/svx/source/unodraw/unopage.cxx
@@ -64,7 +64,7 @@ UNO3_GETIMPLEMENTATION_IMPL( SvxDrawPage );
SvxDrawPage::SvxDrawPage( SdrPage* pInPage ) throw()
: mrBHelper( getMutex() )
, mpPage( pInPage )
-, mpModel( 0 )
+, mpModel( nullptr )
{
// register at broadcaster
if( mpPage )
@@ -100,15 +100,15 @@ void SvxDrawPage::disposing() throw()
if( mpModel )
{
EndListening( *mpModel );
- mpModel = NULL;
+ mpModel = nullptr;
}
if( mpView )
{
delete mpView;
- mpView = NULL;
+ mpView = nullptr;
}
- mpPage = 0;
+ mpPage = nullptr;
}
// XComponent
@@ -172,7 +172,7 @@ void SAL_CALL SvxDrawPage::addEventListener( const css::uno::Reference< css::lan
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
mrBHelper.addListener( cppu::UnoType<decltype(aListener)>::get() , aListener );
@@ -182,7 +182,7 @@ void SAL_CALL SvxDrawPage::removeEventListener( const css::uno::Reference< css::
{
SolarMutexGuard aGuard;
- if( mpModel == 0 )
+ if( mpModel == nullptr )
throw lang::DisposedException();
mrBHelper.removeListener( cppu::UnoType<decltype(aListener)>::get() , aListener );
@@ -198,12 +198,12 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
{
SolarMutexGuard aGuard;
- if ( ( mpModel == NULL ) || ( mpPage == NULL ) )
+ if ( ( mpModel == nullptr ) || ( mpPage == nullptr ) )
throw lang::DisposedException();
SvxShape* pShape = SvxShape::getImplementation( xShape );
- if( NULL == pShape )
+ if( nullptr == pShape )
return;
SdrObject *pObj = pShape->GetSdrObject();
@@ -211,7 +211,7 @@ void SAL_CALL SvxDrawPage::add( const uno::Reference< drawing::XShape >& xShape
if(!pObj)
{
pObj = CreateSdrObject( xShape );
- ENSURE_OR_RETURN_VOID( pObj != NULL, "SvxDrawPage::add: no SdrObject was created!" );
+ ENSURE_OR_RETURN_VOID( pObj != nullptr, "SvxDrawPage::add: no SdrObject was created!" );
}
else if ( !pObj->IsInserted() )
{
@@ -242,12 +242,12 @@ void SAL_CALL SvxDrawPage::addBottom( const uno::Reference< drawing::XShape >& x
{
SolarMutexGuard aGuard;
- if ( ( mpModel == NULL ) || ( mpPage == NULL ) )
+ if ( ( mpModel == nullptr ) || ( mpPage == nullptr ) )
throw lang::DisposedException();
SvxShape* pShape = SvxShape::getImplementation( xShape );
- if( NULL == pShape )
+ if( nullptr == pShape )
return;
SdrObject *pObj = pShape->GetSdrObject();
@@ -255,7 +255,7 @@ void SAL_CALL SvxDrawPage::addBottom( const uno::Reference< drawing::XShape >& x
if(!pObj)
{
pObj = CreateSdrObject( xShape, true );
- ENSURE_OR_RETURN_VOID( pObj != NULL, "SvxDrawPage::add: no SdrObject was created!" );
+ ENSURE_OR_RETURN_VOID( pObj != nullptr, "SvxDrawPage::add: no SdrObject was created!" );
}
else if ( !pObj->IsInserted() )
{
@@ -280,7 +280,7 @@ void SAL_CALL SvxDrawPage::remove( const Reference< drawing::XShape >& xShape )
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
SvxShape* pShape = SvxShape::getImplementation( xShape );
@@ -330,7 +330,7 @@ sal_Int32 SAL_CALL SvxDrawPage::getCount()
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
return static_cast<sal_Int32>( mpPage->GetObjCount() );
@@ -341,14 +341,14 @@ uno::Any SAL_CALL SvxDrawPage::getByIndex( sal_Int32 Index )
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
if ( Index < 0 || static_cast<size_t>(Index) >= mpPage->GetObjCount() )
throw lang::IndexOutOfBoundsException();
SdrObject* pObj = mpPage->GetObj( Index );
- if( pObj == NULL )
+ if( pObj == nullptr )
throw uno::RuntimeException();
@@ -367,7 +367,7 @@ sal_Bool SAL_CALL SvxDrawPage::hasElements()
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
return mpPage && mpPage->GetObjCount()>0;
@@ -396,7 +396,7 @@ void SvxDrawPage::_SelectObjectsInView( const Reference< drawing::XShapes > & aS
SAL_WARN_IF(!pPageView, "svx", "SdrPageView is NULL!");
SAL_WARN_IF(!mpView, "svx", "SdrView is NULL!");
- if(pPageView!=NULL && mpView!=NULL)
+ if(pPageView!=nullptr && mpView!=nullptr)
{
mpView->UnmarkAllObj( pPageView );
@@ -418,7 +418,7 @@ void SvxDrawPage::_SelectObjectInView( const Reference< drawing::XShape > & xSha
SAL_WARN_IF(!pPageView, "svx", "SdrPageView is NULL!");
SAL_WARN_IF(!mpView, "svx", "SdrView is NULL!");
- if(pPageView!=NULL && mpView != NULL)
+ if(pPageView!=nullptr && mpView != nullptr)
{
mpView->UnmarkAllObj( pPageView );
lcl_markSdrObjectOfShape( xShape, *mpView, *pPageView );
@@ -430,14 +430,14 @@ Reference< drawing::XShapeGroup > SAL_CALL SvxDrawPage::group( const Reference<
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
SAL_WARN_IF(!mpPage , "svx", "SdrPage is NULL!");
SAL_WARN_IF(!mpView, "svx", "SdrView is NULL!");
Reference< css::drawing::XShapeGroup > xShapeGroup;
- if(mpPage==NULL||mpView==NULL||!xShapes.is())
+ if(mpPage==nullptr||mpView==nullptr||!xShapes.is())
return xShapeGroup;
SdrPageView* pPageView = mpView->ShowSdrPage( mpPage );
@@ -468,13 +468,13 @@ void SAL_CALL SvxDrawPage::ungroup( const Reference< drawing::XShapeGroup >& aGr
{
SolarMutexGuard aGuard;
- if( (mpModel == 0) || (mpPage == 0) )
+ if( (mpModel == nullptr) || (mpPage == nullptr) )
throw lang::DisposedException();
SAL_WARN_IF(!mpPage, "svx", "SdrPage is NULL!");
SAL_WARN_IF(!mpView, "svx", "SdrView is NULL!");
- if(mpPage==NULL||mpView==NULL||!aGroup.is())
+ if(mpPage==nullptr||mpView==nullptr||!aGroup.is())
return;
SdrPageView* pPageView = mpView->ShowSdrPage( mpPage );
@@ -497,7 +497,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject(const Reference< drawing::XShape > & xS
GetTypeAndInventor( nType, nInventor, xShape->getShapeType() );
if (!nType)
- return NULL;
+ return nullptr;
awt::Size aSize = xShape->getSize();
aSize.Width += 1;
@@ -507,7 +507,7 @@ SdrObject *SvxDrawPage::_CreateSdrObject(const Reference< drawing::XShape > & xS
SdrObject* pNewObj = SdrObjFactory::MakeNewObject(nInventor, nType, aRect, mpPage);
if (!pNewObj)
- return NULL;
+ return nullptr;
if( dynamic_cast<const E3dPolyScene* >(pNewObj) != nullptr)
{
@@ -603,7 +603,7 @@ void SvxDrawPage::GetTypeAndInventor( sal_uInt16& rType, sal_uInt32& rInventor,
SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt32 nInventor, SdrObject *pObj, SvxDrawPage *mpPage, OUString const & referer )
throw (css::uno::RuntimeException)
{
- SvxShape* pRet = NULL;
+ SvxShape* pRet = nullptr;
switch( nInventor )
{
case E3dInventor:
@@ -739,7 +739,7 @@ SvxShape* SvxDrawPage::CreateShapeByTypeAndInventor( sal_uInt16 nType, sal_uInt3
}
}
}
- if( pRet == NULL )
+ if( pRet == nullptr )
{
SvxUnoPropertyMapProvider& rSvxMapProvider = getSvxMapProvider();
pRet = new SvxOle2Shape( pObj, rSvxMapProvider.GetMap(SVXMAP_OLE2), rSvxMapProvider.GetPropertySet(SVXMAP_OLE2, SdrObject::GetGlobalDrawObjectItemPool()) );
@@ -873,7 +873,7 @@ uno::Sequence< OUString > SAL_CALL SvxDrawPage::getSupportedServiceNames() throw
SvxShape* CreateSvxShapeByTypeAndInventor(sal_uInt16 nType, sal_uInt32 nInventor, OUString const & referer)
throw (css::uno::RuntimeException, std::exception)
{
- return SvxDrawPage::CreateShapeByTypeAndInventor( nType, nInventor, 0, 0, referer );
+ return SvxDrawPage::CreateShapeByTypeAndInventor( nType, nInventor, nullptr, nullptr, referer );
}
void SvxDrawPage::ChangeModel( SdrModel* pNewModel )
@@ -923,7 +923,7 @@ SdrPage* GetSdrPageFromXDrawPage( uno::Reference< drawing::XDrawPage > xDrawPage
}
}
- return NULL;
+ return nullptr;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unopool.cxx b/svx/source/unodraw/unopool.cxx
index 949df3e5731c..aae498f1cd9d 100644
--- a/svx/source/unodraw/unopool.cxx
+++ b/svx/source/unodraw/unopool.cxx
@@ -88,7 +88,7 @@ SfxItemPool* SvxUnoDrawPool::getModelPool( bool bReadOnly ) throw()
if( bReadOnly )
return mpDefaultsPool;
else
- return NULL;
+ return nullptr;
}
}
@@ -206,7 +206,7 @@ void SvxUnoDrawPool::_setPropertyValues( const comphelper::PropertyMapEntry** pp
SfxItemPool* pPool = getModelPool( false );
DBG_ASSERT( pPool, "I need a SfxItemPool!" );
- if( NULL == pPool )
+ if( nullptr == pPool )
throw beans::UnknownPropertyException();
while( *ppEntries )
@@ -221,7 +221,7 @@ void SvxUnoDrawPool::_getPropertyValues( const comphelper::PropertyMapEntry** pp
SfxItemPool* pPool = getModelPool( true );
DBG_ASSERT( pPool, "I need a SfxItemPool!" );
- if( NULL == pPool )
+ if( nullptr == pPool )
throw beans::UnknownPropertyException();
while( *ppEntries )
diff --git a/svx/source/unodraw/unoprov.cxx b/svx/source/unodraw/unoprov.cxx
index 1b414e54b995..7c9e150f9511 100644
--- a/svx/source/unodraw/unoprov.cxx
+++ b/svx/source/unodraw/unoprov.cxx
@@ -912,8 +912,8 @@ SvxUnoPropertyMapProvider::SvxUnoPropertyMapProvider()
{
for(sal_uInt16 i=0;i<SVXMAP_END; i++)
{
- aSetArr[i] = 0;
- aMapArr[i] = 0;
+ aSetArr[i] = nullptr;
+ aMapArr[i] = nullptr;
}
}
@@ -1384,10 +1384,10 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer
if( nServiceId > SVXUNO_SERVICEID_LASTID )
{
OSL_FAIL( "unknown service id!" );
- return NULL;
+ return nullptr;
}
- if( mpInfos[ nServiceId ] == NULL )
+ if( mpInfos[ nServiceId ] == nullptr )
{
mpInfos[nServiceId] = new comphelper::PropertySetInfo();
mpInfos[nServiceId]->acquire();
@@ -1412,6 +1412,6 @@ comphelper::PropertySetInfo* SvxPropertySetInfoPool::getOrCreate( sal_Int32 nSer
return mpInfos[ nServiceId ];
}
-comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { NULL };
+comphelper::PropertySetInfo* SvxPropertySetInfoPool::mpInfos[SVXUNO_SERVICEID_LASTID+1] = { nullptr };
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svx/source/unodraw/unoshap2.cxx b/svx/source/unodraw/unoshap2.cxx
index b9cb41a4bbfb..26e18ae690f6 100644
--- a/svx/source/unodraw/unoshap2.cxx
+++ b/svx/source/unodraw/unoshap2.cxx
@@ -198,7 +198,7 @@ void SvxShapeGroup::addUnoShape( const uno::Reference< drawing::XShape >& xShape
}
SdrObject* pSdrShape = pShape->GetSdrObject();
- if( pSdrShape == NULL )
+ if( pSdrShape == nullptr )
pSdrShape = mxPage->_CreateSdrObject( xShape );
if( pSdrShape->IsInserted() )
@@ -240,13 +240,13 @@ void SAL_CALL SvxShapeGroup::remove( const uno::Reference< drawing::XShape >& xS
{
::SolarMutexGuard aGuard;
- SdrObject* pSdrShape = NULL;
+ SdrObject* pSdrShape = nullptr;
SvxShape* pShape = SvxShape::getImplementation( xShape );
if( pShape )
pSdrShape = pShape->GetSdrObject();
- if( !mpObj.is() || pSdrShape == NULL || pSdrShape->GetObjList()->GetOwnerObj() != mpObj.get() )
+ if( !mpObj.is() || pSdrShape == nullptr || pSdrShape->GetObjList()->GetOwnerObj() != mpObj.get() )
throw uno::RuntimeException();
SdrObjList& rList = *pSdrShape->GetObjList();
@@ -328,7 +328,7 @@ uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index )
{
::SolarMutexGuard aGuard;
- if( !mpObj.is() || mpObj->GetSubList() == NULL )
+ if( !mpObj.is() || mpObj->GetSubList() == nullptr )
throw uno::RuntimeException();
if( Index<0 || mpObj->GetSubList()->GetObjCount() <= static_cast<size_t>(Index) )
@@ -336,7 +336,7 @@ uno::Any SAL_CALL SvxShapeGroup::getByIndex( sal_Int32 Index )
SdrObject* pDestObj = mpObj->GetSubList()->GetObj( Index );
- if(pDestObj == NULL)
+ if(pDestObj == nullptr)
throw lang::IndexOutOfBoundsException();
Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
@@ -687,7 +687,7 @@ SvxShapeControlPropertyMapping[] =
{ RTL_CONSTASCII_STRINGPARAM("ControlTypeinMSO"), RTL_CONSTASCII_STRINGPARAM("ControlTypeinMSO") },
{ RTL_CONSTASCII_STRINGPARAM("ObjIDinMSO"), RTL_CONSTASCII_STRINGPARAM("ObjIDinMSO") },
{ RTL_CONSTASCII_STRINGPARAM("CharCaseMap"), RTL_CONSTASCII_STRINGPARAM("CharCaseMap") },
- { NULL,0, NULL, 0 }
+ { nullptr,0, nullptr, 0 }
};
namespace
@@ -1493,7 +1493,7 @@ bool SvxGraphicObject::setPropertyValueImpl( const OUString& rName, const SfxIte
{
// normal link
OUString aFilterName;
- const SfxFilter* pSfxFilter = NULL;
+ const SfxFilter* pSfxFilter = nullptr;
SfxMedium aSfxMedium( aURL, referer_, StreamMode::READ | StreamMode::SHARE_DENYNONE );
SfxGetpApp()->GetFilterMatcher().GuessFilter( aSfxMedium, &pSfxFilter );
@@ -1590,7 +1590,7 @@ bool SvxGraphicObject::getPropertyValueImpl( const OUString& rName, const SfxIte
{
SvMemoryStream aDestStrm( 65535, 65535 );
- ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, NULL, false );
+ ConvertGDIMetaFileToWMF( rGraphic.GetGDIMetaFile(), aDestStrm, nullptr, false );
const uno::Sequence<sal_Int8> aSeq(
static_cast< const sal_Int8* >(aDestStrm.GetData()),
aDestStrm.GetEndOfData());
diff --git a/svx/source/unodraw/unoshap3.cxx b/svx/source/unodraw/unoshap3.cxx
index a963a1a4ac9c..09a7c6579f3b 100644
--- a/svx/source/unodraw/unoshap3.cxx
+++ b/svx/source/unodraw/unoshap3.cxx
@@ -126,7 +126,7 @@ void SAL_CALL Svx3DSceneObject::add( const Reference< drawing::XShape >& xShape
SvxShape* pShape = SvxShape::getImplementation( xShape );
- if(!mpObj.is() || !mxPage.is() || pShape == NULL || NULL != pShape->GetSdrObject() )
+ if(!mpObj.is() || !mxPage.is() || pShape == nullptr || nullptr != pShape->GetSdrObject() )
throw uno::RuntimeException();
SdrObject* pSdrShape = mxPage->_CreateSdrObject( xShape );
@@ -155,11 +155,11 @@ void SAL_CALL Svx3DSceneObject::remove( const Reference< drawing::XShape >& xSha
SvxShape* pShape = SvxShape::getImplementation( xShape );
- if(!mpObj.is() || pShape == NULL)
+ if(!mpObj.is() || pShape == nullptr)
throw uno::RuntimeException();
SdrObject* pSdrShape = pShape->GetSdrObject();
- if(pSdrShape == NULL || pSdrShape->GetObjList()->GetOwnerObj() != mpObj.get())
+ if(pSdrShape == nullptr || pSdrShape->GetObjList()->GetOwnerObj() != mpObj.get())
{
throw uno::RuntimeException();
}
@@ -208,14 +208,14 @@ uno::Any SAL_CALL Svx3DSceneObject::getByIndex( sal_Int32 Index )
{
SolarMutexGuard aGuard;
- if( !mpObj.is() || mpObj->GetSubList() == NULL )
+ if( !mpObj.is() || mpObj->GetSubList() == nullptr )
throw uno::RuntimeException();
if( Index<0 || mpObj->GetSubList()->GetObjCount() <= static_cast<size_t>(Index) )
throw lang::IndexOutOfBoundsException();
SdrObject* pDestObj = mpObj->GetSubList()->GetObj( Index );
- if(pDestObj == NULL)
+ if(pDestObj == nullptr)
throw lang::IndexOutOfBoundsException();
Reference< drawing::XShape > xShape( pDestObj->getUnoShape(), uno::UNO_QUERY );
diff --git a/svx/source/unodraw/unoshap4.cxx b/svx/source/unodraw/unoshap4.cxx
index 71e46ff5bab0..58c668a3a471 100644
--- a/svx/source/unodraw/unoshap4.cxx
+++ b/svx/source/unodraw/unoshap4.cxx
@@ -246,7 +246,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
// #i119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
SvMemoryStream aDestStrm( 65535, 65535 );
- ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false );
+ ConvertGDIMetaFileToWMF( aMtf, aDestStrm, nullptr, false );
const uno::Sequence<sal_Int8> aSeq(
static_cast< const sal_Int8* >(aDestStrm.GetData()),
aDestStrm.GetEndOfData());
@@ -340,7 +340,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
// if there isn't already a preview graphic set, check if we need to generate
// one if model says so
- if( pGraphic == NULL && !pOle->IsEmptyPresObj() && mpModel->IsSaveOLEPreview() )
+ if( pGraphic == nullptr && !pOle->IsEmptyPresObj() && mpModel->IsSaveOLEPreview() )
pGraphic = pOle->GetGraphic();
if( pGraphic )
@@ -365,7 +365,7 @@ bool SvxOle2Shape::getPropertyValueImpl( const OUString& rName, const SfxItemPro
if( !aPersistName.isEmpty() )
{
::comphelper::IEmbeddedHelper *pPersist = mpObj->GetModel()->GetPersist();
- if( (NULL == pPersist) || !pPersist->getEmbeddedObjectContainer().HasEmbeddedObject( pOle->GetPersistName() ) )
+ if( (nullptr == pPersist) || !pPersist->getEmbeddedObjectContainer().HasEmbeddedObject( pOle->GetPersistName() ) )
aPersistName.clear();
}
}
@@ -517,7 +517,7 @@ bool SvxOle2Shape::createLink( const OUString& aLinkURL )
void SvxOle2Shape::resetModifiedState()
{
- ::comphelper::IEmbeddedHelper* pPersist = mpModel ? mpModel->GetPersist() : 0;
+ ::comphelper::IEmbeddedHelper* pPersist = mpModel ? mpModel->GetPersist() : nullptr;
if( pPersist && !pPersist->isEnableSetModified() )
{
SdrOle2Obj* pOle = dynamic_cast< SdrOle2Obj* >( mpObj.get() );
diff --git a/svx/source/unodraw/unoshape.cxx b/svx/source/unodraw/unoshape.cxx
index 8a62fcb5656d..0b682a624cbf 100644
--- a/svx/source/unodraw/unoshape.cxx
+++ b/svx/source/unodraw/unoshape.cxx
@@ -128,9 +128,9 @@ struct SvxShapeImpl
SvxShapeImpl( SvxShape& _rAntiImpl, ::osl::Mutex& _rMutex )
:mrAntiImpl( _rAntiImpl )
- ,mpItemSet( NULL )
+ ,mpItemSet( nullptr )
,mnObjId( 0 )
- ,mpMaster( NULL )
+ ,mpMaster( nullptr )
,mbHasSdrObjectOwnership( false )
,mbDisposing( false )
,mpCreatedObj()
@@ -178,7 +178,7 @@ SvxShape::SvxShape( SdrObject* pObject ) throw( uno::RuntimeException )
, mpPropSet(getSvxMapProvider().GetPropertySet(SVXMAP_SHAPE, SdrObject::GetGlobalDrawObjectItemPool()))
, maPropMapEntries(getSvxMapProvider().GetMap(SVXMAP_SHAPE))
, mpObj(pObject)
-, mpModel(NULL)
+, mpModel(nullptr)
, mnLockCount(0)
{
impl_construct();
@@ -192,7 +192,7 @@ SvxShape::SvxShape( SdrObject* pObject, const SfxItemPropertyMapEntry* pEntries,
, mpPropSet(pPropertySet)
, maPropMapEntries(pEntries)
, mpObj(pObject)
-, mpModel(NULL)
+, mpModel(nullptr)
, mnLockCount(0)
{
impl_construct();
@@ -205,8 +205,8 @@ SvxShape::SvxShape() throw( uno::RuntimeException )
, mbIsMultiPropertyCall(false)
, mpPropSet(getSvxMapProvider().GetPropertySet(SVXMAP_SHAPE, SdrObject::GetGlobalDrawObjectItemPool()))
, maPropMapEntries(getSvxMapProvider().GetMap(SVXMAP_SHAPE))
-, mpObj(NULL)
-, mpModel(NULL)
+, mpObj(nullptr)
+, mpModel(nullptr)
, mnLockCount(0)
{
impl_construct();
@@ -226,7 +226,7 @@ SvxShape::~SvxShape() throw()
mpImpl->mpMaster->dispose();
if ( mpObj.is() )
- mpObj->setUnoShape(NULL);
+ mpObj->setUnoShape(nullptr);
if( HasSdrObjectOwnership() && mpObj.is() )
{
@@ -235,7 +235,7 @@ SvxShape::~SvxShape() throw()
SdrObject::Free( pObject );
}
- delete mpImpl, mpImpl = NULL;
+ delete mpImpl, mpImpl = nullptr;
EndListeningAll(); // call explictily within SolarMutexGuard
}
@@ -310,7 +310,7 @@ SvxShape* SvxShape::getImplementation( const uno::Reference< uno::XInterface >&
if( xUT.is() )
return reinterpret_cast<SvxShape*>(sal::static_int_cast<sal_uIntPtr>(xUT->getSomething( SvxShape::getUnoTunnelId())));
else
- return NULL;
+ return nullptr;
}
@@ -409,7 +409,7 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ )
return;
SdrObject* pCreatedObj = mpImpl->mpCreatedObj.get();
- OSL_ENSURE( ( pCreatedObj == NULL ) || ( pCreatedObj == pNewObj ),
+ OSL_ENSURE( ( pCreatedObj == nullptr ) || ( pCreatedObj == pNewObj ),
"SvxShape::Create: the same shape used for two different objects?! Strange ..." );
// Correct condition (#i52126#)
@@ -436,7 +436,7 @@ void SvxShape::Create( SdrObject* pNewObj, SvxDrawPage* /*pNewPage*/ )
// save user call
SdrObjUserCall* pUser = mpObj->GetUserCall();
- mpObj->SetUserCall(NULL);
+ mpObj->SetUserCall(nullptr);
setPosition( maPosition );
setSize( maSize );
@@ -666,7 +666,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
DBG_TESTSOLARMUTEX();
uno::Any aAny;
- if( !mpObj.is() || mpModel == NULL || !mpObj->IsInserted() || NULL == mpObj->GetPage() )
+ if( !mpObj.is() || mpModel == nullptr || !mpObj->IsInserted() || nullptr == mpObj->GetPage() )
return aAny;
ScopedVclPtrInstance< VirtualDevice > pVDev;
@@ -690,7 +690,7 @@ uno::Any SvxShape::GetBitmap( bool bMetaFile /* = false */ ) const
if( bMetaFile )
{
SvMemoryStream aDestStrm( 65535, 65535 );
- ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false );
+ ConvertGDIMetaFileToWMF( aMtf, aDestStrm, nullptr, false );
const uno::Sequence<sal_Int8> aSeq(
static_cast< const sal_Int8* >(aDestStrm.GetData()),
aDestStrm.GetEndOfData());
@@ -1029,7 +1029,7 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
uno::Reference< uno::XInterface > xSelf( mpObj->getWeakUnoShape() );
if( !xSelf.is() )
{
- mpObj.reset( NULL );
+ mpObj.reset( nullptr );
return;
}
@@ -1045,7 +1045,7 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
case HINT_MODELCLEARED:
{
bClearMe = true;
- mpModel = NULL;
+ mpModel = nullptr;
break;
}
default:
@@ -1056,8 +1056,8 @@ void SvxShape::Notify( SfxBroadcaster&, const SfxHint& rHint ) throw()
{
if( !HasSdrObjectOwnership() ) {
if( mpObj.is() )
- mpObj->setUnoShape( NULL );
- mpObj.reset( NULL );
+ mpObj->setUnoShape( nullptr );
+ mpObj.reset( nullptr );
}
if ( !mpImpl->mbDisposing )
dispose();
@@ -1330,7 +1330,7 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException, std::exception)
}
}
- mpObj->setUnoShape(NULL);
+ mpObj->setUnoShape(nullptr);
if ( bFreeSdrObject )
{
@@ -1345,7 +1345,7 @@ void SAL_CALL SvxShape::dispose() throw(uno::RuntimeException, std::exception)
if( mpModel )
{
EndListening( *mpModel );
- mpModel = NULL;
+ mpModel = nullptr;
}
}
@@ -1686,7 +1686,7 @@ void SAL_CALL SvxShape::_setPropertyValue( const OUString& rPropertyName, const
SfxItemSet* pSet;
if( mbIsMultiPropertyCall && !bIsNotPersist )
{
- if( mpImpl->mpItemSet == NULL )
+ if( mpImpl->mpItemSet == nullptr )
{
pSet = mpImpl->mpItemSet = mpObj->GetMergedItemSet().Clone();
}
@@ -1769,7 +1769,7 @@ uno::Any SvxShape::_getPropertyValue( const OUString& PropertyName )
uno::Any aAny;
if( mpObj.is() && mpModel )
{
- if(pMap == NULL )
+ if(pMap == nullptr )
throw beans::UnknownPropertyException();
if( !getPropertyValueImpl( PropertyName, pMap, aAny ) )
@@ -1886,7 +1886,7 @@ void SvxShape::endSetPropertyValues()
if( mpImpl->mpItemSet )
{
delete mpImpl->mpItemSet;
- mpImpl->mpItemSet = 0;
+ mpImpl->mpItemSet = nullptr;
}
}
@@ -1958,7 +1958,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE
{
case SDRATTR_CIRCSTARTANGLE:
{
- const SfxPoolItem* pPoolItem=NULL;
+ const SfxPoolItem* pPoolItem=nullptr;
if(aSet.GetItemState(SDRATTR_CIRCSTARTANGLE,false,&pPoolItem)==SfxItemState::SET)
{
sal_Int32 nAngle = static_cast<const SdrAngleItem*>(pPoolItem)->GetValue();
@@ -1969,7 +1969,7 @@ uno::Any SvxShape::GetAnyForItem( SfxItemSet& aSet, const SfxItemPropertySimpleE
case SDRATTR_CIRCENDANGLE:
{
- const SfxPoolItem* pPoolItem=NULL;
+ const SfxPoolItem* pPoolItem=nullptr;
if (aSet.GetItemState(SDRATTR_CIRCENDANGLE,false,&pPoolItem)==SfxItemState::SET)
{
sal_Int32 nAngle = static_cast<const SdrAngleItem*>(pPoolItem)->GetValue();
@@ -2051,7 +2051,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(PropertyName);
- if( !mpObj.is() || pMap == NULL )
+ if( !mpObj.is() || pMap == nullptr )
throw beans::UnknownPropertyException();
beans::PropertyState eState;
@@ -2087,7 +2087,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
case XATTR_LINEDASH:
{
const NameOrIndex* pItem = static_cast<const NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
- if( ( pItem == NULL ) || pItem->GetName().isEmpty() )
+ if( ( pItem == nullptr ) || pItem->GetName().isEmpty() )
eState = beans::PropertyState_DEFAULT_VALUE;
}
break;
@@ -2102,7 +2102,7 @@ beans::PropertyState SAL_CALL SvxShape::_getPropertyState( const OUString& Prope
case XATTR_FILLFLOATTRANSPARENCE:
{
const NameOrIndex* pItem = static_cast<const NameOrIndex*>(rSet.GetItem((sal_uInt16)pMap->nWID));
- if ( pItem == NULL )
+ if ( pItem == nullptr )
eState = beans::PropertyState_DEFAULT_VALUE;
}
break;
@@ -2372,7 +2372,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if( rValue >>= aLayerName )
{
const SdrLayer* pLayer=mpModel->GetLayerAdmin().GetLayer(aLayerName, true);
- if( pLayer != NULL )
+ if( pLayer != nullptr )
{
mpObj->SetLayer( pLayer->GetID() );
return true;
@@ -2505,7 +2505,7 @@ bool SvxShape::setPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
if( pPageObj )
{
SdrModel* pModel = pPageObj->GetModel();
- SdrPage* pNewPage = 0L;
+ SdrPage* pNewPage = nullptr;
const sal_uInt16 nDestinationPageNum((sal_uInt16)((nPageNum << 1L) - 1L));
if(pModel)
@@ -2920,7 +2920,7 @@ bool SvxShape::getPropertyValueImpl( const OUString&, const SfxItemPropertySimpl
// #119735# just use GetGDIMetaFile, it will create a bufferd version of contained bitmap now automatically
GDIMetaFile aMtf(pObj->GetGraphic()->GetGDIMetaFile());
SvMemoryStream aDestStrm( 65535, 65535 );
- ConvertGDIMetaFileToWMF( aMtf, aDestStrm, NULL, false );
+ ConvertGDIMetaFileToWMF( aMtf, aDestStrm, nullptr, false );
const uno::Sequence<sal_Int8> aSeq(
static_cast< const sal_Int8* >(aDestStrm.GetData()),
aDestStrm.GetEndOfData());
@@ -3033,7 +3033,7 @@ void SAL_CALL SvxShape::_setPropertyToDefault( const OUString& PropertyName )
const SfxItemPropertySimpleEntry* pProperty = mpPropSet->getPropertyMapEntry(PropertyName);
- if( !mpObj.is() || mpModel == NULL || pProperty == NULL )
+ if( !mpObj.is() || mpModel == nullptr || pProperty == nullptr )
throw beans::UnknownPropertyException();
if( !setPropertyToDefaultImpl( pProperty ) )
@@ -3066,7 +3066,7 @@ uno::Any SAL_CALL SvxShape::_getPropertyDefault( const OUString& aPropertyName )
const SfxItemPropertySimpleEntry* pMap = mpPropSet->getPropertyMapEntry(aPropertyName);
- if( !mpObj.is() || pMap == NULL || mpModel == NULL )
+ if( !mpObj.is() || pMap == nullptr || mpModel == nullptr )
throw beans::UnknownPropertyException();
if(( pMap->nWID >= OWN_ATTR_VALUE_START && pMap->nWID <= OWN_ATTR_VALUE_END ) ||
@@ -3217,8 +3217,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
{
case OBJ_GRUP:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_GroupServices;
@@ -3233,8 +3233,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
}
case OBJ_CUSTOMSHAPE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_CustomShapeServices;
@@ -3260,8 +3260,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
}
case OBJ_LINE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_LineServices;
@@ -3291,8 +3291,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_RECT:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_RectServices;
@@ -3323,8 +3323,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_CARC:
case OBJ_CCUT:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_CircServices;
@@ -3356,8 +3356,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_PATHPLIN:
case OBJ_PLIN:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_PathServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_PathServices,14,
@@ -3387,8 +3387,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_PATHPOLY:
case OBJ_POLY:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_PolyServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_PolyServices,15,
@@ -3420,8 +3420,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_FREELINE:
case OBJ_PATHLINE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_FreeLineServices;
@@ -3455,8 +3455,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_FREEFILL:
case OBJ_PATHFILL:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_FreeFillServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_FreeFillServices,15,
@@ -3489,8 +3489,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_TITLETEXT:
case OBJ_TEXT:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_TextServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_TextServices,14,
@@ -3519,8 +3519,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_GRAF:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_GrafServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_GrafServices, 12,
@@ -3547,8 +3547,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_OLE2:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_Ole2Services;
@@ -3576,8 +3576,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_CAPTION:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_CaptionServices;
@@ -3608,8 +3608,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_PAGE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_PageServices;
@@ -3625,8 +3625,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_MEASURE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_MeasureServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_MeasureServices,15,
@@ -3658,8 +3658,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_FRAME:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_FrameServices;
@@ -3675,8 +3675,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_UNO:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_UnoServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
@@ -3690,8 +3690,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
case OBJ_EDGE:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_EdgeServices;
@@ -3721,8 +3721,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
}
case OBJ_MEDIA:
{
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_MediaServices;
@@ -3742,8 +3742,8 @@ uno::Sequence< OUString > SAL_CALL SvxShape::_getSupportedServiceNames()
const sal_uInt16 nIdent = mpObj->GetObjIdentifier();
OSL_ENSURE( nIdent == OBJ_UNO, "SvxShape::_getSupportedServiceNames: FmFormInventor, but no UNO object?" );
#endif
- static uno::Sequence< OUString > *pSeq = 0;
- if( 0 == pSeq )
+ static uno::Sequence< OUString > *pSeq = nullptr;
+ if( nullptr == pSeq )
{
static uno::Sequence< OUString > SvxShape_UnoServices;
comphelper::ServiceInfoHelper::addToSequence( SvxShape_UnoServices, 2,
@@ -3933,7 +3933,7 @@ SvxShapeText::SvxShapeText( SdrObject* pObject ) throw ()
: SvxShape( pObject, getSvxMapProvider().GetMap(SVXMAP_TEXT), getSvxMapProvider().GetPropertySet(SVXMAP_TEXT, SdrObject::GetGlobalDrawObjectItemPool()) ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
- SetEditSource( new SvxTextEditSource( pObject, 0 ) );
+ SetEditSource( new SvxTextEditSource( pObject, nullptr ) );
}
@@ -3941,21 +3941,21 @@ SvxShapeText::SvxShapeText( SdrObject* pObject, const SfxItemPropertyMapEntry* p
: SvxShape( pObject, pPropertyMap, pPropertySet ), SvxUnoTextBase( ImplGetSvxUnoOutlinerTextCursorSvxPropertySet() )
{
if( pObject && pObject->GetModel() )
- SetEditSource( new SvxTextEditSource( pObject, 0 ) );
+ SetEditSource( new SvxTextEditSource( pObject, nullptr ) );
}
SvxShapeText::~SvxShapeText() throw ()
{
// check if only this instance is registered at the ranges
- DBG_ASSERT( (NULL == GetEditSource()) || (GetEditSource()->getRanges().size()==1),
+ DBG_ASSERT( (nullptr == GetEditSource()) || (GetEditSource()->getRanges().size()==1),
"svx::SvxShapeText::~SvxShapeText(), text shape with living text ranges destroyed!");
}
void SvxShapeText::Create( SdrObject* pNewObj, SvxDrawPage* pNewPage )
{
- if( pNewObj && (NULL == GetEditSource()))
- SetEditSource( new SvxTextEditSource( pNewObj, 0 ) );
+ if( pNewObj && (nullptr == GetEditSource()))
+ SetEditSource( new SvxTextEditSource( pNewObj, nullptr ) );
SvxShape::Create( pNewObj, pNewPage );
}
@@ -4059,7 +4059,7 @@ void SvxShapeText::unlock()
uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno::RuntimeException, std::exception)
{
::SolarMutexGuard aGuard;
- SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : nullptr;
if( pForwarder )
::GetSelection( maSelection, pForwarder );
return SvxUnoTextBase::getStart();
@@ -4069,7 +4069,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getStart() throw(uno::
uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::RuntimeException, std::exception)
{
::SolarMutexGuard aGuard;
- SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : nullptr;
if( pForwarder )
::GetSelection( maSelection, pForwarder );
return SvxUnoTextBase::getEnd();
@@ -4078,7 +4078,7 @@ uno::Reference< text::XTextRange > SAL_CALL SvxShapeText::getEnd() throw(uno::Ru
OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException, std::exception)
{
::SolarMutexGuard aGuard;
- SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : nullptr;
if( pForwarder )
::GetSelection( maSelection, pForwarder );
return SvxUnoTextBase::getString();
@@ -4088,7 +4088,7 @@ OUString SAL_CALL SvxShapeText::getString() throw(uno::RuntimeException, std::ex
void SAL_CALL SvxShapeText::setString( const OUString& aString ) throw(uno::RuntimeException, std::exception)
{
::SolarMutexGuard aGuard;
- SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : NULL;
+ SvxTextForwarder* pForwarder = mpEditSource ? mpEditSource->GetTextForwarder() : nullptr;
if( pForwarder )
::GetSelection( maSelection, pForwarder );
SvxUnoTextBase::setString( aString );
@@ -4190,7 +4190,7 @@ uno::Reference< drawing::XShape > GetXShapeForSdrObject( SdrObject* pObj ) throw
SdrObject* GetSdrObjectFromXShape( uno::Reference< drawing::XShape > xShape ) throw()
{
SvxShape* pShape = SvxShape::getImplementation( xShape );
- return pShape ? pShape->GetSdrObject() : 0;
+ return pShape ? pShape->GetSdrObject() : nullptr;
}
@@ -4198,7 +4198,7 @@ SdrObject* GetSdrObjectFromXShape( uno::Reference< drawing::XShape > xShape ) th
SdrObject* SdrObject::getSdrObjectFromXShape( const css::uno::Reference< css::uno::XInterface >& xInt )
{
SvxShape* pSvxShape = SvxShape::getImplementation( xInt );
- return pSvxShape ? pSvxShape->GetSdrObject() : 0;
+ return pSvxShape ? pSvxShape->GetSdrObject() : nullptr;
}
uno::Any SvxItemPropertySet_getPropertyValue( const SfxItemPropertySimpleEntry* pMap, const SfxItemSet& rSet )
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 30c096d0bdab..c776fa98f956 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -163,12 +163,12 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject* pObject, SdrText* pText
: maRefCount ( 0 ),
mpObject ( pObject ),
mpText ( pText ),
- mpView ( NULL ),
- mpWindow ( NULL ),
- mpModel ( pObject ? pObject->GetModel() : NULL ),
- mpOutliner ( NULL ),
- mpTextForwarder ( NULL ),
- mpViewForwarder ( NULL ),
+ mpView ( nullptr ),
+ mpWindow ( nullptr ),
+ mpModel ( pObject ? pObject->GetModel() : nullptr ),
+ mpOutliner ( nullptr ),
+ mpTextForwarder ( nullptr ),
+ mpViewForwarder ( nullptr ),
mbDataValid ( false ),
mbDestroyed ( false ),
mbIsLocked ( false ),
@@ -203,9 +203,9 @@ SvxTextEditSourceImpl::SvxTextEditSourceImpl( SdrObject& rObject, SdrText* pText
mpView ( &rView ),
mpWindow ( &rWindow ),
mpModel ( rObject.GetModel() ),
- mpOutliner ( NULL ),
- mpTextForwarder ( NULL ),
- mpViewForwarder ( NULL ),
+ mpOutliner ( nullptr ),
+ mpTextForwarder ( nullptr ),
+ mpViewForwarder ( nullptr ),
mbDataValid ( false ),
mbDestroyed ( false ),
mbIsLocked ( false ),
@@ -292,16 +292,16 @@ void SvxTextEditSourceImpl::ChangeModel( SdrModel* pNewModel )
mpModel->disposeOutliner( mpOutliner );
else
delete mpOutliner;
- mpOutliner = 0;
+ mpOutliner = nullptr;
}
if( mpView )
{
EndListening( *mpView );
- mpView = 0;
+ mpView = nullptr;
}
- mpWindow = 0;
+ mpWindow = nullptr;
m_xLinguServiceManager.clear();
mpModel = pNewModel;
@@ -309,13 +309,13 @@ void SvxTextEditSourceImpl::ChangeModel( SdrModel* pNewModel )
if( mpTextForwarder )
{
delete mpTextForwarder;
- mpTextForwarder = 0;
+ mpTextForwarder = nullptr;
}
if( mpViewForwarder )
{
delete mpViewForwarder;
- mpViewForwarder = 0;
+ mpViewForwarder = nullptr;
}
if( mpModel )
@@ -340,11 +340,11 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
if (&rBC == mpView)
{
- mpView = 0;
+ mpView = nullptr;
if (mpViewForwarder)
{
delete mpViewForwarder;
- mpViewForwarder = 0;
+ mpViewForwarder = nullptr;
}
}
}
@@ -411,7 +411,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
if( !mbForwarderIsEditMode )
{
delete mpTextForwarder;
- mpTextForwarder = NULL;
+ mpTextForwarder = nullptr;
}
// register as listener - need to broadcast state change messages
@@ -441,7 +441,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
// valid (no need for UpdateData(), it's been
// synched on SdrEndTextEdit)
delete mpViewForwarder;
- mpViewForwarder = NULL;
+ mpViewForwarder = nullptr;
// #100424# Invalidate text forwarder, we might
// not be called again before entering edit mode a
@@ -451,7 +451,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
mbForwarderIsEditMode = false;
delete mpTextForwarder;
- mpTextForwarder = NULL;
+ mpTextForwarder = nullptr;
}
}
break;
@@ -468,7 +468,7 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
/* this is a callback from the attached SdrObject when it is actually deleted */
void SvxTextEditSourceImpl::ObjectInDestruction(const SdrObject&)
{
- mpObject = 0;
+ mpObject = nullptr;
dispose();
Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
}
@@ -479,13 +479,13 @@ void SvxTextEditSourceImpl::dispose()
if( mpTextForwarder )
{
delete mpTextForwarder;
- mpTextForwarder = 0;
+ mpTextForwarder = nullptr;
}
if( mpViewForwarder )
{
delete mpViewForwarder;
- mpViewForwarder = 0;
+ mpViewForwarder = nullptr;
}
if( mpOutliner )
@@ -498,27 +498,27 @@ void SvxTextEditSourceImpl::dispose()
{
delete mpOutliner;
}
- mpOutliner = 0;
+ mpOutliner = nullptr;
}
if( mpModel )
{
EndListening( *mpModel );
- mpModel = 0;
+ mpModel = nullptr;
}
if( mpView )
{
EndListening( *mpView );
- mpView = 0;
+ mpView = nullptr;
}
if( mpObject )
{
mpObject->RemoveObjectUser( *this );
- mpObject = 0;
+ mpObject = nullptr;
}
- mpWindow = 0;
+ mpWindow = nullptr;
}
@@ -578,7 +578,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
if (!mpTextForwarder)
{
- if( mpOutliner == NULL )
+ if( mpOutliner == nullptr )
{
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject );
sal_uInt16 nOutlMode = OUTLINERMODE_TEXTOBJECT;
@@ -625,7 +625,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetBackgroundTextForwarder()
{
mpTextForwarder->flushCache();
- OutlinerParaObject* pOutlinerParaObject = NULL;
+ OutlinerParaObject* pOutlinerParaObject = nullptr;
SdrTextObj* pTextObj = dynamic_cast<SdrTextObj*>( mpObject );
if( pTextObj && pTextObj->getActiveText() == mpText )
pOutlinerParaObject = pTextObj->GetEditOutlinerParaObject(); // Get the OutlinerParaObject if text edit is active
@@ -725,14 +725,14 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetEditModeTextForwarder()
SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder()
{
- if( mbDestroyed || mpObject == NULL )
- return NULL;
+ if( mbDestroyed || mpObject == nullptr )
+ return nullptr;
- if( mpModel == NULL )
+ if( mpModel == nullptr )
mpModel = mpObject->GetModel();
- if( mpModel == NULL )
- return NULL;
+ if( mpModel == nullptr )
+ return nullptr;
// distinguish the cases
// a) connected to view, maybe edit mode is active, can work directly on the EditOutliner
@@ -743,7 +743,7 @@ SvxTextForwarder* SvxTextEditSourceImpl::GetTextForwarder()
{
// forwarder mismatch - create new
delete mpTextForwarder;
- mpTextForwarder = NULL;
+ mpTextForwarder = nullptr;
}
if( IsEditMode() )
@@ -774,19 +774,19 @@ SvxDrawOutlinerViewForwarder* SvxTextEditSourceImpl::CreateViewForwarder()
}
}
- return NULL;
+ return nullptr;
}
SvxEditViewForwarder* SvxTextEditSourceImpl::GetEditViewForwarder( bool bCreate )
{
- if( mbDestroyed || mpObject == NULL )
- return NULL;
+ if( mbDestroyed || mpObject == nullptr )
+ return nullptr;
- if( mpModel == NULL )
+ if( mpModel == nullptr )
mpModel = mpObject->GetModel();
- if( mpModel == NULL )
- return NULL;
+ if( mpModel == nullptr )
+ return nullptr;
// shall we delete?
if( mpViewForwarder )
@@ -796,7 +796,7 @@ SvxEditViewForwarder* SvxTextEditSourceImpl::GetEditViewForwarder( bool bCreate
// destroy all forwarders (no need for UpdateData(),
// it's been synched on SdrEndTextEdit)
delete mpViewForwarder;
- mpViewForwarder = NULL;
+ mpViewForwarder = nullptr;
}
}
// which to create? Directly in edit mode, create new, or none?
@@ -813,7 +813,7 @@ SvxEditViewForwarder* SvxTextEditSourceImpl::GetEditViewForwarder( bool bCreate
UpdateData();
delete mpTextForwarder;
- mpTextForwarder = NULL;
+ mpTextForwarder = nullptr;
// enter edit mode
mpView->SdrEndTextEdit();
@@ -878,7 +878,7 @@ void SvxTextEditSourceImpl::UpdateData()
}
else
{
- pTextObj->NbcSetOutlinerParaObjectForText( NULL,mpText );
+ pTextObj->NbcSetOutlinerParaObjectForText( nullptr,mpText );
}
}