[Libreoffice-commits] core.git: include/ucbhelper ucbhelper/Library_ucbhelper.mk ucbhelper/source ucb/Library_ucpcmis1.mk ucb/source

Stephan Bergmann sbergman at redhat.com
Mon Aug 22 12:55:41 UTC 2016


 include/ucbhelper/std_inputstream.hxx          |  115 ---------------
 include/ucbhelper/std_outputstream.hxx         |   71 ---------
 ucb/Library_ucpcmis1.mk                        |    2 
 ucb/source/ucp/cmis/cmis_content.cxx           |   12 -
 ucb/source/ucp/cmis/std_inputstream.cxx        |  191 +++++++++++++++++++++++++
 ucb/source/ucp/cmis/std_inputstream.hxx        |  113 ++++++++++++++
 ucb/source/ucp/cmis/std_outputstream.cxx       |  102 +++++++++++++
 ucb/source/ucp/cmis/std_outputstream.hxx       |   70 +++++++++
 ucbhelper/Library_ucbhelper.mk                 |    4 
 ucbhelper/source/provider/std_inputstream.cxx  |  191 -------------------------
 ucbhelper/source/provider/std_outputstream.cxx |  102 -------------
 11 files changed, 484 insertions(+), 489 deletions(-)

New commits:
commit 2d8911d9396a10ad794eb42b6d5a44e8f5af4d91
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Aug 22 14:52:28 2016 +0200

    ucbhelper::Std{In,Out}putStream are only used in ucb/source/ucb/cmis/
    
    ...where their use of boost::shared_ptr (instead of std::shared_ptr) matches the
    use in libcmis, but makes them unlikely to be useful anywhere else.  So move
    them into ucb/source/ucb/cmis/.
    
    Change-Id: I68359be6b43d6889af4f241dcdcbdc0d9d70d717

diff --git a/ucb/Library_ucpcmis1.mk b/ucb/Library_ucpcmis1.mk
index ee76827..0b46815 100644
--- a/ucb/Library_ucpcmis1.mk
+++ b/ucb/Library_ucpcmis1.mk
@@ -43,6 +43,8 @@ $(eval $(call gb_Library_add_exception_objects,ucpcmis1,\
 	ucb/source/ucp/cmis/cmis_provider \
 	ucb/source/ucp/cmis/cmis_resultset \
 	ucb/source/ucp/cmis/cmis_url \
+	ucb/source/ucp/cmis/std_inputstream \
+	ucb/source/ucp/cmis/std_outputstream \
 ))
 
 # vim: set noet sw=4 ts=4:
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index b9deccb..14af01c 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -46,8 +46,6 @@
 #include <ucbhelper/cancelcommandexecution.hxx>
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/contentidentifier.hxx>
-#include <ucbhelper/std_inputstream.hxx>
-#include <ucbhelper/std_outputstream.hxx>
 #include <ucbhelper/propertyvalueset.hxx>
 #include <ucbhelper/proxydecider.hxx>
 #include <sax/tools/converter.hxx>
@@ -58,6 +56,8 @@
 #include "cmis_provider.hxx"
 #include "cmis_resultset.hxx"
 #include "cmis_strings.hxx"
+#include <std_inputstream.hxx>
+#include <std_outputstream.hxx>
 
 #define OUSTR_TO_STDSTR(s) string( OUStringToOString( s, RTL_TEXTENCODING_UTF8 ).getStr() )
 #define STD_TO_OUSTR( str ) OUString( str.c_str(), str.length( ), RTL_TEXTENCODING_UTF8 )
@@ -1066,7 +1066,7 @@ namespace cmis
         }
 
         boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
-        uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut );
+        uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
         copyData( xIn, xOutput );
 
         map< string, libcmis::PropertyPtr > newProperties;
@@ -1341,7 +1341,7 @@ namespace cmis
                     if ( nullptr != document )
                     {
                         boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
-                        uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut );
+                        uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
                         copyData( xInputStream, xOutput );
                         try
                         {
@@ -1380,7 +1380,7 @@ namespace cmis
                     else
                     {
                         boost::shared_ptr< ostream > pOut( new ostringstream ( ios_base::binary | ios_base::in | ios_base::out ) );
-                        uno::Reference < io::XOutputStream > xOutput = new ucbhelper::StdOutputStream( pOut );
+                        uno::Reference < io::XOutputStream > xOutput = new StdOutputStream( pOut );
                         copyData( xInputStream, xOutput );
                         try
                         {
@@ -1548,7 +1548,7 @@ namespace cmis
 
             boost::shared_ptr< istream > aIn = document->getContentStream( );
 
-            uno::Reference< io::XInputStream > xIn = new ucbhelper::StdInputStream( aIn );
+            uno::Reference< io::XInputStream > xIn = new StdInputStream( aIn );
             if( !xIn.is( ) )
                 return false;
 
diff --git a/ucbhelper/source/provider/std_inputstream.cxx b/ucb/source/ucp/cmis/std_inputstream.cxx
similarity index 93%
rename from ucbhelper/source/provider/std_inputstream.cxx
rename to ucb/source/ucp/cmis/std_inputstream.cxx
index 506e953..4a6b1c4 100644
--- a/ucbhelper/source/provider/std_inputstream.cxx
+++ b/ucb/source/ucp/cmis/std_inputstream.cxx
@@ -11,12 +11,12 @@
 
 #include <sal/log.hxx>
 
-#include "ucbhelper/std_inputstream.hxx"
+#include <std_inputstream.hxx>
 
 using namespace std;
 using namespace com::sun::star;
 
-namespace ucbhelper
+namespace cmis
 {
     StdInputStream::StdInputStream( boost::shared_ptr< istream > const & pStream ) :
         m_pStream( pStream ),
@@ -76,7 +76,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
             throw io::IOException( );
         }
 
@@ -103,7 +103,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
             throw io::IOException( );
         }
         return nRead;
@@ -124,7 +124,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
             throw io::IOException( );
         }
     }
@@ -161,7 +161,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "StdInputStream::readBytes() error: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "StdInputStream::readBytes() error: " << e.what() );
             throw io::IOException( );
         }
     }
diff --git a/include/ucbhelper/std_inputstream.hxx b/ucb/source/ucp/cmis/std_inputstream.hxx
similarity index 94%
rename from include/ucbhelper/std_inputstream.hxx
rename to ucb/source/ucp/cmis/std_inputstream.hxx
index 5697133..664fa0a 100644
--- a/include/ucbhelper/std_inputstream.hxx
+++ b/ucb/source/ucp/cmis/std_inputstream.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX
-#define INCLUDED_UCBHELPER_STD_INPUTSTREAM_HXX
+#ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_STD_INPUTSTREAM_HXX
+#define INCLUDED_UCB_SOURCE_UCP_CMIS_STD_INPUTSTREAM_HXX
 
 #include <boost/shared_ptr.hpp>
 #include <istream>
@@ -20,14 +20,12 @@
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XSeekable.hpp>
 
-#include <ucbhelper/ucbhelperdllapi.h>
-
-namespace ucbhelper
+namespace cmis
 {
     /** Implements a seekable InputStream
      *  working on an std::istream
      */
-    class UCBHELPER_DLLPUBLIC StdInputStream
+    class StdInputStream
         : public cppu::OWeakObject,
           public css::io::XInputStream,
           public css::io::XSeekable
diff --git a/ucbhelper/source/provider/std_outputstream.cxx b/ucb/source/ucp/cmis/std_outputstream.cxx
similarity index 91%
rename from ucbhelper/source/provider/std_outputstream.cxx
rename to ucb/source/ucp/cmis/std_outputstream.cxx
index bfe5efa..c26f0ef 100644
--- a/ucbhelper/source/provider/std_outputstream.cxx
+++ b/ucb/source/ucp/cmis/std_outputstream.cxx
@@ -11,12 +11,12 @@
 
 #include <sal/log.hxx>
 
-#include "ucbhelper/std_outputstream.hxx"
+#include <std_outputstream.hxx>
 
 using namespace std;
 using namespace com::sun::star;
 
-namespace ucbhelper
+namespace cmis
 {
     StdOutputStream::StdOutputStream( boost::shared_ptr< ostream > const & pStream ) :
         m_pStream( pStream )
@@ -61,7 +61,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "Exception caught when calling write: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling write: " << e.what() );
             throw io::IOException( );
         }
     }
@@ -81,7 +81,7 @@ namespace ucbhelper
         }
         catch ( const ios_base::failure& e )
         {
-            SAL_INFO( "ucbhelper", "Exception caught when calling flush: " << e.what() );
+            SAL_INFO( "ucb.ucp.cmis", "Exception caught when calling flush: " << e.what() );
             throw io::IOException( );
         }
     }
diff --git a/include/ucbhelper/std_outputstream.hxx b/ucb/source/ucp/cmis/std_outputstream.hxx
similarity index 91%
rename from include/ucbhelper/std_outputstream.hxx
rename to ucb/source/ucp/cmis/std_outputstream.hxx
index 0537ee7..84d79ba 100644
--- a/include/ucbhelper/std_outputstream.hxx
+++ b/ucb/source/ucp/cmis/std_outputstream.hxx
@@ -7,8 +7,8 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
  */
 
-#ifndef INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX
-#define INCLUDED_UCBHELPER_STD_OUTPUTSTREAM_HXX
+#ifndef INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX
+#define INCLUDED_UCB_SOURCE_UCP_CMIS_STD_OUTPUTSTREAM_HXX
 
 #include <boost/shared_ptr.hpp>
 #include <ostream>
@@ -17,14 +17,13 @@
 #include <cppuhelper/weak.hxx>
 #include <cppuhelper/queryinterface.hxx>
 #include <com/sun/star/io/XOutputStream.hpp>
-#include <ucbhelper/ucbhelperdllapi.h>
 
-namespace ucbhelper
+namespace cmis
 {
     /** Implements a OutputStream
      *  working on an std::ostream
      */
-    class UCBHELPER_DLLPUBLIC StdOutputStream :
+    class StdOutputStream :
         public cppu::OWeakObject,
         public css::io::XOutputStream
     {
diff --git a/ucbhelper/Library_ucbhelper.mk b/ucbhelper/Library_ucbhelper.mk
index 6c33850..5226d9e 100644
--- a/ucbhelper/Library_ucbhelper.mk
+++ b/ucbhelper/Library_ucbhelper.mk
@@ -11,8 +11,6 @@ $(eval $(call gb_Library_Library,ucbhelper))
 
 $(eval $(call gb_Library_use_sdk_api,ucbhelper))
 
-$(eval $(call gb_Library_use_external,ucbhelper,boost_headers))
-
 $(eval $(call gb_Library_use_libraries,ucbhelper,\
     cppu \
     cppuhelper \
@@ -51,8 +49,6 @@ $(eval $(call gb_Library_add_exception_objects,ucbhelper,\
     ucbhelper/source/provider/simpleinteractionrequest \
     ucbhelper/source/provider/simpleioerrorrequest \
     ucbhelper/source/provider/simplenameclashresolverequest \
-    ucbhelper/source/provider/std_inputstream \
-    ucbhelper/source/provider/std_outputstream \
 ))
 
 # vim: set noet sw=4 ts=4:


More information about the Libreoffice-commits mailing list