[Libreoffice-commits] .: 3 commits - sfx2/source

Takeshi Abe tabe at kemper.freedesktop.org
Wed Apr 11 08:46:22 PDT 2012


 sfx2/source/control/bindings.cxx      |    6 ----
 sfx2/source/control/dispatch.cxx      |    4 ---
 sfx2/source/control/macrconf.cxx      |    3 --
 sfx2/source/dialog/filtergrouping.cxx |   41 ----------------------------------
 sfx2/source/doc/doctempl.cxx          |   10 --------
 sfx2/source/menu/mnumgr.cxx           |    3 --
 sfx2/source/notify/hintpost.cxx       |    3 --
 7 files changed, 70 deletions(-)

New commits:
commit 08908961901ee0a7db4b6ee6005f1591d2d56e04
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Apr 12 00:40:08 2012 +0900

    removed dead code

diff --git a/sfx2/source/dialog/filtergrouping.cxx b/sfx2/source/dialog/filtergrouping.cxx
index bf04732..25f7a39 100644
--- a/sfx2/source/dialog/filtergrouping.cxx
+++ b/sfx2/source/dialog/filtergrouping.cxx
@@ -54,9 +54,6 @@ namespace sfx2
 {
 //........................................................................
 
-//#define DISABLE_GROUPING_AND_CLASSIFYING
-    // not using the functionallity herein, yet
-
     using namespace ::com::sun::star::uno;
     using namespace ::com::sun::star::ui::dialogs;
     using namespace ::com::sun::star::lang;
@@ -808,34 +805,6 @@ namespace sfx2
         }
     }
 
-#ifdef DISABLE_GROUPING_AND_CLASSIFYING
-    //--------------------------------------------------------------------
-    void lcl_EnsureAllFilesEntry( TSortedFilterList& _rFilterMatcher, const Reference< XFilterManager >& _rxFilterManager, ::rtl::OUString& _rFirstNonEmpty )
-    {
-        // ===============================================================
-        String sAllFilterName;
-        if ( !lcl_hasAllFilesFilter( _rFilterMatcher, sAllFilterName ) )
-        {
-            try
-            {
-                _rxFilterManager->appendFilter( sAllFilterName, DEFINE_CONST_UNICODE( FILEDIALOG_FILTER_ALL ) );
-                _rFirstNonEmpty = sAllFilterName;
-            }
-            catch( const IllegalArgumentException& )
-            {
-#ifdef DBG_UTIL
-                rtl::OStringBuffer aMsg(RTL_CONSTASCII_STRINGPARAM(
-                    "sfx2::lcl_EnsureAllFilesEntry: could not append Filter"));
-                aMsg.append(rtl::OUStringToOString(sAllFilterName,
-                    RTL_TEXTENCODING_UTF8));
-                OSL_FAIL( aMsg.getStr() );
-#endif
-            }
-        }
-
-    }
-#endif
-
 // =======================================================================
 // = filling an XFilterManager
 // =======================================================================
@@ -1180,15 +1149,6 @@ namespace sfx2
         if ( !_rxFilterManager.is() )
             return;
 
-#ifdef DISABLE_GROUPING_AND_CLASSIFYING
-        // ===============================================================
-        // ensure that there's an entry "all" (with wildcard *.*)
-        lcl_EnsureAllFilesEntry( _rFilterMatcher, _rxFilterManager, _rFirstNonEmpty );
-
-        // ===============================================================
-        appendFilters( _rFilterMatcher, _rxFilterManager, _rFirstNonEmpty );
-#else
-
         // ===============================================================
         // group and classify the filters
         GroupedFilterList aAllFilters;
@@ -1221,7 +1181,6 @@ namespace sfx2
                 aAllFilters.end(),
                 AppendFilterGroup( _rxFilterManager, &_rFileDlgImpl ) );
         }
