[Libreoffice-commits] core.git: 2 commits - bin/find-unused-defines.sh dbaccess/source framework/inc i18nlangtag/source i18npool/inc include/toolkit include/vcl udkapi/com vcl/source
Noel Grandin
noel at peralex.com
Mon Aug 3 02:13:16 PDT 2015
bin/find-unused-defines.sh | 2
dbaccess/source/inc/apitools.hxx | 3
framework/inc/macros/xinterface.hxx | 16 ---
framework/inc/macros/xtypeprovider.hxx | 58 --------------
i18nlangtag/source/languagetag/languagetag.cxx | 1
i18npool/inc/cclass_unicode.hxx | 1
i18npool/inc/transliteration_caseignore.hxx | 1
include/toolkit/helper/macros.hxx | 16 ---
include/vcl/settings.hxx | 3
udkapi/com/sun/star/connection/XConnectionBroadcaster.idl | 2
vcl/source/app/settings.cxx | 13 ++-
11 files changed, 16 insertions(+), 100 deletions(-)
New commits:
commit dfc81188d50472dde2aa50752b415feab12350b4
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 3 11:12:08 2015 +0200
tdf#92788 - Middle Button on Mouse Paste Option Broken for X11
caused by commit 5333782d090a9e147c0c431f0f741863d1d8cf8e
"convert SETTINGS_ #defines to 'enum class'"
Change-Id: Id0c2738a61f73223f6c8716f04a619c8cb84c0a9
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index 18cef47..c7cb634 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -682,13 +682,14 @@ public:
enum class AllSettingsFlags {
NONE = 0x0000,
+ MOUSE = 0x0001,
STYLE = 0x0002,
MISC = 0x0004,
LOCALE = 0x0020,
};
namespace o3tl
{
- template<> struct typed_flags<AllSettingsFlags> : is_typed_flags<AllSettingsFlags, 0x026> {};
+ template<> struct typed_flags<AllSettingsFlags> : is_typed_flags<AllSettingsFlags, 0x0027> {};
}
class VCL_DLLPUBLIC AllSettings
diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx
index 66b515e..33674f8 100644
--- a/vcl/source/app/settings.cxx
+++ b/vcl/source/app/settings.cxx
@@ -2701,7 +2701,8 @@ ImplAllSettingsData::ImplAllSettingsData()
maLocale( LANGUAGE_SYSTEM ),
maUILocale( LANGUAGE_SYSTEM )
{
- mnWindowUpdate = AllSettingsFlags::STYLE | AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
+ mnWindowUpdate = AllSettingsFlags::MOUSE | AllSettingsFlags::STYLE |
+ AllSettingsFlags::MISC | AllSettingsFlags::LOCALE;
mpLocaleDataWrapper = NULL;
mpUILocaleDataWrapper = NULL;
mpI18nHelper = NULL;
@@ -2763,6 +2764,16 @@ AllSettingsFlags AllSettings::Update( AllSettingsFlags nFlags, const AllSettings
AllSettingsFlags nChangeFlags = AllSettingsFlags::NONE;
+ if ( nFlags & AllSettingsFlags::MOUSE )
+ {
+ if ( mxData->maMouseSettings != rSet.mxData->maMouseSettings )
+ {
+ CopyData();
+ mxData->maMouseSettings = rSet.mxData->maMouseSettings;
+ nChangeFlags |= AllSettingsFlags::MOUSE;
+ }
+ }
+
if ( nFlags & AllSettingsFlags::STYLE )
{
if ( mxData->maStyleSettings != rSet.mxData->maStyleSettings )
commit 0ea54aed15ee17a02c9dff861c16d06505f35741
Author: Noel Grandin <noel at peralex.com>
Date: Mon Aug 3 09:55:21 2015 +0200
remove some unused defines
Change-Id: I85a9a2bc12681e13fc482374165ff9bd6858dc93
diff --git a/bin/find-unused-defines.sh b/bin/find-unused-defines.sh
index 6f31ec4..d143a3e 100755
--- a/bin/find-unused-defines.sh
+++ b/bin/find-unused-defines.sh
@@ -19,9 +19,9 @@
( git grep -hP '^\w*#define\s+\w+.*\\' -- "[!e][!x][!t]*" \
&& \
git grep -hP '^\w*#define\s+\w+\s*$' -- "[!e][!x][!t]*" ) \
+ | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
| grep -v '_idl' \
| grep -vE '^INCLUDED_' \
- | sed -r 's/[ ]*#define[ ]+([a-zA-Z0-9_]+).*/\1/' \
| sort \
| uniq \
| xargs -Ixxx -n 1 -P 8 sh -c \
diff --git a/dbaccess/source/inc/apitools.hxx b/dbaccess/source/inc/apitools.hxx
index 2392b3b..c216103 100644
--- a/dbaccess/source/inc/apitools.hxx
+++ b/dbaccess/source/inc/apitools.hxx
@@ -182,9 +182,6 @@ public:
virtual ::com::sun::star::uno::Sequence<sal_Int8> SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE; \
static ::com::sun::star::uno::Sequence< sal_Int8 > getUnoTunnelImplementationId() \
-#define DECLARE_GETTYPES( ) \
- virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw (::com::sun::star::uno::RuntimeException, std::exception);
-
#define IMPLEMENT_IMPLEMENTATION_ID( classname ) \
::com::sun::star::uno::Sequence< sal_Int8 > classname::getUnoTunnelImplementationId() \
{ \
diff --git a/framework/inc/macros/xinterface.hxx b/framework/inc/macros/xinterface.hxx
index d32eb7c..2667ec3 100644
--- a/framework/inc/macros/xinterface.hxx
+++ b/framework/inc/macros/xinterface.hxx
@@ -63,18 +63,6 @@ ________________________________________________________________________________
}
// private
-// implementation of XInterface::queryInterface() without any other interfaces!
-
-#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS ) \
- ::com::sun::star::uno::Any SAL_CALL CLASS::queryInterface( const ::com::sun::star::uno::Type& aType ) throw( ::com::sun::star::uno::RuntimeException ) \
- { \
- /* Attention: Don't use mutex or guard in this method!!! Is a method of XInterface. */ \
- /* I have no own supported interfaces ... */ \
- /* ... ask baseclass for interfaces! */ \
- return BASECLASS::queryInterface( aType ); \
- }
-
-// private
// implementation of XInterface::queryInterface() with max. 12 other interfaces!
#define PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES ) \
@@ -123,10 +111,6 @@ ________________________________________________________________________________
// private
// complete implementation of XInterface for different use cases
-#define PRIVATE_DEFINE_XINTERFACE_PURE( CLASS, BASECLASS ) \
- PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \
- PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE_PURE( CLASS, BASECLASS )
-
#define PRIVATE_DEFINE_XINTERFACE( CLASS, BASECLASS, INTERFACES ) \
PRIVATE_DEFINE_XINTERFACE_ACQUIRE_RELEASE( CLASS, BASECLASS ) \
PRIVATE_DEFINE_XINTERFACE_QUERYINTERFACE( CLASS, BASECLASS, INTERFACES )
diff --git a/framework/inc/macros/xtypeprovider.hxx b/framework/inc/macros/xtypeprovider.hxx
index 8fb243d1..f26bc98 100644
--- a/framework/inc/macros/xtypeprovider.hxx
+++ b/framework/inc/macros/xtypeprovider.hxx
@@ -139,56 +139,6 @@ ________________________________________________________________________________
}
// private
-// implementation of XTypeProvider::getTypes() with using max. 12 interfaces + baseclass!
-
-#define PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES ) \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL CLASS::getTypes() throw( ::com::sun::star::uno::RuntimeException ) \
- { \
- /* Optimize this method ! */ \
- /* We initialize a static variable only one time. */ \
- /* And we don't must use a mutex at every call! */ \
- /* For the first call; pTypeCollection is NULL - */ \
- /* for the second call pTypeCollection is different from NULL! */ \
- static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type >* pTypeCollection = NULL; \
- if ( pTypeCollection == NULL ) \
- { \
- /* Ready for multithreading; get global mutex for first call of this method only! see before */ \
- ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() ); \
- /* Control these pointer again ... it can be, that another instance will be faster then these! */ \
- if ( pTypeCollection == NULL ) \
- { \
- /* Create static typecollection for my own interfaces! */ \
- static ::cppu::OTypeCollection aTypeCollection TYPES; \
- /* Copy all items from my list sequences and from my baseclass */ \
- /* to one result list! */ \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes1 = aTypeCollection.getTypes(); \
- ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqTypes2 = BASECLASS::getTypes(); \
- sal_Int32 nCount1 = seqTypes1.getLength(); \
- sal_Int32 nCount2 = seqTypes2.getLength(); \
- static ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > seqResult ( nCount1+nCount2 ); \
- sal_Int32 nSource = 0; \
- sal_Int32 nDestination= 0; \
- while( nSource<nCount1 ) \
- { \
- seqResult[nDestination] = seqTypes1[nSource]; \
- ++nSource; \
- ++nDestination; \
- } \
- nSource = 0; \
- while( nSource<nCount2 ) \
- { \
- seqResult[nDestination] = seqTypes2[nSource]; \
- ++nSource; \
- ++nDestination; \
- } \
- /* ... and set his address to static pointer! */ \
- pTypeCollection = &seqResult; \
- } \
- } \
- return *pTypeCollection; \
- }
-
-// private
// help macros to replace TYPES in getTypes() [see before]
#define PRIVATE_DEFINE_TYPE_1( TYPE1 ) \
@@ -241,10 +191,6 @@ ________________________________________________________________________________
// private
// complete implementation of XTypeProvider
-#define PRIVATE_DEFINE_XTYPEPROVIDER_PURE( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, cppu::UnoType<com::sun::star::lang::XTypeProvider>::get())
-
#define PRIVATE_DEFINE_XTYPEPROVIDER( CLASS, TYPES ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES( CLASS, TYPES )
@@ -253,10 +199,6 @@ ________________________________________________________________________________
PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_LARGE( CLASS, TYPES_FIRST, TYPES_SECOND )
-#define PRIVATE_DEFINE_XTYPEPROVIDER_BASECLASS( CLASS, BASECLASS, TYPES ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETIMPLEMENTATIONID( CLASS ) \
- PRIVATE_DEFINE_XTYPEPROVIDER_GETTYPES_BASECLASS( CLASS, BASECLASS, TYPES )
-
// public
// declaration of XTypeProvider
diff --git a/i18nlangtag/source/languagetag/languagetag.cxx b/i18nlangtag/source/languagetag/languagetag.cxx
index 906c7b3..bc9b62c 100644
--- a/i18nlangtag/source/languagetag/languagetag.cxx
+++ b/i18nlangtag/source/languagetag/languagetag.cxx
@@ -26,7 +26,6 @@
#if defined(ENABLE_LIBLANGTAG)
#if LIBLANGTAG_INLINE_FIX
-#define LT_HAVE_INLINE
#endif
#include <liblangtag/langtag.h>
#else
diff --git a/i18npool/inc/cclass_unicode.hxx b/i18npool/inc/cclass_unicode.hxx
index 4c295e1..3ff2aed 100644
--- a/i18npool/inc/cclass_unicode.hxx
+++ b/i18npool/inc/cclass_unicode.hxx
@@ -25,7 +25,6 @@
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#define TRANSLITERATION_casemapping
#include <transliteration_body.hxx>
namespace com { namespace sun { namespace star { namespace uno {
diff --git a/i18npool/inc/transliteration_caseignore.hxx b/i18npool/inc/transliteration_caseignore.hxx
index 2949cab..c9b6553 100644
--- a/i18npool/inc/transliteration_caseignore.hxx
+++ b/i18npool/inc/transliteration_caseignore.hxx
@@ -19,7 +19,6 @@
#ifndef INCLUDED_I18NPOOL_INC_TRANSLITERATION_CASEIGNORE_HXX
#define INCLUDED_I18NPOOL_INC_TRANSLITERATION_CASEIGNORE_HXX
-#define TRANSLITERATION_UPPER_LOWER
#include "transliteration_body.hxx"
namespace com { namespace sun { namespace star { namespace i18n {
diff --git a/include/toolkit/helper/macros.hxx b/include/toolkit/helper/macros.hxx
index e84053e..f080d6d 100644
--- a/include/toolkit/helper/macros.hxx
+++ b/include/toolkit/helper/macros.hxx
@@ -198,22 +198,6 @@ IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodNa
void ClassName::MethodName( const EventType& evt ) throw(::com::sun::star::uno::RuntimeException, std::exception) \
IMPL_LISTENERMULTIPLEXER_LISTENERMETHOD_BODY( ClassName, InterfaceName, MethodName, EventType )
-
-
-#define DECLIMPL_SUPPORTS_SERVICE( ) \
- sal_Bool SAL_CALL supportsService( const OUString& rServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
- { \
- ::com::sun::star::uno::Sequence< OUString > aServiceNames( getSupportedServiceNames() ); \
- const OUString* pSupported = aServiceNames.getConstArray(); \
- const OUString* pSupportedEnd = pSupported + aServiceNames.getLength(); \
- for ( ; pSupported != pSupportedEnd; ++pSupported ) \
- if ( *pSupported == rServiceName ) \
- return sal_True; \
- return sal_False; \
- }
-
-
-
#define DECLIMPL_SERVICEINFO_DERIVED( ImplName, BaseClass, ServiceName ) \
OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE { return OUString("stardiv.Toolkit." #ImplName ); } \
::com::sun::star::uno::Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE \
diff --git a/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl b/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
index fce5dbf..b60b3c5c 100644
--- a/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
+++ b/udkapi/com/sun/star/connection/XConnectionBroadcaster.idl
@@ -16,7 +16,7 @@
* except in compliance with the License. You may obtain a copy of
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#ifndef _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL__
+#ifndef _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL_
#define _COM_SUN_STAR_CONNECTION_XCONNECTIONBROADCASTER_IDL_
#include <com/sun/star/io/XStreamListener.idl>
More information about the Libreoffice-commits
mailing list