[Libreoffice-commits] .: 4 commits - fpicker/source

David Tardon dtardon at kemper.freedesktop.org
Fri Jan 14 06:59:59 PST 2011


 fpicker/source/aqua/resourceprovider.cxx          |    4 ++--
 fpicker/source/unx/gnome/FPentry.cxx              |    4 ----
 fpicker/source/unx/gnome/SalGtkFilePicker.cxx     |   10 ++--------
 fpicker/source/unx/gnome/SalGtkFolderPicker.cxx   |   11 ++---------
 fpicker/source/unx/gnome/resourceprovider.cxx     |    4 ++--
 fpicker/source/win32/filepicker/controlaccess.cxx |   13 +++++++------
 fpicker/source/win32/misc/resourceprovider.cxx    |    2 +-
 7 files changed, 16 insertions(+), 32 deletions(-)

New commits:
commit 49c8951d22d0c2da2de9e3a0154251b98b7816e6
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Jan 2 16:14:51 2011 +0100

    remove superfluous includes

diff --git a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
index 17bed67..5698f4c 100644
--- a/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFilePicker.cxx
@@ -38,30 +38,24 @@
 //------------------------------------------------------------------------
 // includes
 //------------------------------------------------------------------------
-#include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <cppuhelper/interfacecontainer.h>
 #include <osl/diagnose.h>
-#include <osl/process.h>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 #include <com/sun/star/ui/dialogs/ControlActions.hpp>
 #include <com/sun/star/uno/Any.hxx>
 #include <FPServiceInfo.hxx>
 #include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
 #include <SalGtkFilePicker.hxx>
 
-#include <tools/urlobj.hxx>
+#include <tools/string.hxx>
 
-#include <iostream>
 #include <algorithm>
 #include <set>
+#include <string.h>
 #include "resourceprovider.hxx"
-#include <tools/rc.hxx>
 
 //------------------------------------------------------------------------
 // namespace directives
diff --git a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
index 249a544..c42021c 100644
--- a/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
+++ b/fpicker/source/unx/gnome/SalGtkFolderPicker.cxx
@@ -38,26 +38,19 @@
 //------------------------------------------------------------------------
 // includes
 //------------------------------------------------------------------------
-#include <com/sun/star/lang/DisposedException.hpp>
 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
 #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
-#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/CommonFilePickerElementIds.hpp>
 #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
-#include <cppuhelper/interfacecontainer.h>
 #include <osl/diagnose.h>
 #include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
 #include <com/sun/star/uno/Any.hxx>
 #include <FPServiceInfo.hxx>
 #include <osl/mutex.hxx>
-#include <vcl/svapp.hxx>
 #include "SalGtkFolderPicker.hxx"
-
-#include <tools/urlobj.hxx>
-
-#include <iostream>
 #include "resourceprovider.hxx"
-#include <tools/rc.hxx>
+
+#include <string.h>
 
 //------------------------------------------------------------------------
 // namespace directives
commit b6006cd1a9ad37e535dff2adc35a8d10ac5990bb
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Jan 2 16:04:22 2011 +0100

    remove superfluous includes

diff --git a/fpicker/source/unx/gnome/FPentry.cxx b/fpicker/source/unx/gnome/FPentry.cxx
index 83601a0..015dfa9 100644
--- a/fpicker/source/unx/gnome/FPentry.cxx
+++ b/fpicker/source/unx/gnome/FPentry.cxx
@@ -39,11 +39,9 @@
 //	includes of other projects
 //----------------------------------------------
 #include <cppuhelper/factory.hxx>
-#include <com/sun/star/container/XSet.hpp>
 #include <osl/diagnose.h>
 #include "SalGtkFilePicker.hxx"
 #include "SalGtkFolderPicker.hxx"
-#include <vcl/svapp.hxx>
 #include "FPServiceInfo.hxx"
 
 #include <glib-object.h>
@@ -57,11 +55,9 @@ extern      const guint gtk_minor_version;
 
 using namespace ::rtl;
 using namespace ::com::sun::star::uno;
-using namespace ::com::sun::star::container;
 using namespace ::com::sun::star::lang;
 using namespace ::com::sun::star::registry;
 using namespace ::cppu;
-using ::com::sun::star::ui::dialogs::XFilePicker;
 using ::com::sun::star::ui::dialogs::XFilePicker2;
 using ::com::sun::star::ui::dialogs::XFolderPicker;
 
commit 769901f9497588cd61d011c04329c36246944596
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Jan 2 13:08:30 2011 +0100

    specify array size as a constant

diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx
index 723b08c..b21fa64 100644
--- a/fpicker/source/win32/filepicker/controlaccess.cxx
+++ b/fpicker/source/win32/filepicker/controlaccess.cxx
@@ -226,9 +226,10 @@ CTRL_GETVALUE_FUNCTION_T SAL_CALL GetCtrlGetValueFunction( CTRL_CLASS aCtrlClass
 CTRL_CLASS SAL_CALL GetCtrlClass( HWND hwndCtrl )
 {
     CTRL_CLASS aCtrlClass = UNKNOWN;
-    TCHAR aClassName[256];
+    const size_t nClassNameSize = 256;
+    TCHAR aClassName[nClassNameSize];
 
-    int nRet = GetClassName(hwndCtrl,aClassName,(sizeof(aClassName)/sizeof(TCHAR)));
+    int nRet = GetClassName(hwndCtrl,aClassName,nClassNameSize);
     if (nRet)
     {
         if (0 == _tcsicmp(aClassName,TEXT("button")))
commit 06c08a36bc7961b33dbb7bb55c197f5fa9c9b6c8
Author: David Tardon <dtardon at redhat.com>
Date:   Sun Jan 2 13:07:07 2011 +0100

    use SAL_N_ELEMENTS to compute array size

diff --git a/fpicker/source/aqua/resourceprovider.cxx b/fpicker/source/aqua/resourceprovider.cxx
index 7c6b651..8681492 100644
--- a/fpicker/source/aqua/resourceprovider.cxx
+++ b/fpicker/source/aqua/resourceprovider.cxx
@@ -95,8 +95,8 @@ _Entry OtherCtrlIdToResIdTable[] = {
 };
 
 
-const sal_Int32 SIZE_TABLE = sizeof( CtrlIdToResIdTable ) / sizeof( _Entry );
-const sal_Int32 OTHER_SIZE_TABLE = sizeof( OtherCtrlIdToResIdTable ) / sizeof( _Entry );
+const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
+const sal_Int32 OTHER_SIZE_TABLE = SAL_N_ELEMENTS( OtherCtrlIdToResIdTable );
 
 //------------------------------------------------------------
 //
diff --git a/fpicker/source/unx/gnome/resourceprovider.cxx b/fpicker/source/unx/gnome/resourceprovider.cxx
index 86daf32..0f86159 100644
--- a/fpicker/source/unx/gnome/resourceprovider.cxx
+++ b/fpicker/source/unx/gnome/resourceprovider.cxx
@@ -94,8 +94,8 @@ _Entry OtherCtrlIdToResIdTable[] = {
 };
 
 
-const sal_Int32 SIZE_TABLE = sizeof( CtrlIdToResIdTable ) / sizeof( _Entry );
-const sal_Int32 OTHER_SIZE_TABLE = sizeof( OtherCtrlIdToResIdTable ) / sizeof( _Entry );
+const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
+const sal_Int32 OTHER_SIZE_TABLE = SAL_N_ELEMENTS( OtherCtrlIdToResIdTable );
 
 //------------------------------------------------------------
 //
diff --git a/fpicker/source/win32/filepicker/controlaccess.cxx b/fpicker/source/win32/filepicker/controlaccess.cxx
index cde1ee5..723b08c 100644
--- a/fpicker/source/win32/filepicker/controlaccess.cxx
+++ b/fpicker/source/win32/filepicker/controlaccess.cxx
@@ -64,14 +64,14 @@ namespace // private
         CheckboxSetState
     };
     const size_t SIZE_CHECKBOX_SETVALUE_FUNCTION_TABLE =
-        sizeof( CheckboxSetValueFunctionTable ) / sizeof( CTRL_SETVALUE_FUNCTION_T );
+        SAL_N_ELEMENTS( CheckboxSetValueFunctionTable );
 
     CTRL_GETVALUE_FUNCTION_T CheckboxGetValueFunctionTable[] =
     {
         CheckboxGetState
     };
     const size_t SIZE_CHECKBOX_GETVALUE_FUNCTION_TABLE =
-        sizeof( CheckboxGetValueFunctionTable ) / sizeof( CTRL_GETVALUE_FUNCTION_T );
+        SAL_N_ELEMENTS( CheckboxGetValueFunctionTable );
 
     CTRL_SETVALUE_FUNCTION_T ListboxSetValueFunctionTable[] =
     {
@@ -83,7 +83,7 @@ namespace // private
         ListboxSetSelectedItem
     };
     const size_t SIZE_LISTBOX_SETVALUE_FUNCTION_TABLE =
-        sizeof( ListboxSetValueFunctionTable ) / sizeof( CTRL_SETVALUE_FUNCTION_T );
+        SAL_N_ELEMENTS( ListboxSetValueFunctionTable );
 
     CTRL_GETVALUE_FUNCTION_T ListboxGetValueFunctionTable[] =
     {
@@ -98,7 +98,7 @@ namespace // private
         ListboxGetSelectedItemIndex
     };
     const size_t SIZE_LISTBOX_GETVALUE_ACTION_TABLE =
-        sizeof( ListboxGetValueFunctionTable ) / sizeof( CTRL_GETVALUE_FUNCTION_T );
+        SAL_N_ELEMENTS( ListboxGetValueFunctionTable );
 
     struct _ENTRY
     {
diff --git a/fpicker/source/win32/misc/resourceprovider.cxx b/fpicker/source/win32/misc/resourceprovider.cxx
index 4b500d7..9e46dc0 100644
--- a/fpicker/source/win32/misc/resourceprovider.cxx
+++ b/fpicker/source/win32/misc/resourceprovider.cxx
@@ -85,7 +85,7 @@ _Entry CtrlIdToResIdTable[] = {
     { FOLDER_PICKER_DEF_DESCRIPTION,            STR_SVT_FOLDERPICKER_DEFAULT_DESCRIPTION }
 };
 
-const sal_Int32 SIZE_TABLE = sizeof( CtrlIdToResIdTable ) / sizeof( _Entry );
+const sal_Int32 SIZE_TABLE = SAL_N_ELEMENTS( CtrlIdToResIdTable );
 
 //------------------------------------------------------------
 //


More information about the Libreoffice-commits mailing list