[Libreoffice-commits] core.git: binaryurp/source

2023-09-13 Thread Noel Grandin (via logerrit)
 binaryurp/source/bridge.cxx |2 --
 1 file changed, 2 deletions(-)

New commits:
commit 5f3031b33a16cf11045006616b01dd89d6d59a32
Author: Noel Grandin 
AuthorDate: Wed Sep 13 11:01:17 2023 +0200
Commit: Noel Grandin 
CommitDate: Wed Sep 13 12:29:13 2023 +0200

Revert "loplugin:unodispose in binaryurp"

This reverts commit 3d9f9b1b299251c5c28d74e951b4447193ad7ade.

Reason for revert: comment from sberg:

I'm not convinced that a general rule of "clear all references in 
dispose()" is a good idea.  For example, in this class, access to connection_ 
and provider_ is not guarded against MT-races, on the basis that those two are 
never modified post construction.  That is broken now.  Also, e.g. 
Bridge::getDescription dereferences connection_, and benignly used to work fine 
even when called on a disposed instance.  Now, it causes UB.

Change-Id: I6039d5b1488146f09439312800ceb1de3cfcf0ba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156878
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index f88fc10ca6ed..523bbbf14ac5 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -920,8 +920,6 @@ void Bridge::dispose() {
 // from within an incoming or outgoing remote call, as passive_.wait() 
would
 // otherwise deadlock:
 passive_.wait();
-connection_.clear();
-provider_.clear();
 }
 
 void Bridge::addEventListener(


[Libreoffice-commits] core.git: binaryurp/source

2023-05-28 Thread Mike Kaganski (via logerrit)
 binaryurp/source/bridge.cxx|   16 
 binaryurp/source/bridgefactory.cxx |   10 +-
 2 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit c19c775c0b54e797b4b7a30f9acf6a34efeaacca
Author: Mike Kaganski 
AuthorDate: Sun Apr 23 20:13:01 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sun May 28 09:06:11 2023 +0200

Use getXWeak in binaryurp

Change-Id: If1891fc180126aa5d5ac92772cbca9b485619f46
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150836
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 7d73d6dd7b00..523bbbf14ac5 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -332,7 +332,7 @@ void Bridge::terminate(bool final) {
 try {
 listener->disposing(
 css::lang::EventObject(
-static_cast< cppu::OWeakObject * >(this)));
+getXWeak()));
 } catch (const css::uno::RuntimeException & e) {
 SAL_WARN("binaryurp", "caught " << e);
 }
@@ -612,7 +612,7 @@ bool Bridge::makeCall(
 {
 throw css::lang::DisposedException(
 "Binary URP bridge disposed during call",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 *returnValue = resp->returnValue;
 if (!resp->exception) {
@@ -675,7 +675,7 @@ void Bridge::handleRequestChangeReply(
 if (n != exp) {
 throw css::uno::RuntimeException(
 "URP: requestChange reply with unexpected return value received",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 decrementCalls();
 switch (exp) {
@@ -758,7 +758,7 @@ void Bridge::handleRequestChangeRequest(
 default:
 throw css::uno::RuntimeException(
 "URP: unexpected requestChange request received",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 }
 
@@ -809,7 +809,7 @@ void Bridge::handleCommitChangeRequest(
 default:
 throw css::uno::RuntimeException(
 "URP: unexpected commitChange request received",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 }
 
@@ -854,7 +854,7 @@ css::uno::Reference< css::uno::XInterface > 
Bridge::getInstance(
 if (sInstanceName.isEmpty()) {
 throw css::uno::RuntimeException(
 "XBridge::getInstance sInstanceName must be non-empty",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 for (sal_Int32 i = 0; i != sInstanceName.getLength(); ++i) {
 if (sInstanceName[i] > 0x7F) {
@@ -935,7 +935,7 @@ void Bridge::addEventListener(
 }
 }
 xListener->disposing(
-css::lang::EventObject(static_cast< cppu::OWeakObject * >(this)));
+css::lang::EventObject(getXWeak()));
 }
 
 void Bridge::removeEventListener(
@@ -1045,7 +1045,7 @@ void Bridge::checkDisposed() {
 if (state_ != STATE_STARTED) {
 throw css::lang::DisposedException(
 "Binary URP bridge already disposed",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 }
 
diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index a2dd1fa97fba..835c264a9d92 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -93,17 +93,17 @@ css::uno::Reference< css::bridge::XBridge > 
BridgeFactory::createBridge(
 if (rBHelper.bDisposed) {
 throw css::lang::DisposedException(
 "BridgeFactory disposed",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 if (named_.find(sName) != named_.end()) {
 throw css::bridge::BridgeExistsException(
-sName, static_cast< cppu::OWeakObject * >(this));
+sName, getXWeak());
 }
 if (sProtocol != "urp" || !aConnection.is()) {
 throw css::lang::IllegalArgumentException(
 ("BridgeFactory::createBridge: sProtocol != urp ||"
  " aConnection == null"),
-static_cast< cppu::OWeakObject * >(this), -1);
+getXWeak(), -1);
 }
 b.set(new Bridge(this, sName, aConnection, anInstanceProvider));
 if (sName.isEmpty()) {
@@ -131,13 +131,13 @@ BridgeFactory::getExistingBridges() {
 if (unnamed_.size() > SAL_MAX_INT32) {
 throw css::uno::RuntimeException(
 "BridgeFactory::getExistingBridges: too many",
-static_cast< cppu::OWeakObject * >(this));
+getXWeak());
 }
 sal_Int32 n = static_cast< sal_Int32 >(unnamed_.size());
 if (named_.size() > o3tl::make_unsigned(SAL_MAX_INT32 - n)) {
 throw css::uno::RuntimeException(
 

[Libreoffice-commits] core.git: binaryurp/source

2022-08-27 Thread Caolán McNamara (via logerrit)
 binaryurp/source/reader.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 341d1462c23214a63293f62c6d5d42a27fd8e6fc
Author: Caolán McNamara 
AuthorDate: Sat Aug 27 10:49:40 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 27 13:13:29 2022 +0200

cid#1500596 silence Resource leak

Change-Id: I4600c9cd0f7fdea698750ca416fc7f46dcebf23c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138928
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 5f8518742147..393d8312e43a 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -447,6 +447,7 @@ void Reader::readReplyMessage(Unmarshal & unmarshal, 
sal_uInt8 flags1) {
 uno_threadpool_putJob(
 bridge_->getThreadPool(), tid.getHandle(), resp.get(), nullptr,
 false);
+// coverity[leaked_storage] - "Bridge::makeCall" destroys resp 
when received
 resp.release();
 break;
 }


[Libreoffice-commits] core.git: binaryurp/source

2022-08-27 Thread Caolán McNamara (via logerrit)
 binaryurp/source/reader.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit ea892cc0ea96f94c5a51227b897694f18b2b785b
Author: Caolán McNamara 
AuthorDate: Sat Aug 27 10:39:26 2022 +0100
Commit: Caolán McNamara 
CommitDate: Sat Aug 27 12:47:58 2022 +0200

cid#1500523 silence Resource leak

Change-Id: I9c2d026cb71615ac3121f47e47a6b0b163e820f5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/138925
Tested-by: Jenkins
Reviewed-by: Caolán McNamara 

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index cbd18f1d8252..5f8518742147 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -338,6 +338,7 @@ void Reader::readMessage(Unmarshal & unmarshal) {
 uno_threadpool_putJob(
 bridge_->getThreadPool(), tid.getHandle(), req.get(), ,
 !synchronous);
+// coverity[leaked_storage] - "request" destroys req when executed
 req.release();
 }
 }


[Libreoffice-commits] core.git: binaryurp/source

2022-06-16 Thread Noel Grandin (via logerrit)
 binaryurp/source/binaryurp.component |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 7531f027c742a601c13a7a849dfae795a148d899
Author: Noel Grandin 
AuthorDate: Wed Jun 15 14:08:33 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Jun 16 16:30:28 2022 +0200

BridgeFactory should be a singleton

regression from
commit 9be078ae0d4cc4e4c01952bb42c9bb5943bbde86
Date:   Sat Jul 4 09:12:35 2020 +0200
binaryurp: create instances with uno constructors

Change-Id: Ib7a7316fdee4afffac35b282adaf437ff8bdd009
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135904
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/binaryurp.component 
b/binaryurp/source/binaryurp.component
index e2581c76411e..b5b0f4da102f 100644
--- a/binaryurp/source/binaryurp.component
+++ b/binaryurp/source/binaryurp.component
@@ -20,7 +20,7 @@
 http://openoffice.org/2010/uno-components;>
   
+
constructor="com_sun_star_comp_bridge_BridgeFactory_get_implementation" 
single-instance="true">
 
   
 


[Libreoffice-commits] core.git: binaryurp/source chart2/source dbaccess/source reportdesign/source sc/source sot/source svx/source sw/source xmloff/source

2022-06-01 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/reader.cxx |3 ++-
 chart2/source/tools/ObjectIdentifier.cxx|4 ++--
 dbaccess/source/core/api/RowSetCache.cxx|2 +-
 dbaccess/source/ui/dlg/CollectionView.cxx   |5 +++--
 reportdesign/source/core/misc/conditionalexpression.cxx |3 ++-
 sc/source/core/data/dpobject.cxx|3 ++-
 sc/source/core/data/dpoutput.cxx|2 +-
 sc/source/ui/vba/vbarange.cxx   |5 +++--
 sot/source/sdstor/ucbstorage.cxx|3 ++-
 svx/source/fmcomp/fmgridif.cxx  |3 ++-
 sw/source/core/layout/dbg_lay.cxx   |3 ++-
 xmloff/source/chart/SchXMLTableContext.cxx  |2 +-
 12 files changed, 23 insertions(+), 15 deletions(-)

New commits:
commit e89e3a8b5a7639f14833d066e8a6c445dca97cc0
Author: Stephan Bergmann 
AuthorDate: Wed Jun 1 09:09:46 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 1 10:49:20 2022 +0200

The return value of those getLength functions is guaranteed to be 
non-negative

...so use o3tl::make_unsigned when comparing it against an expression of
unsigned integer type, instead of casting that expression to a signed type

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

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 91f2e51a0f25..7cabbd41c8a1 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -35,6 +35,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -74,7 +75,7 @@ css::uno::Sequence< sal_Int8 > read(
 throw css::io::IOException(
 "binaryurp::Reader: premature end of input");
 }
-assert(buf.getLength() == static_cast< sal_Int32 >(size));
+assert(o3tl::make_unsigned(buf.getLength()) == size);
 return buf;
 }
 
diff --git a/chart2/source/tools/ObjectIdentifier.cxx 
b/chart2/source/tools/ObjectIdentifier.cxx
index a8622e3ff4c4..6b8b9e2809cc 100644
--- a/chart2/source/tools/ObjectIdentifier.cxx
+++ b/chart2/source/tools/ObjectIdentifier.cxx
@@ -439,7 +439,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierForParticles(
 
 OUStringBuffer aRet( m_aProtocol );
 aRet.append( lcl_createClassificationStringForType( eObjectType, 
rDragMethodServiceName, rDragParameterString ));
-if(aRet.getLength() > static_cast(std::size(m_aProtocol)-1))
+if(o3tl::make_unsigned(aRet.getLength()) >= std::size(m_aProtocol))
 aRet.append("/");
 
 if(!rParentParticle.empty())
@@ -563,7 +563,7 @@ OUString 
ObjectIdentifier::createClassifiedIdentifierWithParent(
 
 OUStringBuffer aRet( m_aProtocol );
 aRet.append( lcl_createClassificationStringForType( eObjectType, 
rDragMethodServiceName, rDragParameterString ));
-if(aRet.getLength() > static_cast(std::size(m_aProtocol)-1))
+if(o3tl::make_unsigned(aRet.getLength()) >= std::size(m_aProtocol))
 aRet.append("/");
 aRet.append(rParentPartical);
 if(!rParentPartical.empty())
diff --git a/dbaccess/source/core/api/RowSetCache.cxx 
b/dbaccess/source/core/api/RowSetCache.cxx
index 46b2cea95a02..8a23d6624180 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -207,7 +207,7 @@ ORowSetCache::ORowSetCache(const Reference< XResultSet >& 
_xRs,
 Reference xMeta = 
xConnection->getMetaData();
 SelectColumnsMetaData aColumnNames(xMeta.is() && 
xMeta->supportsMixedCaseQuotedIdentifiers());
 
::dbaccess::getColumnPositions(xSelColumns,xPrimaryKeyColumns->getElementNames(),aUpdateTableName,aColumnNames);
-bAllKeysFound = !aColumnNames.empty() && 
sal_Int32(aColumnNames.size()) == 
xPrimaryKeyColumns->getElementNames().getLength();
+bAllKeysFound = !aColumnNames.empty() && 
aColumnNames.size() == 
o3tl::make_unsigned(xPrimaryKeyColumns->getElementNames().getLength());
 }
 }
 }
diff --git a/dbaccess/source/ui/dlg/CollectionView.cxx 
b/dbaccess/source/ui/dlg/CollectionView.cxx
index d8a6d2621fe3..2e02fda505e0 100644
--- a/dbaccess/source/ui/dlg/CollectionView.cxx
+++ b/dbaccess/source/ui/dlg/CollectionView.cxx
@@ -26,6 +26,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -256,9 +257,9 @@ void OCollectionView::initCurrentPath()
 static const char s_sReportsCID[] = "private:reports";
 m_bCreateForm = s_sFormsCID == sCID;
 OUString sPath("/");
-if ( m_bCreateForm && sCID.getLength() != 
static_cast(strlen(s_sFormsCID)))
+if ( m_bCreateForm && 

[Libreoffice-commits] core.git: binaryurp/source

2022-05-23 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridge.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit 6974647815a4bebf57136be9d7cb28d4137e96b3
Author: Stephan Bergmann 
AuthorDate: Mon May 23 08:36:49 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 23 10:55:45 2022 +0200

cid#1504543 Silence unhelpful, aggressive UNINIT_CTOR

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index db6866ec1641..7d73d6dd7b00 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -202,6 +202,7 @@ Bridge::Bridge(
 throw css::uno::RuntimeException("URP: no C++ UNO mapping");
 }
 passive_.set();
+// coverity[uninit_member] - random_ is set in due course by the reader_ 
thread's state machine
 }
 
 void Bridge::start() {


[Libreoffice-commits] core.git: binaryurp/source

2022-05-23 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/binaryany.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit de403384f2efb163f8881aa42e08c6ead25291bd
Author: Stephan Bergmann 
AuthorDate: Mon May 23 08:51:29 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Mon May 23 10:32:40 2022 +0200

Adapt comment

...after 084b2b068ad6729775f7fa5965429fc5cc3c2ae3 "optimise 
Any::operator=(&&) a
little" folded moveAnyInternals into its only remaining call site

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

diff --git a/binaryurp/source/binaryany.cxx b/binaryurp/source/binaryany.cxx
index 17db2f3775ef..7f6e14a6fb35 100644
--- a/binaryurp/source/binaryany.cxx
+++ b/binaryurp/source/binaryany.cxx
@@ -32,7 +32,7 @@ namespace binaryurp {
 
 namespace {
 
-// Cf. com::sun::star::uno::detail::moveAnyInternals in
+// Cf. com::sun::star::uno::Any move ctor in
 // include/com/sun/star/uno/Any.hxx:
 void moveInternals(uno_Any & from, uno_Any & to) {
 uno_any_construct(, nullptr, nullptr, nullptr);


[Libreoffice-commits] core.git: binaryurp/source

2022-03-25 Thread Arnaud Versini (via logerrit)
 binaryurp/source/bridge.cxx |   44 ++--
 binaryurp/source/bridge.hxx |3 ++-
 binaryurp/source/writer.cxx |9 -
 binaryurp/source/writer.hxx |4 ++--
 4 files changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 34df7e2cb95385d513e9c74cda5178e3a68d27df
Author: Arnaud Versini 
AuthorDate: Thu Mar 24 12:56:28 2022 +0100
Commit: Noel Grandin 
CommitDate: Fri Mar 25 09:20:48 2022 +0100

binaryurp: use more std::mutex

Change-Id: I1d16c4cbf60e78323b74e7df049736bd0d0ab591
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/132072
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 3299cd0ed519..050ebec7403c 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -207,7 +207,7 @@ void Bridge::start() {
 rtl::Reference r(new Reader(this));
 rtl::Reference w(new Writer(this));
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(
 state_ == STATE_INITIAL && threadPool_ == nullptr && !writer_.is() 
&&
 !reader_.is());
@@ -237,7 +237,7 @@ void Bridge::terminate(bool final) {
 bool joinW;
 Listeners ls;
 {
-osl::ClearableMutexGuard g(mutex_);
+std::unique_lock g(mutex_);
 switch (state_) {
 case STATE_INITIAL: // via ~Bridge -> dispose -> terminate
 case STATE_FINAL:
@@ -246,10 +246,10 @@ void Bridge::terminate(bool final) {
 break;
 case STATE_TERMINATED:
 if (final) {
-g.clear();
+g.unlock();
 terminated_.wait();
 {
-osl::MutexGuard g2(mutex_);
+std::lock_guard g2(mutex_);
 tp = threadPool_;
 threadPool_ = nullptr;
 if (reader_.is()) {
@@ -309,7 +309,7 @@ void Bridge::terminate(bool final) {
 uno_threadpool_dispose(tp);
 Stubs s;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 s.swap(stubs_);
 }
 for (auto & stub : s)
@@ -340,7 +340,7 @@ void Bridge::terminate(bool final) {
 uno_threadpool_destroy(tp);
 }
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 if (final) {
 threadPool_ = nullptr;
 }
@@ -361,14 +361,14 @@ BinaryAny Bridge::mapCppToBinaryAny(css::uno::Any const & 
cppAny) {
 }
 
 uno_ThreadPool Bridge::getThreadPool() {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 checkDisposed();
 assert(threadPool_ != nullptr);
 return threadPool_;
 }
 
 rtl::Reference< Writer > Bridge::getWriter() {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 checkDisposed();
 assert(writer_.is());
 return writer_;
@@ -392,7 +392,7 @@ css::uno::UnoInterfaceReference 
Bridge::registerIncomingInterface(
 } else {
 obj.set(new Proxy(this, oid, type), SAL_NO_ACQUIRE);
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(proxies_ < std::numeric_limits< std::size_t >::max());
 ++proxies_;
 }
@@ -419,7 +419,7 @@ OUString Bridge::registerOutgoingInterface(
 if (!Proxy::isProxy(this, object, )) {
 binaryUno_.get()->pExtEnv->getObjectIdentifier(
 binaryUno_.get()->pExtEnv, , object.get());
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 Stub newStub;
 Stub * stub = i == stubs_.end() ?  : >second;
@@ -458,7 +458,7 @@ css::uno::UnoInterfaceReference Bridge::findStub(
 OUString const & oid, css::uno::TypeDescription const & type)
 {
 assert(!oid.isEmpty() && type.is());
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 if (i != stubs_.end()) {
 Stub::iterator j(i->second.find(type));
@@ -484,7 +484,7 @@ void Bridge::releaseStub(
 css::uno::UnoInterfaceReference obj;
 bool unused;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Stubs::iterator i(stubs_.find(oid));
 if (i == stubs_.end()) {
 throw css::uno::RuntimeException("URP: release unknown stub");
@@ -538,7 +538,7 @@ void Bridge::freeProxy(Proxy & proxy) {
 }
 bool unused;
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 assert(proxies_ > 0);
 --proxies_;
 unused = becameUnused();
@@ -547,7 +547,7 @@ void Bridge::freeProxy(Proxy & proxy) {
 }
 
 void Bridge::incrementCalls(bool normalCall) noexcept {
-osl::MutexGuard g(mutex_);
+std::lock_guard 

[Libreoffice-commits] core.git: binaryurp/source

2021-09-10 Thread Noel Grandin (via logerrit)
 binaryurp/source/incomingrequest.cxx |6 +++---
 binaryurp/source/incomingrequest.hxx |6 +++---
 binaryurp/source/outgoingrequest.hxx |6 +++---
 binaryurp/source/writer.cxx  |   13 +++--
 binaryurp/source/writer.hxx  |   19 ---
 5 files changed, 20 insertions(+), 30 deletions(-)

New commits:
commit e8c940b73840868f26a537e159047e99d7ddae2c
Author: Noel Grandin 
AuthorDate: Fri Sep 10 15:45:35 2021 +0200
Commit: Noel Grandin 
CommitDate: Fri Sep 10 21:19:07 2021 +0200

clang:optin.performance.Padding in binaryurp

Excessive padding in 'struct binaryurp::OutgoingRequest' (11 padding
bytes, where 3 is optimal).

Excessive padding in 'struct binaryurp::Writer::Item' (28 padding bytes,
where 4 is optimal).

Excessive padding in 'class binaryurp::IncomingRequest' (19 padding
bytes, where 3 is optimal).

Change-Id: I43ef9c513ad2bbb1151edbf5db578d69d35ccfbf
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121919
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/incomingrequest.cxx 
b/binaryurp/source/incomingrequest.cxx
index eed6f7cb8466..62e88697769b 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -50,9 +50,9 @@ IncomingRequest::IncomingRequest(
 std::vector< BinaryAny > const & inArguments, bool currentContextMode,
 css::uno::UnoInterfaceReference const & currentContext):
 bridge_(bridge), tid_(tid), oid_(oid), object_(object), type_(type),
-functionId_(functionId), synchronous_(synchronous), member_(member),
-setter_(setter), inArguments_(inArguments),
-currentContextMode_(currentContextMode), currentContext_(currentContext)
+member_(member), currentContext_(currentContext),
+inArguments_(inArguments), functionId_(functionId),
+synchronous_(synchronous), setter_(setter), 
currentContextMode_(currentContextMode)
 {
 assert(bridge.is());
 assert(member.is());
diff --git a/binaryurp/source/incomingrequest.hxx 
b/binaryurp/source/incomingrequest.hxx
index f85171b15a93..6a79126b4f65 100644
--- a/binaryurp/source/incomingrequest.hxx
+++ b/binaryurp/source/incomingrequest.hxx
@@ -65,13 +65,13 @@ private:
 OUString oid_; // initial object queryInterface; release
 com::sun::star::uno::UnoInterfaceReference object_;
 com::sun::star::uno::TypeDescription type_;
+com::sun::star::uno::TypeDescription member_;
+com::sun::star::uno::UnoInterfaceReference currentContext_;
+std::vector< BinaryAny > inArguments_;
 sal_uInt16 functionId_;
 bool synchronous_;
-com::sun::star::uno::TypeDescription member_;
 bool setter_;
-std::vector< BinaryAny > inArguments_;
 bool currentContextMode_;
-com::sun::star::uno::UnoInterfaceReference currentContext_;
 };
 
 }
diff --git a/binaryurp/source/outgoingrequest.hxx 
b/binaryurp/source/outgoingrequest.hxx
index f5abda34a302..eb2c8a7e5212 100644
--- a/binaryurp/source/outgoingrequest.hxx
+++ b/binaryurp/source/outgoingrequest.hxx
@@ -31,13 +31,13 @@ struct OutgoingRequest {
 OutgoingRequest(
 Kind theKind, com::sun::star::uno::TypeDescription const & theMember,
 bool theSetter):
-kind(theKind), member(theMember), setter(theSetter)
+member(theMember), kind(theKind), setter(theSetter)
 {}
 
-Kind kind;
-
 com::sun::star::uno::TypeDescription member;
 
+Kind kind;
+
 bool setter;
 };
 
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 585f375d7a58..9fb609180e4a 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -56,9 +56,9 @@ Writer::Item::Item(
 css::uno::TypeDescription const & theMember,
 std::vector< BinaryAny > const & inArguments,
 css::uno::UnoInterfaceReference const & theCurrentContext):
-request(true), tid(theTid), oid(theOid), type(theType), member(theMember),
-setter(false), arguments(inArguments), exception(false),
-currentContext(theCurrentContext), setCurrentContextMode(false)
+tid(theTid), oid(theOid), type(theType), member(theMember),
+currentContext(theCurrentContext), arguments(inArguments),
+request(true), setter(false), exception(false), 
setCurrentContextMode(false)
 {}
 
 Writer::Item::Item(
@@ -67,9 +67,10 @@ Writer::Item::Item(
 bool theException, BinaryAny const & theReturnValue,
 std::vector< BinaryAny > const & outArguments,
 bool theSetCurrentContextMode):
-request(false), tid(theTid), member(theMember), setter(theSetter),
-arguments(outArguments), exception(theException),
-returnValue(theReturnValue), 
setCurrentContextMode(theSetCurrentContextMode)
+tid(theTid), member(theMember),
+returnValue(theReturnValue), arguments(outArguments),
+request(false), setter(theSetter),
+exception(theException), setCurrentContextMode(theSetCurrentContextMode)
 {}
 
 Writer::Writer(rtl::Reference< Bridge > 

[Libreoffice-commits] core.git: binaryurp/source bridges/source canvas/source comphelper/source compilerplugins/clang cppuhelper/source cppu/source eventattacher/source framework/source i18npool/sourc

2021-08-03 Thread Noel Grandin (via logerrit)
 binaryurp/source/outgoingrequests.cxx   |6 
 bridges/source/cpp_uno/shared/vtablefactory.cxx |4 
 canvas/source/factory/cf_service.cxx|2 
 comphelper/source/container/namecontainer.cxx   |   14 +-
 comphelper/source/misc/accessiblekeybindinghelper.cxx   |8 -
 comphelper/source/misc/asyncnotification.cxx|6 
 comphelper/source/streaming/oslfile2streamwrap.cxx  |6 
 comphelper/source/streaming/seekableinput.cxx   |   16 +-
 comphelper/source/streaming/seqinputstreamserv.cxx  |   18 +-
 comphelper/source/streaming/seqoutputstreamserv.cxx |8 -
 comphelper/source/streaming/seqstream.cxx   |   20 +--
 compilerplugins/clang/unusedvariablecheck.cxx   |2 
 cppu/source/uno/EnvStack.cxx|4 
 cppu/source/uno/lbmap.cxx   |4 
 cppuhelper/source/implbase_ex.cxx   |2 
 cppuhelper/source/propertysetmixin.cxx  |   12 -
 cppuhelper/source/servicemanager.cxx|4 
 cppuhelper/source/typemanager.cxx   |2 
 eventattacher/source/eventattacher.cxx  |   16 +-
 framework/source/helper/statusindicatorfactory.cxx  |   34 ++---
 framework/source/services/dispatchhelper.cxx|8 -
 i18npool/source/nativenumber/nativenumbersupplier.cxx   |4 
 i18npool/source/numberformatcode/numberformatcode.cxx   |8 -
 lingucomponent/source/languageguessing/guesslang.cxx|   12 -
 lingucomponent/source/numbertext/numbertext.cxx |4 
 linguistic/source/misc.cxx  |4 
 oox/source/core/filterbase.cxx  |4 
 oox/source/helper/propertymap.cxx   |2 
 package/source/xstor/disposelistener.cxx|4 
 package/source/xstor/switchpersistencestream.cxx|   28 ++--
 package/source/zipapi/ByteGrabber.cxx   |   14 +-
 package/source/zipapi/blowfishcontext.cxx   |4 
 package/source/zipapi/sha1context.cxx   |8 -
 sax/source/fastparser/fastparser.cxx|6 
 sc/source/core/data/mtvelements.cxx |4 
 sc/source/core/data/poolhelp.cxx|2 
 sc/source/core/tool/editutil.cxx|2 
 sc/source/core/tool/refreshtimer.cxx|4 
 sc/source/filter/oox/formulabuffer.cxx  |2 
 scripting/source/provider/MasterScriptProvider.cxx  |2 
 scripting/source/provider/ProviderCache.cxx |6 
 sd/source/ui/framework/configuration/ResourceFactoryManager.cxx |8 -
 sd/source/ui/slidesorter/cache/SlsQueueProcessor.cxx|2 
 sdext/source/minimizer/pppoptimizertoken.cxx|2 
 sdext/source/presenter/PresenterTimer.cxx   |   20 +--
 sfx2/source/control/thumbnailviewacc.cxx|6 
 sfx2/source/doc/doctemplates.cxx|2 
 slideshow/source/engine/eventqueue.cxx  |   16 +-
 sot/source/sdstor/ucbstorage.cxx|   14 +-
 stoc/source/corereflection/lrucache.hxx |6 
 stoc/source/javavm/interact.cxx |4 
 stoc/source/namingservice/namingservice.cxx |6 
 stoc/source/servicemanager/servicemanager.cxx   |8 -
 stoc/source/simpleregistry/simpleregistry.cxx   |   66 
+-
 svl/source/config/itemholder2.cxx   |4 
 svl/source/misc/sharedstringpool.cxx|8 -
 svtools/source/config/itemholder2.cxx   |4 
 svtools/source/config/optionsdrawinglayer.cxx   |6 
 svtools/source/control/asynclink.cxx|6 
 svtools/source/control/inettbc.cxx  |   10 -
 svtools/source/control/valueacc.cxx |6 
 svx/source/accessibility/AccessibleTextHelper.cxx   |6 
 svx/source/form/ParseContext.cxx|4 
 svx/source/form/fmtools.cxx |2 
 svx/source/sdr/primitive2d/sdrprimitivetools.cxx|2 
 svx/source/xml/xmleohlp.cxx |6 
 sw/source/core/access/acccell.cxx   |4 
 sw/source/core/access/acccontext.cxx

[Libreoffice-commits] core.git: binaryurp/source

2021-07-18 Thread Arnaud Versini (via logerrit)
 binaryurp/source/outgoingrequests.cxx |7 +++
 binaryurp/source/outgoingrequests.hxx |5 ++---
 2 files changed, 5 insertions(+), 7 deletions(-)

New commits:
commit 3785f97ec18feba9c5508559e5aed6d25cfc3aed
Author: Arnaud Versini 
AuthorDate: Sun Jul 18 10:11:45 2021 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 18 11:37:21 2021 +0200

binaryurp : use std::mutex in outgoingrequests

Change-Id: Ib0670af4596c5a40da27138d62b78df69bb77b9a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119121
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/outgoingrequests.cxx 
b/binaryurp/source/outgoingrequests.cxx
index 859aa8b9270d..ed15e5a1bda8 100644
--- a/binaryurp/source/outgoingrequests.cxx
+++ b/binaryurp/source/outgoingrequests.cxx
@@ -23,7 +23,6 @@
 
 #include 
 #include 
-#include 
 
 #include "lessoperators.hxx"
 #include "outgoingrequest.hxx"
@@ -38,12 +37,12 @@ OutgoingRequests::~OutgoingRequests() {}
 void OutgoingRequests::push(
 rtl::ByteSequence const & tid, OutgoingRequest const & request)
 {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 map_[tid].push_back(request);
 }
 
 OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const & tid) {
-osl::MutexGuard g(mutex_);
+std::lock_guard g(mutex_);
 Map::iterator i(map_.find(tid));
 if (i == map_.end()) {
 throw css::uno::RuntimeException(
@@ -54,7 +53,7 @@ OutgoingRequest OutgoingRequests::top(rtl::ByteSequence const 
& tid) {
 }
 
 void OutgoingRequests::pop(rtl::ByteSequence const & tid) noexcept {
-osl::MutexGuard g(mutex_);
+std::lock_guard  g(mutex_);
 Map::iterator i(map_.find(tid));
 assert(i != map_.end());
 i->second.pop_back();
diff --git a/binaryurp/source/outgoingrequests.hxx 
b/binaryurp/source/outgoingrequests.hxx
index 294119693d02..698b6db9e417 100644
--- a/binaryurp/source/outgoingrequests.hxx
+++ b/binaryurp/source/outgoingrequests.hxx
@@ -22,10 +22,9 @@
 #include 
 
 #include 
+#include 
 #include 
 
-#include 
-
 namespace binaryurp
 {
 struct OutgoingRequest;
@@ -56,7 +55,7 @@ private:
 
 typedef std::map> Map;
 
-osl::Mutex mutex_;
+std::mutex mutex_;
 Map map_;
 };
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2021-06-07 Thread Noel Grandin (via logerrit)
 binaryurp/source/reader.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 039180f8255b6356cb89b1777e4e53323541898d
Author: Noel Grandin 
AuthorDate: Mon Jun 7 20:55:51 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 7 22:05:23 2021 +0200

Revert "improve logging message"

This reverts commit 9f0484c2bca8e7ec5e0d83289fae9b474b8598e0.

Reason for revert: this patch was unnecessary, the operator<< for 
css::uno::Exception alreadys logs the message, I got confused

Change-Id: I45932be060059eac92d460a70c944e1b19b5c375
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116706
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 902225e1bd54..b11b77ffe658 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -120,9 +120,9 @@ void Reader::execute() {
 block.done();
 }
 } catch (const css::uno::Exception & e) {
-SAL_WARN("binaryurp", "caught UNO exception, " << e << " " << 
e.Message);
+SAL_WARN("binaryurp", "caught UNO exception '" << e << '\'');
 } catch (const std::exception & e) {
-SAL_WARN("binaryurp", "caught C++ exception, " << e.what() );
+SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
 }
 bridge_->terminate(false);
 bridge_.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2021-06-07 Thread Noel Grandin (via logerrit)
 binaryurp/source/reader.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 9f0484c2bca8e7ec5e0d83289fae9b474b8598e0
Author: Noel Grandin 
AuthorDate: Mon Jun 7 12:52:21 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Jun 7 16:07:23 2021 +0200

improve logging message

Change-Id: Ib8f4fdbe3d644c035a125f7ae0a035a95bcafc76
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116781
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index b11b77ffe658..902225e1bd54 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -120,9 +120,9 @@ void Reader::execute() {
 block.done();
 }
 } catch (const css::uno::Exception & e) {
-SAL_WARN("binaryurp", "caught UNO exception '" << e << '\'');
+SAL_WARN("binaryurp", "caught UNO exception, " << e << " " << 
e.Message);
 } catch (const std::exception & e) {
-SAL_WARN("binaryurp", "caught C++ exception '" << e.what() << '\'');
+SAL_WARN("binaryurp", "caught C++ exception, " << e.what() );
 }
 bridge_->terminate(false);
 bridge_.clear();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2021-05-17 Thread Noel Grandin (via logerrit)
 binaryurp/source/unmarshal.cxx |2 ++
 1 file changed, 2 insertions(+)

New commits:
commit d8d15656817a58a5e9c6a6ebc88038ba4e5ef865
Author: Noel Grandin 
AuthorDate: Sun May 16 13:17:22 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon May 17 10:39:05 2021 +0200

small perf improvement in readMemberValues

Change-Id: I5d5973401a87b69dd54721d16ed19e227a6c2ac6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115674
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index d307c81cc0b5..4263edf8c91c 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -437,6 +437,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription 
const & type) {
 return BinaryAny(type, );
 }
 std::vector< BinaryAny > as;
+as.reserve(n);
 for (sal_uInt32 i = 0; i != n; ++i) {
 as.push_back(readValue(ctd));
 }
@@ -477,6 +478,7 @@ void Unmarshal::readMemberValues(
 css::uno::TypeDescription(>pBaseTypeDescription->aBase),
 values);
 }
+values->reserve(values->size() + ctd->nMembers);
 for (sal_Int32 i = 0; i != ctd->nMembers; ++i) {
 values->push_back(
 readValue(css::uno::TypeDescription(ctd->ppTypeRefs[i])));
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source configmgr/source connectivity/source dbaccess/source desktop/source embeddedobj/source eventattacher/source filter/source lingucomponent/source linguis

2021-03-09 Thread Mike Kaganski (via logerrit)
 binaryurp/source/bridgefactory.cxx  |2 -
 configmgr/source/configurationprovider.cxx  |2 -
 configmgr/source/configurationregistry.cxx  |2 -
 configmgr/source/readonlyaccess.cxx |2 -
 configmgr/source/readwriteaccess.cxx|2 -
 configmgr/source/update.cxx |2 -
 connectivity/source/drivers/postgresql/pq_driver.cxx|2 -
 dbaccess/source/core/dataaccess/databasecontext.cxx |2 -
 dbaccess/source/sdbtools/connection/connectiontools.cxx |2 -
 desktop/source/splash/unxsplash.cxx |2 -
 embeddedobj/source/commonembedding/xfactory.cxx |4 +-
 embeddedobj/source/general/xcreator.cxx |2 -
 embeddedobj/source/msole/xdialogcreator.cxx |2 -
 embeddedobj/source/msole/xolefactory.cxx|2 -
 eventattacher/source/eventattacher.cxx  |2 -
 filter/source/config/cache/configflush.cxx  |2 -
 filter/source/odfflatxml/OdfFlatXml.cxx |2 -
 filter/source/xsltdialog/xmlfilterdialogcomponent.cxx   |2 -
 lingucomponent/source/hyphenator/hyphen/hyphenimp.cxx   |2 -
 lingucomponent/source/spellcheck/macosxspell/macspellimp.mm |2 -
 lingucomponent/source/spellcheck/spell/sspellimp.cxx|2 -
 lingucomponent/source/thesaurus/libnth/nthesimp.cxx |2 -
 linguistic/source/dlistimp.cxx  |2 -
 linguistic/source/gciterator.cxx|2 -
 linguistic/source/lngopt.cxx|2 -
 linguistic/source/lngsvcmgr.cxx |2 -
 package/source/xstor/xfactory.cxx   |2 -
 sc/source/filter/xml/xmlimprt.cxx   |   20 ++--
 sc/source/ui/unoobj/appluno.cxx |2 -
 scaddins/source/analysis/analysis.cxx   |2 -
 scaddins/source/datefunc/datefunc.cxx   |2 -
 scaddins/source/pricing/pricing.cxx |2 -
 shell/source/win32/simplemail/smplmailsuppl.cxx |2 -
 stoc/source/invocation_adapterfactory/iafactory.cxx |2 -
 svl/source/fsstor/fsfactory.cxx |2 -
 ucb/source/core/cmdenv.cxx  |2 -
 ucb/source/core/ucb.cxx |2 -
 ucb/source/core/ucbprops.cxx|2 -
 ucb/source/core/ucbstore.cxx|2 -
 ucb/source/sorter/sortdynres.cxx|2 -
 ucb/source/ucp/cmis/cmis_provider.cxx   |2 -
 ucb/source/ucp/ext/ucpext_provider.cxx  |2 -
 ucb/source/ucp/ftp/ftpcontentprovider.cxx   |2 -
 ucb/source/ucp/gio/gio_provider.cxx |2 -
 ucb/source/ucp/hierarchy/hierarchydatasource.cxx|2 -
 ucb/source/ucp/hierarchy/hierarchyprovider.cxx  |2 -
 ucb/source/ucp/package/pkgprovider.cxx  |2 -
 ucb/source/ucp/tdoc/tdoc_documentcontentfactory.cxx |2 -
 unotools/source/misc/ServiceDocumenter.cxx  |3 -
 vcl/source/app/session.cxx  |2 -
 vcl/win/dtrans/WinClipboard.cxx |2 -
 vcl/win/dtrans/ftransl.cxx  |2 -
 vcl/win/dtrans/generic_clipboard.cxx|2 -
 vcl/win/dtrans/source.cxx   |2 -
 vcl/win/dtrans/target.cxx   |2 -
 xmlscript/source/xml_helper/xml_impctx.cxx  |3 -
 56 files changed, 66 insertions(+), 68 deletions(-)

New commits:
commit 96388e5e809a48573970df9b6b2649517a08447f
Author: Mike Kaganski 
AuthorDate: Wed Mar 10 09:41:13 2021 +0300
Commit: Mike Kaganski 
CommitDate: Wed Mar 10 08:22:26 2021 +0100

Drop 'static_cast' syntactic noise

... where the object is created in-place, and its type is known

Change-Id: Ifabfcf2f3ad0d60152f14e8d970c1faa42115288
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112256
Tested-by: Jenkins
Reviewed-by: Mike Kaganski 

diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 803899c8a7e3..d2fef4383c06 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -185,7 +185,7 @@ extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
 com_sun_star_comp_bridge_BridgeFactory_get_implementation(
 css::uno::XComponentContext* , css::uno::Sequence const&)
 {
-return cppu::acquire(static_cast< cppu::OWeakObject * >(new 
binaryurp::BridgeFactory));
+return 

[Libreoffice-commits] core.git: binaryurp/source

2020-09-04 Thread George Bateman (via logerrit)
 binaryurp/source/binaryany.hxx  |5 +
 binaryurp/source/bridge.hxx |5 +
 binaryurp/source/bridgefactory.hxx  |5 +
 binaryurp/source/cache.hxx  |5 +
 binaryurp/source/currentcontext.hxx |5 +
 binaryurp/source/incomingreply.hxx  |5 +
 binaryurp/source/incomingrequest.hxx|5 +
 binaryurp/source/lessoperators.hxx  |5 +
 binaryurp/source/marshal.hxx|5 +
 binaryurp/source/outgoingrequest.hxx|5 +
 binaryurp/source/outgoingrequests.hxx   |5 +
 binaryurp/source/proxy.hxx  |5 +
 binaryurp/source/reader.hxx |5 +
 binaryurp/source/readerstate.hxx|5 +
 binaryurp/source/specialfunctionids.hxx |5 +
 binaryurp/source/unmarshal.hxx  |5 +
 binaryurp/source/writer.hxx |5 +
 binaryurp/source/writerstate.hxx|5 +
 18 files changed, 18 insertions(+), 72 deletions(-)

New commits:
commit 5381af18b6c5e75b37bdc81d69f376cfedaaf641
Author: George Bateman 
AuthorDate: Tue Aug 4 21:11:28 2020 +
Commit: Julien Nabet 
CommitDate: Fri Sep 4 08:58:54 2020 +0200

tdf#124176 Use #pragma once in binaryurp

This commit was carried out by a Python script, source of which
is at https://bugs.documentfoundation.org/show_bug.cgi?id=124176#c97.

Change-Id: I7141f07eca2b8338be6bd6b24580256cda6ba092
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100129
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 8422ca1ac424..fdf52216a154 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
-#define INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
+#pragma once
 
 #include 
 
@@ -64,6 +63,4 @@ private:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index d6528a3f115b..f3a6badd2283 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX
-#define INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX
+#pragma once
 
 #include 
 
@@ -278,6 +277,4 @@ private:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index 1470dc2c28bd..59023896010b 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX
-#define INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX
+#pragma once
 
 #include 
 
@@ -113,6 +112,4 @@ private:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index 722e7494bd8e..bd8648efdee8 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_CACHE_HXX
-#define INCLUDED_BINARYURP_SOURCE_CACHE_HXX
+#pragma once
 
 #include 
 
@@ -93,6 +92,4 @@ private:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/currentcontext.hxx 
b/binaryurp/source/currentcontext.hxx
index 95600e62d713..a7a99cf4fec9 100644
--- a/binaryurp/source/currentcontext.hxx
+++ b/binaryurp/source/currentcontext.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX
-#define INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX
+#pragma once
 
 #include 
 
@@ -32,6 +31,4 @@ void set(com::sun::star::uno::UnoInterfaceReference const & 
value);
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/incomingreply.hxx 
b/binaryurp/source/incomingreply.hxx
index 058d0edf8c47..b1ff6cb4d2eb 100644
--- a/binaryurp/source/incomingreply.hxx
+++ b/binaryurp/source/incomingreply.hxx
@@ -17,8 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX
-#define INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX
+#pragma once
 
 #include 
 
@@ -49,6 +48,4 @@ public:
 
 }
 
-#endif
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/incomingrequest.hxx 
b/binaryurp/source/incomingrequest.hxx
index d6ed7fbccc7c..f85171b15a93 100644
--- a/binaryurp/source/incomingrequest.hxx
+++ b/binaryurp/source/incomingrequest.hxx
@@ -17,8 +17,7 @@
  *   the License at 

[Libreoffice-commits] core.git: binaryurp/source

2020-07-05 Thread Noel Grandin (via logerrit)
 binaryurp/source/binaryurp.component |5 ++--
 binaryurp/source/bridgefactory.cxx   |   39 +--
 binaryurp/source/bridgefactory.hxx   |   12 --
 3 files changed, 10 insertions(+), 46 deletions(-)

New commits:
commit 9be078ae0d4cc4e4c01952bb42c9bb5943bbde86
Author: Noel Grandin 
AuthorDate: Sat Jul 4 09:12:35 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun Jul 5 11:36:55 2020 +0200

binaryurp: create instances with uno constructors

See tdf#74608 for motivation

Change-Id: Ide39715f83b0183f560e16fa69fcb3112496936d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97933
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/binaryurp.component 
b/binaryurp/source/binaryurp.component
index 1eff0c2c18d6..e2581c76411e 100644
--- a/binaryurp/source/binaryurp.component
+++ b/binaryurp/source/binaryurp.component
@@ -18,8 +18,9 @@
  -->
 
 http://openoffice.org/2010/uno-components;>
-  
+xmlns="http://openoffice.org/2010/uno-components;>
+  
 
   
 
diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index ff8eff8b6927..fc1f8b071362 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -43,21 +43,6 @@
 
 namespace binaryurp {
 
-css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create(
-css::uno::Reference< css::uno::XComponentContext > const & /*xContext*/)
-{
-return static_cast< cppu::OWeakObject * >(new BridgeFactory);
-}
-
-OUString BridgeFactory::static_getImplementationName() {
-return "com.sun.star.comp.bridge.BridgeFactory";
-}
-
-css::uno::Sequence< OUString >
-BridgeFactory::static_getSupportedServiceNames() {
-return css::uno::Sequence{ "com.sun.star.bridge.BridgeFactory" };
-}
-
 void BridgeFactory::removeBridge(
 css::uno::Reference< css::bridge::XBridge > const & bridge)
 {
@@ -85,7 +70,7 @@ BridgeFactory::~BridgeFactory() {}
 
 OUString BridgeFactory::getImplementationName()
 {
-return static_getImplementationName();
+return "com.sun.star.comp.bridge.BridgeFactory";
 }
 
 sal_Bool BridgeFactory::supportsService(OUString const & ServiceName)
@@ -95,7 +80,7 @@ sal_Bool BridgeFactory::supportsService(OUString const & 
ServiceName)
 
 css::uno::Sequence< OUString > BridgeFactory::getSupportedServiceNames()
 {
-return static_getSupportedServiceNames();
+return { "com.sun.star.bridge.BridgeFactory" };
 }
 
 css::uno::Reference< css::bridge::XBridge > BridgeFactory::createBridge(
@@ -198,23 +183,11 @@ void BridgeFactory::disposing() {
 
 }
 
-namespace {
-
-cppu::ImplementationEntry const services[] = {
-{ ::BridgeFactory::static_create,
-  ::BridgeFactory::static_getImplementationName,
-  ::BridgeFactory::static_getSupportedServiceNames,
-  ::createOneInstanceComponentFactory, nullptr, 0 },
-{ nullptr, nullptr, nullptr, nullptr, nullptr, 0 }
-};
-
-}
-
-extern "C" SAL_DLLPUBLIC_EXPORT void * binaryurp_component_getFactory(
-char const * pImplName, void * pServiceManager, void * pRegistryKey)
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_bridge_BridgeFactory_get_implementation(
+css::uno::XComponentContext* , css::uno::Sequence const&)
 {
-return cppu::component_getFactoryHelper(
-pImplName, pServiceManager, pRegistryKey, services);
+return cppu::acquire(static_cast< cppu::OWeakObject * >(new 
binaryurp::BridgeFactory));
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index 5e49610eeb42..1470dc2c28bd 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -54,16 +54,6 @@ typedef
 class BridgeFactory : private cppu::BaseMutex, public BridgeFactoryBase
 {
 public:
-static com::sun::star::uno::Reference< com::sun::star::uno::XInterface >
-SAL_CALL static_create(
-com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext 
>
-const & xContext);
-
-static OUString SAL_CALL static_getImplementationName();
-
-static com::sun::star::uno::Sequence< OUString > SAL_CALL
-static_getSupportedServiceNames();
-
 void removeBridge(
 com::sun::star::uno::Reference< com::sun::star::bridge::XBridge >
 const & bridge);
@@ -71,7 +61,6 @@ public:
 using BridgeFactoryBase::acquire;
 using BridgeFactoryBase::release;
 
-private:
 BridgeFactory(const BridgeFactory&) = delete;
 BridgeFactory& operator=(const BridgeFactory&) = delete;
 
@@ -79,6 +68,7 @@ private:
 
 virtual ~BridgeFactory() override;
 
+private:
 virtual OUString SAL_CALL getImplementationName() override;
 
 virtual sal_Bool SAL_CALL supportsService(OUString const & ServiceName) 
override;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org

[Libreoffice-commits] core.git: binaryurp/source

2020-06-30 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridgefactory.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit eb582a59f8f4ba9bcb939fd4b134f29099d2539c
Author: Stephan Bergmann 
AuthorDate: Tue Jun 30 15:27:18 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jun 30 18:51:07 2020 +0200

Upcoming improved loplugin:staticanonymous -> redundantstatic: binaryurp

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

diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index be21fc9c6b40..ff8eff8b6927 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -200,7 +200,7 @@ void BridgeFactory::disposing() {
 
 namespace {
 
-static cppu::ImplementationEntry const services[] = {
+cppu::ImplementationEntry const services[] = {
 { ::BridgeFactory::static_create,
   ::BridgeFactory::static_getImplementationName,
   ::BridgeFactory::static_getSupportedServiceNames,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2020-06-25 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridge.cxx |6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit acbe57481e0a10be287aad59201873a0799a94f0
Author: Stephan Bergmann 
AuthorDate: Thu Jun 25 09:50:34 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 25 11:09:22 2020 +0200

Rephrase comment

760980b0b510acac555f0c252fbaa10a4751bded "Fix typos" had, IMO incorrectly,
removed one "that" from

  ..., so that that asynchronous request would...

Lets rephrase the original comment in a less problematic way.

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 4a4499de0ef4..9a73a04b9039 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -977,9 +977,9 @@ void Bridge::makeReleaseCall(
 OUString const & oid, css::uno::TypeDescription const & type)
 {
 //HACK to decouple the processing of release calls from all other threads. 
 Normally, sending
-// the release request should use the current thread's TID (via 
AttachThread), so that
-// asynchronous request would be processed by a physical thread that is 
paired with the physical
-// thread processing the normal synchronous call stack (see 
ThreadIdHashMap in
+// the release request should use the current thread's TID (via 
AttachThread), which would cause
+// that asynchronous request to be processed by a physical thread that is 
paired with the
+// physical thread processing the normal synchronous call stack (see 
ThreadIdHashMap in
 // cppu/source/threadpool/threadpool.hxx).  However, that can lead to 
deadlock when a thread
 // illegally makes a synchronous UNO call with the SolarMutex locked (e.g.,
 // SfxBaseModel::postEvent_Impl in sfx2/source/doc/sfxbasemodel.cxx doing 
documentEventOccurred
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source sw/source tools/qa

2020-06-25 Thread Andrea Gelmini (via logerrit)
 binaryurp/source/bridge.cxx   |2 +-
 sw/source/core/text/itrform2.cxx  |2 +-
 tools/qa/cppunit/test_cpu_runtime_detection_SSE2.cxx  |2 +-
 tools/qa/cppunit/test_cpu_runtime_detection_SSSE3.cxx |2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 760980b0b510acac555f0c252fbaa10a4751bded
Author: Andrea Gelmini 
AuthorDate: Wed Jun 24 16:32:12 2020 +0200
Commit: Julien Nabet 
CommitDate: Thu Jun 25 08:18:10 2020 +0200

Fix typos

Change-Id: I2bccc7beb2e9dfccd84b118a33a7aee9753a8be1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/97040
Tested-by: Jenkins
Reviewed-by: Julien Nabet 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 2534dfa1a873..4a4499de0ef4 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -977,7 +977,7 @@ void Bridge::makeReleaseCall(
 OUString const & oid, css::uno::TypeDescription const & type)
 {
 //HACK to decouple the processing of release calls from all other threads. 
 Normally, sending
-// the release request should use the current thread's TID (via 
AttachThread), so that that
+// the release request should use the current thread's TID (via 
AttachThread), so that
 // asynchronous request would be processed by a physical thread that is 
paired with the physical
 // thread processing the normal synchronous call stack (see 
ThreadIdHashMap in
 // cppu/source/threadpool/threadpool.hxx).  However, that can lead to 
deadlock when a thread
diff --git a/sw/source/core/text/itrform2.cxx b/sw/source/core/text/itrform2.cxx
index 61621611fb73..aec314e56b8b 100644
--- a/sw/source/core/text/itrform2.cxx
+++ b/sw/source/core/text/itrform2.cxx
@@ -330,7 +330,7 @@ void SwTextFormatter::InsertPortion( SwTextFormatInfo ,
 
 if 
(GetTextFrame()->GetDoc().getIDocumentSettingAccess().get(DocumentSettingId::MS_WORD_COMP_MIN_LINE_HEIGHT_BY_FLY))
 {
-// For DOCX with compat=14 the only shape in line defines height 
of the line inspite of used font
+// For DOCX with compat=14 the only shape in line defines height 
of the line in spite of used font
 if (pLast->IsFlyCntPortion() && pPor->IsTextPortion() && 
pPor->GetLen() == TextFrameIndex(0))
 {
 m_pCurr->SetAscent(pLast->GetAscent());
diff --git a/tools/qa/cppunit/test_cpu_runtime_detection_SSE2.cxx 
b/tools/qa/cppunit/test_cpu_runtime_detection_SSE2.cxx
index 13dd48d2176e..7455d0191844 100644
--- a/tools/qa/cppunit/test_cpu_runtime_detection_SSE2.cxx
+++ b/tools/qa/cppunit/test_cpu_runtime_detection_SSE2.cxx
@@ -40,7 +40,7 @@ void CpuRuntimeDetection_SSE2::testCpuRuntimeDetection()
 
 void CpuRuntimeDetection_SSE2::checkSSE2()
 {
-// Try some SSE2 intrinsics calcualtion
+// Try some SSE2 intrinsics calculation
 __m128i a = _mm_set1_epi32(15);
 __m128i b = _mm_set1_epi32(15);
 __m128i c = _mm_xor_si128(a, b);
diff --git a/tools/qa/cppunit/test_cpu_runtime_detection_SSSE3.cxx 
b/tools/qa/cppunit/test_cpu_runtime_detection_SSSE3.cxx
index 1d730d99e985..9e63e59c7835 100644
--- a/tools/qa/cppunit/test_cpu_runtime_detection_SSSE3.cxx
+++ b/tools/qa/cppunit/test_cpu_runtime_detection_SSSE3.cxx
@@ -40,7 +40,7 @@ void CpuRuntimeDetection_SSSE3::testCpuRuntimeDetection()
 
 void CpuRuntimeDetection_SSSE3::checkSSSE3()
 {
-// Try some SSSE3 intrinsics calcualtion
+// Try some SSSE3 intrinsics calculation
 __m128i a = _mm_set1_epi32(3);
 __m128i b = _mm_set1_epi32(3);
 __m128i c = _mm_maddubs_epi16(a, b);
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2020-06-23 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridge.cxx |   21 +++--
 1 file changed, 19 insertions(+), 2 deletions(-)

New commits:
commit ba86099d3c4804cc7e0958c9a89fbdee29456ecf
Author: Stephan Bergmann 
AuthorDate: Tue Jun 23 14:53:02 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Tue Jun 23 16:39:58 2020 +0200

HACK to decouple URP release calls from all other threads

Abandoned  "Don't call out to UNO 
with
SolarMutex locked" documents a deadlock where a synchronous
documentEventOccurred call made with SolarMutex locked evokes an 
asynchronous
release call back (serviced on a different physical thread, but which 
blocks the
original thread) that then wants to acquire the SolarMutex.  While we 
usually
appear to get away with wrapping those UNO calls in SolarMutexReleaser 
(though
knowing all too well that that is nothing but a bad hack that may well cause
crashes and deadlocks at least in theory), the place in
SfxBaseModel::postEvent_Impl was obviously too sensitive for that hack:  It 
did
cause enough different crashes (e.g., hitting

  assert(pSchedulerData == pMostUrgent);

in Scheduler::ProcessTaskScheduling, vcl/source/app/scheduler.cxx) and 
deadlocks
(e.g., different threads now taking the SolarMutex and JobExecutor's mutex 
in
framework/source/jobs/jobexecutor.cxx in different orders) to make me 
search for
a different "fix", so I came up with this hack instead.

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 99e6cafd6f9f..2534dfa1a873 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -976,9 +976,26 @@ void Bridge::sendProtPropRequest(
 void Bridge::makeReleaseCall(
 OUString const & oid, css::uno::TypeDescription const & type)
 {
-AttachThread att(getThreadPool());
+//HACK to decouple the processing of release calls from all other threads. 
 Normally, sending
+// the release request should use the current thread's TID (via 
AttachThread), so that that
+// asynchronous request would be processed by a physical thread that is 
paired with the physical
+// thread processing the normal synchronous call stack (see 
ThreadIdHashMap in
+// cppu/source/threadpool/threadpool.hxx).  However, that can lead to 
deadlock when a thread
+// illegally makes a synchronous UNO call with the SolarMutex locked (e.g.,
+// SfxBaseModel::postEvent_Impl in sfx2/source/doc/sfxbasemodel.cxx doing 
documentEventOccurred
+// and notifyEvent calls), and while that call is on the stack the remote 
side sends back some
+// release request on the same logical UNO thread for an object that wants 
to acquire the
+// SolarMutex in its destructor (e.g., SwXTextDocument in 
sw/inc/unotxdoc.hxx holding its
+// m_pImpl via an sw::UnoImplPtr).  While the correct approach would be to 
not make UNO calls
+// with the SolarMutex (or any other mutex) locked, fixing that would 
probably be a heroic
+// effort.  So for now live with this hack, hoping that it does not 
introduce any new issues of
+// its own:
+static auto const tid = [] {
+static sal_Int8 const id[] = {'r', 'e', 'l', 'e', 'a', 's', 'e', 
'h', 'a', 'c', 'k'};
+return rtl::ByteSequence(id, SAL_N_ELEMENTS(id));
+}();
 sendRequest(
-att.getTid(), oid, type,
+tid, oid, type,
 css::uno::TypeDescription("com.sun.star.uno.XInterface::release"),
 std::vector< BinaryAny >());
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2020-06-10 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridge.cxx |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit ff3324bb16c8cde96e50582d45bc2c8a97f5704b
Author: Stephan Bergmann 
AuthorDate: Wed Jun 10 12:04:09 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Wed Jun 10 17:01:24 2020 +0200

Improve a SAL_WARN message

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 4d375f414719..99e6cafd6f9f 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -839,7 +839,8 @@ Bridge::~Bridge() {
 osl::MutexGuard g(mutex_);
 SAL_WARN_IF(
 state_ == STATE_STARTED || state_ == STATE_TERMINATED, "binaryurp",
-"undisposed bridge, potential deadlock ahead");
+"undisposed bridge \"" << name_ <<"\" in state " << state_
+<< ", potential deadlock ahead");
 }
 #endif
 dispose();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2020-06-04 Thread Stephan Bergmann (via logerrit)
 binaryurp/source/bridge.cxx |   18 +-
 1 file changed, 17 insertions(+), 1 deletion(-)

New commits:
commit 56428bd9ad98221ad3631dd1e0d6c80881a88056
Author: Stephan Bergmann 
AuthorDate: Thu Jun 4 16:10:48 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jun 4 23:19:39 2020 +0200

Properly handle initial object queryInterface return value


 specifies that this shall return an ANY either 
of
type VOID (so handle that) or of type css.uno.XInterface with non-null 
value (so
throw exceptions for any other kinds of return values).

Various Linux Jenkins builds had recently started to sporadically fail 
during
UITest_calc_demo, hitting the

assert(
type.get()->eTypeClass == typelib_TypeClass_ANY ||
 type.equals(css::uno::TypeDescription(data_.pType)));

in the call to binaryurp::BinaryAny::getValue 
(binaryurp/source/binaryany.cxx),
e.g. <.  
While it
is unclear why those failures happen, they highlight that this code did not
properly handle all possible (valid or invalid) input.

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 1be59b933a70..4d375f414719 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -50,6 +50,7 @@
 #include 
 #include 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -873,10 +874,25 @@ css::uno::Reference< css::uno::XInterface > 
Bridge::getInstance(
 "com.sun.star.uno.XInterface::queryInterface"),
 false, inArgs, , );
 throwException(bExc, ret);
+auto const t = ret.getType();
+if (t.get()->eTypeClass == typelib_TypeClass_VOID) {
+return {};
+}
+if (!t.equals(ifc)) {
+throw css::uno::RuntimeException(
+"initial object queryInterface for OID \"" + sInstanceName + "\" 
returned ANY of type "
++ OUString::unacquired(()->pTypeName));
+}
+auto const val = *static_cast< uno_Interface ** >(ret.getValue(ifc));
+if (val == nullptr) {
+throw css::uno::RuntimeException(
+"initial object queryInterface for OID \"" + sInstanceName
++ "\" returned null css.uno.XInterface ANY");
+}
 return css::uno::Reference< css::uno::XInterface >(
 static_cast< css::uno::XInterface * >(
 binaryToCppMapping_.mapInterface(
-*static_cast< uno_Interface ** >(ret.getValue(ifc)),
+val,
 ifc.get())),
 SAL_NO_ACQUIRE);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source canvas/source cli_ure/source codemaker/source configmgr/qa configmgr/source connectivity/source cppuhelper/qa cppuhelper/source cppu/source dbaccess/so

2019-02-19 Thread Libreoffice Gerrit user
 binaryurp/source/bridge.cxx  |4 ++--
 canvas/source/cairo/cairo_canvashelper_text.cxx  |2 +-
 cli_ure/source/climaker/climaker_app.cxx |2 +-
 codemaker/source/cppumaker/cppumaker.cxx |2 +-
 codemaker/source/javamaker/javamaker.cxx |2 +-
 configmgr/qa/unit/test.cxx   |4 ++--
 configmgr/source/access.cxx  |6 +++---
 configmgr/source/configurationprovider.cxx   |2 +-
 configmgr/source/data.cxx|2 +-
 connectivity/source/drivers/dbase/DTable.cxx |4 ++--
 connectivity/source/drivers/mork/MStatement.cxx  |2 +-
 connectivity/source/drivers/odbc/OConnection.cxx |2 +-
 connectivity/source/parse/PColumn.cxx|2 +-
 connectivity/source/parse/sqliterator.cxx|2 +-
 cppu/source/threadpool/threadpool.cxx|2 +-
 cppuhelper/qa/propertysetmixin/test_propertysetmixin.cxx |8 
 cppuhelper/source/defaultbootstrap.cxx   |4 ++--
 dbaccess/source/core/api/KeySet.cxx  |2 +-
 dbaccess/source/core/api/querycontainer.cxx  |2 +-
 dbaccess/source/core/dataaccess/databasecontext.cxx  |2 +-
 dbaccess/source/core/dataaccess/databasedocument.cxx |2 +-
 dbaccess/source/core/misc/ContainerMediator.cxx  |2 +-
 dbaccess/source/core/misc/sdbcoretools.cxx   |4 ++--
 dbaccess/source/core/recovery/subcomponentrecovery.cxx   |4 ++--
 dbaccess/source/ext/macromigration/docinteraction.cxx|   10 +-
 dbaccess/source/ext/macromigration/migrationengine.cxx   |2 +-
 dbaccess/source/ui/app/AppController.cxx |4 ++--
 dbaccess/source/ui/app/AppDetailPageHelper.cxx   |2 +-
 dbaccess/source/ui/control/dbtreelistbox.cxx |2 +-
 dbaccess/source/ui/misc/WCopyTable.cxx   |4 ++--
 30 files changed, 47 insertions(+), 47 deletions(-)

New commits:
commit 5206992e6e9b22b48cea0a4a7626ee576c66492e
Author: Stephan Bergmann 
AuthorDate: Tue Feb 19 16:00:52 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Tue Feb 19 17:39:16 2019 +0100

Some uses of C++17 class template argument deduction

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 8b64e65647d7..8b086b71119b 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -205,8 +205,8 @@ Bridge::Bridge(
 }
 
 void Bridge::start() {
-rtl::Reference< Reader > r(new Reader(this));
-rtl::Reference< Writer > w(new Writer(this));
+rtl::Reference r(new Reader(this));
+rtl::Reference w(new Writer(this));
 {
 osl::MutexGuard g(mutex_);
 assert(
diff --git a/canvas/source/cairo/cairo_canvashelper_text.cxx 
b/canvas/source/cairo/cairo_canvashelper_text.cxx
index 85f68d8915be..39e1689c5b68 100644
--- a/canvas/source/cairo/cairo_canvashelper_text.cxx
+++ b/canvas/source/cairo/cairo_canvashelper_text.cxx
@@ -267,7 +267,7 @@ namespace cairocanvas
 
 clip_cairo_from_dev(*mpVirtualDevice);
 
-rtl::Reference< TextLayout > pTextLayout( new TextLayout(text, 
textDirection, 0, CanvasFont::Reference(dynamic_cast< CanvasFont* >( 
xFont.get() )), mpSurfaceProvider) );
+rtl::Reference pTextLayout( new TextLayout(text, textDirection, 0, 
CanvasFont::Reference(dynamic_cast< CanvasFont* >( xFont.get() )), 
mpSurfaceProvider) );
 pTextLayout->draw(mpCairo, *mpVirtualDevice, aOutpos, viewState, 
renderState);
 }
 
diff --git a/cli_ure/source/climaker/climaker_app.cxx 
b/cli_ure/source/climaker/climaker_app.cxx
index eb0cfefbba11..b268726b4db3 100644
--- a/cli_ure/source/climaker/climaker_app.cxx
+++ b/cli_ure/source/climaker/climaker_app.cxx
@@ -391,7 +391,7 @@ SAL_IMPLEMENT_MAIN()
 // now); a welcome clean-up would be to make TypeEmitter work on
 // unoidl::Entity directly like the other codemakers:
 css::uno::Reference< container::XSet > xSet( xTDmgr, UNO_QUERY_THROW );
-rtl::Reference< unoidl::Manager > unoidlMgr(new unoidl::Manager);
+rtl::Reference unoidlMgr(new unoidl::Manager);
 std::vector< rtl::Reference< unoidl::Provider > > unoidlMandatoryProvs;
 for (vector< OUString >::iterator i(extra_registries.begin());
  i != extra_registries.end(); ++i)
diff --git a/codemaker/source/cppumaker/cppumaker.cxx 
b/codemaker/source/cppumaker/cppumaker.cxx
index 927183918b1a..b1769eda87a6 100644
--- a/codemaker/source/cppumaker/cppumaker.cxx
+++ b/codemaker/source/cppumaker/cppumaker.cxx
@@ -43,7 +43,7 @@ SAL_IMPLEMENT_MAIN_WITH_ARGS(argc, argv) {
   

[Libreoffice-commits] core.git: binaryurp/source

2019-01-14 Thread Libreoffice Gerrit user
 binaryurp/source/binaryany.hxx  |4 +---
 binaryurp/source/bridge.hxx |4 ++--
 binaryurp/source/bridgefactory.hxx  |4 ++--
 binaryurp/source/currentcontext.cxx |6 +-
 binaryurp/source/currentcontext.hxx |   10 ++
 binaryurp/source/lessoperators.cxx  |4 ++--
 binaryurp/source/lessoperators.hxx  |8 +++-
 binaryurp/source/proxy.hxx  |4 +---
 binaryurp/source/unmarshal.hxx  |4 +---
 9 files changed, 15 insertions(+), 33 deletions(-)

New commits:
commit e01b9e772637bbb3b6d856bd0288fb9691bc234d
Author: Stephan Bergmann 
AuthorDate: Mon Jan 14 14:20:50 2019 +0100
Commit: Stephan Bergmann 
CommitDate: Mon Jan 14 15:28:21 2019 +0100

Use C++17 nested namespace definitions (in binaryurp)

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

diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 7b4a9011a256..8422ca1ac424 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -24,9 +24,7 @@
 
 #include 
 
-namespace com { namespace sun { namespace star { namespace uno {
-class TypeDescription;
-} } } }
+namespace com::sun::star::uno { class TypeDescription; }
 
 namespace binaryurp {
 
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index a258f331639e..4572e7e573c2 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -50,7 +50,7 @@ namespace binaryurp {
 class Proxy;
 class Reader;
 }
-namespace com { namespace sun { namespace star {
+namespace com::sun::star {
 namespace bridge { class XInstanceProvider; }
 namespace connection { class XConnection; }
 namespace lang { class XEventListener; }
@@ -60,7 +60,7 @@ namespace com { namespace sun { namespace star {
 class UnoInterfaceReference;
 class XInterface;
 }
-} } }
+}
 namespace rtl { class ByteSequence; }
 
 namespace binaryurp {
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index 048cbb8deeaf..1a83962ee6b7 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -35,13 +35,13 @@
 #include 
 #include 
 
-namespace com { namespace sun { namespace star {
+namespace com::sun::star {
 namespace connection { class XConnection; }
 namespace uno {
 class XComponentContext;
 class XInterface;
 }
-} } }
+}
 
 namespace binaryurp {
 
diff --git a/binaryurp/source/currentcontext.cxx 
b/binaryurp/source/currentcontext.cxx
index 510f2509486b..56c3306aae29 100644
--- a/binaryurp/source/currentcontext.cxx
+++ b/binaryurp/source/currentcontext.cxx
@@ -30,9 +30,7 @@
 
 #include "currentcontext.hxx"
 
-namespace binaryurp {
-
-namespace current_context {
+namespace binaryurp::current_context {
 
 css::uno::UnoInterfaceReference get() {
 css::uno::UnoInterfaceReference cc;
@@ -57,6 +55,4 @@ void set(css::uno::UnoInterfaceReference const & value) {
 
 }
 
-}
-
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/currentcontext.hxx 
b/binaryurp/source/currentcontext.hxx
index 2a929bf294f8..95600e62d713 100644
--- a/binaryurp/source/currentcontext.hxx
+++ b/binaryurp/source/currentcontext.hxx
@@ -22,13 +22,9 @@
 
 #include 
 
-namespace com { namespace sun { namespace star { namespace uno {
-class UnoInterfaceReference;
-} } } }
+namespace com::sun::star::uno { class UnoInterfaceReference; }
 
-namespace binaryurp {
-
-namespace current_context {
+namespace binaryurp::current_context {
 
 com::sun::star::uno::UnoInterfaceReference get();
 
@@ -36,8 +32,6 @@ void set(com::sun::star::uno::UnoInterfaceReference const & 
value);
 
 }
 
-}
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/binaryurp/source/lessoperators.cxx 
b/binaryurp/source/lessoperators.cxx
index 98857171f108..acab8117583f 100644
--- a/binaryurp/source/lessoperators.cxx
+++ b/binaryurp/source/lessoperators.cxx
@@ -30,7 +30,7 @@
 
 #include "lessoperators.hxx"
 
-namespace com { namespace sun { namespace star { namespace uno {
+namespace com::sun::star::uno {
 
 bool operator <(TypeDescription const & left, TypeDescription const & right) {
 assert(left.is() && right.is());
@@ -42,7 +42,7 @@ bool operator <(TypeDescription const & left, TypeDescription 
const & right) {
   OUString::unacquired(()->pTypeName)));
 }
 
-} } } }
+}
 
 namespace rtl {
 
diff --git a/binaryurp/source/lessoperators.hxx 
b/binaryurp/source/lessoperators.hxx
index 8090db850e66..65f2c5366ca3 100644
--- a/binaryurp/source/lessoperators.hxx
+++ b/binaryurp/source/lessoperators.hxx
@@ -22,16 +22,14 @@
 
 #include 
 
-namespace com { namespace sun { namespace star { namespace uno {
-class TypeDescription;
-} } } }
+namespace com::sun::star::uno { class TypeDescription; }
 namespace rtl { class ByteSequence; }
 
-namespace 

[Libreoffice-commits] core.git: binaryurp/source

2019-01-11 Thread Libreoffice Gerrit user
 binaryurp/source/bridge.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit a47b8f223847ce28330244bc0eef2e6b72f7f989
Author: Furkan Ahmet Kara 
AuthorDate: Sun Dec 30 15:13:04 2018 +0200
Commit: Michael Stahl 
CommitDate: Fri Jan 11 18:34:53 2019 +0100

tdf#112689:Replace chained O(U)StringBuffer::append() with operator+

Change-Id: Ieea40ab9cd15260b0174b9ac389d8c9f387b
Reviewed-on: https://gerrit.libreoffice.org/65746
Tested-by: Jenkins
Reviewed-by: Michael Stahl 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 90877f0754c0..8b64e65647d7 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -888,10 +888,8 @@ OUString Bridge::getName() {
 }
 
 OUString Bridge::getDescription() {
-OUStringBuffer b(name_);
-b.append(':');
-b.append(connection_->getDescription());
-return b.makeStringAndClear();
+OUString b = name_ + ":" + connection_->getDescription();
+return b;
 }
 
 void Bridge::dispose() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2018-12-08 Thread Libreoffice Gerrit user
 binaryurp/source/bridge.cxx |3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

New commits:
commit 777a3f0a157402b249789e19a6fd5750c44ca971
Author: Stephan Bergmann 
AuthorDate: Sat Dec 8 17:31:59 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Sat Dec 8 22:02:18 2018 +0100

Use [[maybe_unused]] instead of cast to void

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

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 04f9ae5df2dc..90877f0754c0 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -769,9 +769,8 @@ void Bridge::handleCommitChangeRequest(
 BinaryAny ret;
 assert(inArguments.size() == 1);
 css::uno::Sequence< css::bridge::ProtocolProperty > s;
-bool ok = (mapBinaryToCppAny(inArguments[0]) >>= s);
+[[maybe_unused]] bool ok = (mapBinaryToCppAny(inArguments[0]) >>= s);
 assert(ok);
-(void) ok; // avoid warnings
 for (sal_Int32 i = 0; i != s.getLength(); ++i) {
 if (s[i].Name == "CurrentContext") {
 bCcMode = true;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2018-12-05 Thread Libreoffice Gerrit user
 binaryurp/source/cache.hxx |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit 23e32f46b169bf1ec69266c925dabf7c93ba8109
Author: Stephan Bergmann 
AuthorDate: Wed Dec 5 23:16:56 2018 +0100
Commit: Stephan Bergmann 
CommitDate: Thu Dec 6 08:19:25 2018 +0100

Use structured binding

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

diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index d1c1df7e32bf..722e7494bd8e 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -55,26 +55,25 @@ public:
 }
 // try to insert into the map
 list_.push_front( rContent); // create a temp entry
-typedef std::pair MapPair;
-MapPair aMP = map_.emplace( list_.begin(), 0 );
-*pbFound = !aMP.second;
+auto const [it, inserted] = map_.emplace( list_.begin(), 0 );
+*pbFound = !inserted;
 
-if( !aMP.second) { // insertion not needed => found the entry
+if( !inserted) { // insertion not needed => found the entry
 list_.pop_front(); // remove the temp entry
-list_.splice( list_.begin(), list_, aMP.first->first); // the 
found entry is moved to front
-return aMP.first->second;
+list_.splice( list_.begin(), list_, it->first); // the found entry 
is moved to front
+return it->second;
 }
 
 // test insertion successful => it was new so we keep it
 IdxType n = static_cast( map_.size() - 1);
 if( n >= size_) { // cache full => replace the LRU entry
 // find the least recently used element in the map
-typename LruItMap::iterator it = map_.find( --list_.end());
-n = it->second;
-map_.erase( it); // remove it from the map
+typename LruItMap::iterator lru = map_.find( --list_.end());
+n = lru->second;
+map_.erase( lru); // remove it from the map
 list_.pop_back(); // remove from the list
 }
-aMP.first->second = n;
+it->second = n;
 return n;
 }
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source bridges/source cli_ure/source cppuhelper/source cppu/source filter/source forms/source idlc/source io/source javaunohelper/source registry/source regis

2018-08-29 Thread Libreoffice Gerrit user
 binaryurp/source/unmarshal.cxx  |2 
 bridges/source/cpp_uno/msvc_win32_intel/except.cxx  |   12 -
 bridges/source/cpp_uno/msvc_win32_x86-64/except.cxx |4 
 bridges/source/jni_uno/jni_base.h   |6 
 cli_ure/source/uno_bridge/cli_base.h|6 
 cppu/source/uno/copy.hxx|   22 +--
 cppu/source/uno/destr.hxx   |   12 -
 cppu/source/uno/sequence.cxx|   10 -
 cppuhelper/source/component_context.cxx |2 
 filter/source/graphicfilter/ipcd/ipcd.cxx   |   48 +++
 forms/source/xforms/xpathlib/xpathlib.cxx   |6 
 idlc/source/aststack.cxx|4 
 idlc/source/idlccompile.cxx |4 
 io/source/stm/streamhelper.cxx  |6 
 javaunohelper/source/bootstrap.cxx  |2 
 registry/source/keyimpl.cxx |  124 ++--
 registry/source/regimpl.cxx |   12 -
 registry/source/regkey.cxx  |   14 +-
 registry/test/testregcpp.cxx|   12 -
 sal/rtl/alloc_cache.cxx |7 -
 sdext/source/pdfimport/inc/pdfparse.hxx |2 
 sdext/source/pdfimport/pdfparse/pdfentries.cxx  |   22 +--
 sdext/source/pdfimport/pdfparse/pdfparse.cxx|4 
 sdext/source/pdfimport/test/pdfunzip.cxx|6 
 store/source/lockbyte.cxx   |4 
 store/source/storbase.hxx   |4 
 store/source/storbios.cxx   |6 
 store/source/storcach.cxx   |6 
 svl/source/misc/strmadpt.cxx|   12 -
 sw/source/filter/ww8/ww8par.cxx |2 
 ucb/source/ucp/ftp/ftpurl.cxx   |4 
 vcl/headless/svpprn.cxx |2 
 vcl/osx/salprn.cxx  |6 
 vcl/qt5/Qt5Instance_Print.cxx   |2 
 vcl/quartz/salbmp.cxx   |6 
 vcl/quartz/salvd.cxx|8 -
 vcl/quartz/utils.cxx|4 
 vcl/source/filter/igif/decode.cxx   |6 
 vcl/source/filter/igif/gifread.cxx  |2 
 vcl/source/fontsubset/list.cxx  |   11 -
 vcl/source/gdi/impvect.cxx  |6 
 vcl/source/gdi/jobset.cxx   |6 
 vcl/source/gdi/octree.cxx   |8 -
 vcl/source/gdi/pdfwriter_impl.cxx   |2 
 vcl/source/gdi/pdfwriter_impl2.cxx  |7 -
 vcl/source/gdi/print.cxx|2 
 vcl/unx/generic/app/sm.cxx  |   12 -
 vcl/unx/generic/dtrans/bmp.cxx  |6 
 vcl/unx/generic/print/genprnpsp.cxx |4 
 vcl/unx/generic/printer/jobdata.cxx |2 
 vcl/win/gdi/salprn.cxx  |   42 +++---
 51 files changed, 265 insertions(+), 266 deletions(-)

New commits:
commit 37f9fdc11c4e95d6a34cb515a454503256a82c63
Author: Noel Grandin 
AuthorDate: Tue Aug 28 09:09:33 2018 +0200
Commit: Noel Grandin 
CommitDate: Wed Aug 29 09:05:39 2018 +0200

replace rtl_allocateMemory with std::malloc

where used directly, since rtl_allocateMemory now just calls into 
std::malloc

Change-Id: I59f85bdb7efdf6baa30e8fcd2370c0f8e9c999ad
Reviewed-on: https://gerrit.libreoffice.org/59685
Tested-by: Jenkins
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index 3ea3d2058553..41145ccffca5 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -55,7 +55,7 @@ namespace binaryurp {
 namespace {
 
 void * allocate(sal_Size size) {
-void * p = rtl_allocateMemory(size);
+void * p = std::malloc(size);
 if (p == nullptr) {
 throw std::bad_alloc();
 }
diff --git a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx 
b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
index 82fcf345cd0d..8e6a1795f898 100644
--- a/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
+++ b/bridges/source/cpp_uno/msvc_win32_intel/except.cxx
@@ -132,7 +132,7 @@ type_info * RTTInfos::getRTTI( OUString const & rUNOname ) 
throw ()
 {
 // insert new type_info
 OString aRawName( OUStringToOString( toRTTIname( rUNOname ), 
RTL_TEXTENCODING_ASCII_US ) );
-__type_info * pRTTI = new( ::rtl_allocateMemory( sizeof(__type_info) + 
aRawName.getLength() ) )
+__type_info * pRTTI = new( std::malloc( sizeof(__type_info) + 
aRawName.getLength() ) )
 __type_info( NULL, aRawName.getStr() );
 
 // put into map
@@ -162,7 +162,7 @@ RTTInfos::~RTTInfos() throw ()
 {
  

[Libreoffice-commits] core.git: binaryurp/source

2017-11-23 Thread Julien Nabet
 binaryurp/source/incomingrequest.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit d3c607b4bbcc1727ba0d295ac7193bea2874ed5b
Author: Julien Nabet 
Date:   Fri Nov 17 19:16:04 2017 +0100

Replace list by vector in incomingrequest (binaryurp)

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

diff --git a/binaryurp/source/incomingrequest.cxx 
b/binaryurp/source/incomingrequest.cxx
index 86b3cc107c05..c54493d6e32a 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -174,7 +174,7 @@ bool IncomingRequest::execute_throw(
 {
 assert(object_.is());
 css::uno::TypeDescription retType;
-std::list< std::vector< char > > outBufs;
+std::vector< std::vector< char > > outBufs;
 std::vector< void * > args;
 switch (member_.get()->eTypeClass) {
 case typelib_TypeClass_INTERFACE_ATTRIBUTE:
@@ -257,7 +257,7 @@ bool IncomingRequest::execute_throw(
 typelib_InterfaceMethodTypeDescription * >(
 member_.get());
 std::vector< BinaryAny >::iterator 
i(outArguments->begin());
-std::list< std::vector< char > >::iterator j(
+std::vector< std::vector< char > >::iterator j(
 outBufs.begin());
 for (sal_Int32 k = 0; k != mtd->nParams; ++k) {
 if (mtd->pParams[k].bOut) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2017-11-22 Thread Julien Nabet
 binaryurp/source/bridge.cxx |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit 86cda9ab3cdfc2f253b4d2f44dd00f40d8574210
Author: Julien Nabet 
Date:   Wed Nov 22 18:48:12 2017 +0100

Revert partly 9d1f61a61893435b26f7239136ad92b7354545a8

The use of erase/remove idiom is wrong here since "there can be multiple
registrations of the same listener"

See Stephan's comments in 
https://gerrit.libreoffice.org/#/c/44892/3/binaryurp/source/bridge.cxx

Change-Id: Iebf979ca25520392ba9de6439d5bf19b8e3446b2
Reviewed-on: https://gerrit.libreoffice.org/45104
Tested-by: Julien Nabet 
Reviewed-by: Julien Nabet 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 92a1665d8a45..d39d1f24e667 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -927,7 +927,11 @@ void Bridge::removeEventListener(
 css::uno::Reference< css::lang::XEventListener > const & aListener)
 {
 osl::MutexGuard g(mutex_);
-listeners_.erase(std::remove(listeners_.begin(), listeners_.end(), 
aListener), listeners_.end());
+Listeners::iterator i(
+std::find(listeners_.begin(), listeners_.end(), aListener));
+if (i != listeners_.end()) {
+listeners_.erase(i);
+}
 }
 
 void Bridge::sendCommitChangeRequest() {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2017-11-17 Thread Julien Nabet
 binaryurp/source/bridge.cxx|   27 
 binaryurp/source/bridge.hxx|3 --
 binaryurp/source/bridgefactory.cxx |   40 ++---
 binaryurp/source/bridgefactory.hxx |8 +++
 4 files changed, 38 insertions(+), 40 deletions(-)

New commits:
commit 9d1f61a61893435b26f7239136ad92b7354545a8
Author: Julien Nabet 
Date:   Fri Nov 17 19:05:44 2017 +0100

Replace some lists by vectors in binaryurp

+ use for range loops

Change-Id: Ied18e378b73826c5a47957cad6cf86a4e19a9230
Reviewed-on: https://gerrit.libreoffice.org/44892
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 4460de1d3c60..92a1665d8a45 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -313,21 +313,23 @@ void Bridge::terminate(bool final) {
 osl::MutexGuard g(mutex_);
 s.swap(stubs_);
 }
-for (Stubs::iterator i(s.begin()); i != s.end(); ++i) {
-for (Stub::iterator j(i->second.begin()); j != i->second.end(); 
++j)
+for (auto & stub : s)
+{
+for (auto & item : stub.second)
 {
 SAL_INFO(
 "binaryurp",
-"stub '" << i->first << "', '" << toString(j->first)
+"stub '" << stub.first << "', '" << toString(item.first)
 << "' still mapped at Bridge::terminate");
 binaryUno_.get()->pExtEnv->revokeInterface(
-binaryUno_.get()->pExtEnv, j->second.object.get());
+binaryUno_.get()->pExtEnv, item.second.object.get());
 }
 }
 factory_->removeBridge(this);
-for (Listeners::iterator i(ls.begin()); i != ls.end(); ++i) {
+for (auto const& listener : ls)
+{
 try {
-(*i)->disposing(
+listener->disposing(
 css::lang::EventObject(
 static_cast< cppu::OWeakObject * >(this)));
 } catch (const css::uno::RuntimeException & e) {
@@ -464,11 +466,12 @@ css::uno::UnoInterfaceReference Bridge::findStub(
 if (j != i->second.end()) {
 return j->second.object;
 }
-for (j = i->second.begin(); j != i->second.end(); ++j) {
+for (auto const& item : i->second)
+{
 if (typelib_typedescription_isAssignableFrom(
-type.get(), j->first.get()))
+type.get(), item.first.get()))
 {
-return j->second.object;
+return item.second.object;
 }
 }
 }
@@ -924,11 +927,7 @@ void Bridge::removeEventListener(
 css::uno::Reference< css::lang::XEventListener > const & aListener)
 {
 osl::MutexGuard g(mutex_);
-Listeners::iterator i(
-std::find(listeners_.begin(), listeners_.end(), aListener));
-if (i != listeners_.end()) {
-listeners_.erase(i);
-}
+listeners_.erase(std::remove(listeners_.begin(), listeners_.end(), 
aListener), listeners_.end());
 }
 
 void Bridge::sendCommitChangeRequest() {
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index 476d4af1cf22..a258f331639e 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -23,7 +23,6 @@
 #include 
 
 #include 
-#include 
 #include 
 #include 
 
@@ -221,7 +220,7 @@ private:
 void checkDisposed();
 
 typedef
-std::list<
+std::vector<
 com::sun::star::uno::Reference<
 com::sun::star::lang::XEventListener > >
 Listeners;
diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 7da9ccd39aa0..b1e3be93ea74 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -64,17 +64,15 @@ void BridgeFactory::removeBridge(
 assert(bridge.is());
 OUString n(bridge->getName());
 osl::MutexGuard g(m_aMutex);
-if (n.isEmpty()) {
-BridgeList::iterator i(
-std::find(unnamed_.begin(), unnamed_.end(), bridge));
-if (i != unnamed_.end()) {
-unnamed_.erase(i);
-}
-} else {
+if (n.isEmpty())
+{
+unnamed_.erase(std::remove(unnamed_.begin(), unnamed_.end(), bridge), 
unnamed_.end());
+}
+else
+{
 BridgeMap::iterator i(named_.find(n));
-if (i != named_.end() && i->second == bridge) {
+if (i != named_.end() && i->second == bridge)
 named_.erase(i);
-}
 }
 }
 
@@ -161,35 +159,37 @@ BridgeFactory::getExistingBridges() {
 n = static_cast< sal_Int32 >(n + named_.size());
 css::uno::Sequence< css::uno::Reference< css::bridge::XBridge > > s(n);
 sal_Int32 i = 0;
-for (BridgeList::iterator 

[Libreoffice-commits] core.git: binaryurp/source bridges/inc cppu/source include/sax include/unotools sax/source unotools/source

2017-10-26 Thread Noel Grandin
 binaryurp/source/bridge.cxx   |2 -
 bridges/inc/cppinterfaceproxy.hxx |2 -
 cppu/source/uno/lbenv.cxx |4 +-
 include/sax/fastattribs.hxx   |4 +-
 include/unotools/extendedsecurityoptions.hxx  |2 -
 include/unotools/lingucfg.hxx |6 +--
 include/unotools/localedatawrapper.hxx|4 +-
 include/unotools/moduleoptions.hxx|2 -
 include/unotools/syslocaleoptions.hxx |2 -
 include/unotools/tempfile.hxx |2 -
 include/unotools/textsearch.hxx   |2 -
 sax/source/tools/fastattribs.cxx  |4 +-
 unotools/source/accessibility/accessiblerelationsethelper.cxx |   16 +-
 unotools/source/config/eventcfg.cxx   |8 ++---
 unotools/source/config/extendedsecurityoptions.cxx|4 +-
 unotools/source/config/historyoptions.cxx |4 +-
 unotools/source/config/lingucfg.cxx   |6 +--
 unotools/source/config/moduleoptions.cxx  |2 -
 unotools/source/config/syslocaleoptions.cxx   |6 +--
 unotools/source/i18n/localedatawrapper.cxx|4 +-
 unotools/source/i18n/textsearch.cxx   |2 -
 unotools/source/ucbhelper/tempfile.cxx|2 -
 22 files changed, 45 insertions(+), 45 deletions(-)

New commits:
commit d9b6f4fd38da9f875b78f6ff365bcb16fb2c8e8b
Author: Noel Grandin 
Date:   Wed Oct 25 17:12:09 2017 +0200

loplugin:constmethods in unotools

Change-Id: I13df4e184a826682f34a1d9e974b601397ba4a3d
Reviewed-on: https://gerrit.libreoffice.org/43865
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index fcb26805f1e7..4460de1d3c60 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -104,7 +104,7 @@ public:
 
 ~AttachThread();
 
-const rtl::ByteSequence& getTid() throw () { return tid_;}
+const rtl::ByteSequence& getTid() const throw () { return tid_;}
 
 private:
 AttachThread(const AttachThread&) = delete;
diff --git a/bridges/inc/cppinterfaceproxy.hxx 
b/bridges/inc/cppinterfaceproxy.hxx
index ae6e36092e51..0b97264e42f0 100644
--- a/bridges/inc/cppinterfaceproxy.hxx
+++ b/bridges/inc/cppinterfaceproxy.hxx
@@ -66,7 +66,7 @@ public:
 Bridge * getBridge() { return pBridge; }
 uno_Interface * getUnoI() { return pUnoI; }
 typelib_InterfaceTypeDescription * getTypeDescr() { return pTypeDescr; }
-const OUString& getOid() { return oid; }
+const OUString& getOid() const { return oid; }
 
 // non virtual methods called on incoming vtable calls #1, #2
 void acquireProxy();
diff --git a/cppu/source/uno/lbenv.cxx b/cppu/source/uno/lbenv.cxx
index 01a300ed94d1..76bf88e6e002 100644
--- a/cppu/source/uno/lbenv.cxx
+++ b/cppu/source/uno/lbenv.cxx
@@ -88,7 +88,7 @@ struct ObjectEntry
 uno_freeProxyFunc fpFreeProxy );
 inline InterfaceEntry * find(
 typelib_InterfaceTypeDescription * pTypeDescr );
-inline sal_Int32 find( void const * iface_ptr, std::size_t pos );
+inline sal_Int32 find( void const * iface_ptr, std::size_t pos ) const;
 };
 
 
@@ -211,7 +211,7 @@ inline InterfaceEntry * ObjectEntry::find(
 
 
 inline sal_Int32 ObjectEntry::find(
-void const * iface_ptr, std::size_t pos )
+void const * iface_ptr, std::size_t pos ) const
 {
 std::size_t size = aInterfaces.size();
 for ( ; pos < size; ++pos )
diff --git a/include/sax/fastattribs.hxx b/include/sax/fastattribs.hxx
index 75dca6a83f7f..1f343a7235b9 100644
--- a/include/sax/fastattribs.hxx
+++ b/include/sax/fastattribs.hxx
@@ -89,8 +89,8 @@ public:
 sal_Int32 AttributeValueLength(size_t i) const { return 
maAttributeValues[i + 1] - maAttributeValues[i] - 1; }
 
 // performance sensitive shortcuts to avoid allocation ...
-bool getAsInteger( sal_Int32 nToken, sal_Int32 );
-bool getAsDouble( sal_Int32 nToken, double );
+bool getAsInteger( sal_Int32 nToken, sal_Int32 ) const;
+bool getAsDouble( sal_Int32 nToken, double ) const;
 bool getAsChar( sal_Int32 nToken, const char*& rPos ) const;
 
 // XFastAttributeList
diff --git a/include/unotools/extendedsecurityoptions.hxx 
b/include/unotools/extendedsecurityoptions.hxx
index 7eb3d80a7a9d..8a5f271f43ce 100644
--- a/include/unotools/extendedsecurityoptions.hxx
+++ b/include/unotools/extendedsecurityoptions.hxx
@@ -55,7 +55,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC 
SvtExtendedSecurityOptions : public utl
  SvtExtendedSecurityOptions();
 virtual 

[Libreoffice-commits] core.git: binaryurp/source

2017-10-10 Thread Mike Kaganski
 binaryurp/source/binaryany.cxx  |8 ++--
 binaryurp/source/binaryany.hxx  |4 +-
 binaryurp/source/bridge.cxx |   64 
 binaryurp/source/bridge.hxx |   28 +++---
 binaryurp/source/bridgefactory.cxx  |   28 +++---
 binaryurp/source/bridgefactory.hxx  |   18 -
 binaryurp/source/cache.hxx  |4 +-
 binaryurp/source/currentcontext.cxx |   20 +-
 binaryurp/source/currentcontext.hxx |2 -
 binaryurp/source/incomingreply.hxx  |2 -
 binaryurp/source/incomingrequest.cxx|   24 ++--
 binaryurp/source/incomingrequest.hxx|   14 +++
 binaryurp/source/lessoperators.cxx  |   12 +++---
 binaryurp/source/lessoperators.hxx  |2 -
 binaryurp/source/marshal.cxx|   34 -
 binaryurp/source/marshal.hxx|   12 +++---
 binaryurp/source/outgoingrequest.hxx|4 +-
 binaryurp/source/outgoingrequests.cxx   |8 ++--
 binaryurp/source/outgoingrequests.hxx   |4 +-
 binaryurp/source/proxy.cxx  |   22 +--
 binaryurp/source/proxy.hxx  |   14 +++
 binaryurp/source/reader.cxx |   38 +--
 binaryurp/source/reader.hxx |   16 
 binaryurp/source/readerstate.hxx|8 ++--
 binaryurp/source/specialfunctionids.hxx |2 -
 binaryurp/source/unmarshal.cxx  |   40 ++--
 binaryurp/source/unmarshal.hxx  |   10 ++---
 binaryurp/source/writer.cxx |   18 -
 binaryurp/source/writer.hxx |   18 -
 binaryurp/source/writerstate.hxx|8 ++--
 30 files changed, 243 insertions(+), 243 deletions(-)

New commits:
commit ff578127e279c1f9949923c601636aa274d52892
Author: Mike Kaganski 
Date:   Wed Oct 11 00:28:36 2017 +0300

binaryurp: consistently use "" and <> for include directives

Change-Id: If328428d7f88d8a16057acd3a07bbd8dab83
Reviewed-on: https://gerrit.libreoffice.org/43318
Tested-by: Jenkins 
Reviewed-by: Mike Kaganski 

diff --git a/binaryurp/source/binaryany.cxx b/binaryurp/source/binaryany.cxx
index a4163767ec3c..af1493331160 100644
--- a/binaryurp/source/binaryany.cxx
+++ b/binaryurp/source/binaryany.cxx
@@ -17,14 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include 
 
 #include 
 #include 
 
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.hxx"
-#include "uno/any2.h"
+#include 
+#include 
+#include 
 
 #include "binaryany.hxx"
 
diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 1faf4841b79b..7b4a9011a256 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -20,9 +20,9 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
 #define INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
 
-#include "sal/config.h"
+#include 
 
-#include "uno/any2.h"
+#include 
 
 namespace com { namespace sun { namespace star { namespace uno {
 class TypeDescription;
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index a31722418864..fcb26805f1e7 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include 
 
 #include 
 #include 
@@ -26,37 +26,37 @@
 #include 
 #include 
 
-#include "com/sun/star/bridge/InvalidProtocolChangeException.hpp"
-#include "com/sun/star/bridge/XBridge.hpp"
-#include "com/sun/star/bridge/XInstanceProvider.hpp"
-#include "com/sun/star/bridge/XProtocolProperties.hpp"
-#include "com/sun/star/connection/XConnection.hpp"
-#include "com/sun/star/io/IOException.hpp"
-#include "com/sun/star/lang/DisposedException.hpp"
-#include "com/sun/star/lang/EventObject.hpp"
-#include "com/sun/star/lang/XEventListener.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "cppuhelper/weak.hxx"
-#include "osl/mutex.hxx"
-#include "osl/thread.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/random.h"
-#include "rtl/ref.hxx"
-#include "rtl/ustrbuf.hxx"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/log.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
-#include "uno/environment.hxx"
-#include "uno/lbnames.h"
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 
+#include 

[Libreoffice-commits] core.git: binaryurp/source

2017-08-25 Thread Stephan Bergmann
 binaryurp/source/proxy.cxx |4 ++--
 binaryurp/source/proxy.hxx |6 --
 2 files changed, 6 insertions(+), 4 deletions(-)

New commits:
commit e9d64ca080ed0cf2dcb56be13bee1bffbff880fd
Author: Stephan Bergmann 
Date:   Fri Aug 25 20:32:22 2017 +0200

Replace use of oslInterlockedCount with std::atomic

The assumption in using std::size_t is that every acquisition can be 
associated
with a unique memory location in the local address space, so the counter 
cannot
overflow.

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

diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 1834968fa50b..699037f915dd 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -76,13 +76,13 @@ Proxy::Proxy(
 
 
 void Proxy::do_acquire() {
-if (osl_atomic_increment(_) == 1) {
+if (++references_ == 1) {
 bridge_->resurrectProxy(*this);
 }
 }
 
 void Proxy::do_release() {
-if (osl_atomic_decrement(_) == 0) {
+if (--references_ == 0) {
 bridge_->revokeProxy(*this);
 }
 }
diff --git a/binaryurp/source/proxy.hxx b/binaryurp/source/proxy.hxx
index 5ad8cee120dc..e8ed0fea2dad 100644
--- a/binaryurp/source/proxy.hxx
+++ b/binaryurp/source/proxy.hxx
@@ -22,7 +22,9 @@
 
 #include "sal/config.h"
 
-#include "osl/interlck.h"
+#include 
+#include 
+
 #include "rtl/ref.hxx"
 #include "rtl/ustring.hxx"
 #include "typelib/typedescription.h"
@@ -78,7 +80,7 @@ private:
 rtl::Reference< Bridge > bridge_;
 OUString oid_;
 com::sun::star::uno::TypeDescription type_;
-oslInterlockedCount references_;
+std::atomic references_;
 };
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source chart2/source rsc/inc rsc/source vcl/inc vcl/source

2016-11-15 Thread Noel Grandin
 binaryurp/source/bridgefactory.cxx  |   10 --
 binaryurp/source/bridgefactory.hxx  |6 +-
 chart2/source/view/inc/GL3DRenderer.hxx |2 --
 rsc/inc/rscdb.hxx   |1 -
 rsc/source/parser/rscdb.cxx |1 -
 vcl/inc/image.h |3 ---
 vcl/source/image/ImplImage.cxx  |3 +--
 vcl/source/image/ImplImageList.cxx  |2 --
 8 files changed, 6 insertions(+), 22 deletions(-)

New commits:
commit 8d4a306eb04742f499ab693e7f8ebd3ae3c01415
Author: Noel Grandin 
Date:   Tue Nov 15 11:26:59 2016 +0200

loplugin:unusedfields

Change-Id: I1400ca0af2c357dff06e5f733ec62b13d6a96461
Reviewed-on: https://gerrit.libreoffice.org/30861
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 3328d35..6e7e756 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -42,9 +42,9 @@
 namespace binaryurp {
 
 css::uno::Reference< css::uno::XInterface > BridgeFactory::static_create(
-css::uno::Reference< css::uno::XComponentContext > const & xContext)
+css::uno::Reference< css::uno::XComponentContext > const & /*xContext*/)
 {
-return static_cast< cppu::OWeakObject * >(new BridgeFactory(xContext));
+return static_cast< cppu::OWeakObject * >(new BridgeFactory);
 }
 
 OUString BridgeFactory::static_getImplementationName() {
@@ -76,11 +76,9 @@ void BridgeFactory::removeBridge(
 }
 }
 
-BridgeFactory::BridgeFactory(
-css::uno::Reference< css::uno::XComponentContext > const & context):
-BridgeFactoryBase(m_aMutex), context_(context)
+BridgeFactory::BridgeFactory():
+BridgeFactoryBase(m_aMutex)
 {
-assert(context.is());
 }
 
 BridgeFactory::~BridgeFactory() {}
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index f1cc4bb..05e39b3 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -78,9 +78,7 @@ private:
 BridgeFactory(const BridgeFactory&) = delete;
 BridgeFactory& operator=(const BridgeFactory&) = delete;
 
-explicit BridgeFactory(
-com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext 
>
-const & context);
+BridgeFactory();
 
 virtual ~BridgeFactory() override;
 
@@ -129,8 +127,6 @@ private:
 com::sun::star::uno::Reference< com::sun::star::bridge::XBridge > >
 BridgeMap;
 
-com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
-context_;
 BridgeList unnamed_;
 BridgeMap named_;
 };
diff --git a/chart2/source/view/inc/GL3DRenderer.hxx 
b/chart2/source/view/inc/GL3DRenderer.hxx
index b0d45df..ca99ec2 100644
--- a/chart2/source/view/inc/GL3DRenderer.hxx
+++ b/chart2/source/view/inc/GL3DRenderer.hxx
@@ -50,8 +50,6 @@ struct MaterialParameters
 
 bool twoSidesLighting;
 float shininess;
-float pad;
-float pad1;
 };
 
 struct LightSource
diff --git a/rsc/inc/rscdb.hxx b/rsc/inc/rscdb.hxx
index a60447f..8e6024d 100644
--- a/rsc/inc/rscdb.hxx
+++ b/rsc/inc/rscdb.hxx
@@ -123,7 +123,6 @@ public:
 RscString   aStringLiteral;
 RscLangEnum aLangType;
 RscLangArrayaLangString;
-RscLangArrayaLangShort;
 
 RscError*   pEH;// error handler
 RscNameTableaNmTb;  // name table
diff --git a/rsc/source/parser/rscdb.cxx b/rsc/source/parser/rscdb.cxx
index 6f53e10..3fdf4dc 100644
--- a/rsc/source/parser/rscdb.cxx
+++ b/rsc/source/parser/rscdb.cxx
@@ -58,7 +58,6 @@ RscTypCont::RscTypCont( RscError * pErrHdl,
 , aStringLiteral( pHS->getID( "Chars" ), RSC_NOTYPE )
 , aLangType()
 , aLangString( pHS->getID( "Lang_Chars" ), RSC_NOTYPE, , 
 )
-, aLangShort( pHS->getID( "Lang_short" ), RSC_NOTYPE, ,  )
 , pEH(pErrHdl)
 , nFlags( nFlagsP )
 {
diff --git a/vcl/inc/image.h b/vcl/inc/image.h
index f737a14..5446dc7d 100644
--- a/vcl/inc/image.h
+++ b/vcl/inc/image.h
@@ -52,7 +52,6 @@ struct ImplImageList
 ImageAryDataNameHash   maNameHash;
 OUString   maPrefix;
 Size   maImageSize;
-sal_uIntPtrmnRefCount;
 
 ImplImageList();
 ImplImageList( const ImplImageList  );
@@ -65,8 +64,6 @@ struct ImplImageList
 
 struct ImplImage
 {
-sal_uIntPtr mnRefCount;
-
 BitmapChecksum maBitmapChecksum;
 
 std::unique_ptr mpBitmapEx;
diff --git a/vcl/source/image/ImplImage.cxx b/vcl/source/image/ImplImage.cxx
index 52e5083..ad43120 100644
--- a/vcl/source/image/ImplImage.cxx
+++ b/vcl/source/image/ImplImage.cxx
@@ -30,8 +30,7 @@
 #include 
 
 ImplImage::ImplImage()
-: mnRefCount(1)
-, maBitmapChecksum(0)
+: maBitmapChecksum(0)
 , mpBitmapEx()
 , maDisabledBitmapEx()
 {
diff --git a/vcl/source/image/ImplImageList.cxx 

[Libreoffice-commits] core.git: binaryurp/source

2016-09-16 Thread Stephan Bergmann
 binaryurp/source/incomingrequest.cxx  |   51 +-
 binaryurp/source/outgoingrequests.cxx |6 ++--
 binaryurp/source/writer.cxx   |   45 --
 3 files changed, 54 insertions(+), 48 deletions(-)

New commits:
commit 0ba00ee1a2e4e711aca31cda7b1d8ef7a33c95b4
Author: Stephan Bergmann 
Date:   Fri Sep 16 15:17:37 2016 +0200

Replace remaining OSL_ASSERT etc. in binaryurp

Change-Id: I6f013cacbefe9c681baa3e91f73f4fc05c99ba78

diff --git a/binaryurp/source/incomingrequest.cxx 
b/binaryurp/source/incomingrequest.cxx
index 2413b68..cf66f9c 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -19,6 +19,7 @@
 
 #include "sal/config.h"
 
+#include 
 #include 
 #include 
 
@@ -27,6 +28,7 @@
 #include "rtl/byteseq.hxx"
 #include "rtl/ref.hxx"
 #include "rtl/ustring.hxx"
+#include "sal/log.hxx"
 #include "sal/types.h"
 #include "typelib/typedescription.hxx"
 #include "uno/dispatcher.hxx"
@@ -51,7 +53,9 @@ IncomingRequest::IncomingRequest(
 setter_(setter), inArguments_(inArguments),
 currentContextMode_(currentContextMode), currentContext_(currentContext)
 {
-OSL_ASSERT(bridge.is() && member.is() && member.get()->bComplete);
+assert(bridge.is());
+assert(member.is());
+assert(member.get()->bComplete);
 }
 
 IncomingRequest::~IncomingRequest() {}
@@ -98,17 +102,14 @@ void IncomingRequest::execute() const {
 tid_, member_, setter_, isExc, ret, outArgs, false);
 return;
 } catch (const css::uno::RuntimeException & e) {
-OSL_TRACE(
-"caught UNO runtime exception '%s'",
-(OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
- getStr()));
+SAL_INFO("binaryurp", "caught UNO runtime exception " << 
e.Message);
 } catch (const std::exception & e) {
-OSL_TRACE("caught C++ exception '%s'", e.what());
+SAL_INFO("binaryurp", "caught C++ exception " << e.what());
 }
 bridge_->terminate(false);
 } else {
 if (isExc) {
-OSL_TRACE("oneway method raised exception");
+SAL_INFO("binaryurp", "oneway method raised exception");
 }
 bridge_->decrementCalls();
 }
@@ -122,15 +123,16 @@ static size_t size_t_round(size_t val)
 bool IncomingRequest::execute_throw(
 BinaryAny * returnValue, std::vector< BinaryAny > * outArguments) const
 {
-OSL_ASSERT(
-returnValue != nullptr &&
+assert(returnValue != nullptr);
+assert(
 returnValue->getType().equals(
-css::uno::TypeDescription(cppu::UnoType::get())) &&
-outArguments != nullptr && outArguments->empty());
+css::uno::TypeDescription(cppu::UnoType::get(;
+assert(outArguments != nullptr);
+assert(outArguments->empty());
 bool isExc = false;
 switch (functionId_) {
 case SPECIAL_FUNCTION_ID_RESERVED:
-OSL_ASSERT(false); // this cannot happen
+assert(false); // this cannot happen
 break;
 case SPECIAL_FUNCTION_ID_RELEASE:
 bridge_->releaseStub(oid_, type_);
@@ -144,11 +146,10 @@ bool IncomingRequest::execute_throw(
 try {
 ifc = prov->getInstance(oid_);
 } catch (const css::container::NoSuchElementException & e) {
-OSL_TRACE(
-"initial element '%s': NoSuchElementException '%s'",
-OUStringToOString(oid_, 
RTL_TEXTENCODING_UTF8).getStr(),
-(OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
- getStr()));
+SAL_INFO(
+"binaryurp",
+"initial element " << oid_
+<< ": NoSuchElementException " << e.Message);
 }
 }
 if (ifc.is()) {
@@ -174,7 +175,7 @@ bool IncomingRequest::execute_throw(
 SAL_FALLTHROUGH;
 default:
 {
-OSL_ASSERT(object_.is());
+assert(object_.is());
 css::uno::TypeDescription retType;
 std::list< std::vector< char > > outBufs;
 std::vector< void * > args;
@@ -187,10 +188,10 @@ bool IncomingRequest::execute_throw(
 member_.get())->
 pAttributeTypeRef);
 if (setter_) {
-OSL_ASSERT(inArguments_.size() == 1);
+assert(inArguments_.size() == 1);
 args.push_back(inArguments_[0].getValue(t));
 } else {
-OSL_ASSERT(inArguments_.empty());
+assert(inArguments_.empty());
 retType = t;
 }
 break;
@@ -223,11 +224,11 @@ bool IncomingRequest::execute_throw(
 

[Libreoffice-commits] core.git: binaryurp/source

2016-09-16 Thread Stephan Bergmann
 binaryurp/source/writer.cxx |   24 +---
 1 file changed, 13 insertions(+), 11 deletions(-)

New commits:
commit c480677f5f654ada532dfba21e3d34718c977131
Author: Stephan Bergmann 
Date:   Fri Sep 16 10:52:25 2016 +0200

In binaryurp, fix change from rtl_copyMemory to memcpy

...done in 36a2db3722b79ed3df075d7f3fa77fb761bcf5a4 "Replace usage of
rtl_*Memory with equivalent from string.h"

Change-Id: I068feab3140cdcb34ea8c80e273ea2761f0efb7f
Reviewed-on: https://gerrit.libreoffice.org/28941
Reviewed-by: Stephan Bergmann 
Tested-by: Stephan Bergmann 

diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 7558f82..54373d1 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -19,9 +19,12 @@
 
 #include "sal/config.h"
 
+#include 
+#include 
+#include 
 #include 
+#include 
 #include 
-#include 
 
 #include "com/sun/star/connection/XConnection.hpp"
 #include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
@@ -411,18 +414,17 @@ void Writer::sendMessage(std::vector< unsigned char > 
const & buffer) {
 OSL_ASSERT(!buffer.empty());
 unsigned char const * p = [0];
 std::vector< unsigned char >::size_type n = buffer.size();
-OSL_ASSERT(header.size() <= SAL_MAX_INT32 && SAL_MAX_INT32 <= 
SAL_MAX_SIZE);
-sal_Size k = SAL_MAX_INT32 - header.size();
+OSL_ASSERT(header.size() <= SAL_MAX_INT32);
+/*static_*/assert(SAL_MAX_INT32 <= 
std::numeric_limits::max());
+std::size_t k = SAL_MAX_INT32 - header.size();
 if (n < k) {
-k = static_cast< sal_Size >(n);
+k = n;
 }
-css::uno::Sequence< sal_Int8 > s(
-static_cast< sal_Int32 >(header.size() + k));
+css::uno::Sequence s(header.size() + k);
 OSL_ASSERT(!header.empty());
-memcpy(
-s.getArray(), [0], static_cast< sal_Size >(header.size()));
+std::memcpy(s.getArray(), [0], header.size());
 for (;;) {
-memcpy(s.getArray() + s.getLength() - k, p, k);
+std::memcpy(s.getArray() + s.getLength() - k, p, k);
 try {
 bridge_->getConnection()->write(s);
 } catch (const css::io::IOException & e) {
@@ -431,14 +433,14 @@ void Writer::sendMessage(std::vector< unsigned char > 
const & buffer) {
 "Binary URP write raised IO exception: " + e.Message,
 css::uno::Reference< css::uno::XInterface >(), exc);
 }
-n = static_cast< std::vector< unsigned char >::size_type >(n - k);
+n -= k;
 if (n == 0) {
 break;
 }
 p += k;
 k = SAL_MAX_INT32;
 if (n < k) {
-k = static_cast< sal_Size >(n);
+k = n;
 }
 s.realloc(k);
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2016-08-19 Thread Stephan Bergmann
 binaryurp/source/binaryany.cxx |   31 +++
 binaryurp/source/binaryany.hxx |4 
 2 files changed, 35 insertions(+)

New commits:
commit 9bc591fa1e3723cee508e1484ad422fdef956d7d
Author: Stephan Bergmann 
Date:   Fri Aug 19 08:35:03 2016 +0200

cid#1371307: Move semantics for BinaryAny

Change-Id: I30b8bb71f8a9e093183ee85484ccd694f3e1e10d

diff --git a/binaryurp/source/binaryany.cxx b/binaryurp/source/binaryany.cxx
index f6fffc0..a416376 100644
--- a/binaryurp/source/binaryany.cxx
+++ b/binaryurp/source/binaryany.cxx
@@ -20,6 +20,7 @@
 #include "sal/config.h"
 
 #include 
+#include 
 
 #include "typelib/typeclass.h"
 #include "typelib/typedescription.hxx"
@@ -29,6 +30,26 @@
 
 namespace binaryurp {
 
+namespace {
+
+// Cf. com::sun::star::uno::detail::moveAnyInternals in
+// include/com/sun/star/uno/Any.hxx:
+void moveInternals(uno_Any & from, uno_Any & to) {
+uno_any_construct(, nullptr, nullptr, nullptr);
+std::swap(from.pType, to.pType);
+std::swap(from.pData, to.pData);
+std::swap(from.pReserved, to.pReserved);
+if (to.pData == ) {
+to.pData = 
+}
+// This leaves to.pData (where "to" is now VOID) dangling to somewhere (cf.
+// CONSTRUCT_EMPTY_ANY, cppu/source/uno/prim.hxx), but what's relevant is
+// only that it isn't a nullptr (as e.g. >>= -> uno_type_assignData ->
+// _assignData takes a null pSource to mean "construct a default value").
+}
+
+}
+
 BinaryAny::BinaryAny() throw () {
 uno_any_construct(_, nullptr, nullptr, nullptr);
 }
@@ -52,6 +73,10 @@ BinaryAny::BinaryAny(BinaryAny const & other) throw () {
 uno_type_any_construct(_, other.data_.pData, other.data_.pType, 
nullptr);
 }
 
+BinaryAny::BinaryAny(BinaryAny && other) throw () {
+moveInternals(other.data_, data_);
+}
+
 BinaryAny::~BinaryAny() throw () {
 uno_any_destruct(_, nullptr);
 }
@@ -63,6 +88,12 @@ BinaryAny & BinaryAny::operator =(BinaryAny const & other) 
throw () {
 return *this;
 }
 
+BinaryAny & BinaryAny::operator =(BinaryAny && other) throw () {
+uno_any_destruct(_, nullptr);
+moveInternals(other.data_, data_);
+return *this;
+}
+
 css::uno::TypeDescription BinaryAny::getType() const throw () {
 return css::uno::TypeDescription(data_.pType);
 }
diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 717216a..1faf484 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -43,10 +43,14 @@ public:
 
 BinaryAny(BinaryAny const & other) throw ();
 
+BinaryAny(BinaryAny && other) throw ();
+
 ~BinaryAny() throw ();
 
 BinaryAny & operator =(BinaryAny const & other) throw ();
 
+BinaryAny & operator =(BinaryAny && other) throw ();
+
 uno_Any& get() throw () { return data_; }
 
 com::sun::star::uno::TypeDescription getType() const throw ();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source include/com sax/source

2016-07-04 Thread Noel Grandin
 binaryurp/source/bridge.cxx  |2 +-
 include/com/sun/star/uno/Reference.h |4 ++--
 sax/source/fastparser/fastparser.cxx |2 +-
 3 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 4e3ed5aeb5c998ee4077138fe802b471bea9fcb2
Author: Noel Grandin 
Date:   Fri Jul 1 13:30:38 2016 +0200

use SAL_DEPRECATED in uno::Reference

and fix a couple of usages that have crept in

Change-Id: Ia3e7fcc05dac6e0d205e69c0e0372c74653e7c5e
Reviewed-on: https://gerrit.libreoffice.org/26851
Tested-by: Jenkins 
Reviewed-by: Noel Grandin 

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 1bfdd17..d47b834 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -882,7 +882,7 @@ css::uno::Reference< css::uno::XInterface > 
Bridge::getInstance(
 binaryToCppMapping_.mapInterface(
 *static_cast< uno_Interface ** >(ret.getValue(ifc)),
 ifc.get())),
-css::uno::UNO_REF_NO_ACQUIRE);
+SAL_NO_ACQUIRE);
 }
 
 OUString Bridge::getName() throw (css::uno::RuntimeException, std::exception) {
diff --git a/include/com/sun/star/uno/Reference.h 
b/include/com/sun/star/uno/Reference.h
index 5f4fea0..e657fd8 100644
--- a/include/com/sun/star/uno/Reference.h
+++ b/include/com/sun/star/uno/Reference.h
@@ -333,7 +333,7 @@ public:
 @param pInterface another reference
 @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to other 
constructors
 */
-inline Reference( interface_type * pInterface, UnoReference_NoAcquire 
dummy );
+inline SAL_DEPRECATED("use SAL_NO_ACQUIRE version") Reference( 
interface_type * pInterface, UnoReference_NoAcquire dummy );
 
 /** Constructor: Queries given interface for reference interface type 
(interface_type).
 
@@ -451,7 +451,7 @@ public:
 @param dummy UNO_REF_NO_ACQUIRE to force obvious distinction to set 
methods
 @return true, if non-null interface was set
 */
-inline bool SAL_CALL set( interface_type * pInterface, 
UnoReference_NoAcquire dummy);
+inline SAL_DEPRECATED("use SAL_NO_ACQUIRE version") bool SAL_CALL set( 
interface_type * pInterface, UnoReference_NoAcquire dummy);
 
 /** Queries given interface for reference interface type (interface_type) 
and sets it.
 An interface already set will be released.
diff --git a/sax/source/fastparser/fastparser.cxx 
b/sax/source/fastparser/fastparser.cxx
index fe69161..b9d9bfa 100644
--- a/sax/source/fastparser/fastparser.cxx
+++ b/sax/source/fastparser/fastparser.cxx
@@ -450,7 +450,7 @@ void Entity::startElement( Event *pEvent )
 }
 // swap the reference we own in to avoid referencing thrash.
 maContextStack.top().mxContext.set( static_cast( xContext.get() ) );
-xContext.set( nullptr, UNO_REF_NO_ACQUIRE );
+xContext.set( nullptr, SAL_NO_ACQUIRE );
 }
 catch (const Exception&)
 {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-07-10 Thread Takeshi Abe
 binaryurp/source/bridge.hxx   |4 
++--
 binaryurp/source/bridgefactory.hxx|4 
++--
 bridges/test/java_uno/acquire/testacquire.cxx |4 
++--
 bridges/test/java_uno/any/transport.cxx   |4 
++--
 bridges/test/java_uno/equals/testequals.cxx   |4 
++--
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolclient.cxx |4 
++--
 bridges/test/java_uno/nativethreadpool/testnativethreadpoolserver.cxx |4 
++--
 bridges/test/testserver.cxx   |1 -
 8 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 315afb12853624bdaac553a8528390c3a61c8351
Author: Takeshi Abe t...@fixedpoint.jp
Date:   Fri Jul 3 11:41:33 2015 +0900

tdf#88206 replace cppu::WeakImplHelper* etc.

with the variadic variants, in binaryurp / bridges.

Change-Id: I2d158c24e73681907cae5815d4b07b1c74f74335
Reviewed-on: https://gerrit.libreoffice.org/16792
Tested-by: Jenkins c...@libreoffice.org
Reviewed-by: Noel Grandin noelgran...@gmail.com

diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index 232b02b..1fe1bd6 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -31,7 +31,7 @@
 #include com/sun/star/lang/XComponent.hpp
 #include com/sun/star/uno/Reference.hxx
 #include com/sun/star/uno/RuntimeException.hpp
-#include cppuhelper/implbase2.hxx
+#include cppuhelper/implbase.hxx
 #include osl/conditn.hxx
 #include osl/mutex.hxx
 #include rtl/ref.hxx
@@ -67,7 +67,7 @@ namespace rtl { class ByteSequence; }
 namespace binaryurp {
 
 class Bridge:
-public cppu::WeakImplHelper2
+public cppu::WeakImplHelper
 com::sun::star::bridge::XBridge, com::sun::star::lang::XComponent 
 {
 public:
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index 27ec274..ac13ace 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -32,7 +32,7 @@
 #include com/sun/star/uno/Reference.hxx
 #include com/sun/star/uno/RuntimeException.hpp
 #include cppuhelper/basemutex.hxx
-#include cppuhelper/compbase2.hxx
+#include cppuhelper/compbase.hxx
 #include sal/types.h
 
 namespace com { namespace sun { namespace star {
@@ -49,7 +49,7 @@ namespace binaryurp {
 // the implementation does not care about a disposed state:
 
 typedef
-cppu::WeakComponentImplHelper2
+cppu::WeakComponentImplHelper
 com::sun::star::lang::XServiceInfo,
 com::sun::star::bridge::XBridgeFactory2 
 BridgeFactoryBase;
diff --git a/bridges/test/java_uno/acquire/testacquire.cxx 
b/bridges/test/java_uno/acquire/testacquire.cxx
index 99d0a98..942572b 100644
--- a/bridges/test/java_uno/acquire/testacquire.cxx
+++ b/bridges/test/java_uno/acquire/testacquire.cxx
@@ -34,7 +34,7 @@
 #include com/sun/star/uno/XComponentContext.hpp
 #include com/sun/star/uno/XInterface.hpp
 #include cppuhelper/factory.hxx
-#include cppuhelper/implbase3.hxx
+#include cppuhelper/implbase.hxx
 #include cppuhelper/supportsservice.hxx
 #include cppuhelper/weak.hxx
 #include osl/conditn.hxx
@@ -176,7 +176,7 @@ css::uno::Any Derived::queryInterface(css::uno::Type const 
 type)
 
 namespace {
 
-class Service: public cppu::WeakImplHelper3
+class Service: public cppu::WeakImplHelper
 css::lang::XServiceInfo, css::lang::XMain, test::javauno::acquire::XTest 
 {
 public:
diff --git a/bridges/test/java_uno/any/transport.cxx 
b/bridges/test/java_uno/any/transport.cxx
index 380abf4..e8015c7 100644
--- a/bridges/test/java_uno/any/transport.cxx
+++ b/bridges/test/java_uno/any/transport.cxx
@@ -25,7 +25,7 @@
 #include uno/environment.hxx
 #include jvmaccess/virtualmachine.hxx
 #include jvmaccess/unovirtualmachine.hxx
-#include cppuhelper/implbase1.hxx
+#include cppuhelper/implbase.hxx
 
 #include test/java_uno/anytest/XTransport.hpp
 #include test/java_uno/anytest/DerivedInterface.hpp
@@ -37,7 +37,7 @@ using ::test::java_uno::anytest::XTransport;
 namespace
 {
 
-class Transport : public ::cppu::WeakImplHelper1 XTransport 
+class Transport : public ::cppu::WeakImplHelper XTransport 
 {
 public:
 virtual Any SAL_CALL mapAny( Any const  any )
diff --git a/bridges/test/java_uno/equals/testequals.cxx 
b/bridges/test/java_uno/equals/testequals.cxx
index 34ca8c0..3cfd75f 100644
--- a/bridges/test/java_uno/equals/testequals.cxx
+++ b/bridges/test/java_uno/equals/testequals.cxx
@@ -35,7 +35,7 @@
 #include com/sun/star/uno/XComponentContext.hpp
 #include com/sun/star/uno/XInterface.hpp
 #include cppuhelper/factory.hxx
-#include cppuhelper/implbase2.hxx
+#include cppuhelper/implbase.hxx
 #include cppuhelper/supportsservice.hxx
 #include cppuhelper/weak.hxx
 #include rtl/string.h
@@ -48,7 +48,7 @@
 
 namespace {
 
-class Service: public cppu::WeakImplHelper2
+class Service: public cppu::WeakImplHelper
 css::lang::XServiceInfo, 

[Libreoffice-commits] core.git: binaryurp/source chart2/source connectivity/source odk/examples sw/source

2015-04-01 Thread Stephan Bergmann
 binaryurp/source/bridge.cxx|3 
--
 binaryurp/source/reader.cxx|3 
--
 chart2/source/controller/main/ChartController_Window.cxx   |8 
++---
 connectivity/source/commontools/dbtools.cxx|4 
+-
 connectivity/source/drivers/firebird/StatementCommonBase.cxx   |6 
++--
 odk/examples/DevelopersGuide/Components/CppComponent/service1_impl.cxx |   14 
+-
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SResultSet.cxx|6 
++--
 odk/examples/DevelopersGuide/Database/DriverSkeleton/SStatement.cxx|6 
++--
 sw/source/core/access/acctable.cxx |   10 
+++
 9 files changed, 29 insertions(+), 31 deletions(-)

New commits:
commit 31e24f487e5a4e917bb35fd396cf9f3ad84982a8
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Apr 1 10:42:11 2015 +0200

Remove redundant Reference from within UnoType uses

Change-Id: I1aeb9c73c284e39f371e49ded98e8dba0d055056

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 1037fe2..54214c3 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -864,8 +864,7 @@ css::uno::Reference css::uno::XInterface  
Bridge::getInstance(
  character);
 }
 }
-css::uno::TypeDescription ifc(
-cppu::UnoType css::uno::Reference css::uno::XInterface  ::get());
+css::uno::TypeDescription ifc(cppu::UnoTypecss::uno::XInterface::get());
 typelib_TypeDescription * p = ifc.get();
 std::vector BinaryAny  inArgs;
 inArgs.push_back(
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 880b1ad..99ad7c4 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -215,8 +215,7 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 css::uno::UnoInterfaceReference cc;
 if (ccMode) {
 css::uno::TypeDescription t(
-cppu::UnoType css::uno::Reference css::uno::XCurrentContext  ::
-get());
+cppu::UnoTypecss::uno::XCurrentContext::get());
 cc.set(
 *static_cast uno_Interface ** (
 unmarshal.readValue(t).getValue(t)));
diff --git a/chart2/source/controller/main/ChartController_Window.cxx 
b/chart2/source/controller/main/ChartController_Window.cxx
index 23724f428..59cbae5 100644
--- a/chart2/source/controller/main/ChartController_Window.cxx
+++ b/chart2/source/controller/main/ChartController_Window.cxx
@@ -1598,7 +1598,7 @@ sal_Bool SAL_CALL ChartController::select( const 
uno::Any rSelection )
 bSuccess = true;
 }
 }
-else if ( rType == cppu::UnoType uno::Reference drawing::XShape  
::get() )
+else if ( rType == cppu::UnoTypedrawing::XShape::get() )
 {
 uno::Reference drawing::XShape  xShape;
 if ( ( rSelection = xShape )  m_aSelection.setSelection( 
xShape ) )
@@ -1664,7 +1664,7 @@ sal_Bool SAL_CALL ChartController::select( const 
uno::Any rSelection )
 return; //behave passive if already disposed or suspended
 
 //--add listener
-m_aLifeTimeManager.m_aListenerContainer.addInterface( cppu::UnoType 
uno::Reference view::XSelectionChangeListener  ::get(), xListener );
+m_aLifeTimeManager.m_aListenerContainer.addInterface( 
cppu::UnoTypeview::XSelectionChangeListener::get(), xListener );
 }
 
 void SAL_CALL ChartController
@@ -1677,14 +1677,14 @@ sal_Bool SAL_CALL ChartController::select( const 
uno::Any rSelection )
 return; //behave passive if already disposed or suspended
 
 //--remove listener
-m_aLifeTimeManager.m_aListenerContainer.removeInterface( cppu::UnoType 
uno::Reference view::XSelectionChangeListener  ::get(), xListener );
+m_aLifeTimeManager.m_aListenerContainer.removeInterface( 
cppu::UnoTypeview::XSelectionChangeListener::get(), xListener );
 }
 
 void ChartController
 ::impl_notifySelectionChangeListeners()
 {
 ::cppu::OInterfaceContainerHelper* pIC = 
m_aLifeTimeManager.m_aListenerContainer
-.getContainer( cppu::UnoType uno::Reference 
view::XSelectionChangeListener  ::get() );
+.getContainer( cppu::UnoTypeview::XSelectionChangeListener::get() );
 if( pIC )
 {
 uno::Reference view::XSelectionSupplier  xSelectionSupplier(this);
diff --git a/connectivity/source/commontools/dbtools.cxx 
b/connectivity/source/commontools/dbtools.cxx
index 4815a57..4f5e395 100644
--- a/connectivity/source/commontools/dbtools.cxx
+++ b/connectivity/source/commontools/dbtools.cxx
@@ -1522,7 +1522,7 @@ bool implUpdateObject(const Reference XRowUpdate  
_rxUpdatedObject,
 break;
 
 case TypeClass_INTERFACE:
-if (_rValue.getValueType() == cppu::UnoTypeReference 
XInputStream ::get())
+if (_rValue.getValueType() == cppu::UnoTypeXInputStream::get())
 {

[Libreoffice-commits] core.git: binaryurp/source compilerplugins/clang

2015-01-09 Thread Stephan Bergmann
 binaryurp/source/unmarshal.cxx   |2 +-
 compilerplugins/clang/cstylecast.cxx |   28 
 2 files changed, 29 insertions(+), 1 deletion(-)

New commits:
commit 31498259bb801dee7bb2d7cb2b40162876116aa4
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Jan 9 16:42:09 2015 +0100

loplugin:cstylecast: warn about certain redundant reinterpret_casts

Change-Id: Iaa46849742c215798722d03d9ee59bb39d8033f7

diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index d04c889..f34bfd3 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -465,7 +465,7 @@ BinaryAny Unmarshal::readSequence(css::uno::TypeDescription 
const  type) {
 static_cast sal_Sequence * (buf)-elements + i * 
ctd.get()-nSize,
 const_cast void * (as[i].getValue(ctd)), ctd.get(), 0);
 }
-return BinaryAny(type, reinterpret_cast sal_Sequence ** (buf));
+return BinaryAny(type, buf);
 }
 
 void Unmarshal::readMemberValues(
diff --git a/compilerplugins/clang/cstylecast.cxx 
b/compilerplugins/clang/cstylecast.cxx
index 53b7d88..4f8bd4b 100644
--- a/compilerplugins/clang/cstylecast.cxx
+++ b/compilerplugins/clang/cstylecast.cxx
@@ -47,6 +47,8 @@ public:
 
 bool VisitCStyleCastExpr(const CStyleCastExpr * expr);
 
+bool VisitImplicitCastExpr(ImplicitCastExpr const * expr);
+
 private:
 bool externCFunction;
 };
@@ -136,6 +138,32 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr 
* expr) {
 return true;
 }
 
+bool CStyleCast::VisitImplicitCastExpr(const ImplicitCastExpr * expr) {
+if (ignoreLocation(expr) || expr-getCastKind() != CK_BitCast) {
+return true;
+}
+QualType t = expr-getType();
+if (!(t-isPointerType()
+   t-getAsPointerType()-getPointeeType()-isVoidType()
+   expr-getSubExpr()-getType()-isPointerType()))
+{
+return true;
+}
+Expr const * e = expr-getSubExpr()-IgnoreParenImpCasts();
+while (isaCXXConstCastExpr(e)) {
+e = dyn_castCXXConstCastExpr(e)-getSubExpr()-IgnoreParenImpCasts();
+}
+if (isaCXXReinterpretCastExpr(e)) {
+report(
+DiagnosticsEngine::Warning,
+(redundant reinterpret_cast, result is implicitly cast to void
+  pointer),
+e-getExprLoc())
+ e-getSourceRange();
+}
+return true;
+}
+
 loplugin::Plugin::Registration CStyleCast  X(cstylecast);
 
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2014-10-31 Thread Stephan Bergmann
 binaryurp/source/proxy.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit f2d8fdabd0fb2799cd2be69ba7ee0fea8e9f4291
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Oct 31 14:03:00 2014 +0100

cid#1212456 Silently ignore uno_assignData return value here

...which must be true for pDestTypeDescr == pSourceTypeDescr.

Change-Id: I98b4d654eb0e705ff0b577e7c87971b418ed13fc

diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index 571ab92..6ab9e8f 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -206,7 +206,7 @@ void Proxy::do_dispatch_throw(
 if (mtd-pParams[j].bOut) {
 css::uno::TypeDescription pt(mtd-pParams[j].pTypeRef);
 if (mtd-pParams[j].bIn) {
-uno_assignData(
+(void) uno_assignData(
 arguments[j], pt.get(), i++-getValue(pt),
 pt.get(), 0, 0, 0);
 } else {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2014-09-25 Thread Stephan Bergmann
 binaryurp/source/cache.hxx |   58 ++---
 1 file changed, 29 insertions(+), 29 deletions(-)

New commits:
commit 11311b9216b61c7c7baa1d223726520fe2ad2264
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Sep 25 11:49:23 2014 +0200

untabify

Change-Id: Iad53e9cea28c3c7f3a8a2eaa1186d1e1be72affc

diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index a580c5e..7cbb303 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -49,35 +49,35 @@ public:
 }
 
 IdxType add( const T rContent, bool* pbFound) {
-   assert( pbFound != NULL);
-   if( !size_) {
-   *pbFound = false;
-   return cache::ignore;
-   }
-   // try to insert into the map
-   list_.push_front( rContent); // create a temp entry
-   typedef std::pairtypename LruList::iterator, IdxType MappedType;
-   typedef std::pairtypename LruItMap::iterator,bool MapPair;
-   MapPair aMP = map_.insert( MappedType( list_.begin(), 0));
-   *pbFound = !aMP.second;
-
-   if( !aMP.second) { // insertion not needed = found the entry
-   list_.pop_front(); // remove the temp entry
-   list_.splice( list_.begin(), list_, aMP.first-first); // the 
found entry is moved to front
-   return aMP.first-second;
-   }
-
-   // test insertion successful = it was new so we keep it
-   IdxType n = static_castIdxType( map_.size() - 1);
-   if( n = size_) { // cache full = replace the LRU entry
-   // find the least recently used element in the map
-   typename LruItMap::iterator it = map_.find( --list_.end());
-   n = it-second;
-   map_.erase( it); // remove it from the map
-   list_.pop_back(); // remove from the list
-   }
-   aMP.first-second = n;
-   return n;
+assert( pbFound != NULL);
+if( !size_) {
+*pbFound = false;
+return cache::ignore;
+}
+// try to insert into the map
+list_.push_front( rContent); // create a temp entry
+typedef std::pairtypename LruList::iterator, IdxType MappedType;
+typedef std::pairtypename LruItMap::iterator,bool MapPair;
+MapPair aMP = map_.insert( MappedType( list_.begin(), 0));
+*pbFound = !aMP.second;
+
+if( !aMP.second) { // insertion not needed = found the entry
+list_.pop_front(); // remove the temp entry
+list_.splice( list_.begin(), list_, aMP.first-first); // the 
found entry is moved to front
+return aMP.first-second;
+}
+
+// test insertion successful = it was new so we keep it
+IdxType n = static_castIdxType( map_.size() - 1);
+if( n = size_) { // cache full = replace the LRU entry
+// find the least recently used element in the map
+typename LruItMap::iterator it = map_.find( --list_.end());
+n = it-second;
+map_.erase( it); // remove it from the map
+list_.pop_back(); // remove from the list
+}
+aMP.first-second = n;
+return n;
 }
 
 private:
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2014-05-19 Thread Stephan Bergmann
 binaryurp/source/bridgefactory.cxx |   31 +++
 binaryurp/source/bridgefactory.hxx |2 ++
 2 files changed, 33 insertions(+)

New commits:
commit 184e4ef35641403fd293262ee413ceee37b3761a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Mon May 19 18:06:16 2014 +0200

rhbz#1016758: Dispose bridges when disposing bridge factory

... (which happens when the service manager is disposed), so that no 
bridges can
still run during exit.  But this is so glaring that I wonder whether I 
missed
the obvious when I originally wrote that code, or whether I rather miss the
obvious now.  So better let this rest for a while on master before deciding
about any backports.

Change-Id: I7c9ad6c8a53dfd1a7b702640920dcb0a9a2c3007

diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 93cd22b..c397255 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -116,6 +116,11 @@ css::uno::Reference css::bridge::XBridge  
BridgeFactory::createBridge(
 rtl::Reference Bridge  b;
 {
 osl::MutexGuard g(m_aMutex);
+if (rBHelper.bDisposed) {
+throw css::lang::DisposedException(
+BridgeFactory disposed,
+static_cast cppu::OWeakObject * (this));
+}
 if (named_.find(sName) != named_.end()) {
 throw css::bridge::BridgeExistsException(
 sName, static_cast cppu::OWeakObject * (this));
@@ -173,6 +178,32 @@ BridgeFactory::getExistingBridges() throw 
(css::uno::RuntimeException, std::exce
 return s;
 }
 
+void BridgeFactory::disposing() {
+BridgeList l1;
+BridgeMap l2;
+{
+osl::MutexGuard g(m_aMutex);
+l1.swap(unnamed_);
+l2.swap(named_);
+}
+for (BridgeList::iterator i(l1.begin()); i != l1.end(); ++i) {
+try {
+css::uno::Referencecss::lang::XComponent(
+*i, css::uno::UNO_QUERY_THROW)-dispose();
+} catch (css::uno::Exception  e) {
+SAL_WARN(binaryurp, ignoring Exception   e.Message);
+}
+}
+for (BridgeMap::iterator i(l2.begin()); i != l2.end(); ++i) {
+try {
+css::uno::Referencecss::lang::XComponent(
+i-second, css::uno::UNO_QUERY_THROW)-dispose();
+} catch (css::uno::Exception  e) {
+SAL_WARN(binaryurp, ignoring Exception   e.Message);
+}
+}
+}
+
 }
 
 namespace {
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index cb8f9f3..8607626 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -117,6 +117,8 @@ private:
 com::sun::star::uno::Reference com::sun::star::bridge::XBridge  
 SAL_CALL getExistingBridges() throw 
(com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
 
+void SAL_CALL disposing() SAL_OVERRIDE;
+
 typedef
 std::list
 com::sun::star::uno::Reference com::sun::star::bridge::XBridge  
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source package/source vcl/unx

2014-04-16 Thread Stephan Bergmann
 binaryurp/source/incomingrequest.cxx  |9 +---
 binaryurp/source/writer.cxx   |4 -
 package/source/xstor/ocompinstream.cxx|   62 ++--
 package/source/xstor/oseekinstream.cxx|   12 ++---
 package/source/xstor/owriteablestream.cxx |   66 +++---
 vcl/unx/generic/printer/ppdparser.cxx |   18 
 6 files changed, 85 insertions(+), 86 deletions(-)

New commits:
commit c3e84d4c74847271f88e1f83369d0b55b2fd6037
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Apr 16 22:42:40 2014 +0200

sal/log.hxx functionality also includes the equivalent of OSL_LOG_PREFIX

Change-Id: I1bb0115a378003b5cc5b1cfc59c474a1f100d894

diff --git a/binaryurp/source/incomingrequest.cxx 
b/binaryurp/source/incomingrequest.cxx
index 1ac6e10..ff30a8e 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -101,16 +101,16 @@ void IncomingRequest::execute() const {
 return;
 } catch (const css::uno::RuntimeException  e) {
 OSL_TRACE(
-OSL_LOG_PREFIX caught UNO runtime exception '%s',
+caught UNO runtime exception '%s',
 (OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
  getStr()));
 } catch (const std::exception  e) {
-OSL_TRACE(OSL_LOG_PREFIX caught C++ exception '%s', e.what());
+OSL_TRACE(caught C++ exception '%s', e.what());
 }
 bridge_-terminate(false);
 } else {
 if (isExc) {
-OSL_TRACE(OSL_LOG_PREFIX oneway method raised exception);
+OSL_TRACE(oneway method raised exception);
 }
 bridge_-decrementCalls();
 }
@@ -148,8 +148,7 @@ bool IncomingRequest::execute_throw(
 ifc = prov-getInstance(oid_);
 } catch (const css::container::NoSuchElementException  e) {
 OSL_TRACE(
-(OSL_LOG_PREFIX initial element '%s':
-  NoSuchElementException '%s'),
+initial element '%s': NoSuchElementException '%s',
 OUStringToOString(oid_, 
RTL_TEXTENCODING_UTF8).getStr(),
 (OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).
  getStr()));
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index edcb0f5..46198b9 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -171,10 +171,10 @@ void Writer::execute() {
 }
 } catch (const css::uno::Exception  e) {
 OSL_TRACE(
-OSL_LOG_PREFIX caught UNO exception '%s',
+caught UNO exception '%s',
 OUStringToOString(e.Message, RTL_TEXTENCODING_UTF8).getStr());
 } catch (const std::exception  e) {
-OSL_TRACE(OSL_LOG_PREFIX caught C++ exception '%s', e.what());
+OSL_TRACE(caught C++ exception '%s', e.what());
 }
 bridge_-terminate(false);
 bridge_.clear();
diff --git a/package/source/xstor/ocompinstream.cxx 
b/package/source/xstor/ocompinstream.cxx
index 3693364..0165d0a 100644
--- a/package/source/xstor/ocompinstream.cxx
+++ b/package/source/xstor/ocompinstream.cxx
@@ -115,13 +115,13 @@ sal_Int32 SAL_CALL OInputCompStream::readBytes( 
uno::Sequence sal_Int8  aData
 ::osl::MutexGuard aGuard( m_rMutexRef-GetMutex() );
 if ( m_bDisposed )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX Disposed!);
+SAL_INFO(package.xstor, Disposed!);
 throw lang::DisposedException();
 }
 
 if ( !m_xStream.is() )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX No stream!);
+SAL_INFO(package.xstor, No stream!);
 throw uno::RuntimeException();
 }
 
@@ -137,13 +137,13 @@ sal_Int32 SAL_CALL OInputCompStream::readSomeBytes( 
uno::Sequence sal_Int8  a
 ::osl::MutexGuard aGuard( m_rMutexRef-GetMutex() );
 if ( m_bDisposed )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX Disposed!);
+SAL_INFO(package.xstor, Disposed!);
 throw lang::DisposedException();
 }
 
 if ( !m_xStream.is() )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX No stream!);
+SAL_INFO(package.xstor, No stream!);
 throw uno::RuntimeException();
 }
 
@@ -160,13 +160,13 @@ void SAL_CALL OInputCompStream::skipBytes( sal_Int32 
nBytesToSkip )
 ::osl::MutexGuard aGuard( m_rMutexRef-GetMutex() );
 if ( m_bDisposed )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX Disposed!);
+SAL_INFO(package.xstor, Disposed!);
 throw lang::DisposedException();
 }
 
 if ( !m_xStream.is() )
 {
-SAL_INFO(package.xstor, OSL_LOG_PREFIX No stream!);
+SAL_INFO(package.xstor, No stream!);
 throw uno::RuntimeException();
 }
 
@@ -182,13 +182,13 @@ sal_Int32 SAL_CALL OInputCompStream::available(  )
 ::osl::MutexGuard aGuard( 

[Libreoffice-commits] core.git: binaryurp/source

2014-02-25 Thread Alexander Wilms
 binaryurp/source/cache.hxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 598243b2d8e8bd3496d88affdbccee6c11566c69
Author: Alexander Wilms f.alexander.wi...@gmail.com
Date:   Tue Feb 25 17:43:38 2014 +0100

Remove visual noise from binaryurp

Change-Id: I863499cccfe586b570d0021e143718bd3e4e1181
Reviewed-on: https://gerrit.libreoffice.org/8236
Reviewed-by: Caolán McNamara caol...@redhat.com
Tested-by: Caolán McNamara caol...@redhat.com

diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index 7e5ba89..a580c5e 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -60,7 +60,7 @@ public:
typedef std::pairtypename LruItMap::iterator,bool MapPair;
MapPair aMP = map_.insert( MappedType( list_.begin(), 0));
*pbFound = !aMP.second;
-   
+
if( !aMP.second) { // insertion not needed = found the entry
list_.pop_front(); // remove the temp entry
list_.splice( list_.begin(), list_, aMP.first-first); // the 
found entry is moved to front
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2014-02-13 Thread Stephan Bergmann
 binaryurp/source/bridge.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit afb9d333ebf83715558fb07e9f0e64b7443a195d
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Feb 13 11:56:00 2014 +0100

cid#706247 wrong exception type

Change-Id: Idc83f827b90eedcc4345345a77efbda35e08bff0

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index c2d604d..435df53 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -879,7 +879,7 @@ css::uno::Reference css::uno::XInterface  
Bridge::getInstance(
 }
 for (sal_Int32 i = 0; i != sInstanceName.getLength(); ++i) {
 if (sInstanceName[i]  0x7F) {
-throw css::io::IOException(
+throw css::uno::RuntimeException(
 (XBridge::getInstance sInstanceName contains non-ASCII
   character),
 css::uno::Reference css::uno::XInterface ());
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2014-02-13 Thread Stephan Bergmann
 binaryurp/source/bridgefactory.cxx |3 ++-
 binaryurp/source/bridgefactory.hxx |3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit ee585cc86d975c6ed987cc4d83101d0928f725c5
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Feb 13 12:10:21 2014 +0100

cid#983607 unexpected std::exception

Change-Id: I0de931d79548505ca7d26ffdfb560cfd5c6105a9

diff --git a/binaryurp/source/bridgefactory.cxx 
b/binaryurp/source/bridgefactory.cxx
index 34182b3..06adb3a 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -21,6 +21,7 @@
 
 #include algorithm
 #include cassert
+#include exception
 
 #include com/sun/star/connection/XConnection.hpp
 #include com/sun/star/uno/Exception.hpp
@@ -110,7 +111,7 @@ css::uno::Reference css::bridge::XBridge  
BridgeFactory::createBridge(
 anInstanceProvider)
 throw (
 css::bridge::BridgeExistsException, 
css::lang::IllegalArgumentException,
-css::uno::RuntimeException)
+css::uno::RuntimeException, std::exception)
 {
 rtl::Reference Bridge  b;
 {
diff --git a/binaryurp/source/bridgefactory.hxx 
b/binaryurp/source/bridgefactory.hxx
index a949e63..79150bc 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -22,6 +22,7 @@
 
 #include sal/config.h
 
+#include exception
 #include list
 #include map
 
@@ -102,7 +103,7 @@ private:
 throw (
 com::sun::star::bridge::BridgeExistsException,
 com::sun::star::lang::IllegalArgumentException,
-com::sun::star::uno::RuntimeException);
+com::sun::star::uno::RuntimeException, std::exception);
 
 virtual com::sun::star::uno::Reference com::sun::star::bridge::XBridge 
 SAL_CALL getBridge(
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2013-11-27 Thread Stephan Bergmann
 binaryurp/source/reader.cxx |   10 --
 1 file changed, 4 insertions(+), 6 deletions(-)

New commits:
commit 289e54feabc936b8175327355a159073830a326a
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Nov 27 14:49:22 2013 +0100

binaryurp: silently ignore superfluous MUSTREPLY/SYNCHRONOUS flags

...in a non-oneway call.  This can happen when a pre LO 4 entity is calling 
a
LO 4 entity post 90eac3e69749a9227c4b6902b1f3cef1e338c6d1
API CHANGE remove [oneway] method attributes.  (See mail thread starting 
at

http://mail-archives.apache.org/mod_mbox/openoffice-api/201311.mbox/%3Ca4e7f34d-b8cb-4d5a-890f-6894d3410265%40ucimail2.uci.cu%3E
hi, code in Java.)

Change-Id: I9f800a979d84a95cc5cd96f75ee7472e8cf6cf4b

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 522b165..184f037 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -238,12 +238,10 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 {
 synchronous = forceSynchronous;
 } else {
-if (forceSynchronous) {
-throw css::uno::RuntimeException(
-(URP: synchronous request message with non-oneway function ID
-  received),
-css::uno::Reference css::uno::XInterface ());
-}
+SAL_INFO_IF(
+forceSynchronous, binaryurp,
+(superfluous MUSTREPLY/SYNCHRONOUS ignored in request message 
with
+  non-oneway function ID));
 synchronous = true;
 }
 bool setter = false;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2013-11-27 Thread Stephan Bergmann
 binaryurp/source/reader.cxx |   20 
 1 file changed, 8 insertions(+), 12 deletions(-)

New commits:
commit 70fe99d01944e51fd2a9d5eaf007bd3ee8967832
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Nov 28 08:25:50 2013 +0100

Minor simplification

Change-Id: I031409043f12bdfe4b8c838d74db8a60576fd507

diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index 184f037..17a8863 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -230,20 +230,16 @@ void Reader::readMessage(Unmarshal  unmarshal) {
 *static_cast uno_Interface ** (
 unmarshal.readValue(t).getValue(t)));
 }
-bool synchronous;
-if (memberTd.get()-eTypeClass == typelib_TypeClass_INTERFACE_METHOD 
+bool oneWay =
+memberTd.get()-eTypeClass == typelib_TypeClass_INTERFACE_METHOD 
 (reinterpret_cast typelib_InterfaceMethodTypeDescription * (
 memberTd.get())-
- bOneWay))
-{
-synchronous = forceSynchronous;
-} else {
-SAL_INFO_IF(
-forceSynchronous, binaryurp,
-(superfluous MUSTREPLY/SYNCHRONOUS ignored in request message 
with
-  non-oneway function ID));
-synchronous = true;
-}
+ bOneWay);
+SAL_INFO_IF(
+!oneWay  forceSynchronous, binaryurp,
+(superfluous MUSTREPLY/SYNCHRONOUS ignored in request message with
+  non-oneway function ID));
+bool synchronous = !oneWay || forceSynchronous;
 bool setter = false;
 std::vector BinaryAny  inArgs;
 switch (memberTd.get()-eTypeClass) {
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2013-06-14 Thread Stephan Bergmann
 binaryurp/source/lessoperators.cxx |   18 --
 1 file changed, 8 insertions(+), 10 deletions(-)

New commits:
commit 12dc490c3af9ec0f34b513609f3b14effd5a2906
Author: Stephan Bergmann sberg...@redhat.com
Date:   Fri Jun 14 14:18:11 2013 +0200

No need for a buggy rewrite

... see 08bb8fca4144608237418d64b1479840c408256f #i122208# replace the
binaryurp cache for improved C++ compatibility and
059f041dfdffe0630ec573fb444c51cc463b90b1 cppcheck: fix 
duplicateExpression,
when the only improvement is to not needlessly acquire/release raw 
rtl_uString
instances.

Change-Id: I734304b231d69f8089cbf1d35a3deda75f771c78

diff --git a/binaryurp/source/lessoperators.cxx 
b/binaryurp/source/lessoperators.cxx
index 3a515f5..6d8952d 100644
--- a/binaryurp/source/lessoperators.cxx
+++ b/binaryurp/source/lessoperators.cxx
@@ -32,16 +32,14 @@
 
 namespace com { namespace sun { namespace star { namespace uno {
 
-bool operator( const TypeDescription rLeft, const TypeDescription rRight) {
-   assert( rLeft.is()  rRight.is());
-   const typelib_TypeDescription rA = *rLeft.get();
-   const typelib_TypeDescription rB = *rRight.get();
-if( rA.eTypeClass != rB.eTypeClass)
-   return (rA.eTypeClass  rB.eTypeClass);
-   const sal_Int32 nCmp = rtl_ustr_compare_WithLength(
-   rA.pTypeName-buffer, rA.pTypeName-length,
-   rB.pTypeName-buffer, rB.pTypeName-length);
-   return (nCmp  0);
+bool operator (TypeDescription const  left, TypeDescription const  right) {
+assert(left.is()  right.is());
+typelib_TypeClass tc1 = left.get()-eTypeClass;
+typelib_TypeClass tc2 = right.get()-eTypeClass;
+return tc1  tc2 ||
+(tc1 == tc2 
+ (OUString::unacquired(left.get()-pTypeName) 
+  OUString::unacquired(right.get()-pTypeName)));
 }
 
 bool TypeDescEqual::operator()( const TypeDescription rLeft, const 
TypeDescription rRight) const
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2013-06-13 Thread Julien Nabet
 binaryurp/source/lessoperators.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 059f041dfdffe0630ec573fb444c51cc463b90b1
Author: Julien Nabet serval2...@yahoo.fr
Date:   Thu Jun 13 21:27:26 2013 +0200

cppcheck: fix duplicateExpression

Change-Id: If3b7b1faab858afa82d4c665ee1a5036190e69aa
Reviewed-on: https://gerrit.libreoffice.org/4278
Reviewed-by: Tomáš Chvátal tchva...@suse.cz
Tested-by: Tomáš Chvátal tchva...@suse.cz

diff --git a/binaryurp/source/lessoperators.cxx 
b/binaryurp/source/lessoperators.cxx
index 55f3a49..3a515f5 100644
--- a/binaryurp/source/lessoperators.cxx
+++ b/binaryurp/source/lessoperators.cxx
@@ -36,7 +36,7 @@ bool operator( const TypeDescription rLeft, const 
TypeDescription rRight) {
assert( rLeft.is()  rRight.is());
const typelib_TypeDescription rA = *rLeft.get();
const typelib_TypeDescription rB = *rRight.get();
-   if( rA.eTypeClass != rA.eTypeClass)
+if( rA.eTypeClass != rB.eTypeClass)
return (rA.eTypeClass  rB.eTypeClass);
const sal_Int32 nCmp = rtl_ustr_compare_WithLength(
rA.pTypeName-buffer, rA.pTypeName-length,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: binaryurp/source

2013-05-28 Thread Herbert Dürr
 binaryurp/source/cache.hxx |  112 +
 binaryurp/source/lessoperators.cxx |   44 +++---
 binaryurp/source/lessoperators.hxx |4 +
 3 files changed, 79 insertions(+), 81 deletions(-)

New commits:
commit 08bb8fca4144608237418d64b1479840c408256f
Author: Herbert Dürr h...@apache.org
Date:   Wed May 8 17:26:08 2013 +

#i122208# replace the binaryurp cache for improved C++ compatibility

Failing to instantiatie incomplete types like the Map::iterator in
binaryurp Cache's Entry members is allowed by the C++ standard.
The rewrite makes it more compliant with other C++ compilers/STLs.
And interesting alternative would be to use boost's multi_index_container.

git-svn-id: 
http://svn.apache.org/repos/asf/openoffice/branches/rejuvenate01@1480367 
13f79535-47bb-0310-9956-ffa450edef68

diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index 05c0069..7e5ba89 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -25,6 +25,7 @@
 #include cassert
 #include cstddef
 #include map
+#include list
 
 #include boost/noncopyable.hpp
 #include sal/types.h
@@ -37,88 +38,57 @@ enum { size = 256, ignore = 0x };
 
 }
 
-template typename T  class Cache: private boost::noncopyable {
+template typename T  class Cache : private boost::noncopyable {
 public:
+typedef sal_uInt16 IdxType;
+
 explicit Cache(std::size_t size):
-size_(size), first_(map_.end()), last_(map_.end())
+size_(size)
 {
 assert(size  cache::ignore);
 }
 
-sal_uInt16 add(T const  content, bool * found) {
-assert(found != 0);
-typename Map::iterator i(map_.find(content));
-*found = i != map_.end();
-if (i == map_.end()) {
-typename Map::size_type n = map_.size();
-if (n  size_) {
-i =
-(map_.insert(
-typename Map::value_type(
-content,
-Entry(
-static_cast sal_uInt16 (n), map_.end(),
-first_.
-first;
-if (first_ == map_.end()) {
-last_ = i;
-} else {
-first_-second.prev = i;
-}
-first_ = i;
-} else if (last_ != map_.end()) {
-i =
-(map_.insert(
-typename Map::value_type(
-content,
-Entry(last_-second.index, map_.end(), first_.
-first;
-first_-second.prev = i;
-first_ = i;
-typename Map::iterator j(last_);
-last_ = last_-second.prev;
-last_-second.next = map_.end();
-map_.erase(j);
-} else {
-// Reached iff size_ == 0:
-return cache::ignore;
-}
-} else if (i != first_) {
-// Move to front (reached only if size_  1):
-i-second.prev-second.next = i-second.next;
-if (i-second.next == map_.end()) {
-last_ = i-second.prev;
-} else {
-i-second.next-second.prev = i-second.prev;
-}
-i-second.prev = map_.end();
-i-second.next = first_;
-first_-second.prev = i;
-first_ = i;
-}
-return i-second.index;
+IdxType add( const T rContent, bool* pbFound) {
+   assert( pbFound != NULL);
+   if( !size_) {
+   *pbFound = false;
+   return cache::ignore;
+   }
+   // try to insert into the map
+   list_.push_front( rContent); // create a temp entry
+   typedef std::pairtypename LruList::iterator, IdxType MappedType;
+   typedef std::pairtypename LruItMap::iterator,bool MapPair;
+   MapPair aMP = map_.insert( MappedType( list_.begin(), 0));
+   *pbFound = !aMP.second;
+   
+   if( !aMP.second) { // insertion not needed = found the entry
+   list_.pop_front(); // remove the temp entry
+   list_.splice( list_.begin(), list_, aMP.first-first); // the 
found entry is moved to front
+   return aMP.first-second;
+   }
+
+   // test insertion successful = it was new so we keep it
+   IdxType n = static_castIdxType( map_.size() - 1);
+   if( n = size_) { // cache full = replace the LRU entry
+   // find the least recently used element in the map
+   typename LruItMap::iterator it = map_.find( --list_.end());
+   n = it-second;
+   map_.erase( it); // remove it from the map
+   list_.pop_back(); // remove from the list
+   }
+   aMP.first-second = n;
+   return n;
 }
 
 private:
-struct Entry;
-
-typedef 

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

2013-02-19 Thread Krisztian Pinter
 binaryurp/source/bridge.cxx   |2 +-
 bridges/source/cpp_uno/cc50_solaris_intel/except.cxx  |3 +--
 bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx |4 ++--
 bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx  |3 +--
 bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx |4 ++--
 5 files changed, 7 insertions(+), 9 deletions(-)

New commits:
commit f6edfefd53caf7e4aa6c2b39cdaf666ad54884c3
Author: Krisztian Pinter pin.termina...@gmail.com
Date:   Mon Feb 18 15:10:30 2013 +0100

RTL_CONSTASCII_USTRINGPARAM removals

Change-Id: Ib483f271d3c826a2b7192b22a174ff9f7b18c3f8
Reviewed-on: https://gerrit.libreoffice.org/2241
Reviewed-by: Olivier Hallot olivier.hal...@alta.org.br
Tested-by: Olivier Hallot olivier.hal...@alta.org.br

diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index 5b463f5..31fc342 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -182,7 +182,7 @@ Bridge::Bridge(
 protPropTid_(
 reinterpret_cast sal_Int8 const * (.UrpProtocolPropertiesTid),
 RTL_CONSTASCII_LENGTH(.UrpProtocolPropertiesTid)),
-protPropOid_(RTL_CONSTASCII_USTRINGPARAM(UrpProtocolProperties)),
+protPropOid_(UrpProtocolProperties),
 protPropType_(
 cppu::UnoType
 css::uno::Reference css::bridge::XProtocolProperties  ::get()),
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx 
b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
index f7c5514..36bd7a6 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/except.cxx
@@ -408,8 +408,7 @@ void cc50_solaris_intel_fillUnoException(
 if (pExcTypeDescr == 0) // the thing that should not be
 {
 RuntimeException aRE(
-OUString( RTL_CONSTASCII_USTRINGPARAM(
-  exception type not found: ) ) + aName,
+exception type not found:  + aName,
 Reference XInterface () );
 Type const  rType = ::getCppuType( aRE );
 uno_type_any_constructAndConvert(
diff --git a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx 
b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
index 32330cc..85a5965 100644
--- a/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_intel/uno2cpp.cxx
@@ -321,7 +321,7 @@ void unoInterfaceProxyDispatch(
 aParam.bOut = sal_False;
 
 typelib_TypeDescriptionReference * pReturnTypeRef = 0;
-OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM(void) );
+OUString aVoidName( void );
 typelib_typedescriptionreference_new(
 pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
 
@@ -394,7 +394,7 @@ void unoInterfaceProxyDispatch(
 default:
 {
 ::com::sun::star::uno::RuntimeException aExc(
-OUString( RTL_CONSTASCII_USTRINGPARAM(illegal member type 
description!) ),
+illegal member type description!,
 ::com::sun::star::uno::Reference 
::com::sun::star::uno::XInterface () );
 
 Type const  rExcType = ::getCppuType( aExc );
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx 
b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
index 56de9c4..ebb0918 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/except.cxx
@@ -401,8 +401,7 @@ void cc50_solaris_sparc_fillUnoException(
 if (pExcTypeDescr == 0) // the thing that should not be
 {
 RuntimeException aRE(
-OUString( RTL_CONSTASCII_USTRINGPARAM(
-  exception type not found: ) ) + aName,
+exception type not found:  + aName,
 Reference XInterface () );
 Type const  rType = ::getCppuType( aRE );
 uno_type_any_constructAndConvert(
diff --git a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx 
b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
index 20142dc..6fad40b 100644
--- a/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
+++ b/bridges/source/cpp_uno/cc50_solaris_sparc/uno2cpp.cxx
@@ -299,7 +299,7 @@ void unoInterfaceProxyDispatch(
 aParam.bOut = sal_False;
 
 typelib_TypeDescriptionReference * pReturnTypeRef = 0;
-OUString aVoidName( RTL_CONSTASCII_USTRINGPARAM(void) );
+OUString aVoidName( void );
 typelib_typedescriptionreference_new(
 pReturnTypeRef, typelib_TypeClass_VOID, aVoidName.pData );
 
@@ -372,7 +372,7 @@ void unoInterfaceProxyDispatch(
 default:
 {
 ::com::sun::star::uno::RuntimeException aExc(
-OUString( RTL_CONSTASCII_USTRINGPARAM(illegal member type 
description!) ),
+illegal member type description!,
 ::com::sun::star::uno::Reference 
::com::sun::star::uno::XInterface () );
 
 Type const