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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Wed Aug 1 15:11:21 UTC 2018


 filter/source/xsltfilter/OleHandler.cxx |   60 ++++++++++++++++----------------
 1 file changed, 30 insertions(+), 30 deletions(-)

New commits:
commit 0c00f6490951ee73748fae74998edf0a7ef589fa
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Aug 1 11:37:51 2018 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Aug 1 17:10:55 2018 +0200

    fix up non standard indent and stray ;
    
    Change-Id: Ica713270278046ec8f64531eb67be17787fbedf7
    Reviewed-on: https://gerrit.libreoffice.org/58413
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 3ad12a9dfa1a..29d6962bef03 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -60,16 +60,16 @@ namespace XSLT
     void OleHandler::ensureCreateRootStorage()
     {
         if (m_storage == nullptr || m_rootStream == nullptr)
-            {
-                m_rootStream = createTempFile();
-                Sequence<Any> args(1);
-                args[0] <<= m_rootStream->getInputStream();
-
-                Reference<XNameContainer> cont(
-                     Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW)
-                         ->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), UNO_QUERY);
-                m_storage = cont;
-            }
+        {
+            m_rootStream = createTempFile();
+            Sequence<Any> args(1);
+            args[0] <<= m_rootStream->getInputStream();
+
+            Reference<XNameContainer> cont(
+                 Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW)
+                     ->createInstanceWithArguments("com.sun.star.embed.OLESimpleStorage", args), UNO_QUERY);
+            m_storage = cont;
+        }
     }
 
     void OleHandler::initRootStorageFromBase64(const OString& content)
@@ -98,15 +98,15 @@ namespace XSLT
     OleHandler::encodeSubStorage(const OUString& streamName)
     {
         if (!m_storage || !m_storage->hasByName(streamName))
-            {
-                return "Not Found:";// + streamName;
-            }
-        ;
+        {
+            return "Not Found:";// + streamName;
+        }
+
         Reference<XInputStream> subStream(m_storage->getByName(streamName), UNO_QUERY);
         if (!subStream.is())
-            {
-                return "Not Found:";// + streamName;
-            }
+        {
+            return "Not Found:";// + streamName;
+        }
         //The first four byte are the length of the uncompressed data
         Sequence<sal_Int8> aLength(4);
         Reference<XSeekable> xSeek(subStream, UNO_QUERY);
@@ -114,9 +114,9 @@ namespace XSLT
         //Get the uncompressed length
         int readbytes = subStream->readBytes(aLength, 4);
         if (4 != readbytes)
-            {
-                return "Can not read the length.";
-            }
+        {
+            return "Can not read the length.";
+        }
         sal_Int32 const oleLength = (static_cast<sal_uInt8>(aLength[0]) <<  0U)
                                   | (static_cast<sal_uInt8>(aLength[1]) <<  8U)
                                   | (static_cast<sal_uInt8>(aLength[2]) << 16U)
@@ -129,9 +129,9 @@ namespace XSLT
         //Read all bytes. The compressed length should less then the uncompressed length
         readbytes = subStream->readBytes(content, oleLength);
         if (oleLength < readbytes)
-            {
-                return "oleLength";// +oleLength + readBytes;
-            }
+        {
+            return "oleLength";// +oleLength + readBytes;
+        }
 
         // Decompress the bytes
         std::unique_ptr< ::ZipUtils::Inflater> decompresser(new ::ZipUtils::Inflater(false));
@@ -150,14 +150,14 @@ namespace XSLT
     OleHandler::insertByName(const OUString& streamName, const OString& content)
     {
         if ( streamName == "oledata.mso" )
-            {
-                initRootStorageFromBase64(content);
-            }
+        {
+            initRootStorageFromBase64(content);
+        }
         else
-            {
-                ensureCreateRootStorage();
-                insertSubStorage(streamName, content);
-            }
+        {
+            ensureCreateRootStorage();
+            insertSubStorage(streamName, content);
+        }
     }
 
     const OString


More information about the Libreoffice-commits mailing list