[Libreoffice-commits] core.git: Branch 'feature/cib_contract138b' - 12 commits - comphelper/source configure.ac desktop/source dtrans/source extensions/Library_log.mk extensions/source .gitreview include/comphelper offapi/com offapi/UnoApi_offapi.mk sc/uiconfig sd/source sot/source svx/source sw/uiconfig vcl/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Oct 29 13:11:59 UTC 2018


Rebased ref, commits from common ancestor:
commit cd137052b02d552d43bc44c9794557f05a77e3df
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Mon Oct 29 14:03:22 2018 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:09:41 2018 +0100

    Bump version to 6.0.8.1
    
    Change-Id: I5b6949214031817471900b929e1281eba11c47c6

diff --git a/configure.ac b/configure.ac
index 8d4c7b3d36a2..795cde16d38f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -9,7 +9,7 @@ dnl in order to create a configure script.
 # several non-alphanumeric characters, those are split off and used only for the
 # ABOUTBOXPRODUCTVERSIONSUFFIX in openoffice.lst. Why that is necessary, no idea.
 
-AC_INIT([LibreOffice],[6.0.8.0.0+],[],[],[http://documentfoundation.org/])
+AC_INIT([LibreOffice],[6.0.8.1],[],[],[http://documentfoundation.org/])
 
 AC_PREREQ([2.59])
 
commit 44d74f144f4d476b96191f568d7077a066a4bc41
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Oct 26 14:46:47 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    unopkg: Log deployment output with the same logger as unopkg
    
    This prevents overwriting the existing logfile by
    using the same logger as unopkg does.
    
    Reviewed-on: https://gerrit.libreoffice.org/62393
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 5bd0212b54ea8c98fe401e8b1ad6d0b626a4b7e1)
    
    Change-Id: Iaad4c5b99a4f428d3a4ad8a046c88404aecb5652
    (cherry picked from commit ad9d295c13d4c176643a26898f1b697b2a406ee7)

diff --git a/desktop/source/deployment/dp_log.cxx b/desktop/source/deployment/dp_log.cxx
index 4f9453ff3a3b..c40cd16780ec 100644
--- a/desktop/source/deployment/dp_log.cxx
+++ b/desktop/source/deployment/dp_log.cxx
@@ -27,7 +27,9 @@
 #include <comphelper/anytostring.hxx>
 #include <comphelper/servicedecl.hxx>
 #include <comphelper/unwrapargs.hxx>
+#include <comphelper/logging.hxx>
 #include <com/sun/star/deployment/DeploymentException.hpp>
+#include <com/sun/star/logging/LogLevel.hpp>
 #include <com/sun/star/ucb/XProgressHandler.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.hpp>
 #include <com/sun/star/io/IOException.hpp>
@@ -37,6 +39,7 @@
 
 using namespace ::com::sun::star;
 using namespace ::com::sun::star::uno;
+using namespace ::com::sun::star::logging;
 
 namespace dp_log {
 
@@ -46,8 +49,7 @@ typedef ::cppu::WeakComponentImplHelper<ucb::XProgressHandler> t_log_helper;
 class ProgressLogImpl : public ::dp_misc::MutexHolder, public t_log_helper
 {
     Reference<io::XOutputStream> m_xLogFile;
-    sal_Int32 m_log_level;
-    void log_write( OString const & text );
+    std::unique_ptr<comphelper::EventLogger> m_logger;
 
 protected:
     virtual void SAL_CALL disposing() override;
@@ -71,73 +73,16 @@ ProgressLogImpl::~ProgressLogImpl()
 
 void ProgressLogImpl::disposing()
 {
-    try {
-        if (m_xLogFile.is()) {
-            m_xLogFile->closeOutput();
-            m_xLogFile.clear();
-        }
-    }
-    catch (const Exception & exc) {
-        SAL_WARN( "desktop", exc );
-    }
 }
 
 
 ProgressLogImpl::ProgressLogImpl(
-    Sequence<Any> const & args,
+    Sequence<Any> const & /* args */,
     Reference<XComponentContext> const & xContext )
-    : t_log_helper( getMutex() ),
-      m_log_level( 0 )
-{
-    OUString log_file;
-    boost::optional< Reference<task::XInteractionHandler> > interactionHandler;
-    comphelper::unwrapArgs( args, log_file, interactionHandler );
-
-    Reference<ucb::XSimpleFileAccess3> xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) );
-    // optional ia handler:
-    if (interactionHandler)
-        xSimpleFileAccess->setInteractionHandler( *interactionHandler );
-
-    m_xLogFile.set(
-        xSimpleFileAccess->openFileWrite( log_file ), UNO_QUERY_THROW );
-    Reference<io::XSeekable> xSeekable( m_xLogFile, UNO_QUERY_THROW );
-    xSeekable->seek( xSeekable->getLength() );
-
-    // write log stamp
-    OStringBuffer buf;
-    buf.append( "###### Progress log entry " );
-    TimeValue aStartTime, tLocal;
-    oslDateTime date_time;
-    if (osl_getSystemTime( &aStartTime ) &&
-        osl_getLocalTimeFromSystemTime( &aStartTime, &tLocal ) &&
-        osl_getDateTimeFromTimeValue( &tLocal, &date_time ))
-    {
-        char ar[ 128 ];
-        snprintf(
-            ar, sizeof (ar),
-            "%04d-%02d-%02d %02d:%02d:%02d ",
-            date_time.Year, date_time.Month, date_time.Day,
-            date_time.Hours, date_time.Minutes, date_time.Seconds );
-        buf.append( ar );
-    }
-    buf.append( "######\n" );
-    log_write( buf.makeStringAndClear() );
-}
-
-
-void ProgressLogImpl::log_write( OString const & text )
+    : t_log_helper( getMutex() )
 {
-    try {
-        if (m_xLogFile.is()) {
-            m_xLogFile->writeBytes(
-                Sequence< sal_Int8 >(
-                    reinterpret_cast< sal_Int8 const * >(text.getStr()),
-                    text.getLength() ) );
-        }
-    }
-    catch (const io::IOException & exc) {
-        SAL_WARN( "desktop", exc );
-    }
+    // Use the logger created by unopkg app
+    m_logger.reset(new comphelper::EventLogger(xContext, "unopkg"));
 }
 
 // XProgressHandler
@@ -145,39 +90,30 @@ void ProgressLogImpl::log_write( OString const & text )
 void ProgressLogImpl::push( Any const & Status )
 {
     update( Status );
-    OSL_ASSERT( m_log_level >= 0 );
-    ++m_log_level;
 }
 
-
 void ProgressLogImpl::update( Any const & Status )
 {
     if (! Status.hasValue())
         return;
 
     OUStringBuffer buf;
-    OSL_ASSERT( m_log_level >= 0 );
-    for ( sal_Int32 n = 0; n < m_log_level; ++n )
-        buf.append( ' ' );
 
     OUString msg;
+    sal_Int32 logLevel = LogLevel::INFO;
     if (Status >>= msg) {
         buf.append( msg );
     }
     else {
-        buf.append( "ERROR: " );
+        logLevel = LogLevel::SEVERE;
         buf.append( ::comphelper::anyToString(Status) );
     }
-    buf.append( "\n" );
-    log_write( OUStringToOString(
-                   buf.makeStringAndClear(), osl_getThreadTextEncoding() ) );
+    m_logger->log(logLevel, buf.makeStringAndClear());
 }
 
 
 void ProgressLogImpl::pop()
 {
-    OSL_ASSERT( m_log_level > 0 );
-    --m_log_level;
 }
 
 namespace sdecl = comphelper::service_decl;
commit 8ffe4753a1e6a5c2def23e371ac7701ec3e8d866
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Fri Oct 26 14:17:06 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    unopkg: Write to console when no UNO available
    
    Change-Id: I159b7e85f53e33c5359cca83aa958387d888f6a2
    Reviewed-on: https://gerrit.libreoffice.org/62391
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit d2a4fac09bc6d17b85fd34a3f0777ecc5e3bd286)
    (cherry picked from commit 40c4c0f17ad5871861b64014fc7f8ae04d3f8971)

diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index bb8c6b63dd9c..2b4008459324 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -609,7 +609,8 @@ extern "C" int unopkg_main()
     }
     catch (const LockFileException & e)
     {
-        logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
+        // No logger since it requires UNO which we don't have here
+        dp_misc::writeConsoleError(e.Message + "\n");
         bNoOtherErrorMsg = true;
     }
     catch (const css::uno::Exception & e ) {
commit 84e12b16c689328a9367b867bc4e2237270745c6
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Oct 25 21:09:01 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    Introduce SimpleTextFormatter and format unopkg output using it
    
    This will write log messages as plain text (no timestamp and other stuff
    like PlainTextFormatter).
    Warnings and errors will be prefixed accordingly.
    
    Reviewed-on: https://gerrit.libreoffice.org/62370
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit e4583f1ce81fc76dbfe55bcfd86d63ffe3518e5b)
    
    Change-Id: Id82512d7dd3907a4c7cd69a963a375966189dc20
    (cherry picked from commit f5b786e8749ce5622138f800ca620942e8921854)

diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index 36989ba10925..bb8c6b63dd9c 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -44,6 +44,7 @@
 #include <com/sun/star/logging/ConsoleHandler.hpp>
 #include <com/sun/star/logging/FileHandler.hpp>
 #include <com/sun/star/logging/LogLevel.hpp>
+#include <com/sun/star/logging/SimpleTextFormatter.hpp>
 #include <com/sun/star/logging/XLogger.hpp>
 #include <com/sun/star/ucb/CommandAbortedException.hpp>
 #include <com/sun/star/ucb/CommandFailedException.hpp>
@@ -300,16 +301,24 @@ extern "C" int unopkg_main()
         xComponentContext = getUNO(
         option_verbose, option_shared, subcmd_gui, xLocalComponentContext );
 
+        // Initialize logging. This will log errors to the console and
+        // also to file if the --log-file parameter was provided.
         logger.reset(new comphelper::EventLogger(xComponentContext, "unopkg"));
         const Reference<XLogger> xLogger(logger->getLogger());
         xLogger->setLevel(LogLevel::WARNING);
-        xConsoleHandler.set(css::logging::ConsoleHandler::create(xComponentContext));
+        Reference<XLogFormatter> xLogFormatter(SimpleTextFormatter::create(xComponentContext));
+        Sequence < beans::NamedValue > aSeq { { "Formatter", Any(xLogFormatter) } };
+
+        xConsoleHandler.set(ConsoleHandler::createWithSettings(xComponentContext, aSeq));
         xLogger->addLogHandler(xConsoleHandler);
         xConsoleHandler->setLevel(LogLevel::WARNING);
         xLogger->setLevel(LogLevel::WARNING);
+
+
         if (!logFile.isEmpty())
         {
-            xFileHandler.set(css::logging::FileHandler::create(xComponentContext, logFile));
+            Sequence < beans::NamedValue > aSeq2 { { "Formatter", Any(xLogFormatter) }, {"FileURL", Any(logFile)} };
+            xFileHandler.set(css::logging::FileHandler::createWithSettings(xComponentContext, aSeq2));
             xFileHandler->setLevel(LogLevel::WARNING);
             xLogger->addLogHandler(xFileHandler);
         }
diff --git a/extensions/Library_log.mk b/extensions/Library_log.mk
index 69115fe8d58e..4db9012adaa1 100644
--- a/extensions/Library_log.mk
+++ b/extensions/Library_log.mk
@@ -26,6 +26,7 @@ $(eval $(call gb_Library_add_exception_objects,log,\
 	extensions/source/logging/loghandler \
 	extensions/source/logging/logrecord \
 	extensions/source/logging/plaintextformatter \
+	extensions/source/logging/simpletextformatter \
 ))
 
 $(eval $(call gb_Library_use_libraries,log,\
diff --git a/extensions/source/logging/log.component b/extensions/source/logging/log.component
index 2bd7f651a622..d4bda58c6900 100644
--- a/extensions/source/logging/log.component
+++ b/extensions/source/logging/log.component
@@ -39,4 +39,8 @@
       constructor="com_sun_star_comp_extensions_PlainTextFormatter">
     <service name="com.sun.star.logging.PlainTextFormatter"/>
   </implementation>
+  <implementation name="com.sun.star.comp.extensions.SimpleTextFormatter"
+      constructor="com_sun_star_comp_extensions_SimpleTextFormatter">
+    <service name="com.sun.star.logging.SimpleTextFormatter"/>
+  </implementation>
 </component>
diff --git a/extensions/source/logging/simpletextformatter.cxx b/extensions/source/logging/simpletextformatter.cxx
new file mode 100644
index 000000000000..a5eb3deaf547
--- /dev/null
+++ b/extensions/source/logging/simpletextformatter.cxx
@@ -0,0 +1,103 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#include <sal/config.h>
+
+#include <com/sun/star/logging/XLogFormatter.hpp>
+#include <com/sun/star/logging/LogLevel.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+
+#include <cppuhelper/implbase.hxx>
+#include <cppuhelper/supportsservice.hxx>
+
+#include <rtl/ustrbuf.hxx>
+#include <osl/thread.h>
+
+#include <stdio.h>
+
+namespace logging
+{
+using css::logging::LogRecord;
+using namespace css::uno;
+
+class SimpleTextFormatter
+    : public cppu::WeakImplHelper<css::logging::XLogFormatter, css::lang::XServiceInfo>
+{
+public:
+    SimpleTextFormatter();
+
+private:
+    // XLogFormatter
+    virtual OUString SAL_CALL getHead() override;
+    virtual OUString SAL_CALL format(const LogRecord& Record) override;
+    virtual OUString SAL_CALL getTail() override;
+
+    // XServiceInfo
+    virtual OUString SAL_CALL getImplementationName() override;
+    virtual sal_Bool SAL_CALL supportsService(const OUString& _rServiceName) override;
+    virtual Sequence<OUString> SAL_CALL getSupportedServiceNames() override;
+};
+
+SimpleTextFormatter::SimpleTextFormatter() {}
+
+OUString SAL_CALL SimpleTextFormatter::getHead() { return OUString(); }
+
+OUString SAL_CALL SimpleTextFormatter::format(const LogRecord& _rRecord)
+{
+    OUStringBuffer aLogEntry;
+    // Highlight warnings
+    if (_rRecord.Level == css::logging::LogLevel::SEVERE)
+        aLogEntry.append("ERROR: ");
+    if (_rRecord.Level == css::logging::LogLevel::WARNING)
+        aLogEntry.append("WARNING: ");
+
+    aLogEntry.append(_rRecord.Message);
+    aLogEntry.append("\n");
+
+    return aLogEntry.makeStringAndClear();
+}
+
+OUString SAL_CALL SimpleTextFormatter::getTail() { return OUString(); }
+
+sal_Bool SAL_CALL SimpleTextFormatter::supportsService(const OUString& _rServiceName)
+{
+    return cppu::supportsService(this, _rServiceName);
+}
+
+OUString SAL_CALL SimpleTextFormatter::getImplementationName()
+{
+    return OUString("com.sun.star.comp.extensions.SimpleTextFormatter");
+}
+
+Sequence<OUString> SAL_CALL SimpleTextFormatter::getSupportedServiceNames()
+{
+    return { "com.sun.star.logging.SimpleTextFormatter" };
+}
+
+} // namespace logging
+
+extern "C" SAL_DLLPUBLIC_EXPORT css::uno::XInterface*
+com_sun_star_comp_extensions_SimpleTextFormatter(css::uno::XComponentContext*,
+                                                 css::uno::Sequence<css::uno::Any> const&)
+{
+    return cppu::acquire(new logging::SimpleTextFormatter());
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 472771a5c15d..ab7469e16bd0 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -250,6 +250,7 @@ $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/logging,\
 	FileHandler \
 	LoggerPool \
 	PlainTextFormatter \
+	SimpleTextFormatter \
 ))
 $(eval $(call gb_UnoApi_add_idlfiles_nohdl,offapi,com/sun/star/mail,\
 	MailMessage \
diff --git a/offapi/com/sun/star/logging/SimpleTextFormatter.idl b/offapi/com/sun/star/logging/SimpleTextFormatter.idl
new file mode 100644
index 000000000000..03aae22ef3f2
--- /dev/null
+++ b/offapi/com/sun/star/logging/SimpleTextFormatter.idl
@@ -0,0 +1,49 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ *   Licensed to the Apache Software Foundation (ASF) under one or more
+ *   contributor license agreements. See the NOTICE file distributed
+ *   with this work for additional information regarding copyright
+ *   ownership. The ASF licenses this file to you under the Apache
+ *   License, Version 2.0 (the "License"); you may not use this file
+ *   except in compliance with the License. You may obtain a copy of
+ *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_logging_SimpleTextFormatter_idl__
+#define __com_sun_star_logging_SimpleTextFormatter_idl__
+
+
+module com { module sun { module star { module logging {
+
+interface XLogFormatter;
+
+
+/** specifies a service which formats log records as single line plain text
+
+    <p>Every log record, as passed to XLogFormatter::format(), will
+    be formatted into a single text line, with just the log message being output.
+    If the loglevel is WARNING, or SEVERE, the line will be prefixed accordingly.</p>
+
+    @since LibreOffice 6.2
+ */
+service SimpleTextFormatter : XLogFormatter
+{
+    /// creates a SimpleTextFormatter instance
+    create();
+};
+
+
+}; }; }; };
+
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 706da5339083816e9120f2d3fbcc7f1bcb4931c8
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Oct 25 20:18:04 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    Log unopkg errors to log file if requested
    
    Before only the output generated by extension add/remove/... functions
    were logged to file, but not the error messages of unopkg itself.
    
    Change-Id: I4451aa51e2877ae48c453ee4791e36d970832567
    Reviewed-on: https://gerrit.libreoffice.org/62369
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit e8d130e7c6b2ff2a941372f386ee46fe8a95f218)

diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index e08d9d540a99..3f8020b35248 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -97,6 +97,11 @@ namespace comphelper
         return false;
     }
 
+    const css::uno::Reference<css::logging::XLogger> EventLogger::getLogger()
+    {
+        return m_pImpl->getLogger();
+    }
+
 
     namespace
     {
diff --git a/desktop/source/pkgchk/unopkg/unopkg_app.cxx b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
index d3cc0e89d41d..36989ba10925 100644
--- a/desktop/source/pkgchk/unopkg/unopkg_app.cxx
+++ b/desktop/source/pkgchk/unopkg/unopkg_app.cxx
@@ -34,12 +34,17 @@
 #include <cppuhelper/implbase.hxx>
 #include <cppuhelper/exc_hlp.hxx>
 #include <comphelper/anytostring.hxx>
+#include <comphelper/logging.hxx>
 #include <comphelper/sequence.hxx>
 #include <com/sun/star/deployment/DeploymentException.hpp>
 #include <com/sun/star/deployment/ExtensionManager.hpp>
 
 #include <com/sun/star/deployment/ui/PackageManagerDialog.hpp>
 #include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/logging/ConsoleHandler.hpp>
+#include <com/sun/star/logging/FileHandler.hpp>
+#include <com/sun/star/logging/LogLevel.hpp>
+#include <com/sun/star/logging/XLogger.hpp>
 #include <com/sun/star/ucb/CommandAbortedException.hpp>
 #include <com/sun/star/ucb/CommandFailedException.hpp>
 #include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
@@ -53,8 +58,10 @@
 
 
 using namespace ::com::sun::star;
+using namespace ::com::sun::star::logging;
 using namespace ::com::sun::star::uno;
 using namespace ::unopkg;
+
 namespace {
 
 struct ExtensionName
@@ -92,7 +99,7 @@ const char s_usingText [] =
 "options:\n"
 " -h, --help              this help\n"
 " -V, --version           version information\n"
-" -v, --verbose           verbose output to stdout\n"
+" -v, --verbose           verbose output\n"
 " -f, --force             force overwriting existing extensions\n"
 " -s, --suppress-license  prevents showing the license\n"
 " --log-file <file>       custom log file; default: <cache-dir>/log.txt\n"
@@ -193,6 +200,9 @@ extern "C" int unopkg_main()
     OUString repository;
     OUString cmdArg;
     std::vector<OUString> cmdPackages;
+    Reference<XLogHandler> xFileHandler;
+    Reference<XLogHandler> xConsoleHandler;
+    std::unique_ptr<comphelper::EventLogger> logger;
 
     OptionInfo const * info_shared = getOptionInfo(
         s_option_infos, "shared" );
@@ -287,6 +297,31 @@ extern "C" int unopkg_main()
             }
         }
 
+        xComponentContext = getUNO(
+        option_verbose, option_shared, subcmd_gui, xLocalComponentContext );
+
+        logger.reset(new comphelper::EventLogger(xComponentContext, "unopkg"));
+        const Reference<XLogger> xLogger(logger->getLogger());
+        xLogger->setLevel(LogLevel::WARNING);
+        xConsoleHandler.set(css::logging::ConsoleHandler::create(xComponentContext));
+        xLogger->addLogHandler(xConsoleHandler);
+        xConsoleHandler->setLevel(LogLevel::WARNING);
+        xLogger->setLevel(LogLevel::WARNING);
+        if (!logFile.isEmpty())
+        {
+            xFileHandler.set(css::logging::FileHandler::create(xComponentContext, logFile));
+            xFileHandler->setLevel(LogLevel::WARNING);
+            xLogger->addLogHandler(xFileHandler);
+        }
+
+        if (option_verbose)
+        {
+            xLogger->setLevel(LogLevel::INFO);
+            xConsoleHandler->setLevel(LogLevel::INFO);
+            if (xFileHandler.is())
+                xFileHandler->setLevel(LogLevel::INFO);
+        }
+
         if (repository.isEmpty())
         {
             if (option_shared)
@@ -301,10 +336,9 @@ extern "C" int unopkg_main()
             if ( repository == "shared" ) {
                 option_shared = true;
             }
-            else if (option_shared) {
-                dp_misc::writeConsoleError(
-                    "WARNING: explicit context given!  Ignoring option " +
-                    toString( info_shared ) + "!\n" );
+            else if (option_shared)
+            {
+                logger->log(LogLevel::WARNING, "Explicit context given! Ignoring option '$1$'",  toString(info_shared));
             }
         }
 #if defined(UNX)
@@ -312,10 +346,8 @@ extern "C" int unopkg_main()
         {
             if ( !(option_shared || option_bundled || option_help) )
             {
-                dp_misc::writeConsoleError(
-                    "ERROR: cannot run "  APP_NAME  " as root without " +
-                    toString( info_shared ) + " or " + toString( info_bundled )
-                    + " option.\n");
+                logger->log(LogLevel::SEVERE, "Cannot run $1$ as root without $2$ or $3$ option.",
+                           APP_NAME, toString(info_shared), toString(info_bundled));
                 return 1;
             }
 
@@ -342,9 +374,6 @@ extern "C" int unopkg_main()
                 throw Exception("Could not delete " + extensionUnorc, nullptr);
         }
 
-        xComponentContext = getUNO(
-            option_verbose, option_shared, subcmd_gui, xLocalComponentContext );
-
         Reference<deployment::XExtensionManager> xExtensionManager(
             deployment::ExtensionManager::get( xComponentContext ) );
 
@@ -544,61 +573,44 @@ extern "C" int unopkg_main()
         }
         else
         {
-            dp_misc::writeConsoleError(
-                "\nERROR: unknown sub-command " +
-                subCommand + "!\n       Use " APP_NAME " " +
-                toString(info_help) + " to print all options.\n");
+            logger->log(LogLevel::SEVERE,
+                       "Unknown sub-command: '$1$'. Use $2$ $3$ to print all options.",
+                       subCommand, APP_NAME, toString(info_help));
             return 1;
         }
 
-        if (option_verbose)
-            dp_misc::writeConsole("\n" APP_NAME " done.\n");
+        logger->log(LogLevel::INFO, "$1$ done.", APP_NAME);
         //Force to release all bridges which connect us to the child processes
         dp_misc::disposeBridges(xLocalComponentContext);
         return 0;
     }
     catch (const ucb::CommandFailedException &e)
     {
-        dp_misc::writeConsoleError(e.Message + "\n");
+        logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
         bNoOtherErrorMsg = true;
     }
     catch (const ucb::CommandAbortedException &)
     {
-        dp_misc::writeConsoleError("\n" APP_NAME " aborted!\n");
+        logger->log(LogLevel::SEVERE, "$1$ aborted.", APP_NAME);
     }
     catch (const deployment::DeploymentException & exc)
     {
-        OUString cause;
-        if (option_verbose)
-        {
-            cause = ::comphelper::anyToString(exc.Cause);
-        }
-        else
-        {
-            css::uno::Exception e;
-            if (exc.Cause >>= e)
-                cause = e.Message;
-        }
-
-        dp_misc::writeConsoleError("\nERROR: " + exc.Message + "\n");
-        if (!cause.isEmpty())
-            dp_misc::writeConsoleError("       Cause: " + cause + "\n");
+        logger->log(LogLevel::SEVERE, "Exception occurred: $1$", exc.Message);
+        logger->log(LogLevel::INFO, "    Cause: $1$", comphelper::anyToString(exc.Cause));
     }
     catch (const LockFileException & e)
     {
-        if (!subcmd_gui)
-            dp_misc::writeConsoleError(e.Message + "\n");
+        logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
         bNoOtherErrorMsg = true;
     }
     catch (const css::uno::Exception & e ) {
         Any exc( ::cppu::getCaughtException() );
 
-        dp_misc::writeConsoleError("\nERROR: " +
-            (option_verbose ? e.Message + "\nException details: \n" +
-            ::comphelper::anyToString(exc) : e.Message) + "\n");
+        logger->log(LogLevel::SEVERE, "Exception occurred: $1$", e.Message);
+        logger->log(LogLevel::INFO, "    Cause: $1$", comphelper::anyToString(exc));
     }
     if (!bNoOtherErrorMsg)
-        dp_misc::writeConsoleError("\n" APP_NAME " failed.\n");
+        logger->log(LogLevel::SEVERE, "$1$ failed.", APP_NAME);
     dp_misc::disposeBridges(xLocalComponentContext);
     return 1;
 }
