summaryrefslogtreecommitdiff
path: root/basctl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2016-03-30 14:39:54 +0200
committerMichael Stahl <mstahl@redhat.com>2016-03-30 14:42:47 +0200
commitba0a866b83f016fd460320e7d057dd107e019f19 (patch)
tree155cc41d0f52eeb52732df9d7d159fcfa45cc0c9 /basctl
parent1f611f3bb3b3d30b2b30570a09b4477ffb585ce4 (diff)
tdf#96505: fix wrong SfxDispatcher::Execute calls ...
... that are now busted on all 64-bit platforms since commit 57d0caacee2f395be2e89b78f8ece2d47b2c8683 but were already busted only on 64-bit WNT before. SfxDispatcher::Execute(sal_uInt16 nSlot, SfxCallMode eCall, const SfxPoolItem* pArg1, ...) assigns the varargs to a "const SfxPoolItem *", so passing in "0L" is only correct if long is 64-bit, but on WNT 64-bit long is 32-bit, so use "nullptr" already. Change-Id: I50448d8ad121c4881be549623d44c44b00e56d98
Diffstat (limited to 'basctl')
-rw-r--r--basctl/source/basicide/basicbox.cxx2
-rw-r--r--basctl/source/basicide/bastype2.cxx2
-rw-r--r--basctl/source/basicide/bastypes.cxx2
-rw-r--r--basctl/source/basicide/macrodlg.cxx14
-rw-r--r--basctl/source/basicide/moduldl2.cxx2
-rw-r--r--basctl/source/basicide/moduldlg.cxx22
6 files changed, 29 insertions, 15 deletions
diff --git a/basctl/source/basicide/basicbox.cxx b/basctl/source/basicide/basicbox.cxx
index 847a1a072d7e..131e510cc1ea 100644
--- a/basctl/source/basicide/basicbox.cxx
+++ b/basctl/source/basicide/basicbox.cxx
@@ -311,7 +311,7 @@ void LibBox::NotifyIDE()
if (SfxDispatcher* pDispatcher = GetDispatcher())
pDispatcher->Execute(
SID_BASICIDE_LIBSELECTED,
- SfxCallMode::SYNCHRON, &aDocumentItem, &aLibNameItem, 0
+ SfxCallMode::SYNCHRON, &aDocumentItem, &aLibNameItem, nullptr
);
}
ReleaseFocus();
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 288d7edca1da..652d53f4e504 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -932,7 +932,7 @@ bool TreeListBox::OpenCurrent()
);
pDispatcher->Execute(
SID_BASICIDE_SHOWSBX,
- SfxCallMode::SYNCHRON, &aSbxItem, 0
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr
);
return true;
}
diff --git a/basctl/source/basicide/bastypes.cxx b/basctl/source/basicide/bastypes.cxx
index 01e0b6db29eb..ae6a9375f3f8 100644
--- a/basctl/source/basicide/bastypes.cxx
+++ b/basctl/source/basicide/bastypes.cxx
@@ -555,7 +555,7 @@ void TabBar::EndRenaming()
SfxStringItem aNewName( SID_BASICIDE_ARG_MODULENAME, GetEditText() );
if (SfxDispatcher* pDispatcher = GetDispatcher())
pDispatcher->Execute( SID_BASICIDE_NAMECHANGEDONTAB,
- SfxCallMode::SYNCHRON, &aID, &aNewName, 0 );
+ SfxCallMode::SYNCHRON, &aID, &aNewName, nullptr);
}
}
diff --git a/basctl/source/basicide/macrodlg.cxx b/basctl/source/basicide/macrodlg.cxx
index c4a5fa403344..4070b5062de5 100644
--- a/basctl/source/basicide/macrodlg.cxx
+++ b/basctl/source/basicide/macrodlg.cxx
@@ -678,7 +678,10 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void )
SfxGetpApp()->ExecuteSlot( aRequest );
if (SfxDispatcher* pDispatcher = GetDispatcher())
- pDispatcher->Execute( SID_BASICIDE_EDITMACRO, SfxCallMode::ASYNCHRON, &aInfoItem, 0 );
+ {
+ pDispatcher->Execute(SID_BASICIDE_EDITMACRO,
+ SfxCallMode::ASYNCHRON, &aInfoItem, nullptr);
+ }
EndDialog(Macro_Edit);
}
else
@@ -687,8 +690,10 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void )
{
DeleteMacro();
if (SfxDispatcher* pDispatcher = GetDispatcher())
+ {
pDispatcher->Execute( SID_BASICIDE_UPDATEMODULESOURCE,
- SfxCallMode::SYNCHRON, &aInfoItem, 0 );
+ SfxCallMode::SYNCHRON, &aInfoItem, nullptr);
+ }
CheckButtons();
UpdateFields();
//if ( m_pMacroBox->GetCurEntry() ) // OV-Bug ?
@@ -714,7 +719,10 @@ IMPL_LINK_TYPED( MacroChooser, ButtonHdl, Button *, pButton, void )
SfxGetpApp()->ExecuteSlot( aRequest );
if (SfxDispatcher* pDispatcher = GetDispatcher())
- pDispatcher->Execute( SID_BASICIDE_EDITMACRO, SfxCallMode::ASYNCHRON, &aInfoItem, 0 );
+ {
+ pDispatcher->Execute(SID_BASICIDE_EDITMACRO,
+ SfxCallMode::ASYNCHRON, &aInfoItem, nullptr);
+ }
StoreMacroDescription();
EndDialog(Macro_New);
}
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 54b0a307d64d..a2632191b50d 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -632,7 +632,7 @@ IMPL_LINK_TYPED( LibPage, ButtonHdl, Button *, pButton, void )
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
if (SfxDispatcher* pDispatcher = GetDispatcher())
pDispatcher->Execute( SID_BASICIDE_LIBSELECTED,
- SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 );
+ SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, nullptr);
EndTabDialog();
return;
}
diff --git a/basctl/source/basicide/moduldlg.cxx b/basctl/source/basicide/moduldlg.cxx
index c63e885c85de..982f77dfa279 100644
--- a/basctl/source/basicide/moduldlg.cxx
+++ b/basctl/source/basicide/moduldlg.cxx
@@ -122,7 +122,7 @@ bool ExtTreeListBox::EditedEntry( SvTreeListEntry* pEntry, const OUString& rNewT
{
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, rNewText, ConvertType( eType ) );
pDispatcher->Execute( SID_BASICIDE_SBXRENAMED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
}
// OV-Bug?!
@@ -355,7 +355,7 @@ TriState ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeLi
{
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rSourceDoc, aSourceLibName, aSourceName, ConvertType( eType ) );
pDispatcher->Execute( SID_BASICIDE_SBXDELETED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
}
}
@@ -447,7 +447,7 @@ TriState ExtTreeListBox::NotifyCopyingMoving( SvTreeListEntry* pTarget, SvTreeLi
{
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDestDoc, aDestLibName, aSourceName, ConvertType( eType ) );
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
}
}
@@ -717,7 +717,8 @@ IMPL_LINK_TYPED( ObjectPage, ButtonHdl, Button *, pButton, void )
}
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDesc.GetDocument(), aDesc.GetLibName(),
aModName, TreeListBox::ConvertType( aDesc.GetType() ) );
- pDispatcher->Execute( SID_BASICIDE_SHOWSBX, SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ pDispatcher->Execute(SID_BASICIDE_SHOWSBX,
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
}
}
else // Nur Lib selektiert
@@ -736,7 +737,8 @@ IMPL_LINK_TYPED( ObjectPage, ButtonHdl, Button *, pButton, void )
SfxStringItem aLibNameItem( SID_BASICIDE_ARG_LIBNAME, aLibName );
if ( pDispatcher )
{
- pDispatcher->Execute( SID_BASICIDE_LIBSELECTED, SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, 0 );
+ pDispatcher->Execute(SID_BASICIDE_LIBSELECTED,
+ SfxCallMode::ASYNCHRON, &aDocItem, &aLibNameItem, nullptr);
}
}
EndTabDialog();
@@ -841,8 +843,10 @@ void ObjectPage::NewDialog()
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aDlgName, TYPE_DIALOG );
if (SfxDispatcher* pDispatcher = GetDispatcher())
+ {
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
+ }
LibraryLocation eLocation = aDocument.getLibraryLocation( aLibName );
SvTreeListEntry* pRootEntry = m_pBasicBox->FindRootEntry( aDocument, eLocation );
if ( pRootEntry )
@@ -897,7 +901,7 @@ void ObjectPage::DeleteCurrent()
{
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, aDocument, aLibName, aName, TreeListBox::ConvertType( eType ) );
pDispatcher->Execute( SID_BASICIDE_SBXDELETED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
}
try
@@ -998,8 +1002,10 @@ SbModule* createModImpl( vcl::Window* pWin, const ScriptDocument& rDocument,
pModule = pBasic->FindModule( aModName );
SbxItem aSbxItem( SID_BASICIDE_ARG_SBX, rDocument, aLibName, aModName, TYPE_MODULE );
if (SfxDispatcher* pDispatcher = GetDispatcher())
+ {
pDispatcher->Execute( SID_BASICIDE_SBXINSERTED,
- SfxCallMode::SYNCHRON, &aSbxItem, 0 );
+ SfxCallMode::SYNCHRON, &aSbxItem, nullptr);
+ }
LibraryLocation eLocation = rDocument.getLibraryLocation( aLibName );
SvTreeListEntry* pRootEntry = rBasicBox.FindRootEntry( rDocument, eLocation );
if ( pRootEntry )