[Libreoffice-commits] .: 9 commits - apple_remote/source bridges/source editeng/source fpicker/source pango/pango-1.28.3.patch sc/source vcl/aqua xmloff/source

Tor Lillqvist tml at kemper.freedesktop.org
Fri Jul 27 23:09:01 PDT 2012


 apple_remote/source/HIDRemoteControlDevice.m        |    2 +-
 bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx |   18 +++++++++++-------
 editeng/source/editeng/impedit.cxx                  |    2 ++
 fpicker/source/aqua/SalAquaFilePicker.mm            |    2 ++
 fpicker/source/aqua/SalAquaPicker.mm                |    2 ++
 pango/pango-1.28.3.patch                            |   14 ++------------
 sc/source/filter/excel/tokstack.cxx                 |    2 +-
 vcl/aqua/source/dtrans/PictToBmpFlt.cxx             |   12 ++++++++++++
 xmloff/source/core/xmlimp.cxx                       |    4 +++-
 9 files changed, 36 insertions(+), 22 deletions(-)

New commits:
commit d01c4f3e310ec7dc89f55e286835b8b9516f4298
Author: Tor Lillqvist <tml at iki.fi>
Date:   Sat Jul 28 09:05:46 2012 +0300

    WaE: equality comparison with extraneous parentheses
    
    Change-Id: I867b95cfcdad653d206998b1c02a34c4b7442ef4

diff --git a/sc/source/filter/excel/tokstack.cxx b/sc/source/filter/excel/tokstack.cxx
index 0cdfc36..11383c2 100644
--- a/sc/source/filter/excel/tokstack.cxx
+++ b/sc/source/filter/excel/tokstack.cxx
@@ -961,7 +961,7 @@ const String* TokenPool::GetExternal( const TokenId& rId ) const
     if( n && n <= nElementAkt )
     {
         n--;
-        if( (pType[ n ] == T_Ext) )
+        if( pType[ n ] == T_Ext )
         {
             sal_uInt16 nExt = pElement[ n ];
             if ( nExt < nP_Ext && ppP_Ext[ nExt ] )
commit 39080dfd4f57b1c4d5cd716a661d9368bb6210a3
Author: Tor Lillqvist <tml at iki.fi>
Date:   Fri Jul 27 22:36:00 2012 +0300

    Revert "Avoid confusion in 10.7 SDK headers in at least Xcode45-DP3"
    
    Nah, don't bother going down this path for now, just require
    max-allowed to be equal to the SDK version...
    
    This reverts commit abf0ff683bc87fe6b2d88df0ae101d89740d6238.
    
    Change-Id: I0a3d765533866dad6bf604b1ebbfaef9e168f667

diff --git a/pango/pango-1.28.3.patch b/pango/pango-1.28.3.patch
index ba6edcb..539bef7 100644
--- a/pango/pango-1.28.3.patch
+++ b/pango/pango-1.28.3.patch
@@ -65,7 +65,7 @@
  # Checks for LibThai
 --- misc/pango-1.28.3/pango/pangoatsui-fontmap.c
 +++ misc/build/pango-1.28.3/pango/pangoatsui-fontmap.c
-@@ -27,6 +27,17 @@
+@@ -27,6 +27,12 @@
  #include "pango-impl-utils.h"
  #include "modules.h"
  
@@ -75,17 +75,12 @@
 +typedef int NSColorRenderingIntent;
 +#endif
 +
-+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 && MACOSX_SDK_VERSION >= 1070
-+// Avoid a problem in at least the XCode 4.5DP3 SDK 10.7 headers
-+#import <CoreData/NSPersistentStoreRequest.h>
-+#endif
-+
  #import <Cocoa/Cocoa.h>
  
  typedef struct _FontHashKey      FontHashKey;
 --- misc/pango-1.28.3/pango/pangocairo-atsuifont.c
 +++ misc/build/pango-1.28.3/pango/pangocairo-atsuifont.c
-@@ -22,6 +22,17 @@
+@@ -22,6 +22,12 @@
  
  #include "config.h"
  
@@ -95,11 +90,6 @@
 +typedef int NSColorRenderingIntent;
 +#endif
 +
-+#if MAC_OS_X_VERSION_MAX_ALLOWED < 1070 && MACOSX_SDK_VERSION >= 1070
-+// Avoid a problem in at least the XCode 4.5DP3 SDK 10.7 headers
-+#import <CoreData/NSPersistentStoreRequest.h>
-+#endif
-+
  #import <Cocoa/Cocoa.h>
  
  #include "pango-impl-utils.h"
commit eb9d49e605994c08eba249f1af946845dd31b839
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 22:47:02 2012 +0300

    WaE: unused variable
    
    Change-Id: Iad6063f3f064e0d8fa0bf43125ec1d323519389c

diff --git a/xmloff/source/core/xmlimp.cxx b/xmloff/source/core/xmlimp.cxx
index 30e130b..68ddd35 100644
--- a/xmloff/source/core/xmlimp.cxx
+++ b/xmloff/source/core/xmlimp.cxx
@@ -1312,7 +1312,9 @@ void SvXMLImport::AddStyleDisplayName( sal_uInt16 nFamily,
     StyleMap::key_type aKey( nFamily, rName );
     StyleMap::value_type aValue( aKey, rDisplayName );
     ::std::pair<StyleMap::iterator,bool> aRes( mpStyleMap->insert( aValue ) );
-    OSL_ENSURE( aRes.second, "duplicate style name" );
+    SAL_WARN_IF( !aRes.second,
+                 "xmloff",
+                 "duplicate style name" );
 
 }
 
commit 542f13cb4ed0662778cd72242894badd2c9337c7
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 22:44:25 2012 +0300

    WaE: deprecations
    
    Change-Id: Iadd6283d0441511d0824f013e731fdc023ab417b

diff --git a/fpicker/source/aqua/SalAquaFilePicker.mm b/fpicker/source/aqua/SalAquaFilePicker.mm
index 0e1a3cb..25bd923 100644
--- a/fpicker/source/aqua/SalAquaFilePicker.mm
+++ b/fpicker/source/aqua/SalAquaFilePicker.mm
@@ -773,7 +773,9 @@ void SalAquaFilePicker::updateSaveFileNameExtension() {
         rtl::OUString suffix = (*(aStringList.begin())).copy(1);
         NSString *requiredFileType = [NSString stringWithOUString:suffix];
 
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
         [m_pDialog setRequiredFileType:requiredFileType];
+#pragma GCC diagnostic error "-Wdeprecated-declarations"
 
         OSL_TRACE("disallowing other file types");
         [m_pDialog setAllowsOtherFileTypes:NO];
diff --git a/fpicker/source/aqua/SalAquaPicker.mm b/fpicker/source/aqua/SalAquaPicker.mm
index 3829b70..b292138 100644
--- a/fpicker/source/aqua/SalAquaPicker.mm
+++ b/fpicker/source/aqua/SalAquaPicker.mm
@@ -180,6 +180,7 @@ int SalAquaPicker::run()
         startDirectory = NSHomeDirectory();
     }
 
+#pragma GCC diagnostic warning "-Wdeprecated-declarations"
     switch(m_nDialogType) {
         case NAVIGATIONSERVICES_DIRECTORY:
         case NAVIGATIONSERVICES_OPEN:
@@ -199,6 +200,7 @@ int SalAquaPicker::run()
             implsetDisplayDirectory([[NSURL fileURLWithPath:pDir] OUStringForInfo:FULLPATH]);
         }
     }
+#pragma GCC diagnostic error "-Wdeprecated-declarations"
 
     DBG_PRINT_EXIT(CLASS_NAME, __func__, retVal);
 
commit 9e155f1d4d77ef269cce15f49e13108a7ca52b2a
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 21:02:29 2012 +0300

    WaE: unused variable
    
    Change-Id: I565b93a8dca6dadea7a6b3b9895c9d997acfb017

diff --git a/editeng/source/editeng/impedit.cxx b/editeng/source/editeng/impedit.cxx
index eae0b77..e63014e 100644
--- a/editeng/source/editeng/impedit.cxx
+++ b/editeng/source/editeng/impedit.cxx
@@ -1483,7 +1483,9 @@ void ImpEditView::ShowDDCursor( const Rectangle& rRect )
         aSaveRec.Right() += 1;
         aSaveRec.Bottom() += 1;
 
+#ifdef DBG_UTIL
         Size aNewSzPx( aSaveRec.GetSize() );
+#endif
         if ( !pDragAndDropInfo->pBackground )
         {
             pDragAndDropInfo->pBackground = new VirtualDevice( *GetWindow() );
commit 9ac9625caf554f15c6e3262517c6dac8943390f5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 19:54:12 2012 +0300

    No KillPicture() in the 10.7 SDK, so just leak for now...

diff --git a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
index 51b2942..196ec2e 100644
--- a/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
+++ b/vcl/aqua/source/dtrans/PictToBmpFlt.cxx
@@ -118,10 +118,22 @@ bool BMPtoPICT(com::sun::star::uno::Sequence<sal_Int8>& aBmp,
       rtl_copyMemory(aPict.getArray(), ((sal_Int8*)*hPict), sz);
       HUnlock((Handle)hPict);
 
+#if MACOSX_SDK_VERSION < 1070
       // Release the data associated with the picture
       // Note: This function is deprecated in Mac OS X
       // 10.4.
+
+      // How nice. This whole thing needs to be rewritten I guess. Or
+      // does this code even get invoked on current OSes? Given that
+      // KillPicture() was deprecated already in 10.4, back when
+      // somebody was actually working on this code, hopefulluy
+      // knowing what he/she was doing, was it really not known that
+      // the stuff used here is going to go away?
+
       KillPicture(hPict);
+#else
+      SAL_WARN("vcl", "Here we used to call the deprecated KillPicture(), no idea what to do, so leaking...");
+#endif
 
       result = true;
     }
commit aef42e168d1dd26ed89b2f0574dbd066828b8882
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 18:19:56 2012 +0300

    WaE: format specifies type 'int' but the argument has type 'void *'
    
    Change-Id: I0b8fad6adcef16fb93e4cc0d1beec8e5ae2a3c79

diff --git a/apple_remote/source/HIDRemoteControlDevice.m b/apple_remote/source/HIDRemoteControlDevice.m
index 8883a18..e855266 100644
--- a/apple_remote/source/HIDRemoteControlDevice.m
+++ b/apple_remote/source/HIDRemoteControlDevice.m
@@ -359,7 +359,7 @@ static void QueueCallbackFunction(void* target,  IOReturn result, void* refcon,
 
 		if (((int)event.elementCookie)!=5) {
 			sumOfValues+=event.value;
-			[cookieString appendString:[NSString stringWithFormat:@"%d_", event.elementCookie]];
+			[cookieString appendString:[NSString stringWithFormat:@"%lld_", (long long) event.elementCookie]];
 		}
 	}
 	[remote handleEventWithCookieString: cookieString sumOfValues: sumOfValues];
commit 29c6b31442754b4cbbf0e326f2f96530c5e724a5
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 17:12:27 2012 +0300

    Check MACOSX_SDK_VERSION, not MAC_OS_X_VERSION_MIN_REQUIRED
    
    Change-Id: Ie0b0ec3120f828e02b1ba9c21710c28159e7cd3c

diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index 52c202a..d39b194 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -29,7 +29,7 @@
 
 #include <stdio.h>
 #include <dlfcn.h>
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+#if MACOSX_SDK_VERSION < 1070
 #include <cxxabi.h>
 #else
 #include <typeinfo>
@@ -54,14 +54,14 @@ using namespace ::std;
 using namespace ::osl;
 using namespace ::rtl;
 using namespace ::com::sun::star::uno;
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+#if MACOSX_SDK_VERSION < 1070
 using namespace ::__cxxabiv1;
 #endif
 
 namespace CPPU_CURRENT_NAMESPACE
 {
 
-#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1070
+#if MACOSX_SDK_VERSION >= 1070
 
 // MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
 // __cxxabiv1::__class_type_info and __cxxabiv1::__si_class_type_info but
@@ -234,7 +234,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
                     // ensure availability of base
                     type_info * base_rtti = getRTTI(
                         (typelib_CompoundTypeDescription *)pTypeDescr->pBaseTypeDescription );
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+#if MACOSX_SDK_VERSION < 1070
                     rtti = new __si_class_type_info(
                         strdup( rttiName ), (__class_type_info *)base_rtti );
 #else
@@ -245,7 +245,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
                 else
                 {
                     // this class has no base class
-#if MAC_OS_X_VERSION_MIN_REQUIRED < 1070
+#if MACOSX_SDK_VERSION < 1070
                     rtti = new __class_type_info( strdup( rttiName ) );
 #else
                     rtti = create_FAKE_class_type_info( strdup( rttiName ) );
commit 9ded9696859283dd63665951c9e7cc1f7f2d92f0
Author: Tor Lillqvist <tml at iki.fi>
Date:   Mon Jul 23 16:59:02 2012 +0300

    WaE: unused variable
    
    Change-Id: I36f59184c70b05e45929a01c2052c80cb04ed3de

diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index f2785d4..52c202a 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -212,7 +212,9 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
         {
             pair< t_rtti_map::iterator, bool > insertion(
                 m_rttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
-            OSL_ENSURE( insertion.second, "### inserting new rtti failed?!" );
+            SAL_WARN_IF( !insertion.second,
+                         "bridges",
+                         "inserting new rtti failed" );
         }
         else
         {
@@ -252,7 +254,9 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription *pTypeDescr ) SAL_THR
 
                 pair< t_rtti_map::iterator, bool > insertion(
                     m_generatedRttis.insert( t_rtti_map::value_type( unoName, rtti ) ) );
-                OSL_ENSURE( insertion.second, "### inserting new generated rtti failed?!" );
+                SAL_WARN_IF( !insertion.second,
+                             "bridges",
+                             "inserting new generated rtti failed" );
             }
             else // taking already generated rtti
             {


More information about the Libreoffice-commits mailing list