Kaydet (Commit) c35fec83 authored tarafından Stephan Bergmann's avatar Stephan Bergmann

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
üst 16591b8e
...@@ -76,9 +76,6 @@ ...@@ -76,9 +76,6 @@
#define SID_PROGRESS_STATUSBAR_CONTROL (SID_SFX_START + 1597) #define SID_PROGRESS_STATUSBAR_CONTROL (SID_SFX_START + 1597)
#define SID_APPLICATION (SID_SFX_START + 340)
#define SID_PROGNAME (SID_SFX_START + 341)
#define SID_PROGFILENAME (SID_SFX_START + 342)
#define SID_SELECTION (SID_SFX_START + 346) #define SID_SELECTION (SID_SFX_START + 346)
// 360-400 see SID_MAIL_... // 360-400 see SID_MAIL_...
...@@ -180,17 +177,11 @@ ...@@ -180,17 +177,11 @@
#define SID_SAVETO (SID_SFX_START + 1546) #define SID_SAVETO (SID_SFX_START + 1546)
#define SID_CREATE_BASICOBJECT (SID_SFX_START + 1555)
#define SID_DELETE_BASICOBJECT (SID_SFX_START + 1556)
#define SID_UPDATE_VERSION (SID_SFX_START + 1568)
#define SID_VERSION (SID_SFX_START + 1583) #define SID_VERSION (SID_SFX_START + 1583)
#define SID_DOCUMENT_COMPARE (SID_SFX_START + 1586) #define SID_DOCUMENT_COMPARE (SID_SFX_START + 1586)
#define SID_DOCUMENT_MERGE (SID_SFX_START + 1587) #define SID_DOCUMENT_MERGE (SID_SFX_START + 1587)
#define SID_OFFICE_CUSTOMERNUMBER (SID_SFX_START + 1608)
#define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610) #define SID_OFFICE_CHECK_PLZ (SID_SFX_START + 1610)
#define SID_CURRENT_URL (SID_SFX_START + 1613) #define SID_CURRENT_URL (SID_SFX_START + 1613)
...@@ -364,7 +355,6 @@ ...@@ -364,7 +355,6 @@
#define SID_HYPERLINK_DIALOG (SID_SFX_START + 678) #define SID_HYPERLINK_DIALOG (SID_SFX_START + 678)
#define SID_ACTIVEDOCUMENT (SID_SFX_START + 570)
#define SID_DEFAULTFILEPATH (SID_SFX_START + 571) #define SID_DEFAULTFILEPATH (SID_SFX_START + 571)
#define SID_OBJECT (SID_SFX_START + 575) #define SID_OBJECT (SID_SFX_START + 575)
...@@ -383,8 +373,6 @@ ...@@ -383,8 +373,6 @@
#define SID_CLOSEWIN (SID_SFX_START + 621) #define SID_CLOSEWIN (SID_SFX_START + 621)
#define SID_VIEWSHELL (SID_SFX_START + 623) #define SID_VIEWSHELL (SID_SFX_START + 623)
#define SID_WIN_FULLSCREEN (SID_SFX_START + 627) #define SID_WIN_FULLSCREEN (SID_SFX_START + 627)
// FREE, was SID_WIN_POSSIZE
#define SID_WIN_VISIBLE (SID_SFX_START + 629)
#define SID_VIEWSHELL0 (SID_SFX_START + 630) #define SID_VIEWSHELL0 (SID_SFX_START + 630)
#define SID_VIEWSHELL1 (SID_SFX_START + 631) #define SID_VIEWSHELL1 (SID_SFX_START + 631)
......
...@@ -3651,32 +3651,6 @@ SfxVoidItem NewModule SID_BASICIDE_NEWMODULE ...@@ -3651,32 +3651,6 @@ SfxVoidItem NewModule SID_BASICIDE_NEWMODULE
GroupId = GID_MACRO; 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 SfxUInt16Item NewStyle SID_STYLE_NEW
(SfxStringItem Param SID_STYLE_NEW,SfxUInt16Item Family SID_STYLE_FAMILY) (SfxStringItem Param SID_STYLE_NEW,SfxUInt16Item Family SID_STYLE_FAMILY)
[ [
...@@ -4729,32 +4703,6 @@ SfxVoidItem Redo SID_REDO ...@@ -4729,32 +4703,6 @@ SfxVoidItem Redo SID_REDO
GroupId = GID_EDIT; 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 SfxBoolItem Reload SID_RELOAD
() ()
[ [
......
...@@ -17,6 +17,10 @@ ...@@ -17,6 +17,10 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 . * the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/ */
#include <sal/config.h>
#include <cassert>
#include <config_options.h> #include <config_options.h>
#include <com/sun/star/frame/XDesktop.hpp> #include <com/sun/star/frame/XDesktop.hpp>
...@@ -41,10 +45,6 @@ ...@@ -41,10 +45,6 @@
#include <svtools/sfxecode.hxx> #include <svtools/sfxecode.hxx>
#include <svtools/ehdl.hxx> #include <svtools/ehdl.hxx>
#include <unotools/pathoptions.hxx>
#include <unotools/useroptions.hxx>
#include <unotools/bootstrap.hxx>
#include <sfx2/module.hxx> #include <sfx2/module.hxx>
#include "arrdecl.hxx" #include "arrdecl.hxx"
#include <sfx2/app.hxx> #include <sfx2/app.hxx>
...@@ -142,30 +142,10 @@ StarBASIC* SfxApplication::GetBasic() ...@@ -142,30 +142,10 @@ StarBASIC* SfxApplication::GetBasic()
void SfxApplication::PropExec_Impl( SfxRequest &rReq ) void SfxApplication::PropExec_Impl( SfxRequest &rReq )
{ {
#ifdef DISABLE_SCRIPTING
(void) rReq;
#else
rReq.GetArgs(); rReq.GetArgs();
sal_uInt16 nSID = rReq.GetSlot(); sal_uInt16 nSID = rReq.GetSlot();
switch ( nSID ) 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: case SID_ATTR_UNDO_COUNT:
{ {
SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, false); SFX_REQUEST_ARG(rReq, pCountItem, SfxUInt16Item, nSID, false);
...@@ -177,50 +157,19 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq ) ...@@ -177,50 +157,19 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq )
break; break;
} }
case SID_WIN_VISIBLE: default:
{ assert(false);
break;
}
case SID_OFFICE_CUSTOMERNUMBER:
{
SFX_REQUEST_ARG(rReq, pStringItem, SfxStringItem, nSID, false);
if ( pStringItem )
SvtUserOptions().SetCustomerNumber( pStringItem->GetValue() );
break;
}
} }
#endif
} }
void SfxApplication::PropState_Impl( SfxItemSet &rSet ) void SfxApplication::PropState_Impl( SfxItemSet &rSet )
{ {
#ifdef DISABLE_SCRIPTING
(void) rSet;
#else
SfxWhichIter aIter(rSet); SfxWhichIter aIter(rSet);
for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() ) for ( sal_uInt16 nSID = aIter.FirstWhich(); nSID; nSID = aIter.NextWhich() )
{ {
switch ( nSID ) 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: case SID_ATTR_UNDO_COUNT:
rSet.Put( rSet.Put(
SfxUInt16Item( SfxUInt16Item(
...@@ -228,18 +177,10 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet ) ...@@ -228,18 +177,10 @@ void SfxApplication::PropState_Impl( SfxItemSet &rSet )
officecfg::Office::Common::Undo::Steps::get())); officecfg::Office::Common::Undo::Steps::get()));
break; break;
case SID_UPDATE_VERSION: default:
rSet.Put( SfxUInt32Item( SID_UPDATE_VERSION, SUPD ) ); assert(false);
break;
case SID_OFFICE_CUSTOMERNUMBER:
{
rSet.Put( SfxStringItem( nSID, SvtUserOptions().GetCustomerNumber() ) );
break;
}
} }
} }
#endif
} }
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
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