[Libreoffice-commits] core.git: 8 commits - bridges/test canvas/source comphelper/source config_host/config_features.h.in configure.ac connectivity/workben cui/source dbaccess/source editeng/source

Tor Lillqvist tml at collabora.com
Sat Oct 12 08:30:19 PDT 2013


 bridges/test/performance/testperformance.cxx            |    2 +-
 canvas/source/cairo/cairo_devicehelper.cxx              |    3 ++-
 comphelper/source/eventattachermgr/eventattachermgr.cxx |    4 ----
 config_host/config_features.h.in                        |    7 +++++++
 configure.ac                                            |    1 +
 connectivity/workben/iniParser/main.cxx                 |    5 -----
 connectivity/workben/little/main.cxx                    |    5 -----
 connectivity/workben/testmoz/main.cxx                   |    6 +-----
 connectivity/workben/testmoz/mozthread.cxx              |    6 +-----
 cui/source/tabpages/tparea.cxx                          |    6 ++----
 dbaccess/source/ui/misc/TokenWriter.cxx                 |    6 +++---
 editeng/source/editeng/impedit4.cxx                     |   16 ----------------
 12 files changed, 18 insertions(+), 49 deletions(-)

New commits:
commit 49da6374b357277d46dfddfeb9e102c722a32111
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 18:27:40 2013 +0300

    Bin some of Malte Timmermann's personal old debugging code
    
    Change-Id: I4d8070e6c9441a39094d499c433e5009f093d823

diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx
index fa8110b..fb61b94 100644
--- a/editeng/source/editeng/impedit4.cxx
+++ b/editeng/source/editeng/impedit4.cxx
@@ -152,12 +152,6 @@ EditPaM ImpEditEngine::ReadXML( SvStream& rInput, EditSelection aSel )
 
 EditPaM ImpEditEngine::ReadRTF( SvStream& rInput, EditSelection aSel )
 {
-#if (OSL_DEBUG_LEVEL > 2) && !defined( UNX )
-    SvFileStream aRTFOut( OUString( "d:\\rtf_in.rtf" ), STREAM_WRITE );
-    aRTFOut << rInput;
-    aRTFOut.Close();
-    rInput.Seek( 0 );
-#endif
     if ( aSel.HasRange() )
         aSel = ImpDeleteSelection( aSel );
 
@@ -688,16 +682,6 @@ sal_uInt32 ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
     for (it = aFontTable.begin(); it != aFontTable.end(); ++it)
         delete *it;
 
-#if (OSL_DEBUG_LEVEL > 2) && !defined( UNX )
-    {
-        SvFileStream aStream( OUString( "d:\\rtf_out.rtf" ), STREAM_WRITE|STREAM_TRUNC );
-        sal_uLong nP = rOutput.Tell();
-        rOutput.Seek( 0 );
-        aStream << rOutput;
-        rOutput.Seek( nP );
-    }
-#endif
-
     return rOutput.GetError();
 }
 
commit 8b73652822aae8941b81e8f076db5f5f0b14948d
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 18:20:46 2013 +0300

    Test _WIN32 instead of UNX as it is Win32 that's different here
    
    Change-Id: I05e93ef13523a4729c46c9dbf36657d7288c62e6

diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 80194af..ad2caef 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -72,10 +72,10 @@ using namespace ::com::sun::star::awt;
 using namespace ::com::sun::star::util;
 using ::com::sun::star::frame::XModel;
 
-#if defined(UNX)
-const char ODatabaseImportExport::sNewLine = '\012';
-#else
+#ifdef _WIN32
 const char ODatabaseImportExport::sNewLine[] = "\015\012";
+#else
+const char ODatabaseImportExport::sNewLine = '\012';
 #endif
 
 const static char sMyBegComment[]   = "<!-- ";
