desktop/inc/lib/init.hxx | 39 ++++++++++++++++ desktop/source/lib/init.cxx | 102 +++++++++++++++----------------------------- download.lst | 4 - 3 files changed, 76 insertions(+), 69 deletions(-)
New commits: commit 11dd40409defe06c7ac3dba79b34cd4f081d9bbd Author: Andras Timar <andras.ti...@collabora.com> AuthorDate: Tue Mar 5 09:17:12 2019 +0100 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Tue Mar 5 09:17:12 2019 +0100 openssl: upgrade to release 1.0.2r Change-Id: I6ddce7fc04aa0368857561c08f4600e9bbe02259 diff --git a/download.lst b/download.lst index a5c2e4152f74..adc11bb00f2e 100644 --- a/download.lst +++ b/download.lst @@ -206,8 +206,8 @@ export OFFICEOTRON_SHA256SUM := f2443f27561af52324eee03a1892d9f569adc8db9e7bca55 export OFFICEOTRON_JAR := 8249374c274932a21846fa7629c2aa9b-officeotron-0.7.4-master.jar export OPENLDAP_SHA256SUM := cdd6cffdebcd95161a73305ec13fc7a78e9707b46ca9f84fb897cd5626df3824 export OPENLDAP_TARBALL := openldap-2.4.45.tgz -export OPENSSL_SHA256SUM := 8c6ff15ec6b319b50788f42c7abc2890c08ba5a1cdcd3810eb9092deada37b0f -export OPENSSL_TARBALL := openssl-1.0.2m.tar.gz +export OPENSSL_SHA256SUM := ae51d08bba8a83958e894946f15303ff894d75c2b8bbd44a852b64e3fe11d0d6 +export OPENSSL_TARBALL := openssl-1.0.2r.tar.gz export ORCUS_SHA256SUM := 62e76de1fd3101e77118732b860354121b40a87bbb1ebfeb8203477fffac16e9 export ORCUS_TARBALL := liborcus-0.13.3.tar.gz export OWNCLOUD_ANDROID_LIB_SHA256SUM := b18b3e3ef7fae6a79b62f2bb43cc47a5346b6330f6a383dc4be34439aca5e9fb commit 7bbc411a339e1ba63aacf52cedf80fb731a885f7 Author: Ashod Nakashian <ashod.nakash...@collabora.co.uk> AuthorDate: Wed Feb 13 13:51:14 2019 -0500 Commit: Andras Timar <andras.ti...@collabora.com> CommitDate: Mon Mar 4 21:15:38 2019 +0100 LOK: Move RectangleAndPart to the header This is in preparation to cache them. Change-Id: Ic511caf5a8798750288e9271f6898ab38fe2055f diff --git a/desktop/inc/lib/init.hxx b/desktop/inc/lib/init.hxx index cb8afa899b76..d5adb7ac411c 100644 --- a/desktop/inc/lib/init.hxx +++ b/desktop/inc/lib/init.hxx @@ -22,6 +22,8 @@ #include <LibreOfficeKit/LibreOfficeKitEnums.h> #include <com/sun/star/beans/PropertyValue.hpp> #include <com/sun/star/lang/XComponent.hpp> +#include <tools/gen.hxx> +#include <sfx2/lokhelper.hxx> #include <desktop/dllapi.h> @@ -29,6 +31,43 @@ class LOKInteractionHandler; namespace desktop { + /// Represents an invalidated rectangle inside a given document part. + struct RectangleAndPart + { + tools::Rectangle m_aRectangle; + int m_nPart; + + RectangleAndPart() + : m_nPart(INT_MIN) // -1 is reserved to mean "all parts". + { + } + + OString toString() const + { + std::stringstream ss; + ss << m_aRectangle.toString(); + if (m_nPart >= -1) + ss << ", " << m_nPart; + return ss.str().c_str(); + } + + /// Infinite Rectangle is both sides are + /// equal or longer than SfxLokHelper::MaxTwips. + bool isInfinite() const + { + return m_aRectangle.GetWidth() >= SfxLokHelper::MaxTwips && + m_aRectangle.GetHeight() >= SfxLokHelper::MaxTwips; + } + + /// Empty Rectangle is when it has zero dimensions. + bool isEmpty() const + { + return m_aRectangle.IsEmpty(); + } + + static RectangleAndPart Create(const std::string& rPayload); + }; + class DESKTOP_DLLPUBLIC CallbackFlushHandler : public Idle { public: diff --git a/desktop/source/lib/init.cxx b/desktop/source/lib/init.cxx index c7dd54a0d7dc..cd8c57e88407 100644 --- a/desktop/source/lib/init.cxx +++ b/desktop/source/lib/init.cxx @@ -402,94 +402,62 @@ static boost::property_tree::ptree unoAnyToPropertyTree(const uno::Any& anyItem) return aTree; } -namespace { +namespace desktop { -/// Represents an invalidated rectangle inside a given document part. -struct RectangleAndPart +RectangleAndPart RectangleAndPart::Create(const std::string& rPayload) { - tools::Rectangle m_aRectangle; - int m_nPart; - - RectangleAndPart() - : m_nPart(INT_MIN) // -1 is reserved to mean "all parts". + RectangleAndPart aRet; + if (rPayload.compare(0, 5, "EMPTY") == 0) // payload starts with "EMPTY" { - } + aRet.m_aRectangle = tools::Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); + if (comphelper::LibreOfficeKit::isPartInInvalidation()) + aRet.m_nPart = std::stol(rPayload.substr(6)); - OString toString() const - { - std::stringstream ss; - ss << m_aRectangle.toString(); - if (m_nPart >= -1) - ss << ", " << m_nPart; - return ss.str().c_str(); + return aRet; } - /// Infinite Rectangle is both sides are - /// equal or longer than SfxLokHelper::MaxTwips. - bool isInfinite() const + std::istringstream aStream(rPayload); + long nLeft, nTop, nWidth, nHeight; + long nPart = INT_MIN; + char nComma; + if (comphelper::LibreOfficeKit::isPartInInvalidation()) { - return m_aRectangle.GetWidth() >= SfxLokHelper::MaxTwips && - m_aRectangle.GetHeight() >= SfxLokHelper::MaxTwips; + aStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight >> nComma >> nPart; } - - /// Empty Rectangle is when it has zero dimensions. - bool isEmpty() const + else { - return m_aRectangle.IsEmpty(); + aStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight; } - static RectangleAndPart Create(const std::string& rPayload) + if (nWidth > 0 && nHeight > 0) { - RectangleAndPart aRet; - if (rPayload.compare(0, 5, "EMPTY") == 0) // payload starts with "EMPTY" + // The top-left corner starts at (0, 0). + // Anything negative is invalid. + if (nLeft < 0) { - aRet.m_aRectangle = tools::Rectangle(0, 0, SfxLokHelper::MaxTwips, SfxLokHelper::MaxTwips); - if (comphelper::LibreOfficeKit::isPartInInvalidation()) - aRet.m_nPart = std::stol(rPayload.substr(6)); - - return aRet; + nWidth += nLeft; + nLeft = 0; } - std::istringstream aStream(rPayload); - long nLeft, nTop, nWidth, nHeight; - long nPart = INT_MIN; - char nComma; - if (comphelper::LibreOfficeKit::isPartInInvalidation()) + if (nTop < 0) { - aStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight >> nComma >> nPart; - } - else - { - aStream >> nLeft >> nComma >> nTop >> nComma >> nWidth >> nComma >> nHeight; + nHeight += nTop; + nTop = 0; } if (nWidth > 0 && nHeight > 0) { - // The top-left corner starts at (0, 0). - // Anything negative is invalid. - if (nLeft < 0) - { - nWidth += nLeft; - nLeft = 0; - } - - if (nTop < 0) - { - nHeight += nTop; - nTop = 0; - } - - if (nWidth > 0 && nHeight > 0) - { - aRet.m_aRectangle = tools::Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); - } + aRet.m_aRectangle = tools::Rectangle(nLeft, nTop, nLeft + nWidth, nTop + nHeight); } - // else leave empty rect. - - aRet.m_nPart = nPart; - return aRet; } -}; + // else leave empty rect. + + aRet.m_nPart = nPart; + return aRet; +} +} + +namespace { bool lcl_isViewCallbackType(const int type) { @@ -1047,7 +1015,7 @@ void CallbackFlushHandler::queue(const int type, const char* data) [] (const queue_type::value_type& elem) { return (elem.first == LOK_CALLBACK_INVALIDATE_TILES); }); if (pos != m_queue.rend()) { - RectangleAndPart rcOld = RectangleAndPart::Create(pos->second); + const RectangleAndPart rcOld = RectangleAndPart::Create(pos->second); if (rcOld.isInfinite() && (rcOld.m_nPart == -1 || rcOld.m_nPart == rcNew.m_nPart)) { SAL_INFO("lok", "Skipping queue [" << type << "]: [" << payload << "] since all tiles need to be invalidated."); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits