[Libreoffice-commits] core.git: 3 commits - desktop/source include/sfx2 include/unotools sfx2/sdi sfx2/source unotools/source

Stephan Bergmann sbergman at redhat.com
Tue Oct 21 08:23:19 PDT 2014


 desktop/source/app/dispatchwatcher.cxx |    4 +
 include/sfx2/sfxsids.hrc               |   12 -----
 include/unotools/useroptions.hxx       |    5 --
 sfx2/sdi/sfx.sdi                       |   52 ----------------------
 sfx2/source/appl/appbas.cxx            |   75 +++------------------------------
 unotools/source/config/useroptions.cxx |    6 --
 6 files changed, 12 insertions(+), 142 deletions(-)

New commits:
commit 4492b1cf0c8655da7dde2e355c5e361e2e959c14
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 21 17:22:35 2014 +0200

    Remove dead CustomerNumber functionality
    
    Change-Id: I221d3b9f0bf0f90a117fcf0caead52f2c31f7926

diff --git a/include/unotools/useroptions.hxx b/include/unotools/useroptions.hxx
index 5a32cc0..7a9cee5 100644
--- a/include/unotools/useroptions.hxx
+++ b/include/unotools/useroptions.hxx
@@ -45,7 +45,6 @@
 #define USER_OPT_ZIP                ((sal_uInt16)14)
 #define USER_OPT_FATHERSNAME        ((sal_uInt16)15)
 #define USER_OPT_APARTMENT          ((sal_uInt16)16)
-#define USER_OPT_CUSTOMERNUMBER     ((sal_uInt16)17)
 
 // class SvtUserOptions --------------------------------------------------
 
@@ -73,13 +72,9 @@ public:
     OUString GetTelephoneWork  () const;
     OUString GetFax            () const;
     OUString GetEmail          () const;
-    OUString GetCustomerNumber () const;
 
     OUString GetFullName       () const;
 
-    // set the address token
-    void SetCustomerNumber (OUString const&);
-
     bool      IsTokenReadonly (sal_uInt16 nToken) const;
     OUString GetToken (sal_uInt16 nToken) const;
     void          SetToken (sal_uInt16 nToken, OUString const& rNewToken);
diff --git a/unotools/source/config/useroptions.cxx b/unotools/source/config/useroptions.cxx
index 6fab077..fd1f657 100644
--- a/unotools/source/config/useroptions.cxx
+++ b/unotools/source/config/useroptions.cxx
@@ -64,8 +64,7 @@ char const * const vOptionNames[] = {
     "initials",                  // USER_OPT_ID
     "postalcode",                // USER_OPT_ZIP
     "fathersname",               // USER_OPT_FATHERSNAME
-    "apartment",                 // USER_OPT_APARTMENT
-    "customernumber"             // USER_OPT_CUSTOMERNUMBER
+    "apartment"                  // USER_OPT_APARTMENT
 };
 const sal_uInt16 nOptionNameCount = SAL_N_ELEMENTS(vOptionNames);
 
@@ -297,9 +296,6 @@ OUString SvtUserOptions::GetTelephoneHome  () const { return GetToken(USER_OPT_T
 OUString SvtUserOptions::GetTelephoneWork  () const { return GetToken(USER_OPT_TELEPHONEWORK); }
 OUString SvtUserOptions::GetFax            () const { return GetToken(USER_OPT_FAX); }
 OUString SvtUserOptions::GetEmail          () const { return GetToken(USER_OPT_EMAIL); }
-OUString SvtUserOptions::GetCustomerNumber () const { return GetToken(USER_OPT_CUSTOMERNUMBER); }
-
-void SvtUserOptions::SetCustomerNumber (OUString const& sToken) { SetToken(USER_OPT_CUSTOMERNUMBER, sToken); }
 
 bool SvtUserOptions::IsTokenReadonly (sal_uInt16 nToken) const
 {
commit c35fec830ad341eeaffd68a3c3786bf7db14b6d3
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 21 17:15:29 2014 +0200

    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

diff --git a/include/sfx2/sfxsids.hrc b/include/sfx2/sfxsids.hrc
index 3d54a52..3dcfca9 100644
--- a/include/sfx2/sfxsids.hrc
+++ b/include/sfx2/sfxsids.hrc
@@ -76,9 +76,6 @@
 
 #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)
 
 // 360-400 see SID_MAIL_...
@@ -180,17 +177,11 @@
 
 #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_DOCUMENT_COMPARE                (SID_SFX_START + 1586)
 #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_CURRENT_URL                     (SID_SFX_START + 1613)
 
@@ -364,7 +355,6 @@
 
 #define SID_HYPERLINK_DIALOG                (SID_SFX_START + 678)
 
-#define SID_ACTIVEDOCUMENT                  (SID_SFX_START + 570)
 #define SID_DEFAULTFILEPATH                 (SID_SFX_START + 571)
 #define SID_OBJECT                          (SID_SFX_START + 575)
 
@@ -383,8 +373,6 @@
 #define SID_CLOSEWIN                        (SID_SFX_START + 621)
 #define SID_VIEWSHELL                       (SID_SFX_START + 623)
 #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_VIEWSHELL1                      (SID_SFX_START + 631)
diff --git a/sfx2/sdi/sfx.sdi b/sfx2/sdi/sfx.sdi
index b8e1623..1d2e11c 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 5f48908..28f9928 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: */
commit 16591b8ef73afbcb5645451f4477136ed4956d79
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Tue Oct 21 17:15:01 2014 +0200

    SAL_WARN about unsupported dispatch requests
    
    Change-Id: I3ee646258ed1419245a0766c79214102b08bbca1

diff --git a/desktop/source/app/dispatchwatcher.cxx b/desktop/source/app/dispatchwatcher.cxx
index 5b6e911..b550c56 100644
--- a/desktop/source/app/dispatchwatcher.cxx
+++ b/desktop/source/app/dispatchwatcher.cxx
@@ -328,7 +328,9 @@ bool DispatchWatcher::executeDispatchRequests( const DispatchList& aDispatchRequ
                 xParser->parseStrict( aURL );
 
             xDispatcher = xDesktop->queryDispatch( aURL, OUString(), 0 );
-
+            SAL_WARN_IF(
+                !xDispatcher.is(), "desktop.app",
+                "unsupported dispatch request <" << aName << ">");
             if( xDispatcher.is() )
             {
                 {


More information about the Libreoffice-commits mailing list