[Libreoffice-commits] core.git: 4 commits - connectivity/source forms/inc forms/source include/svl include/unotools Library_merged.mk sfx2/inc sfx2/source svl/source unotools/source

Matúš Kukan matus.kukan at collabora.com
Mon Nov 24 16:07:45 PST 2014


 Library_merged.mk                             |    6 
 connectivity/source/drivers/file/FTable.cxx   |    3 
 forms/inc/pch/precompiled_frm.hxx             |    1 
 forms/source/component/DatabaseForm.cxx       |    2 
 forms/source/component/ImageControl.cxx       |    1 
 include/svl/strmadpt.hxx                      |  127 ----------------
 include/unotools/ucblockbytes.hxx             |  196 --------------------------
 sfx2/inc/pch/precompiled_sfx.hxx              |    1 
 sfx2/source/doc/docfile.cxx                   |    2 
 svl/source/inc/strmadpt.hxx                   |   67 ++++++++
 svl/source/misc/strmadpt.cxx                  |  182 ------------------------
 svl/source/numbers/supservs.cxx               |    2 
 unotools/source/ucbhelper/ucblockbytes.cxx    |    3 
 unotools/source/ucbhelper/ucblockbytes.hxx    |  195 +++++++++++++++++++++++++
 unotools/source/ucbhelper/ucbstreamhelper.cxx |    2 
 15 files changed, 277 insertions(+), 513 deletions(-)

New commits:
commit b144f0ac8695dd62a2053b4e88212d0b109c9a41
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Nov 24 23:13:43 2014 +0100

    fix libmerged build: missing glxtest
    
    Change-Id: Id40d5d21e4e315a605bd41eac01de5cfa04837d4

diff --git a/Library_merged.mk b/Library_merged.mk
index 533acb0a..b38c4be 100644
--- a/Library_merged.mk
+++ b/Library_merged.mk
@@ -30,11 +30,11 @@ $(eval $(call gb_Library_use_libraries,merged,\
 	$(gb_UWINAPI) \
 ))
 
-ifeq ($(GUIBASE),unx)
 $(eval $(call gb_Library_use_static_libraries,merged,\
-	headless \
+	glxtest \
+	$(if $(filter unx,$(GUIBASE)),headless) \
 ))
-endif
+
 
 $(eval $(call gb_Library_use_externals,merged,\
 	icu_headers \
commit 7f6770f90e1c255d83bf75a97b10ccd2b1f984e9
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Nov 24 14:44:28 2014 +0100

    svl: Internalize strmadpt.hxx header
    
    Change-Id: Ia69463f1466349af879da02a23b58702732011c6

diff --git a/include/svl/strmadpt.hxx b/svl/source/inc/strmadpt.hxx
similarity index 95%
rename from include/svl/strmadpt.hxx
rename to svl/source/inc/strmadpt.hxx
index 3d9acaf..c5e9908 100644
--- a/include/svl/strmadpt.hxx
+++ b/svl/source/inc/strmadpt.hxx
@@ -20,12 +20,13 @@
 #ifndef INCLUDED_SVL_STRMADPT_HXX
 #define INCLUDED_SVL_STRMADPT_HXX
 
-#include <svl/svldllapi.h>
+#include <sal/config.h>
+
 #include <com/sun/star/io/XOutputStream.hpp>
 #include <tools/stream.hxx>
 
 
-class SVL_DLLPUBLIC SvOutputStreamOpenLockBytes: public SvOpenLockBytes
+class SvOutputStreamOpenLockBytes: public SvOpenLockBytes
 {
     com::sun::star::uno::Reference< com::sun::star::io::XOutputStream >
         m_xOutputStream;
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index a651eaa..fce0de4 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -33,7 +33,8 @@
 #include <cppuhelper/queryinterface.hxx>
 #include <svl/instrm.hxx>
 #include <svl/outstrm.hxx>
-#include <svl/strmadpt.hxx>
+
+#include <strmadpt.hxx>
 
 using namespace com::sun::star;
 
diff --git a/svl/source/numbers/supservs.cxx b/svl/source/numbers/supservs.cxx
index edc0048..58be033 100644
--- a/svl/source/numbers/supservs.cxx
+++ b/svl/source/numbers/supservs.cxx
@@ -27,10 +27,10 @@
 #include <osl/mutex.hxx>
 #include <osl/diagnose.h>
 #include <tools/stream.hxx>
-#include <svl/strmadpt.hxx>
 #include <svl/instrm.hxx>
 
 #include <registerservices.hxx>
+#include <strmadpt.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::lang;
commit 79c1b05591a66fb3c7cec60bc3ad91382095a936
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Nov 24 14:36:20 2014 +0100

    Remove not used SvLockBytesInputStream
    
    Change-Id: Id4e0852f6d204b3a1d2a7f5ce281730f5fcad8fd

diff --git a/include/svl/strmadpt.hxx b/include/svl/strmadpt.hxx
index 9d1645b..3d9acaf 100644
--- a/include/svl/strmadpt.hxx
+++ b/include/svl/strmadpt.hxx
@@ -21,10 +21,7 @@
 #define INCLUDED_SVL_STRMADPT_HXX
 
 #include <svl/svldllapi.h>
-#include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/io/XOutputStream.hpp>
-#include <com/sun/star/io/XSeekable.hpp>
-#include <cppuhelper/weak.hxx>
 #include <tools/stream.hxx>
 
 
@@ -64,64 +61,6 @@ public:
     virtual void Terminate() SAL_OVERRIDE;
 };
 
-
-class SVL_DLLPUBLIC SvLockBytesInputStream: public cppu::OWeakObject,
-                              public com::sun::star::io::XInputStream,
-                              public com::sun::star::io::XSeekable
-{
-    SvLockBytesRef m_xLockBytes;
-    sal_Int64 m_nPosition;
-
-public:
-    SvLockBytesInputStream(SvLockBytes * pTheLockBytes):
-        m_xLockBytes(pTheLockBytes), m_nPosition(0) {}
-
-    virtual com::sun::star::uno::Any SAL_CALL
-    queryInterface(const com::sun::star::uno::Type & rType)
-        throw (com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL acquire() throw() SAL_OVERRIDE;
-
-    virtual void SAL_CALL release() throw() SAL_OVERRIDE;
-
-    virtual sal_Int32 SAL_CALL
-    readBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData,
-              sal_Int32 nBytesToRead)
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual sal_Int32 SAL_CALL
-    readSomeBytes(com::sun::star::uno::Sequence< sal_Int8 > & rData,
-                  sal_Int32 nMaxBytesToRead)
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL skipBytes(sal_Int32 nBytesToSkip)
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual sal_Int32 SAL_CALL available()
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL closeInput()
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual void SAL_CALL seek(sal_Int64 nLocation)
-        throw (com::sun::star::lang::IllegalArgumentException,
-               com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual sal_Int64 SAL_CALL getPosition()
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-
-    virtual sal_Int64 SAL_CALL getLength()
-        throw (com::sun::star::io::IOException,
-               com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
-};
-
 #endif // INCLUDED_SVL_STRMADPT_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 43923f1..a651eaa 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -25,6 +25,9 @@
 #include <set>
 #include <string.h>
 
+#include <com/sun/star/io/XInputStream.hpp>
+#include <com/sun/star/io/XSeekable.hpp>
+
 #include <osl/diagnose.h>
 #include <rtl/alloc.h>
 #include <cppuhelper/queryinterface.hxx>
@@ -235,182 +238,6 @@ void SvOutputStreamOpenLockBytes::Terminate()
 }
 
 
-//  SvLockBytesInputStream
-
-
-// virtual
-uno::Any SAL_CALL SvLockBytesInputStream::queryInterface(uno::Type const &
-                                                             rType)
-    throw (uno::RuntimeException, std::exception)
-{
-    uno::Any
-        aReturn(cppu::queryInterface(rType,
-                                     static_cast< io::XInputStream * >(this),
-                                     static_cast< io::XSeekable * >(this)));
-    return aReturn.hasValue() ? aReturn : OWeakObject::queryInterface(rType);
-}
-
-// virtual
-void SAL_CALL SvLockBytesInputStream::acquire() throw ()
-{
-    OWeakObject::acquire();
-}
-
-// virtual
-void SAL_CALL SvLockBytesInputStream::release() throw ()
-{
-    OWeakObject::release();
-}
-
-// virtual
-sal_Int32 SAL_CALL
-SvLockBytesInputStream::readBytes(uno::Sequence< sal_Int8 > & rData,
-                                  sal_Int32 nBytesToRead)
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    OSL_ASSERT(m_nPosition >= 0);
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    if (
-         nBytesToRead < 0 ||
-         (
-          static_cast<sal_uInt64>(m_nPosition) > SAL_MAX_SIZE &&
-          nBytesToRead > 0
-         )
-       )
-    {
-        throw io::IOException();
-    }
-    rData.realloc(nBytesToRead);
-    sal_Int32 nSize = 0;
-    while (nSize < nBytesToRead)
-    {
-        sal_Size nCount;
-        ErrCode nError = m_xLockBytes->ReadAt(m_nPosition,
-                                              rData.getArray() + nSize,
-                                              nBytesToRead - nSize, &nCount);
-        if (nError != ERRCODE_NONE && nError != ERRCODE_IO_PENDING)
-            throw io::IOException();
-        m_nPosition += nCount;
-        nSize += nCount;
-        if (nError == ERRCODE_NONE && nCount == 0)
-            break;
-    }
-    rData.realloc(nSize);
-    return nSize;
-}
-
-// virtual
-sal_Int32 SAL_CALL
-SvLockBytesInputStream::readSomeBytes(uno::Sequence< sal_Int8 > & rData,
-                                      sal_Int32 nMaxBytesToRead)
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    OSL_ASSERT(m_nPosition >= 0);
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    if (static_cast<sal_uInt64>(m_nPosition) > SAL_MAX_SIZE
-        && nMaxBytesToRead > 0)
-        throw io::IOException();
-    rData.realloc(nMaxBytesToRead);
-    sal_Size nCount = 0;
-    if (nMaxBytesToRead > 0)
-    {
-        ErrCode nError;
-        do
-        {
-            nError = m_xLockBytes->ReadAt(m_nPosition,
-                                          rData.getArray(),
-                                          nMaxBytesToRead,
-                                          &nCount);
-            if (nError != ERRCODE_NONE && nError != ERRCODE_IO_PENDING)
-                throw io::IOException();
-            m_nPosition += nCount;
-        }
-        while (nCount == 0 && nError == ERRCODE_IO_PENDING);
-    }
-    rData.realloc(sal_Int32(nCount));
-    return sal_Int32(nCount);
-}
-
-// virtual
-void SAL_CALL SvLockBytesInputStream::skipBytes(sal_Int32 nBytesToSkip)
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    if (nBytesToSkip < 0)
-        throw io::IOException();
-    if (nBytesToSkip > SAL_MAX_INT64 - m_nPosition)
-        throw io::BufferSizeExceededException();
-    m_nPosition += nBytesToSkip;
-}
-
-// virtual
-sal_Int32 SAL_CALL SvLockBytesInputStream::available()
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    OSL_ASSERT(m_nPosition >= 0);
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    SvLockBytesStat aStat;
-    if (m_xLockBytes->Stat(&aStat, SVSTATFLAG_DEFAULT) != ERRCODE_NONE)
-        throw io::IOException();
-    return aStat.nSize <= static_cast<sal_uInt64>(m_nPosition) ?
-               0 :
-           static_cast<sal_Size>(aStat.nSize - m_nPosition) <=
-                   static_cast<sal_uInt32>(SAL_MAX_INT32) ?
-               static_cast<sal_Int32>(aStat.nSize - m_nPosition) :
-               SAL_MAX_INT32;
-}
-
-// virtual
-void SAL_CALL SvLockBytesInputStream::closeInput()
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    m_xLockBytes = 0;
-}
-
-// virtual
-void SAL_CALL SvLockBytesInputStream::seek(sal_Int64 nLocation)
-    throw (lang::IllegalArgumentException, io::IOException,
-           uno::RuntimeException, std::exception)
-{
-    if (nLocation < 0)
-        throw lang::IllegalArgumentException();
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    m_nPosition = nLocation;
-}
-
-// virtual
-sal_Int64 SAL_CALL SvLockBytesInputStream::getPosition()
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    return m_nPosition;
-}
-
-// virtual
-sal_Int64 SAL_CALL SvLockBytesInputStream::getLength()
-    throw (io::IOException, uno::RuntimeException, std::exception)
-{
-    if (!m_xLockBytes.Is())
-        throw io::NotConnectedException();
-    SvLockBytesStat aStat;
-    if (m_xLockBytes->Stat(&aStat, SVSTATFLAG_DEFAULT) != ERRCODE_NONE)
-        throw io::IOException();
-#if SAL_TYPES_SIZEOFPOINTER > 4 // avoid warnings if sal_Size < sal_Int64
-    if (aStat.nSize > static_cast<sal_uInt64>(SAL_MAX_INT64))
-        throw io::IOException();
-#endif
-    return aStat.nSize;
-}
-
-
 //  SvInputStream
 
 
commit 09186fceb0ca5ab67cc81ed601fd0e25d49a03ad
Author: Matúš Kukan <matus.kukan at collabora.com>
Date:   Mon Nov 24 11:08:31 2014 +0100

    unotools: Internalize ucblockbytes.hxx header
    
    Change-Id: I1a9b795eda832673a83a426c8bf10d5bb9c28581

diff --git a/connectivity/source/drivers/file/FTable.cxx b/connectivity/source/drivers/file/FTable.cxx
index afae348..88296de 100644
--- a/connectivity/source/drivers/file/FTable.cxx
+++ b/connectivity/source/drivers/file/FTable.cxx
@@ -204,8 +204,7 @@ void OFileTable::dropColumn(sal_Int32 /*_nPos*/)
 
 SvStream* OFileTable::createStream_simpleError( const OUString& _rFileName, StreamMode _eOpenMode)
 {
-    utl::UcbLockBytesHandler* p_null_dummy = NULL;
-    SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, _eOpenMode, (_eOpenMode & STREAM_NOCREATE) == STREAM_NOCREATE, p_null_dummy);
+    SvStream* pReturn = ::utl::UcbStreamHelper::CreateStream( _rFileName, _eOpenMode, (_eOpenMode & STREAM_NOCREATE) == STREAM_NOCREATE);
     if (pReturn && (ERRCODE_NONE != pReturn->GetErrorCode()))
     {
         delete pReturn;
diff --git a/forms/inc/pch/precompiled_frm.hxx b/forms/inc/pch/precompiled_frm.hxx
index 18893ee..173b0b9 100644
--- a/forms/inc/pch/precompiled_frm.hxx
+++ b/forms/inc/pch/precompiled_frm.hxx
@@ -347,7 +347,6 @@
 #include <unotools/streamhelper.hxx>
 #include <unotools/syslocale.hxx>
 #include <unotools/textsearch.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <vcl/bmpacc.hxx>
 #include <vcl/cvtgrf.hxx>
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 02e3c62..8090dc0 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -70,12 +70,12 @@
 #include <rtl/math.hxx>
 #include <rtl/tencinfo.h>
 #include <svl/inettype.hxx>
+#include <tools/datetime.hxx>
 #include <tools/debug.hxx>
 #include <tools/diagnose_ex.h>
 #include <tools/inetmsg.hxx>
 #include <tools/inetstrm.hxx>
 #include <tools/urlobj.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/timer.hxx>
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index f94b32e..a770c5a 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -26,7 +26,6 @@
 #include "componenttools.hxx"
 
 #include <svtools/imageresourceaccess.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <sfx2/filedlghelper.hxx>
 #include <com/sun/star/awt/PopupMenu.hpp>
 #include <com/sun/star/awt/XPopupMenu.hpp>
diff --git a/sfx2/inc/pch/precompiled_sfx.hxx b/sfx2/inc/pch/precompiled_sfx.hxx
index f941479..39cfe31 100644
--- a/sfx2/inc/pch/precompiled_sfx.hxx
+++ b/sfx2/inc/pch/precompiled_sfx.hxx
@@ -739,7 +739,6 @@
 #include <unotools/syslocaleoptions.hxx>
 #include <unotools/tempfile.hxx>
 #include <unotools/ucbhelper.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <unotools/useroptions.hxx>
 #include <unotools/viewoptions.hxx>
diff --git a/sfx2/source/doc/docfile.cxx b/sfx2/source/doc/docfile.cxx
index a80454d..9260fea 100644
--- a/sfx2/source/doc/docfile.cxx
+++ b/sfx2/source/doc/docfile.cxx
@@ -88,8 +88,8 @@
 #include <comphelper/storagehelper.hxx>
 #include <unotools/mediadescriptor.hxx>
 #include <comphelper/docpasswordhelper.hxx>
+#include <tools/datetime.hxx>
 #include <tools/inetmime.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <unotools/pathoptions.hxx>
 #include <svtools/asynclink.hxx>
 #include <svl/inettype.hxx>
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index b7c9bef..1d38f4a 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -17,8 +17,9 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
+#include <ucblockbytes.hxx>
+
 #include <sal/macros.h>
-#include <unotools/ucblockbytes.hxx>
 #include <comphelper/processfactory.hxx>
 #include <salhelper/condition.hxx>
 #include <osl/thread.hxx>
diff --git a/include/unotools/ucblockbytes.hxx b/unotools/source/ucbhelper/ucblockbytes.hxx
similarity index 98%
rename from include/unotools/ucblockbytes.hxx
rename to unotools/source/ucbhelper/ucblockbytes.hxx
index a5a0875..abf8c5b 100644
--- a/include/unotools/ucblockbytes.hxx
+++ b/unotools/source/ucbhelper/ucblockbytes.hxx
@@ -23,7 +23,6 @@
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/ucb/XContent.hpp>
 #include <com/sun/star/beans/PropertyValue.hpp>
-#include <unotools/unotoolsdllapi.h>
 
 #include <osl/thread.hxx>
 #include <osl/conditn.hxx>
@@ -90,7 +89,7 @@ public:
 
 typedef tools::SvRef<UcbLockBytesHandler> UcbLockBytesHandlerRef;
 
-class UNOTOOLS_DLLPUBLIC UcbLockBytes : public virtual SvLockBytes
+class UcbLockBytes : public virtual SvLockBytes
 {
     osl::Condition          m_aInitialized;
     osl::Condition          m_aTerminated;
diff --git a/unotools/source/ucbhelper/ucbstreamhelper.cxx b/unotools/source/ucbhelper/ucbstreamhelper.cxx
index 3aea7c0..aa8f12d 100644
--- a/unotools/source/ucbhelper/ucbstreamhelper.cxx
+++ b/unotools/source/ucbhelper/ucbstreamhelper.cxx
@@ -18,7 +18,6 @@
  */
 
 #include <rtl/ustring.hxx>
-#include <unotools/ucblockbytes.hxx>
 #include <unotools/ucbstreamhelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <com/sun/star/ucb/CommandAbortedException.hpp>
@@ -29,6 +28,7 @@
 
 #include <ucbhelper/content.hxx>
 #include <unotools/streamwrap.hxx>
+#include <ucblockbytes.hxx>
 
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::io;


More information about the Libreoffice-commits mailing list