[Libreoffice-commits] core.git: 8 commits - basic/source desktop/CppunitTest_desktop_app.mk desktop/Library_sofficeapp.mk include/vcl ucb/source vcl/headless vcl/source

Tor Lillqvist tml at collabora.com
Thu Dec 8 08:31:30 UTC 2016


 basic/source/uno/namecont.cxx                      |    2 +
 desktop/CppunitTest_desktop_app.mk                 |    2 +
 desktop/Library_sofficeapp.mk                      |    2 +
 include/vcl/opengl/OpenGLWrapper.hxx               |    8 ++++-
 ucb/source/ucp/webdav/AprEnv.cxx                   |    4 +-
 ucb/source/ucp/webdav/ContentProperties.cxx        |    4 +-
 ucb/source/ucp/webdav/DAVException.hxx             |    2 -
 ucb/source/ucp/webdav/DAVResourceAccess.hxx        |    2 -
 ucb/source/ucp/webdav/DAVSessionFactory.hxx        |    2 -
 ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx      |    2 -
 ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx      |    2 -
 ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx    |    2 -
 ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx    |    2 -
 ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx       |   14 ++++-----
 ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx       |    2 -
 ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx      |    7 ++--
 ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx      |    2 -
 ucb/source/ucp/webdav/SerfInputStream.hxx          |    2 -
 ucb/source/ucp/webdav/SerfLockReqProcImpl.cxx      |    4 +-
 ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx      |    2 -
 ucb/source/ucp/webdav/SerfLockStore.cxx            |    4 +-
 ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx     |    2 -
 ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx     |    2 -
 ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx      |    2 -
 ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx      |    2 -
 ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx      |    8 ++---
 ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx  |   16 +++++------
 ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx |    8 ++---
 ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx       |    4 +-
 ucb/source/ucp/webdav/SerfRequestProcessor.cxx     |   12 ++++----
 ucb/source/ucp/webdav/SerfRequestProcessor.hxx     |    2 -
 ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx |    2 -
 ucb/source/ucp/webdav/SerfSession.cxx              |   30 ++++++++++-----------
 ucb/source/ucp/webdav/SerfSession.hxx              |    6 ++--
 ucb/source/ucp/webdav/webdavprovider.hxx           |    2 -
 vcl/headless/svpinst.cxx                           |   16 +++++++++++
 vcl/source/filter/graphicfilter.cxx                |    2 +
 37 files changed, 110 insertions(+), 79 deletions(-)

New commits:
commit 663e5a54386d8bdee4ebc2bdd6f93da8a6f99ebe
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 09:47:05 2016 +0200

    No OpenGLWrapper code in vcl if LIBO_HEADLESS
    
    Change-Id: I2330661212dac11093d80e4ceb400f1efee0359f

diff --git a/include/vcl/opengl/OpenGLWrapper.hxx b/include/vcl/opengl/OpenGLWrapper.hxx
index 3b7f6a7..5032234 100644
--- a/include/vcl/opengl/OpenGLWrapper.hxx
+++ b/include/vcl/opengl/OpenGLWrapper.hxx
@@ -22,13 +22,19 @@ struct VCL_DLLPUBLIC OpenGLWrapper
     /**
      * Returns true if VCL has OpenGL rendering enabled
      */
+#ifdef LIBO_HEADLESS
+    static bool isVCLOpenGLEnabled()
+    {
+        return false;
+    }
+#else
     static bool isVCLOpenGLEnabled();
 
-
     /**
      * Returns the number of times OpenGL buffers have been swapped.
      */
     static sal_Int64 getBufferSwapCounter();
+#endif
 };
 
 #endif // INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
commit 986ba9a7e8b49f0c37fbd8f855e249a9f257ad08
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 09:42:34 2016 +0200

    No glxtest library unless USING_X11
    
    Change-Id: Ibcc0eeba9beaaeea86bdda5e0ea80e54c25621a9

diff --git a/desktop/CppunitTest_desktop_app.mk b/desktop/CppunitTest_desktop_app.mk
index 1b1c361..6189f05 100644
--- a/desktop/CppunitTest_desktop_app.mk
+++ b/desktop/CppunitTest_desktop_app.mk
@@ -46,9 +46,11 @@ $(eval $(call gb_CppunitTest_use_libraries,desktop_app, \
 ))
 
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
+ifeq ($(USING_X11),TRUE)
 $(eval $(call gb_CppunitTest_use_static_libraries,desktop_app,\
     glxtest \
 ))
+endif
 
 $(eval $(call gb_CppunitTest_add_libs,desktop_app,\
 	-lm $(DLOPEN_LIBS) \
diff --git a/desktop/Library_sofficeapp.mk b/desktop/Library_sofficeapp.mk
index 8164260..1d91403 100644
--- a/desktop/Library_sofficeapp.mk
+++ b/desktop/Library_sofficeapp.mk
@@ -118,9 +118,11 @@ $(eval $(call gb_Library_add_libs,sofficeapp,\
 ))
 else
 ifeq ($(OS), $(filter LINUX %BSD SOLARIS, $(OS)))
+ifeq ($(USING_X11),TRUE)
 $(eval $(call gb_Library_use_static_libraries,sofficeapp,\
     glxtest \
 ))
+endif
 
 $(eval $(call gb_Library_add_libs,sofficeapp,\
 	-lm $(DLOPEN_LIBS) \
commit b4c56f732350d27f957318a6820d5e9c037e5d5e
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 08:34:26 2016 +0200

    Try to fix --disable-gui build
    
    Change-Id: I4f56b98f9475dd915fed10b67bb72dd12d859597

diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 39ad727..0397342 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -449,6 +449,20 @@ void SvpSalInstance::AddToRecentDocumentList(const OUString&, const OUString&, c
 }
 
 //obviously doesn't actually do anything, its just a nonfunctional stub
+
+#ifdef LIBO_HEADLESS
+
+class SvpOpenGLContext
+{
+};
+
+OpenGLContext* SvpSalInstance::CreateOpenGLContext()
+{
+    return nullptr;
+}
+
+#else
+
 class SvpOpenGLContext : public OpenGLContext
 {
     GLWindow m_aGLWin;
@@ -462,6 +476,8 @@ OpenGLContext* SvpSalInstance::CreateOpenGLContext()
     return new SvpOpenGLContext;
 }
 
+#endif
+
 SvpSalTimer::~SvpSalTimer()
 {
 }
commit df1de153d4a9e103dbf4580f91b3b15a77c44c1a
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 07:42:38 2016 +0200

    Fix -Werror,-Wunused-private-field in the DISABLE_EXPORT case
    
    Change-Id: I237a691ac6b7b3edcc7b2fbdfc36ed72ae46fe0c

diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx
index 8e4d8b2..632c692 100644
--- a/vcl/source/filter/graphicfilter.cxx
+++ b/vcl/source/filter/graphicfilter.cxx
@@ -1846,6 +1846,8 @@ sal_uInt16 GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString
     (void) nFormat;
     (void) pFilterData;
 
+    (void) nExpGraphHint;
+
     return GRFILTER_FORMATERROR;
 #else
     SAL_INFO( "vcl.filter", "GraphicFilter::ExportGraphic() (thb)" );
commit 91ffc6a60eec309ec69e2ca07ca517afe3306960
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 01:42:55 2016 +0200

    loplugin:overrideparam
    
    Change-Id: I9b70fbc344a02a058fbb7af694edad560244c930

diff --git a/ucb/source/ucp/webdav/SerfSession.hxx b/ucb/source/ucp/webdav/SerfSession.hxx
index b734945..02b6eb3 100644
--- a/ucb/source/ucp/webdav/SerfSession.hxx
+++ b/ucb/source/ucp/webdav/SerfSession.hxx
@@ -204,14 +204,14 @@ public:
     COPY( const OUString & inSourceURL,
           const OUString & inDestinationURL,
           const DAVRequestEnvironment & rEnv,
-          bool inOverWrite )
+          bool inOverWrite = false )
         throw ( DAVException ) override;
 
     virtual void
     MOVE( const OUString & inSourceURL,
           const OUString & inDestinationURL,
           const DAVRequestEnvironment & rEnv,
-          bool inOverWrite )
+          bool inOverWrite = false )
         throw ( DAVException ) override;
 
     virtual void DESTROY( const OUString & inPath,
commit 3587facbb7e7fa47b85131b0be96d4bae0d61100
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 01:40:01 2016 +0200

    loplugin:override
    
    Change-Id: I57b5572d81e6da53d82fbbb6dbcb35c9802ec3f1

diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index 41830f6..3f6b66c 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -539,7 +539,7 @@ namespace
     bool isCachable( OUString const & rName,
                      bool isCaseSensitive )
     {
-        static const OUString aNonCachableProps [] =
+        const OUString aNonCachableProps [] =
         {
             DAVProperties::LOCKDISCOVERY,
 
diff --git a/ucb/source/ucp/webdav/DAVException.hxx b/ucb/source/ucp/webdav/DAVException.hxx
index 74fc3f7..c3939f0 100644
--- a/ucb/source/ucp/webdav/DAVException.hxx
+++ b/ucb/source/ucp/webdav/DAVException.hxx
@@ -155,7 +155,7 @@ class DAVException : public std::exception
             , mData( rData )
             , mStatusCode( nStatusCode )
          {};
-        virtual ~DAVException( ) {};
+        virtual ~DAVException( ) override {};
 
     const ExceptionCode & getError() const { return mExceptionCode; }
     const OUString & getData() const  { return mData; }
diff --git a/ucb/source/ucp/webdav/DAVSessionFactory.hxx b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
index c1a8025..18307fc 100644
--- a/ucb/source/ucp/webdav/DAVSessionFactory.hxx
+++ b/ucb/source/ucp/webdav/DAVSessionFactory.hxx
@@ -47,7 +47,7 @@ class DAVSession;
 class DAVSessionFactory : public salhelper::SimpleReferenceObject
 {
 public:
-    virtual ~DAVSessionFactory();
+    virtual ~DAVSessionFactory() override;
 
     rtl::Reference< DAVSession >
         createDAVSession( const OUString & inUri,
diff --git a/ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx
index d1fc547..92d12ab 100644
--- a/ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfCopyReqProcImpl.hxx
@@ -33,7 +33,7 @@ public:
                          const char* inDestinationPath,
                          const bool inOverwrite );
 
-    virtual ~SerfCopyReqProcImpl();
+    virtual ~SerfCopyReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx
index bfda8f1..0bb8cd6 100644
--- a/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.hxx
@@ -31,7 +31,7 @@ public:
     SerfDeleteReqProcImpl( const char* inPath,
                            const DAVRequestHeaders& inRequestHeaders );
 
-    virtual ~SerfDeleteReqProcImpl();
+    virtual ~SerfDeleteReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
index a91c540..f463f42 100644
--- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.hxx
@@ -55,7 +55,7 @@ public:
                         const std::vector< OUString > & inHeaderNames,
                         DAVResource & ioResource );
 
-    virtual ~SerfGetReqProcImpl();
+    virtual ~SerfGetReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx
index 291ff82..b1a03a0 100644
--- a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.hxx
@@ -40,7 +40,7 @@ public:
                          const std::vector< OUString > & inHeaderNames,
                          DAVResource & ioResource );
 
-    virtual ~SerfHeadReqProcImpl();
+    virtual ~SerfHeadReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfInputStream.hxx b/ucb/source/ucp/webdav/SerfInputStream.hxx
index 328a79c..fd893c8 100644
--- a/ucb/source/ucp/webdav/SerfInputStream.hxx
+++ b/ucb/source/ucp/webdav/SerfInputStream.hxx
@@ -47,7 +47,7 @@ class SerfInputStream : public css::io::XInputStream,
 
     public:
                  SerfInputStream();
-        virtual ~SerfInputStream();
+        virtual ~SerfInputStream() override;
 
         // Add some data to the end of the stream
         void AddToStream( const char * inBuf, sal_Int32 inLen );
diff --git a/ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx
index 974389b..08269ef 100644
--- a/ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfMkColReqProcImpl.hxx
@@ -31,7 +31,7 @@ public:
     SerfMkColReqProcImpl( const char* inPath,
                           const DAVRequestHeaders& inRequestHeaders );
 
-    virtual ~SerfMkColReqProcImpl();
+    virtual ~SerfMkColReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx
index 8a0dee5..73a8574 100644
--- a/ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfMoveReqProcImpl.hxx
@@ -33,7 +33,7 @@ public:
                          const char* inDestinationPath,
                          const bool inOverwrite );
 
-    virtual ~SerfMoveReqProcImpl();
+    virtual ~SerfMoveReqProcImpl() override;
 
     virtual
     serf_bucket_t * createSerfRequestBucket( serf_request_t * inSerfRequest ) override;
diff --git a/ucb/source/ucp/webdav/SerfSession.hxx b/ucb/source/ucp/webdav/SerfSession.hxx
index 688db55..b734945 100644
--- a/ucb/source/ucp/webdav/SerfSession.hxx
+++ b/ucb/source/ucp/webdav/SerfSession.hxx
@@ -68,7 +68,7 @@ private:
     SerfRequestProcessor* createReqProc( const OUString & inPath );
 
 protected:
-    virtual ~SerfSession();
+    virtual ~SerfSession() override;
 
 public:
     SerfSession( const rtl::Reference< DAVSessionFactory > & rSessionFactory,
diff --git a/ucb/source/ucp/webdav/webdavprovider.hxx b/ucb/source/ucp/webdav/webdavprovider.hxx
index bfe6551..3231eb2 100644
--- a/ucb/source/ucp/webdav/webdavprovider.hxx
+++ b/ucb/source/ucp/webdav/webdavprovider.hxx
@@ -66,7 +66,7 @@ class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
 
 public:
     explicit ContentProvider( const css::uno::Reference< css::uno::XComponentContext >& rContext );
-    virtual ~ContentProvider();
+    virtual ~ContentProvider() override;
 
     // XInterface
     virtual css::uno::Any SAL_CALL queryInterface( const css::uno::Type & rType )
commit 54a7c24e03e8368e9054ffae3b7d9cc4c0d26185
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 01:14:10 2016 +0200

    loplugin:nullptr
    
    Change-Id: Id8fd27ed20bc67a49d6863b63b07cf1573733744

diff --git a/ucb/source/ucp/webdav/AprEnv.cxx b/ucb/source/ucp/webdav/AprEnv.cxx
index e9e650f..a1e61e5 100644
--- a/ucb/source/ucp/webdav/AprEnv.cxx
+++ b/ucb/source/ucp/webdav/AprEnv.cxx
@@ -23,11 +23,11 @@ namespace apr_environment
 {
 
 AprEnv::AprEnv()
-    : mpAprPool( 0 )
+    : mpAprPool( nullptr )
 {
     apr_initialize();
 
-    apr_pool_create(&mpAprPool, NULL);
+    apr_pool_create(&mpAprPool, nullptr);
 
     mpSerfLockStore = new http_dav_ucp::SerfLockStore();
 }
diff --git a/ucb/source/ucp/webdav/ContentProperties.cxx b/ucb/source/ucp/webdav/ContentProperties.cxx
index cb30d9a..41830f6 100644
--- a/ucb/source/ucp/webdav/ContentProperties.cxx
+++ b/ucb/source/ucp/webdav/ContentProperties.cxx
@@ -189,7 +189,7 @@ const PropertyValue * ContentProperties::get(
 
             ++it;
         }
-        return 0;
+        return nullptr;
     }
     else
         return &(*it).second;
diff --git a/ucb/source/ucp/webdav/DAVResourceAccess.hxx b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
index 72c5514..52ff981 100644
--- a/ucb/source/ucp/webdav/DAVResourceAccess.hxx
+++ b/ucb/source/ucp/webdav/DAVResourceAccess.hxx
@@ -53,7 +53,7 @@ class DAVResourceAccess
     std::vector< SerfUri > m_aRedirectURIs;
 
 public:
-    DAVResourceAccess() : m_xSessionFactory( 0 ) {}
+    DAVResourceAccess() : m_xSessionFactory( nullptr ) {}
     DAVResourceAccess( const css::uno::Reference< css::uno::XComponentContext > & rContext,
                        rtl::Reference< DAVSessionFactory > const & rSessionFactory,
                        const OUString & rURL );
diff --git a/ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx
index 1bc2098..0f9a4ea 100644
--- a/ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfCopyReqProcImpl.cxx
@@ -44,7 +44,7 @@ serf_bucket_t * SerfCopyReqProcImpl::createSerfRequestBucket( serf_request_t * i
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "COPY",
                                                                  getPathStr(),
-                                                                 0,
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
diff --git a/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx
index 9287408..141bb0b 100644
--- a/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfDeleteReqProcImpl.cxx
@@ -40,7 +40,7 @@ serf_bucket_t * SerfDeleteReqProcImpl::createSerfRequestBucket( serf_request_t *
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "DELETE",
                                                                  getPathStr(),
-                                                                 0,
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
diff --git a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
index 470e730..07d12c5 100644
--- a/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfGetReqProcImpl.cxx
@@ -30,8 +30,8 @@ SerfGetReqProcImpl::SerfGetReqProcImpl( const char* inPath,
     : SerfRequestProcessorImpl( inPath, inRequestHeaders )
     , xInputStream( xioInStrm )
     , xOutputStream()
-    , mpHeaderNames( 0 )
-    , mpResource( 0 )
+    , mpHeaderNames( nullptr )
+    , mpResource( nullptr )
 {
 }
 
@@ -54,8 +54,8 @@ SerfGetReqProcImpl::SerfGetReqProcImpl( const char* inPath,
     : SerfRequestProcessorImpl( inPath, inRequestHeaders )
     , xInputStream()
     , xOutputStream( xioOutStrm )
-    , mpHeaderNames( 0 )
-    , mpResource( 0 )
+    , mpHeaderNames( nullptr )
+    , mpResource( nullptr )
 {
 }
 
@@ -82,7 +82,7 @@ serf_bucket_t * SerfGetReqProcImpl::createSerfRequestBucket( serf_request_t * in
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "GET",
                                                                  getPathStr(),
-                                                                 0,
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
@@ -124,10 +124,10 @@ namespace
 void SerfGetReqProcImpl::handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket )
 {
     // read response header, if requested
-    if ( mpHeaderNames != 0 && mpResource != 0 )
+    if ( mpHeaderNames != nullptr && mpResource != nullptr )
     {
         serf_bucket_t* SerfHeaderBucket = serf_bucket_response_get_headers( inSerfResponseBucket );
-        if ( SerfHeaderBucket != 0 )
+        if ( SerfHeaderBucket != nullptr )
         {
             serf_bucket_headers_do( SerfHeaderBucket,
                                     Serf_ProcessResponseHeader,
diff --git a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
index 9420a39..984c78c 100644
--- a/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfHeadReqProcImpl.cxx
@@ -44,7 +44,8 @@ serf_bucket_t * SerfHeadReqProcImpl::createSerfRequestBucket( serf_request_t * i
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "HEAD",
                                                                  getPathStr(),
-                                                                 0,
+
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
@@ -78,10 +79,10 @@ namespace
 void SerfHeadReqProcImpl::handleEndOfResponseData( serf_bucket_t * inSerfResponseBucket )
 {
     // read response header, if requested
-    if ( mpHeaderNames != 0 && mpResource != 0 )
+    if ( mpHeaderNames != nullptr && mpResource != nullptr )
     {
         serf_bucket_t* SerfHeaderBucket = serf_bucket_response_get_headers( inSerfResponseBucket );
-        if ( SerfHeaderBucket != 0 )
+        if ( SerfHeaderBucket != nullptr )
         {
             serf_bucket_headers_do( SerfHeaderBucket,
                                     Serf_ProcessResponseHeader,
diff --git a/ucb/source/ucp/webdav/SerfLockReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfLockReqProcImpl.cxx
index ff766ef..d3b6d43 100644
--- a/ucb/source/ucp/webdav/SerfLockReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfLockReqProcImpl.cxx
@@ -78,7 +78,7 @@ serf_bucket_t * SerfLockReqProcImpl::createSerfRequestBucket( serf_request_t * i
     aBody.append("</lockinfo>\n");
 
     const OString aBodyText(aBody.makeStringAndClear());
-    serf_bucket_t* body_bkt = 0;
+    serf_bucket_t* body_bkt = nullptr;
 
     if (!m_plastChanceToSendRefreshRequest)
         body_bkt = serf_bucket_simple_copy_create( aBodyText.getStr(),
@@ -101,7 +101,7 @@ serf_bucket_t * SerfLockReqProcImpl::createSerfRequestBucket( serf_request_t * i
     setRequestHeaders( hdrs_bkt );
 
     // request specific header fields
-    const char * depth = 0;
+    const char * depth = nullptr;
     switch( m_aLock.Depth )
     {
         case css::ucb::LockDepth_ZERO:
diff --git a/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx b/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
index 2e798fd..1c8b5ff 100644
--- a/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
+++ b/ucb/source/ucp/webdav/SerfLockReqProcImpl.hxx
@@ -38,7 +38,7 @@ public:
                          const DAVRequestHeaders& inRequestHeaders,
                          SerfSession& rSession,
                          const css::ucb::Lock& rLock,
-                         sal_Int32* plastChanceToSendRefreshRequest = 0 );
+                         sal_Int32* plastChanceToSendRefreshRequest = nullptr );
 
     virtual ~SerfLockReqProcImpl() override;
 
diff --git a/ucb/source/ucp/webdav/SerfLockStore.cxx b/ucb/source/ucp/webdav/SerfLockStore.cxx
index e774d09..e67e47b 100644
--- a/ucb/source/ucp/webdav/SerfLockStore.cxx
+++ b/ucb/source/ucp/webdav/SerfLockStore.cxx
@@ -76,7 +76,7 @@ void TickerThread::run()
 
 
 SerfLockStore::SerfLockStore()
-    : m_pTickerThread( 0 )
+    : m_pTickerThread( nullptr )
     , m_bFinishing( false )
 {
 }
@@ -126,7 +126,7 @@ void SerfLockStore::stopTicker()
         m_pTickerThread->finish();
         m_pTickerThread->join();
         delete m_pTickerThread;
-        m_pTickerThread = 0;
+        m_pTickerThread = nullptr;
     }
 }
 
diff --git a/ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx
index 07c6725..4641b3f 100644
--- a/ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfMkColReqProcImpl.cxx
@@ -40,7 +40,7 @@ serf_bucket_t * SerfMkColReqProcImpl::createSerfRequestBucket( serf_request_t *
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "MKCOL",
                                                                  getPathStr(),
-                                                                 0,
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
diff --git a/ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx
index b0cb2cc..fc775ab 100644
--- a/ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfMoveReqProcImpl.cxx
@@ -44,7 +44,7 @@ serf_bucket_t * SerfMoveReqProcImpl::createSerfRequestBucket( serf_request_t * i
     serf_bucket_t *req_bkt = serf_request_bucket_request_create( inSerfRequest,
                                                                  "MOVE",
                                                                  getPathStr(),
-                                                                 0,
+                                                                 nullptr,
                                                                  serf_request_get_alloc( inSerfRequest ) );
 
     // set request header fields
diff --git a/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
index 08c7576..3d19f93 100644
--- a/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPostReqProcImpl.cxx
@@ -69,8 +69,8 @@ serf_bucket_t * SerfPostReqProcImpl::createSerfRequestBucket( serf_request_t * i
     serf_bucket_alloc_t* pSerfBucketAlloc = serf_request_get_alloc( inSerfRequest );
 
     // create body bucket
-    serf_bucket_t* body_bkt = 0;
-    if ( mpPostData != 0 && mnPostDataLen > 0 )
+    serf_bucket_t* body_bkt = nullptr;
+    if ( mpPostData != nullptr && mnPostDataLen > 0 )
     {
         body_bkt = SERF_BUCKET_SIMPLE_STRING_LEN( mpPostData, mnPostDataLen, pSerfBucketAlloc );
     }
@@ -90,11 +90,11 @@ serf_bucket_t * SerfPostReqProcImpl::createSerfRequestBucket( serf_request_t * i
     handleChunkedEncoding(req_bkt, mnPostDataLen);
 
     // request specific header fields
-    if ( mpContentType != 0 )
+    if ( mpContentType != nullptr )
     {
         serf_bucket_headers_set( hdrs_bkt, "Content-Type", mpContentType );
     }
-    if ( mpReferer != 0 )
+    if ( mpReferer != nullptr )
     {
         serf_bucket_headers_set( hdrs_bkt, "Referer", mpReferer );
     }
diff --git a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
index 8117b1b..bcca8dd 100644
--- a/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropFindReqProcImpl.cxx
@@ -36,10 +36,10 @@ SerfPropFindReqProcImpl::SerfPropFindReqProcImpl( const char* inPath,
                                                   const std::vector< OUString > & inPropNames,
                                                   std::vector< DAVResource > & ioResources )
     : SerfRequestProcessorImpl( inPath, inRequestHeaders )
-    , mDepthStr( 0 )
+    , mDepthStr( nullptr )
     , mpPropNames( &inPropNames )
     , mpResources( &ioResources )
-    , mpResInfo( 0 )
+    , mpResInfo( nullptr )
     , mbOnlyPropertyNames( false )
     , xInputStream( new SerfInputStream() )
 {
@@ -51,9 +51,9 @@ SerfPropFindReqProcImpl::SerfPropFindReqProcImpl( const char* inPath,
                                                   const Depth inDepth,
                                                   std::vector< DAVResourceInfo > & ioResInfo )
     : SerfRequestProcessorImpl( inPath, inRequestHeaders )
-    , mDepthStr( 0 )
-    , mpPropNames( 0 )
-    , mpResources( 0 )
+    , mDepthStr( nullptr )
+    , mpPropNames( nullptr )
+    , mpResources( nullptr )
     , mpResInfo( &ioResInfo )
     , mbOnlyPropertyNames( true )
     , xInputStream( new SerfInputStream() )
@@ -89,7 +89,7 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
     serf_bucket_alloc_t* pSerfBucketAlloc = serf_request_get_alloc( inSerfRequest );
 
     // body bucket - certain properties OR all properties OR only property names
-    serf_bucket_t* body_bkt = 0;
+    serf_bucket_t* body_bkt = nullptr;
     OString aBodyText;
     {
         OStringBuffer aBuffer;
@@ -148,14 +148,14 @@ serf_bucket_t * SerfPropFindReqProcImpl::createSerfRequestBucket( serf_request_t
 
     // set request header fields
     serf_bucket_t* hdrs_bkt = serf_bucket_request_get_headers( req_bkt );
-    if (hdrs_bkt != NULL)
+    if (hdrs_bkt != nullptr)
     {
         // general header fields provided by caller
         setRequestHeaders( hdrs_bkt );
 
         // request specific header fields
         serf_bucket_headers_set( hdrs_bkt, "Depth", mDepthStr );
-        if (hdrs_bkt!=NULL && body_bkt != 0 && aBodyText.getLength() > 0 )
+        if (hdrs_bkt!=nullptr && body_bkt != nullptr && aBodyText.getLength() > 0 )
         {
             serf_bucket_headers_set( hdrs_bkt, "Content-Type", "application/xml" );
         }
diff --git a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
index b87794a..77c6ba9 100644
--- a/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPropPatchReqProcImpl.cxx
@@ -47,7 +47,7 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
     serf_bucket_alloc_t* pSerfBucketAlloc = serf_request_get_alloc( inSerfRequest );
 
     // body bucket
-    serf_bucket_t* body_bkt = 0;
+    serf_bucket_t* body_bkt = nullptr;
     OString aBodyText;
     {
         // create and fill body bucket with properties to be set or removed
@@ -60,7 +60,7 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
             { RTL_CONSTASCII_STRINGPARAM( "set" ) },
             { RTL_CONSTASCII_STRINGPARAM( "remove" ) }
         };
-        const int nPropCount = ( mpProperties != 0 )
+        const int nPropCount = ( mpProperties != nullptr )
                                ? mpProperties->size()
                                : 0;
         if ( nPropCount > 0 )
@@ -154,13 +154,13 @@ serf_bucket_t * SerfPropPatchReqProcImpl::createSerfRequestBucket( serf_request_
 
     // set request header fields
     serf_bucket_t* hdrs_bkt = serf_bucket_request_get_headers( req_bkt );
-    if (hdrs_bkt != NULL)
+    if (hdrs_bkt != nullptr)
     {
         // general header fields provided by caller
         setRequestHeaders( hdrs_bkt );
 
         // request specific header fields
-        if ( body_bkt != 0 && aBodyText.getLength() > 0 )
+        if ( body_bkt != nullptr && aBodyText.getLength() > 0 )
         {
             serf_bucket_headers_set( hdrs_bkt, "Content-Type", "application/xml" );
         }
diff --git a/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx b/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
index 20a9984..a08d260 100644
--- a/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfPutReqProcImpl.cxx
@@ -47,8 +47,8 @@ serf_bucket_t * SerfPutReqProcImpl::createSerfRequestBucket( serf_request_t * in
     serf_bucket_alloc_t* pSerfBucketAlloc = serf_request_get_alloc( inSerfRequest );
 
     // create body bucket
-    serf_bucket_t* body_bkt = 0;
-    if ( mpData != 0 && mnDataLen > 0 )
+    serf_bucket_t* body_bkt = nullptr;
+    if ( mpData != nullptr && mnDataLen > 0 )
     {
         body_bkt = SERF_BUCKET_SIMPLE_STRING_LEN( mpData, mnDataLen, pSerfBucketAlloc );
     }
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
index ff6b2e6..12ee076 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessor.cxx
@@ -44,12 +44,12 @@ SerfRequestProcessor::SerfRequestProcessor( SerfSession& rSerfSession,
                                             const OUString & inPath,
                                             const bool bUseChunkedEncoding )
     : mrSerfSession( rSerfSession )
-    , mPathStr( 0 )
+    , mPathStr( nullptr )
     , mbUseChunkedEncoding( bUseChunkedEncoding )
-    , mDestPathStr( 0 )
-    , mContentType( 0 )
-    , mReferer( 0 )
-    , mpProcImpl( 0 )
+    , mDestPathStr( nullptr )
+    , mContentType( nullptr )
+    , mReferer( nullptr )
+    , mpProcImpl( nullptr )
     , mbProcessingDone( false )
     , mpDAVException()
     , mnHTTPStatusCode( SC_NONE )
@@ -74,7 +74,7 @@ SerfRequestProcessor::~SerfRequestProcessor()
 void SerfRequestProcessor::prepareProcessor()
 {
     delete mpDAVException;
-    mpDAVException = 0;
+    mpDAVException = nullptr;
     mnHTTPStatusCode = SC_NONE;
     mHTTPStatusCodeText.clear();
     mRedirectLocation.clear();
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessor.hxx b/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
index 301b9f5..01ba790 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessor.hxx
@@ -126,7 +126,7 @@ public:
                       apr_status_t& outSerfStatus );
 
     //LOCK
-    bool processLock( const css::ucb::Lock & rLock, sal_Int32 *plastChanceToSendRefreshRequest = 0 );
+    bool processLock( const css::ucb::Lock & rLock, sal_Int32 *plastChanceToSendRefreshRequest = nullptr );
 
     //UNLOCK
     bool processUnlock();
diff --git a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
index 30a62b8..5d638a7 100644
--- a/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
+++ b/ucb/source/ucp/webdav/SerfRequestProcessorImpl.cxx
@@ -62,7 +62,7 @@ void SerfRequestProcessorImpl::handleChunkedEncoding (
     serf_bucket_t* pRequestBucket,
     apr_int64_t nLength) const
 {
-    if (pRequestBucket != NULL)
+    if (pRequestBucket != nullptr)
     {
         if (useChunkedEncoding())
         {
diff --git a/ucb/source/ucp/webdav/SerfSession.cxx b/ucb/source/ucp/webdav/SerfSession.cxx
index 29262d6..6b93ae5 100644
--- a/ucb/source/ucp/webdav/SerfSession.cxx
+++ b/ucb/source/ucp/webdav/SerfSession.cxx
@@ -64,8 +64,8 @@ SerfSession::SerfSession(
     , m_aUri( inUri )
     , m_aProxyName()
     , m_nProxyPort( 0 )
-    , m_pSerfConnection( 0 )
-    , m_pSerfContext( 0 )
+    , m_pSerfConnection( nullptr )
+    , m_pSerfContext( nullptr )
     , m_bIsHeadRequestInProgress( false )
     , m_bUseChunkedEncoding( false )
     , m_bNoOfTransferEncodingSwitches( 0 )
@@ -74,7 +74,7 @@ SerfSession::SerfSession(
 {
     m_pSerfContext = serf_context_create( getAprPool() );
 
-    m_pSerfBucket_Alloc = serf_bucket_allocator_create( getAprPool(), NULL, NULL );
+    m_pSerfBucket_Alloc = serf_bucket_allocator_create( getAprPool(), nullptr, nullptr );
 }
 
 
@@ -85,7 +85,7 @@ SerfSession::~SerfSession( )
     if ( m_pSerfConnection )
     {
         serf_connection_close( m_pSerfConnection );
-        m_pSerfConnection = 0;
+        m_pSerfConnection = nullptr;
     }
 }
 
@@ -106,7 +106,7 @@ void SerfSession::Init()
 
     bool bCreateNewSession = false;
 
-    if ( m_pSerfConnection == 0 )
+    if ( m_pSerfConnection == nullptr )
     {
         const ucbhelper::InternetProxyServer & rProxyCfg = getProxySettings();
 
@@ -128,7 +128,7 @@ void SerfSession::Init()
 
             // new session needed, destroy old first
             serf_connection_close( m_pSerfConnection );
-            m_pSerfConnection = 0;
+            m_pSerfConnection = nullptr;
             bCreateNewSession = true;
         }
     }
@@ -140,10 +140,10 @@ void SerfSession::Init()
                                                        m_pSerfContext,
                                                        m_aUri.getAprUri(),
                                                        Serf_ConnectSetup, this,
-                                                       0 /* close connection callback */, 0 /* close connection baton */,
+                                                       nullptr /* close connection callback */, nullptr /* close connection baton */,
                                                        getAprPool() );
 
-        if ( m_pSerfConnection == 0 ||status != APR_SUCCESS )
+        if ( m_pSerfConnection == nullptr ||status != APR_SUCCESS )
         {
             throw DAVException( DAVException::DAV_SESSION_CREATE,
                                 SerfUri::makeConnectionEndPointString( m_aUri.GetHost(), m_aUri.GetPort() ) );
@@ -154,7 +154,7 @@ void SerfSession::Init()
 
         if ( m_aProxyName.getLength() )
         {
-            apr_sockaddr_t *proxy_address = NULL;
+            apr_sockaddr_t *proxy_address = nullptr;
             status = apr_sockaddr_info_get( &proxy_address,
                                             OUStringToOString( m_aProxyName, RTL_TEXTENCODING_UTF8 ).getStr(),
                                             APR_UNSPEC,
@@ -254,14 +254,14 @@ apr_status_t SerfSession::setupSerfConnection( apr_socket_t * inAprSocket,
     if ( isSSLNeeded() )
     {
         tmpInputBkt = serf_bucket_ssl_decrypt_create( tmpInputBkt,
-                                                      0,
+                                                      nullptr,
                                                       getSerfBktAlloc() );
         /** Set the callback that is called to authenticate the
             certificate (chain).
         */
         serf_ssl_server_cert_chain_callback_set(
             serf_bucket_ssl_decrypt_context_get(tmpInputBkt),
-            NULL,
+            nullptr,
             Serf_CertificateChainValidation,
             this);
         serf_ssl_set_hostname( serf_bucket_ssl_decrypt_context_get( tmpInputBkt ),
@@ -344,9 +344,9 @@ apr_status_t SerfSession::verifySerfCertificateChain (
     int nCertificateChainLength)
 {
     // Check arguments.
-    if (pCertificateChainBase64Encoded == NULL || nCertificateChainLength<=0)
+    if (pCertificateChainBase64Encoded == nullptr || nCertificateChainLength<=0)
     {
-        assert(pCertificateChainBase64Encoded != NULL);
+        assert(pCertificateChainBase64Encoded != nullptr);
         assert(nCertificateChainLength>0);
         return SERF_SSL_CERT_UNKNOWN_FAILURE;
     }
@@ -611,7 +611,7 @@ void SerfSession::PROPFIND( const OUString & inPath,
                                status );
 
     if ( status == APR_SUCCESS &&
-         aReqProc->mpDAVException == 0 &&
+         aReqProc->mpDAVException == nullptr &&
          ioResources.empty() )
     {
         m_aEnv = DAVRequestEnvironment();
@@ -640,7 +640,7 @@ void SerfSession::PROPFIND( const OUString & inPath,
                                status );
 
     if ( status == APR_SUCCESS &&
-         aReqProc->mpDAVException == 0 &&
+         aReqProc->mpDAVException == nullptr &&
          ioResInfo.empty() )
     {
         m_aEnv = DAVRequestEnvironment();
commit add4bc96366fc2e1301671bd28f60ed3d032c43f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Dec 8 01:02:20 2016 +0200

    loplugin:staticmethods
    
    Change-Id: Ic65f024fd88915544539dedf3aa1c68a945cddd3

diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index 1d39158..bc70606 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -1292,6 +1292,8 @@ void SfxLibraryContainer::implScanExtensions()
         const bool bReadOnly = false;
         Reference< XNameAccess > xLib = createLibraryLink( aLibName, aIndexFileURL, bReadOnly );
     }
+#else
+    (void) this;
 #endif
 }
 


More information about the Libreoffice-commits mailing list