commit 3db218c8f70a8d9c29a5013a5e056639b028864b
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 18:18:16 2013 +0300

    There is nothing scary about <stdlib.h>
    
    Change-Id: Ie30e4d67435808fd6c31e1ca7f10a58faad1c6ce

diff --git a/cui/source/tabpages/tparea.cxx b/cui/source/tabpages/tparea.cxx
index 5363cb9..462b410 100644
--- a/cui/source/tabpages/tparea.cxx
+++ b/cui/source/tabpages/tparea.cxx
@@ -17,16 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <stdlib.h>
+
 #include <tools/shl.hxx>
 #include <tools/urlobj.hxx>
 #include <sfx2/app.hxx>
 #include <sfx2/module.hxx>
 #include <svx/dialogs.hrc>
 
-#if defined (UNX) || defined (ICC) || defined(WNT)
-#include <stdlib.h>
-#endif
-
 #include "svx/xattr.hxx"
 #include <svx/xpool.hxx>
 #include <cuires.hrc>
commit ac057ce23d57aa81dbd44852682abaaf5f5510a1
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 17:17:02 2013 +0300

    Bin bogus use of UNX (in not compiled test code)
    
    Change-Id: Idef7344e215e9b58e1449fbf71f8a64d0000f8c3

diff --git a/connectivity/workben/iniParser/main.cxx b/connectivity/workben/iniParser/main.cxx
index 05dcfa1..8938735 100644
--- a/connectivity/workben/iniParser/main.cxx
+++ b/connectivity/workben/iniParser/main.cxx
@@ -165,12 +165,7 @@ public:
 
 };
 
-#if (defined UNX)
 int main( int argc, char * argv[] )