diff --git a/include/comphelper/logging.hxx b/include/comphelper/logging.hxx
index 0d71620e136d..4db830caf500 100644
--- a/include/comphelper/logging.hxx
+++ b/include/comphelper/logging.hxx
@@ -29,6 +29,8 @@
 #include <boost/optional.hpp>
 #include <memory>
 
+#include <com/sun/star/logging/XLogger.hpp>
+
 namespace comphelper
 {
 
@@ -126,6 +128,8 @@ namespace comphelper
             return false;
         }
 
+        const css::uno::Reference<css::logging::XLogger> getLogger();
+
         /** logs a given message, replacing a placeholder in the message with an argument
 
             The function takes, additionally to the log level and the message, an arbitrary
commit 7bedc5c5f75e486bb3ace2626ccc0060ea3a6dbb
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Tue Oct 23 14:53:49 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    Update .gitreview

diff --git a/.gitreview b/.gitreview
index ec9d1f3cd807..7c1def7071cf 100644
--- a/.gitreview
+++ b/.gitreview
@@ -3,5 +3,4 @@ host=logerrit
 port=29418
 project=core
 defaultremote=logerrit
-defaultbranch=libreoffice-6-0
-
+defaultbranch=feature/cib_contract138b
commit 9bc8f6d141a9edb48b7d65e7519c7ade163a666a
Author:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
AuthorDate: Thu Oct 18 16:44:57 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    Sync extension registration on startup
    
    There are cases where the extension registration becomes invalid
    (empty rdb files) which leads to extensions not starting up,
    although installed and active.
    Syncing extension repos on startup fixes that.
    
    The performance impact is negligible (1ms in my measurements).
    
    Change-Id: I10475ce6a054b43c4591b17a8486648ca6a30068
    Reviewed-on: https://gerrit.libreoffice.org/61943
    Tested-by: Jenkins
    Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
    (cherry picked from commit 8959bb300b05be9fafbf30e553b35fb517bdf786)

diff --git a/desktop/source/app/check_ext_deps.cxx b/desktop/source/app/check_ext_deps.cxx
index 0fb8a9aa60bd..da94d0c93539 100644
--- a/desktop/source/app/check_ext_deps.cxx
+++ b/desktop/source/app/check_ext_deps.cxx
@@ -422,9 +422,12 @@ void Desktop::SynchronizeExtensionRepositories()
                 silent->getInteractionHandler());
 #endif
     } else {
-        // reinstallDeployedExtensions above already calls syncRepositories
-        // internally:
-        dp_misc::syncRepositories(false, silent);
+        // reinstallDeployedExtensions above already calls syncRepositories internally
+
+        // Force syncing repositories on startup. There are cases where the extension
+        // registration becomes invalid which leads to extensions not starting up, although
+        // installed and active. Syncing extension repos on startup fixes that.
+        dp_misc::syncRepositories(/*force=*/true, silent);
     }
 }
 
commit c01bf26c45d9c2321c9d2cc5f37ca9bb03839d43
Author:     Katarina Behrens <Katarina.Behrens at cib.de>
AuthorDate: Fri Aug 17 08:52:47 2018 +0200
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    Add entries to switch back to std toolbars to hamburger menu
    
    Partial backport of 0d3d7be7632902ebc4844f12dfc820f05be2021a with
    less changes, not all of them are wanted
    
    Change-Id: I34d44a7c7989f5b7d5ce74a7b36280dff444d680

diff --git a/sc/uiconfig/scalc/popupmenu/notebookbar.xml b/sc/uiconfig/scalc/popupmenu/notebookbar.xml
index b470c0e57c31..f590329376a5 100644
--- a/sc/uiconfig/scalc/popupmenu/notebookbar.xml
+++ b/sc/uiconfig/scalc/popupmenu/notebookbar.xml
@@ -15,7 +15,11 @@
   <menu:menuitem menu:id=".uno:Undo"/>
   <menu:menuitem menu:id=".uno:Redo"/>
   <menu:menuitem menu:id=".uno:Print"/>
+  <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:Menubar"/>
+  <menu:menuitem menu:id=".uno:ToolbarMode"/>
+  <menu:menuitem menu:id=".uno:Notebookbar"/>
+  <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
   <menu:menuitem menu:id=".uno:CloseDoc"/>
 </menu:menupopup>
diff --git a/sw/uiconfig/swriter/popupmenu/notebookbar.xml b/sw/uiconfig/swriter/popupmenu/notebookbar.xml
index 26168beb00e4..00afbe6500a8 100644
--- a/sw/uiconfig/swriter/popupmenu/notebookbar.xml
+++ b/sw/uiconfig/swriter/popupmenu/notebookbar.xml
@@ -15,7 +15,11 @@
   <menu:menuitem menu:id=".uno:Undo"/>
   <menu:menuitem menu:id=".uno:Redo"/>
   <menu:menuitem menu:id=".uno:Print"/>
+  <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:Menubar"/>
+  <menu:menuitem menu:id=".uno:ToolbarMode"/>
+  <menu:menuitem menu:id=".uno:Notebookbar"/>
+  <menu:menuseparator/>
   <menu:menuitem menu:id=".uno:OptionsTreeDialog"/>
   <menu:menuitem menu:id=".uno:CloseDoc"/>
 </menu:menupopup>
commit bc2f32b8a564f14515ec1e1ffbd463379d94c36e
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Fri May 11 09:31:02 2018 +0100
Commit:     Samuel Mehrbrodt <Samuel.Mehrbrodt at cib.de>
CommitDate: Mon Oct 29 14:01:08 2018 +0100

    tdf#117549 crash with focus setting during disposing
    
    Change-Id: I1ab492a4c6fab89debac90224a5f78102d33d664
    Reviewed-on: https://gerrit.libreoffice.org/54122
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>
    (cherry picked from commit 3aa01898e58c4a3bea64fea33778ac455f1f5253)

diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx
index b94acb97f6dc..a4f062ca9bc6 100644
--- a/vcl/source/control/tabctrl.cxx
+++ b/vcl/source/control/tabctrl.cxx
@@ -2349,6 +2349,8 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
         return false;
     if ( mpTabCtrlData->maItemList.empty() )
         return false;
+    if (!m_pOpenMenu || m_pOpenMenu->isDisposed())
+        return false;
 
     long nMaxWidth = nWidth - HAMBURGER_DIM;
     long nShortcutsWidth = m_pShortcuts != nullptr ? m_pShortcuts->GetSizePixel().getWidth() + 1 : 0;
@@ -2445,7 +2447,8 @@ bool NotebookbarTabControlBase::ImplPlaceTabs( long nWidth )
     }
 
     // position the shortcutbox
-    m_pShortcuts->SetPosPixel(Point(0, 0));
+    if (m_pShortcuts)
+        m_pShortcuts->SetPosPixel(Point(0, 0));
 
     // position the menu
     m_pOpenMenu->SetPosPixel(Point(nWidth - HAMBURGER_DIM, 0));
commit 24ccbc35e8857cc8de784154d0648800d39ab20b
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Sat Oct 27 23:39:27 2018 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Mon Oct 29 11:31:02 2018 +0100

    tdf#119235 svx,sd: fix drag&drop from ColorBar
    
    This was using the SfxPoolItem serialisation of XATTR_FILL* items,
    where only XFillColorItem and XFillStyleItem were actually used;
    the binary serialisation was removed without being aware of this
    feature.
    
    Fix this by using uno::Any instead, rather than reviving the binary
    serialisation.
    
    Also change the clipboard format strings, just to be safe.
    
    (regression from 97b889b8b2b2554ce33fd6b3f0359fc18f39832d)
    
    Change-Id: I1828621a9aae606a1ca47835eef608062efe64a0
    Reviewed-on: https://gerrit.libreoffice.org/62455
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    Tested-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit 0a6813ad5d57d0df72562c797a8b0581bfd65a11)
    Reviewed-on: https://gerrit.libreoffice.org/62472
    Tested-by: Jenkins
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>

