summaryrefslogtreecommitdiff
path: root/svx
diff options
context:
space:
mode:
Diffstat (limited to 'svx')
-rw-r--r--svx/inc/pch/precompiled_svx.hxx1
-rw-r--r--svx/inc/pch/precompiled_svxcore.hxx1
-rw-r--r--svx/source/accessibility/AccessibleTextHelper.cxx10
-rw-r--r--svx/source/accessibility/GraphCtlAccessibleContext.cxx5
-rw-r--r--svx/source/dialog/svxruler.cxx9
-rw-r--r--svx/source/form/fmundo.cxx4
-rw-r--r--svx/source/form/navigatortreemodel.cxx4
-rw-r--r--svx/source/sdr/properties/attributeproperties.cxx2
-rw-r--r--svx/source/sdr/properties/customshapeproperties.cxx5
-rw-r--r--svx/source/sdr/properties/textproperties.cxx5
-rw-r--r--svx/source/svdraw/svdoattr.cxx5
-rw-r--r--svx/source/svdraw/svdoedge.cxx9
-rw-r--r--svx/source/svdraw/svdomeas.cxx1
-rw-r--r--svx/source/svdraw/svdotxat.cxx1
-rw-r--r--svx/source/svdraw/svdpage.cxx13
-rw-r--r--svx/source/svdraw/svdpntv.cxx5
-rw-r--r--svx/source/tbxctrls/tbcontrl.cxx1
-rw-r--r--svx/source/unodraw/unoshtxt.cxx17
18 files changed, 35 insertions, 63 deletions
diff --git a/svx/inc/pch/precompiled_svx.hxx b/svx/inc/pch/precompiled_svx.hxx
index fb2da6743768..726dee0fc1f0 100644
--- a/svx/inc/pch/precompiled_svx.hxx
+++ b/svx/inc/pch/precompiled_svx.hxx
@@ -354,7 +354,6 @@
#include <svl/nfkeytab.hxx>
#include <svl/ondemand.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/srchitem.hxx>
#include <svl/stritem.hxx>
#include <svl/svldllapi.h>
diff --git a/svx/inc/pch/precompiled_svxcore.hxx b/svx/inc/pch/precompiled_svxcore.hxx
index 17dee4ebbbf8..9dc699275b39 100644
--- a/svx/inc/pch/precompiled_svxcore.hxx
+++ b/svx/inc/pch/precompiled_svxcore.hxx
@@ -391,7 +391,6 @@
#include <svl/languageoptions.hxx>
#include <svl/lstner.hxx>
#include <svl/poolitem.hxx>
-#include <svl/smplhint.hxx>
#include <svl/stritem.hxx>
#include <svl/style.hxx>
#include <svl/svldllapi.h>
diff --git a/svx/source/accessibility/AccessibleTextHelper.cxx b/svx/source/accessibility/AccessibleTextHelper.cxx
index 9ebfa8f9f63c..f0bdc4c67b37 100644
--- a/svx/source/accessibility/AccessibleTextHelper.cxx
+++ b/svx/source/accessibility/AccessibleTextHelper.cxx
@@ -1174,7 +1174,6 @@ namespace accessibility
// determine hint type
const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>( &rHint );
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
const TextHint* pTextHint = dynamic_cast<const TextHint*>( &rHint );
const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>( &rHint );
const SvxEditSourceHint* pEditSourceHint = dynamic_cast<const SvxEditSourceHint*>( &rHint );
@@ -1308,9 +1307,9 @@ namespace accessibility
}
}
// it's VITAL to keep the SfxSimpleHint last! It's the base of some classes above!
- else if( pSimpleHint )
+ else if( rHint.GetId() )
{
- switch( pSimpleHint->GetId() )
+ switch( rHint.GetId() )
{
case SFX_HINT_DYING:
// edit source is dying under us, become defunc then
@@ -1349,7 +1348,6 @@ namespace accessibility
// determine hint type
const SdrHint* pSdrHint = dynamic_cast<const SdrHint*>( &rHint );
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
const TextHint* pTextHint = dynamic_cast<const TextHint*>( &rHint );
const SvxViewChangedHint* pViewHint = dynamic_cast<const SvxViewChangedHint*>( &rHint );
const SvxEditSourceHint* pEditSourceHint = dynamic_cast<const SvxEditSourceHint*>( &rHint );
@@ -1432,10 +1430,10 @@ namespace accessibility
ProcessQueue();
}
// it's VITAL to keep the SfxSimpleHint last! It's the base of some classes above!
- else if( pSimpleHint )
+ else if( rHint.GetId() )
{
// handle this event _at once_, because after that, objects are invalid
- switch( pSimpleHint->GetId() )
+ switch( rHint.GetId() )
{
case SFX_HINT_DYING:
// edit source is dying under us, become defunc then
diff --git a/svx/source/accessibility/GraphCtlAccessibleContext.cxx b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
index 47eca9687a46..7e6b09cdbfda 100644
--- a/svx/source/accessibility/GraphCtlAccessibleContext.cxx
+++ b/svx/source/accessibility/GraphCtlAccessibleContext.cxx
@@ -31,7 +31,6 @@
#include <vcl/settings.hxx>
#include <osl/mutex.hxx>
#include <tools/gen.hxx>
-#include <svl/smplhint.hxx>
#include <toolkit/helper/convert.hxx>
#include <svtools/colorcfg.hxx>
#include <comphelper/accessibleeventnotifier.hxx>
@@ -754,10 +753,8 @@ void SvxGraphCtrlAccessibleContext::Notify( SfxBroadcaster& /*rBC*/, const SfxHi
}
else
{
- const SfxSimpleHint* pSfxHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
-
// Has our SdDrawDocument just died?
- if(pSfxHint && pSfxHint->GetId() == SFX_HINT_DYING)
+ if(rHint.GetId() == SFX_HINT_DYING)
{
dispose();
}
diff --git a/svx/source/dialog/svxruler.cxx b/svx/source/dialog/svxruler.cxx
index a46c459a8308..48aa1c068ae1 100644
--- a/svx/source/dialog/svxruler.cxx
+++ b/svx/source/dialog/svxruler.cxx
@@ -25,7 +25,7 @@
#include <vcl/settings.hxx>
#include <svl/eitem.hxx>
#include <svl/rectitem.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <sfx2/dispatch.hxx>
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
@@ -3336,11 +3336,8 @@ void SvxRuler::Notify(SfxBroadcaster&, const SfxHint& rHint)
*/
// start update
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>( &rHint );
- if(bActive &&
- pSimpleHint &&
- pSimpleHint->GetId() == SFX_HINT_UPDATEDONE )
- {
+ if (bActive && rHint.GetId() == SFX_HINT_UPDATEDONE)
+ {
Update();
EndListening(*pBindings);
bValid = true;
diff --git a/svx/source/form/fmundo.cxx b/svx/source/form/fmundo.cxx
index 9059a1431d95..38f2e20b8ba4 100644
--- a/svx/source/form/fmundo.cxx
+++ b/svx/source/form/fmundo.cxx
@@ -305,9 +305,9 @@ void FmXUndoEnvironment::Notify( SfxBroadcaster& /*rBC*/, const SfxHint& rHint )
break;
}
}
- else if (const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else if (rHint.GetId())
{
- switch (pSimpleHint->GetId())
+ switch (rHint.GetId())
{
case SFX_HINT_DYING:
dispose();
diff --git a/svx/source/form/navigatortreemodel.cxx b/svx/source/form/navigatortreemodel.cxx
index 675cad5a6ff7..db20c2f75650 100644
--- a/svx/source/form/navigatortreemodel.cxx
+++ b/svx/source/form/navigatortreemodel.cxx
@@ -701,9 +701,9 @@ namespace svxform
}
}
// is shell gone?
- else if (const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint))
+ else if (rHint.GetId())
{
- if (pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
UpdateContent(nullptr);
}
// changed mark of controls?
diff --git a/svx/source/sdr/properties/attributeproperties.cxx b/svx/source/sdr/properties/attributeproperties.cxx
index 9507d4e067a8..23cb3d0e945c 100644
--- a/svx/source/sdr/properties/attributeproperties.cxx
+++ b/svx/source/sdr/properties/attributeproperties.cxx
@@ -40,8 +40,6 @@
#include <svx/svdtrans.hxx>
#include <svx/svdpage.hxx>
-#include <svl/smplhint.hxx>
-
namespace sdr
{
diff --git a/svx/source/sdr/properties/customshapeproperties.cxx b/svx/source/sdr/properties/customshapeproperties.cxx
index ac387cc747f5..6246d5804971 100644
--- a/svx/source/sdr/properties/customshapeproperties.cxx
+++ b/svx/source/sdr/properties/customshapeproperties.cxx
@@ -24,7 +24,7 @@
#include <editeng/eeitem.hxx>
#include <svx/sdtagitm.hxx>
#include <svl/whiter.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
namespace sdr
@@ -212,7 +212,6 @@ namespace sdr
bool bRemoveRenderGeometry = false;
const SfxStyleSheetHint* pStyleHint = dynamic_cast<const SfxStyleSheetHint*>(&rHint);
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
if ( pStyleHint && pStyleHint->GetStyleSheet() == GetStyleSheet() )
{
@@ -224,7 +223,7 @@ namespace sdr
break;
};
}
- else if ( pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DATACHANGED )
+ else if ( rHint.GetId() == SFX_HINT_DATACHANGED )
{
bRemoveRenderGeometry = true;
}
diff --git a/svx/source/sdr/properties/textproperties.cxx b/svx/source/sdr/properties/textproperties.cxx
index de35ec39e3b9..5f76ca86b9f5 100644
--- a/svx/source/sdr/properties/textproperties.cxx
+++ b/svx/source/sdr/properties/textproperties.cxx
@@ -21,7 +21,7 @@
#include <svl/itemset.hxx>
#include <svl/style.hxx>
#include <svl/itemiter.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <svx/svddef.hxx>
#include <svx/svdotext.hxx>
#include <svx/svdoutl.hxx>
@@ -556,8 +556,7 @@ namespace sdr
const svx::ITextProvider& rTextProvider(getTextProvider());
if(dynamic_cast<const SfxStyleSheet *>(&rBC) != nullptr)
{
- const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
- sal_uInt32 nId(pSimple ? pSimple->GetId() : 0L);
+ sal_uInt32 nId(rHint.GetId());
if(SFX_HINT_DATACHANGED == nId)
{
diff --git a/svx/source/svdraw/svdoattr.cxx b/svx/source/svdraw/svdoattr.cxx
index 2caab9295711..a188e1d2a105 100644
--- a/svx/source/svdraw/svdoattr.cxx
+++ b/svx/source/svdraw/svdoattr.cxx
@@ -31,7 +31,7 @@
#include <svx/svdorect.hxx>
#include <svx/svdocirc.hxx>
#include <svx/svdomeas.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <svl/itemiter.hxx>
#include <svx/xenum.hxx>
#include <svx/xlineit0.hxx>
@@ -121,8 +121,7 @@ void SdrAttrObj::SetModel(SdrModel* pNewModel)
void SdrAttrObj::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
- bool bDataChg(pSimple && SFX_HINT_DATACHANGED == pSimple->GetId());
+ bool bDataChg(SFX_HINT_DATACHANGED == rHint.GetId());
if(bDataChg)
{
diff --git a/svx/source/svdraw/svdoedge.cxx b/svx/source/svdraw/svdoedge.cxx
index db40a25c2477..7b5ce5678631 100644
--- a/svx/source/svdraw/svdoedge.cxx
+++ b/svx/source/svdraw/svdoedge.cxx
@@ -25,7 +25,7 @@
#include <basegfx/polygon/b2dpolygon.hxx>
#include <basegfx/polygon/b2dpolygontools.hxx>
#include <editeng/eeitem.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <svl/style.hxx>
#include <sdr/contact/viewcontactofsdredgeobj.hxx>
@@ -1559,8 +1559,7 @@ line (CL). The number of object margins per object varies between 0 and 3:
void SdrEdgeObj::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimple = dynamic_cast<const SfxSimpleHint*>(&rHint);
- const sal_uInt32 nId = pSimple==nullptr ? 0 : pSimple->GetId();
+ const sal_uInt32 nId = rHint.GetId();
bool bDataChg=nId==SFX_HINT_DATACHANGED;
bool bDying=nId==SFX_HINT_DYING;
bool bObj1=aCon1.pObj!=nullptr && aCon1.pObj->GetBroadcaster()==&rBC;
@@ -1608,13 +1607,13 @@ void SdrEdgeObj::Reformat()
{
if( nullptr != aCon1.pObj )
{
- SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
+ SfxHint aHint( SFX_HINT_DATACHANGED );
Notify( *const_cast<SfxBroadcaster*>(aCon1.pObj->GetBroadcaster()), aHint );
}
if( nullptr != aCon2.pObj )
{
- SfxSimpleHint aHint( SFX_HINT_DATACHANGED );
+ SfxHint aHint( SFX_HINT_DATACHANGED );
Notify( *const_cast<SfxBroadcaster*>(aCon2.pObj->GetBroadcaster()), aHint );
}
}
diff --git a/svx/source/svdraw/svdomeas.cxx b/svx/source/svdraw/svdomeas.cxx
index 41146cdbaeb5..dcfda7e93744 100644
--- a/svx/source/svdraw/svdomeas.cxx
+++ b/svx/source/svdraw/svdomeas.cxx
@@ -34,7 +34,6 @@
#include <editeng/outliner.hxx>
#include <editeng/outlobj.hxx>
#include <math.h>
-#include <svl/smplhint.hxx>
#include <svl/style.hxx>
#include <sdr/contact/viewcontactofsdrmeasureobj.hxx>
diff --git a/svx/source/svdraw/svdotxat.cxx b/svx/source/svdraw/svdotxat.cxx
index 170a2677e62c..f4e39095895f 100644
--- a/svx/source/svdraw/svdotxat.cxx
+++ b/svx/source/svdraw/svdotxat.cxx
@@ -34,7 +34,6 @@
#include <editeng/editview.hxx>
-#include <svl/smplhint.hxx>
#include <svl/whiter.hxx>
#include <editeng/outlobj.hxx>
#include <editeng/outliner.hxx>
diff --git a/svx/source/svdraw/svdpage.cxx b/svx/source/svdraw/svdpage.cxx
index 9b987a725659..3bb3fe977f09 100644
--- a/svx/source/svdraw/svdpage.cxx
+++ b/svx/source/svdraw/svdpage.cxx
@@ -53,7 +53,7 @@
#include <svx/sdr/contact/viewobjectcontact.hxx>
#include <svx/sdr/contact/displayinfo.hxx>
#include <algorithm>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <rtl/strbuf.hxx>
#include <libxml/xmlwriter.h>
@@ -1099,25 +1099,20 @@ SdrPageProperties::~SdrPageProperties()
void SdrPageProperties::Notify(SfxBroadcaster& /*rBC*/, const SfxHint& rHint)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast< const SfxSimpleHint* >(&rHint);
-
- if(pSimpleHint)
+ switch(rHint.GetId())
{
- switch(pSimpleHint->GetId())
- {
- case SFX_HINT_DATACHANGED :
+ case SFX_HINT_DATACHANGED :
{
// notify change, broadcast
ImpPageChange(*mpSdrPage);
break;
}
- case SFX_HINT_DYING :
+ case SFX_HINT_DYING :
{
// Style needs to be forgotten
ImpRemoveStyleSheet();
break;
}
- }
}
}
diff --git a/svx/source/svdraw/svdpntv.cxx b/svx/source/svdraw/svdpntv.cxx
index f9b2b19a619e..2e26091d99c8 100644
--- a/svx/source/svdraw/svdpntv.cxx
+++ b/svx/source/svdraw/svdpntv.cxx
@@ -30,7 +30,7 @@
#endif
#include <svx/svdpage.hxx>
#include <svx/svdpagv.hxx>
-#include <svl/smplhint.hxx>
+#include <svl/hint.hxx>
#include <editeng/editdata.hxx>
#include <svx/svdmrkv.hxx>
@@ -236,8 +236,7 @@ void SdrPaintView::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
//If the stylesheet has been destroyed
if (&rBC == mpDefaultStyleSheet)
{
- const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint);
- if (pSimpleHint && pSimpleHint->GetId() == SFX_HINT_DYING)
+ if (rHint.GetId() == SFX_HINT_DYING)
mpDefaultStyleSheet = nullptr;
return;
}
diff --git a/svx/source/tbxctrls/tbcontrl.cxx b/svx/source/tbxctrls/tbcontrl.cxx
index def93ad20d9b..bf0dd8031620 100644
--- a/svx/source/tbxctrls/tbcontrl.cxx
+++ b/svx/source/tbxctrls/tbcontrl.cxx
@@ -50,7 +50,6 @@
#include <vcl/mnemonic.hxx>
#include <vcl/svapp.hxx>
#include <vcl/settings.hxx>
-#include <svl/smplhint.hxx>
#include <svtools/colorcfg.hxx>
#include <com/sun/star/style/XStyleFamiliesSupplier.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
diff --git a/svx/source/unodraw/unoshtxt.cxx b/svx/source/unodraw/unoshtxt.cxx
index 73543f01d74c..6f8ff3920025 100644
--- a/svx/source/unodraw/unoshtxt.cxx
+++ b/svx/source/unodraw/unoshtxt.cxx
@@ -317,18 +317,15 @@ void SvxTextEditSourceImpl::Notify(SfxBroadcaster& rBC, const SfxHint& rHint)
// #i105988 keep reference to this object
rtl::Reference< SvxTextEditSourceImpl > xThis( this );
- if (const SfxSimpleHint* pSimpleHint = dynamic_cast<const SfxSimpleHint*>(&rHint))
+ if (SFX_HINT_DYING == rHint.GetId())
{
- if (SFX_HINT_DYING == pSimpleHint->GetId())
+ if (&rBC == mpView)
{
- if (&rBC == mpView)
+ mpView = nullptr;
+ if (mpViewForwarder)
{
- mpView = nullptr;
- if (mpViewForwarder)
- {
- delete mpViewForwarder;
- mpViewForwarder = nullptr;
- }
+ delete mpViewForwarder;
+ mpViewForwarder = nullptr;
}
}
}
@@ -448,7 +445,7 @@ void SvxTextEditSourceImpl::ObjectInDestruction(const SdrObject&)
{
mpObject = nullptr;
dispose();
- Broadcast( SfxSimpleHint( SFX_HINT_DYING ) );
+ Broadcast( SfxHint( SFX_HINT_DYING ) );
}
/* unregister at all objects and set all references to 0 */