-#else
-int _cdecl main( int argc, char * argv[] )
-#endif
-
 {
 
     IniParser parser(OUString("test.ini"));
diff --git a/connectivity/workben/little/main.cxx b/connectivity/workben/little/main.cxx
index dbfd248..cf04c3a 100644
--- a/connectivity/workben/little/main.cxx
+++ b/connectivity/workben/little/main.cxx
@@ -42,12 +42,7 @@ using namespace cppu;
 
 
 
-#if (defined UNX)
 void main( int argc, char * argv[] )
-#else
-void _cdecl main( int argc, char * argv[] )
-#endif
-
 {
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>  m_xConnection;
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XDriver>      m_xDriver;
diff --git a/connectivity/workben/testmoz/main.cxx b/connectivity/workben/testmoz/main.cxx
index 87d6854..c3dac39 100644
--- a/connectivity/workben/testmoz/main.cxx
+++ b/connectivity/workben/testmoz/main.cxx
@@ -606,12 +606,8 @@ void menuMain()
     PRINTSTR("4 Open OE Address Book\n")
     PRINTSTR("Please Input your choice:")
 }
-#if (defined UNX)
-int main( int argc, char * argv[] )
-#else
-int _cdecl main( int argc, char * argv[] )
-#endif
 
+int main( int argc, char * argv[] )
 {
     Reference< XMultiServiceFactory > xMgr = InitializeFac();
     ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>  m_xConnection;
diff --git a/connectivity/workben/testmoz/mozthread.cxx b/connectivity/workben/testmoz/mozthread.cxx
index dd649a8..6be2b5f 100644
--- a/connectivity/workben/testmoz/mozthread.cxx
+++ b/connectivity/workben/testmoz/mozthread.cxx
@@ -387,12 +387,8 @@ void usage()
     PRINTLN("-e test outlook express");
     PRINTLN("0 < threadcount <= 100, default 100");
 }
-#if (defined UNX)
-int main( int argc, char * argv[] )
-#else
-int _cdecl main( int argc, char * argv[] )
-#endif
 
+int main( int argc, char * argv[] )
 {
     OSL_TRACE("Init UNO");
     Reference< XMultiServiceFactory > xMgr =InitializeFac();
commit 0eeda14bde6e5977a0bdc3d64841e035cd6d3741
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 17:14:33 2013 +0300

    No idea why <wchar.h> would be needed here, and for Unix only even
    
    Change-Id: Ie374a2619d6196172592a14654bb93ec8350c563

diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 512e6fb..53a115d 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-#if defined( UNX )
-#include <wchar.h>
-#endif
 #include <osl/mutex.hxx>
 #include <osl/diagnose.h>
 #include <comphelper/eventattachermgr.hxx>
commit c3ba72ea48ad95b8295f4b71d0dd6c37d539dcb1
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 16:55:14 2013 +0300

    What we actually want to check here is HAVE_FEATURE_X11
    
    Change-Id: Id3f695f4b8dce4ace558c6d791488e8b6efd1c54

diff --git a/canvas/source/cairo/cairo_devicehelper.cxx b/canvas/source/cairo/cairo_devicehelper.cxx
index 3973836..42d4d89 100644
--- a/canvas/source/cairo/cairo_devicehelper.cxx
+++ b/canvas/source/cairo/cairo_devicehelper.cxx
@@ -17,6 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <config_features.h>
 
 #include <canvas/debug.hxx>
 #include <canvas/verbosetrace.hxx>
@@ -91,7 +92,7 @@ namespace cairocanvas
 
         OutputDevice* pOutDev=getOutputDevice();
 
-#if defined (UNX) && !defined (MACOSX)
+#if HAVE_FEATURE_X11
         // X11 only
         if( mpSurface )
             mpSurface->Resize( rSize.getX() + pOutDev->GetOutOffXPixel(),
commit 6a3bb7c1292e393711c8cd542e061d5d4add49db
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 16:49:54 2013 +0300

    Add HAVE_FEATURE_X11
    
    Change-Id: I4ca7310c936ce123347be2e3243fddc738f85d6d

diff --git a/config_host/config_features.h.in b/config_host/config_features.h.in
index 7462ba1..38d41fd 100644
--- a/config_host/config_features.h.in
+++ b/config_host/config_features.h.in
@@ -43,6 +43,13 @@
 
 #define HAVE_FEATURE_DESKTOP_GUI_ELEMENTS 0
 
+/* X11
+ *
+ * Whether we are building code to run in an X11 environment.
+ */
+
+#define HAVE_FEATURE_X11 0
+
 /* EXTENSIONS - Whether we have any extension mechanism at all
  *
  * Primarily intended for non-desktop platforms where supporting
diff --git a/configure.ac b/configure.ac
index 0ec35cf..5960eb7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9138,6 +9138,7 @@ dnl ***************************************
 WANT_X11="no"
 if test $_os != Darwin -a $_os != WINNT -a $_os != Android -a $_os != iOS -a "$enable_headless" != "yes"; then
     WANT_X11="yes"
+    AC_DEFINE(HAVE_FEATURE_X11)
 fi
 AC_MSG_RESULT([$WANT_X11])
 
commit d504b887988ae7db3dcd4bd2b00b294a159a0976
Author: Tor Lillqvist <tml at collabora.com>
Date:   Sat Oct 12 16:26:19 2013 +0300

    Bin pointless comment
    
    Change-Id: I7a873b1275ebc8279958fc14cccbfa99646e4744

diff --git a/bridges/test/performance/testperformance.cxx b/bridges/test/performance/testperformance.cxx
index 75d12ad..098dcb0 100644
--- a/bridges/test/performance/testperformance.cxx
+++ b/bridges/test/performance/testperformance.cxx
@@ -46,7 +46,7 @@ static inline sal_uInt32 getSystemTicks()
 {
 #ifdef SAL_W32
     return (sal_uInt32)GetTickCount();
-#else // only UNX supported for now
+#else
     static sal_uInt32   nImplTicksPerSecond = 0;
     static double       dImplTicksPerSecond;
     static double       dImplTicksULONGMAX;


More information about the Libreoffice-commits mailing list