diff --git a/dtrans/source/win32/ftransl/ftransl.cxx b/dtrans/source/win32/ftransl/ftransl.cxx
index 64962aecf05a..8f079c646e22 100644
--- a/dtrans/source/win32/ftransl/ftransl.cxx
+++ b/dtrans/source/win32/ftransl/ftransl.cxx
@@ -144,7 +144,7 @@ static const std::vector< FormatEntry > g_TranslTable {
     // SotClipboardFormatId::SVIM
         FormatEntry("application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT),
     // SotClipboardFormatId::XFA
-        FormatEntry("application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT),
+        FormatEntry("application/x-libreoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr Any)\"", "XFA (XOutDev FillAttr Any)", nullptr, CF_INVALID, CPPUTYPE_DEFAULT),
     // SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT
         FormatEntry("application/vnd.oasis.opendocument.text-flat-xml", "EditEngine ODF", nullptr, CF_INVALID, CPPUTYPE_DEFAULT),
     // SotClipboardFormatId::INTERNALLINK_STATE
diff --git a/sd/source/ui/view/sdview2.cxx b/sd/source/ui/view/sdview2.cxx
index 4df02ee52385..62fa687f1de1 100644
--- a/sd/source/ui/view/sdview2.cxx
+++ b/sd/source/ui/view/sdview2.cxx
@@ -21,6 +21,7 @@
 
 #include <vector>
 #include <com/sun/star/embed/XEmbedPersist.hpp>
+#include <comphelper/sequenceashashmap.hxx>
 #include <tools/urlobj.hxx>
 #include <vcl/msgbox.hxx>
 #include <svx/svdetc.hxx>
@@ -673,14 +674,19 @@ sal_Int8 View::ExecuteDrop( const ExecuteDropEvent& rEvt,
                     {
                         if(pIAOHandle->getOverlayObjectList().isHitPixel(rEvt.maPosPixel))
                         {
-                            ::tools::SvRef<SotStorageStream> xStm;
-
-                            if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) && xStm.is() )
+                            uno::Any const data(aDataHelper.GetAny(SotClipboardFormatId::XFA, ""));
+                            uno::Sequence<beans::NamedValue> props;
+                            if (data >>= props)
                             {
-                                XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) );
-
-                                ReadXFillExchangeData( *xStm, aFillData );
-                                const Color aColor( aFillData.GetXFillAttrSetItem()->GetItemSet().Get( XATTR_FILLCOLOR ).GetColorValue() );
+                                ::comphelper::SequenceAsHashMap const map(props);
+                                Color aColor(COL_BLACK);
+                                auto const it = map.find("FillColor");
+                                if (it != map.end())
+                                {
+                                    XFillColorItem color;
+                                    color.PutValue(it->second, 0);
+                                    aColor = color.GetColorValue();
+                                }
                                 static_cast< SdrHdlColor* >( pIAOHandle )->SetColor( aColor, true );
                                 nRet = nDropAction;
                             }
diff --git a/sd/source/ui/view/sdview3.cxx b/sd/source/ui/view/sdview3.cxx
index 24e22a0f0dc5..01c415bff69f 100644
--- a/sd/source/ui/view/sdview3.cxx
+++ b/sd/source/ui/view/sdview3.cxx
@@ -71,6 +71,7 @@
 #include <ViewClipboard.hxx>
 #include <sfx2/ipclient.hxx>
 #include <sfx2/classificationhelper.hxx>
+#include <comphelper/sequenceashashmap.hxx>
 #include <comphelper/storagehelper.hxx>
 #include <comphelper/processfactory.hxx>
 #include <tools/stream.hxx>
@@ -1317,14 +1318,10 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
 
     if(!bReturn && pPickObj && CHECK_FORMAT_TRANS( SotClipboardFormatId::XFA ) )
     {
-        ::tools::SvRef<SotStorageStream> xStm;
-
-        if( aDataHelper.GetSotStorageStream( SotClipboardFormatId::XFA, xStm ) )
+        uno::Any const data(aDataHelper.GetAny(SotClipboardFormatId::XFA, ""));
+        uno::Sequence<beans::NamedValue> props;
+        if (data >>= props)
         {
-            XFillExchangeData aFillData( XFillAttrSetItem( &mrDoc.GetPool() ) );
-
-            ReadXFillExchangeData( *xStm, aFillData );
-
             if( IsUndoEnabled() )
             {
                 BegUndo( SdResId(STR_UNDO_DRAGDROP) );
@@ -1332,15 +1329,27 @@ bool View::InsertData( const TransferableDataHelper& rDataHelper,
                 EndUndo();
             }
 
-            XFillAttrSetItem*   pSetItem = aFillData.GetXFillAttrSetItem();
-            SfxItemSet          rSet = pSetItem->GetItemSet();
-            drawing::FillStyle eFill = rSet.Get( XATTR_FILLSTYLE ).GetValue();
+            ::comphelper::SequenceAsHashMap const map(props);
+            drawing::FillStyle eFill(drawing::FillStyle_BITMAP); // default to something that's ignored
+            Color aColor(COL_BLACK);
+            auto it = map.find("FillStyle");
+            if (it != map.end())
+            {
+                XFillStyleItem style;
+                style.PutValue(it->second, 0);
+                eFill = style.GetValue();
+            }
+            it = map.find("FillColor");
+            if (it != map.end())
+            {
+                XFillColorItem color;
+                color.PutValue(it->second, 0);
+                aColor = color.GetColorValue();
+            }
 
             if( eFill == drawing::FillStyle_SOLID || eFill == drawing::FillStyle_NONE )
             {
-                const XFillColorItem&   rColItem = rSet.Get( XATTR_FILLCOLOR );
-                Color                   aColor( rColItem.GetColorValue() );
-                OUString                aName( rColItem.GetName() );
+                OUString                aName;
                 SfxItemSet              aSet( mrDoc.GetPool() );
                 bool                    bClosed = pPickObj->IsClosedObj();
                 ::sd::Window* pWin = mpViewSh->GetActiveWindow();
diff --git a/sot/source/base/exchange.cxx b/sot/source/base/exchange.cxx
index e69ae15d8ae8..8dbc5bfd4686 100644
--- a/sot/source/base/exchange.cxx
+++ b/sot/source/base/exchange.cxx
@@ -72,7 +72,7 @@ namespace
             /* 11 SotClipboardFormatId::DRAWING*/                { "application/x-openoffice-drawing;windows_formatname=\"Drawing Format\"", "Drawing Format", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /* 12 SotClipboardFormatId::SVXB*/                   { "application/x-openoffice-svxb;windows_formatname=\"SVXB (StarView Bitmap/Animation)\"", "SVXB (StarView Bitmap/Animation)", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /* 13 SotClipboardFormatId::SVIM*/                   { "application/x-openoffice-svim;windows_formatname=\"SVIM (StarView ImageMap)\"", "SVIM (StarView ImageMap)", &cppu::UnoType<Sequence<sal_Int8>>::get() },
-            /* 14 SotClipboardFormatId::XFA*/                    { "application/x-openoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr)\"", "XFA (XOutDev FillAttr)", &cppu::UnoType<Sequence<sal_Int8>>::get() },
+            /* 14 SotClipboardFormatId::XFA*/                    { "application/x-libreoffice-xfa;windows_formatname=\"XFA (XOutDev FillAttr Any)\"", "XFA (XOutDev FillAttr Any)", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /* 15 SotClipboardFormatId::EDITENGINE_ODF_TEXT_FLAT*/ { "application/vnd.oasis.opendocument.text-flat-xml", "EditEngine ODF", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /* 16 SotClipboardFormatId::INTERNALLINK_STATE*/     { "application/x-openoffice-internallink-state;windows_formatname=\"StatusInfo vom SvxInternalLink\"", "StatusInfo vom SvxInternalLink", &cppu::UnoType<Sequence<sal_Int8>>::get() },
             /* 17 SotClipboardFormatId::SOLK*/                   { "application/x-openoffice-solk;windows_formatname=\"SOLK (StarOffice Link)\"", "SOLK (StarOffice Link)", &cppu::UnoType<Sequence<sal_Int8>>::get() },
diff --git a/svx/source/tbxctrls/colrctrl.cxx b/svx/source/tbxctrls/colrctrl.cxx
index 3a22aa10863f..8f4854fc1d2a 100644
--- a/svx/source/tbxctrls/colrctrl.cxx
+++ b/svx/source/tbxctrls/colrctrl.cxx
@@ -48,18 +48,18 @@ class SvxColorValueSetData : public TransferableHelper
 {
 private:
 
-    XFillExchangeData       maData;
+    uno::Sequence<beans::NamedValue> m_Data;
 
 protected:
 
     virtual void            AddSupportedFormats() override;
     virtual bool GetData( const css::datatransfer::DataFlavor& rFlavor, const OUString& rDestDoc ) override;
-    virtual bool            WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void* pUserObject, sal_uInt32 nUserObjectId, const css::datatransfer::DataFlavor& rFlavor ) override;
 
 public:
 
-    explicit SvxColorValueSetData( const XFillAttrSetItem& rSetItem ) :
-        maData( rSetItem ) {}
+    explicit SvxColorValueSetData(const uno::Sequence<beans::NamedValue>& rProps)
+        : m_Data(rProps)
+    {}
 };
 
 void SvxColorValueSetData::AddSupportedFormats()
@@ -73,19 +73,13 @@ bool SvxColorValueSetData::GetData( const css::datatransfer::DataFlavor& rFlavor
 
     if( SotExchange::GetFormat( rFlavor ) == SotClipboardFormatId::XFA )
     {
-        SetObject( &maData, 0, rFlavor );
+        SetAny(uno::makeAny(m_Data));
         bRet = true;
     }
 
     return bRet;
 }
 
-bool SvxColorValueSetData::WriteObject( tools::SvRef<SotStorageStream>& rxOStm, void*, sal_uInt32, const css::datatransfer::DataFlavor&  )
-{
-    WriteXFillExchangeData( *rxOStm, maData );
-    return( rxOStm->GetError() == ERRCODE_NONE );
-}
-
 SvxColorValueSet_docking::SvxColorValueSet_docking( vcl::Window* _pParent ) :
     SvxColorValueSet( _pParent, WB_ITEMBORDER ),
     DragSourceHelper( this ),
@@ -149,14 +143,18 @@ void SvxColorValueSet_docking::DoDrag()
 
     if( pDocSh && nItemId )
     {
-        XFillAttrSetItem    aXFillSetItem( &pDocSh->GetPool() );
-        SfxItemSet&         rSet = aXFillSetItem.GetItemSet();
-
-        rSet.Put( XFillColorItem( GetItemText( nItemId ), GetItemColor( nItemId ) ) );
-        rSet.Put(XFillStyleItem( ( 1 == nItemId ) ? drawing::FillStyle_NONE : drawing::FillStyle_SOLID ) );
+        uno::Sequence<beans::NamedValue> props(2);
+        XFillColorItem const color(GetItemText(nItemId), GetItemColor(nItemId));
+        props[0].Name = "FillColor";
+        color.QueryValue(props[0].Value, 0);
+        XFillStyleItem const style((1 == nItemId)
+                ? drawing::FillStyle_NONE
+                : drawing::FillStyle_SOLID);
+        props[1].Name = "FillStyle";
+        style.QueryValue(props[1].Value, 0);
 
         EndSelection();
-        ( new SvxColorValueSetData( aXFillSetItem ) )->StartDrag( this, DND_ACTION_COPY );
+        ( new SvxColorValueSetData(props) )->StartDrag( this, DND_ACTION_COPY );
         ReleaseMouse();
     }
 }
commit ba5d56afd88ba29ba7f222d15f4b9046011cc38e
Author:     Michael Stahl <Michael.Stahl at cib.de>
AuthorDate: Sat Oct 27 19:56:00 2018 +0200
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Sun Oct 28 11:34:11 2018 +0100

    tdf#120376 sd: fix duplicated styles on copy/paste
    
    Unfortunately the comparison was inverted, so a style is copied
    iff it already exists, which is clearly the reviewer's fault...
    
    (regression from 57db6e24b5ad43d447c30e44a112c74c7e75b46b)
    
    Change-Id: I3425982feb08e980eca9243cc16120897b65a70f
    Reviewed-on: https://gerrit.libreoffice.org/62436
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>
    (cherry picked from commit be9f3db2306150a37ef18e4ccc8d8f4a1934c5c1)
    Reviewed-on: https://gerrit.libreoffice.org/62452
    Reviewed-by: Armin Le Grand <Armin.Le.Grand at cib.de>

diff --git a/sd/source/core/stlpool.cxx b/sd/source/core/stlpool.cxx
index c627970fd4e2..aa3d1de8a89a 100644
--- a/sd/source/core/stlpool.cxx
+++ b/sd/source/core/stlpool.cxx
@@ -652,7 +652,7 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
             pExistingSheet =
                 GetStyleSheetByPositionInIndex(aSheetsWithName.front()).get();
             if (!rRenameSuffix.isEmpty() &&
-                pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false))
+                !pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false))
             {
                 // we have found a sheet with the same name, but different contents. Try to find a new name.
                 // If we already have a sheet with the new name, and it is equal to the one in the source pool,
@@ -664,7 +664,8 @@ void SdStyleSheetPool::CopySheets(SdStyleSheetPool& rSourcePool, SfxStyleFamily
                     aTmpName = aName + rRenameSuffix + OUString::number(nSuffix);
                     pExistingSheet = Find(aTmpName, eFamily);
                     nSuffix++;
-                } while( pExistingSheet && pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false) );
+                } while (pExistingSheet &&
+                        !pExistingSheet->GetItemSet().Equals(xSheet->GetItemSet(), false));
                 aName = aTmpName;
                 bAddToList = true;
             }
commit 6720da69043a5ca206e9feac8396335e7b0af793
Author:     Jan-Marek Glogowski <glogow at fbihome.de>
AuthorDate: Tue Oct 23 19:42:54 2018 +0000
Commit:     Michael Stahl <Michael.Stahl at cib.de>
CommitDate: Fri Oct 26 21:39:02 2018 +0200

    tdf#120807 check for valid ImplGetWindowImpl()
    
    Change-Id: Ia1135d11990abc303849bd1b6a549c82008c79de
    Reviewed-on: https://gerrit.libreoffice.org/62260
    Tested-by: Jenkins
    Reviewed-by: Jan-Marek Glogowski <glogow at fbihome.de>
    (cherry picked from commit db0051744330d82986e8f2629a027bc4a5dc1b4a)
    Reviewed-on: https://gerrit.libreoffice.org/62280
    Reviewed-by: Michael Stahl <Michael.Stahl at cib.de>

diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx
index bf64ef132cc7..f8716f2135b5 100644
--- a/vcl/source/window/winproc.cxx
+++ b/vcl/source/window/winproc.cxx
@@ -1072,7 +1072,7 @@ static bool ImplHandleKey( vcl::Window* pWindow, MouseNotifyEvent nSVEvent,
     }
 
     // #105591# send keyinput to parent if we are a floating window and the key was not processed yet
-    if( !bRet && pWindow->ImplGetWindowImpl()->mbFloatWin && pWindow->GetParent() && (pWindow->ImplGetWindowImpl()->mpFrame != pWindow->GetParent()->ImplGetWindowImpl()->mpFrame) )
+    if( !bRet && pWindow->ImplGetWindowImpl() && pWindow->ImplGetWindowImpl()->mbFloatWin && pWindow->GetParent() && (pWindow->ImplGetWindowImpl()->mpFrame != pWindow->GetParent()->ImplGetWindowImpl()->mpFrame) )
     {
         pChild = pWindow->GetParent();
 


More information about the Libreoffice-commits mailing list