summaryrefslogtreecommitdiff
path: root/sd/source/ui/func
diff options
context:
space:
mode:
authorNoel <noel.grandin@collabora.co.uk>2021-03-07 18:41:56 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-03-08 07:40:01 +0100
commitc7b898df4d452746399621f6adc8e7da088f0f3a (patch)
treeeb4cb09ceef899c3015724b6d3f81f1e8a4a6ce1 /sd/source/ui/func
parent04e7a34a19b3658de57c4f2b3b0fa8445b01f199 (diff)
clean up some more dynamic/static casting
using a hacked version of the staticdynamic plugin and some judgement Change-Id: I5e6668b19320025e419f84bebceade4239577729 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112137 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/func')
-rw-r--r--sd/source/ui/func/fupoor.cxx8
-rw-r--r--sd/source/ui/func/futext.cxx4
2 files changed, 6 insertions, 6 deletions
diff --git a/sd/source/ui/func/fupoor.cxx b/sd/source/ui/func/fupoor.cxx
index 7d1728be115e..817d0f8c6014 100644
--- a/sd/source/ui/func/fupoor.cxx
+++ b/sd/source/ui/func/fupoor.cxx
@@ -194,7 +194,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
SdrObject* pObj = aIter.Next();
- if(dynamic_cast< const SdrTextObj *>( pObj ))
+ if(auto pTextObj = dynamic_cast<SdrTextObj *>( pObj ))
{
SdrInventor nInv(pObj->GetObjInventor());
sal_uInt16 nKnd(pObj->GetObjIdentifier());
@@ -202,7 +202,7 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
if(SdrInventor::Default == nInv &&
(OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd))
{
- pCandidate = static_cast<SdrTextObj*>(pObj);
+ pCandidate = pTextObj;
}
}
}
@@ -824,14 +824,14 @@ bool FuPoor::KeyInput(const KeyEvent& rKEvt)
{
SdrObject* pObj = aIter.Next();
- if(dynamic_cast< const SdrTextObj *>( pObj ))
+ if(auto pTextObj = dynamic_cast< SdrTextObj *>( pObj ))
{
SdrInventor nInv(pObj->GetObjInventor());
sal_uInt16 nKnd(pObj->GetObjIdentifier());
if(SdrInventor::Default == nInv && OBJ_TITLETEXT == nKnd)
{
- pCandidate = static_cast<SdrTextObj*>(pObj);
+ pCandidate = pTextObj;
}
}
}
diff --git a/sd/source/ui/func/futext.cxx b/sd/source/ui/func/futext.cxx
index db565991a74c..be5a00c89c44 100644
--- a/sd/source/ui/func/futext.cxx
+++ b/sd/source/ui/func/futext.cxx
@@ -264,11 +264,11 @@ bool FuText::MouseButtonDown(const MouseEvent& rMEvt)
{
const SvxFieldData* pField = pFieldItem->GetField();
- if (pField && dynamic_cast< const SvxURLField *>( pField ) != nullptr)
+ if (auto pURLField = dynamic_cast< const SvxURLField *>( pField ))
{
eHit = SdrHitKind::MarkedObject;
aVEvt.eEvent = SdrEventKind::ExecuteUrl;
- aVEvt.pURLField = static_cast<const SvxURLField*>(pField);
+ aVEvt.pURLField = pURLField;
}
}
}