[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.4' - 8 commits - cppuhelper/source framework/source svx/uiconfig ucb/source unoxml/source vcl/headless vcl/source

Michael Meeks (via logerrit) logerrit at kemper.freedesktop.org
Fri May 8 20:57:40 UTC 2020


 cppuhelper/source/servicemanager.cxx        |   14 +++++++++++---
 framework/source/helper/statusindicator.cxx |   11 +++++++----
 svx/uiconfig/ui/sidebarparagraph.ui         |    2 +-
 ucb/source/ucp/gio/gio_provider.cxx         |   14 ++++++++++++++
 unoxml/source/dom/documentbuilder.cxx       |   25 +++++++++++++++++++++----
 vcl/headless/CustomWidgetDraw.cxx           |    5 ++++-
 vcl/source/image/ImplImageTree.cxx          |    1 +
 vcl/source/window/toolbox2.cxx              |    2 ++
 8 files changed, 61 insertions(+), 13 deletions(-)

New commits:
commit 4e7f3bde598fc122ef5bb428bf5f7e4d4f22fd82
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Nov 20 16:38:14 2019 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:53:26 2020 +0100

    preload: cleanup failed module load warnings and rename them.
    
    Change-Id: Iafa89df6f724fa6b64712d970502091e38300dad
    Reviewed-on: https://gerrit.libreoffice.org/83341
    Tested-by: Jenkins
    Reviewed-by: Aron Budea <aron.budea at collabora.com>

diff --git a/cppuhelper/source/servicemanager.cxx b/cppuhelper/source/servicemanager.cxx
index 8f49b4ecb908..b4c2503db1a1 100644
--- a/cppuhelper/source/servicemanager.cxx
+++ b/cppuhelper/source/servicemanager.cxx
@@ -1788,6 +1788,7 @@ void cppuhelper::ServiceManager::preloadImplementations() {
     std::vector<OUString> aReported;
     std::vector<OUString> aDisabled;
     OUStringBuffer aDisabledMsg;
+    OUStringBuffer aMissingMsg;
 
     /// Allow external callers & testers to disable certain components
     const char *pDisable = getenv("UNODISABLELIBRARY");
@@ -1810,6 +1811,7 @@ void cppuhelper::ServiceManager::preloadImplementations() {
             rEntry.second->status == Data::Implementation::STATUS_LOADED)
             continue;
 
+        OUString simplified;
         try
         {
             const OUString &aLibrary = rEntry.second->info->uri;
@@ -1817,7 +1819,8 @@ void cppuhelper::ServiceManager::preloadImplementations() {
             if (aLibrary.isEmpty())
                 continue;
 
-            OUString simplified = simplifyModule(aLibrary);
+            simplified = simplifyModule(aLibrary);
+
             bool bDisabled =
                 std::find(aDisabled.begin(), aDisabled.end(), simplified) != aDisabled.end();
 
@@ -1854,8 +1857,8 @@ void cppuhelper::ServiceManager::preloadImplementations() {
 
         if (!aModule.is())
         {
-            std::cerr << ":failed" << std::endl;
-            std::cerr.flush();
+            aMissingMsg.append(simplified);
+            aMissingMsg.append(" ");
         }
 
         if (aModule.is() &&
@@ -1948,6 +1951,11 @@ void cppuhelper::ServiceManager::preloadImplementations() {
     }
     std::cerr << std::endl;
 
+    if (aMissingMsg.getLength() > 0)
+    {
+        OUString aMsg = aMissingMsg.makeStringAndClear();
+        std::cerr << "Absent (often optional): " << aMsg << "\n";
+    }
     if (aDisabledMsg.getLength() > 0)
     {
         OUString aMsg = aDisabledMsg.makeStringAndClear();
commit 971660d6f472fad16d9ab975f432b93032f9dbc6
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jan 20 19:35:42 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:51:17 2020 +0100

    vcl: close UNO streams with closeInput.
    
    We can end up with lingering XBufferedThreadedStreams from the
    package ZIP code otherwise.
    
    Change-Id: I2a489c975b6f460c38317cb0bb93c2aa7ccc383d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87099
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87112
    Tested-by: Jenkins

diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx
index df561e87a842..def001029626 100644
--- a/vcl/source/image/ImplImageTree.cxx
+++ b/vcl/source/image/ImplImageTree.cxx
@@ -150,6 +150,7 @@ std::shared_ptr<SvMemoryStream> wrapStream(uno::Reference<io::XInputStream> cons
             break;
     }
     aMemoryStream->Seek(0);
+    rInputStream->closeInput();
     return aMemoryStream;
 }
 
commit cda690620566a129bb474a0071bde670064a51ec
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Mon Jan 20 19:34:34 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:49:38 2020 +0100

    lok: disable ucbgio provider for Online.
    
    Of course, some lok apps may want the provider, but it creates
    unwanted threads causing problems with forkit in some cases.
    
    Change-Id: I7d19d629b3657780b52c3c753a4c8dcba6ae86b0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87098
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/ucb/source/ucp/gio/gio_provider.cxx b/ucb/source/ucp/gio/gio_provider.cxx
index 912de0e8e008..221c229ff69a 100644
--- a/ucb/source/ucp/gio/gio_provider.cxx
+++ b/ucb/source/ucp/gio/gio_provider.cxx
@@ -115,11 +115,25 @@ ONE_INSTANCE_SERVICE_FACTORY_IMPL( ContentProvider );
 
 }
 
+// gio creates threads we don't want in online's forkit
+static bool isDisabled()
+{
+    const char *pDisable = getenv("UNODISABLELIBRARY");
+    if (!pDisable)
+        return false;
+    OString aDisable(pDisable, strlen(pDisable));
+    return aDisable.indexOf("ucpgio1") >= 0;
+}
+
 extern "C" SAL_DLLPUBLIC_EXPORT void * ucpgio1_component_getFactory( const sal_Char *pImplName,
     void *pServiceManager, void * )
 {
     void * pRet = nullptr;
 
+    static bool bDisabled = isDisabled();
+    if (bDisabled)
+        return nullptr;
+
     css::uno::Reference< css::lang::XMultiServiceFactory > xSMgr
         (static_cast< css::lang::XMultiServiceFactory * >( pServiceManager ) );
     css::uno::Reference< css::lang::XSingleServiceFactory > xFactory;
commit ca674521744541651fbacd6e414708a0b9453fa7
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Jan 16 02:04:53 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:47:46 2020 +0100

    unoxml: CDocumentBuilder::parseURI should handle non-file:/// URIs.
    
    The proximate symptom of this is of only some of the slide layouts
    applying in impress on Android. This is caused by not parsing the
    file:///assets/.../layoutlist.xml - which needs to use UCB and its
    cleverer osl/ file APIs.
    
    Change-Id: I22ed77170891c0ec136caaa29da69987a0e51a73
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86900
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/unoxml/source/dom/documentbuilder.cxx b/unoxml/source/dom/documentbuilder.cxx
index 5a03cf0bcf2d..3a66b08e89d1 100644
--- a/unoxml/source/dom/documentbuilder.cxx
+++ b/unoxml/source/dom/documentbuilder.cxx
@@ -41,6 +41,7 @@
 #include <com/sun/star/xml/sax/SAXParseException.hpp>
 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
 #include <com/sun/star/task/XInteractionHandler.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
 
 #include <ucbhelper/content.hxx>
 #include <ucbhelper/commandenvironment.hxx>
@@ -391,11 +392,27 @@ namespace DOM
         OString oUri = OUStringToOString(sUri, RTL_TEXTENCODING_UTF8);
         char *uri = const_cast<char*>(oUri.getStr());
         xmlDocPtr pDoc = xmlCtxtReadFile(pContext.get(), uri, nullptr, 0);
+
+        Reference< XDocument > xRet;
+
+        // if we failed to parse the URI as a simple file, lets try via a ucb stream.
+        // For Android file:///assets/ URLs which must go via the osl/ file API.
         if (pDoc == nullptr) {
-            throwEx(pContext.get());
-        }
-        Reference< XDocument > const xRet(
-                CDocument::CreateCDocument(pDoc).get());
+            Reference < XSimpleFileAccess3 > xStreamAccess(
+                SimpleFileAccess::create( comphelper::getProcessComponentContext() ) );
+            Reference< XInputStream > xInStream = xStreamAccess->openFileRead( sUri );
+            if (!xInStream.is())
+                throwEx(pContext.get());
+
+            // loop over every layout entry in current file
+            xRet = parse( xInStream );
+
+            xInStream->closeInput();
+            xInStream.clear();
+
+        } else
+            xRet = CDocument::CreateCDocument(pDoc).get();
+
         return xRet;
     }
 
commit f371c2d09909dd7713d12f8f97e0d78985aa4622
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Wed Jan 15 08:49:53 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:47:39 2020 +0100

    theming: avoid continually attempting to load missing theme library.
    
    Saves a slew of system-calls.
    
    Change-Id: Ibd9b8695d071dbddd1717b5c9f3349f3696458b8
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86856
    Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/headless/CustomWidgetDraw.cxx b/vcl/headless/CustomWidgetDraw.cxx
index 677c575b96bb..343f5cd75a4e 100644
--- a/vcl/headless/CustomWidgetDraw.cxx
+++ b/vcl/headless/CustomWidgetDraw.cxx
@@ -24,7 +24,8 @@ CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics)
     : m_rGraphics(rGraphics)
 {
 #ifndef DISABLE_DYNLOADING
-    if (!s_pWidgetImplementation)
+    static bool s_bMissingLibrary = false;
+    if (!s_pWidgetImplementation && !s_bMissingLibrary)
     {
         OUString aUrl("${LO_LIB_DIR}/" SVLIBRARY("vcl_widget_theme"));
         rtl::Bootstrap::expandMacros(aUrl);
@@ -45,6 +46,8 @@ CustomWidgetDraw::CustomWidgetDraw(SvpSalGraphics& rGraphics)
             pSVData->maNWFData.mbNoFocusRects = true;
             pSVData->maNWFData.mbNoFocusRectsForFlatButtons = true;
         }
+        else
+            s_bMissingLibrary = true;
     }
 #endif
 }
commit 4b1ad0c54b94bf1a772e08c073f2991b2888b0fe
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Fri Jan 24 20:48:21 2020 +0100
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:46:16 2020 +0100

    lok: status update - avoid SIGFPE on zero range.
    
    Change-Id: I75597696b529f833bbc699f66f5a4bcdc06748d1
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87368
    Tested-by: Jenkins
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/framework/source/helper/statusindicator.cxx b/framework/source/helper/statusindicator.cxx
index e729702125d6..25d67694c5df 100644
--- a/framework/source/helper/statusindicator.cxx
+++ b/framework/source/helper/statusindicator.cxx
@@ -105,11 +105,14 @@ void SAL_CALL StatusIndicator::setValue(sal_Int32 nValue)
 {
     if (comphelper::LibreOfficeKit::isActive())
     {
-        int nPercent = (100*nValue)/m_nRange;
-        if (nPercent >= m_nLastCallbackPercent)
+        if (m_nRange > 0)
         {
-            comphelper::LibreOfficeKit::statusIndicatorSetValue(nPercent);
-            m_nLastCallbackPercent = nPercent;
+            int nPercent = (100*nValue)/m_nRange;
+            if (nPercent >= m_nLastCallbackPercent)
+            {
+                comphelper::LibreOfficeKit::statusIndicatorSetValue(nPercent);
+                m_nLastCallbackPercent = nPercent;
+            }
         }
         return;
     }
commit a41b8df1c823d5dcfae7b04e44cf1610378f7ec7
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Sat Feb 15 21:31:19 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:36:56 2020 +0100

    jsdialog: don't report hidden toolbox items as present.
    
    Change-Id: I965d41b15c437965b605e70b228f4da6ccbeb857
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88766
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx
index 2e24c83e7be9..95813d97e4e8 100644
--- a/vcl/source/window/toolbox2.cxx
+++ b/vcl/source/window/toolbox2.cxx
@@ -1781,6 +1781,8 @@ boost::property_tree::ptree ToolBox::DumpAsPropertyTree()
             {
                 boost::property_tree::ptree aEntry;
                 int nId = GetItemId(i);
+                if (!IsItemVisible(nId))
+                    continue;
                 aEntry.put("type", "toolitem");
                 aEntry.put("text", GetItemText(nId));
                 aEntry.put("command", GetItemCommand(nId));
commit e17f6015eebe908fed8771d9f3660cd975f6751a
Author:     Michael Meeks <michael.meeks at collabora.com>
AuthorDate: Thu Feb 20 16:43:43 2020 +0000
Commit:     Michael Meeks <michael.meeks at collabora.com>
CommitDate: Fri May 8 21:36:11 2020 +0100

    sidebar: provide indent field boxes with useful id for hiding on mobile.
    
    Change-Id: I45feb65dbc48810f27e4f7151de46bafcb54af00
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89128
    Tested-by: Michael Meeks <michael.meeks at collabora.com>
    Reviewed-by: Michael Meeks <michael.meeks at collabora.com>

diff --git a/svx/uiconfig/ui/sidebarparagraph.ui b/svx/uiconfig/ui/sidebarparagraph.ui
index dd0ec65b9b8e..de17c256daea 100644
--- a/svx/uiconfig/ui/sidebarparagraph.ui
+++ b/svx/uiconfig/ui/sidebarparagraph.ui
@@ -417,7 +417,7 @@
           </packing>
         </child>
         <child>
-          <object class="GtkBox" id="box13">
+          <object class="GtkBox" id="indentfieldbox">
             <property name="visible">True</property>
             <property name="can_focus">False</property>
             <property name="orientation">vertical</property>


More information about the Libreoffice-commits mailing list