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

2023-10-20 Thread Stephan Bergmann (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |   20 ++--
 1 file changed, 10 insertions(+), 10 deletions(-)

New commits:
commit 5bd143316162f29227b2f8ec4d165a3260806bde
Author: Stephan Bergmann 
AuthorDate: Thu Oct 19 10:30:37 2023 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Oct 20 16:36:04 2023 +0200

Extended loplugin:ostr: Automatic rewrite O[U]StringLiteral: ucbhelper

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index a2abf5a80cdd..e58e31732d3a 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -49,15 +49,15 @@
 using namespace com::sun::star;
 using namespace ucbhelper;
 
-constexpr OUStringLiteral CONFIG_ROOT_KEY = u"org.openoffice.Inet/Settings";
-constexpr OUStringLiteral PROXY_TYPE_KEY = u"ooInetProxyType";
-constexpr OUStringLiteral NO_PROXY_LIST_KEY = u"ooInetNoProxy";
-constexpr OUStringLiteral HTTP_PROXY_NAME_KEY = u"ooInetHTTPProxyName";
-constexpr OUStringLiteral HTTP_PROXY_PORT_KEY = u"ooInetHTTPProxyPort";
-constexpr OUStringLiteral HTTPS_PROXY_NAME_KEY = u"ooInetHTTPSProxyName";
-constexpr OUStringLiteral HTTPS_PROXY_PORT_KEY = u"ooInetHTTPSProxyPort";
-constexpr OUStringLiteral FTP_PROXY_NAME_KEY = u"ooInetFTPProxyName";
-constexpr OUStringLiteral FTP_PROXY_PORT_KEY = u"ooInetFTPProxyPort";
+constexpr OUString CONFIG_ROOT_KEY = u"org.openoffice.Inet/Settings"_ustr;
+constexpr OUString PROXY_TYPE_KEY = u"ooInetProxyType"_ustr;
+constexpr OUString NO_PROXY_LIST_KEY = u"ooInetNoProxy"_ustr;
+constexpr OUString HTTP_PROXY_NAME_KEY = u"ooInetHTTPProxyName"_ustr;
+constexpr OUString HTTP_PROXY_PORT_KEY = u"ooInetHTTPProxyPort"_ustr;
+constexpr OUString HTTPS_PROXY_NAME_KEY = u"ooInetHTTPSProxyName"_ustr;
+constexpr OUString HTTPS_PROXY_PORT_KEY = u"ooInetHTTPSProxyPort"_ustr;
+constexpr OUString FTP_PROXY_NAME_KEY = u"ooInetFTPProxyName"_ustr;
+constexpr OUString FTP_PROXY_PORT_KEY = u"ooInetFTPProxyPort"_ustr;
 
 
 namespace ucbhelper
@@ -303,7 +303,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
 uno::Reference< lang::XMultiServiceFactory > xConfigProv =
 configuration::theDefaultProvider::get( rxContext );
 
-uno::Sequence< uno::Any > aArguments{ uno::Any(OUString( 
CONFIG_ROOT_KEY )) };
+uno::Sequence< uno::Any > aArguments{ uno::Any(CONFIG_ROOT_KEY) };
 uno::Reference< uno::XInterface > xInterface(
 xConfigProv->createInstanceWithArguments(
 "com.sun.star.configuration.ConfigurationAccess",


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

2023-05-27 Thread Mike Kaganski (via logerrit)
 ucbhelper/source/provider/contenthelper.cxx   |   12 ++--
 ucbhelper/source/provider/resultset.cxx   |4 ++--
 ucbhelper/source/provider/resultsethelper.cxx |2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

New commits:
commit d4182557b5cba1d56041792dfddbd89a131f6ada
Author: Mike Kaganski 
AuthorDate: Sun Apr 23 20:15:21 2023 +0300
Commit: Mike Kaganski 
CommitDate: Sat May 27 20:14:40 2023 +0200

Use getXWeak in ucbhelper

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

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 3a8b8f19a604..1e5147f6fb7b 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -455,7 +455,7 @@ void SAL_CALL ContentImplHelper::addProperty(
  m_pImpl->m_pPropSetChangeListeners->getLength() )
 {
 beans::PropertySetInfoChangeEvent evt(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 Name,
 -1, // No handle available
 beans::PropertySetInfoChange::PROPERTY_INSERTED );
@@ -551,7 +551,7 @@ void SAL_CALL ContentImplHelper::removeProperty( const 
OUString& Name )
  m_pImpl->m_pPropSetChangeListeners->getLength() )
 {
 beans::PropertySetInfoChangeEvent evt(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 Name,
 -1, // No handle available
 beans::PropertySetInfoChange::PROPERTY_REMOVED );
@@ -752,7 +752,7 @@ void ContentImplHelper::inserted()
 if ( xParent.is() )
 {
 css::ucb::ContentEvent aEvt(
-static_cast< cppu::OWeakObject * >( xParent.get() ), // Source
+xParent->getXWeak(), // Source
 css::ucb::ContentAction::INSERTED,// Action
 this,// Content
 xParent->getIdentifier() );  // Id
@@ -771,7 +771,7 @@ void ContentImplHelper::deleted()
 {
 // Let parent notify "REMOVED" event.
 css::ucb::ContentEvent aEvt(
-static_cast< cppu::OWeakObject * >( xParent.get() ),
+xParent->getXWeak(),
 css::ucb::ContentAction::REMOVED,
 this,
 xParent->getIdentifier());
@@ -780,7 +780,7 @@ void ContentImplHelper::deleted()
 
 // Notify "DELETED" event.
 css::ucb::ContentEvent aEvt1(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 css::ucb::ContentAction::DELETED,
 this,
 getIdentifier() );
@@ -818,7 +818,7 @@ bool ContentImplHelper::exchange(
 
 // Notify "EXCHANGED" event.
 css::ucb::ContentEvent aEvt(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 css::ucb::ContentAction::EXCHANGED,
 this,
 xOldId );
diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index b443a32e1b39..61682f4fd539 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1329,7 +1329,7 @@ void ResultSet::rowCountChanged( sal_uInt32 nOld, 
sal_uInt32 nNew )
 
 propertyChanged(
 beans::PropertyChangeEvent(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 "RowCount",
 false,
 1001,
@@ -1345,7 +1345,7 @@ void ResultSet::rowCountFinal()
 
 propertyChanged(
 beans::PropertyChangeEvent(
-static_cast< cppu::OWeakObject * >( this ),
+getXWeak(),
 "IsRowCountFinal",
 false,
 1000,
diff --git a/ucbhelper/source/provider/resultsethelper.cxx 
b/ucbhelper/source/provider/resultsethelper.cxx
index 3d45f8a5a8a3..788e6811a100 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -169,7 +169,7 @@ void SAL_CALL ResultSetImplHelper::setListener(
 
 Listener->notify(
 css::ucb::ListEvent(
-static_cast< cppu::OWeakObject * >( this ), aActions ) );
+getXWeak(), aActions ) );
 }
 
 


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

2022-09-12 Thread Chris Sherlock (via logerrit)
 ucbhelper/source/client/activedatasink.cxx   |5 -
 ucbhelper/source/client/activedatastreamer.cxx   |5 -
 ucbhelper/source/client/commandenvironment.cxx   |7 ---
 ucbhelper/source/provider/cancelcommandexecution.cxx |6 --
 ucbhelper/source/provider/contentidentifier.cxx  |   10 --
 ucbhelper/source/provider/contentinfo.cxx|5 -
 ucbhelper/source/provider/interactionrequest.cxx |6 --
 ucbhelper/source/provider/propertyvalueset.cxx   |7 ---
 ucbhelper/source/provider/registerucb.cxx|4 
 ucbhelper/source/provider/resultset.cxx  |6 --
 ucbhelper/source/provider/resultsethelper.cxx|7 ++-
 ucbhelper/source/provider/resultsetmetadata.cxx  |7 ---
 12 files changed, 2 insertions(+), 73 deletions(-)

New commits:
commit 247bbdf7e071344564af70743eeb5e30f4113601
Author: Chris Sherlock 
AuthorDate: Sun Sep 11 18:49:48 2022 +1000
Commit: Julien Nabet 
CommitDate: Mon Sep 12 18:49:28 2022 +0200

ucb: remove unnecessary comments

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

diff --git a/ucbhelper/source/client/activedatasink.cxx 
b/ucbhelper/source/client/activedatasink.cxx
index fdbcbdccb977..96e75f565bee 100644
--- a/ucbhelper/source/client/activedatasink.cxx
+++ b/ucbhelper/source/client/activedatasink.cxx
@@ -17,11 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-/**
-TODO
- **
-
- */
 #include 
 
 using namespace com::sun::star;
diff --git a/ucbhelper/source/client/activedatastreamer.cxx 
b/ucbhelper/source/client/activedatastreamer.cxx
index 8438cae49f53..fe6be13536d2 100644
--- a/ucbhelper/source/client/activedatastreamer.cxx
+++ b/ucbhelper/source/client/activedatastreamer.cxx
@@ -17,11 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-/**
-TODO
- **
-
- */
 #include "activedatastreamer.hxx"
 
 using namespace com::sun::star;
diff --git a/ucbhelper/source/client/commandenvironment.cxx 
b/ucbhelper/source/client/commandenvironment.cxx
index 13bc254e029e..37956b2c468f 100644
--- a/ucbhelper/source/client/commandenvironment.cxx
+++ b/ucbhelper/source/client/commandenvironment.cxx
@@ -17,13 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-/**
-TODO
- **
-
- */
-
 #include 
 #include 
 
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx 
b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 90c0168c6508..42850c5ee306 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -17,12 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-/**
-TODO
- **
-
- */
 #include 
 #include 
 #include 
diff --git a/ucbhelper/source/provider/contentidentifier.cxx 
b/ucbhelper/source/provider/contentidentifier.cxx
index d4c13b2c0144..2a5da953d99c 100644
--- a/ucbhelper/source/provider/contentidentifier.cxx
+++ b/ucbhelper/source/provider/contentidentifier.cxx
@@ -17,12 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-/**
-TODO
- **
-
- */
 #include 
 
 using namespace com::sun::star::uno;
@@ -33,10 +27,6 @@ using namespace com::sun::star::ucb;
 namespace ucbhelper
 {
 
-
-// struct ContentIdentifier_Impl.
-
-
 struct ContentIdentifier_Impl
 {
 OUString  m_aContentId;
diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index 561a80e77e1c..1e513604eb19 100644
--- 

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

2022-07-01 Thread Stephan Bergmann (via logerrit)
 ucbhelper/source/client/content.cxx |8 +---
 1 file changed, 1 insertion(+), 7 deletions(-)

New commits:
commit 17217a93418c9a5233eecd9491a7c4269d15057f
Author: Stephan Bergmann 
AuthorDate: Fri Jul 1 21:07:34 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Fri Jul 1 23:01:33 2022 +0200

Use some more O3TL_UNREACHABLE

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

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 4eeeab2008d6..48d3ee84a9da 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1022,8 +1022,6 @@ bool Content::isFolder()
 }
 
 
-SAL_WNOUNREACHABLE_CODE_PUSH
-
 bool Content::isDocument()
 {
 bool bDoc = false;
@@ -1037,13 +1035,9 @@ bool Content::isDocument()
 get() ) ),
  m_xImpl->getEnvironment() );
 
-// Unreachable - cancelCommandExecution always throws an exception,
-// But some compilers complain...
-return false;
+O3TL_UNREACHABLE;
 }
 
-SAL_WNOUNREACHABLE_CODE_POP
-
 void Content::lock()
 {
 Command aCommand;


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

2022-05-07 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/cancelcommandexecution.cxx |   25 ++-
 1 file changed, 19 insertions(+), 6 deletions(-)

New commits:
commit a5af08b3ed160a569d389474dc5d5445dccf3a63
Author: Noel Grandin 
AuthorDate: Fri May 6 11:52:20 2022 +0200
Commit: Noel Grandin 
CommitDate: Sat May 7 15:26:06 2022 +0200

tdf#121740 fast path in cancelCommandExecution

skip the cost of constructing a SimpleIOErrorRequest in the common case

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

diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx 
b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 89245ca78492..90c0168c6508 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -27,7 +27,9 @@
 #include 
 #include 
 #include 
+#include 
 #include 
+#include 
 #include 
 #include 
 #include "simpleioerrorrequest.hxx"
@@ -80,11 +82,23 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
  const uno::Reference<
 ucb::XCommandProcessor > & xContext )
 {
-rtl::Reference< ucbhelper::SimpleIOErrorRequest > xRequest
-= new ucbhelper::SimpleIOErrorRequest(
-eError, rArgs, rMessage, xContext );
-if ( xEnv.is() )
+if ( !xEnv )
+{
+// Fast path
+
+ucb::InteractiveAugmentedIOException aRequest;
+aRequest.Message = rMessage;
+aRequest.Context = xContext;
+aRequest.Classification  = task::InteractionClassification_ERROR;
+aRequest.Code= eError;
+aRequest.Arguments   = rArgs;
+cppu::throwException( uno::Any( aRequest ) );
+}
+else
 {
+rtl::Reference< ucbhelper::SimpleIOErrorRequest > xRequest
+= new ucbhelper::SimpleIOErrorRequest(
+eError, rArgs, rMessage, xContext );
 uno::Reference<
 task::XInteractionHandler > xIH = xEnv->getInteractionHandler();
 if ( xIH.is() )
@@ -99,10 +113,9 @@ void cancelCommandExecution( const ucb::IOErrorCode eError,
xContext,
xRequest->getRequest() );
 }
+cppu::throwException( xRequest->getRequest() );
 }
 
-cppu::throwException( xRequest->getRequest() );
-
 OSL_FAIL( "Return from cppu::throwException call!!!" );
 throw uno::RuntimeException();
 }


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

2022-05-06 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/content.cxx |   91 
 1 file changed, 52 insertions(+), 39 deletions(-)

New commits:
commit 9d0a8f7a2e3e473ebb3042f90dd82696dd8705da
Author: Noel Grandin 
AuthorDate: Thu May 5 22:50:16 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri May 6 20:57:08 2022 +0200

osl::Mutex->std::mutex in Content_Impl

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

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index dfe2a9103add..948c4848c6f4 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -23,7 +23,7 @@
 
 #include 
 #include 
-#include 
+#include 
 #include 
 #include 
 #include 
@@ -159,11 +159,13 @@ friend ContentEventListener_Impl;
 Reference< XCommandProcessor >  m_xCommandProcessor;
 Reference< XCommandEnvironment >m_xEnv;
 Reference< XContentEventListener >  m_xContentEventListener;
-mutable osl::Mutex  m_aMutex;
+mutable std::mutex  m_aMutex;
 
 private:
 void reinit( const Reference< XContent >& xContent );
 void disposing(const EventObject& Source);
+Reference< XContent > getContent_NoLock();
+const OUString& getURL_NoLock() const;
 
 public:
 Content_Impl() {};
@@ -1089,7 +1091,7 @@ Content_Impl::Content_Impl( const Reference< 
XComponentContext >& rCtx,
 
 void Content_Impl::reinit( const Reference< XContent >& xContent )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
 m_xCommandProcessor = nullptr;
 
@@ -1114,14 +1116,14 @@ void Content_Impl::reinit( const Reference< XContent >& 
xContent )
 #if OSL_DEBUG_LEVEL > 0
 // Only done on demand in product version for performance reasons,
 // but a nice debug helper.
-getURL();
+getURL_NoLock();
 #endif
 }
 else
 {
 // We need m_xContent's URL in order to be able to create the
 // content object again if demanded ( --> Content_Impl::getContent() )
-getURL();
+getURL_NoLock();
 
 m_xContent = nullptr;
 }
@@ -1149,7 +1151,7 @@ void Content_Impl::disposing( const EventObject& Source )
 Reference xContent;
 
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 if(Source.Source != m_xContent)
 return;
 
@@ -1177,53 +1179,64 @@ const OUString& Content_Impl::getURL() const
 {
 if ( m_aURL.isEmpty() && m_xContent.is() )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
-if ( m_aURL.isEmpty() && m_xContent.is() )
-{
-Reference< XContentIdentifier > xId = m_xContent->getIdentifier();
-if ( xId.is() )
-m_aURL = xId->getContentIdentifier();
-}
+return getURL_NoLock();
 }
 
 return m_aURL;
 }
 
+const OUString& Content_Impl::getURL_NoLock() const
+{
+if ( m_aURL.isEmpty() && m_xContent.is() )
+{
+Reference< XContentIdentifier > xId = m_xContent->getIdentifier();
+if ( xId.is() )
+m_aURL = xId->getContentIdentifier();
+}
+
+return m_aURL;
+}
 
 Reference< XContent > Content_Impl::getContent()
 {
 if ( !m_xContent.is() && !m_aURL.isEmpty() )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
+return getContent_NoLock();
+}
+return m_xContent;
+}
 
-if ( !m_xContent.is() && !m_aURL.isEmpty() )
-{
-Reference< XUniversalContentBroker > pBroker(
-UniversalContentBroker::create( getComponentContext() ) );
+Reference< XContent > Content_Impl::getContent_NoLock()
+{
+if ( !m_xContent.is() && !m_aURL.isEmpty() )
+{
+Reference< XUniversalContentBroker > pBroker(
+UniversalContentBroker::create( getComponentContext() ) );
 
-OSL_ENSURE( pBroker->queryContentProviders().hasElements(),
-"Content Broker not configured (no providers)!" );
+OSL_ENSURE( pBroker->queryContentProviders().hasElements(),
+"Content Broker not configured (no providers)!" );
 
-Reference< XContentIdentifier > xId
-= pBroker->createContentIdentifier( m_aURL );
+Reference< XContentIdentifier > xId
+= pBroker->createContentIdentifier( m_aURL );
 
-OSL_ENSURE( xId.is(), "No Content Identifier!" );
+OSL_ENSURE( xId.is(), "No Content Identifier!" );
 
-if ( xId.is() )
+if ( xId.is() )
+{
+try
 {
-try
-{
-m_xContent = pBroker->queryContent( xId );
-}
-catch ( 

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

2022-05-03 Thread Stephan Bergmann (via logerrit)
 ucbhelper/source/client/content.cxx  |8 

 ucbhelper/source/provider/authenticationfallback.cxx |2 +-
 ucbhelper/source/provider/resultset.cxx  |8 

 ucbhelper/source/provider/simpleauthenticationrequest.cxx|2 +-
 ucbhelper/source/provider/simplecertificatevalidationrequest.cxx |2 +-
 ucbhelper/source/provider/simpleioerrorrequest.cxx   |2 +-
 ucbhelper/source/provider/simplenameclashresolverequest.cxx  |2 +-
 7 files changed, 13 insertions(+), 13 deletions(-)

New commits:
commit 4ad4c963747729c0b980ef49228f468177dc2cca
Author: Stephan Bergmann 
AuthorDate: Tue May 3 11:22:11 2022 +0200
Commit: Stephan Bergmann 
CommitDate: Tue May 3 16:03:54 2022 +0200

Just use Any ctor instead of makeAny in ucbhelper

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

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index e13ce671..dfe2a9103add 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -508,7 +508,7 @@ Sequence< Any > Content::setPropertyValues(
 if ( rPropertyNames.getLength() != rValues.getLength() )
 {
 ucbhelper::cancelCommandExecution(
-makeAny( IllegalArgumentException(
+Any( IllegalArgumentException(
 "Length of property names sequence and value "
 "sequence are unequal!",
 get(),
@@ -927,7 +927,7 @@ bool Content::insertNewContent( const OUString& 
rContentType,
 xNew, m_xImpl->getEnvironment(), m_xImpl->getComponentContext() );
 aNewContent.setPropertyValues( rPropertyNames, rPropertyValues );
 aNewContent.executeCommand( "insert",
-makeAny(
+Any(
 InsertCommandArgument(
 rData.is() ? rData : new 
EmptyInputStream,
 false /* ReplaceExisting */ ) ) );
@@ -1009,7 +1009,7 @@ bool Content::isFolder()
 return bFolder;
 
 ucbhelper::cancelCommandExecution(
- makeAny( UnknownPropertyException(
+ Any( UnknownPropertyException(
 "Unable to retrieve value of property 'IsFolder'!",
 get() ) ),
  m_xImpl->getEnvironment() );
@@ -1028,7 +1028,7 @@ bool Content::isDocument()
 return bDoc;
 
 ucbhelper::cancelCommandExecution(
- makeAny( UnknownPropertyException(
+ Any( UnknownPropertyException(
 "Unable to retrieve value of property 'IsDocument'!",
 get() ) ),
  m_xImpl->getEnvironment() );
diff --git a/ucbhelper/source/provider/authenticationfallback.cxx 
b/ucbhelper/source/provider/authenticationfallback.cxx
index 70fd0ecbf6b5..04491520bd85 100644
--- a/ucbhelper/source/provider/authenticationfallback.cxx
+++ b/ucbhelper/source/provider/authenticationfallback.cxx
@@ -22,7 +22,7 @@ AuthenticationFallbackRequest::AuthenticationFallbackRequest(
 aRequest.instructions = rInstructions;
 aRequest.url = rURL;
 
-setRequest( uno::makeAny( aRequest ) );
+setRequest( uno::Any( aRequest ) );
 m_xAuthFallback = new InteractionAuthFallback( this );
 
 setContinuations({ new InteractionAbort(this), m_xAuthFallback });
diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index bd253295cfda..eff10d5d253c 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -1342,8 +1342,8 @@ void ResultSet::rowCountChanged( sal_uInt32 nOld, 
sal_uInt32 nNew )
 "RowCount",
 false,
 1001,
-uno::makeAny( nOld ), // old value
-uno::makeAny( nNew ) ) ); // new value
+uno::Any( nOld ), // old value
+uno::Any( nNew ) ) ); // new value
 }
 
 
@@ -1358,8 +1358,8 @@ void ResultSet::rowCountFinal()
 "IsRowCountFinal",
 false,
 1000,
-uno:: makeAny( false ),   // old value
-uno::makeAny( true ) ) ); // new value
+uno:: Any( false ),   // old value
+uno::Any( true ) ) ); // new value
 }
 
 
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx 
b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index c6eee708bbd3..972864d9aab6 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -109,7 +109,7 @@ void SimpleAuthenticationRequest::initialize(
   bool bAllowUseSystemCredentials,
   bool bAllowSessionStoring )
 {
-setRequest( uno::makeAny( 

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

2022-04-29 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |   19 ++-
 1 file changed, 10 insertions(+), 9 deletions(-)

New commits:
commit 183dd9deec869209c45378ff09f063cc9bf03e26
Author: Noel Grandin 
AuthorDate: Fri Apr 29 09:22:20 2022 +0200
Commit: Noel Grandin 
CommitDate: Fri Apr 29 13:00:29 2022 +0200

Revert "use more string_view in ucbhelper"

This reverts commit d9c3f05dcb6c03633bbcc8d88e55237a0855d9a5.

This is likely a pessimisation since the
   OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
was previously likely mostly just copying the whole string in which case it 
would return the same object.

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index cf10fda8baa3..10228b72aedc 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -157,7 +157,7 @@ public:
 virtual void SAL_CALL disposing( const lang::EventObject& Source ) 
override;
 
 private:
-void setNoProxyList( std::u16string_view rNoProxyList );
+void setNoProxyList( const OUString & rNoProxyList );
 };
 
 
@@ -809,28 +809,29 @@ void SAL_CALL InternetProxyDecider_Impl::disposing(const 
lang::EventObject&)
 }
 
 
-void InternetProxyDecider_Impl::setNoProxyList( std::u16string_view 
rNoProxyList )
+void InternetProxyDecider_Impl::setNoProxyList(
+const OUString & rNoProxyList )
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
 m_aNoProxyList.clear();
 
-if ( rNoProxyList.empty() )
+if ( rNoProxyList.isEmpty() )
 return;
 
 // List of connection endpoints hostname[:port],
 // separated by semicolon. Wildcards allowed.
 
-size_t nPos = 0;
-size_t nEnd = rNoProxyList.find( ';' );
-size_t nLen = rNoProxyList.size();
+sal_Int32 nPos = 0;
+sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
+sal_Int32 nLen = rNoProxyList.getLength();
 
 do
 {
-if ( nEnd == std::u16string_view::npos )
+if ( nEnd == -1 )
 nEnd = nLen;
 
-OUString aToken( rNoProxyList.substr( nPos, nEnd - nPos ) );
+OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
 
 if ( !aToken.isEmpty() )
 {
@@ -909,7 +910,7 @@ void InternetProxyDecider_Impl::setNoProxyList( 
std::u16string_view rNoProxyList
 if ( nEnd != nLen )
 {
 nPos = nEnd + 1;
-nEnd = rNoProxyList.find( ';', nPos );
+nEnd = rNoProxyList.indexOf( ';', nPos );
 }
 }
 while ( nEnd != nLen );


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

2022-04-28 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |   19 +--
 1 file changed, 9 insertions(+), 10 deletions(-)

New commits:
commit d9c3f05dcb6c03633bbcc8d88e55237a0855d9a5
Author: Noel Grandin 
AuthorDate: Wed Apr 27 20:42:35 2022 +0200
Commit: Noel Grandin 
CommitDate: Thu Apr 28 20:56:18 2022 +0200

use more string_view in ucbhelper

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 10228b72aedc..cf10fda8baa3 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -157,7 +157,7 @@ public:
 virtual void SAL_CALL disposing( const lang::EventObject& Source ) 
override;
 
 private:
-void setNoProxyList( const OUString & rNoProxyList );
+void setNoProxyList( std::u16string_view rNoProxyList );
 };
 
 
@@ -809,29 +809,28 @@ void SAL_CALL InternetProxyDecider_Impl::disposing(const 
lang::EventObject&)
 }
 
 
-void InternetProxyDecider_Impl::setNoProxyList(
-const OUString & rNoProxyList )
+void InternetProxyDecider_Impl::setNoProxyList( std::u16string_view 
rNoProxyList )
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
 m_aNoProxyList.clear();
 
-if ( rNoProxyList.isEmpty() )
+if ( rNoProxyList.empty() )
 return;
 
 // List of connection endpoints hostname[:port],
 // separated by semicolon. Wildcards allowed.
 
-sal_Int32 nPos = 0;
-sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
-sal_Int32 nLen = rNoProxyList.getLength();
+size_t nPos = 0;
+size_t nEnd = rNoProxyList.find( ';' );
+size_t nLen = rNoProxyList.size();
 
 do
 {
-if ( nEnd == -1 )
+if ( nEnd == std::u16string_view::npos )
 nEnd = nLen;
 
-OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
+OUString aToken( rNoProxyList.substr( nPos, nEnd - nPos ) );
 
 if ( !aToken.isEmpty() )
 {
@@ -910,7 +909,7 @@ void InternetProxyDecider_Impl::setNoProxyList(
 if ( nEnd != nLen )
 {
 nPos = nEnd + 1;
-nEnd = rNoProxyList.indexOf( ';', nPos );
+nEnd = rNoProxyList.find( ';', nPos );
 }
 }
 while ( nEnd != nLen );


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

2021-12-27 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/contentinfo.cxx |   51 ++
 ucbhelper/source/provider/contentinfo.hxx |   20 ---
 2 files changed, 32 insertions(+), 39 deletions(-)

New commits:
commit 58a750598cb064f7d9a4569e80ce91f22a87512d
Author: Noel Grandin 
AuthorDate: Thu Dec 23 18:09:02 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 15:21:05 2021 +0100

osl::Mutex->std::mutex in CommandProcessorInfo

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

diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index 76dfb68dbf6b..5ea61e825e8b 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -191,31 +191,30 @@ CommandProcessorInfo::~CommandProcessorInfo()
 
 
 // virtual
-uno::Sequence< css::ucb::CommandInfo > SAL_CALL
-CommandProcessorInfo::getCommands()
+uno::Sequence< css::ucb::CommandInfo > SAL_CALL 
CommandProcessorInfo::getCommands()
 {
-if ( !m_xCommands )
-{
-osl::MutexGuard aGuard( m_aMutex );
-if ( !m_xCommands )
-{
+std::unique_lock aGuard( m_aMutex );
+return getCommandsImpl();
+}
 
-// Get info for commands.
+const uno::Sequence< css::ucb::CommandInfo > & 
CommandProcessorInfo::getCommandsImpl()
+{
+if ( m_xCommands )
+return *m_xCommands;
 
+// Get info for commands.
 
-try
-{
-m_xCommands = m_pContent->getCommands( m_xEnv );
-}
-catch ( uno::RuntimeException const & )
-{
-throw;
-}
-catch ( uno::Exception const & )
-{
-m_xCommands.emplace();
-}
-}
+try
+{
+m_xCommands = m_pContent->getCommands( m_xEnv );
+}
+catch ( uno::RuntimeException const & )
+{
+throw;
+}
+catch ( uno::Exception const & )
+{
+m_xCommands.emplace();
 }
 return *m_xCommands;
 }
@@ -268,7 +267,7 @@ sal_Bool SAL_CALL CommandProcessorInfo::hasCommandByHandle( 
sal_Int32 Handle )
 
 void CommandProcessorInfo::reset()
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 m_xCommands.reset();
 }
 
@@ -277,9 +276,9 @@ bool CommandProcessorInfo::queryCommand(
 std::u16string_view rName,
 css::ucb::CommandInfo& rCommand )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
-getCommands();
+getCommandsImpl();
 
 const css::ucb::CommandInfo* pCommands
 = m_xCommands->getConstArray();
@@ -302,9 +301,9 @@ bool CommandProcessorInfo::queryCommand(
 sal_Int32 nHandle,
 css::ucb::CommandInfo& rCommand )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
-getCommands();
+getCommandsImpl();
 
 const css::ucb::CommandInfo* pCommands = m_xCommands->getConstArray();
 sal_Int32 nCount = m_xCommands->getLength();
diff --git a/ucbhelper/source/provider/contentinfo.hxx 
b/ucbhelper/source/provider/contentinfo.hxx
index 15a122d3c83d..eaff22c4ea05 100644
--- a/ucbhelper/source/provider/contentinfo.hxx
+++ b/ucbhelper/source/provider/contentinfo.hxx
@@ -26,7 +26,6 @@
 #include 
 #include 
 
-#include 
 #include 
 
 namespace com::sun::star::ucb { class XCommandEnvironment; }
@@ -88,7 +87,7 @@ class CommandProcessorInfo :
 m_xEnv;
 std::optional>
 m_xCommands;
-osl::Mutex  m_aMutex;
+std::mutex  m_aMutex;
 ContentImplHelper*  m_pContent;
 
 private:
@@ -96,6 +95,7 @@ private:
css::ucb::CommandInfo& rCommand );
 bool queryCommand( sal_Int32 nHandle,
css::ucb::CommandInfo& rCommand );
+const css::uno::Sequence< css::ucb::CommandInfo > & getCommandsImpl();
 
 public:
 CommandProcessorInfo( const css::uno::Reference< 
css::ucb::XCommandEnvironment >& rxEnv,
@@ -103,17 +103,11 @@ public:
 virtual ~CommandProcessorInfo() override;
 
 // XCommandInfo
-virtual css::uno::Sequence<
-css::ucb::CommandInfo > SAL_CALL
-getCommands() override;
-virtual css::ucb::CommandInfo SAL_CALL
-getCommandInfoByName( const OUString& Name ) override;
-virtual css::ucb::CommandInfo SAL_CALL
-getCommandInfoByHandle( sal_Int32 Handle ) override;
-virtual sal_Bool SAL_CALL
-hasCommandByName( const OUString& Name ) override;
-virtual sal_Bool SAL_CALL
-hasCommandByHandle( sal_Int32 Handle ) override;
+virtual css::uno::Sequence< css::ucb::CommandInfo > SAL_CALL getCommands() 
override;
+virtual css::ucb::CommandInfo SAL_CALL getCommandInfoByName( const 
OUString& Name ) override;
+virtual css::ucb::CommandInfo 

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

2021-12-27 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/contentinfo.cxx |   86 ++
 ucbhelper/source/provider/contentinfo.hxx |   14 ++--
 2 files changed, 48 insertions(+), 52 deletions(-)

New commits:
commit 42050ccb71663a776d6bc79d3f24ea0932f1245e
Author: Noel Grandin 
AuthorDate: Thu Dec 23 18:05:49 2021 +0200
Commit: Noel Grandin 
CommitDate: Mon Dec 27 14:18:27 2021 +0100

osl::Mutex->std::mutex in PropertySetInfo

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

diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index 28be385ea215..76dfb68dbf6b 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -62,54 +62,52 @@ PropertySetInfo::~PropertySetInfo()
 // virtual
 uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
 {
-if ( !m_xProps )
-{
-osl::MutexGuard aGuard( m_aMutex );
-if ( !m_xProps )
-{
-
-// Get info for core ( native) properties.
-
+std::unique_lock aGuard( m_aMutex );
+return getPropertiesImpl();
+}
 
-try
-{
-m_xProps = m_pContent->getProperties( m_xEnv );
-}
-catch ( uno::RuntimeException const & )
-{
-throw;
-}
-catch ( uno::Exception const & )
-{
-m_xProps.emplace();
-}
+const uno::Sequence< beans::Property > & PropertySetInfo::getPropertiesImpl()
+{
+if ( m_xProps )
+return *m_xProps;
 
+// Get info for core ( native) properties.
 
-// Get info for additional properties.
+try
+{
+m_xProps = m_pContent->getProperties( m_xEnv );
+}
+catch ( uno::RuntimeException const & )
+{
+throw;
+}
+catch ( uno::Exception const & )
+{
+m_xProps.emplace();
+}
 
+// Get info for additional properties.
 
-uno::Reference< css::ucb::XPersistentPropertySet >
-xSet ( m_pContent->getAdditionalPropertySet( false ) );
+uno::Reference< css::ucb::XPersistentPropertySet >
+xSet ( m_pContent->getAdditionalPropertySet( false ) );
 
-if ( xSet.is() )
+if ( xSet.is() )
+{
+// Get property set info.
+uno::Reference< beans::XPropertySetInfo > xInfo(
+xSet->getPropertySetInfo() );
+if ( xInfo.is() )
+{
+const uno::Sequence< beans::Property >& rAddProps
+= xInfo->getProperties();
+sal_Int32 nAddProps = rAddProps.getLength();
+if ( nAddProps > 0 )
 {
-// Get property set info.
-uno::Reference< beans::XPropertySetInfo > xInfo(
-xSet->getPropertySetInfo() );
-if ( xInfo.is() )
-{
-const uno::Sequence< beans::Property >& rAddProps
-= xInfo->getProperties();
-sal_Int32 nAddProps = rAddProps.getLength();
-if ( nAddProps > 0 )
-{
-sal_Int32 nPos = m_xProps->getLength();
-m_xProps->realloc( nPos + nAddProps );
-
-std::copy(rAddProps.begin(), rAddProps.end(),
-  std::next(m_xProps->getArray(), nPos));
-}
-}
+sal_Int32 nPos = m_xProps->getLength();
+m_xProps->realloc( nPos + nAddProps );
+
+std::copy(rAddProps.begin(), rAddProps.end(),
+  std::next(m_xProps->getArray(), nPos));
 }
 }
 }
@@ -143,7 +141,7 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName(
 
 void PropertySetInfo::reset()
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 m_xProps.reset();
 }
 
@@ -151,9 +149,9 @@ void PropertySetInfo::reset()
 bool PropertySetInfo::queryProperty(
 std::u16string_view rName, beans::Property& rProp )
 {
-osl::MutexGuard aGuard( m_aMutex );
+std::unique_lock aGuard( m_aMutex );
 
-getProperties();
+getPropertiesImpl();
 
 const beans::Property* pProps = m_xProps->getConstArray();
 sal_Int32 nCount = m_xProps->getLength();
diff --git a/ucbhelper/source/provider/contentinfo.hxx 
b/ucbhelper/source/provider/contentinfo.hxx
index 6554c7fcfe66..15a122d3c83d 100644
--- a/ucbhelper/source/provider/contentinfo.hxx
+++ b/ucbhelper/source/provider/contentinfo.hxx
@@ -27,6 +27,7 @@
 #include 
 
 #include 
+#include 
 
 namespace com::sun::star::ucb { class XCommandEnvironment; }
 
@@ -50,12 +51,13 @@ class PropertySetInfo :
 m_xEnv;
 std::optional>
 m_xProps;
-

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

2021-10-31 Thread Mike Kaganski (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |4 -
 ucbhelper/source/provider/authenticationfallback.cxx |7 ---
 ucbhelper/source/provider/cancelcommandexecution.cxx |7 ---
 ucbhelper/source/provider/simpleauthenticationrequest.cxx|   21 
+++---
 ucbhelper/source/provider/simplecertificatevalidationrequest.cxx |7 ---
 ucbhelper/source/provider/simpleioerrorrequest.cxx   |6 --
 ucbhelper/source/provider/simplenameclashresolverequest.cxx  |9 
 7 files changed, 14 insertions(+), 47 deletions(-)

New commits:
commit 51b75b2eae36272289230bd63b546d527c18df19
Author: Mike Kaganski 
AuthorDate: Fri Oct 29 10:21:30 2021 +0300
Commit: Mike Kaganski 
CommitDate: Sun Oct 31 21:28:26 2021 +0100

Prepare for removal of non-const operator[] from Sequence in ucbhelper

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 7a363a0962f7..211711b556d1 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -301,9 +301,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
 uno::Reference< lang::XMultiServiceFactory > xConfigProv =
 configuration::theDefaultProvider::get( rxContext );
 
-uno::Sequence< uno::Any > aArguments( 1 );
-aArguments[ 0 ] <<= OUString( CONFIG_ROOT_KEY );
-
+uno::Sequence< uno::Any > aArguments{ uno::Any(OUString( 
CONFIG_ROOT_KEY )) };
 uno::Reference< uno::XInterface > xInterface(
 xConfigProv->createInstanceWithArguments(
 "com.sun.star.configuration.ConfigurationAccess",
diff --git a/ucbhelper/source/provider/authenticationfallback.cxx 
b/ucbhelper/source/provider/authenticationfallback.cxx
index eee4b04b39e7..70fd0ecbf6b5 100644
--- a/ucbhelper/source/provider/authenticationfallback.cxx
+++ b/ucbhelper/source/provider/authenticationfallback.cxx
@@ -25,12 +25,7 @@ AuthenticationFallbackRequest::AuthenticationFallbackRequest(
 setRequest( uno::makeAny( aRequest ) );
 m_xAuthFallback = new InteractionAuthFallback( this );
 
-uno::Sequence<
-uno::Reference< task::XInteractionContinuation > > aContinuations( 2 );
-aContinuations[ 0 ] = new InteractionAbort( this );
-aContinuations[ 1 ] = m_xAuthFallback.get( );
-
-setContinuations( aContinuations );
+setContinuations({ new InteractionAbort(this), m_xAuthFallback });
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/ucbhelper/source/provider/cancelcommandexecution.cxx 
b/ucbhelper/source/provider/cancelcommandexecution.cxx
index 8aac85c240aa..89245ca78492 100644
--- a/ucbhelper/source/provider/cancelcommandexecution.cxx
+++ b/ucbhelper/source/provider/cancelcommandexecution.cxx
@@ -51,12 +51,7 @@ void cancelCommandExecution( const uno::Any & rException,
 rtl::Reference< ucbhelper::InteractionRequest > xRequest
 = new ucbhelper::InteractionRequest( rException );
 
-uno::Sequence< uno::Reference< task::XInteractionContinuation > >
-aContinuations( 1 );
-aContinuations[ 0 ]
-= new ucbhelper::InteractionAbort( xRequest.get() );
-
-xRequest->setContinuations( aContinuations );
+xRequest->setContinuations({ new 
ucbhelper::InteractionAbort(xRequest.get()) });
 
 xIH->handle( xRequest );
 
diff --git a/ucbhelper/source/provider/simpleauthenticationrequest.cxx 
b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
index 96608c784c9b..c6eee708bbd3 100644
--- a/ucbhelper/source/provider/simpleauthenticationrequest.cxx
+++ b/ucbhelper/source/provider/simpleauthenticationrequest.cxx
@@ -112,21 +112,19 @@ void SimpleAuthenticationRequest::initialize(
 setRequest( uno::makeAny( rRequest ) );
 
 // Fill continuations...
-unsigned int nSize = 1;
-unsigned int nPos = 0;
+unsigned int nSize = 2;
 
 if( bAllowSessionStoring )
 nSize++;
 
-nSize++;
-
 uno::Sequence< ucb::RememberAuthentication > aRememberModes( nSize );
-aRememberModes[ nPos++ ] = ucb::RememberAuthentication_NO;
+auto it = aRememberModes.getArray();
+*it++ = ucb::RememberAuthentication_NO;
 
 if( bAllowSessionStoring )
-aRememberModes[ nPos++ ] = ucb::RememberAuthentication_SESSION;
+*it++ = ucb::RememberAuthentication_SESSION;
 
-aRememberModes[ nPos++ ] = ucb::RememberAuthentication_PERSISTENT;
+*it = ucb::RememberAuthentication_PERSISTENT;
 
 m_xAuthSupplier
 = new InteractionSupplyAuthentication(
@@ -142,13 +140,8 @@ void SimpleAuthenticationRequest::initialize(
 bAllowUseSystemCredentials // bCanUseSystemCredentials,
 

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

2021-10-31 Thread Julien Nabet (via logerrit)
 ucbhelper/source/provider/resultsetmetadata.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 9afbe4178e3d32e0e50eb98357dcedc0d0c11558
Author: Julien Nabet 
AuthorDate: Sun Oct 31 17:07:24 2021 +0100
Commit: Julien Nabet 
CommitDate: Sun Oct 31 18:00:29 2021 +0100

Fix OSL_ENSURE in ucbhelper

Following:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=6d200d8e739595bd4c6310bede7d66e3c05fbb85
loplugin:moveparam in ucbhelper

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

diff --git a/ucbhelper/source/provider/resultsetmetadata.cxx 
b/ucbhelper/source/provider/resultsetmetadata.cxx
index ccd8a27587ce..6d9449f99953 100644
--- a/ucbhelper/source/provider/resultsetmetadata.cxx
+++ b/ucbhelper/source/provider/resultsetmetadata.cxx
@@ -95,7 +95,7 @@ ResultSetMetaData::ResultSetMetaData(
   m_xContext( rxContext ),
   m_aProps( rProps )
 {
-OSL_ENSURE( rColumnData.size() == sal_uInt32( rProps.getLength() ),
+OSL_ENSURE( m_pImpl->m_aColumnData.size() == sal_uInt32( 
rProps.getLength() ),
 "ResultSetMetaData ctor - different array sizes!" );
 }
 


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

2021-07-20 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/contentinfo.cxx |   22 ++
 ucbhelper/source/provider/contentinfo.hxx |5 ++---
 2 files changed, 12 insertions(+), 15 deletions(-)

New commits:
commit 6c294343edc283aed0af392c09779fee572c0c4c
Author: Noel Grandin 
AuthorDate: Mon Jul 19 12:27:41 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 20 14:52:04 2021 +0200

no need to allocate Sequence separately in CommandProcessorInfo

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

diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index 394d8d01a8dd..c8f5da5aaa79 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -196,10 +196,10 @@ CommandProcessorInfo::~CommandProcessorInfo()
 uno::Sequence< css::ucb::CommandInfo > SAL_CALL
 CommandProcessorInfo::getCommands()
 {
-if ( !m_pCommands )
+if ( !m_xCommands )
 {
 osl::MutexGuard aGuard( m_aMutex );
-if ( !m_pCommands )
+if ( !m_xCommands )
 {
 
 // Get info for commands.
@@ -207,9 +207,7 @@ CommandProcessorInfo::getCommands()
 
 try
 {
-uno::Sequence< css::ucb::CommandInfo > aCmds
-= m_pContent->getCommands( m_xEnv );
-m_pCommands.reset(new uno::Sequence< css::ucb::CommandInfo >( 
aCmds ));
+m_xCommands = m_pContent->getCommands( m_xEnv );
 }
 catch ( uno::RuntimeException const & )
 {
@@ -217,11 +215,11 @@ CommandProcessorInfo::getCommands()
 }
 catch ( uno::Exception const & )
 {
-m_pCommands.reset(new uno::Sequence< css::ucb::CommandInfo >( 
0 ));
+m_xCommands.emplace();
 }
 }
 }
-return *m_pCommands;
+return *m_xCommands;
 }
 
 
@@ -273,7 +271,7 @@ sal_Bool SAL_CALL CommandProcessorInfo::hasCommandByHandle( 
sal_Int32 Handle )
 void CommandProcessorInfo::reset()
 {
 osl::MutexGuard aGuard( m_aMutex );
-m_pCommands.reset();
+m_xCommands.reset();
 }
 
 
@@ -286,8 +284,8 @@ bool CommandProcessorInfo::queryCommand(
 getCommands();
 
 const css::ucb::CommandInfo* pCommands
-= m_pCommands->getConstArray();
-sal_Int32 nCount = m_pCommands->getLength();
+= m_xCommands->getConstArray();
+sal_Int32 nCount = m_xCommands->getLength();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {
 const css::ucb::CommandInfo& rCurrCommand = pCommands[ n ];
@@ -310,8 +308,8 @@ bool CommandProcessorInfo::queryCommand(
 
 getCommands();
 
-const css::ucb::CommandInfo* pCommands = m_pCommands->getConstArray();
-sal_Int32 nCount = m_pCommands->getLength();
+const css::ucb::CommandInfo* pCommands = m_xCommands->getConstArray();
+sal_Int32 nCount = m_xCommands->getLength();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {
 const css::ucb::CommandInfo& rCurrCommand = pCommands[ n ];
diff --git a/ucbhelper/source/provider/contentinfo.hxx 
b/ucbhelper/source/provider/contentinfo.hxx
index 09e43c782453..6554c7fcfe66 100644
--- a/ucbhelper/source/provider/contentinfo.hxx
+++ b/ucbhelper/source/provider/contentinfo.hxx
@@ -20,7 +20,6 @@
 #ifndef UCBHELPER_SOURCE_PROVIDER_CONTENTINFO_HXX
 #define UCBHELPER_SOURCE_PROVIDER_CONTENTINFO_HXX
 
-#include 
 #include 
 #include 
 #include 
@@ -89,8 +88,8 @@ class CommandProcessorInfo :
 {
 css::uno::Reference< css::ucb::XCommandEnvironment >
 m_xEnv;
-std::unique_ptr>
-m_pCommands;
+std::optional>
+m_xCommands;
 osl::Mutex  m_aMutex;
 ContentImplHelper*  m_pContent;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-20 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/contentinfo.cxx |   24 +++-
 ucbhelper/source/provider/contentinfo.hxx |5 +++--
 2 files changed, 14 insertions(+), 15 deletions(-)

New commits:
commit 1688af45e37144991eb09664a17b01d6be8f4792
Author: Noel Grandin 
AuthorDate: Mon Jul 19 12:26:39 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 20 13:00:45 2021 +0200

no need to allocate Sequence separately in PropertySetInfo

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

diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index 820fb021d9b2..394d8d01a8dd 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -62,10 +62,10 @@ PropertySetInfo::~PropertySetInfo()
 // virtual
 uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
 {
-if ( !m_pProps )
+if ( !m_xProps )
 {
 osl::MutexGuard aGuard( m_aMutex );
-if ( !m_pProps )
+if ( !m_xProps )
 {
 
 // Get info for core ( native) properties.
@@ -73,9 +73,7 @@ uno::Sequence< beans::Property > SAL_CALL 
PropertySetInfo::getProperties()
 
 try
 {
-uno::Sequence< beans::Property > aProps
-= m_pContent->getProperties( m_xEnv );
-m_pProps.reset(new uno::Sequence< beans::Property >( aProps ));
+m_xProps = m_pContent->getProperties( m_xEnv );
 }
 catch ( uno::RuntimeException const & )
 {
@@ -83,7 +81,7 @@ uno::Sequence< beans::Property > SAL_CALL 
PropertySetInfo::getProperties()
 }
 catch ( uno::Exception const & )
 {
-m_pProps.reset(new uno::Sequence< beans::Property >( 0 ));
+m_xProps.emplace();
 }
 
 
@@ -105,17 +103,17 @@ uno::Sequence< beans::Property > SAL_CALL 
PropertySetInfo::getProperties()
 sal_Int32 nAddProps = rAddProps.getLength();
 if ( nAddProps > 0 )
 {
-sal_Int32 nPos = m_pProps->getLength();
-m_pProps->realloc( nPos + nAddProps );
+sal_Int32 nPos = m_xProps->getLength();
+m_xProps->realloc( nPos + nAddProps );
 
 std::copy(rAddProps.begin(), rAddProps.end(),
-  std::next(m_pProps->begin(), nPos));
+  std::next(m_xProps->begin(), nPos));
 }
 }
 }
 }
 }
-return *m_pProps;
+return *m_xProps;
 }
 
 
@@ -146,7 +144,7 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName(
 void PropertySetInfo::reset()
 {
 osl::MutexGuard aGuard( m_aMutex );
-m_pProps.reset();
+m_xProps.reset();
 }
 
 
@@ -157,8 +155,8 @@ bool PropertySetInfo::queryProperty(
 
 getProperties();
 
-const beans::Property* pProps = m_pProps->getConstArray();
-sal_Int32 nCount = m_pProps->getLength();
+const beans::Property* pProps = m_xProps->getConstArray();
+sal_Int32 nCount = m_xProps->getLength();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {
 const beans::Property& rCurrProp = pProps[ n ];
diff --git a/ucbhelper/source/provider/contentinfo.hxx 
b/ucbhelper/source/provider/contentinfo.hxx
index 22591c8bc360..09e43c782453 100644
--- a/ucbhelper/source/provider/contentinfo.hxx
+++ b/ucbhelper/source/provider/contentinfo.hxx
@@ -21,6 +21,7 @@
 #define UCBHELPER_SOURCE_PROVIDER_CONTENTINFO_HXX
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -48,8 +49,8 @@ class PropertySetInfo :
 {
 css::uno::Reference< css::ucb::XCommandEnvironment >
 m_xEnv;
-std::unique_ptr>
-m_pProps;
+std::optional>
+m_xProps;
 osl::Mutex  m_aMutex;
 ContentImplHelper*  m_pContent;
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2021-07-20 Thread Noel Grandin (via logerrit)
 ucbhelper/source/provider/resultset.cxx |   12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

New commits:
commit 650818bf8387636afce9af3672abb84f29b99ee2
Author: Noel Grandin 
AuthorDate: Mon Jul 19 12:29:17 2021 +0200
Commit: Noel Grandin 
CommitDate: Tue Jul 20 13:00:26 2021 +0200

no need to allocate Sequence separately in PropertySetInfo

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

diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index f736bac8a789..3bca0b0349ea 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -90,7 +90,7 @@ class PropertySetInfo :
 public lang::XTypeProvider,
 public beans::XPropertySetInfo
 {
-std::unique_ptr>  m_pProps;
+uno::Sequence< beans::Property >  m_aProps;
 
 private:
 bool queryProperty(
@@ -1401,14 +1401,14 @@ namespace ucbhelper_impl {
 PropertySetInfo::PropertySetInfo(
 const PropertyInfo* pProps,
 sal_Int32 nProps )
-: m_pProps( new uno::Sequence< beans::Property >( nProps ) )
+: m_aProps( nProps )
 {
 
 if ( !nProps )
 return;
 
 const PropertyInfo* pEntry = pProps;
-beans::Property* pProperties = m_pProps->getArray();
+beans::Property* pProperties = m_aProps.getArray();
 
 for ( sal_Int32 n = 0; n < nProps; ++n )
 {
@@ -1462,7 +1462,7 @@ XTYPEPROVIDER_IMPL_2( PropertySetInfo,
 // virtual
 uno::Sequence< beans::Property > SAL_CALL PropertySetInfo::getProperties()
 {
-return *m_pProps;
+return m_aProps;
 }
 
 
@@ -1490,8 +1490,8 @@ sal_Bool SAL_CALL PropertySetInfo::hasPropertyByName(
 bool PropertySetInfo::queryProperty(
 std::u16string_view aName, beans::Property& rProp ) const
 {
-sal_Int32 nCount = m_pProps->getLength();
-const beans::Property* pProps = m_pProps->getConstArray();
+sal_Int32 nCount = m_aProps.getLength();
+const beans::Property* pProps = m_aProps.getConstArray();
 for ( sal_Int32 n = 0; n < nCount; ++n )
 {
 const beans::Property& rCurr = pProps[ n ];
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-11-11 Thread Stephan Bergmann (via logerrit)
 ucbhelper/source/client/proxydecider.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 3d3180115be3b87e76189aea2031f0caa735dbb3
Author: Stephan Bergmann 
AuthorDate: Wed Nov 11 09:58:09 2020 +0100
Commit: Stephan Bergmann 
CommitDate: Wed Nov 11 12:37:35 2020 +0100

Drop some unused function parameters

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

diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 8bb610a64335..34ea7385139e 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -575,9 +575,7 @@ InternetProxyServer GetPACProxy(const OUString& rProtocol, 
const OUString& rHost
 
 // Read the settings from the OS which are stored in env vars
 //
-InternetProxyServer GetUnixSystemProxy(const OUString & rProtocol,
-const OUString & /*rHost*/,
-sal_Int32 /*nPort*/)
+InternetProxyServer GetUnixSystemProxy(const OUString & rProtocol)
 {
 // TODO this could be improved to read the "no_proxy" env variable
 InternetProxyServer aProxy;
@@ -624,7 +622,7 @@ InternetProxyServer InternetProxyDecider_Impl::getProxy(
 #ifdef _WIN32
 InternetProxyServer aProxy(GetPACProxy(rProtocol, rHost, nPort));
 #else
-InternetProxyServer aProxy(GetUnixSystemProxy(rProtocol, rHost, 
nPort));
+InternetProxyServer aProxy(GetUnixSystemProxy(rProtocol));
 #endif // _WIN32
 if (!aProxy.aName.isEmpty())
 return aProxy;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2020-08-03 Thread Noel Grandin (via logerrit)
 ucbhelper/source/client/content.cxx|   24 -
 ucbhelper/source/client/proxydecider.cxx   |  156 ++--
 ucbhelper/source/provider/contenthelper.cxx|  312 -
 ucbhelper/source/provider/propertyvalueset.cxx |   80 +++---
 ucbhelper/source/provider/providerhelper.cxx   |   22 -
 ucbhelper/source/provider/resultset.cxx|   26 +-
 ucbhelper/source/provider/resultsethelper.cxx  |   42 +--
 7 files changed, 331 insertions(+), 331 deletions(-)

New commits:
commit c82dae439e8081fdcbfe68b2f2bc04190077a111
Author: Noel Grandin 
AuthorDate: Mon Aug 3 15:56:20 2020 +0200
Commit: Noel Grandin 
CommitDate: Mon Aug 3 21:54:34 2020 +0200

loplugin:flatten in ucbhelper

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

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 69e92b134ae6..8d01366d3ffc 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1314,21 +1314,21 @@ css::uno::Any SAL_CALL 
ContentEventListener_Impl::queryInterface( const css::uno
 // virtual
 void SAL_CALL ContentEventListener_Impl::contentEvent( const ContentEvent& evt 
)
 {
-if ( evt.Source == m_rContent.m_xContent )
+if ( evt.Source != m_rContent.m_xContent )
+return;
+
+switch ( evt.Action )
 {
-switch ( evt.Action )
-{
-case ContentAction::DELETED:
-m_rContent.reinit( Reference< XContent >() );
-break;
+case ContentAction::DELETED:
+m_rContent.reinit( Reference< XContent >() );
+break;
 
-case ContentAction::EXCHANGED:
-m_rContent.reinit( evt.Content );
-break;
+case ContentAction::EXCHANGED:
+m_rContent.reinit( evt.Content );
+break;
 
-default:
-break;
-}
+default:
+break;
 }
 }
 
diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index a8ffd9599f34..fa1befd4be0c 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -819,104 +819,104 @@ void InternetProxyDecider_Impl::setNoProxyList(
 
 m_aNoProxyList.clear();
 
-if ( !rNoProxyList.isEmpty() )
+if ( rNoProxyList.isEmpty() )
+return;
+
+// List of connection endpoints hostname[:port],
+// separated by semicolon. Wildcards allowed.
+
+sal_Int32 nPos = 0;
+sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
+sal_Int32 nLen = rNoProxyList.getLength();
+
+do
 {
-// List of connection endpoints hostname[:port],
-// separated by semicolon. Wildcards allowed.
+if ( nEnd == -1 )
+nEnd = nLen;
 
-sal_Int32 nPos = 0;
-sal_Int32 nEnd = rNoProxyList.indexOf( ';' );
-sal_Int32 nLen = rNoProxyList.getLength();
+OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
 
-do
+if ( !aToken.isEmpty() )
 {
-if ( nEnd == -1 )
-nEnd = nLen;
-
-OUString aToken = rNoProxyList.copy( nPos, nEnd - nPos );
+OUString aServer;
+OUString aPort;
+
+// numerical IPv6 address?
+bool bIPv6Address = false;
+sal_Int32 nClosedBracketPos = aToken.indexOf( ']' );
+if ( nClosedBracketPos == -1 )
+nClosedBracketPos = 0;
+else
+bIPv6Address = true;
 
-if ( !aToken.isEmpty() )
+sal_Int32 nColonPos = aToken.indexOf( ':', nClosedBracketPos );
+if ( nColonPos == -1 )
 {
-OUString aServer;
-OUString aPort;
-
-// numerical IPv6 address?
-bool bIPv6Address = false;
-sal_Int32 nClosedBracketPos = aToken.indexOf( ']' );
-if ( nClosedBracketPos == -1 )
-nClosedBracketPos = 0;
-else
-bIPv6Address = true;
-
-sal_Int32 nColonPos = aToken.indexOf( ':', nClosedBracketPos );
-if ( nColonPos == -1 )
+// No port given, server pattern equals current token
+aPort = "*";
+if ( aToken.indexOf( '*' ) == -1 )
 {
-// No port given, server pattern equals current token
-aPort = "*";
-if ( aToken.indexOf( '*' ) == -1 )
-{
-// pattern describes exactly one server
-aServer = aToken;
-}
-
-aToken += ":*";
+// pattern describes exactly one server
+aServer = aToken;
   

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

2020-07-02 Thread Stephan Bergmann (via logerrit)
 ucbhelper/source/provider/resultset.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit bedc5bf125bdc0377b7dc845192b274e90945e13
Author: Stephan Bergmann 
AuthorDate: Thu Jul 2 10:16:30 2020 +0200
Commit: Stephan Bergmann 
CommitDate: Thu Jul 2 12:15:51 2020 +0200

Upcoming improved loplugin:staticanonymous -> redundantstatic: ucbhelper

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

diff --git a/ucbhelper/source/provider/resultset.cxx 
b/ucbhelper/source/provider/resultset.cxx
index 6cb1536675b8..c8a8ba51bfd5 100644
--- a/ucbhelper/source/provider/resultset.cxx
+++ b/ucbhelper/source/provider/resultset.cxx
@@ -60,7 +60,7 @@ static const uno::Type& sal_Bool_getCppuType()
 return cppu::UnoType::get();
 }
 
-static const PropertyInfo aPropertyTable[] =
+const PropertyInfo aPropertyTable[] =
 {
 { "IsRowCountFinal",
   1000,
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucbhelper/source ucb/source unodevtools/source unoidl/source unotools/inc unotools/IwyuFilter_unotools.yaml unotools/source unoxml/inc uui/source

2020-05-10 Thread Noel Grandin (via logerrit)
 ucb/source/cacher/cachedcontentresultset.hxx   |4 ++--
 ucb/source/core/FileAccess.hxx |8 
 ucb/source/core/providermap.hxx|4 ++--
 ucb/source/core/ucb.hxx|4 ++--
 ucb/source/ucp/cmis/cmis_content.hxx   |4 ++--
 ucb/source/ucp/cmis/cmis_repo_content.hxx  |4 ++--
 ucb/source/ucp/ext/ucpext_content.hxx  |4 ++--
 ucb/source/ucp/ext/ucpext_datasupplier.hxx |4 ++--
 ucb/source/ucp/ext/ucpext_provider.hxx |4 ++--
 ucb/source/ucp/ext/ucpext_resultset.hxx|4 ++--
 ucb/source/ucp/ftp/ftpcontent.hxx  |8 
 ucb/source/ucp/gio/gio_content.hxx |4 ++--
 ucb/source/ucp/hierarchy/hierarchycontent.hxx  |   12 ++--
 ucb/source/ucp/hierarchy/hierarchydata.hxx |4 ++--
 ucb/source/ucp/hierarchy/hierarchyprovider.hxx |4 ++--
 ucb/source/ucp/inc/urihelper.hxx   |4 ++--
 ucb/source/ucp/package/pkgcontent.hxx  |4 ++--
 ucb/source/ucp/package/pkgprovider.hxx |4 ++--
 ucb/source/ucp/tdoc/tdoc_content.hxx   |4 ++--
 ucb/source/ucp/tdoc/tdoc_provider.hxx  |8 
 ucb/source/ucp/webdav-neon/ContentProperties.hxx   |4 ++--
 ucb/source/ucp/webdav-neon/DAVSession.hxx  |8 
 ucb/source/ucp/webdav-neon/DAVSessionFactory.hxx   |8 
 ucb/source/ucp/webdav-neon/DateTimeHelper.hxx  |4 ++--
 ucb/source/ucp/webdav-neon/webdavcontent.hxx   |   16 
 ucb/source/ucp/webdav/ContentProperties.hxx|2 +-
 ucb/source/ucp/webdav/DAVSession.hxx   |2 +-
 ucb/source/ucp/webdav/DAVSessionFactory.hxx|2 +-
 ucb/source/ucp/webdav/DateTimeHelper.hxx   |2 +-
 ucb/source/ucp/webdav/webdavcontent.hxx|8 
 ucb/source/ucp/webdav/webdavprovider.hxx   |2 +-
 ucbhelper/source/provider/contentinfo.hxx  |2 +-
 ucbhelper/source/provider/simpleioerrorrequest.hxx |4 +---
 unodevtools/source/skeletonmaker/skeletoncpp.hxx   |4 ++--
 unodevtools/source/skeletonmaker/skeletonjava.hxx  |4 ++--
 unoidl/source/legacyprovider.hxx   |4 ++--
 unoidl/source/sourcefileprovider.hxx   |4 ++--
 unoidl/source/sourceprovider-parser-requires.hxx   |4 ++--
 unoidl/source/sourceprovider-parser.y  |4 ++--
 unoidl/source/sourceprovider-scanner.hxx   |4 ++--
 unoidl/source/sourceprovider-scanner.l |4 ++--
 unoidl/source/sourcetreeprovider.hxx   |4 ++--
 unoidl/source/unoidlprovider.hxx   |4 ++--
 unotools/IwyuFilter_unotools.yaml  |2 +-
 unotools/inc/unotoolsservices.hxx  |2 +-
 unotools/source/misc/ServiceDocumenter.hxx |4 ++--
 unoxml/inc/event.hxx   |4 ++--
 unoxml/inc/mouseevent.hxx  |4 ++--
 unoxml/inc/mutationevent.hxx   |4 ++--
 unoxml/inc/uievent.hxx |4 ++--
 uui/source/getcontinuations.hxx|4 ++--
 uui/source/iahndl.hxx  |4 ++--
 52 files changed, 117 insertions(+), 119 deletions(-)

New commits:
commit de61e14d0b6ee90cb4d170af340275d811b9fbbf
Author: Noel Grandin 
AuthorDate: Sun May 10 09:19:36 2020 +0200
Commit: Noel Grandin 
CommitDate: Sun May 10 18:28:34 2020 +0200

compact namespace in ucb..uui

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

diff --git a/ucb/source/cacher/cachedcontentresultset.hxx 
b/ucb/source/cacher/cachedcontentresultset.hxx
index d21b74d5fb61..f6a86e704aae 100644
--- a/ucb/source/cacher/cachedcontentresultset.hxx
+++ b/ucb/source/cacher/cachedcontentresultset.hxx
@@ -40,9 +40,9 @@
 #define CACHED_CONTENT_RESULTSET_FACTORY_NAME 
"com.sun.star.ucb.CachedContentResultSetFactory"
 
 
-namespace com { namespace sun { namespace star { namespace script {
+namespace com::sun::star::script {
 class XTypeConverter;
-} } } }
+}
 
 class CCRS_PropertySetInfo;
 class CachedContentResultSet
diff --git a/ucb/source/core/FileAccess.hxx b/ucb/source/core/FileAccess.hxx
index dd5440e2a802..7b7b8a037103 100644
--- a/ucb/source/core/FileAccess.hxx
+++ b/ucb/source/core/FileAccess.hxx
@@ -26,10 +26,10 @@
 #include 
 #include 
 
-namespace com { namespace sun { namespace star {
-namespace lang { class XMultiServiceFactory; }
-namespace uno { class XInterface; }
-} } }
+namespace com::sun::star {
+namespace lang { class XMultiServiceFactory; }
+namespace uno { class XInterface; }
+}
 
 #define IMPLEMENTATION_NAME "com.sun.star.comp.ucb.SimpleFileAccess"
 
diff --git 

[Libreoffice-commits] core.git: ucbhelper/source ucb/source

2019-08-12 Thread Andrea Gelmini (via logerrit)
 ucb/source/ucp/ftp/ftpurl.cxx |4 ++--
 ucb/source/ucp/hierarchy/hierarchyuri.cxx |   12 ++--
 ucb/source/ucp/package/pkgprovider.cxx|2 +-
 ucb/source/ucp/package/pkguri.cxx |   14 +++---
 ucb/source/ucp/tdoc/tdoc_content.cxx  |6 +++---
 ucbhelper/source/provider/resultset.cxx   |2 +-
 6 files changed, 20 insertions(+), 20 deletions(-)

New commits:
commit b937a95b4e3f372f64450a6bfea9a7efb5c16464
Author: Andrea Gelmini 
AuthorDate: Sun Aug 11 18:19:03 2019 +0200
Commit: Julien Nabet 
CommitDate: Mon Aug 12 11:38:04 2019 +0200

Fix typos

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

diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index a72a153d5eac..3d04a716a82c 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -563,11 +563,11 @@ OUString FTPURL::net_title() const
 throw curl_exception(err);
 #endif
 else if(try_more && err == CURLE_FTP_ACCESS_DENIED) {
-// We  were  either denied access when trying to login to
+// We were either denied access when trying to login to
 //  an FTP server or when trying to change working directory
 //  to the one given in the URL.
 if(!m_aPathSegmentVec.empty())
-// determine title form url
+// determine title from URL
 aNetTitle = decodePathSegment(m_aPathSegmentVec.back());
 else
 // must be root
diff --git a/ucb/source/ucp/hierarchy/hierarchyuri.cxx 
b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
index 6bd2fc5952f1..cc7aed266e58 100644
--- a/ucb/source/ucp/hierarchy/hierarchyuri.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyuri.cxx
@@ -47,10 +47,10 @@ void HierarchyUri::init() const
 m_aService.clear();
 m_aParentUri.clear();
 
-// URI must match at least: :
+// URI must match at least: :
 if ( m_aUri.getLength() < HIERARCHY_URL_SCHEME_LENGTH + 1 )
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 return;
 }
@@ -110,7 +110,7 @@ void HierarchyUri::init() const
 // Only :// ?
 if ( nStart == m_aUri.getLength() )
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 return;
 }
@@ -118,7 +118,7 @@ void HierarchyUri::init() const
 // Empty path segments?
 if ( m_aUri.indexOf("//", nStart) != -1 )
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 return;
 }
@@ -128,7 +128,7 @@ void HierarchyUri::init() const
 // Only :/// ?
 if ( nEnd == nStart )
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 return;
 }
@@ -171,7 +171,7 @@ void HierarchyUri::init() const
 }
 else
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 }
 }
diff --git a/ucb/source/ucp/package/pkgprovider.cxx 
b/ucb/source/ucp/package/pkgprovider.cxx
index 7b7848e9a72d..b014c6c01915 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -178,7 +178,7 @@ uno::Reference< ucb::XContent > SAL_CALL 
ContentProvider::queryContent(
 if ( !aUri.isValid() )
 throw ucb::IllegalIdentifierException();
 
-// Create a new identifier for the mormalized URL returned by
+// Create a new identifier for the normalized URL returned by
 // PackageUri::getUri().
 uno::Reference< ucb::XContentIdentifier > xId = new 
::ucbhelper::ContentIdentifier( aUri.getUri() );
 
diff --git a/ucb/source/ucp/package/pkguri.cxx 
b/ucb/source/ucp/package/pkguri.cxx
index 95cb0b7d8874..0458e73085a3 100644
--- a/ucb/source/ucp/package/pkguri.cxx
+++ b/ucb/source/ucp/package/pkguri.cxx
@@ -70,10 +70,10 @@ void PackageUri::init() const
 m_aParam.clear();
 m_aScheme.clear();
 
-// URI must match at least: ://
+// URI must match at least: ://
 if ( m_aUri.getLength() < PACKAGE_URL_SCHEME_LENGTH + 4 )
 {
-// error, but remember that we did a init().
+// error, but remember that we did an init().
 m_aPath = "/";
 return;
 }
@@ 

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

2019-06-29 Thread Arkadiy Illarionov (via logerrit)
 ucbhelper/source/provider/providerhelper.cxx |  208 ---
 1 file changed, 97 insertions(+), 111 deletions(-)

New commits:
commit 195b11b4eed1cabc6090b926901bd17c8c8c9dbd
Author: Arkadiy Illarionov 
AuthorDate: Sat Jun 29 13:19:51 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Sat Jun 29 13:22:10 2019 +0200

Flatten ContentProviderImplHelper

Change-Id: I0461ccfb2d9a9750b91863d9dee29cc5515201dc
Reviewed-on: https://gerrit.libreoffice.org/74868
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/ucbhelper/source/provider/providerhelper.cxx 
b/ucbhelper/source/provider/providerhelper.cxx
index e4b6d4dab704..52935962f9be 100644
--- a/ucbhelper/source/provider/providerhelper.cxx
+++ b/ucbhelper/source/provider/providerhelper.cxx
@@ -280,47 +280,43 @@ bool 
ContentProviderImplHelper::renameAdditionalPropertySet(
 // Get propertyset registry.
 getAdditionalPropertySetRegistry();
 
-if ( m_pImpl->m_xPropertySetRegistry.is() )
+if ( !m_pImpl->m_xPropertySetRegistry.is() )
+return false;
+
+uno::Reference< container::XNameAccess > xNameAccess(
+m_pImpl->m_xPropertySetRegistry, uno::UNO_QUERY );
+if ( !xNameAccess.is() )
+return false;
+
+uno::Sequence< OUString > aKeys
+= xNameAccess->getElementNames();
+if ( aKeys.hasElements() )
 {
-uno::Reference< container::XNameAccess > xNameAccess(
-m_pImpl->m_xPropertySetRegistry, uno::UNO_QUERY );
-if ( xNameAccess.is() )
+OUString aOldKeyWithSlash = rOldKey;
+OUString aOldKeyWithoutSlash;
+if ( !aOldKeyWithSlash.endsWith("/") )
 {
-uno::Sequence< OUString > aKeys
-= xNameAccess->getElementNames();
-if ( aKeys.hasElements() )
+aOldKeyWithSlash += "/";
+aOldKeyWithoutSlash = rOldKey;
+}
+else if ( !rOldKey.isEmpty() )
+aOldKeyWithoutSlash
+= rOldKey.copy( 0, rOldKey.getLength() - 1 );
+
+for ( const OUString& rKey : aKeys )
+{
+if ( rKey.startsWith( aOldKeyWithSlash )
+ || rKey == aOldKeyWithoutSlash )
 {
-OUString aOldKeyWithSlash = rOldKey;
-OUString aOldKeyWithoutSlash;
-if ( !aOldKeyWithSlash.endsWith("/") )
-{
-aOldKeyWithSlash += "/";
-aOldKeyWithoutSlash = rOldKey;
-}
-else if ( !rOldKey.isEmpty() )
-aOldKeyWithoutSlash
-= rOldKey.copy( 0, rOldKey.getLength() - 1 );
-
-for ( const OUString& rKey : aKeys )
-{
-if ( rKey.startsWith( aOldKeyWithSlash )
- || rKey == aOldKeyWithoutSlash )
-{
-OUString aNewKey
-= rKey.replaceAt(
-0, rOldKey.getLength(), rNewKey );
-if ( !renameAdditionalPropertySet(
-rKey, aNewKey, false ) )
-return false;
-}
-}
+OUString aNewKey
+= rKey.replaceAt(
+0, rOldKey.getLength(), rNewKey );
+if ( !renameAdditionalPropertySet(
+rKey, aNewKey, false ) )
+return false;
 }
 }
-else
-return false;
 }
-else
-return false;
 }
 else
 {
@@ -332,13 +328,11 @@ bool 
ContentProviderImplHelper::renameAdditionalPropertySet(
 // Rename property set.
 uno::Reference< container::XNamed > xNamed(
 xOldSet, uno::UNO_QUERY );
-if ( xNamed.is() )
-{
-// ??? throws no exceptions and has no return value ???
-xNamed->setName( rNewKey );
-}
-else
+if ( !xNamed.is() )
 return false;
+
+// ??? throws no exceptions and has no return value ???
+xNamed->setName( rNewKey );
 }
 }
 return true;
@@ -359,47 +353,43 @@ bool ContentProviderImplHelper::copyAdditionalPropertySet(
 // Get propertyset registry.
 getAdditionalPropertySetRegistry();
 
-if ( m_pImpl->m_xPropertySetRegistry.is() )
+if ( !m_pImpl->m_xPropertySetRegistry.is() )
+return false;
+
+uno::Reference< container::XNameAccess > xNameAccess(
+m_pImpl->m_xPropertySetRegistry, 

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

2019-06-28 Thread Arkadiy Illarionov (via logerrit)
 ucbhelper/source/client/interceptedinteraction.cxx |   18 +-
 ucbhelper/source/client/proxydecider.cxx   |  129 +
 ucbhelper/source/provider/contenthelper.cxx|   21 ---
 ucbhelper/source/provider/contentinfo.cxx  |8 -
 ucbhelper/source/provider/propertyvalueset.cxx |   28 +---
 ucbhelper/source/provider/providerhelper.cxx   |   40 +-
 ucbhelper/source/provider/resultsetmetadata.cxx|   21 ---
 7 files changed, 100 insertions(+), 165 deletions(-)

New commits:
commit e1c62463433824c3bdfb3245a19366881544afb9
Author: Arkadiy Illarionov 
AuthorDate: Fri Jun 28 01:35:35 2019 +0300
Commit: Arkadiy Illarionov 
CommitDate: Fri Jun 28 17:37:54 2019 +0200

Simplify Sequence iterations in ucbhelper

Use range-based loops or replace with STL functions

Change-Id: I4e9f5ae006ecbc7513db7574e0f8e08c6940cdb7
Reviewed-on: https://gerrit.libreoffice.org/74828
Tested-by: Jenkins
Reviewed-by: Arkadiy Illarionov 

diff --git a/ucbhelper/source/client/interceptedinteraction.cxx 
b/ucbhelper/source/client/interceptedinteraction.cxx
index afc2f3bf9576..682732958aee 100644
--- a/ucbhelper/source/client/interceptedinteraction.cxx
+++ b/ucbhelper/source/client/interceptedinteraction.cxx
@@ -48,17 +48,13 @@ InterceptedInteraction::EInterceptionState 
InterceptedInteraction::intercepted(
 css::uno::Reference< css::task::XInteractionContinuation > 
InterceptedInteraction::extractContinuation(const css::uno::Sequence< 
css::uno::Reference< css::task::XInteractionContinuation > >& lContinuations,

const css::uno::Type&   
aType )
 {
-const css::uno::Reference< css::task::XInteractionContinuation >* 
pContinuations = lContinuations.getConstArray();
-
-sal_Int32 c = lContinuations.getLength();
-sal_Int32 i = 0;
-
-for (i=0; i xCheck(pContinuations[i], 
css::uno::UNO_QUERY);
-if (xCheck->queryInterface(aType).hasValue())
-return pContinuations[i];
-}
+const css::uno::Reference< css::task::XInteractionContinuation >* 
pContinuations = std::find_if(lContinuations.begin(), lContinuations.end(),
+[](const css::uno::Reference< 
css::task::XInteractionContinuation >& rContinuation) {
+css::uno::Reference< css::uno::XInterface > xCheck(rContinuation, 
css::uno::UNO_QUERY);
+return xCheck->queryInterface(aType).hasValue();
+});
+if (pContinuations != lContinuations.end())
+return *pContinuations;
 
 return css::uno::Reference< css::task::XInteractionContinuation >();
 }
diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 0e290006e94a..e80fa5b708f6 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -707,92 +707,85 @@ void SAL_CALL InternetProxyDecider_Impl::changesOccurred(
 {
 osl::Guard< osl::Mutex > aGuard( m_aMutex );
 
-sal_Int32 nCount = Event.Changes.getLength();
-if ( nCount )
+for ( const util::ElementChange& rElem : Event.Changes )
 {
-const util::ElementChange* pElementChanges
-= Event.Changes.getConstArray();
-for ( sal_Int32 n = 0; n < nCount; ++n )
+OUString aKey;
+if ( ( rElem.Accessor >>= aKey ) && !aKey.isEmpty() )
 {
-const util::ElementChange& rElem = pElementChanges[ n ];
-OUString aKey;
-if ( ( rElem.Accessor >>= aKey ) && !aKey.isEmpty() )
+if ( aKey == PROXY_TYPE_KEY )
 {
-if ( aKey == PROXY_TYPE_KEY )
+sal_Int32 tmp;
+if ( !( rElem.Element >>= tmp ) )
 {
-sal_Int32 tmp;
-if ( !( rElem.Element >>= tmp ) )
-{
-OSL_FAIL( "InternetProxyDecider - changesOccurred - "
-"Error getting config item value!" );
-}
-else
-m_nProxyType = static_cast(tmp);
+OSL_FAIL( "InternetProxyDecider - changesOccurred - "
+"Error getting config item value!" );
 }
-else if ( aKey == NO_PROXY_LIST_KEY )
+else
+m_nProxyType = static_cast(tmp);
+}
+else if ( aKey == NO_PROXY_LIST_KEY )
+{
+OUString aNoProxyList;
+if ( !( rElem.Element >>= aNoProxyList ) )
 {
-OUString aNoProxyList;
-if ( !( rElem.Element >>= aNoProxyList ) )
-{
-OSL_FAIL( "InternetProxyDecider - changesOccurred - "
-"Error 

[Libreoffice-commits] core.git: ucbhelper/source vcl/qa

2019-04-18 Thread Andrea Gelmini (via logerrit)
 ucbhelper/source/provider/contentinfo.cxx |1 -
 vcl/qa/cppunit/BitmapTest.cxx |1 -
 2 files changed, 2 deletions(-)

New commits:
commit 78315f414ad27af65eab2145382d2957c0bfd3f8
Author: Andrea Gelmini 
AuthorDate: Wed Apr 17 13:18:22 2019 +
Commit: Julien Nabet 
CommitDate: Thu Apr 18 10:11:06 2019 +0200

Removed duplicated includes

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

diff --git a/ucbhelper/source/provider/contentinfo.cxx 
b/ucbhelper/source/provider/contentinfo.cxx
index a7c9bcc139e9..6dd522be6955 100644
--- a/ucbhelper/source/provider/contentinfo.cxx
+++ b/ucbhelper/source/provider/contentinfo.cxx
@@ -25,7 +25,6 @@
 #include 
 #include 
 #include 
-#include 
 #include 
 
 #include 
diff --git a/vcl/qa/cppunit/BitmapTest.cxx b/vcl/qa/cppunit/BitmapTest.cxx
index 697db737ecb1..020b01c22d55 100644
--- a/vcl/qa/cppunit/BitmapTest.cxx
+++ b/vcl/qa/cppunit/BitmapTest.cxx
@@ -28,7 +28,6 @@
 #include 
 
 #include 
-#include 
 #include 
 
 #include 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

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

2018-10-31 Thread Libreoffice Gerrit user
 ucbhelper/source/provider/contenthelper.cxx |   13 +
 1 file changed, 5 insertions(+), 8 deletions(-)

New commits:
commit 207d8b88ecf43a945745194dc999348e570a5264
Author: Noel Grandin 
AuthorDate: Mon Oct 29 14:27:32 2018 +0200
Commit: Noel Grandin 
CommitDate: Thu Nov 1 06:45:31 2018 +0100

loplugin:useuniqueptr in ContentImplHelper

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

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 4119d91690e5..1482c036b2f1 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -87,7 +87,7 @@ struct hashPtr
 typedef std::unordered_map
 <
 XPropertiesChangeListenerPtr,
-PropertyEventSequence*,
+PropertyEventSequence,
 hashPtr,
 equalPtr
 >
@@ -696,11 +696,10 @@ void ContentImplHelper::notifyPropertiesChange(
 if ( it == aListeners.end() )
 {
 // Not in map - create and insert new entry.
-p = new PropertyEventSequence( nCount );
-aListeners[ pListener ] = p;
+p = ( pListener, 
PropertyEventSequence(nCount)).first->second;
 }
 else
-p = (*it).second;
+p = >second;
 
 if ( p )
 p->append( rEvent );
@@ -714,15 +713,13 @@ void ContentImplHelper::notifyPropertiesChange(
 {
 beans::XPropertiesChangeListener* pListener =
 static_cast< beans::XPropertiesChangeListener * >( (*it).first 
);
-PropertyEventSequence* pSeq = (*it).second;
+PropertyEventSequence pSeq = std::move(it->second);
 
 // Remove current element.
 aListeners.erase( it );
 
 // Propagate event.
-pListener->propertiesChange( pSeq->getEvents() );
-
-delete pSeq;
+pListener->propertiesChange( pSeq.getEvents() );
 
 it = aListeners.begin();
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucbhelper/source ucb/source

2018-10-22 Thread Libreoffice Gerrit user
 ucb/source/core/ucb.cxx|   24 +--
 ucb/source/ucp/cmis/cmis_content.cxx   |   93 ---
 ucb/source/ucp/cmis/cmis_datasupplier.cxx  |7 
 ucb/source/ucp/cmis/cmis_repo_content.cxx  |   15 -
 ucb/source/ucp/file/filprp.cxx |   12 -
 ucb/source/ucp/file/filtask.cxx|   13 -
 ucb/source/ucp/gio/gio_content.cxx |   29 +--
 ucb/source/ucp/hierarchy/hierarchycontent.cxx  |   16 --
 ucb/source/ucp/package/pkgcontent.cxx  |   25 ---
 ucb/source/ucp/tdoc/tdoc_content.cxx   |   25 ---
 ucb/source/ucp/tdoc/tdoc_docmgr.cxx|   94 +++
 ucb/source/ucp/tdoc/tdoc_provider.cxx  |   24 ---
 ucb/source/ucp/webdav-neon/ContentProperties.cxx   |   57 ++-
 ucb/source/ucp/webdav-neon/DAVResourceAccess.cxx   |   26 ---
 ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx   |   14 -
 ucb/source/ucp/webdav-neon/NeonHeadRequest.cxx |   34 +---
 ucb/source/ucp/webdav-neon/NeonLockStore.cxx   |   19 --
 ucb/source/ucp/webdav-neon/NeonSession.cxx |   58 ++-
 ucb/source/ucp/webdav-neon/webdavcontent.cxx   |  165 +++--
 ucb/source/ucp/webdav-neon/webdavcontentcaps.cxx   |   55 ++-
 ucb/source/ucp/webdav-neon/webdavdatasupplier.cxx  |   32 +---
 ucb/source/ucp/webdav/ContentProperties.cxx|   75 ++---
 ucb/source/ucp/webdav/DAVResourceAccess.cxx|   14 -
 ucb/source/ucp/webdav/DAVSessionFactory.cxx|   14 -
 ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx   |   21 --
 ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx  |   21 --
 ucb/source/ucp/webdav/SerfLockStore.cxx|   16 --
 ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx |   14 -
 ucb/source/ucp/webdav/webdavcontent.cxx|  103 +++--
 ucb/source/ucp/webdav/webdavcontentcaps.cxx|   54 ++
 ucb/source/ucp/webdav/webdavdatasupplier.cxx   |   24 ---
 ucbhelper/source/client/interceptedinteraction.cxx |   35 +---
 ucbhelper/source/provider/providerhelper.cxx   |   10 -
 33 files changed, 390 insertions(+), 848 deletions(-)

New commits:
commit e06afb0c9546ddcde1cedd75f59001396ac6fdf2
Author: Arkadiy Illarionov 
AuthorDate: Sat Oct 20 22:15:25 2018 +0300
Commit: Noel Grandin 
CommitDate: Mon Oct 22 09:47:59 2018 +0200

Simplify containers iterations in ucb, ucbhelper

Use range-based loop or replace with STL functions.

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

diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index 8672fa26a7a0..6b3cf12a8f3b 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -464,16 +464,10 @@ void SAL_CALL 
UniversalContentBroker::deregisterContentProvider(
 {
 ProviderList_Impl & rList = aMapIt->getValue();
 
-ProviderList_Impl::iterator aListEnd(rList.end());
-for (ProviderList_Impl::iterator aListIt(rList.begin());
- aListIt != aListEnd; ++aListIt)
-{
-if ((*aListIt).getProvider() == Provider)
-{
-rList.erase(aListIt);
-break;
-}
-}
+auto aListIt = std::find_if(rList.begin(), rList.end(),
+[](const ProviderListEntry_Impl& rEntry) { return 
rEntry.getProvider() == Provider; });
+if (aListIt != rList.end())
+rList.erase(aListIt);
 
 if (rList.empty())
 m_aProviders.erase(aMapIt);
@@ -810,20 +804,18 @@ void UniversalContentBroker::configureUcb()
 void UniversalContentBroker::prepareAndRegister(
 const ContentProviderDataList& rData)
 {
-ContentProviderDataList::const_iterator aEnd(rData.end());
-for (ContentProviderDataList::const_iterator aIt(rData.begin());
- aIt != aEnd; ++aIt)
+for (const auto& rContentProviderData : rData)
 {
 OUString aProviderArguments;
-if (fillPlaceholders(aIt->Arguments,
+if (fillPlaceholders(rContentProviderData.Arguments,
  m_aArguments,
  ))
 {
 registerAtUcb(this,
   m_xContext,
-  aIt->ServiceName,
+  rContentProviderData.ServiceName,
   aProviderArguments,
-  aIt->URLTemplate);
+  rContentProviderData.URLTemplate);
 
 }
 else
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx 
b/ucb/source/ucp/cmis/cmis_content.cxx
index 65cb142f67bd..8a680d6193bb 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -44,6 +44,7 @@
 #endif
 
 #include 
+#include 
 #include 
 #include 
 #include 
@@ -106,11 +107,9 @@ namespace
 uno::Sequence< OUString > 

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

2016-11-29 Thread Noel Grandin
 ucbhelper/source/provider/propertyvalueset.cxx |  168 +++--
 1 file changed, 79 insertions(+), 89 deletions(-)

New commits:
commit 794c542953ca040d0e039f238bb00c95f6fdbaea
Author: Noel Grandin 
Date:   Tue Nov 29 14:02:47 2016 +0200

simplify macros

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

diff --git a/ucbhelper/source/provider/propertyvalueset.cxx 
b/ucbhelper/source/provider/propertyvalueset.cxx
index b53beba..4fd70e3 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -130,95 +130,86 @@ class PropertyValues : public std::vector< 
ucbhelper_impl::PropertyValue > {};
 // Welcome to the macro hell...
 
 
-#define GETVALUE_IMPL_TYPE( _type_, _type_name_, _member_name_, _cppu_type_ ) \
-  \
-osl::MutexGuard aGuard( m_aMutex );   \
-  \
-_type_ aValue = _type_();   /* default ctor */\
-  \
-m_bWasNull = true;\
-  \
-if ( ( columnIndex < 1 )  \
- || ( columnIndex > sal_Int32( m_pValues->size() ) ) )\
-{ \
-OSL_FAIL( "PropertyValueSet - index out of range!" );\
-} \
-else  \
-{ \
-ucbhelper_impl::PropertyValue& rValue \
-= (*m_pValues)[ columnIndex - 1 ];\
-  \
-if ( rValue.nOrigValue != PropsSet::NONE ) 
 \
-{ \
-if ( rValue.nPropsSet & _type_name_ ) \
-{ \
-/* Values is present natively... */   \
-aValue = rValue._member_name_;\
-m_bWasNull = false;   \
-} \
-else  \
-{ \
-if ( !(rValue.nPropsSet & PropsSet::Object) ) \
-{ \
-/* Value is not (yet) available as Any. Create it. */ \
-getObject( columnIndex, Reference< XNameAccess >() ); \
-} \
-  \
-if ( rValue.nPropsSet & PropsSet::Object )\
-{ \
-/* Value is available as Any. */  \
-  \
-if ( rValue.aObject.hasValue() )  \
-{ \
-/* Try to convert into native value. */   \
-if ( rValue.aObject >>= aValue )  \
-{ \
-rValue._member_name_ = aValue;\
-rValue.nPropsSet |= _type_name_;  \
-m_bWasNull = false;   \
-} \
-else  \
-{ \
-/* Last chance. Try type converter service... */  \
-   

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

2016-11-29 Thread Noel Grandin
 ucbhelper/source/provider/propertyvalueset.cxx |  160 -
 1 file changed, 81 insertions(+), 79 deletions(-)

New commits:
commit 2833691149af36a7508bed2d5113a599f8460f91
Author: Noel Grandin 
Date:   Tue Nov 29 14:01:11 2016 +0200

convert VALUE_SET constants to o3tl::typed_flags

Change-Id: Ie2dead5e661cbcf31a92b3d38cba1983fa65dff4
Reviewed-on: https://gerrit.libreoffice.org/31363
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/ucbhelper/source/provider/propertyvalueset.cxx 
b/ucbhelper/source/provider/propertyvalueset.cxx
index 142e142..b53beba 100644
--- a/ucbhelper/source/provider/propertyvalueset.cxx
+++ b/ucbhelper/source/provider/propertyvalueset.cxx
@@ -34,6 +34,7 @@
 #include "osl/diagnose.h"
 #include "osl/mutex.hxx"
 #include 
+#include 
 
 using namespace com::sun::star::beans;
 using namespace com::sun::star::container;
@@ -44,44 +45,45 @@ using namespace com::sun::star::sdbc;
 using namespace com::sun::star::uno;
 using namespace com::sun::star::util;
 
+enum class PropsSet {
+NONE = 0x,
+String   = 0x0001,
+Boolean  = 0x0002,
+Byte = 0x0004,
+Short= 0x0008,
+Int  = 0x0010,
+Long = 0x0020,
+Float= 0x0040,
+Double   = 0x0080,
+Bytes= 0x0100,
+Date = 0x0200,
+Time = 0x0400,
+Timestamp= 0x0800,
+BinaryStream = 0x1000,
+CharacterStream  = 0x2000,
+Ref  = 0x4000,
+Blob = 0x8000,
+Clob = 0x0001,
+Array= 0x0002,
+Object   = 0x0004
+};
+namespace o3tl {
+template<> struct typed_flags : is_typed_flags {};
+}
+
 namespace ucbhelper_impl
 {
 
 
-// PropertyValue.
-
-
-const sal_uInt32 NO_VALUE_SET   = 0x;
-const sal_uInt32 STRING_VALUE_SET   = 0x0001;
-const sal_uInt32 BOOLEAN_VALUE_SET  = 0x0002;
-const sal_uInt32 BYTE_VALUE_SET = 0x0004;
-const sal_uInt32 SHORT_VALUE_SET= 0x0008;
-const sal_uInt32 INT_VALUE_SET  = 0x0010;
-const sal_uInt32 LONG_VALUE_SET = 0x0020;
-const sal_uInt32 FLOAT_VALUE_SET= 0x0040;
-const sal_uInt32 DOUBLE_VALUE_SET   = 0x0080;
-const sal_uInt32 BYTES_VALUE_SET= 0x0100;
-const sal_uInt32 DATE_VALUE_SET = 0x0200;
-const sal_uInt32 TIME_VALUE_SET = 0x0400;
-const sal_uInt32 TIMESTAMP_VALUE_SET= 0x0800;
-const sal_uInt32 BINARYSTREAM_VALUE_SET = 0x1000;
-const sal_uInt32 CHARACTERSTREAM_VALUE_SET  = 0x2000;
-const sal_uInt32 REF_VALUE_SET  = 0x4000;
-const sal_uInt32 BLOB_VALUE_SET = 0x8000;
-const sal_uInt32 CLOB_VALUE_SET = 0x0001;
-const sal_uInt32 ARRAY_VALUE_SET= 0x0002;
-const sal_uInt32 OBJECT_VALUE_SET   = 0x0004;
-
 struct PropertyValue
 {
-OUString
-sPropertyName;
+OUStringsPropertyName;
 
-sal_uInt32  nPropsSet;
-sal_uInt32  nOrigValue;
+PropsSetnPropsSet;
+PropsSetnOrigValue;
 
 OUStringaString;// getString
-boolbBoolean;   // getBoolean
+boolbBoolean;   // getBoolean
 sal_Int8nByte;  // getByte
 sal_Int16   nShort; // getShort
 sal_Int32   nInt;   // getInt
@@ -102,7 +104,7 @@ struct PropertyValue
 Any aObject;// getObject
 
 inline PropertyValue()
-: nPropsSet( NO_VALUE_SET ), nOrigValue( NO_VALUE_SET ),
+: nPropsSet( PropsSet::NONE ), nOrigValue( PropsSet::NONE ),
   bBoolean(false),
   nByte(0),
   nShort(0),
@@ -146,7 +148,7 @@ class PropertyValues : public std::vector< 
ucbhelper_impl::PropertyValue > {};
 ucbhelper_impl::PropertyValue& rValue \
 = (*m_pValues)[ columnIndex - 1 ];\
   \
-if ( rValue.nOrigValue != NO_VALUE_SET )  \
+if ( rValue.nOrigValue != PropsSet::NONE ) 
 \
 { \
 if ( rValue.nPropsSet & _type_name_ ) \
 { \
@@ -156,13 +158,13 @@ class PropertyValues : public std::vector< 
ucbhelper_impl::PropertyValue > {};
 } \
 else   

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

2016-06-24 Thread Michael Stahl
 ucbhelper/source/provider/contenthelper.cxx |6 ++
 1 file changed, 2 insertions(+), 4 deletions(-)

New commits:
commit 47443d720d5f2bee0993222fd6383a59056d8591
Author: Michael Stahl 
Date:   Wed Jun 22 12:52:49 2016 +0200

ucbhelper: get rid of pointless scope in ContentImplHelper::release

Change-Id: I5a35674115388288190e3a6496010badc32cf589

diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 70418ef..00ae20e 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -152,10 +152,8 @@ void SAL_CALL ContentImplHelper::release()
 rtl::Reference< ContentProviderImplHelper > xKeepProviderAlive(
 m_xProvider );
 
-{
-osl::MutexGuard aGuard( m_xProvider->m_aMutex );
-OWeakObject::release();
-}
+osl::MutexGuard aGuard( m_xProvider->m_aMutex );
+OWeakObject::release();
 }
 
 uno::Any SAL_CALL ContentImplHelper::queryInterface( const uno::Type & rType )
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucbhelper/source ucb/source xmlhelp/source

2016-06-23 Thread Noel Grandin
 ucb/source/ucp/file/bc.cxx|   12 -
 ucb/source/ucp/file/bc.hxx|   27 +---
 ucb/source/ucp/file/filcmd.cxx|   12 -
 ucb/source/ucp/file/filcmd.hxx|   24 +--
 ucb/source/ucp/file/filid.cxx |   18 --
 ucb/source/ucp/file/filid.hxx |   21 +--
 ucb/source/ucp/file/filinpstr.cxx |   27 +---
 ucb/source/ucp/file/filinpstr.hxx |   27 +---
 ucb/source/ucp/file/filprp.cxx|9 -
 ucb/source/ucp/file/filprp.hxx|6 
 ucb/source/ucp/file/filrow.cxx|3 
 ucb/source/ucp/file/filrow.hxx|   54 ++--
 ucb/source/ucp/file/filrset.cxx   |   69 +++---
 ucb/source/ucp/file/filrset.hxx   |  138 ++--
 ucb/source/ucp/file/filstr.cxx|   24 +--
 ucb/source/ucp/file/filstr.hxx|   28 +---
 ucb/source/ucp/file/prov.cxx  |   33 +---
 ucb/source/ucp/file/prov.hxx  |9 -
 ucb/source/ucp/ftp/ftpcontentidentifier.cxx   |3 
 ucb/source/ucp/ftp/ftpresultsetbase.cxx   |   80 +++-
 ucb/source/ucp/ftp/ftpresultsetbase.hxx   |   78 +++
 ucbhelper/source/provider/fd_inputstream.cxx  |   10 -
 xmlhelp/source/cxxhelp/inc/tvfactory.hxx  |9 -
 xmlhelp/source/cxxhelp/provider/inputstream.cxx   |   24 +--
 xmlhelp/source/cxxhelp/provider/inputstream.hxx   |   24 +--
 xmlhelp/source/cxxhelp/provider/resultsetbase.cxx |   75 +++
 xmlhelp/source/cxxhelp/provider/resultsetbase.hxx |  146 +++---
 27 files changed, 330 insertions(+), 660 deletions(-)

New commits:
commit 5bd5baff3f2a55bc2d84e1e352a00dd6969394e3
Author: Noel Grandin 
Date:   Thu Jun 23 11:37:33 2016 +0200

remove some more (void) style function definitions/declarations

found with
git grep -nP '^\s*void\s*\)'

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

diff --git a/ucb/source/ucp/file/bc.cxx b/ucb/source/ucp/file/bc.cxx
index f3e37a5..d7b6db8 100644
--- a/ucb/source/ucp/file/bc.cxx
+++ b/ucb/source/ucp/file/bc.cxx
@@ -577,8 +577,7 @@ BaseContent::addProperty(
 
 
 void SAL_CALL
-BaseContent::removeProperty(
-const OUString& Name )
+BaseContent::removeProperty( const OUString& Name )
 throw( beans::UnknownPropertyException,
beans::NotRemoveableException,
RuntimeException, std::exception)
@@ -595,8 +594,7 @@ BaseContent::removeProperty(
 
 
 Sequence< ContentInfo > SAL_CALL
-BaseContent::queryCreatableContentsInfo(
-void )
+BaseContent::queryCreatableContentsInfo()
 throw( RuntimeException, std::exception )
 {
 return m_pMyShell->queryCreatableContentsInfo();
@@ -604,8 +602,7 @@ BaseContent::queryCreatableContentsInfo(
 
 
 Reference< XContent > SAL_CALL
-BaseContent::createNewContent(
-const ContentInfo& Info )
+BaseContent::createNewContent( const ContentInfo& Info )
 throw( RuntimeException, std::exception )
 {
 // Check type.
@@ -695,8 +692,7 @@ BaseContent::removePropertySetInfoChangeListener(
 
 
 Reference< XInterface > SAL_CALL
-BaseContent::getParent(
-void )
+BaseContent::getParent()
 throw( RuntimeException, std::exception )
 {
 OUString ParentUnq = getParentName( m_aUncPath );
diff --git a/ucb/source/ucp/file/bc.hxx b/ucb/source/ucp/file/bc.hxx
index b798cae..c071f61 100644
--- a/ucb/source/ucp/file/bc.hxx
+++ b/ucb/source/ucp/file/bc.hxx
@@ -88,25 +88,21 @@ namespace fileaccess {
 
 // XInterface
 virtual css::uno::Any SAL_CALL
-queryInterface(
-const css::uno::Type& aType )
+queryInterface( const css::uno::Type& aType )
 throw( css::uno::RuntimeException, std::exception) override;
 
 virtual void SAL_CALL
-acquire(
-void )
+acquire()
 throw() override;
 
 virtual void SAL_CALL
-release(
-void )
+release()
 throw() override;
 
 
 // XComponent
 virtual void SAL_CALL
-dispose(
-void )
+dispose()
 throw( css::uno::RuntimeException, std::exception ) override;
 
 virtual void SAL_CALL
@@ -156,8 +152,7 @@ namespace fileaccess {
css::uno::RuntimeException, std::exception ) override;
 
 virtual void SAL_CALL
-abort(
-sal_Int32 CommandId )
+abort( sal_Int32 CommandId )
 throw( css::uno::RuntimeException, std::exception ) override;
 
 
@@ -206,8 +201,7 @@ namespace fileaccess {
css::uno::RuntimeException, std::exception) override;
 
 virtual void 

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

2016-05-12 Thread Stephan Bergmann
 ucbhelper/source/client/content.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 4baf56e63d7386475b631a7cf86cf0d08d139681
Author: Stephan Bergmann 
Date:   Thu May 12 14:26:29 2016 +0200

loplugin:passstuffbyref

Change-Id: Iba108c1007f33de2e7207e25d7eb2dfc18d1c22c

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index ac8a418..080e9e5 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -186,7 +186,7 @@ public:
 const OUString&   getURL() const;
 Reference< XContent >  getContent();
 Reference< XCommandProcessor > getCommandProcessor();
-Reference< XComponentContext > getComponentContext()
+Reference< XComponentContext > const & getComponentContext()
 { assert(m_xCtx.is()); return m_xCtx; }
 
 Any  executeCommand( const Command& rCommand );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2016-03-14 Thread Rohan Kumar
 ucbhelper/source/client/content.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit bfa7b700480fdc4c52ea91f30bcd274d963721f5
Author: Rohan Kumar 
Date:   Mon Mar 14 11:51:55 2016 +0530

tdf#91794 remove OSL_DEBUG_LEVEL > 1 conditionals

I simply replaced OSL_DEBUG_LEVEL > 1 with OSL_DEBUG_LEVEL > 0
as suggested in easy hack

Change-Id: Id30d93fa439fa4cddf4a56c90b6054203c7882b1
Reviewed-on: https://gerrit.libreoffice.org/23233
Tested-by: Jenkins 
Reviewed-by: Björn Michaelsen 

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index aa5dc96..87ec398 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1120,7 +1120,7 @@ Content_Impl::Content_Impl( const Reference< 
XComponentContext >& rCtx,
 m_xContentEventListener = new ContentEventListener_Impl( *this );
 m_xContent->addContentEventListener( m_xContentEventListener );
 
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
 // Only done on demand in product version for performance reasons,
 // but a nice debug helper.
 getURL();
@@ -1153,7 +1153,7 @@ void Content_Impl::reinit( const Reference< XContent >& 
xContent )
 m_xContent = xContent;
 m_xContent->addContentEventListener( m_xContentEventListener );
 
-#if OSL_DEBUG_LEVEL > 1
+#if OSL_DEBUG_LEVEL > 0
 // Only done on demand in product version for performance reasons,
 // but a nice debug helper.
 getURL();
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2015-11-11 Thread Noel Grandin
 ucbhelper/source/client/interceptedinteraction.cxx   |6 
 ucbhelper/source/provider/contenthelper.cxx  |   82 
+-
 ucbhelper/source/provider/contentidentifier.cxx  |2 
 ucbhelper/source/provider/contentinfo.cxx|   53 ++
 ucbhelper/source/provider/interactionrequest.cxx |8 
 ucbhelper/source/provider/propertyvalueset.cxx   |6 
 ucbhelper/source/provider/providerhelper.cxx |   33 +---
 ucbhelper/source/provider/resultset.cxx  |   27 +--
 ucbhelper/source/provider/resultsethelper.cxx|   56 +++---
 ucbhelper/source/provider/simplecertificatevalidationrequest.cxx |2 
 ucbhelper/source/provider/simplenameclashresolverequest.cxx  |   22 +-
 11 files changed, 141 insertions(+), 156 deletions(-)

New commits:
commit ee74decafeb524a014ec186a13015a8d539a763c
Author: Noel Grandin 
Date:   Wed Nov 11 10:14:35 2015 +0200

com::sun::star->css in ucbhelper/

Change-Id: I01e3046caefdcfbf630f4a794f12e8890be6db40
Reviewed-on: https://gerrit.libreoffice.org/19902
Reviewed-by: Noel Grandin 
Tested-by: Noel Grandin 

diff --git a/ucbhelper/source/client/interceptedinteraction.cxx 
b/ucbhelper/source/client/interceptedinteraction.cxx
index 99c0e25..8dff803 100644
--- a/ucbhelper/source/client/interceptedinteraction.cxx
+++ b/ucbhelper/source/client/interceptedinteraction.cxx
@@ -39,7 +39,7 @@ void InterceptedInteraction::setInterceptions(const 
::std::vector< InterceptedRe
 
 InterceptedInteraction::EInterceptionState InterceptedInteraction::intercepted(
 const InterceptedRequest&,
-const ::com::sun::star::uno::Reference< 
::com::sun::star::task::XInteractionRequest >&)
+const css::uno::Reference< css::task::XInteractionRequest >&)
 {
 // default behaviour! see impl_interceptRequest() for further information 
...
 return E_NOT_INTERCEPTED;
@@ -69,7 +69,7 @@ void SAL_CALL InterceptedInteraction::handle(const 
css::uno::Reference< css::tas
 impl_handleDefault(xRequest);
 }
 
-void InterceptedInteraction::impl_handleDefault(const 
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest 
>& xRequest)
+void InterceptedInteraction::impl_handleDefault(const css::uno::Reference< 
css::task::XInteractionRequest >& xRequest)
 {
 EInterceptionState eState = impl_interceptRequest(xRequest);
 
@@ -98,7 +98,7 @@ void InterceptedInteraction::impl_handleDefault(const 
::com::sun::star::uno::Ref
 }
 }
 
-InterceptedInteraction::EInterceptionState 
InterceptedInteraction::impl_interceptRequest(const 
::com::sun::star::uno::Reference< ::com::sun::star::task::XInteractionRequest 
>& xRequest)
+InterceptedInteraction::EInterceptionState 
InterceptedInteraction::impl_interceptRequest(const css::uno::Reference< 
css::task::XInteractionRequest >& xRequest)
 {
 css::uno::Any  
  aRequest   = xRequest->getRequest();
 css::uno::Type 
  aRequestType   = aRequest.getValueType();
diff --git a/ucbhelper/source/provider/contenthelper.cxx 
b/ucbhelper/source/provider/contenthelper.cxx
index 4e75bdc..f4126d4 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -124,7 +124,7 @@ ContentImplHelper::ContentImplHelper(
 const uno::Reference< uno::XComponentContext >& rxContext,
 const rtl::Reference< ContentProviderImplHelper >& rxProvider,
 const uno::Reference<
-com::sun::star::ucb::XContentIdentifier >& Identifier )
+css::ucb::XContentIdentifier >& Identifier )
 : m_pImpl( new ContentImplHelper_Impl ),
   m_xContext( rxContext ),
   m_xIdentifier( Identifier ),
@@ -162,14 +162,14 @@ void SAL_CALL ContentImplHelper::release()
 uno::Any SAL_CALL ContentImplHelper::queryInterface( const uno::Type & rType )
 throw( uno::RuntimeException, std::exception )
 {
-com::sun::star::uno::Any aRet = cppu::queryInterface( rType,
+css::uno::Any aRet = cppu::queryInterface( rType,
 static_cast< lang::XTypeProvider * >(this),
 static_cast< lang::XServiceInfo * >(this),
 static_cast< lang::XComponent * >(this),
-static_cast< com::sun::star::ucb::XContent * >(this),
-static_cast< com::sun::star::ucb::XCommandProcessor * >(this),
+static_cast< css::ucb::XContent * >(this),
+static_cast< css::ucb::XCommandProcessor * >(this),
 static_cast< beans::XPropertiesChangeNotifier * >(this),
-static_cast< com::sun::star::ucb::XCommandInfoChangeNotifier * 
>(this),
+static_cast< css::ucb::XCommandInfoChangeNotifier * >(this),
 static_cast< 

[Libreoffice-commits] core.git: ucbhelper/source unodevtools/source unotest/source unotools/source unoxml/source uui/source

2015-11-05 Thread Noel Grandin
 ucbhelper/source/client/content.cxx  |3 --
 ucbhelper/source/client/proxydecider.cxx |3 --
 ucbhelper/source/provider/registerucb.cxx|2 -
 unodevtools/source/skeletonmaker/cppcompskeleton.cxx |6 +---
 unotest/source/cpp/bootstrapfixturebase.cxx  |2 -
 unotest/source/cpp/macros_test.cxx   |2 -
 unotools/source/config/configitem.cxx|   28 +--
 unotools/source/config/confignode.cxx|8 ++---
 unotools/source/config/historyoptions.cxx|   22 +++---
 unotools/source/config/lingucfg.cxx  |2 -
 unotools/source/config/moduleoptions.cxx |4 +-
 unotools/source/config/useroptions.cxx   |4 +-
 unotools/source/config/viewoptions.cxx   |5 +--
 unotools/source/ucbhelper/ucblockbytes.cxx   |   18 +---
 unoxml/source/dom/attributesmap.cxx  |   13 +++-
 unoxml/source/dom/saxbuilder.cxx |4 --
 unoxml/source/service/services.cxx   |6 ++--
 uui/source/passwordcontainer.cxx |4 --
 uui/source/unknownauthdlg.cxx|6 +---
 19 files changed, 63 insertions(+), 79 deletions(-)

New commits:
commit 94268513eeded3952972d7efe0a9bc689605421b
Author: Noel Grandin 
Date:   Thu Nov 5 12:42:10 2015 +0200

use uno::Reference::set method instead of assignment

Change-Id: Id57ccff7ea6cf5c7053b51268b1190f5459bb357

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index a384a5e..54363ef 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1298,8 +1298,7 @@ Reference< XCommandProcessor > 
Content_Impl::getCommandProcessor()
 osl::MutexGuard aGuard( m_aMutex );
 
 if ( !m_xCommandProcessor.is() )
-m_xCommandProcessor
-= Reference< XCommandProcessor >( getContent(), UNO_QUERY );
+m_xCommandProcessor.set( getContent(), UNO_QUERY );
 }
 
 return m_xCommandProcessor;
diff --git a/ucbhelper/source/client/proxydecider.cxx 
b/ucbhelper/source/client/proxydecider.cxx
index 49fa8ed..b51e889 100644
--- a/ucbhelper/source/client/proxydecider.cxx
+++ b/ucbhelper/source/client/proxydecider.cxx
@@ -369,8 +369,7 @@ InternetProxyDecider_Impl::InternetProxyDecider_Impl(
 
 // Register as listener for config changes.
 
-m_xNotifier = uno::Reference< util::XChangesNotifier >(
-xInterface, uno::UNO_QUERY );
+m_xNotifier.set( xInterface, uno::UNO_QUERY );
 
 OSL_ENSURE( m_xNotifier.is(),
 "InternetProxyDecider - No notifier!" );
diff --git a/ucbhelper/source/provider/registerucb.cxx 
b/ucbhelper/source/provider/registerucb.cxx
index 5016155..d13a729 100644
--- a/ucbhelper/source/provider/registerucb.cxx
+++ b/ucbhelper/source/provider/registerucb.cxx
@@ -80,7 +80,7 @@ registerAtUcb(
 if (!xProvider.is())
 try
 {
-xProvider = uno::Reference< ucb::XContentProvider >(
+xProvider.set(
 
rxContext->getServiceManager()->createInstanceWithContext(rName, rxContext),
 uno::UNO_QUERY);
 }
diff --git a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx 
b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
index f9137b0..488440e 100644
--- a/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
+++ b/unodevtools/source/skeletonmaker/cppcompskeleton.cxx
@@ -538,8 +538,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
 "css::uno::Reference< css::uno::XInterface > xIface =\n"
 "xProvider->createInstanceWithArguments(sReadOnlyView, 
"
 "aArguments);\n\n"
-" m_xHAccess = css::uno::Reference<\n"
-"css::container::XHierarchicalNameAccess >(xIface, 
css::uno::UNO_QUERY);"
+" m_xHAccess.set(xIface, css::uno::UNO_QUERY);"
 "\n\n";
 
 o << "// extend arguments to create a view for all locales to 
get "
@@ -551,8 +550,7 @@ void generateAddinConstructorAndHelper(std::ostream& o,
 "// create view for all locales\n"
 "xIface = 
xProvider->createInstanceWithArguments(sReadOnlyView, "
 "aArguments);\n\n"
-"m_xCompAccess = css::uno::Reference<\n"
-"css::container::XHierarchicalNameAccess >(xIface, 
css::uno::UNO_QUERY);\n";
+"m_xCompAccess.set(xIface, css::uno::UNO_QUERY);\n";
 
 o << "}\ncatch ( css::uno::Exception & ) {\n}\n}\n\n";
 
diff --git a/unotest/source/cpp/bootstrapfixturebase.cxx 
b/unotest/source/cpp/bootstrapfixturebase.cxx
index 

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

2015-10-05 Thread Stephan Bergmann
 ucbhelper/source/client/content.cxx |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit db0ac3d2cb52be60b850fb522f697c970eaf51bd
Author: Stephan Bergmann 
Date:   Mon Oct 5 14:35:46 2015 +0200

loplugin:stringconstant

Change-Id: I68c63d560cfd7ec82802cd3f073cdd0544cff99b

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 3ee7688..677a6a0 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -1100,7 +1100,7 @@ void Content::lock()
 throw( CommandAbortedException, RuntimeException, Exception )
 {
 Command aCommand;
-aCommand.Name = rtl::OUString::createFromAscii( "lock" );
+aCommand.Name = "lock";
 aCommand.Handle   = -1; // n/a
 
 m_xImpl->executeCommand( aCommand );
@@ -1112,7 +1112,7 @@ void Content::unlock()
 {
 
 Command aCommand;
-aCommand.Name = rtl::OUString::createFromAscii( "unlock" );
+aCommand.Name = "unlock";
 aCommand.Handle   = -1; // n/a
 
 m_xImpl->executeCommand( aCommand );
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-09-17 Thread Stephan Bergmann
 ucbhelper/source/client/content.cxx |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

New commits:
commit 6ee5be0e1dc300120439c3579430d35e7d31131c
Author: Stephan Bergmann sberg...@redhat.com
Date:   Wed Sep 17 11:48:56 2014 +0200

Improve exception msg

Change-Id: I4edbecd0ca3006c24fd5920a9ef9ad1fdc6016fb

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index c8ccd88..d0a5c19 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -277,7 +277,7 @@ static Reference XContent  getContentThrow(
 ensureContentProviderForURL( rBroker, xId-getContentIdentifier() );
 
 throw ContentCreationException(
-Unable to create Content!  + msg,
+Unable to create Content for  + xId-getContentIdentifier() + 
:  + msg,
 Reference XInterface (),
 ContentCreationError_CONTENT_CREATION_FAILED );
 }
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2014-04-10 Thread Michael Stahl
 ucbhelper/source/client/content.cxx |1 +
 1 file changed, 1 insertion(+)

New commits:
commit a7d3f57da50a21dbe27516948435255ad54249c7
Author: Michael Stahl mst...@redhat.com
Date:   Thu Apr 10 14:12:13 2014 +0200

warning C4101: 'e': unreferenced local variable

Change-Id: I3fb8a4f2854fb034d6b184ee46c04e8a8d03ca6a

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index a071786..4cb7628 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -298,6 +298,7 @@ static Reference XContent  getContentNoThrow(
 }
 catch ( IllegalIdentifierException const  e )
 {
+SAL_WARN(ucbhelper, getContentNoThrow: exception:   e.Message);
 }
 
 return xContent;
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


[Libreoffice-commits] core.git: ucbhelper/source ucb/source

2013-06-04 Thread Caolán McNamara
 ucb/source/ucp/ftp/ftpurl.cxx|5 -
 ucbhelper/source/provider/fd_inputstream.cxx |   13 -
 2 files changed, 12 insertions(+), 6 deletions(-)

New commits:
commit 2684858c79877d81f8ec20b70abda43ca72f060d
Author: Caolán McNamara caol...@redhat.com
Date:   Tue Jun 4 11:27:18 2013 +0100

fix build, bad merge

Change-Id: I153b5ac4c2c75aca055ef49920cbccf3bd7720d4

diff --git a/ucb/source/ucp/ftp/ftpurl.cxx b/ucb/source/ucp/ftp/ftpurl.cxx
index 50309e9..6da2bf4 100644
--- a/ucb/source/ucp/ftp/ftpurl.cxx
+++ b/ucb/source/ucp/ftp/ftpurl.cxx
@@ -411,7 +411,10 @@ oslFileHandle FTPURL::open()
 CURLcode err = curl_easy_perform(curl);
 
 if(err == CURLE_OK)
-osl_setFilePos( res, osl_Pos_Absolut, 0 );
+{
+oslFileError rc = osl_setFilePos( res, osl_Pos_Absolut, 0 );
+SAL_WARN_IF(rc != osl_File_E_None, ucb, osl_setFilePos failed);
+}
 else {
 osl_closeFile(res),res = 0;
 throw curl_exception(err);
diff --git a/ucbhelper/source/provider/fd_inputstream.cxx 
b/ucbhelper/source/provider/fd_inputstream.cxx
index f70a6e9..b7857b6 100644
--- a/ucbhelper/source/provider/fd_inputstream.cxx
+++ b/ucbhelper/source/provider/fd_inputstream.cxx
@@ -28,7 +28,7 @@ using namespace com::sun::star::io;
 
 namespace ucbhelper
 {
-FdInputStream:::FdInputStream:( oslFileHandle tmpfl )
+FdInputStream::FdInputStream( oslFileHandle tmpfl )
 : m_tmpfl(tmpfl)
 , m_nLength( 0 )
 {
@@ -41,7 +41,8 @@ namespace ucbhelper
 sal_uInt64 nFileSize = 0;
 if ( osl_getFilePos( m_tmpfl, nFileSize ) == osl_File_E_None )
 m_nLength = nFileSize;
-osl_setFilePos( m_tmpfl, osl_Pos_Absolut, 0 );
+oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolut, 0 );
+SAL_WARN_IF(rc != osl_File_E_None, ucbhelper, osl_setFilePos 
failed);
 }
 }
 
@@ -101,7 +102,8 @@ namespace ucbhelper
 if(!m_tmpfl)
 throw IOException();
 
-osl_setFilePos( m_tmpfl, osl_Pos_Current, nBytesToSkip );
+oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Current, 
nBytesToSkip );
+SAL_WARN_IF(rc != osl_File_E_None, ucbhelper, osl_setFilePos 
failed);
 }
 
 
@@ -123,7 +125,7 @@ namespace ucbhelper
 {
 osl::MutexGuard aGuard(m_aMutex);
 if(m_tmpfl)
-fclose(m_tmpfl),m_tmpfl = 0;
+osl_closeFile(m_tmpfl),m_tmpfl = 0;
 }
 
 
@@ -137,7 +139,8 @@ namespace ucbhelper
 if(!m_tmpfl)
 throw IOException();
 
-fseek(m_tmpfl,long(location),SEEK_SET);
+oslFileError rc = osl_setFilePos( m_tmpfl, osl_Pos_Absolut, location );
+SAL_WARN_IF(rc != osl_File_E_None, ucbhelper, osl_setFilePos 
failed);
 }
 
 
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits


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

2013-02-28 Thread Stephan Bergmann
 ucbhelper/source/client/content.cxx |   29 +++--
 1 file changed, 3 insertions(+), 26 deletions(-)

New commits:
commit ecf9b211ff2528e2b8e5226dcd50d7c13164bb0f
Author: Stephan Bergmann sberg...@redhat.com
Date:   Thu Feb 28 21:50:31 2013 +0100

No need for a command ID

...as there is no infrastructure to abort ucbhelper commands anyway

Change-Id: I7796386a4b931c24ff2cc66a706d5c0182cb82e5

diff --git a/ucbhelper/source/client/content.cxx 
b/ucbhelper/source/client/content.cxx
index 18219f5..62a3844 100644
--- a/ucbhelper/source/client/content.cxx
+++ b/ucbhelper/source/client/content.cxx
@@ -173,14 +173,13 @@ friend class ContentEventListener_Impl;
 Reference XCommandEnvironment m_xEnv;
 Reference XContentEventListener   m_xContentEventListener;
 mutable osl::Mutex  m_aMutex;
-sal_Int32   m_nCommandId;
 
 private:
 void reinit( const Reference XContent  xContent );
 void disposing(const EventObject Source);
 
 public:
-Content_Impl() : m_nCommandId( 0 ) {};
+Content_Impl() {};
 Content_Impl( const Reference XComponentContext  rCtx,
   const Reference XContent  rContent,
   const Reference XCommandEnvironment  rEnv );
@@ -190,7 +189,6 @@ public:
 const rtl::OUString   getURL() const;
 Reference XContent   getContent();
 Reference XCommandProcessor  getCommandProcessor();
-sal_Int32 getCommandId();
 Reference XComponentContext  getComponentContext()
 { assert(m_xCtx.is()); return m_xCtx; }
 
@@ -1088,8 +1086,7 @@ Content_Impl::Content_Impl( const Reference 
XComponentContext  rCtx,
 const Reference XCommandEnvironment  rEnv )
 : m_xCtx( rCtx ),
   m_xContent( rContent ),
-  m_xEnv( rEnv ),
-  m_nCommandId( 0 )
+  m_xEnv( rEnv )
 {
 assert(rCtx.is());
 if ( m_xContent.is() )
@@ -,7 +1108,6 @@ void Content_Impl::reinit( const Reference XContent  
xContent )
 osl::MutexGuard aGuard( m_aMutex );
 
 m_xCommandProcessor = 0;
-m_nCommandId = 0;
 
 // #92581# - Don't reset m_aURL!!!
 
@@ -1175,7 +1171,6 @@ void Content_Impl::disposing( const EventObject Source )
 
 xContent = m_xContent;
 
-m_nCommandId = 0;
 m_aURL = rtl::OUString();
 m_xCommandProcessor = 0;
 m_xContent = 0;
@@ -1267,24 +1262,6 @@ Reference XCommandProcessor  
Content_Impl::getCommandProcessor()
 }
 
 //=
-sal_Int32 Content_Impl::getCommandId()
-{
-if ( m_nCommandId == 0 )
-{
-osl::MutexGuard aGuard( m_aMutex );
-
-if ( m_nCommandId == 0 )
-{
-Reference XCommandProcessor  xProc = getCommandProcessor();
-if ( xProc.is() )
-m_nCommandId = xProc-createCommandIdentifier();
-}
-}
-
-return m_nCommandId;
-}
-
-//=
 Any Content_Impl::executeCommand( const Command rCommand )
 {
 Reference XCommandProcessor  xProc = getCommandProcessor();
@@ -1292,7 +1269,7 @@ Any Content_Impl::executeCommand( const Command rCommand 
)
 return Any();
 
 // Execute command
-return xProc-execute( rCommand, getCommandId(), m_xEnv );
+return xProc-execute( rCommand, 0, m_xEnv );
 }
 
 //=
___
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits