[Libreoffice-commits] core.git: 2 commits - bridges/source connectivity/source

2023-11-20 Thread Stephan Bergmann (via logerrit)
 bridges/source/jni_uno/jni_info.cxx |2 
 connectivity/source/drivers/mysqlc/mysqlc_connection.cxx|7 
 connectivity/source/drivers/postgresql/pq_preparedstatement.cxx |8 
 connectivity/source/drivers/postgresql/pq_tools.cxx |2 
 connectivity/source/parse/sqlnode.cxx   |  202 
+-
 5 files changed, 110 insertions(+), 111 deletions(-)

New commits:
commit 730a704f7fa78ef340925eea163525a7ae5be224
Author: Stephan Bergmann 
AuthorDate: Mon Nov 20 07:31:30 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 20 09:40:49 2023 +0100

Extended loplugin:ostr: bridges

Change-Id: I8eefb64e75933ea9a4fbadb501182fc61bbf11b5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159727
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/jni_uno/jni_info.cxx 
b/bridges/source/jni_uno/jni_info.cxx
index 0195ed9d1300..a48412897d1b 100644
--- a/bridges/source/jni_uno/jni_info.cxx
+++ b/bridges/source/jni_uno/jni_info.cxx
@@ -297,7 +297,7 @@ JNI_compound_type_info::JNI_compound_type_info(
 && reinterpret_cast< typelib_StructTypeDescription * >(
 td)->pParameterizedTypes[nPos])
 {
-sig = OString( "Ljava/lang/Object;" );
+sig = "Ljava/lang/Object;"_ostr;
 } else {
 OStringBuffer sig_buf( 32 );
 JNI_info::append_sig( _buf, td->ppTypeRefs[ nPos ] );
commit 5c374284b751131e695c04f0d77a0958f153a501
Author: Stephan Bergmann 
AuthorDate: Mon Nov 20 07:30:01 2023 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Nov 20 09:40:37 2023 +0100

Extended loplugin:ostr: connectivity

Change-Id: I284c896777c4f62499eb6b7c0a9883d9abf8d1f9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159721
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx 
b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
index 8e0915f5fd05..269113383d8d 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_connection.cxx
@@ -73,7 +73,7 @@ void OConnection::construct(const OUString& url, const 
Sequence&
 mysql_library_init(0, nullptr, nullptr);
 mysql_init(_mysql);
 
-OString charset_name{ "utf8mb4" };
+OString charset_name{ "utf8mb4"_ostr };
 mysql_options(_mysql, MYSQL_SET_CHARSET_NAME, charset_name.getStr());
 
 sal_Int32 nIndex;
@@ -192,9 +192,8 @@ void OConnection::construct(const OUString& url, const 
Sequence&
*this, OUString(), 0, Any());
 }
 
-lcl_executeUpdate(_mysql,
-  OString{ "SET session 
sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'" });
-lcl_executeUpdate(_mysql, OString{ "SET NAMES utf8mb4" });
+lcl_executeUpdate(_mysql, "SET session 
sql_mode='ANSI_QUOTES,NO_AUTO_VALUE_ON_ZERO'"_ostr);
+lcl_executeUpdate(_mysql, "SET NAMES utf8mb4"_ostr);
 }
 
 OUString OConnection::getImplementationName()
diff --git a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx 
b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
index 4f3faaec419c..e616e9b22966 100644
--- a/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
+++ b/connectivity/source/drivers/postgresql/pq_preparedstatement.cxx
@@ -390,7 +390,7 @@ void PreparedStatement::setNull( sal_Int32 parameterIndex, 
sal_Int32 )
 MutexGuard guard( m_xMutex->GetMutex() );
 checkClosed();
 checkColumnIndex( parameterIndex );
-m_vars[parameterIndex-1] = OString( "NULL" );
+m_vars[parameterIndex-1] = "NULL"_ostr;
 }
 
 void PreparedStatement::setObjectNull(
@@ -399,7 +399,7 @@ void PreparedStatement::setObjectNull(
 MutexGuard guard( m_xMutex->GetMutex() );
 checkClosed();
 checkColumnIndex( parameterIndex );
-m_vars[parameterIndex-1] = OString( "NULL" );
+m_vars[parameterIndex-1] = "NULL"_ostr;
 }
 
 
@@ -409,9 +409,9 @@ void PreparedStatement::setBoolean( sal_Int32 
parameterIndex, sal_Bool x )
 checkClosed();
 checkColumnIndex( parameterIndex );
 if( x )
-m_vars[parameterIndex-1] = OString( "'t'" );
+m_vars[parameterIndex-1] = "'t'"_ostr;
 else
-m_vars[parameterIndex-1] = OString( "'f'" );
+m_vars[parameterIndex-1] = "'f'"_ostr;
 }
 
 void PreparedStatement::setByte( sal_Int32 parameterIndex, sal_Int8 x )
diff --git a/connectivity/source/drivers/postgresql/pq_tools.cxx 
b/connectivity/source/drivers/postgresql/pq_tools.cxx
index 222f57f528d2..c7b94fee121f 100644
--- a/connectivity/source/drivers/postgresql/pq_tools.cxx
+++ b/connectivity/source/drivers/postgresql/pq_tools.cxx
@@ -530,7 +530,7 @@ void tokenizeSQL( const OString & sql, std::vector< OString 
>   )
 {
 if( i - start )
  

[Libreoffice-commits] core.git: 2 commits - bridges/source include/vcl vcl/headless vcl/qt5 vcl/quartz vcl/skia vcl/source vcl/win

2023-07-31 Thread wujiahuan (via logerrit)
 bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.cxx |   30 +-
 bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.hxx |6 ++
 bridges/source/cpp_uno/gcc3_linux_loongarch64/cpp2uno.cxx |   10 
 bridges/source/cpp_uno/gcc3_linux_loongarch64/uno2cpp.cxx |1 
 include/vcl/vclenum.hxx   |1 
 vcl/headless/CairoCommon.cxx  |1 
 vcl/qt5/QtGraphics_GDI.cxx|1 
 vcl/quartz/AquaGraphicsBackend.cxx|1 
 vcl/skia/gdiimpl.cxx  |1 
 vcl/source/outdev/line.cxx|8 ---
 vcl/source/outdev/polygon.cxx |   12 +
 vcl/source/outdev/polyline.cxx|4 -
 vcl/source/outdev/transparent.cxx |5 --
 vcl/win/gdi/gdiimpl.cxx   |4 -
 14 files changed, 52 insertions(+), 33 deletions(-)

New commits:
commit ff55268583324c7c62c6c0988384a9f0f2d18d8b
Author: wujiahuan 
AuthorDate: Mon Jul 24 14:55:50 2023 +0800
Commit: Stephan Bergmann 
CommitDate: Mon Jul 31 09:52:43 2023 +0200

fix CustomTarget_uno_test check failed with enable java on loongarch64

Change-Id: Iadb1f16eb10761cdef392110986bddda44ddee3d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154833
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.cxx 
b/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.cxx
index 686cbb596317..f9eb09517358 100644
--- a/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_loongarch64/abi.cxx
@@ -56,6 +56,8 @@ int loongarch64::flatten_struct(typelib_TypeDescription* 
pTypeDescr, Registers&
 regs.priorInt = true;
 break;
 case typelib_TypeClass_FLOAT:
+regs.complex_float = true;
+[[fallthrough]];
 case typelib_TypeClass_DOUBLE:
 regs.nr_fp++;
 if (!regs.priorInt && !regs.priorFp)
@@ -88,22 +90,34 @@ loongarch64::ReturnKind 
loongarch64::getReturnKind(typelib_TypeDescriptionRefere
 return ReturnKind::RegistersFp;
 case typelib_TypeClass_STRUCT:
 {
-Registers regs = { 0, 0, false, false };
+Registers regs = { false, false, false, 0, 0 };
 typelib_TypeDescription* pTypeDescr = nullptr;
 TYPELIB_DANGER_GET(, pTypeRef);
 int sum = flatten_struct(pTypeDescr, regs);
 TYPELIB_DANGER_RELEASE(pTypeDescr);
 if ((sum == 1 || sum == 2) && sum == regs.nr_fp)
+{
+if (regs.complex_float && pTypeRef->pType->nSize == 8)
+return ReturnKind::RegistersTwoFloat;
 return ReturnKind::RegistersFp;
+}
 if (sum == 2 && regs.nr_fp == regs.nr_int)
 {
 if (regs.priorInt)
+{
+if (regs.complex_float && pTypeRef->pType->nSize == 8)
+return ReturnKind::RegistersIntFloat;
 return ReturnKind::RegistersIntFp;
+}
 if (regs.priorFp)
+{
+if (regs.complex_float && pTypeRef->pType->nSize == 8)
+return ReturnKind::RegistersFloatInt;
 return ReturnKind::RegistersFpInt;
+}
 }
-return ReturnKind::RegistersInt;
 }
+[[fallthrough]];
 default:
 return ReturnKind::RegistersInt;
 }
@@ -119,14 +133,26 @@ void 
loongarch64::fillReturn(typelib_TypeDescriptionReference* pTypeRef, sal_Int
 reinterpret_cast(pRegisterReturn)[0] = fret[0];
 reinterpret_cast(pRegisterReturn)[1] = fret[1];
 break;
+case ReturnKind::RegistersTwoFloat:
+memcpy(reinterpret_cast(pRegisterReturn), &(fret[0]), 4);
+memcpy(reinterpret_cast(pRegisterReturn) + 4, &(fret[1]), 
4);
+break;
 case ReturnKind::RegistersFpInt:
 reinterpret_cast(pRegisterReturn)[0] = fret[0];
 reinterpret_cast(pRegisterReturn)[1] = gret[0];
 break;
+case ReturnKind::RegistersFloatInt:
+memcpy(reinterpret_cast(pRegisterReturn), fret, 4);
+memcpy(reinterpret_cast(pRegisterReturn) + 4, gret, 4);
+break;
 case ReturnKind::RegistersIntFp:
 reinterpret_cast(pRegisterReturn)[0] = gret[0];
 reinterpret_cast(pRegisterReturn)[1] = fret[0];
 break;
+case ReturnKind::RegistersIntFloat:
+memcpy(reinterpret_cast(pRegisterReturn), gret, 4);
+memcpy(reinterpret_cast(pRegisterReturn) + 4, fret, 4);
+break;
 

[Libreoffice-commits] core.git: 2 commits - bridges/source

2018-11-28 Thread Libreoffice Gerrit user
 bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h |   57 ---
 1 file changed, 1 insertion(+), 56 deletions(-)

New commits:
commit 7eeb1f63778c4c1b7c80df2defccd4a9cb91f615
Author: Tor Lillqvist 
AuthorDate: Wed Nov 28 16:44:49 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Nov 28 17:04:20 2018 +0200

Bin some unused declarations

They used std::unexpected_handler so did not compile as C++17 anyway.

Change-Id: I5f8bacb85cbd213dd6304d865a7b4cb7eb8f4b8f

diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h 
b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
index 55c922f72caf..9a700445c12a 100644
--- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
+++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
@@ -109,52 +109,6 @@ struct __cxa_exception
   _Unwind_Exception unwindHeader;
 };
 
-struct __cxa_dependent_exception
-{
-#if __LP64__
-  void* primaryException;
-#endif
-
-  // Unused dummy data (should be set to null)
-  std::type_info *exceptionType;
-  void (*exceptionDestructor)(void *); 
-
-  // The C++ standard has entertaining rules wrt calling set_terminate
-  // and set_unexpected in the middle of the exception cleanup process.
-  std::unexpected_handler unexpectedHandler;
-  std::terminate_handler terminateHandler;
-
-  // The caught exception stack threads through here.
-  __cxa_exception *nextException;
-
-  // How many nested handlers have caught this exception.  A negated
-  // value is a signal that this object has been rethrown.
-  int handlerCount;
-
-#ifdef __ARM_EABI_UNWINDER__
-  // Stack of exceptions in cleanups.
-  __cxa_exception* nextPropagatingException;
-
-  // The number of active cleanup handlers for this exception.
-  int propagationCount;
-#else
-  // Cache parsed handler data from the personality routine Phase 1
-  // for Phase 2 and __cxa_call_unexpected.
-  int handlerSwitchValue;
-  const unsigned char *actionRecord;
-  const unsigned char *languageSpecificData;
-  _Unwind_Ptr catchTemp;
-  void *adjustedPtr;
-#endif
-
-#if !__LP64__
-  void* primaryException;
-#endif
-
- // The generic exception header.  Must be last.
-  _Unwind_Exception unwindHeader;
-};
-
 // Each thread in a C++ program has access to a __cxa_eh_globals object.
 struct __cxa_eh_globals
 {
@@ -221,15 +175,6 @@ extern "C" void __cxa_begin_cleanup (_Unwind_Exception*);
 extern "C" void __cxa_end_cleanup (void);
 #endif
 
-#pragma GCC visibility push(hidden)
-
-// Invokes given handler, dying appropriately if the user handler was
-// so inconsiderate as to return.
-extern void __terminate(std::terminate_handler) __attribute__((noreturn));
-extern void __unexpected(std::unexpected_handler) __attribute__((noreturn));
-
-#pragma GCC visibility pop
-
 // These are explicitly GNU C++ specific.
 
 // Acquire the C++ exception header from the C++ object.
commit f7251d06d8a3eb0f2876566ab115e4b093e1e496
Author: Tor Lillqvist 
AuthorDate: Wed Nov 28 16:37:34 2018 +0200
Commit: Tor Lillqvist 
CommitDate: Wed Nov 28 17:04:20 2018 +0200

Do like effe6b3d84302afce3d5095e4f376e7e3bf669e0 for iOS, too

Change-Id: I9163e1722f163a04968df292ee8b29d472f9ac4f

diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h 
b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
index ee7066931bfc..55c922f72caf 100644
--- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
+++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
@@ -73,7 +73,7 @@ struct __cxa_exception
 
   // The C++ standard has entertaining rules wrt calling set_terminate
   // and set_unexpected in the middle of the exception cleanup process.
-  std::unexpected_handler unexpectedHandler;
+  void (*unexpectedHandler)(); // std::unexpected_handler dropped from C++17
   std::terminate_handler terminateHandler;
 
   // The caught exception stack threads through here.
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source cppuhelper/Module_cppuhelper.mk

2018-08-09 Thread Libreoffice Gerrit user
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |   66 ++--
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |   57 -
 bridges/source/cpp_uno/msvc_win32_x86-64/mscx.hxx   |6 -
 cppuhelper/Module_cppuhelper.mk |2 
 4 files changed, 117 insertions(+), 14 deletions(-)

New commits:
commit 654bd1ab45a0f24571f029fcd247cf28db575871
Author: Stephan Bergmann 
AuthorDate: Tue Aug 7 18:03:00 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 9 15:55:39 2018 +0200

No need for CppunitTest_cppuhelper_qa_misc to be a subsequentcheck

Change-Id: I5b27c4803a9927ff9e2be084e7abbae7fdf94f55
Reviewed-on: https://gerrit.libreoffice.org/58696
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/cppuhelper/Module_cppuhelper.mk b/cppuhelper/Module_cppuhelper.mk
index 296b85daf3f9..10d51758d662 100644
--- a/cppuhelper/Module_cppuhelper.mk
+++ b/cppuhelper/Module_cppuhelper.mk
@@ -19,11 +19,11 @@ $(eval $(call gb_Module_add_targets,cppuhelper,\
 $(eval $(call gb_Module_add_check_targets,cppuhelper,\
CppunitTest_cppuhelper_cppu_ifcontainer \
CppunitTest_cppuhelper_cppu_unourl \
+   CppunitTest_cppuhelper_qa_misc \
 ))
 
 # CppunitTest_cppuhelper_qa_weak depends on module bridges
 $(eval $(call gb_Module_add_subsequentcheck_targets,cppuhelper,\
-   CppunitTest_cppuhelper_qa_misc \
CppunitTest_cppuhelper_qa_weak \
 ))
 
commit 8313116f962ac87e103ea22aafb58700b8c695da
Author: Mike Kaganski 
AuthorDate: Wed Aug 8 12:42:32 2018 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Aug 9 15:55:28 2018 +0200

Don't use internal __CxxDetectRethrow: it has side effects

Since the __CxxDetectRethrow may increment __ProcessingThrow, which then
must be decremented in __CxxUnregisterExceptionObject, and the latter does
many other funny things with exception handling CRT machinery, we cannot
use those internal functions (neither alone, nor together), or we end up
breaking runtime's expectations: the runtime code checks __ProcessingThrow
left and right, expecting its non-0 value to indicate "we are unwinding...
possibly called from a dtor()". In this case, e.g., std::current_exception
returns nullptr inside catch block.

This creates our own copy of __CxxDetectRethrow, which does not mangle the
global state, and just performs the same checks. This is a dirty hack, and
it relies on current layout of the exception description layout - so must
be synchronized in the event of changes!

Change-Id: I2c475fbc2468073b796c7e9d0f4dfcd315896489
Reviewed-on: https://gerrit.libreoffice.org/58730
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann 

diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 3ce8f5c50db9..7af24e97c868 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -23,16 +23,16 @@
 #include 
 #include 
 
-#include "rtl/alloc.h"
-#include "rtl/strbuf.hxx"
-#include "rtl/ustrbuf.hxx"
+#include 
+#include 
+#include 
 #include 
 #include 
 
-#include "com/sun/star/uno/Any.hxx"
+#include 
 #include 
 #include "msci.hxx"
-#include "except.hxx"
+#include 
 
 
 #pragma pack(push, 8)
@@ -468,6 +468,60 @@ void msci_raiseException( uno_Any * pUnoExc, uno_Mapping * 
pUno2Cpp )
 RaiseException( MSVC_ExceptionCode, EXCEPTION_NONCONTINUABLE, 3, 
arFilterArgs );
 }
 
+namespace
+{
+// This function does the same check as __CxxDetectRethrow from msvcrt (see its
+// crt/src/vcruntime/mgdframe.cpp). But it does not alter the global state, 
i.e. it does not
+// increment __ProcessingThrow, and so does not break following exception 
handling. We rely on the
+// definition of EHExceptionRecord, PER_IS_MSVC_EH and PER_PTHROW, that are 
current as of msvcrt
+// 2017 (14.14.26428).
+bool __DetectRethrow(void* ppExcept)
+{
+struct EHExceptionRecord
+{
+DWORD ExceptionCode;
+DWORD ExceptionFlags;
+struct _EXCEPTION_RECORD* ExceptionRecord;
+PVOID ExceptionAddress;
+DWORD NumberParameters;
+struct EHParameters
+{
+DWORD magicNumber;
+PVOID pExceptionObject;
+PVOID pThrowInfo;
+} params;
+};
+
+constexpr auto PER_IS_MSVC_EH = [](EHExceptionRecord* p) {
+constexpr DWORD EH_EXCEPTION_NUMBER = ('msc' | 0xE000); // The NT 
Exception # that msvcrt uses
+constexpr DWORD EH_MAGIC_NUMBER1 = 0x19930520;  // latest 
magic # in thrown object
+constexpr DWORD EH_MAGIC_NUMBER2 = 0x19930521;  // latest 
magic # in func info for exception specs
+constexpr DWORD EH_MAGIC_NUMBER3 = 0x19930522;  // latest 
magic #
+constexpr DWORD EH_EXCEPTION_PARAMETERS = 3;// Number 
of parameters in exception record for x86
+

[Libreoffice-commits] core.git: 2 commits - bridges/source comphelper/source embedserv/source i18npool/source include/comphelper include/svx include/ucbhelper l10ntools/inc odk/examples offapi/com sc/

2018-07-23 Thread Libreoffice Gerrit user
 bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h   
|6 +++---
 comphelper/source/misc/mimeconfighelper.cxx
|4 ++--
 embedserv/source/embed/syswinwrapper.cxx   
|2 +-
 i18npool/source/breakiterator/data/README  
|2 +-
 include/comphelper/componentmodule.hxx 
|2 +-
 include/svx/svdglev.hxx
|2 +-
 include/svx/svdobj.hxx 
|2 +-
 include/ucbhelper/interceptedinteraction.hxx   
|4 ++--
 l10ntools/inc/xmlparse.hxx 
|2 +-
 
odk/examples/DevelopersGuide/BasicAndDialogs/ToolkitControls/ToolkitControls/MultiPage.xba
 |4 ++--
 offapi/com/sun/star/presentation/XSlideShowController.idl  
|2 +-
 offapi/com/sun/star/sdbc/PreparedStatement.idl 
|2 +-
 offapi/com/sun/star/sdbc/ResultSet.idl 
|2 +-
 offapi/com/sun/star/sdbc/Statement.idl 
|2 +-
 offapi/com/sun/star/ui/XContextChangeEventMultiplexer.idl  
|2 +-
 sc/inc/dpfilteredcache.hxx 
|2 +-
 sc/inc/validat.hxx 
|4 ++--
 sc/source/ui/inc/csvcontrol.hxx
|2 +-
 sd/source/core/drawdoc.cxx 
|2 +-
 sd/source/ui/framework/configuration/ConfigurationUpdater.hxx  
|2 +-
 sd/source/ui/sidebar/MasterPagesSelector.hxx   
|2 +-
 sd/source/ui/slidesorter/controller/SlsSelectionManager.cxx
|8 
 sdext/source/presenter/PresenterViewFactory.hxx
|2 +-
 sfx2/classification/xAL.xsd
|2 +-
 sfx2/source/appl/sfxhelp.cxx   
|2 +-
 solenv/bin/fix-includes.pl 
|2 +-
 solenv/bin/modules/installer/windows/idtglobal.pm  
|4 ++--
 svx/source/unodraw/unoshape.cxx
|2 +-
 vcl/opengl/shaders/lineFragmentShader.glsl 
|2 +-
 29 files changed, 39 insertions(+), 39 deletions(-)

New commits:
commit c7d324a4cb236426849c52005d95a43f1d0c2c1d
Author: Andrea Gelmini 
AuthorDate: Mon Jul 23 16:30:22 2018 +0200
Commit: Julien Nabet 
CommitDate: Mon Jul 23 23:39:10 2018 +0200

Fix typos

Change-Id: I1cc2b1f63326d1d0e1f6e452b93af11e59a2d674
Reviewed-on: https://gerrit.libreoffice.org/57799
Reviewed-by: Julien Nabet 
Tested-by: Jenkins

diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h 
b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
index 6d6c9dbeb987..ee7066931bfc 100644
--- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
+++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
@@ -87,7 +87,7 @@ struct __cxa_exception
   // Stack of exceptions in cleanups.
   __cxa_exception* nextPropagatingException;
 
-  // The nuber of active cleanup handlers for this exception.
+  // The number of active cleanup handlers for this exception.
   int propagationCount;
 #else
   // Cache parsed handler data from the personality routine Phase 1
@@ -135,7 +135,7 @@ struct __cxa_dependent_exception
   // Stack of exceptions in cleanups.
   __cxa_exception* nextPropagatingException;
 
-  // The nuber of active cleanup handlers for this exception.
+  // The number of active cleanup handlers for this exception.
   int propagationCount;
 #else
   // Cache parsed handler data from the personality routine Phase 1
@@ -173,7 +173,7 @@ struct __cxa_eh_globals
 extern "C" __cxa_eh_globals *__cxa_get_globals () throw();
 extern "C" __cxa_eh_globals *__cxa_get_globals_fast () throw();
 
-// Allocate memory for the exception plus the thown object.
+// Allocate memory for the exception plus the thrown object.
 extern "C" void *__cxa_allocate_exception(size_t thrown_size) throw();
 
 // Free the space allocated for the exception.
diff --git a/include/comphelper/componentmodule.hxx 
b/include/comphelper/componentmodule.hxx
index 1793953aaf49..67818ac3d8a3 100644
--- 

[Libreoffice-commits] core.git: 2 commits - bridges/source vcl/source

2018-02-20 Thread jan Iversen
 bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h |6 --
 vcl/source/app/scheduler.cxx |3 ++-
 2 files changed, 2 insertions(+), 7 deletions(-)

New commits:
commit 61f3c760e573044bc51b94f00470c4fdd6d5c22f
Author: jan Iversen 
Date:   Mon Feb 19 16:14:16 2018 +0100

iOS, remove throw definition

clean cpp_uno part.

Change-Id: Ief08e4cf596b375243ae215d8dc2e1cdb5830ac1

diff --git a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h 
b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
index 2ffa69e70257..034baff5738e 100644
--- a/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
+++ b/bridges/source/cpp_uno/gcc3_ios/unwind-cxx.h
@@ -188,12 +188,6 @@ extern "C" void *__cxa_allocate_dependent_exception() 
throw();
 extern "C" void __cxa_free_dependent_exception(void *thrown_exception) throw();
 #pragma GCC visibility pop
 
-// Throw the exception.
-extern "C" void __cxa_throw (void *thrown_exception,
-std::type_info *tinfo,
-void (*dest) (void *))
- __attribute__((noreturn));
-
 // Used to implement exception handlers.
 extern "C" void *__cxa_get_exception_ptr (void *) throw();
 extern "C" void *__cxa_begin_catch (void *) throw();
commit 18d50b61ce1da7e989127fb518bbf5d140a3ba7a
Author: jan Iversen 
Date:   Sun Feb 18 12:39:13 2018 +0100

vcl/scheduler adjusted time check.

the sal_timer might be off with a fraction, so when comparing
it is -1 (due to use of int), which lead to adding 250 ticks.

Changed check to be
if time < wanted time - 1
add extra time

Change-Id: I788b3e3b491a513f44f7b495727d1a6842af6109

diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 1928161aecea..d7f80e1f1783 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -345,7 +345,8 @@ bool Scheduler::ProcessTaskScheduling()
 return false;
 
 sal_uInt64 nTime = tools::Time::GetSystemTicks();
-if ( nTime < rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod )
+// Allow for decimals, so subtract in the compare (needed at least on iOS)
+if ( nTime < rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod -1)
 {
 SAL_WARN( "vcl.schedule", "we're too early - restart the timer!" );
 UpdateSystemTimer( rSchedCtx,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source

2018-02-15 Thread jan Iversen
 bridges/source/cpp_uno/gcc3_ios/cpp2uno.cxx  |   14 ++
 bridges/source/cpp_uno/gcc3_ios/except.cxx   |2 
 bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl |  114 +++
 bridges/source/cpp_uno/gcc3_ios/uno2cpp.cxx  |3 
 4 files changed, 130 insertions(+), 3 deletions(-)

New commits:
commit f563a81000ce43e95e117229b72228386077f94e
Author: jan Iversen 
Date:   Thu Feb 15 18:00:33 2018 +0100

iOS, add old snippet script.

We need to check if the script generated the same code always.
Looks like nFunIndexes is never changed.

Change-Id: Ic247cccbf1e4a75e6a0acf5807fdcf84bfcf4cb3

diff --git a/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl 
b/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl
new file mode 100755
index ..a8548836fef3
--- /dev/null
+++ b/bridges/source/cpp_uno/gcc3_ios/generate-snippets.pl
@@ -0,0 +1,114 @@
+#!/usr/bin/perl -w # -*- tab-width: 4; indent-tabs-mode: nil; 
cperl-indent-level: 4 -*-
+#
+# This file is part of the LibreOffice project.
+#
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+#
+
+my $nFunIndexes = 8;
+my $nVtableOffsets = 4;
+
+sub gen_arm ($$)
+{
+my ($funIndex, $vtableOffset) = @_;
+if ($funIndex & 0x8000) {
+printf ("#ifndef __arm64\n");
+}
+printf ("codeSnippet_%08x_%d:\n", $funIndex, $vtableOffset);
+printf ("#ifdef __arm\n");
+# Note: pc is the address of instruction being executed plus 8
+printf ("mov ip, pc\n");
+printf ("#else\n");
+printf ("adr x15, .+8\n");
+printf ("#endif\n");
+printf ("b _privateSnippetExecutor\n");
+printf (".long %#08x\n", $funIndex);
+printf (".long %d\n", $vtableOffset);
+if ($funIndex & 0x8000) {
+printf ("#endif\n");
+}
+}
+
+sub gen_x86 ($$$)
+{
+my ($funIndex, $vtableOffset, $executor) = @_;
+printf ("codeSnippet_%08x_%d_%s:\n", $funIndex, $vtableOffset, $executor);
+printf ("movl \$%#08x, %%eax\n", $funIndex);
+printf ("movl \$%d, %%edx\n", $vtableOffset);
+printf ("jmp _privateSnippetExecutor%s\n", $executor);
+}
+
+printf (".text\n");
+
+printf ("#if defined(__arm) || defined(__arm64)\n");
+
+printf ("\n");
+printf ("// Each codeSnippetX function stores into ip (arm64: x15) an address 
and branches to _privateSnippetExecutor\n");
+printf ("// The address is that following the branch instruction, containing 
two 32-bit ints:\n");
+printf ("// - the function index, which for 32-bit can have the 0x8000 bit 
set\n");
+printf ("//   to indicate that a hidden parameter is used for returning large 
values\n");
+printf ("// - the vtable offset\n");
+printf ("\n");
+
+printf (".align 4\n");
+printf ("\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+   foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+   {
+   gen_arm ($funIndex, $vtableOffset);
+   gen_arm ($funIndex|0x8000, $vtableOffset);
+   }
+}
+
+printf ("#else\n");
+printf (".align 1, 0x90\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+{
+foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 
'Class')
+{
+gen_x86 ($funIndex, $vtableOffset, $executor);
+gen_x86 ($funIndex|0x8000, $vtableOffset, $executor);
+}
+}
+  }
+
+printf ("#endif\n");
+
+printf (".globl _nFunIndexes\n");
+printf ("_nFunIndexes:\n");
+printf (".long %d\n", $nFunIndexes);
+
+printf (".globl _nVtableOffsets\n");
+printf ("_nVtableOffsets:\n");
+printf (".long %d\n", $nVtableOffsets);
+
+printf (".globl _codeSnippets\n");
+printf ("_codeSnippets:\n");
+
+foreach my $funIndex (0 .. $nFunIndexes-1)
+{
+foreach my $vtableOffset (0 .. $nVtableOffsets-1)
+{
+printf ("#if defined(__arm) || defined(__arm64)\n");
+printf (".long codeSnippet_%08x_%d - _codeSnippets\n", $funIndex, 
$vtableOffset);
+printf ("#ifndef __arm64\n");
+printf (".long codeSnippet_%08x_%d - _codeSnippets\n", 
$funIndex|0x8000, $vtableOffset);
+printf ("#endif\n");
+printf ("#else\n");
+foreach my $executor ('General', 'Void', 'Hyper', 'Float', 'Double', 
'Class')
+{
+printf (".long codeSnippet_%08x_%d_%s - _codeSnippets\n", 
$funIndex, $vtableOffset, $executor);
+printf (".long codeSnippet_%08x_%d_%s - _codeSnippets\n", 
$funIndex|0x8000, $vtableOffset, $executor);
+}
+printf ("#endif\n");
+}
+}
+
+# vim:set shiftwidth=4 softtabstop=4 expandtab:
commit 4b86076d5efc2e416181cc4c9e56b21870121892
Author: jan Iversen 
Date:   Thu Feb 15 17:57:47 2018 +0100

iOS, update to original files

Update to 

[Libreoffice-commits] core.git: 2 commits - bridges/source solenv/CompilerTest_compilerplugins_clang.mk

2017-09-18 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx |2 +-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx|2 +-
 bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx  |2 +-
 bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx  |2 +-
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx  |2 +-
 bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx  |2 +-
 bridges/source/cpp_uno/gcc3_linux_mips64/uno2cpp.cxx|2 +-
 bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx  |2 +-
 bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx |2 +-
 bridges/source/cpp_uno/gcc3_linux_sparc64/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx   |2 +-
 bridges/source/cpp_uno/msvc_win32_intel/uno2cpp.cxx |2 +-
 solenv/CompilerTest_compilerplugins_clang.mk|2 +-
 22 files changed, 22 insertions(+), 22 deletions(-)

New commits:
commit 1c92a7fa0ae96724a08ac5f6dd22154b60484f6a
Author: Michael Stahl 
Date:   Mon Sep 18 13:33:43 2017 +0200

clang plugins: this test fails on 32-bit Linux

... where sal_uIntPtr and sal_uInt32 are both "unsigned long";
 disable test for now.

Change-Id: I8357bf425ab5d9166cd45ba5fb81ec6c1fac957a
error: 'error' diagnostics expected but not seen:
  File compilerplugins/clang/test/convertuintptr.cxx Line 15: cast from 
'sal_uIntPtr' (aka 'unsigned {{.+}}') to 'sal_uInt32' (aka 'unsigned {{.+}}') 
[loplugin:convertuintptr]
  File compilerplugins/clang/test/convertuintptr.cxx Line 16: cast from 
'sal_uIntPtr' (aka 'unsigned {{.+}}') to 'sal_uInt32' (aka 'unsigned {{.+}}') 
[loplugin:convertuintptr]

diff --git a/solenv/CompilerTest_compilerplugins_clang.mk 
b/solenv/CompilerTest_compilerplugins_clang.mk
index 1a6001eb6a9f..02d6155d3dd5 100644
--- a/solenv/CompilerTest_compilerplugins_clang.mk
+++ b/solenv/CompilerTest_compilerplugins_clang.mk
@@ -12,7 +12,7 @@ $(eval $(call 
gb_CompilerTest_CompilerTest,compilerplugins_clang))
 $(eval $(call gb_CompilerTest_add_exception_objects,compilerplugins_clang, \
 compilerplugins/clang/test/casttovoid \
 compilerplugins/clang/test/constparams \
-compilerplugins/clang/test/convertuintptr \
+$(if $(filter-out INTEL,$(CPU)),compilerplugins/clang/test/convertuintptr) 
\
 compilerplugins/clang/test/cppunitassertequals \
 compilerplugins/clang/test/datamembershadow \
 compilerplugins/clang/test/droplong \
commit 5581ab4a1376f9c0353a00c9191839773143a942
Author: Michael Stahl 
Date:   Mon Sep 18 13:33:20 2017 +0200

bridges: [loplugin:stringconstant]

Change-Id: I07501ac3593cd5df713b74e04ea64d22365958b9

diff --git a/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
index 5996460314a2..6024ceed5cae 100644
--- a/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx
@@ -470,7 +470,7 @@ void unoInterfaceProxyDispatch(
 default:
 {
 ::com::sun::star::uno::RuntimeException aExc(
-OUString("illegal member type description!"),
+"illegal member type description!",
 ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >() );
 
 Type const & rExcType = cppu::UnoType::get();
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
index 40bd6212fd6b..b11e4bdd1cce 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx
@@ -670,7 +670,7 @@ void unoInterfaceProxyDispatch(
 default:
 {
 ::com::sun::star::uno::RuntimeException aExc(
-OUString("illegal member type description!"),
+"illegal member type description!",
 ::com::sun::star::uno::Reference< 
::com::sun::star::uno::XInterface >() );
 
 Type const & rExcType = cppu::UnoType::get();
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 45491094ceb6..7915fa7a9513 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ 

[Libreoffice-commits] core.git: 2 commits - bridges/source include/LibreOfficeKit

2016-08-20 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx |1 +
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |3 ++-
 include/LibreOfficeKit/LibreOfficeKitInit.h   |2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit 932804559e845fb8ec6ac3a3b49308136a7e81e6
Author: Tor Lillqvist 
Date:   Sat Aug 20 16:14:37 2016 +0300

Check arm64 too

Change-Id: I51f89eb05f7844a7b0a99eab1587bbe333b96b09

diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h 
b/include/LibreOfficeKit/LibreOfficeKitInit.h
index 15b9a67..322ba8b 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -158,7 +158,7 @@ static void *lok_dlopen( const char *install_path, char ** 
_imp_lib )
 
 *_imp_lib = NULL;
 
-#if !(defined(__APPLE__) && defined(__arm__))
+#if !(defined(__APPLE__) && (defined(__arm__) || defined(__arm64__)))
 size_t partial_length;
 
 if (!install_path)
commit ef5e3bfc71f94f77ecd13df9afe2fa768b020dbb
Author: Tor Lillqvist 
Date:   Fri Aug 19 20:10:53 2016 +0300

SAL_FALLTHROUGH

Change-Id: I9b13e20b873e919aef93e5c7548112c47f57612e

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
index 1f77e49..92b053c 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
@@ -402,6 +402,7 @@ namespace
 TYPELIB_DANGER_RELEASE( pTD );
 }
 } // else perform queryInterface()
+SAL_FALLTHROUGH;
 default:
 eRet = cpp2uno_call(
 pCppI, aMemberDescr.get(),
diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 24a5704..4549109 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
@@ -77,7 +77,7 @@ void MapReturn(sal_uInt64 x0, sal_uInt64 x1, 
typelib_TypeDescriptionReference *p
 case typelib_TypeClass_HYPER:
 case typelib_TypeClass_UNSIGNED_HYPER:
 pRegisterReturn[1] = x1;
-// fallthrough
+SAL_FALLTHROUGH;
 case typelib_TypeClass_LONG:
 case typelib_TypeClass_UNSIGNED_LONG:
 case typelib_TypeClass_ENUM:
@@ -525,6 +525,7 @@ void unoInterfaceProxyDispatch(
 TYPELIB_DANGER_RELEASE( pTD );
 }
 } // else perform queryInterface()
+SAL_FALLTHROUGH;
 default:
 // dependent dispatch
 cpp_call(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source editeng/source include/editeng vcl/inc vcl/unx

2016-07-19 Thread Caolán McNamara
 bridges/source/cpp_uno/gcc3_linux_intel/share.hxx|   19 +
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx  |4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/share.hxx   |  172 +++-
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |   10 
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx   |1 
 editeng/source/items/numitem.cxx |   25 --
 include/editeng/numitem.hxx  |8 
 vcl/inc/unx/gtk/gtkframe.hxx |6 
 vcl/unx/gtk/gtksalmenu.cxx   |  196 ---
 vcl/unx/gtk3/gtk3gtkframe.cxx|9 
 10 files changed, 105 insertions(+), 345 deletions(-)

New commits:
commit 8617010b851e000f336cf647f207557b5eeab8b7
Author: Caolán McNamara 
Date:   Tue Jul 19 21:47:29 2016 +0100

Resolves: tdf#97404 outline space wrong on second level

Revert "tdf#42788: FORMATTING - Numbering/ordered list"

This reverts commit 6517141b6233c5f9667031bc92f66109fddf5b76.

https://gerrit.libreoffice.org/#/c/23006/ was apparently
intended to revert this, but it never was

Then there was https://gerrit.libreoffice.org/#/c/23427/
which was an attempt to improve it but it was abandoned

Then there was https://gerrit.libreoffice.org/#/c/23542/
whichw as another attempt to improve it, but it was too
abandoned.

all of which leaves us worse than when we started with
a pile of unhappy abandoned efforts and cruddy indent

Change-Id: I8b3666a957339030d5a946a2b387f452e7fb0099

diff --git a/editeng/source/items/numitem.cxx b/editeng/source/items/numitem.cxx
index 2f2a80a..3c3fa19 100644
--- a/editeng/source/items/numitem.cxx
+++ b/editeng/source/items/numitem.cxx
@@ -151,7 +151,6 @@ SvxNumberFormat::SvxNumberFormat( sal_Int16 eType,
   SvxNumPositionAndSpaceMode 
ePositionAndSpaceMode )
 : SvxNumberType(eType),
   eNumAdjust(SVX_ADJUST_LEFT),
-  mbNumAdjustChanged(false),
   nInclUpperLevels(0),
   nStart(1),
   cBullet(SVX_DEF_BULLET),
@@ -181,8 +180,7 @@ SvxNumberFormat::SvxNumberFormat(const SvxNumberFormat& 
rFormat) :
 }
 
 SvxNumberFormat::SvxNumberFormat( SvStream  )
-: mbNumAdjustChanged(false)
-, nStart(0)
+: nStart(0)
 , nBulletRelSize(100)
 , nFirstLineOffset(0)
 , nAbsLSpace(0)
@@ -245,26 +243,6 @@ SvxNumberFormat::~SvxNumberFormat()
 delete pBulletFont;
 }
 
-void SvxNumberFormat::SetNumberingType(sal_Int16 nSet)
-{
-if(!mbNumAdjustChanged)
-{
-// Right align Roman numbers, tdf#42788
-if(nSet == SVX_NUM_ROMAN_UPPER || nSet == SVX_NUM_ROMAN_LOWER)
-eNumAdjust = SVX_ADJUST_RIGHT;
-else if (eNumAdjust == SVX_ADJUST_RIGHT && (GetNumberingType() == 
SVX_NUM_ROMAN_UPPER || GetNumberingType() == SVX_NUM_ROMAN_LOWER))
-eNumAdjust = SVX_ADJUST_LEFT;
-}
-
-SvxNumberType::SetNumberingType(nSet);
-}
-
-void SvxNumberFormat::SetNumAdjust(SvxAdjust eSet)
-{
-eNumAdjust = eSet;
-mbNumAdjustChanged = true;
-}
-
 void SvxNumberFormat::Store(SvStream , FontToSubsFontConverter 
pConverter)
 {
 if(pConverter && pBulletFont)
@@ -338,7 +316,6 @@ SvxNumberFormat& SvxNumberFormat::operator=( const 
SvxNumberFormat& rFormat )
 
 SvxNumberType::SetNumberingType(rFormat.GetNumberingType());
 eNumAdjust  = rFormat.eNumAdjust ;
-mbNumAdjustChanged  = rFormat.mbNumAdjustChanged;
 nInclUpperLevels= rFormat.nInclUpperLevels ;
 nStart  = rFormat.nStart ;
 cBullet = rFormat.cBullet ;
diff --git a/include/editeng/numitem.hxx b/include/editeng/numitem.hxx
index 13ffac0..e87b74f 100644
--- a/include/editeng/numitem.hxx
+++ b/include/editeng/numitem.hxx
@@ -60,12 +60,12 @@ class EDITENG_DLLPUBLIC SvxNumberType
 public:
 explicit SvxNumberType(sal_Int16 nType = 
css::style::NumberingType::ARABIC);
 SvxNumberType(const SvxNumberType& rType);
-virtual ~SvxNumberType();
+~SvxNumberType();
 
 OUStringGetNumStr( sal_uLong nNo ) const;
 OUStringGetNumStr( sal_uLong nNo, const css::lang::Locale& rLocale 
) const;
 
-virtual voidSetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
+voidSetNumberingType(sal_Int16 nSet) {nNumType = nSet;}
 sal_Int16   GetNumberingType() const {return nNumType;}
 
 voidSetShowSymbol(bool bSet) {bShowSymbol = bSet;}
@@ -99,7 +99,6 @@ private:
 OUString   sSuffix;
 
 SvxAdjust   eNumAdjust;
-boolmbNumAdjustChanged;
 
 sal_uInt8   nInclUpperLevels;   // Take over numbers from the 
previous level.
 sal_uInt16  nStart; // Start of counting
@@ -155,8 +154,7 @@ public:
 booloperator==( const SvxNumberFormat&  ) const;
 booloperator!=( const SvxNumberFormat& rFmt) const 

[Libreoffice-commits] core.git: 2 commits - bridges/source compilerplugins/clang connectivity/source cppu/source include/uno lotuswordpro/source registry/source sal/osl sal/qa sfx2/source stoc/source

2015-01-28 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |4 
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |2 
 bridges/source/jni_uno/jni_java2uno.cxx  |2 
 bridges/source/jni_uno/jni_uno2java.cxx  |8 -
 compilerplugins/clang/cstylecast.cxx |   13 +-
 connectivity/source/drivers/odbc/OPreparedStatement.cxx  |2 
 connectivity/source/drivers/postgresql/pq_connection.cxx |4 
 cppu/source/helper/purpenv/helper_purpenv_Mapping.cxx|4 
 cppu/source/uno/copy.hxx |6 -
 cppu/source/uno/lbmap.cxx|2 
 cppu/source/uno/sequence.cxx |2 
 include/uno/current_context.hxx  |4 
 include/uno/mapping.hxx  |2 
 lotuswordpro/source/filter/lwptools.cxx  |8 -
 registry/source/keyimpl.cxx  |8 -
 registry/source/regimpl.cxx  |4 
 registry/source/registry.cxx |8 -
 registry/source/regkey.cxx   |   18 +--
 sal/osl/unx/module.cxx   |   80 ---
 sal/qa/osl/module/osl_Module.cxx |   21 +++
 sal/qa/osl/process/osl_process.cxx   |3 
 sfx2/source/appl/shutdowniconunx.cxx |2 
 stoc/source/invocation_adapterfactory/iafactory.cxx  |2 
 stoc/source/security/access_controller.cxx   |8 -
 vcl/generic/fontmanager/parseAFM.cxx |   22 ++--
 vcl/unx/generic/printer/cupsmgr.cxx  |2 
 26 files changed, 131 insertions(+), 110 deletions(-)

New commits:
commit 4e3da621fe26c2ad85258692c63a044d0541bd64
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Jan 28 13:50:17 2015 +0100

Some more loplugin:cstylecast clean-up

Change-Id: I132d22e2af3cf673c17d8964f690d48990834884

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
index 767a7fe..ef6cdec 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx
@@ -237,7 +237,7 @@ static typelib_TypeClass cpp2uno_call(
 uno_destructData( pUnoReturn, pReturnTypeDescr, 0 );
 }
 // complex return ptr is set to return reg
-*(void **)pRegisterReturn = pCppReturn;
+*reinterpret_castvoid **(pRegisterReturn) = pCppReturn;
 }
 if ( pReturnTypeDescr )
 {
@@ -348,7 +348,7 @@ typelib_TypeClass cpp_vtable_call(
 XInterface * pInterface = 0;
 
(*pCppI-getBridge()-getCppEnv()-getRegisteredInterface)
 ( pCppI-getBridge()-getCppEnv(),
-  (void **)pInterface,
+  reinterpret_castvoid **(pInterface),
   pCppI-getOid().pData,
   
reinterpret_casttypelib_InterfaceTypeDescription *( pTD ) );
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index 12cc933..fb286db 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -404,7 +404,7 @@ void unoInterfaceProxyDispatch(
 uno_Interface * pInterface = 0;
 (*pThis-getBridge()-getUnoEnv()-getRegisteredInterface)(
 pThis-getBridge()-getUnoEnv(),
-(void **)pInterface, pThis-oid.pData, 
reinterpret_casttypelib_InterfaceTypeDescription *(pTD) );
+reinterpret_castvoid **(pInterface), pThis-oid.pData, 
reinterpret_casttypelib_InterfaceTypeDescription *(pTD) );
 
 if (pInterface)
 {
diff --git a/bridges/source/jni_uno/jni_java2uno.cxx 
b/bridges/source/jni_uno/jni_java2uno.cxx
index b827a1e..5c992f1 100644
--- a/bridges/source/jni_uno/jni_java2uno.cxx
+++ b/bridges/source/jni_uno/jni_java2uno.cxx
@@ -186,7 +186,7 @@ jobject Bridge::call_uno(
 #endif
 (nParams * sizeof (void *)) +
 return_size + (nParams * sizeof (largest)) );
-void ** uno_args = (void **) mem;
+void ** uno_args = reinterpret_castvoid **(mem);
 void * uno_ret = return_size == 0 ? 0 : (mem + (nParams * sizeof (void 
*)));
 largest * uno_args_mem = reinterpret_castlargest *
 (mem + (nParams * sizeof (void *)) + return_size);
diff --git a/bridges/source/jni_uno/jni_uno2java.cxx 
b/bridges/source/jni_uno/jni_uno2java.cxx
index c36e8a1..a9798e3 100644
--- a/bridges/source/jni_uno/jni_uno2java.cxx
+++ b/bridges/source/jni_uno/jni_uno2java.cxx
@@ -489,7 +489,7 @@ uno_Interface * Bridge::map_to_uno(
 
 uno_Interface * pUnoI = 0;
   

[Libreoffice-commits] core.git: 2 commits - bridges/source sw/source

2014-11-21 Thread Michael Stahl
 bridges/source/cpp_uno/gcc3_aix_powerpc/cpp2uno.cxx  |   10 ++--
 bridges/source/cpp_uno/gcc3_aix_powerpc/except.cxx   |   13 +
 bridges/source/cpp_uno/gcc3_aix_powerpc/uno2cpp.cxx  |6 +-
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm.cxx  |   14 +++---
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx|4 -
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-i386.cxx |8 +--
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx   |   16 ++-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm.cxx  |8 +--
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx|6 +-
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-i386.cxx |   12 ++---
 bridges/source/cpp_uno/gcc3_linux_alpha/cpp2uno.cxx  |   12 ++---
 bridges/source/cpp_uno/gcc3_linux_alpha/except.cxx   |   14 ++
 bridges/source/cpp_uno/gcc3_linux_alpha/uno2cpp.cxx  |4 -
 bridges/source/cpp_uno/gcc3_linux_arm/cpp2uno.cxx|   17 +++
 bridges/source/cpp_uno/gcc3_linux_arm/except.cxx |   26 ---
 bridges/source/cpp_uno/gcc3_linux_arm/uno2cpp.cxx|9 +--
 bridges/source/cpp_uno/gcc3_linux_hppa/cpp2uno.cxx   |   14 ++
 bridges/source/cpp_uno/gcc3_linux_hppa/except.cxx|   24 +++---
 bridges/source/cpp_uno/gcc3_linux_hppa/uno2cpp.cxx   |8 +--
 bridges/source/cpp_uno/gcc3_linux_ia64/cpp2uno.cxx   |   10 ++--
 bridges/source/cpp_uno/gcc3_linux_ia64/except.cxx|   13 +
 bridges/source/cpp_uno/gcc3_linux_ia64/uno2cpp.cxx   |2 
 bridges/source/cpp_uno/gcc3_linux_intel/cpp2uno.cxx  |   15 +++---
 bridges/source/cpp_uno/gcc3_linux_intel/except.cxx   |   20 +++-
 bridges/source/cpp_uno/gcc3_linux_intel/uno2cpp.cxx  |7 +--
 bridges/source/cpp_uno/gcc3_linux_m68k/cpp2uno.cxx   |   14 ++
 bridges/source/cpp_uno/gcc3_linux_m68k/except.cxx|   24 +++---
 bridges/source/cpp_uno/gcc3_linux_m68k/uno2cpp.cxx   |8 +--
 bridges/source/cpp_uno/gcc3_linux_mips/cpp2uno.cxx   |   15 +++---
 bridges/source/cpp_uno/gcc3_linux_mips/except.cxx|   24 +++---
 bridges/source/cpp_uno/gcc3_linux_mips/uno2cpp.cxx   |6 +-
 bridges/source/cpp_uno/gcc3_linux_powerpc/cpp2uno.cxx|   14 +++---
 bridges/source/cpp_uno/gcc3_linux_powerpc/except.cxx |   14 ++
 bridges/source/cpp_uno/gcc3_linux_powerpc/uno2cpp.cxx|6 +-
 bridges/source/cpp_uno/gcc3_linux_powerpc64/cpp2uno.cxx  |   10 ++--
 bridges/source/cpp_uno/gcc3_linux_powerpc64/except.cxx   |   13 +
 bridges/source/cpp_uno/gcc3_linux_powerpc64/uno2cpp.cxx  |2 
 bridges/source/cpp_uno/gcc3_linux_s390/cpp2uno.cxx   |   12 ++---
 bridges/source/cpp_uno/gcc3_linux_s390/except.cxx|   14 ++
 bridges/source/cpp_uno/gcc3_linux_s390/uno2cpp.cxx   |6 +-
 bridges/source/cpp_uno/gcc3_linux_s390x/cpp2uno.cxx  |   10 ++--
 bridges/source/cpp_uno/gcc3_linux_s390x/except.cxx   |   14 ++
 bridges/source/cpp_uno/gcc3_linux_s390x/uno2cpp.cxx  |4 -
 bridges/source/cpp_uno/gcc3_linux_sparc/cpp2uno.cxx  |   17 +++
 bridges/source/cpp_uno/gcc3_linux_sparc/except.cxx   |   24 +++---
 bridges/source/cpp_uno/gcc3_linux_sparc/uno2cpp.cxx  |   14 +++---
 bridges/source/cpp_uno/gcc3_linux_x86-64/abi.cxx |   15 ++
 bridges/source/cpp_uno/gcc3_linux_x86-64/cpp2uno.cxx |9 +--
 bridges/source/cpp_uno/gcc3_linux_x86-64/except.cxx  |   19 ++--
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx |7 +--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/abi.cxx|   15 ++
 bridges/source/cpp_uno/gcc3_macosx_x86-64/cpp2uno.cxx|9 +--
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx |   20 +++-
 bridges/source/cpp_uno/gcc3_macosx_x86-64/uno2cpp.cxx|7 +--
 bridges/source/cpp_uno/gcc3_solaris_intel/cpp2uno.cxx|   14 +++---
 bridges/source/cpp_uno/gcc3_solaris_intel/except.cxx |   24 +++---
 bridges/source/cpp_uno/gcc3_solaris_intel/uno2cpp.cxx|   12 ++---
 bridges/source/cpp_uno/gcc3_solaris_sparc/cpp2uno.cxx|   17 +++
 bridges/source/cpp_uno/gcc3_solaris_sparc/except.cxx |   24 +++---
 bridges/source/cpp_uno/gcc3_solaris_sparc/uno2cpp.cxx|   14 +++---
 bridges/source/cpp_uno/mingw_intel/callvirtualmethod.cxx |7 +--
 bridges/source/cpp_uno/mingw_intel/cpp2uno.cxx   |   14 +++---
 bridges/source/cpp_uno/mingw_intel/except.cxx|   22 +++--
 bridges/source/cpp_uno/mingw_intel/uno2cpp.cxx   |6 +-
 bridges/source/cpp_uno/mingw_x86-64/abi.cxx  |   15 +++---
 bridges/source/cpp_uno/mingw_x86-64/cpp2uno.cxx  |8 +--
 bridges/source/cpp_uno/mingw_x86-64/except.cxx   |   22 +++--
 bridges/source/cpp_uno/mingw_x86-64/uno2cpp.cxx  |6 +-
 bridges/source/cpp_uno/msvc_win32_intel/cpp2uno.cxx  |   11 ++--
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx   |   29 +---
 

[Libreoffice-commits] core.git: 2 commits - bridges/source connectivity/com connectivity/qa extensions/qa forms/qa framework/qa icon-themes/oxygen icon-themes/tango nlpsolver/src nlpsolver/ThirdParty

2014-11-12 Thread Noel Grandin
 bridges/source/jni_uno/java/com/sun/star/bridges/jni_uno/JNI_proxy.java
   |5 +
 connectivity/com/sun/star/sdbcx/comp/hsqldb/StorageNativeOutputStream.java 
   |9 ---
 connectivity/qa/connectivity/tools/RowSet.java 
   |   13 ++--
 extensions/qa/integration/extensions/MethodHandler.java
   |   12 +---
 forms/qa/integration/forms/CellBinding.java
   |7 +-
 forms/qa/integration/forms/FormControlTest.java
   |5 -
 forms/qa/integration/forms/XMLFormSettings.java
   |5 -
 forms/qa/org/openoffice/xforms/XMLDocument.java
   |7 +-
 framework/qa/complex/framework/autosave/Protocol.java  
   |5 -
 framework/qa/complex/loadAllDocuments/CheckXComponentLoader.java   
   |   19 ++
 framework/qa/complex/loadAllDocuments/StreamSimulator.java 
   |   28 +-
 icon-themes/oxygen/cmd/lc_adddirect.png
   |binary
 icon-themes/tango/cmd/lc_showsinglepage.png
   |binary
 icon-themes/tango/cmd/lc_showsinglepage1.png   
   |binary
 icon-themes/tango/links.txt
   |1 
 
nlpsolver/ThirdParty/EvolutionarySolver/src/net/adaptivebox/deps/DEPSAgent.java 
  |7 --
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/BaseNLPSolver.java  
   |   14 +
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/DEPSSolverImpl.java 
   |   27 -
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/ResourceManager.java
   |   25 +++-
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/SCOSolverImpl.java  
   |   18 ++
 nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/BaseDialog.java 
   |6 --
 
nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
   |   11 ---
 odk/examples/DevelopersGuide/Charts/ListenAtCalcRangeInDraw.java   
   |5 -
 odk/examples/DevelopersGuide/Database/OpenQuery.java   
   |5 -
 odk/examples/DevelopersGuide/OfficeDev/DesktopEnvironment/DocumentView.java
   |6 --
 odk/examples/DevelopersGuide/OfficeDev/Number_Formats.java 
   |   10 +--
 
odk/examples/DevelopersGuide/ProfUNO/InterprocessConn/ConnectionAwareClient.java
  |4 -
 
odk/examples/DevelopersGuide/ScriptingFramework/ScriptSelector/ScriptSelector/ScriptSelector.java
 |3 -
 odk/examples/DevelopersGuide/Text/TextDocuments.java   
   |   14 +
 qadevOOo/runner/complexlib/ComplexTestCase.java
   |   19 ++
 qadevOOo/runner/convwatch/BorderRemover.java   
   |   10 +--
 qadevOOo/runner/convwatch/ImageHelper.java 
   |7 +-
 qadevOOo/runner/graphical/ImageHelper.java 
   |7 +-
 qadevOOo/runner/graphical/ParameterHelper.java 
   |8 +-
 qadevOOo/runner/helper/ConfigHelper.java   
   |8 --
 qadevOOo/runner/helper/StreamSimulator.java
   |   11 +--
 qadevOOo/runner/org/openoffice/Runner.java 
   |1 
 qadevOOo/runner/util/FrameDsc.java 
   |3 -
 qadevOOo/tests/java/ifc/frame/_XSynchronousFrameLoader.java
   |3 -
 qadevOOo/tests/java/ifc/i18n/_XCollator.java   
   |3 -
 qadevOOo/tests/java/ifc/i18n/_XTransliteration.java
   |3 -
 qadevOOo/tests/java/ifc/io/_XObjectInputStream.java
   |5 -
 qadevOOo/tests/java/ifc/ucb/_XCachedDynamicResultSetStubFactory.java   
   |3 -
 qadevOOo/tests/java/ifc/ui/dialogs/_XControlAccess.java
   |3 -
 qadevOOo/tests/java/mod/_dbaccess/ODatabaseSource.java 
   |6 --
 

[Libreoffice-commits] core.git: 2 commits - bridges/source external/nss

2014-08-13 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx |4 ++--
 external/nss/ExternalProject_nss.mk   |2 ++
 external/nss/nss-ios.patch|   11 +++
 3 files changed, 15 insertions(+), 2 deletions(-)

New commits:
commit 142d527a6be9d21631253477cf06c03f54657ef9
Author: Tor Lillqvist t...@collabora.com
Date:   Wed Aug 13 20:07:27 2014 +0300

Make NSS build also as 64-bit ARM code for iOS

Change-Id: I03cda6ca1886a3cfad87cc438282eeea8c2a5299

diff --git a/external/nss/ExternalProject_nss.mk 
b/external/nss/ExternalProject_nss.mk
index 3bf851b..9bff2c5 100644
--- a/external/nss/ExternalProject_nss.mk
+++ b/external/nss/ExternalProject_nss.mk
@@ -61,6 +61,8 @@ else # OS!=WNT
 $(call gb_ExternalProject_get_state_target,nss,build): $(call 
gb_ExternalProject_get_state_target,nss,configure) $(call 
gb_ExternalExecutable_get_dependencies,python)
$(call gb_ExternalProject_run,build,\
$(if $(filter FREEBSD LINUX MACOSX,$(OS)),$(if $(filter 
X86_64,$(CPUNAME)),USE_64=1)) \
+   $(if $(filter IOS,$(OS)),\
+   $(if $(filter arm64,$(CC)),USE_64=1)) \
$(if $(filter MACOSX,$(OS)),\
$(if $(filter-out 
POWERPC,$(CPUNAME)),MACOS_SDK_DIR=$(MACOSX_SDK_PATH)) \
$(if $(filter-out 
1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),NSS_USE_SYSTEM_SQLITE=1)) \
diff --git a/external/nss/nss-ios.patch b/external/nss/nss-ios.patch
index 8e883f9..0601573 100644
--- a/external/nss/nss-ios.patch
+++ b/external/nss/nss-ios.patch
@@ -77,6 +77,17 @@
  endif
  
  MKDEPEND_DIR= $(CORE_DEPTH)/coreconf/mkdepend
+--- a/a/nspr/pr/include/md/_darwin.h
 a/a/nspr/pr/include/md/_darwin.h
+@@ -26,6 +26,8 @@
+ #define _PR_SI_ARCHITECTURE ppc
+ #elif defined(__arm__)
+ #define _PR_SI_ARCHITECTURE arm
++#elif defined(__arm64__)
++#define _PR_SI_ARCHITECTURE arm64
+ #else
+ #error Unknown CPU architecture
+ #endif
 --- a/a/nspr/pr/src/Makefile.in
 +++ a/a/nspr/pr/src/Makefile.in
 @@ -180,7 +180,7 @@
commit 1f14417bb0418adcdb267632f064ccde151792af
Author: Tor Lillqvist t...@collabora.com
Date:   Wed Aug 13 20:05:52 2014 +0300

Clearly we should be moving 64 bit values here

Change-Id: Ide34abab9417b849ea58aafab386e13e67d240be

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
index 788b98e..6639814 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx
@@ -253,7 +253,7 @@ static void cpp_call(
 // push this
 void * pAdjustedThisPtr = reinterpret_cast void ** (pThis-getCppI())
 + aVtableSlot.offset;
-INSERT_INT32( pAdjustedThisPtr, nGPR, pGPR, pStack );
+INSERT_INT64( pAdjustedThisPtr, nGPR, pGPR, pStack );
 
 // stack space
 // args
@@ -339,7 +339,7 @@ static void cpp_call(
 // no longer needed
 TYPELIB_DANGER_RELEASE( pParamTypeDescr );
 }
-INSERT_INT32( (pCppArgs[nPos]), nGPR, pGPR, pStack );
+INSERT_INT64( (pCppArgs[nPos]), nGPR, pGPR, pStack );
 }
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source

2014-07-07 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx |   20 
++
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx |3 -
 bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx   |3 -
 3 files changed, 7 insertions(+), 19 deletions(-)

New commits:
commit 8a85f9f29f13805af449943990af8af8399ab7b5
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Jul 7 11:52:57 2014 +0200

Drop unnecessary nFPR parameter

...as passing (an upper bound on) the number of vector registers used in 
%al is
only required for variable-argument function calls, according to
http://www.x86-64.org/documentation/abi.pdf System V Application Binary
Interface: AMD64 Architecture Processor Supplement, Draft Version 0.99.6.

Unclear why this got added in f424e55b4e66ffbee5b34f45ef5ea18d77c4d15c
INTEGRATION: CWS sixtyfour11, maybe on the basis of doesn't hurt.

Change-Id: If6f8359d5bf6458274905d64adf82634bf90a24d

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index dba9bfe..6dae025 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -48,20 +48,14 @@
 void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
 typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
-sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR,
-sal_uInt32 nFPR)
+sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR)
 {
-// Should not happen, but...
-if ( nFPR  x86_64::MAX_SSE_REGS )
-nFPR = x86_64::MAX_SSE_REGS;
-
 // Work around Clang -fsanitize=address inline assembly requires more
 // registers than available error:
 struct Data {
 sal_uInt64 pMethod;
 sal_uInt64 * pGPR;
 double * pFPR;
-sal_uInt64 nFPR;
 // Return values:
 sal_uInt64 rax;
 sal_uInt64 rdx;
@@ -70,7 +64,6 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 } data;
 data.pGPR = pGPR;
 data.pFPR = pFPR;
-data.nFPR = nFPR;
 
 // Get pointer to method
 sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
@@ -113,14 +106,13 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 
 // Perform the call
 movq 0%0, %%r11\n\t
-movq 24%0, %%rax\n\t
 call *%%r11\n\t
 
 // Fill the return values
-movq   %%rax, 32%0\n\t
-movq   %%rdx, 40%0\n\t
-movsd %%xmm0, 48%0\n\t
-movsd %%xmm1, 56%0\n\t
+movq   %%rax, 24%0\n\t
+movq   %%rdx, 32%0\n\t
+movsd %%xmm0, 40%0\n\t
+movsd %%xmm1, 48%0\n\t
 :: o (data),
   m ( pCallStack ) // dummy input to prevent the compiler from 
optimizing the alloca out
 : rax, rdi, rsi, rdx, rcx, r8, r9, r10, r11,
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
index 162f9af..4a48692 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.hxx
@@ -31,8 +31,7 @@ namespace CPPU_CURRENT_NAMESPACE {
 void callVirtualMethod(
 void * pThis, sal_uInt32 nVtableIndex, void * pRegisterReturn,
 typelib_TypeDescriptionReference * pReturnTypeRef, bool bSimpleReturn,
-sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR,
-sal_uInt32 nFPR);
+sal_uInt64 *pStack, sal_uInt32 nStack, sal_uInt64 *pGPR, double * pFPR);
 
 }
 
diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
index dea6fef..33ffe8e 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx
@@ -232,8 +232,7 @@ static void cpp_call(
 pAdjustedThisPtr, aVtableSlot.index,
 pCppReturn, pReturnTypeRef, bSimpleReturn,
 pStackStart, ( pStack - pStackStart ),
-pGPR,
-pFPR, nFPR );
+pGPR, pFPR );
 } catch (const Exception ) {
 throw;
 } catch (const std::exception  e) {
commit aa04177e7c43d75bc87875a9d8ce2393d7263822
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon Jul 7 11:49:13 2014 +0200

Drop unused nGPR parameter

Change-Id: I60026ccc9c752389260a6b4e6255c53981eea4ba

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index 084d5e5..dba9bfe 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -48,14 +48,12 @@
 void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
   

[Libreoffice-commits] core.git: 2 commits - bridges/source sal/osl

2014-05-21 Thread Stephan Bergmann
 bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx |   65 
+-
 sal/osl/unx/thread.c|   17 +-
 2 files changed, 50 insertions(+), 32 deletions(-)

New commits:
commit 85dc388993beca806b5a7ec91c9c49172b3a781b
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed May 21 09:02:43 2014 +0200

Default OS X thread stack size too small for -fsanitize=address

...witnessed stack overflow in huge function
FunctionMapFactory::createFunctionMap__library_effects__allChildren in

workdir/UnpackedTarball/opencollada/COLLADASaxFrameworkLoader/src/generated14/
COLLADASaxFWLColladaParserAutoGen14PrivateFunctionMapFactory.cpp

Change-Id: I9451912043e282c8e06aff446cf3d1190f1de9cf

diff --git a/sal/osl/unx/thread.c b/sal/osl/unx/thread.c
index 0140936..5335dd6 100644
--- a/sal/osl/unx/thread.c
+++ b/sal/osl/unx/thread.c
@@ -22,6 +22,7 @@
 #if defined(OPENBSD)
 #include sched.h
 #endif
+#include config_options.h
 #include osl/diagnose.h
 #include osl/thread.h
 #include osl/nlsupport.h
@@ -251,8 +252,9 @@ static oslThread osl_thread_create_Impl (
 short nFlags)
 {
 Thread_Impl* pImpl;
-#if defined(OPENBSD)
+#if defined OPENBSD || (defined MACOSX  !ENABLE_RUNTIME_OPTIMIZATIONS)
 pthread_attr_t attr;
+size_t stacksize;
 #endif
 int nRet=0;
 
@@ -266,11 +268,16 @@ static oslThread osl_thread_create_Impl (
 
 pthread_mutex_lock ((pImpl-m_Lock));
 
-#if defined(OPENBSD)
+#if defined OPENBSD || (defined MACOSX  !ENABLE_RUNTIME_OPTIMIZATIONS)
 if (pthread_attr_init(attr) != 0)
 return (0);
 
-if (pthread_attr_setstacksize(attr, 262144) != 0) {
+#if defined OPENBSD
+stacksize = 262144;
+#else
+stacksize = 100 * PTHREAD_STACK_MIN;
+#endif
+if (pthread_attr_setstacksize(attr, stacksize) != 0) {
 pthread_attr_destroy(attr);
 return (0);
 }
@@ -278,7 +285,7 @@ static oslThread osl_thread_create_Impl (
 
 if ((nRet = pthread_create (
 (pImpl-m_hThread),
-#if defined(OPENBSD)
+#if defined OPENBSD || (defined MACOSX  !ENABLE_RUNTIME_OPTIMIZATIONS)
 attr,
 #else
 PTHREAD_ATTR_DEFAULT,
@@ -295,7 +302,7 @@ static oslThread osl_thread_create_Impl (
 return (0);
 }
 
-#if defined(OPENBSD)
+#if defined OPENBSD || (defined MACOSX  !ENABLE_RUNTIME_OPTIMIZATIONS)
 pthread_attr_destroy(attr);
 #endif
 
commit 00468b48e8678d819a8e34be8c1e256ce36c1396
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed May 21 08:55:48 2014 +0200

Work around Clang -fsanitize=address inline asm error

same as 08947735f9cc4b7bd69676c9dd4d1700e8e3b15b for gcc_linux_x86-64

Change-Id: I28d138dd13adc9a3e09d46befe69ac86ab1fffb6

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
index 3b6cd4a..971ca8a 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/callvirtualmethod.cxx
@@ -57,10 +57,27 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 if ( nGPR  x86_64::MAX_GPR_REGS )
 nGPR = x86_64::MAX_GPR_REGS;
 
+// Work around -fsanitize=address inline assembly requires more registers
+// than available error:
+struct Data {
+sal_uInt64 pMethod;
+sal_uInt64 * pGPR;
+double * pFPR;
+sal_uInt64 nFPR;
+// Return values:
+sal_uInt64 rax;
+sal_uInt64 rdx;
+double xmm0;
+double xmm1;
+} data;
+data.pGPR = pGPR;
+data.pFPR = pFPR;
+data.nFPR = nFPR;
+
 // Get pointer to method
 sal_uInt64 pMethod = *((sal_uInt64 *)pThis);
 pMethod += 8 * nVtableIndex;
-pMethod = *((sal_uInt64 *)pMethod);
+data.pMethod = *((sal_uInt64 *)pMethod);
 
 // Load parameters to stack, if necessary
 if ( nStack )
@@ -71,16 +88,10 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 std::memcpy( pCallStack, pStack, nStackBytes );
 }
 
-// Return values
-sal_uInt64 rax;
-sal_uInt64 rdx;
-double xmm0;
-double xmm1;
-
 asm volatile (
 
 // Fill the xmm registers
-movq %6, %%rax\n\t
+movq 16%0, %%rax\n\t
 
 movsd   (%%rax), %%xmm0\n\t
 movsd  8(%%rax), %%xmm1\n\t
@@ -92,7 +103,7 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 movsd 56(%%rax), %%xmm7\n\t
 
 // Fill the general purpose registers
-movq %5, %%rax\n\t
+movq 8%0, %%rax\n\t
 
 movq(%%rax), %%rdi\n\t
 movq   8(%%rax), %%rsi\n\t
@@ -102,45 +113,45 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 movq  40(%%rax), %%r9\n\t
 
 // Perform the call
-movq %4, %%r11\n\t
-movq %7, %%rax\n\t
+movq 0%0, %%r11\n\t
+movq 24%0, %%rax\n\t
 call *%%r11\n\t
 
 // Fill the return values
-movq   %%rax, %0\n\t
-movq   

[Libreoffice-commits] core.git: 2 commits - bridges/source idlc/source

2014-05-13 Thread Stephan Bergmann
 bridges/source/cpp_uno/shared/vtablefactory.cxx |4 
 idlc/source/idlccompile.cxx |4 
 2 files changed, 8 deletions(-)

New commits:
commit 0c493207723516586882e53c532dc977a1deec32
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue May 13 10:51:04 2014 +0200

Revert CID#705985 ensure umask for mkstemp

This reverts commit 5f5a981dd6df406b7bbddd88fa0b701b5a8d2246.  Coverity 
warning
about mkstemp without umask appears to be bogus (cf.
https://communities.coverity.com/message/6516 Why are uses of mkstemp
'without securely setting umask first' being flagged?) and calling umask is 
not
MT-safe, see fdo#60338 FILESAVE: Saved files have incorrect permissions on
linux.

diff --git a/idlc/source/idlccompile.cxx b/idlc/source/idlccompile.cxx
index bbd080f..c88cac7 100644
--- a/idlc/source/idlccompile.cxx
+++ b/idlc/source/idlccompile.cxx
@@ -38,8 +38,6 @@
 #else
 #include wait.h
 #endif
-#include sys/types.h
-#include sys/stat.h
 #endif
 
 #include string.h
@@ -156,9 +154,7 @@ OString makeTempName(const OString prefix)
 strncat(tmpFilePattern, XX, 
sizeof(tmpFilePattern)-1-strlen(tmpFilePattern));
 
 #ifdef SAL_UNX
-mode_t nOrigMode = umask(S_IRWXG | S_IRWXO);
 int nDescriptor = mkstemp(tmpFilePattern);
-umask(nOrigMode);
 if( -1 == nDescriptor )
 {
 fprintf(stderr, idlc: mkstemp(\%s\) failed: %s\n, tmpFilePattern, 
strerror(errno));
commit 96b129052e280e094b6a150b185f9e8285cecca4
Author: Stephan Bergmann sberg...@redhat.com
Date:   Tue May 13 10:46:00 2014 +0200

Revert CID#705982 ensure umask for mkstemp

This reverts commit 9ab99483808bad973363f1f27bb548c8628ace1d.  Coverity 
warning
about mkstemp without umask appears to be bogus (cf.
https://communities.coverity.com/message/6516 Why are uses of mkstemp
'without securely setting umask first' being flagged?) and calling umask is 
not
MT-safe, see fdo#60338 FILESAVE: Saved files have incorrect permissions on
linux.

diff --git a/bridges/source/cpp_uno/shared/vtablefactory.cxx 
b/bridges/source/cpp_uno/shared/vtablefactory.cxx
index f6e9e7c..2589f64 100644
--- a/bridges/source/cpp_uno/shared/vtablefactory.cxx
+++ b/bridges/source/cpp_uno/shared/vtablefactory.cxx
@@ -60,8 +60,6 @@
 
 #if defined USE_DOUBLE_MMAP
 #include fcntl.h
-#include sys/types.h
-#include sys/stat.h
 #endif
 
 using bridges::cpp_uno::shared::VtableFactory;
@@ -241,7 +239,6 @@ bool VtableFactory::createBlock(Block block, sal_Int32 
slotCount) const
 if (aSecurity.getHomeDir(strURLDirectory))
 osl::File::getSystemPathFromFileURL(strURLDirectory, strDirectory);
 
-mode_t nOrigMode = umask(S_IRWXG | S_IRWXO);
 for (int i = strDirectory.isEmpty() ? 1 : 0; i  2; ++i)
 {
 if (strDirectory.isEmpty())
@@ -293,7 +290,6 @@ bool VtableFactory::createBlock(Block block, sal_Int32 
slotCount) const
 
 strDirectory = OUString();
 }
-umask(nOrigMode);
 if (!block.start || !block.exec || block.fd == -1)
 {
//Fall back to non-doublemmaped allocation
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source

2013-12-26 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/except.cxx |6 ++
 1 file changed, 6 insertions(+)

New commits:
commit 95d5922c0290ecd9de17183a95c068592a2c5a4f
Author: Tor Lillqvist t...@collabora.com
Date:   Thu Dec 26 14:20:05 2013 +0200

Add static assertion that our Fake_type_info is the same size as the real 
one

Change-Id: Id8490bb6373d85be2c529a005be55295c530febb

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index e431590..22026cc 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -52,6 +52,9 @@ struct Fake_type_info {
 char const * name;
 };
 
+BOOST_STATIC_ASSERT(
+sizeof (Fake_type_info) == sizeof (std::type_info));
+
 struct Fake_class_type_info: Fake_type_info {};
 
 #if defined(MACOSX)  MACOSX_SDK_VERSION  1070
commit 96af0825ab0d3d36df25a3983f9f422e987cb572
Author: Tor Lillqvist t...@collabora.com
Date:   Thu Dec 26 14:17:54 2013 +0200

Need the _LIBCPP_NONUNIQUE_RTTI_BIT here, too

Doesn't help though, throwing exceptions using __cxa_throw() and our
hand-crafted type_infos still doesn't work on arm64.

Change-Id: If6099e8696e6232c4b6d4bacd654d28419538e0f

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
index 71171ff..e431590 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/except.cxx
@@ -106,6 +106,9 @@ std::type_info * createFake_si_class_type_info(
 Fake_si_class_type_info * fake
 = reinterpret_castFake_si_class_type_info *(buf);
 fake-name = name;
+#ifdef _LIBCPP_NONUNIQUE_RTTI_BIT
+*(uintptr_t*)(fake-name) |= _LIBCPP_NONUNIQUE_RTTI_BIT;
+#endif
 fake-base = base;
 return reinterpret_caststd::type_info *(
 static_castFake_type_info *(fake));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source

2013-12-22 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx|  189 +++
 bridges/source/cpp_uno/gcc3_ios_arm/generate-snippets.pl |   12 
 bridges/source/cpp_uno/gcc3_ios_arm/helper.s |   16 +
 bridges/source/cpp_uno/gcc3_ios_arm/share.hxx|9 
 bridges/source/cpp_uno/gcc3_ios_arm/uno2cpp-arm64.cxx|2 
 5 files changed, 131 insertions(+), 97 deletions(-)

New commits:
commit a1a76eface98e1050fd0df1a6934e4d3a3fae5b2
Author: Tor Lillqvist t...@collabora.com
Date:   Sun Dec 22 10:49:21 2013 +0200

Fix build break for (32-bit) arm

Change-Id: I21c81aa1791cab8ac510c87b4a78ad1367fe8b78

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
index c719aa2..0a0a4fb 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/share.hxx
@@ -47,18 +47,21 @@ namespace CPPU_CURRENT_NAMESPACE
 
 namespace arm
 {
-enum armlimits {
 #if defined(__arm)
+enum armlimits {
 MAX_GPR_REGS = 4,
 MAX_FPR_REGS = 8
+};
+bool return_in_hidden_param( typelib_TypeDescriptionReference *pTypeRef );
 #elif defined(__arm64)
+enum armlimits {
 MAX_GPR_REGS = 8,
 MAX_FPR_REGS = 8
+};
+bool return_in_x8( typelib_TypeDescriptionReference *pTypeRef );
 #else
 #error wtf
 #endif
-};
-bool return_in_x8( typelib_TypeDescriptionReference *pTypeRef );
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 77f1f2209cfecc0af2d1e1db460b2614068748da
Author: Tor Lillqvist t...@collabora.com
Date:   Sun Dec 22 02:29:48 2013 +0200

iOS arm64 C++/UNO bridge WIP

Change-Id: I786cc64fc814c755ba215898026365af26b56205

diff --git a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx 
b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
index 1b68c1e..a82628a 100644
--- a/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
+++ b/bridges/source/cpp_uno/gcc3_ios_arm/cpp2uno-arm64.cxx
@@ -56,9 +56,14 @@ namespace
 void ** pCallStack,
 sal_Int64 * pRegisterReturn /* space for register return */ )
 {
-// pCallStack: x8, ret, [return ptr], this, params
-char * pTopStack = (char *)(pCallStack + 0);
-char * pCppStack = pTopStack;
+// pCallStack: x8, lr, d0..d7, x0..x7, rest of params originally on 
stack
+char *pTopStack = (char *)pCallStack;
+char *pFloatRegs = pTopStack + 2;
+char *pGPRegs =  pTopStack + (2+8)*8;
+char *pStackedArgs = pTopStack + (2+8+8)*8;
+
+int nGPR = 0;
+int nFPR = 0;
 
 // return
 typelib_TypeDescription * pReturnTypeDescr = 0;
@@ -73,10 +78,9 @@ namespace
 {
 if (!arm::return_in_x8(pReturnTypeRef))
 pUnoReturn = pRegisterReturn; // direct way for simple types
-else // complex return via ptr (pCppReturn)
+else // complex return via x8
 {
-pCppReturn = *(void **)pCppStack;
-pCppStack += 16;
+pCppReturn = pCallStack[0];
 
 pUnoReturn = (bridges::cpp_uno::shared::relatesToInterfaceType(
 pReturnTypeDescr )
@@ -84,8 +88,10 @@ namespace
 : pCppReturn); // direct way
 }
 }
-// pop this
-pCppStack += sizeof( void* );
+
+// Skip 'this'
+pGPRegs += 8;
+nGPR++;
 
 // Parameters
 void ** pUnoArgs = (void **)alloca( sizeof(void *) * nParams );
@@ -109,52 +115,67 @@ namespace
 if (!rParam.bOut 
 bridges::cpp_uno::shared::isSimpleType( pParamTypeDescr ))
 {
-#ifdef __ARM_EABI__
-switch (pParamTypeDescr-eTypeClass)
+if (nFPR  8  (pParamTypeDescr-eTypeClass == 
typelib_TypeClass_FLOAT ||
+ pParamTypeDescr-eTypeClass == 
typelib_TypeClass_DOUBLE))
 {
-case typelib_TypeClass_HYPER:
-case typelib_TypeClass_UNSIGNED_HYPER:
-#ifndef __ARM_PCS_VFP
-case typelib_TypeClass_DOUBLE:
-#endif
-if ((pCppStack - pTopStack) % 8) 
pCppStack+=sizeof(sal_Int32); //align to 8
-break;
-default:
-break;
+pCppArgs[nPos] = pUnoArgs[nPos] = pFloatRegs;
+pFloatRegs += 8;
+nFPR++;
 }
-#endif
-
-// For armhf we get the floating point arguments from a different area of the 
stack
-#ifdef __ARM_PCS_VFP
-if (pParamTypeDescr-eTypeClass == typelib_TypeClass_FLOAT)
+else if (pParamTypeDescr-eTypeClass == 
typelib_TypeClass_FLOAT)
 {
-pCppArgs[nPos] =  pUnoArgs[nPos] = pFloatArgs;
-pFloatArgs += sizeof(float);
-} else
-if 

[Libreoffice-commits] core.git: 2 commits - bridges/source include/comphelper

2013-05-29 Thread Herbert Dürr
 bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx |6 ++--
 include/comphelper/namedvaluecollection.hxx|   14 
+-
 2 files changed, 11 insertions(+), 9 deletions(-)

New commits:
commit c759d349f235d74508c2f8af4e85cc313897a361
Author: Herbert Dürr h...@apache.org
Date:   Tue Apr 30 11:57:36 2013 +

optimization fix to UNO bridge's callVirtualMethod() for generic x86_64

if the pCallStack variable is optimized out then any assumptions of the
method's inlined assembler about stack layout collapse. Adding a pseudo
dependency to the pCallStack variable solves that problem

(cherry picked from commit 254359b9ed96152091b8f7a74a3442cf6c553e04)

Conflicts:
bridges/source/cpp_uno/gcc3_freebsd_x86-64/uno2cpp.cxx
bridges/source/cpp_uno/gcc3_linux_x86-64/uno2cpp.cxx

Change-Id: I5ba7713c2630bb3ecc4343632e796c38541bcd0e

diff --git a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx 
b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
index 3b6cd4a..47b8f13 100644
--- a/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
+++ b/bridges/source/cpp_uno/gcc3_linux_x86-64/callvirtualmethod.cxx
@@ -63,11 +63,12 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 pMethod = *((sal_uInt64 *)pMethod);
 
 // Load parameters to stack, if necessary
+sal_uInt64* pCallStack = NULL;
 if ( nStack )
 {
 // 16-bytes aligned
 sal_uInt32 nStackBytes = ( ( nStack + 1 )  1 ) * 16;
-sal_uInt64 *pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes 
);
+pCallStack = (sal_uInt64 *) __builtin_alloca( nStackBytes );
 std::memcpy( pCallStack, pStack, nStackBytes );
 }
 
@@ -112,7 +113,8 @@ void CPPU_CURRENT_NAMESPACE::callVirtualMethod(
 movsd %%xmm0, %2\n\t
 movsd %%xmm1, %3\n\t
 : =m ( rax ), =m ( rdx ), =m ( xmm0 ), =m ( xmm1 )
-: m ( pMethod ), m ( pGPR ), m ( pFPR ), m ( nFPR )
+: m ( pMethod ), m ( pGPR ), m ( pFPR ), m ( nFPR ),
+  m ( pCallStack ) // dummy input to prevent the compiler from 
optimizing the alloca out
 : rax, rdi, rsi, rdx, rcx, r8, r9, r10, r11,
   xmm0, xmm1, xmm2, xmm3, xmm4, xmm5, xmm6, xmm7,
   xmm8, xmm9, xmm10, xmm11, xmm12, xmm13, xmm14, xmm15
commit 6526fda99f9133736906f326dde5cf48f967fcee
Author: Herbert Dürr h...@apache.org
Date:   Tue May 28 09:52:00 2013 +

Related: #i122378# avoid non-iterator bound std::transform()

in some build environments the use of std::transform() with plain pointers 
as
input iterators results in many warnings about how unsafe such a construct 
is.
The warnings could be suppressed e.g. on MSVC with the 
SCL_SECURE_NO_WARNINGS
define. Open coding the construct makes it cleaner and more debugable 
though.
(cherry picked from commit a599e5242751057537c3de6eb58ceff2a173580e)

Conflicts:
comphelper/inc/comphelper/namedvaluecollection.hxx

Change-Id: I3233116bfb862f6cda038541ffecac492623611c

diff --git a/include/comphelper/namedvaluecollection.hxx 
b/include/comphelper/namedvaluecollection.hxx
index 93b53dd..26b2760 100644
--- a/include/comphelper/namedvaluecollection.hxx
+++ b/include/comphelper/namedvaluecollection.hxx
@@ -356,13 +356,13 @@ namespace comphelper
 ::com::sun::star::uno::Sequence VALUE_TYPE  aValues;
 *this = aValues;
 ::com::sun::star::uno::Sequence ::com::sun::star::uno::Any  
aWrappedValues( aValues.getLength() );
-::com::sun::star::uno::Any (* const makeAny)(const VALUE_TYPE) = 
::com::sun::star::uno::makeAny VALUE_TYPE ;
-::std::transform(
-aValues.getConstArray(),
-aValues.getConstArray() + aValues.getLength(),
-aWrappedValues.getArray(),
-makeAny
-);
+
+::com::sun::star::uno::Any* pO = aWrappedValues.getArray();
+const VALUE_TYPE* pV = aValues.getConstArray();
+const sal_Int32 nLen = aValues.getLength();
+for( sal_Int32 i = 0; i  nLen; ++i )
+*(pO++) = ::com::sun::star::uno::makeAnyVALUE_TYPE( *(pV++) 
);
+
 return aWrappedValues;
 }
 };
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: 2 commits - bridges/source config_host.mk.in configure.ac

2013-05-28 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx |9 
 config_host.mk.in|1 
 configure.ac |   38 ++-
 3 files changed, 46 insertions(+), 2 deletions(-)

New commits:
commit b0a1666f756aa5f5315366eca9d7d02ddd55d2b7
Author: Tor Lillqvist t...@iki.fi
Date:   Tue May 28 08:51:01 2013 +0300

Bypass dynamic type_info generation for now when using libc++

The type_info crack is even harder in the libc++ (with Clang, on OS X)
case, sigh. Punt for now and let's see what happens...

Change-Id: I17c3a4d9d933acfbf554649c9ec8b6fb5213f2f0

diff --git a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
index 3147d6d..62b0cb1 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_x86-64/except.cxx
@@ -54,6 +54,8 @@ using namespace ::__cxxabiv1;
 namespace CPPU_CURRENT_NAMESPACE
 {
 
+#ifndef _LIBCPP_VERSION
+
 #if MACOSX_SDK_VERSION = 1070
 
 // MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
@@ -103,6 +105,8 @@ std::type_info * create_FAKE_si_class_type_info(
 
 #endif
 
+#endif
+
 
//==
 static OUString toUNOname( char const * p ) SAL_THROW(())
 {
@@ -217,6 +221,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 t_rtti_map::const_iterator iFind2( m_generatedRttis.find( unoName 
) );
 if (iFind2 == m_generatedRttis.end())
 {
+#ifndef _LIBCPP_VERSION
 // we must generate it !
 // symbol and rtti-name is nearly identical,
 // the symbol is prefixed with _ZTI
@@ -250,6 +255,10 @@ 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 ) ) );
 SAL_WARN_IF( !insertion.second, bridges, key   unoName 
  already in generated rtti map );
+#else
+OSL_FAIL(Cannot generate type_infos with libc++, sigh);
+return NULL;
+#endif
 }
 else // taking already generated rtti
 {
commit f5aa04485c86a5753bd7af057b86336efe089fae
Author: Tor Lillqvist t...@iki.fi
Date:   Wed Apr 17 23:30:48 2013 +0300

Enable optionally using libc++ on OS X (when targeting 10.7 or later)

Experimental work in progress.

Change-Id: I92663e07c7322037182141603f72c6d442da6ee9

diff --git a/config_host.mk.in b/config_host.mk.in
index 76df377..a3770a5 100644
--- a/config_host.mk.in
+++ b/config_host.mk.in
@@ -63,6 +63,7 @@ export COMMONS_LOGGING_JAR=@COMMONS_LOGGING_JAR@
 export COMPATH=@COMPATH@
 export COMPILER_PLUGINS=@COMPILER_PLUGINS@
 export COM_GCC_IS_CLANG=@COM_GCC_IS_CLANG@
+export CPP_LIBRARY=@CPP_LIBRARY@
 export CPPUNIT_CFLAGS=$(gb_SPACE)@CPPUNIT_CFLAGS@
 export CPPUNIT_LIBS=$(gb_SPACE)@CPPUNIT_LIBS@
 export CPU=@CPU@
diff --git a/configure.ac b/configure.ac
index 4f422ee..c5aeffb 100644
--- a/configure.ac
+++ b/configure.ac
@@ -367,6 +367,10 @@ DLLPOST=.so
 
 LINKFLAGSNOUNDEFS=-Wl,-z,defs
 
+# Most platforms use GNU libstdc++
+CPP_LIBRARY=GLIBCXX
+AC_SUBST(CPP_LIBRARY)
+
 case $host_os in
 
 solaris*)
@@ -1127,6 +1131,13 @@ AC_ARG_WITH(macosx-bundle-identifier,
  org.libreoffice.script (script, huh?).]),
 ,with_macosx_bundle_identifier=org.libreoffice.script)
 
+AC_ARG_ENABLE(libc++,
+AS_HELP_STRING([--enable-libc++],
+[Use the libc++ C++ library instead of GNU libstdc++ on OS X. Only 
effective
+ if --with-macosx-version-min-required is 10.7 or later. Experimental 
work in
+ progress, very likely breaks something, don't use unless you plan to 
fix that.]),
+,)
+
 AC_ARG_ENABLE(ios-simulator,
 AS_HELP_STRING([--enable-ios-simulator],
 [Build for the iOS Simulator, not iOS device.]),
@@ -2537,12 +2548,26 @@ if test $_os = Darwin; then
 fi
 ;;
 10.7|10.8)
+if test $enable_libc__ = yes -a 
$with_macosx_version_min_required != 10.6; then
+# Use libc++ instead of libstdc++ when possible
+# and also compile as C++11
+stdlib=-std=c++11 -stdlib=libc++
+CPP_LIBRARY=LIBCPP
+fi
 CC=`xcrun -find clang` $bitness 
-mmacosx-version-min=$with_macosx_version_min_required -isysroot 
$MACOSX_SDK_PATH
-CXX=`xcrun -find clang++` $bitness 
-mmacosx-version-min=$with_macosx_version_min_required -isysroot 
$MACOSX_SDK_PATH
+CXX=`xcrun -find clang++` $bitness $stdlib 
-mmacosx-version-min=$with_macosx_version_min_required -isysroot 
$MACOSX_SDK_PATH
 XCRUN=xcrun
 ;;
 esac
 AC_MSG_RESULT([$CC and $CXX])
+

[Libreoffice-commits] core.git: 2 commits - bridges/source svx/source

2013-05-28 Thread Tor Lillqvist
 bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx |9 +
 svx/source/svdraw/svdedxv.cxx   |2 +-
 2 files changed, 10 insertions(+), 1 deletion(-)

New commits:
commit 53b552518e1feab4a5cc25bb92ea26dc9b2c7e4f
Author: Tor Lillqvist t...@iki.fi
Date:   Tue May 28 19:17:52 2013 +0300

WaE: illegal character encoding in string literal

Change-Id: Ic1a85b48363b2596ebfe225dc76332068229cb96

diff --git a/svx/source/svdraw/svdedxv.cxx b/svx/source/svdraw/svdedxv.cxx
index 6d39a5b..273480f 100644
--- a/svx/source/svdraw/svdedxv.cxx
+++ b/svx/source/svdraw/svdedxv.cxx
@@ -877,7 +877,7 @@ SdrEndTextEditKind SdrObjEditView::SdrEndTextEdit(sal_Bool 
bDontDeleteReally)
 }
 else
 {
-OSL_ENSURE(false, ´Got UndoManager back in SdrEndTextEdit 
which is NOT the expected document UndoManager (!));
+OSL_ENSURE(false, Got UndoManager back in SdrEndTextEdit 
which is NOT the expected document UndoManager (!));
 delete pOriginal;
 }
 }
commit c95999782ee393a121ab36d2a46ba21940b40708
Author: Tor Lillqvist t...@iki.fi
Date:   Tue May 28 18:07:48 2013 +0200

Bypass the type_info generation when using libc++ for gcc3_macosx_intel, too

(It causes linker errors, type_info destructor not found and a few
others. Possibly this is a bug in Apple's libc++abi?)

Change-Id: I50bc97c8e061ff47d4ff16f31d37cfe3b4f5a010

diff --git a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx 
b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
index f00c0ed..f51cb75 100644
--- a/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
+++ b/bridges/source/cpp_uno/gcc3_macosx_intel/except.cxx
@@ -51,6 +51,8 @@ using namespace ::__cxxabiv1;
 namespace CPPU_CURRENT_NAMESPACE
 {
 
+#ifndef _LIBCPP_VERSION
+
 #if MACOSX_SDK_VERSION = 1070
 
 // MacOSX10.4u.sdk/usr/include/c++/4.0.0/cxxabi.h defined
@@ -100,6 +102,8 @@ std::type_info * create_FAKE_si_class_type_info(
 
 #endif
 
+#endif
+
 void dummy_can_throw_anything( char const * )
 {
 }
@@ -212,6 +216,7 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 t_rtti_map::const_iterator iFind2( m_generatedRttis.find( unoName 
) );
 if (iFind2 == m_generatedRttis.end())
 {
+#ifndef _LIBCPP_VERSION
 // we must generate it !
 // symbol and rtti-name is nearly identical,
 // the symbol is prefixed with _ZTI
@@ -247,6 +252,10 @@ type_info * RTTI::getRTTI( typelib_CompoundTypeDescription 
*pTypeDescr ) SAL_THR
 SAL_WARN_IF( !insertion.second,
  bridges,
  inserting new generated rtti failed );
+#else
+OSL_FAIL(Cannot generate type_infos with libc++, sigh);
+return NULL;
+#endif
 }
 else // taking already generated rtti
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits