summaryrefslogtreecommitdiff
path: root/svx/source/svdraw
diff options
context:
space:
mode:
Diffstat (limited to 'svx/source/svdraw')
-rw-r--r--svx/source/svdraw/svdedxv.cxx2
-rw-r--r--svx/source/svdraw/svdmodel.cxx2
-rw-r--r--svx/source/svdraw/svdmrkv.cxx4
-rw-r--r--svx/source/svdraw/svdoattr.cxx2
-rw-r--r--svx/source/svdraw/svdoedge.cxx5
-rw-r--r--svx/source/svdraw/svdpntv.cxx9
6 files changed, 10 insertions, 14 deletions
diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 390835469ede..6945d2f66aca 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -143,7 +143,7 @@ void SdrObjEditView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
SdrGlueEditView::Notify(rBC,rHint);
// change of printer while editing
- SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
if (pSdrHint!=NULL && pTextEditOutliner!=NULL) {
SdrHintKind eKind=pSdrHint->GetKind();
if (eKind==HINT_REFDEVICECHG) {
diff --git a/svx/source/svdraw/svdmodel.cxx b/svx/source/svdraw/svdmodel.cxx
index bb2b68a97b00..4e7d9313738a 100644
--- a/svx/source/svdraw/svdmodel.cxx
+++ b/svx/source/svdraw/svdmodel.cxx
@@ -2015,8 +2015,6 @@ const ::com::sun::star::uno::Sequence< sal_Int8 >& SdrModel::getUnoTunnelImpleme
-TYPEINIT1(SdrHint,SfxHint);
-
SdrHint::SdrHint(SdrHintKind eNewHint)
: mpPage(0L),
mpObj(0L),
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 2f3686af0eb4..8b066f0ab6e8 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -175,8 +175,8 @@ SdrMarkView::~SdrMarkView()
void SdrMarkView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
- if (pSdrHint!=NULL)
+ const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
+ if (pSdrHint)
{
SdrHintKind eKind=pSdrHint->GetKind();
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 24146a18ee59..727c06122a71 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -124,7 +124,7 @@ void SdrAttrObj::SetModel(SdrModel* pNewModel)
void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- SfxSimpleHint *pSimple = PTR_CAST(SfxSimpleHint, &rHint);
+ const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
bool bDataChg(pSimple && SFX_HINT_DATACHANGED == pSimple->GetId());
if(bDataChg)
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index 1e690bfe8b78..a743cc3ce901 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -164,7 +164,6 @@ sdr::contact::ViewContact* SdrEdgeObj::CreateObjectSpecificViewContact()
}
-
TYPEINIT1(SdrEdgeObj,SdrTextObj);
SdrEdgeObj::SdrEdgeObj()
@@ -1567,7 +1566,7 @@ line (CL). The number of object margins per object varies between 0 and 3:
void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- SfxSimpleHint* pSimple=PTR_CAST(SfxSimpleHint,&rHint);
+ const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
sal_uIntPtr nId=pSimple==0 ? 0 : pSimple->GetId();
bool bDataChg=nId==SFX_HINT_DATACHANGED;
bool bDying=nId==SFX_HINT_DYING;
@@ -1587,7 +1586,7 @@ void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
SdrTextObj::Notify(rBC,rHint);
if (nNotifyingCount==0) { // a locking flag
((SdrEdgeObj*)this)->nNotifyingCount++;
- SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
+ const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
if (bDataChg) { // StyleSheet changed
ImpSetAttrToEdgeInfo(); // when changing templates, copy values from Pool to aEdgeInfo
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index 3ab08d480cd4..bc790703b41f 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -120,8 +120,6 @@ OutputDevice* SdrPaintView::GetFirstOutputDevice() const
-TYPEINIT1( SvxViewHint, SfxHint );
-
SvxViewHint::SvxViewHint (HintType eHintType)
: meHintType(eHintType)
{
@@ -258,15 +256,16 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
//If the stylesheet has been destroyed
if (&rBC == pDefaultStyleSheet)
{
- if (rHint.ISA(SfxSimpleHint) && ((const SfxSimpleHint&)rHint).GetId() == SFX_HINT_DYING)
+ const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
+ if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
pDefaultStyleSheet = NULL;
return;
}
bool bObjChg=!bSomeObjChgdFlag; // if true, evaluate for ComeBack timer
if (bObjChg) {
- SdrHint* pSdrHint=PTR_CAST(SdrHint,&rHint);
- if (pSdrHint!=NULL) {
+ const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>(&rHint);
+ if (pSdrHint) {
SdrHintKind eKind=pSdrHint->GetKind();
if (eKind==HINT_OBJCHG || eKind==HINT_OBJINSERTED || eKind==HINT_OBJREMOVED) {
if (bObjChg) {