Kaydet (Commit) 80e8ffc0 authored tarafından Matúš Kukan's avatar Matúš Kukan

tubes: use correct casts

üst 3117ee35
...@@ -65,9 +65,9 @@ class TubeContacts : public ModelessDialog ...@@ -65,9 +65,9 @@ class TubeContacts : public ModelessDialog
void Listen() void Listen()
{ {
ScDocShell *pScDocShell = reinterpret_cast<ScDocShell*> (SfxObjectShell::Current()); ScDocShell *pScDocShell = dynamic_cast<ScDocShell*> (SfxObjectShell::Current());
ScDocFunc *pDocFunc = pScDocShell ? &pScDocShell->GetDocFunc() : NULL; ScDocFunc *pDocFunc = pScDocShell ? &pScDocShell->GetDocFunc() : NULL;
ScDocFuncSend *pSender = reinterpret_cast<ScDocFuncSend*> (pDocFunc); ScDocFuncSend *pSender = dynamic_cast<ScDocFuncSend*> (pDocFunc);
if (!pSender) if (!pSender)
{ {
delete pDocFunc; delete pDocFunc;
...@@ -83,7 +83,7 @@ class TubeContacts : public ModelessDialog ...@@ -83,7 +83,7 @@ class TubeContacts : public ModelessDialog
{ {
AccountContact *pAC = NULL; AccountContact *pAC = NULL;
if (maList.FirstSelected()) if (maList.FirstSelected())
pAC = reinterpret_cast<AccountContact*> (maList.FirstSelected()->GetUserData()); pAC = static_cast<AccountContact*> (maList.FirstSelected()->GetUserData());
if (pAC) if (pAC)
{ {
TpAccount* pAccount = pAC->mpAccount; TpAccount* pAccount = pAC->mpAccount;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment