comphelper/source/streaming/seqstream.cxx |    9 +--------
 include/comphelper/seqstream.hxx          |    1 -
 sax/source/tools/fastserializer.cxx       |    2 +-
 3 files changed, 2 insertions(+), 10 deletions(-)

New commits:
commit 018f1deae884febbbe639c7ee46b45ce4807e9d3
Author: Matúš Kukan <matus.ku...@collabora.com>
Date:   Thu Sep 25 11:39:11 2014 +0200

    Remove mutex from OSequenceOutputStream; it's intended to be fast
    
    Make the caller responsible for using it wisely.
    AFAICS it's used only in FastSaxSerializer, so far.
    
    Change-Id: I50d48fd7f3e6cdeb9e4637868da213b8171e542b

diff --git a/comphelper/source/streaming/seqstream.cxx 
b/comphelper/source/streaming/seqstream.cxx
index 5bc44a5..d66ce3b 100644
--- a/comphelper/source/streaming/seqstream.cxx
+++ b/comphelper/source/streaming/seqstream.cxx
@@ -159,7 +159,6 @@ OSequenceOutputStream::OSequenceOutputStream(Sequence< 
sal_Int8 >& _rSeq, double
 
 void SAL_CALL OSequenceOutputStream::writeBytes( const Sequence< sal_Int8 >& 
_rData ) throw(NotConnectedException, BufferSizeExceededException, IOException, 
RuntimeException, std::exception)
 {
-    MutexGuard aGuard(m_aMutex);
     if (!m_bConnected)
         throw NotConnectedException();
 
@@ -210,7 +209,6 @@ void SAL_CALL OSequenceOutputStream::writeBytes( const 
Sequence< sal_Int8 >& _rD
 
 void SAL_CALL OSequenceOutputStream::flush(  ) throw(NotConnectedException, 
BufferSizeExceededException, IOException, RuntimeException, std::exception)
 {
-    MutexGuard aGuard(m_aMutex);
     if (!m_bConnected)
         throw NotConnectedException();
 
@@ -221,12 +219,7 @@ void SAL_CALL OSequenceOutputStream::flush(  ) 
throw(NotConnectedException, Buff
 
 void SAL_CALL OSequenceOutputStream::closeOutput(  ) 
throw(NotConnectedException, BufferSizeExceededException, IOException, 
RuntimeException, std::exception)
 {
-    MutexGuard aGuard(m_aMutex);
-    if (!m_bConnected)
-        throw NotConnectedException();
-
-    // cut the sequence to the real size
-    m_rSequence.realloc(m_nSize);
+    flush();
     // and don't allow any further accesses
     m_bConnected = false;
 }
diff --git a/include/comphelper/seqstream.hxx b/include/comphelper/seqstream.hxx
index d4f301c..13dd4dc 100644
--- a/include/comphelper/seqstream.hxx
+++ b/include/comphelper/seqstream.hxx
@@ -89,7 +89,6 @@ protected:
     sal_Int32                                       m_nSize;
 
     bool                                            m_bConnected; ///< 
closeOutput has been called ?
-    ::osl::Mutex                                    m_aMutex;
 
 public:
     /** constructs the object. Everything written into the stream through the 
XOutputStream methods will be forwarded
commit 5811fde317f78fd0713414b2e0d40522251b855d
Author: Matúš Kukan <matus.ku...@collabora.com>
Date:   Thu Sep 25 11:07:21 2014 +0200

    FastSerializer: We already know the attribute value
    
    Change-Id: I6996e15f99b94b50c1903092d7424a96339ccfaf

diff --git a/sax/source/tools/fastserializer.cxx 
b/sax/source/tools/fastserializer.cxx
index a9520e4..dfa37c7 100644
--- a/sax/source/tools/fastserializer.cxx
+++ b/sax/source/tools/fastserializer.cxx
@@ -271,7 +271,7 @@ namespace sax_fastparser {
 
             writeBytes(toUnoSequence(maEqualSignAndQuote));
 
-            write(escapeXml(Attribs->getValue(pFastAttr[j].Token)));
+            write(escapeXml(pFastAttr[j].Value));
 
             writeBytes(toUnoSequence(maQuote));
         }
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to