-#endif
     }
 
     ::rtl::OUString addExtension( const ::rtl::OUString& _rDisplayText,
commit 25c70a72327116d257e41bcc67a3992a07bf7863
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Apr 12 00:39:22 2012 +0900

    removed useless static data

diff --git a/sfx2/source/control/bindings.cxx b/sfx2/source/control/bindings.cxx
index ec29ed9..a4de3f3 100644
--- a/sfx2/source/control/bindings.cxx
+++ b/sfx2/source/control/bindings.cxx
@@ -97,9 +97,6 @@ static sal_uInt16 nTimeOut = 300;
 #define TIMEOUT_UPDATING     20
 #define TIMEOUT_IDLE       2500
 
-static sal_uInt32 nCache1 = 0;
-static sal_uInt32 nCache2 = 0;
-
 typedef boost::unordered_map< sal_uInt16, bool > InvalidateSlotMap;
 
 //====================================================================
@@ -916,15 +913,12 @@ sal_uInt16 SfxBindings::GetSlotPos( sal_uInt16 nId, sal_uInt16 nStartSearchAt )
     if ( pImp->nCachedFunc1 < pImp->pCaches->Count() &&
          (*pImp->pCaches)[pImp->nCachedFunc1]->GetId() == nId )
     {
-        ++nCache1;
         DBG_PROFSTOP(SfxBindingsMsgPos);
         return pImp->nCachedFunc1;
     }
     if ( pImp->nCachedFunc2 < pImp->pCaches->Count() &&
          (*pImp->pCaches)[pImp->nCachedFunc2]->GetId() == nId )
     {
-        ++nCache2;
-
         // swap the caches
         sal_uInt16 nTemp = pImp->nCachedFunc1;
         pImp->nCachedFunc1 = pImp->nCachedFunc2;
diff --git a/sfx2/source/control/macrconf.cxx b/sfx2/source/control/macrconf.cxx
index 03ee7e1..c649a25 100644
--- a/sfx2/source/control/macrconf.cxx
+++ b/sfx2/source/control/macrconf.cxx
@@ -59,9 +59,6 @@
 #include "objshimp.hxx"
 #include <sfx2/request.hxx>
 
-static const sal_uInt16 nCompatVersion = 2;
-static const sal_uInt16 nVersion = 3;
-
 // Static member
 SfxMacroConfig* SfxMacroConfig::pMacroConfig = NULL;
 
diff --git a/sfx2/source/menu/mnumgr.cxx b/sfx2/source/menu/mnumgr.cxx
index 8b87238..b453f89 100644
--- a/sfx2/source/menu/mnumgr.cxx
+++ b/sfx2/source/menu/mnumgr.cxx
@@ -76,9 +76,6 @@
 #include <sfx2/objface.hxx>
 #include "thessubmenu.hxx"
 
-static const sal_uInt16 nCompatVersion = 4;
-static const sal_uInt16 nVersion = 5;
-
 // static member initialization
 PopupMenu * SfxPopupMenuManager::pStaticThesSubMenu = NULL;
 
commit e486ed7b7f3d8f90e118ec19e4c347ce236de606
Author: Takeshi Abe <tabe at fixedpoint.jp>
Date:   Thu Apr 12 00:37:48 2012 +0900

    removed unused defines

diff --git a/sfx2/source/control/dispatch.cxx b/sfx2/source/control/dispatch.cxx
index 6e08d45..8df57ea 100644
--- a/sfx2/source/control/dispatch.cxx
+++ b/sfx2/source/control/dispatch.cxx
@@ -156,10 +156,6 @@ struct SfxDispatcher_Impl
     sal_uInt32           nDisableFlags;
 };
 
-#define NO_OBJECTBAR    0
-#define OWN_OBJECTBAR   1
-#define OTHER_OBJECTBAR 2
-
 //------------------------------------------------------------------
 
 #define SFX_FLUSH_TIMEOUT    50
diff --git a/sfx2/source/doc/doctempl.cxx b/sfx2/source/doc/doctempl.cxx
index 9d3230d..37edcd0 100644
--- a/sfx2/source/doc/doctempl.cxx
+++ b/sfx2/source/doc/doctempl.cxx
@@ -107,21 +107,11 @@ using ::std::advance;
 //========================================================================
 
 #define TITLE                   "Title"
-#define IS_FOLDER               "IsFolder"
-#define PROPERTY_TYPE           "TypeDescription"
 #define TARGET_URL              "TargetURL"
-#define TYPE_FOLDER             "application/vnd.sun.star.hier-folder"
-#define TYPE_LINK               "application/vnd.sun.star.hier-link"
-#define TYPE_FSYS_FOLDER        "application/vnd.sun.staroffice.fsys-folder"
 
 #define TARGET_DIR_URL          "TargetDirURL"
-#define COMMAND_DELETE          "delete"
 #define COMMAND_TRANSFER        "transfer"
 
-#define STANDARD_FOLDER         "standard"
-
-#define SERVICENAME_TYPEDETECTION       "com.sun.star.document.TypeDetection"
-#define TYPEDETECTION_PARAMETER         "FileName"
 #define SERVICENAME_DOCINFO             "com.sun.star.document.DocumentProperties"
 #define SERVICENAME_DOCTEMPLATES        "com.sun.star.frame.DocumentTemplates"
 #define SERVICENAME_DESKTOP             "com.sun.star.frame.Desktop"
diff --git a/sfx2/source/notify/hintpost.cxx b/sfx2/source/notify/hintpost.cxx
index ad6e85e..5f340f9 100644
--- a/sfx2/source/notify/hintpost.cxx
+++ b/sfx2/source/notify/hintpost.cxx
@@ -78,7 +78,4 @@ void SfxHintPoster::SetEventHdl( const GenLink& rLink )
     aLink = rLink;
 }
 
-
-#define LOG( x )
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list