summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2014-10-21 17:15:29 +0200
committerStephan Bergmann <sbergman@redhat.com>2014-10-21 17:22:55 +0200
commitc35fec830ad341eeaffd68a3c3786bf7db14b6d3 (patch)
tree2edced7e80b05c130a409ef38b3cda61b76981af /sfx2
parent16591b8ef73afbcb5645451f4477136ed4956d79 (diff)
The only SID supported by PropExec/State_Impl is SID_ATTR_UNDO_COUNT
...apparently, given that the SID_ATTR_UNDO_COUNT entry in sfx2/sdi/appslots.sdi is the only place that mentions those functions. That reveals that all the other SIDs mentioned there are completely unused. (Also, there seems to be no need to wrap the remaining PropExec/State_Impl functionality in #ifndef DISABLE_SCRIPTING.) Change-Id: Iea7a41aa323b7876d316794cebe962e6e086236d
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/sdi/sfx.sdi52
-rw-r--r--sfx2/source/appl/appbas.cxx75
2 files changed, 8 insertions, 119 deletions
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index b8e1623f9087..1d2e11cec405 100644
--- a/sfx2/sdi/sfx.sdi
+++ b/sfx2/sdi/sfx.sdi
@@ -3651,32 +3651,6 @@ SfxVoidItem NewModule SID_BASICIDE_NEWMODULE
GroupId = GID_MACRO;
]
-
-SfxObjectItem NewObject SID_CREATE_BASICOBJECT
-(SfxStringItem ClassName SID_CREATE_BASICOBJECT)
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-
SfxUInt16Item NewStyle SID_STYLE_NEW
(SfxStringItem Param SID_STYLE_NEW,SfxUInt16Item Family SID_STYLE_FAMILY)
[
@@ -4729,32 +4703,6 @@ SfxVoidItem Redo SID_REDO
GroupId = GID_EDIT;
]
-
-SfxVoidItem ReleaseObject SID_DELETE_BASICOBJECT
-(SfxObjectItem Object SID_DELETE_BASICOBJECT)
-[
- /* flags: */
- AutoUpdate = FALSE,
- Cachable = Cachable,
- FastCall = TRUE,
- HasCoreId = FALSE,
- HasDialog = FALSE,
- ReadOnlyDoc = TRUE,
- Toggle = FALSE,
- Container = TRUE,
- RecordAbsolute = FALSE,
- RecordPerSet;
- Synchron;
-
- /* config: */
- AccelConfig = FALSE,
- MenuConfig = FALSE,
- StatusBarConfig = FALSE,
- ToolBoxConfig = FALSE,
- GroupId = ;
-]
-
-
SfxBoolItem Reload SID_RELOAD
()
[
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx
index 5f48908a3e70..28f99280c3cc 100644
--- a/sfx2/source/appl/appbas.cxx
+++ b/sfx2/source/appl/appbas.cxx
@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <sal/config.h>
+
+#include <cassert>
+
#include <config_options.h>
#include <com/sun/star/frame/XDesktop.hpp>
@@ -41,10 +45,6 @@
#include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx>
-#include <unotools/pathoptions.hxx>
-#include <unotools/useroptions.hxx>
-#include <unotools/bootstrap.hxx>
-
#include <sfx2/module.hxx>
#include "arrdecl.hxx"
#include <sfx2/app.hxx>
@@ -142,30 +142,10 @@ StarBASIC* SfxApplication::GetBasic()
void SfxApplication::PropExec_Impl( SfxRequest &rReq )
{
-#ifdef DISABLE_SCRIPTING
- (void) rReq;
-#else
rReq.GetArgs();
sal_uInt16 nSID = rReq.GetSlot();
switch ( nSID )
{
- case SID_CREATE_BASICOBJECT:
- {
- SFX_REQUEST_ARG(rReq, pItem, SfxStringItem, nSID, false);
- if ( pItem )
- {
- SbxObject* pObject = SbxBase::CreateObject( pItem->GetValue() );
- pObject->AddFirstRef();
- rReq.Done();
- }
- break;
- }
-
- case SID_DELETE_BASICOBJECT:
- {
- break;
- }
-
case SID_ATTR_UNDO_COUNT:
{
SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, false);
@@ -177,50 +157,19 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break;
}
- case SID_WIN_VISIBLE:
- {
- break;
- }
-
- case SID_OFFICE_CUSTOMERNUMBER:
- {
- SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, false);
-
- if ( pStringItem )
- SvtUserOptions().SetCustomerNumber( pStringItem->GetValue() );
- break;
- }
+ default:
+ assert(false);
}
-#endif
}
void SfxApplication::PropState_Impl( SfxItemSet &rSet )
{
-#ifdef DISABLE_SCRIPTING
- (void) rSet;
-#else
SfxWhichIter aIter(rSet);
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{
switch ( nSID )
{
- case SID_PROGNAME:
- rSet.Put( SfxStringItem( SID_PROGNAME, GetName() ) );
- break;
-
- case SID_ACTIVEDOCUMENT:
- rSet.Put( SfxObjectItem( SID_ACTIVEDOCUMENT, SfxObjectShell::Current() ) );
- break;
-
- case SID_APPLICATION:
- rSet.Put( SfxObjectItem( SID_APPLICATION, this ) );
- break;
-
- case SID_PROGFILENAME:
- rSet.Put( SfxStringItem( SID_PROGFILENAME, Application::GetAppFileName() ) );
- break;
-
case SID_ATTR_UNDO_COUNT:
rSet.Put(
SfxUInt16Item(
@@ -228,18 +177,10 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
officecfg::Office::Common::Undo::Steps::get()));
break;
- case SID_UPDATE_VERSION:
- rSet.Put( SfxUInt32Item( SID_UPDATE_VERSION, SUPD ) );
- break;
-
- case SID_OFFICE_CUSTOMERNUMBER:
- {
- rSet.Put( SfxStringItem( nSID, SvtUserOptions().GetCustomerNumber() ) );
- break;
- }
+ default:
+ assert(false);
}
}
-#endif
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */