[Libreoffice-commits] core.git: Branch 'private/jmux/tdf#102010' - 66 commits - animations/source basctl/source basic/qa basic/source binaryurp/source bridges/source chart2/source compilerplugins/clang configure.ac connectivity/source cui/source dbaccess/source desktop/qa desktop/source desktop/uiconfig desktop/UIConfig_deployment.mk download.lst dtrans/source editeng/source external/libmwaw external/poppler helpcompiler/source helpcontent2 icon-themes/elementary icon-themes/galaxy include/basic include/o3tl include/sfx2 include/svl include/svx include/unotools include/vcl l10ntools/source oox/source reportdesign/source sal/workben sc/CppunitTest_sc_range_test.mk sc/inc sc/Module_sc.mk sc/qa sc/source sd/source sfx2/source starmath/inc starmath/source svl/source svtools/source svx/source sw/CppunitTest_sw_dialogs_test_2.mk sw/CppunitTest_sw_mailmerge.mk sw/inc sw/qa sw/source sw/uiconfig toolkit/source tools/source ucb/source unotools/source unoxml/source vbahelper/source vcl/headless vcl/inc vcl /opengl vcl/source vcl/unx writerfilter/source xmlsecurity/source

Jan-Marek Glogowski glogow at fbihome.de
Thu Nov 24 13:05:54 UTC 2016


Rebased ref, commits from common ancestor:
commit 268aaaf033bc12ad23e2078256d0781fb4bea70f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Thu Nov 24 13:52:23 2016 +0100

    MM UNO always print single files to printer
    
    Fix a missing hunk from e0ad036eed6b151ea81311fcf9ba46f1726b103c,
    which causes assertion, if MM is used via UNO.
    
    Change-Id: Ia0cd6053838adc6f0a4ce93902f06423849bf851

diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 0107496..32e2fd1 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -693,7 +693,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
             // #i25686# printing should not be done asynchronously to prevent dangling offices
             // when mail merge is called as command line macro
             aMergeDesc.aPrintOptions = m_aPrintSettings;
-            aMergeDesc.bCreateSingleFile = false;
+            aMergeDesc.bCreateSingleFile = true;
         }
         break;
     case MailMergeType::SHELL:
commit e867db8e16b530bce4ef0ee6cfbd02f3e47e2390
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Tue Oct 4 10:13:24 2016 +0000

    tdf#102010 Never overwrite MM files via UNO
    
    Fixes the regression introduced by
      commit e637b6743a506ef74c93ccbe15ab6642f3baa34f
    
    This commit removed the crazy bSubjectIsFilename handling,
    where I didn't understood the case of bSubjectIsFilename
    and a user supplied prefix.
    
    Mail merge to files never overwrites an existing document,
    but there is the special case, when a user selects a target
    filename in the MM dialog for single file MM.
    
    Should be fixed by a successive commmit, reverting this and
    removing an existing file before starting the MM job.
    
    Change-Id: Idda487023e6984de9c1e701fc088a6b7f92e9847

diff --git a/sw/CppunitTest_sw_mailmerge.mk b/sw/CppunitTest_sw_mailmerge.mk
index 693a5e2..8d2a3f8 100644
--- a/sw/CppunitTest_sw_mailmerge.mk
+++ b/sw/CppunitTest_sw_mailmerge.mk
@@ -21,6 +21,7 @@ $(eval $(call gb_CppunitTest_use_libraries,sw_mailmerge, \
     sfx \
     sw \
     test \
+    tl \
     unotest \
     utl \
 ))
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 6078b27..b124106 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -162,7 +162,23 @@ struct SwMergeDescriptor
      * @defgroup file Mail merge as File settings
      * @addtogroup file
      * @{ */
-    OUString                                            sPath;
+
+    /**
+     * Basename incl. the path for the generated files.
+     *
+     * The final filename will be created by concating a number to prevent
+     * overwriting an existing file and the extension based on the filter
+     * settings.
+     */
+    OUString                                            sPrefix;
+    /**
+     * Use the sPrefix as the target filename also overwriting an existing
+     * target file.
+     *
+     * Just used for the internal mail merge dialogs as mail merge never
+     * overwrites existing files (see SwDBManager::ExecuteFormLetter).
+     */
+    bool                                                bPrefixIsFilename;
     /** @} */
 
     /**
@@ -205,6 +221,7 @@ struct SwMergeDescriptor
         rSh(rShell),
         rDescriptor(rDesc),
         bCreateSingleFile( false ),
+        bPrefixIsFilename( false ),
         bSendAsHTML( true ),
         bSendAsAttachment( false ),
         pMailMergeConfigItem( nullptr )
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index 7d45b17..0c35652 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -25,6 +25,8 @@
 #include <com/sun/star/sdbc/XRowSet.hpp>
 #include <com/sun/star/sdbcx/XRowLocate.hpp>
 
+#include <tools/urlobj.hxx>
+
 #include <wrtsh.hxx>
 #include <ndtxt.hxx>
 #include <swdtflvr.hxx>
@@ -145,7 +147,8 @@ public:
                                          ( OUString( m_directories.getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(filename)) ) ) ) );
         mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DATA_SOURCE_NAME ), uno::Any( aDBName ) ) );
         mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_URL ), uno::Any( aWorkDir ) ) );
-        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_PREFIX ), uno::Any( aPrefix )) );
+        if (file)
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_PREFIX ), uno::Any( aPrefix )) );
 
         if (bPrefixIsColumn)
             mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_FROM_COLUMN ), uno::Any( true ) ) );
@@ -173,7 +176,7 @@ public:
 
     }
 
-    void executeMailMerge()
+    void executeMailMerge( bool bDontLoadResult = false )
     {
         uno::Sequence< beans::NamedValue > aSeqMailMergeArgs = comphelper::containerToSequence( mMMargs );
         uno::Any res = mxJob->execute( aSeqMailMergeArgs );
@@ -196,6 +199,8 @@ public:
                 bOk &= rValue >>= mnCurOutputType;
             else if (rName == UNO_NAME_FILE_NAME_FROM_COLUMN)
                 bOk &= rValue >>= bMMFilenameFromColumn;
+            else if (rName == UNO_NAME_DOCUMENT_URL)
+                bOk &= rValue >>= msMailMergeDocumentURL;
         }
 
         CPPUNIT_ASSERT(bOk);
@@ -214,7 +219,7 @@ public:
         else
         {
             CPPUNIT_ASSERT(res == true);
-            if( !bMMFilenameFromColumn )
+            if( !bMMFilenameFromColumn && !bDontLoadResult )
                 loadMailMergeDocument( 0 );
         }
     }
@@ -252,7 +257,17 @@ public:
     */
     void loadMailMergeDocument( int number )
     {
-        OUString name = msMailMergeOutputPrefix + OUString::number( number ) + ".odt";
+        OUString name;
+        if (!msMailMergeOutputPrefix.isEmpty())
+            name = msMailMergeOutputPrefix;
+        else
+        {
+            INetURLObject aURLObj;
+            aURLObj.SetSmartProtocol( INetProtocol::File );
+            aURLObj.SetSmartURL( msMailMergeDocumentURL );
+            name = aURLObj.GetBase();
+        }
+        name += OUString::number( number ) + ".odt";
         loadMailMergeDocument( name );
     }
 
@@ -262,6 +277,7 @@ protected:
 
     uno::Reference< css::task::XJob > mxJob;
     std::vector< beans::NamedValue > mMMargs;
+    OUString msMailMergeDocumentURL;
     OUString msMailMergeOutputURL;
     OUString msMailMergeOutputPrefix;
     sal_Int16 mnCurOutputType;
@@ -603,5 +619,27 @@ DECLARE_FILE_MAILMERGE_TEST_COLUMN(testDirMailMerge, "simple-mail-merge.odt", "1
     }
 }
 
+DECLARE_FILE_MAILMERGE_TEST(testTdf102010, "empty.odt", "10-testing-addresses.ods", "testing-addresses")
+{
+    // Create "correct" automatic filename for non-user-supplied-prefix
+    for (auto aNamedValueIter = mMMargs.begin(); aNamedValueIter != mMMargs.end();)
+    {
+        if ( aNamedValueIter->Name == UNO_NAME_FILE_NAME_PREFIX )
+            aNamedValueIter = mMMargs.erase( aNamedValueIter );
+        else
+        {
+            std::cout << aNamedValueIter->Name << ": " << aNamedValueIter->Value << std::endl;
+            ++aNamedValueIter;
+        }
+    }
+    mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_SAVE_AS_SINGLE_FILE ), uno::Any( true ) ) );
+
+    // Generate correct mail merge result filename
+    executeMailMerge();
+    // Don't overwrite previous result
+    executeMailMerge( true );
+    loadMailMergeDocument( 1 );
+}
+
 CPPUNIT_PLUGIN_IMPLEMENT();
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 1a3e035..398486c 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -1098,11 +1098,13 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
     bool bCheckSingleFile_ = rMergeDescriptor.bCreateSingleFile;
     if( bMT_EMAIL )
     {
+        assert( !rMergeDescriptor.bPrefixIsFilename );
         assert( bMT_EMAIL && !bCheckSingleFile_ );
         bCheckSingleFile_ = false;
     }
     else if( bMT_SHELL || bMT_PRINTER )
     {
+        assert( !rMergeDescriptor.bPrefixIsFilename );
         assert( (bMT_SHELL || bMT_PRINTER) && bCheckSingleFile_ );
         bCheckSingleFile_ = true;
     }
@@ -1318,7 +1320,7 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
         // create a new temporary file name - only done once in case of bCreateSingleFile
         if( bNeedsTempFiles && ( !bWorkDocInitialized || !bCreateSingleFile ))
         {
-            OUString sPath = rMergeDescriptor.sPath;
+            OUString sPrefix = rMergeDescriptor.sPrefix;
             OUString sLeading;
 
             //#i97667# if the name is from a database field then it will be used _as is_
@@ -1331,14 +1333,14 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             }
             else
             {
-                INetURLObject aEntry( sPath );
+                INetURLObject aEntry( sPrefix );
                 sLeading = aEntry.GetBase();
                 aEntry.removeSegment();
-                sPath = aEntry.GetMainURL( INetURLObject::NO_DECODE );
+                sPrefix = aEntry.GetMainURL( INetURLObject::NO_DECODE );
             }
 
             OUString sExt(comphelper::string::stripStart(pStoreToFilter->GetDefaultExtension(), '*'));
-            aTempFile.reset( new utl::TempFile(sLeading, sColumnData.isEmpty(), &sExt, &sPath, true) );
+            aTempFile.reset( new utl::TempFile(sLeading, sColumnData.isEmpty(), &sExt, &sPrefix, true) );
             if( !aTempFile->IsValid() )
             {
                 ErrorHandler::HandleError( ERRCODE_IO_NOTSUPPORTED );
@@ -1559,11 +1561,11 @@ bool SwDBManager::MergeMailFiles(SwWrtShell* pSourceShell,
             // save merged document
             assert( aTempFile.get() );
             INetURLObject aTempFileURL;
-            if( rMergeDescriptor.sPath.isEmpty() )
+            if( rMergeDescriptor.sPrefix.isEmpty() || !rMergeDescriptor.bPrefixIsFilename )
                 aTempFileURL.SetURL( aTempFile->GetURL() );
             else
             {
-                aTempFileURL.SetURL( rMergeDescriptor.sPath );
+                aTempFileURL.SetURL( rMergeDescriptor.sPrefix );
                 // remove the unneeded temporary file
                 aTempFile->EnableKillingFile();
             }
@@ -2863,7 +2865,8 @@ void SwDBManager::ExecuteFormLetter( SwWrtShell& rSh,
         SwMergeDescriptor aMergeDesc( pImpl->pMergeDialog->GetMergeType(), rSh, aDescriptor );
         aMergeDesc.sSaveToFilter = pImpl->pMergeDialog->GetSaveFilter();
         aMergeDesc.bCreateSingleFile = pImpl->pMergeDialog->IsSaveSingleDoc();
-        aMergeDesc.sPath = pImpl->pMergeDialog->GetTargetURL();
+        aMergeDesc.bPrefixIsFilename = aMergeDesc.bCreateSingleFile;
+        aMergeDesc.sPrefix = pImpl->pMergeDialog->GetTargetURL();
         if( !aMergeDesc.bCreateSingleFile && pImpl->pMergeDialog->IsGenerateFromDataBase() )
         {
             aMergeDesc.sDBcolumn = pImpl->pMergeDialog->GetColumnName();
diff --git a/sw/source/uibase/uno/unomailmerge.cxx b/sw/source/uibase/uno/unomailmerge.cxx
index 49aaacc..0107496 100644
--- a/sw/source/uibase/uno/unomailmerge.cxx
+++ b/sw/source/uibase/uno/unomailmerge.cxx
@@ -738,7 +738,7 @@ uno::Any SAL_CALL SwXMailMerge::execute(
                 aPath += aCurFileNamePrefix;
             }
 
-            aMergeDesc.sPath = aPath;
+            aMergeDesc.sPrefix = aPath;
             aMergeDesc.sSaveToFilter = m_sSaveFilter;
             aMergeDesc.sSaveToFilterOptions = m_sSaveFilterOptions;
             aMergeDesc.aSaveToFilterData = m_aSaveFilterData;
commit 9ae659ebf4fa906221a77b5d45d878ea5336125d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Mon Oct 3 21:51:56 2016 +0200

    MM allow easier manipulation of MM test arguments
    
    Keep the beans::NamedValue vector around and convert it to a
    uno::Sequence just before executing the mail merge job.
    
    Change-Id: Ib2b4863337af20fb4423cc1b4ea4223d66d63ae5

diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index bb4ec55..7d45b17 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -138,29 +138,29 @@ public:
         uno::Reference< task::XJob > xJob( getMultiServiceFactory()->createInstance( "com.sun.star.text.MailMerge" ), uno::UNO_QUERY_THROW );
         mxJob.set( xJob );
 
-        std::vector< beans::NamedValue > args;
+        mMMargs.reserve( 15 );
 
-        args.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_TYPE ), uno::Any( file ? text::MailMergeType::FILE : text::MailMergeType::SHELL ) ) );
-        args.push_back( beans::NamedValue( OUString( UNO_NAME_DOCUMENT_URL ), uno::Any(
+        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_TYPE ), uno::Any( file ? text::MailMergeType::FILE : text::MailMergeType::SHELL ) ) );
+        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DOCUMENT_URL ), uno::Any(
                                          ( OUString( m_directories.getURLFromSrc(mpTestDocumentPath) + OUString::createFromAscii(filename)) ) ) ) );
-        args.push_back( beans::NamedValue( OUString( UNO_NAME_DATA_SOURCE_NAME ), uno::Any( aDBName ) ) );
-        args.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_URL ), uno::Any( aWorkDir ) ) );
-        args.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_PREFIX ), uno::Any( aPrefix )) );
+        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DATA_SOURCE_NAME ), uno::Any( aDBName ) ) );
+        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_OUTPUT_URL ), uno::Any( aWorkDir ) ) );
+        mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_PREFIX ), uno::Any( aPrefix )) );
 
         if (bPrefixIsColumn)
-            args.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_FROM_COLUMN ), uno::Any( true ) ) );
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_FILE_NAME_FROM_COLUMN ), uno::Any( true ) ) );
 
         if (tablename)
         {
-            args.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND_TYPE ), uno::Any( sdb::CommandType::TABLE ) ) );
-            args.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND ), uno::Any( OUString::createFromAscii(tablename) ) ) );
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND_TYPE ), uno::Any( sdb::CommandType::TABLE ) ) );
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_DAD_COMMAND ), uno::Any( OUString::createFromAscii(tablename) ) ) );
         }
 
         if (nDataSets > 0)
         {
             uno::Reference< sdbc::XRowSet > xCurResultSet = getXResultFromDataset( tablename, aDBName );
             uno::Reference< sdbcx::XRowLocate > xCurRowLocate( xCurResultSet, uno::UNO_QUERY );
-            args.push_back( beans::NamedValue( OUString( UNO_NAME_RESULT_SET ), uno::Any( xCurResultSet ) ) );
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_RESULT_SET ), uno::Any( xCurResultSet ) ) );
             std::vector< uno::Any > vResult;
             vResult.reserve( nDataSets );
             sal_Int32 i;
@@ -168,20 +168,20 @@ public:
             {
                 vResult.push_back( uno::Any( xCurRowLocate->getBookmark() ) );
             }
-            args.push_back( beans::NamedValue( OUString( UNO_NAME_SELECTION ), uno::Any( comphelper::containerToSequence(vResult) ) ) );
+            mMMargs.push_back( beans::NamedValue( OUString( UNO_NAME_SELECTION ), uno::Any( comphelper::containerToSequence(vResult) ) ) );
         }
 
-        mSeqMailMergeArgs = comphelper::containerToSequence( args );
     }
 
     void executeMailMerge()
     {
-        uno::Any res = mxJob->execute( mSeqMailMergeArgs );
+        uno::Sequence< beans::NamedValue > aSeqMailMergeArgs = comphelper::containerToSequence( mMMargs );
+        uno::Any res = mxJob->execute( aSeqMailMergeArgs );
 
-        const beans::NamedValue *pArguments = mSeqMailMergeArgs.getConstArray();
+        const beans::NamedValue *pArguments = aSeqMailMergeArgs.getConstArray();
         bool bOk = true;
         bool bMMFilenameFromColumn = false;
-        sal_Int32 nArgs = mSeqMailMergeArgs.getLength();
+        sal_Int32 nArgs = aSeqMailMergeArgs.getLength();
 
         for (sal_Int32 i = 0; i < nArgs; ++i) {
             const OUString &rName  = pArguments[i].Name;
@@ -189,9 +189,9 @@ public:
 
             // all error checking was already done by the MM job execution
             if (rName == UNO_NAME_OUTPUT_URL)
-                bOk &= rValue >>= mailMergeOutputURL;
+                bOk &= rValue >>= msMailMergeOutputURL;
             else if (rName == UNO_NAME_FILE_NAME_PREFIX)
-                bOk &= rValue >>= mailMergeOutputPrefix;
+                bOk &= rValue >>= msMailMergeOutputPrefix;
             else if (rName == UNO_NAME_OUTPUT_TYPE)
                 bOk &= rValue >>= mnCurOutputType;
             else if (rName == UNO_NAME_FILE_NAME_FROM_COLUMN)
@@ -227,8 +227,8 @@ public:
         if (mnCurOutputType != text::MailMergeType::FILE)
             return nullptr;
 
-        OUString name = mailMergeOutputPrefix + OUString::number( 0 ) + ".odt";
-        return parseExportInternal( mailMergeOutputURL + "/" + name, rStreamName );
+        OUString name = msMailMergeOutputPrefix + OUString::number( 0 ) + ".odt";
+        return parseExportInternal( msMailMergeOutputURL + "/" + name, rStreamName );
     }
 
     void loadMailMergeDocument( const OUString &filename )
@@ -239,7 +239,7 @@ public:
         // Output name early, so in the case of a hang, the name of the hanging input file is visible.
         std::cout << filename << ",";
         mnStartTime = osl_getGlobalTimer();
-        mxComponent = loadFromDesktop(mailMergeOutputURL + "/" + filename, "com.sun.star.text.TextDocument");
+        mxComponent = loadFromDesktop(msMailMergeOutputURL + "/" + filename, "com.sun.star.text.TextDocument");
         CPPUNIT_ASSERT( mxComponent.is());
         OString name2 = OUStringToOString( filename, RTL_TEXTENCODING_UTF8 );
         discardDumpedLayout();
@@ -252,7 +252,7 @@ public:
     */
     void loadMailMergeDocument( int number )
     {
-        OUString name = mailMergeOutputPrefix + OUString::number( number ) + ".odt";
+        OUString name = msMailMergeOutputPrefix + OUString::number( number ) + ".odt";
         loadMailMergeDocument( name );
     }
 
@@ -261,9 +261,9 @@ protected:
     int documentStartPageNumber( int document ) const;
 
     uno::Reference< css::task::XJob > mxJob;
-    uno::Sequence< beans::NamedValue > mSeqMailMergeArgs;
-    OUString mailMergeOutputURL;
-    OUString mailMergeOutputPrefix;
+    std::vector< beans::NamedValue > mMMargs;
+    OUString msMailMergeOutputURL;
+    OUString msMailMergeOutputPrefix;
     sal_Int16 mnCurOutputType;
     uno::Reference< lang::XComponent > mxMMComponent;
     const char* maMMtestFilename;
commit bdd108cd72e630189c360c5327c480c1d64d55b1
Author: Tomaž Vajngerl <tomaz.vajngerl at collabora.co.uk>
Date:   Wed Nov 23 17:01:46 2016 +0100

    tdf#103852 avoid clipboard deadlock
    
    Deallocate the XTransferable object async using AsyncCallback
    (that uses Application::PostUserEvent) which executes the
    callback in a thread-safe way on the main thread. This avoids
    a deadlock at deallocation so that the XTransferable.
    
    Modify AsyncCallback to not hold the SolarMutexGuard because
    Application::PostUserEvent is considered thread-safe.
    
    Document Application::PostUserEvent thread-safety
    
    Change-Id: I4237a1cf380e8be66b3eefc393a58bb4853bf4e1
    Reviewed-on: https://gerrit.libreoffice.org/31126
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Tomaž Vajngerl <quikee at gmail.com>

diff --git a/dtrans/source/win32/dtobj/XTDataObject.cxx b/dtrans/source/win32/dtobj/XTDataObject.cxx
index 3ca9325..1c13d34 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.cxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.cxx
@@ -25,8 +25,11 @@
 #include "DTransHelper.hxx"
 #include "TxtCnvtHlp.hxx"
 #include <com/sun/star/datatransfer/clipboard/XClipboardEx.hpp>
+#include "com/sun/star/awt/AsyncCallback.hpp"
+#include "com/sun/star/awt/XCallback.hpp"
 #include "FmtFilter.hxx"
 #include <comphelper/processfactory.hxx>
+#include <cppuhelper/implbase.hxx>
 
 #if defined _MSC_VER
 #pragma warning(push,1)
@@ -82,6 +85,28 @@ void SAL_CALL setupStgMedium( const FORMATETC& fetc,
         OSL_ASSERT( false );
 }
 
+/**
+   We need to destroy XTransferable in the main thread to avoid dead lock
+   when locking in the clipboard thread. So we transfer the ownership of the
+   XTransferable reference to this object and release it when the callback
+   is executed in main thread.
+*/
+class AsyncDereference : public cppu::WeakImplHelper<css::awt::XCallback>
+{
+    Reference<XTransferable> maTransferable;
+
+public:
+    AsyncDereference(css::uno::Reference<css::datatransfer::XTransferable> const & rTransferable)
+        : maTransferable(rTransferable)
+    {}
+
+    virtual void SAL_CALL notify(css::uno::Any const &)
+        throw (css::uno::RuntimeException, std::exception) override
+    {
+        maTransferable.set(nullptr);
+    }
+};
+
 // a helper class that will be thrown by the function validateFormatEtc
 
 class CInvalidFormatEtcException
@@ -174,12 +199,20 @@ CXTDataObject::CXTDataObject( const Reference< XComponentContext >& rxContext,
                               const Reference< XTransferable >& aXTransferable )
     : m_nRefCnt( 0 )
     , m_XTransferable( aXTransferable )
+    , m_XComponentContext( rxContext )
     , m_bFormatEtcContainerInitialized( false )
     , m_DataFormatTranslator( rxContext )
     , m_FormatRegistrar( rxContext, m_DataFormatTranslator )
 {
 }
 
+CXTDataObject::~CXTDataObject()
+{
+    css::awt::AsyncCallback::create(m_XComponentContext)->addCallback(
+        new AsyncDereference(m_XTransferable),
+        css::uno::Any());
+}
+
 // IUnknown->QueryInterface
 
 STDMETHODIMP CXTDataObject::QueryInterface( REFIID iid, LPVOID* ppvObject )
diff --git a/dtrans/source/win32/dtobj/XTDataObject.hxx b/dtrans/source/win32/dtobj/XTDataObject.hxx
index 8bf3c10..db3496d 100644
--- a/dtrans/source/win32/dtobj/XTDataObject.hxx
+++ b/dtrans/source/win32/dtobj/XTDataObject.hxx
@@ -64,7 +64,7 @@ class CXTDataObject : public IDataObject
 public:
     CXTDataObject( const css::uno::Reference< css::uno::XComponentContext >& rxContext,
                    const css::uno::Reference< css::datatransfer::XTransferable >& aXTransferable );
-    virtual ~CXTDataObject() {}
+    virtual ~CXTDataObject();
 
     // ole interface implementation
 
@@ -103,6 +103,7 @@ private:
 private:
     LONG m_nRefCnt;
     css::uno::Reference< css::datatransfer::XTransferable >      m_XTransferable;
+    css::uno::Reference< css::uno::XComponentContext>            m_XComponentContext;
     CFormatEtcContainer                                          m_FormatEtcContainer;
     bool                                                         m_bFormatEtcContainerInitialized;
     CDataFormatTranslator                                        m_DataFormatTranslator;
diff --git a/include/vcl/svapp.hxx b/include/vcl/svapp.hxx
index 2719224..9b930b3 100644
--- a/include/vcl/svapp.hxx
+++ b/include/vcl/svapp.hxx
@@ -776,9 +776,13 @@ public:
 
      User events allow for the deferreal of work to later in the main-loop - at idle.
 
+     Execution of the deferred work is thread-safe which means all the tasks are executed
+     serially, so no thread-safety locks between tasks are necessary.
+
      @param     rLink           Link to event callback function
      @param     pCaller         Pointer to data sent to the event by the caller. Optional.
      @param     bReferenceLink  If true - hold a VclPtr<> reference on the Link's instance.
+                                Taking the reference is guarded by a SolarMutexGuard.
 
      @return the event ID used to post the event.
     */
diff --git a/toolkit/source/awt/asynccallback.cxx b/toolkit/source/awt/asynccallback.cxx
index 95467f9..3860207 100644
--- a/toolkit/source/awt/asynccallback.cxx
+++ b/toolkit/source/awt/asynccallback.cxx
@@ -88,8 +88,7 @@ void SAL_CALL AsyncCallback::addCallback(const css::uno::Reference< css::awt::XC
 {
     if ( Application::IsInMain() )
     {
-        SolarMutexGuard aSolarGuard;
-
+        // NOTE: We don't need SolarMutexGuard here as Application::PostUserEvent is thread-safe
         CallbackData* pCallbackData = new CallbackData( xCallback, aData );
         Application::PostUserEvent( LINK( this, AsyncCallback, Notify_Impl ), pCallbackData );
     }
commit e190825b739712ba0c861d74fc1a589c7e94672d
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 12:01:57 2016 +0000

    coverity#1371267 Missing move assignment operator
    
    Change-Id: Iefcfd20ac17f24f4fc3faec72b15de6bfb42eeac

diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 7790f74..7c82b58 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -865,6 +865,17 @@ ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther)
     return *this;
 }
 
+ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr && rOther)
+{
+    if (mpPage != nullptr) {
+        mpPage->ReleaseRef();
+    }
+    mpPage = rOther.mpPage;
+    nPagePos = rOther.nPagePos;
+    rOther.mpPage = nullptr;
+    return *this;
+}
+
 static sal_uInt32 nValue;
 
 SvStream& connectivity::dbase::operator >> (SvStream &rStream, ONDXPage& rPage)
diff --git a/connectivity/source/inc/dbase/dindexnode.hxx b/connectivity/source/inc/dbase/dindexnode.hxx
index 3a0e58d..7adf900 100644
--- a/connectivity/source/inc/dbase/dindexnode.hxx
+++ b/connectivity/source/inc/dbase/dindexnode.hxx
@@ -97,6 +97,7 @@ namespace connectivity
             ~ONDXPagePtr();
             void Clear();
             ONDXPagePtr& operator=(ONDXPagePtr const & rRef);
+            ONDXPagePtr& operator=(ONDXPagePtr && rRef);
             bool Is() const { return mpPage != nullptr; }
 
             ONDXPage * operator ->() const { assert(mpPage != nullptr); return mpPage; }
commit 8ceb8b2d141a249127822bd511e66dd855fb1e59
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 11:43:38 2016 +0000

    Related: coverity#1371267 copy ctor broken, nPagePos not copied
    
    initially operator= was removed by
    
    commit a0a919d2b541c415ad9b81d2ee91895bf106e9bb
    Date:   Fri Oct 3 10:39:28 2014 +0200
    
        remove SvRefBase::QueryDelete
    
    and then operator= was restored by
    
    commit faa6455995966e41653204779d055b885b27fc4c
    Date:   Fri Oct 10 12:02:32 2014 +0200
    
        add copy constructor for ONDXPagePtr class
    
        which I forgot in commit a0a919d2b541c415ad9b81d2ee91895bf106e9bb
        "remove SvRefBase::QueryDelete"
    
    but nPagePos was missed
    
    Change-Id: I6497934d4a199f5ea94cf2da840c164910e7a826

diff --git a/connectivity/source/drivers/dbase/dindexnode.cxx b/connectivity/source/drivers/dbase/dindexnode.cxx
index 064660b..7790f74 100644
--- a/connectivity/source/drivers/dbase/dindexnode.cxx
+++ b/connectivity/source/drivers/dbase/dindexnode.cxx
@@ -858,6 +858,7 @@ ONDXPagePtr& ONDXPagePtr::operator=(ONDXPagePtr const & rOther)
     }
     ONDXPage * pOldObj = mpPage;
     mpPage = rOther.mpPage;
+    nPagePos = rOther.nPagePos;
     if (pOldObj != nullptr) {
         pOldObj->ReleaseRef();
     }
commit 9868cfb58ae833b54b671bb7a81db33b845251ac
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 10:04:24 2016 +0000

    coverity#1394416 ensure there's enough data to read
    
    an alternative attempt to silence coverity
    
    Change-Id: Ia62d1c9075ecee1657554a5f0705fc67656848fd

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index b2a1fe3..8b27a3f 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2550,7 +2550,8 @@ WW8PLCFx_Fc_FKP::WW8Fkp::WW8Fkp(const WW8Fib& rFib, SvStream* pSt,
                          of the new data
                         */
                         bool bExpand = IsExpandableSprm(nSpId);
-                        if ((IsReplaceAllSprm(nSpId) || bExpand) && aEntry.mnLen >= sizeof(sal_uInt32) + 2)
+                        const void* pEndAvailableData = maRawData + sizeof(maRawData);
+                        if ((IsReplaceAllSprm(nSpId) || bExpand) && aEntry.mpData + 2 + sizeof(sal_uInt32) <= pEndAvailableData)
                         {
                             sal_uInt32 nCurr = pDataSt->Tell();
                             sal_uInt32 nPos = SVBT32ToUInt32(aEntry.mpData + 2);
commit 7aa2b5a041df8e71a435cccbc79ee13799ec9138
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Nov 24 09:02:38 2016 +0100

    CompilerTest_compilerplugins_clang: fix this to work with clang-3.7
    
    Change-Id: I653b9c3aba53da421592b230bee3a9b69d3cb2d7

diff --git a/compilerplugins/clang/test/datamembershadow.cxx b/compilerplugins/clang/test/datamembershadow.cxx
index 663750a..24a0da9 100644
--- a/compilerplugins/clang/test/datamembershadow.cxx
+++ b/compilerplugins/clang/test/datamembershadow.cxx
@@ -8,6 +8,8 @@
  */
 
 
+// '#if CLANG_VERSION >= 30800' covers large parts of compilerplugins/clang/datamembershadow.cxx
+#if (__clang_major__ == 3 && __clang_minor__ >= 8) || __clang_major__ > 3
 struct Bar {
     int x; // expected-note {{superclass member here [loplugin:datamembershadow]}}
 };
@@ -15,5 +17,8 @@ struct Bar {
 struct Foo : public Bar {
     int x; // expected-error {{data member x is shadowing member in superclass, through inheritance path Foo->Bar [loplugin:datamembershadow]}}
 };
+#else
+// expected-no-diagnostics
+#endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
commit 8a34ff14f18da0df261ae8f1ca3f23de157706a1
Author: Justin Luth <justin_luth at sil.org>
Date:   Wed Nov 23 08:16:17 2016 +0300

    tdf#41542 globally allow padding without borders: UI
    
    This is the final fix for tdf#41542 - enabling the UI to adjust the
    padding without requiring an enabled border line.
    
    Because almost every document edited by LO5.3 will gain the setting
    ALLOW_PADDING_WITHOUT_BORDERS = false, it cannot be kept as a
    preventative compatibility setting. Otherwise any document edited
    in 5.3 would act differently from any other document - not being
    allowed to modify borderless padding for frames, even in 5.4+.
    That would be a very confusing corner-case that is best avoided,
    so removing all compatibility code (which currently has no use).
    
    So, if an AllowPaddingWithoutBorders=false compatibility
    situation is ever required in the future, do not
    resurrect the name ALLOW_PADDING_WITHOUT_BORDRES. Additionally, code
    will also be needed to send the compatibility setting for
    each type of border (page, paragraph, character, header, frames, image).
    See commit f013d4a1f4073cda735befd6e446bee35f3db65c as an example
    of how to implement that for frames.
    
    This commit means there is a lot of dead code now (m_bBorderDist and
    mbAllowPaddingWithoutBorders are always true). LO5.7 seems like a good
    target to clean that up - to allow time to easily fix any regressions.
    
    Change-Id: I2d2091fa34f8b178a59347b35a81c944c9b24ed7
    Reviewed-on: https://gerrit.libreoffice.org/31105
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/cui/source/tabpages/border.cxx b/cui/source/tabpages/border.cxx
index f989a7c..d67df7f 100644
--- a/cui/source/tabpages/border.cxx
+++ b/cui/source/tabpages/border.cxx
@@ -102,7 +102,7 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
         mbTLBREnabled( false ),
         mbBLTREnabled( false ),
         mbUseMarginItem( false ),
-        mbAllowPaddingWithoutBorders( false ),
+        mbAllowPaddingWithoutBorders( true ),
         mbSync(true),
         mbRemoveAdjacentCellBorders( false ),
         bIsCalcDoc( false )
@@ -181,11 +181,6 @@ SvxBorderTabPage::SvxBorderTabPage(vcl::Window* pParent, const SfxItemSet& rCore
         m_pLineWidthMF->SetValue(p->GetValue());
     }
 
-    if (rCoreAttrs.HasItem(SID_ALLOW_PADDING_WITHOUT_BORDERS, &pItem))
-    {
-        mbAllowPaddingWithoutBorders = static_cast<const SfxBoolItem*>(pItem)->GetValue();
-    }
-
     // set metric
     FieldUnit eFUnit = GetModuleFieldUnit( rCoreAttrs );
 
diff --git a/include/svx/svxids.hrc b/include/svx/svxids.hrc
index 8a7f7c5..6f6aaa5 100644
--- a/include/svx/svxids.hrc
+++ b/include/svx/svxids.hrc
@@ -964,7 +964,7 @@
 #define FN_SVX_SET_NUMBER                               ( SID_SVX_START + 1136 )
 #define FN_SVX_SET_BULLET                               ( SID_SVX_START + 1137 )
 #define FN_SVX_SET_OUTLINE                              ( SID_SVX_START + 1138 )
-#define SID_ALLOW_PADDING_WITHOUT_BORDERS               ( SID_SVX_START + 1139 )
+
 #define SID_ATTR_BORDER_STYLES                          ( SID_SVX_START + 1140 )
 #define SID_ATTR_BORDER_DEFAULT_WIDTH                   ( SID_SVX_START + 1141 )
 // 1142 is used by editeng (SID_ATTR_CHAR_GRABBAG)
diff --git a/sw/inc/IDocumentSettingAccess.hxx b/sw/inc/IDocumentSettingAccess.hxx
index 2827567..f16ae42 100644
--- a/sw/inc/IDocumentSettingAccess.hxx
+++ b/sw/inc/IDocumentSettingAccess.hxx
@@ -39,7 +39,6 @@ enum class DocumentSettingId
     ADD_FLY_OFFSETS,
     ADD_VERTICAL_FLY_OFFSETS,
 
-    ALLOW_PADDING_WITHOUT_BORDERS,
     OLD_NUMBERING,
 
     ADD_EXT_LEADING,
diff --git a/sw/source/core/doc/DocumentSettingManager.cxx b/sw/source/core/doc/DocumentSettingManager.cxx
index 78201b6..5cf29c0 100644
--- a/sw/source/core/doc/DocumentSettingManager.cxx
+++ b/sw/source/core/doc/DocumentSettingManager.cxx
@@ -55,7 +55,6 @@ sw::DocumentSettingManager::DocumentSettingManager(SwDoc &rDoc)
 
     mbAddFlyOffsets(false),
     mbAddVerticalFlyOffsets(false),
-    mbAllowPaddingWithoutBorders( false ),
     mbUseHiResolutionVirtualDevice(true),
     mbMathBaselineAlignment(false), // default for *old* documents is 'off'
     mbStylesNoDefault(false),
@@ -147,7 +146,6 @@ bool sw::DocumentSettingManager::get(/*[in]*/ DocumentSettingId id) const
         case DocumentSettingId::TAB_COMPAT: return mbTabCompat; //(n8Dummy1 & DUMMY_TAB_COMPAT);
         case DocumentSettingId::ADD_FLY_OFFSETS: return mbAddFlyOffsets; //(n8Dummy2 & DUMMY_ADD_FLY_OFFSETS);
         case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS: return mbAddVerticalFlyOffsets;
-        case DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS: return mbAllowPaddingWithoutBorders;
         case DocumentSettingId::ADD_EXT_LEADING: return mbAddExternalLeading; //(n8Dummy2 & DUMMY_ADD_EXTERNAL_LEADING);
         case DocumentSettingId::USE_VIRTUAL_DEVICE: return mbUseVirtualDevice; //(n8Dummy1 & DUMMY_USE_VIRTUAL_DEVICE);
         case DocumentSettingId::USE_HIRES_VIRTUAL_DEVICE: return mbUseHiResolutionVirtualDevice; //(n8Dummy2 & DUMMY_USE_HIRES_VIR_DEV);
@@ -223,9 +221,6 @@ void sw::DocumentSettingManager::set(/*[in]*/ DocumentSettingId id, /*[in]*/ boo
         case DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS:
             mbAddVerticalFlyOffsets = value;
             break;
-        case DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS:
-            mbAllowPaddingWithoutBorders = value;
-            break;
         case DocumentSettingId::ADD_EXT_LEADING:
             mbAddExternalLeading = value;
             break;
diff --git a/sw/source/core/inc/DocumentSettingManager.hxx b/sw/source/core/inc/DocumentSettingManager.hxx
index 6927f83..ba52cbf 100644
--- a/sw/source/core/inc/DocumentSettingManager.hxx
+++ b/sw/source/core/inc/DocumentSettingManager.hxx
@@ -109,7 +109,6 @@ class DocumentSettingManager :
     bool mbUseVirtualDevice                 : 1;
     bool mbAddFlyOffsets                    : 1;
     bool mbAddVerticalFlyOffsets            : 1;
-    bool mbAllowPaddingWithoutBorders       : 1;    // tdf#41542
     bool mbAddExternalLeading               : 1;
     bool mbUseHiResolutionVirtualDevice     : 1;
     bool mbOldLineSpacing                   : 1;    // #i11859#
diff --git a/sw/source/core/layout/frmtool.cxx b/sw/source/core/layout/frmtool.cxx
index 6c47053..ae89101 100644
--- a/sw/source/core/layout/frmtool.cxx
+++ b/sw/source/core/layout/frmtool.cxx
@@ -1829,8 +1829,7 @@ SwBorderAttrs::SwBorderAttrs(const SwModify *pMod, const SwFrame *pConstructor)
     m_bCachedJoinedWithPrev = false;
     m_bCachedJoinedWithNext = false;
 
-    bool bAllowPaddingWithoutBorders = true;
-    m_bBorderDist = bool(pConstructor->GetType() & SwFrameType::Cell) || bAllowPaddingWithoutBorders;
+    m_bBorderDist = true;
 }
 
 SwBorderAttrs::~SwBorderAttrs()
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index 10094cf..4bc3a34 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -1959,7 +1959,6 @@ void SwWW8ImplReader::ImportDop()
     m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::TAB_OVER_MARGIN, true);
     m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::SURROUND_TEXT_WRAP_SMALL, true);
     m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::PROP_LINE_SPACING_SHRINKS_FIRST_LINE, true);
-    m_rDoc.getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS, true);
 
     // COMPATIBILITY FLAGS END
 
diff --git a/sw/source/uibase/shells/frmsh.cxx b/sw/source/uibase/shells/frmsh.cxx
index 1fe81f86..66fd5a5 100644
--- a/sw/source/uibase/shells/frmsh.cxx
+++ b/sw/source/uibase/shells/frmsh.cxx
@@ -405,7 +405,6 @@ void SwFrameShell::Execute(SfxRequest &rReq)
                     SID_COLOR_TABLE,        SID_PATTERN_LIST,                        // [10179
 
                     SID_HTML_MODE,          SID_HTML_MODE,                          // [10414
-                    SID_ALLOW_PADDING_WITHOUT_BORDERS, SID_ALLOW_PADDING_WITHOUT_BORDERS,   // [11139
                     FN_GET_PRINT_AREA,      FN_GET_PRINT_AREA,                      // [21032
                     FN_SURROUND,            FN_HORI_ORIENT,                         // [21303
                     FN_SET_FRM_NAME,        FN_KEEP_ASPECT_RATIO,                   // [21306
@@ -457,9 +456,6 @@ void SwFrameShell::Execute(SfxRequest &rReq)
                 const uno::Reference < embed::XEmbeddedObject > xObj( rSh.GetOleRef() );
                 aSet.Put( SfxBoolItem( FN_OLE_IS_MATH, xObj.is() && SotExchange::IsMath( xObj->getClassID() ) ) );
 
-                aSet.Put( SfxBoolItem( SID_ALLOW_PADDING_WITHOUT_BORDERS,
-                        rSh.GetDoc()->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS) ) );
-
                 OString sDefPage;
                 if(pArgs && pArgs->GetItemState(FN_FORMAT_FRAME_DLG, false, &pItem) == SfxItemState::SET)
                     sDefPage = OUStringToOString(static_cast<const SfxStringItem *>(pItem)->GetValue(), RTL_TEXTENCODING_UTF8);
diff --git a/sw/source/uibase/uno/SwXDocumentSettings.cxx b/sw/source/uibase/uno/SwXDocumentSettings.cxx
index 3d6cebe..22a82a3 100644
--- a/sw/source/uibase/uno/SwXDocumentSettings.cxx
+++ b/sw/source/uibase/uno/SwXDocumentSettings.cxx
@@ -90,7 +90,6 @@ enum SwDocumentSettingsPropertyHandles
     HANDLE_IS_LABEL_DOC,
     HANDLE_IS_ADD_FLY_OFFSET,
     HANDLE_IS_ADD_VERTICAL_FLY_OFFSET,
-    HANDLE_ALLOW_PADDING_WITHOUT_BORDERS,
     HANDLE_IS_ADD_EXTERNAL_LEADING,
     HANDLE_OLD_NUMBERING,
     HANDLE_OUTLINELEVEL_YIELDS_NUMBERING,
@@ -167,7 +166,6 @@ static MasterPropertySetInfo * lcl_createSettingsInfo()
         { OUString("IsLabelDocument"),            HANDLE_IS_LABEL_DOC,                    cppu::UnoType<bool>::get(),           0},
         { OUString("AddFrameOffsets"),            HANDLE_IS_ADD_FLY_OFFSET,               cppu::UnoType<bool>::get(),           0},
         { OUString("AddVerticalFrameOffsets"),    HANDLE_IS_ADD_VERTICAL_FLY_OFFSET,      cppu::UnoType<bool>::get(),           0},
-        { OUString("AllowPaddingWithoutBorders"), HANDLE_ALLOW_PADDING_WITHOUT_BORDERS,   cppu::UnoType<bool>::get(),           0},
         { OUString("AddExternalLeading"),         HANDLE_IS_ADD_EXTERNAL_LEADING,         cppu::UnoType<bool>::get(),           0},
         { OUString("UseOldNumbering"),            HANDLE_OLD_NUMBERING,                   cppu::UnoType<bool>::get(),           0},
         { OUString("OutlineLevelYieldsNumbering"), HANDLE_OUTLINELEVEL_YIELDS_NUMBERING, cppu::UnoType<bool>::get(),           0},
@@ -569,12 +567,6 @@ void SwXDocumentSettings::_setSingleValue( const comphelper::PropertyInfo & rInf
             mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS, bTmp);
         }
         break;
-        case HANDLE_ALLOW_PADDING_WITHOUT_BORDERS:
-        {
-            bool bTmp = *o3tl::doAccess<bool>(rValue);
-            mpDoc->getIDocumentSettingAccess().set(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS, bTmp);
-        }
-        break;
         case HANDLE_IS_ADD_EXTERNAL_LEADING:
         {
             bool bTmp = *o3tl::doAccess<bool>(rValue);
@@ -1063,11 +1055,6 @@ void SwXDocumentSettings::_getSingleValue( const comphelper::PropertyInfo & rInf
             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_VERTICAL_FLY_OFFSETS);
         }
         break;
-        case HANDLE_ALLOW_PADDING_WITHOUT_BORDERS:
-        {
-            rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ALLOW_PADDING_WITHOUT_BORDERS);
-        }
-        break;
         case HANDLE_IS_ADD_EXTERNAL_LEADING:
         {
             rValue <<= mpDoc->getIDocumentSettingAccess().get(DocumentSettingId::ADD_EXT_LEADING);
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index 6ff2f7a..3826b09 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -298,7 +298,6 @@ void WriterFilter::setTargetDocument(const uno::Reference< lang::XComponent >& x
     xSettings->setPropertyValue("TabOverMargin", uno::makeAny(true));
     xSettings->setPropertyValue("TreatSingleColumnBreakAsPageBreak", uno::makeAny(true));
     xSettings->setPropertyValue("PropLineSpacingShrinksFirstLine", uno::makeAny(true));
-    xSettings->setPropertyValue("AllowPaddingWithoutBorders", uno::makeAny(true));
 }
 
 void WriterFilter::setSourceDocument(const uno::Reference< lang::XComponent >& xDoc) throw (lang::IllegalArgumentException, uno::RuntimeException, std::exception)
commit 223607e0363230116d09e51b0025057e766ed022
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 24 11:28:54 2016 +0100

    loplugin:unnecessaryoverride (dtors) in unotools
    
    Change-Id: I14f10addc701be143b0482dc62d2e90a0862062d

diff --git a/unotools/source/config/configitem.cxx b/unotools/source/config/configitem.cxx
index f6957e4..b40d0cc 100644
--- a/unotools/source/config/configitem.cxx
+++ b/unotools/source/config/configitem.cxx
@@ -71,7 +71,6 @@ namespace utl{
             ConfigItem*                 pParent;
             const Sequence< OUString >  aPropertyNames;
             ConfigChangeListener_Impl(ConfigItem& rItem, const Sequence< OUString >& rNames);
-            virtual ~ConfigChangeListener_Impl() override;
 
         //XChangesListener
         virtual void SAL_CALL changesOccurred( const ChangesEvent& Event ) throw(RuntimeException, std::exception) override;
@@ -104,10 +103,6 @@ ConfigChangeListener_Impl::ConfigChangeListener_Impl(
 {
 }
 
-ConfigChangeListener_Impl::~ConfigChangeListener_Impl()
-{
-}
-
 static bool lcl_Find(
         const OUString& rTemp,
         const OUString* pCheckPropertyNames,
diff --git a/unotools/source/config/lingucfg.cxx b/unotools/source/config/lingucfg.cxx
index 96f2157..14f4898 100644
--- a/unotools/source/config/lingucfg.cxx
+++ b/unotools/source/config/lingucfg.cxx
@@ -158,7 +158,6 @@ class SvtLinguConfigItem : public utl::ConfigItem
 
 public:
     SvtLinguConfigItem();
-    virtual ~SvtLinguConfigItem() override;
 
     // utl::ConfigItem
     virtual void    Notify( const css::uno::Sequence< OUString > &rPropertyNames ) override;
@@ -198,11 +197,6 @@ SvtLinguConfigItem::SvtLinguConfigItem() :
     EnableNotification( rPropertyNames );
 }
 
-SvtLinguConfigItem::~SvtLinguConfigItem()
-{
-    //! Commit (SaveOptions) will be called by the d-tor of the base called !
-}
-
 void SvtLinguConfigItem::Notify( const uno::Sequence< OUString > &rPropertyNames )
 {
     LoadOptions( rPropertyNames );
diff --git a/unotools/source/config/saveopt.cxx b/unotools/source/config/saveopt.cxx
index fdad10a..8999d21 100644
--- a/unotools/source/config/saveopt.cxx
+++ b/unotools/source/config/saveopt.cxx
@@ -97,7 +97,6 @@ class SvtSaveOptions_Impl : public utl::ConfigItem
 
 public:
                             SvtSaveOptions_Impl();
-                            virtual ~SvtSaveOptions_Impl() override;
 
     virtual void            Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
 
@@ -581,9 +580,6 @@ SvtSaveOptions_Impl::SvtSaveOptions_Impl()
     }
 }
 
-SvtSaveOptions_Impl::~SvtSaveOptions_Impl()
-{}
-
 void SvtSaveOptions_Impl::ImplCommit()
 {
     Sequence< OUString > aOrgNames = GetPropertyNames();
@@ -770,7 +766,6 @@ private:
 
 public:
                             SvtLoadOptions_Impl();
-                            virtual ~SvtLoadOptions_Impl() override;
 
     virtual void            Notify( const css::uno::Sequence< OUString >& aPropertyNames ) override;
 
@@ -792,10 +787,6 @@ SvtLoadOptions_Impl::SvtLoadOptions_Impl()
     pValues[0] >>= bLoadUserDefinedSettings;
 }
 
-SvtLoadOptions_Impl::~SvtLoadOptions_Impl()
-{
-}
-
 void SvtLoadOptions_Impl::ImplCommit()
 {
     PutProperties(
diff --git a/unotools/source/ucbhelper/ucblockbytes.cxx b/unotools/source/ucbhelper/ucblockbytes.cxx
index 70dd91f..7c0096e 100644
--- a/unotools/source/ucbhelper/ucblockbytes.cxx
+++ b/unotools/source/ucbhelper/ucblockbytes.cxx
@@ -229,8 +229,6 @@ public:
             RuntimeException
         );
 
-    virtual ~Moderator() override;
-
     enum ResultType {
         NORESULT,
 
@@ -341,8 +339,6 @@ public:
 
     explicit ModeratorsActiveDataStreamer(Moderator &theModerator);
 
-    virtual ~ModeratorsActiveDataStreamer() override;
-
     // XActiveDataStreamer
     virtual void SAL_CALL
     setStream(
@@ -377,8 +373,6 @@ public:
 
     explicit ModeratorsActiveDataSink(Moderator &theModerator);
 
-    virtual ~ModeratorsActiveDataSink() override;
-
     // XActiveDataSink.
     virtual void SAL_CALL
     setInputStream (
@@ -410,10 +404,6 @@ ModeratorsActiveDataSink::ModeratorsActiveDataSink(Moderator &theModerator)
 {
 }
 
-ModeratorsActiveDataSink::~ModeratorsActiveDataSink()
-{
-}
-
 // XActiveDataSink.
 void SAL_CALL
 ModeratorsActiveDataSink::setInputStream (
@@ -435,10 +425,6 @@ ModeratorsActiveDataStreamer::ModeratorsActiveDataStreamer(
 {
 }
 
-ModeratorsActiveDataStreamer::~ModeratorsActiveDataStreamer()
-{
-}
-
 // XActiveDataStreamer.
 void SAL_CALL
 ModeratorsActiveDataStreamer::setStream (
@@ -460,8 +446,6 @@ public:
 
     explicit ModeratorsInteractionHandler(Moderator &theModerator);
 
-    virtual ~ModeratorsInteractionHandler() override;
-
     virtual void SAL_CALL
     handle( const Reference<XInteractionRequest >& Request )
         throw (RuntimeException, std::exception) override;
@@ -477,10 +461,6 @@ ModeratorsInteractionHandler::ModeratorsInteractionHandler(
 {
 }
 
-ModeratorsInteractionHandler::~ModeratorsInteractionHandler()
-{
-}
-
 void SAL_CALL
 ModeratorsInteractionHandler::handle(
     const Reference<XInteractionRequest >& Request
@@ -555,10 +535,6 @@ Moderator::Moderator(
         m_aArg.Argument <<= aOpenArg;
 }
 
-Moderator::~Moderator()
-{
-}
-
 Moderator::Result Moderator::getResult(const sal_uInt32 milliSec)
 {
     Result ret;
commit 31e2e2de4571139bde2fe55a986c8b067cca1dee
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 24 11:28:35 2016 +0100

    loplugin:unnecessaryoverride (dtors) in unoxml
    
    Change-Id: Ieca0d355031f25731a519be26145cda3b2172cb1

diff --git a/unoxml/source/dom/elementlist.cxx b/unoxml/source/dom/elementlist.cxx
index 3b38cc7..c851faf 100644
--- a/unoxml/source/dom/elementlist.cxx
+++ b/unoxml/source/dom/elementlist.cxx
@@ -44,10 +44,6 @@ namespace
         {
         }
 
-        virtual ~WeakEventListener() override
-        {
-        }
-
         virtual void SAL_CALL handleEvent(const css::uno::Reference<css::xml::dom::events::XEvent>& rEvent)
             throw(css::uno::RuntimeException, std::exception) override
         {
diff --git a/unoxml/source/rdf/CBlankNode.cxx b/unoxml/source/rdf/CBlankNode.cxx
index 47f5af2..761082c 100644
--- a/unoxml/source/rdf/CBlankNode.cxx
+++ b/unoxml/source/rdf/CBlankNode.cxx
@@ -39,7 +39,6 @@ class CBlankNode:
 {
 public:
     CBlankNode();
-    virtual ~CBlankNode() override {}
 
     // css::lang::XServiceInfo:
     virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override;
diff --git a/unoxml/source/rdf/CLiteral.cxx b/unoxml/source/rdf/CLiteral.cxx
index 9d488d9..bfcf0f1 100644
--- a/unoxml/source/rdf/CLiteral.cxx
+++ b/unoxml/source/rdf/CLiteral.cxx
@@ -41,7 +41,6 @@ class CLiteral:
 {
 public:
     explicit CLiteral();
-    virtual ~CLiteral() override {}
 
     // css::lang::XServiceInfo:
     virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override;
diff --git a/unoxml/source/rdf/CURI.cxx b/unoxml/source/rdf/CURI.cxx
index 82413a0..6473ae3 100644
--- a/unoxml/source/rdf/CURI.cxx
+++ b/unoxml/source/rdf/CURI.cxx
@@ -40,7 +40,6 @@ class CURI:
 {
 public:
     explicit CURI();
-    virtual ~CURI() override {}
 
     // css::lang::XServiceInfo:
     virtual OUString SAL_CALL getImplementationName() throw (css::uno::RuntimeException, std::exception) override;
diff --git a/unoxml/source/rdf/librdf_repository.cxx b/unoxml/source/rdf/librdf_repository.cxx
index 1cb8230..5d0de18 100644
--- a/unoxml/source/rdf/librdf_repository.cxx
+++ b/unoxml/source/rdf/librdf_repository.cxx
@@ -695,8 +695,6 @@ public:
         , m_xName(i_xName)
     { };
 
-    virtual ~librdf_NamedGraph() override {}
-
     // css::rdf::XNode:
     virtual OUString SAL_CALL getStringValue()
         throw (uno::RuntimeException, std::exception) override;
commit 675df4a72e7cc695fec18869dd015a872c287c6e
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 24 11:28:15 2016 +0100

    loplugin:unnecessaryoverride (dtors) in vbahelper
    
    Change-Id: I809869a438b710b2c4722027cc78d39a81b0a092

diff --git a/vbahelper/source/msforms/vbacontrol.cxx b/vbahelper/source/msforms/vbacontrol.cxx
index 69e1651..7d72fc8 100644
--- a/vbahelper/source/msforms/vbacontrol.cxx
+++ b/vbahelper/source/msforms/vbacontrol.cxx
@@ -102,7 +102,7 @@ private:
     ScVbaControl *pControl;
 public:
     explicit ScVbaControlListener( ScVbaControl *pTmpControl );
-    virtual ~ScVbaControlListener() override;
+
     virtual void SAL_CALL disposing( const lang::EventObject& rEventObject ) throw( uno::RuntimeException, std::exception ) override;
 };
 
@@ -110,10 +110,6 @@ ScVbaControlListener::ScVbaControlListener( ScVbaControl *pTmpControl ): pContro
 {
 }
 
-ScVbaControlListener::~ScVbaControlListener()
-{
-}
-
 void SAL_CALL
 ScVbaControlListener::disposing( const lang::EventObject& ) throw( uno::RuntimeException, std::exception )
 {
commit 5ebfc3ad9b27eed8571fa501ed3727218e0008fb
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Thu Nov 24 11:27:53 2016 +0100

    loplugin:unnecessaryoverride (dtors) in writerfilter
    
    Change-Id: I2d21d47e8471daf3125a6c81b5b3919820caef46

diff --git a/writerfilter/source/dmapper/GraphicImport.cxx b/writerfilter/source/dmapper/GraphicImport.cxx
index 837308c..3531093 100644
--- a/writerfilter/source/dmapper/GraphicImport.cxx
+++ b/writerfilter/source/dmapper/GraphicImport.cxx
@@ -80,7 +80,6 @@ class XInputStreamHelper : public cppu::WeakImplHelper<io::XInputStream>
     sal_Int32        m_nHeaderLength;
 public:
     XInputStreamHelper(const sal_uInt8* buf, size_t len);
-    virtual ~XInputStreamHelper() override;
 
     virtual ::sal_Int32 SAL_CALL readBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nBytesToRead ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception) override;
     virtual ::sal_Int32 SAL_CALL readSomeBytes( uno::Sequence< ::sal_Int8 >& aData, ::sal_Int32 nMaxBytesToRead ) throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception) override;
@@ -100,11 +99,6 @@ XInputStreamHelper::XInputStreamHelper(const sal_uInt8* buf, size_t len) :
     m_nHeaderLength = 0;
 }
 
-
-XInputStreamHelper::~XInputStreamHelper()
-{
-}
-
 sal_Int32 XInputStreamHelper::readBytes( uno::Sequence<sal_Int8>& aData, sal_Int32 nBytesToRead )
     throw (io::NotConnectedException, io::BufferSizeExceededException, io::IOException, uno::RuntimeException, std::exception)
 {
diff --git a/writerfilter/source/filter/RtfFilter.cxx b/writerfilter/source/filter/RtfFilter.cxx
index e734fb6..ad7ed9a 100644
--- a/writerfilter/source/filter/RtfFilter.cxx
+++ b/writerfilter/source/filter/RtfFilter.cxx
@@ -53,7 +53,6 @@ class RtfFilter : public cppu::WeakImplHelper
 
 public:
     explicit RtfFilter(const uno::Reference<uno::XComponentContext>& xContext);
-    ~RtfFilter() override;
 
     // XFilter
     sal_Bool SAL_CALL filter(const uno::Sequence<beans::PropertyValue>& rDescriptor) throw (uno::RuntimeException, std::exception) override;
@@ -80,8 +79,6 @@ RtfFilter::RtfFilter(const uno::Reference< uno::XComponentContext >& rxContext)
 {
 }
 
-RtfFilter::~RtfFilter() = default;
-
 sal_Bool RtfFilter::filter(const uno::Sequence< beans::PropertyValue >& aDescriptor) throw(uno::RuntimeException, std::exception)
 {
     sal_uInt32 nStartTime = osl_getGlobalTimer();
diff --git a/writerfilter/source/filter/WriterFilter.cxx b/writerfilter/source/filter/WriterFilter.cxx
index c59718f..6ff2f7a 100644
--- a/writerfilter/source/filter/WriterFilter.cxx
+++ b/writerfilter/source/filter/WriterFilter.cxx
@@ -98,7 +98,6 @@ public:
     explicit WriterFilter(const uno::Reference<uno::XComponentContext>& rxContext)
         : m_xContext(rxContext)
     {}
-    ~WriterFilter() override = default;
 
     // XFilter
     sal_Bool SAL_CALL filter(const uno::Sequence<beans::PropertyValue>& rDescriptor) throw (uno::RuntimeException, std::exception) override;
diff --git a/writerfilter/source/filter/WriterFilterDetection.cxx b/writerfilter/source/filter/WriterFilterDetection.cxx
index 442eaf0..f72323b 100644
--- a/writerfilter/source/filter/WriterFilterDetection.cxx
+++ b/writerfilter/source/filter/WriterFilterDetection.cxx
@@ -35,7 +35,6 @@ class WriterFilterDetection : public cppu::WeakImplHelper
 {
 public:
     explicit WriterFilterDetection();
-    ~WriterFilterDetection() override;
 
     //XExtendedFilterDetection
     OUString SAL_CALL detect(uno::Sequence<beans::PropertyValue>& Descriptor) throw (uno::RuntimeException, std::exception) override;
@@ -52,8 +51,6 @@ WriterFilterDetection::WriterFilterDetection()
 {
 }
 
-WriterFilterDetection::~WriterFilterDetection() = default;
-
 OUString WriterFilterDetection::detect(uno::Sequence<beans::PropertyValue>& rDescriptor) throw (uno::RuntimeException, std::exception)
 {
     OUString sTypeName;
commit b12410f212658996fdb5fb291a06038e9ac39b2e
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Nov 24 09:47:08 2016 +0100

    vcl mscrypto PDF sign: write ESSCertIDv2
    
    With this, the value of signing-certificate conforms to the RFC on
    Windows as well.
    
    Change-Id: I09d21026bfecd0453e194f3f4cd8bae9805a5d7a
    Reviewed-on: https://gerrit.libreoffice.org/31150
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx
index 03bf6f2..b81bb02 100644
--- a/vcl/source/gdi/pdfwriter_impl.cxx
+++ b/vcl/source/gdi/pdfwriter_impl.cxx
@@ -6805,6 +6805,101 @@ typedef BOOL (WINAPI *PointerTo_CryptRetrieveTimeStamp)(LPCWSTR wszUrl,
                                                         PCCERT_CONTEXT *ppTsSigner,
                                                         HCERTSTORE phStore);
 
+namespace
+{
+/// Create payload for the 'signing-certificate' signed attribute.
+bool CreateSigningCertificateAttribute(vcl::PDFWriter::PDFSignContext& rContext, SvStream& rEncodedCertificate)
+{
+    // CryptEncodeObjectEx() does not support encoding arbitrary ASN.1
+    // structures, like SigningCertificateV2 from RFC 5035, so let's build it
+    // manually.
+
+    // Count the certificate hash and put it to aHash.
+    // 2.16.840.1.101.3.4.2.1, i.e. sha256.
+    std::vector<unsigned char> aSHA256{0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01};
+
+    HCRYPTPROV hProv = 0;
+    if (!CryptAcquireContext(&hProv, nullptr, nullptr, PROV_RSA_AES, CRYPT_VERIFYCONTEXT))
+    {
+        SAL_WARN("vcl.pdfwriter", "CryptAcquireContext() failed");
+        return false;
+    }
+
+    HCRYPTHASH hHash = 0;
+    if (!CryptCreateHash(hProv, CALG_SHA_256, 0, 0, &hHash))
+    {
+        SAL_WARN("vcl.pdfwriter", "CryptCreateHash() failed");
+        return false;
+    }
+
+    if (!CryptHashData(hHash, reinterpret_cast<const BYTE*>(rContext.m_pDerEncoded), rContext.m_nDerEncoded, 0))
+    {
+        SAL_WARN("vcl.pdfwriter", "CryptHashData() failed");
+        return false;
+    }
+
+    DWORD nHash = 0;
+    if (!CryptGetHashParam(hHash, HP_HASHVAL, nullptr, &nHash, 0))
+    {
+        SAL_WARN("vcl.pdfwriter", "CryptGetHashParam() failed to provide the hash length");
+        return false;
+    }
+
+    std::vector<unsigned char> aHash(nHash);
+    if (!CryptGetHashParam(hHash, HP_HASHVAL, aHash.data(), &nHash, 0))
+    {
+        SAL_WARN("vcl.pdfwriter", "CryptGetHashParam() failed to provide the hash");
+        return false;
+    }
+
+    CryptDestroyHash(hHash);
+    CryptReleaseContext(hProv, 0);
+
+    // We now have all the info to count the lengths.
+    // The layout of the payload is:
+    // SEQUENCE: SigningCertificateV2
+    //     SEQUENCE: SEQUENCE OF ESSCertIDv2
+    //      SEQUENCE: ESSCertIDv2
+    //          SEQUENCE: AlgorithmIdentifier
+    //              OBJECT: algorithm
+    //              NULL: parameters
+    //       OCTET STRING: certHash
+
+    size_t nAlgorithm = aSHA256.size() + 2;
+    size_t nParameters = 2;
+    size_t nAlgorithmIdentifier = nAlgorithm + nParameters + 2;
+    size_t nCertHash = aHash.size() + 2;
+    size_t nESSCertIDv2 = nAlgorithmIdentifier + nCertHash + 2;
+    size_t nESSCertIDv2s = nESSCertIDv2 + 2;
+
+    // Write SigningCertificateV2.
+    rEncodedCertificate.WriteUInt8(0x30);
+    rEncodedCertificate.WriteUInt8(nESSCertIDv2s);
+    // Write SEQUENCE OF ESSCertIDv2.
+    rEncodedCertificate.WriteUInt8(0x30);
+    rEncodedCertificate.WriteUInt8(nESSCertIDv2);
+    // Write ESSCertIDv2.
+    rEncodedCertificate.WriteUInt8(0x30);
+    rEncodedCertificate.WriteUInt8(nAlgorithmIdentifier + nCertHash);
+    // Write AlgorithmIdentifier.
+    rEncodedCertificate.WriteUInt8(0x30);
+    rEncodedCertificate.WriteUInt8(nAlgorithm + nParameters);
+    // Write algorithm.
+    rEncodedCertificate.WriteUInt8(0x06);
+    rEncodedCertificate.WriteUInt8(aSHA256.size());
+    rEncodedCertificate.WriteBytes(aSHA256.data(), aSHA256.size());
+    // Write parameters.
+    rEncodedCertificate.WriteUInt8(0x05);
+    rEncodedCertificate.WriteUInt8(0x00);
+    // Write certHash.
+    rEncodedCertificate.WriteUInt8(0x04);
+    rEncodedCertificate.WriteUInt8(aHash.size());
+    rEncodedCertificate.WriteBytes(aHash.data(), aHash.size());
+
+    return true;
+}
+} // anonymous namespace
+
 #endif
 
 bool PDFWriter::Sign(PDFSignContext& rContext)
@@ -7340,10 +7435,14 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
 
     // Add the signing certificate as a signed attribute.
     CRYPT_INTEGER_BLOB aCertificateBlob;
-    // Just en empty SEQUENCE stub for now.
-    std::vector<unsigned char> aEncodedCertificate{0x30, 0x00};
-    aCertificateBlob.pbData = aEncodedCertificate.data();
-    aCertificateBlob.cbData = aEncodedCertificate.size();
+    SvMemoryStream aEncodedCertificate;
+    if (!CreateSigningCertificateAttribute(rContext, aEncodedCertificate))
+    {
+        SAL_WARN("vcl.pdfwriter", "CreateSigningCertificateAttribute() failed");
+        return false;
+    }
+    aCertificateBlob.pbData = const_cast<BYTE*>(static_cast<const BYTE*>(aEncodedCertificate.GetData()));
+    aCertificateBlob.cbData = aEncodedCertificate.GetSize();
     CRYPT_ATTRIBUTE aCertificateAttribute;
     /*
      * id-aa-signingCertificateV2 OBJECT IDENTIFIER ::=
@@ -7353,12 +7452,8 @@ bool PDFWriter::Sign(PDFSignContext& rContext)
     aCertificateAttribute.pszObjId = const_cast<LPSTR>("1.2.840.113549.1.9.16.2.47");
     aCertificateAttribute.cValue = 1;
     aCertificateAttribute.rgValue = &aCertificateBlob;
-    // Don't write the signed attribute by default till the value is ready.
-    if (g_bDebugDisableCompression)
-    {
-        aSignerInfo.cAuthAttr = 1;
-        aSignerInfo.rgAuthAttr = &aCertificateAttribute;
-    }
+    aSignerInfo.cAuthAttr = 1;
+    aSignerInfo.rgAuthAttr = &aCertificateAttribute;
 
     CMSG_SIGNED_ENCODE_INFO aSignedInfo;
     memset(&aSignedInfo, 0, sizeof(aSignedInfo));
commit b30e298c3f8d9202a14e0ca08120ccde31e413ee
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 08:54:11 2016 +0000

    move the FontConfigFontOptions out of FreetypeFontInstance now
    
    Change-Id: Ic6ff21533a53df16fed4ee086f78ff368cb23afd
    Reviewed-on: https://gerrit.libreoffice.org/31130
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/vcl/inc/unx/cairotextrender.hxx b/vcl/inc/unx/cairotextrender.hxx
index 0735d059..1aeaf06 100644
--- a/vcl/inc/unx/cairotextrender.hxx
+++ b/vcl/inc/unx/cairotextrender.hxx
@@ -26,7 +26,6 @@
 
 #include <deque>
 
-class FontConfigFontOptions;
 class FreetypeFont;
 class GlyphCache;
 typedef struct _cairo cairo_t;
@@ -95,8 +94,6 @@ public:
 #endif
 };
 
-FontConfigFontOptions* GetFCFontOptions( const FontAttributes& rFontAttributes, int nSize);
-
 #endif
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/unx/fc_fontoptions.hxx b/vcl/inc/unx/fc_fontoptions.hxx
index 48661de..3c34610 100644
--- a/vcl/inc/unx/fc_fontoptions.hxx
+++ b/vcl/inc/unx/fc_fontoptions.hxx
@@ -53,6 +53,7 @@ public:
     bool                DontUseHinting() const { return (meHinting == FontHinting::No) || (GetHintStyle() == FontHintStyle::NONE); }
     void                SyncPattern(const OString& rFileName, int nFontFace, bool bEmbolden);
     FcPattern*          GetPattern() const;
+    static void         cairo_font_options_substitute(FcPattern* pPattern);
 private:
     FcPattern* mpPattern;
 };
diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 057436a..7f0e057 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -492,7 +492,7 @@ public:
     in different fonts in e.g. english and japanese
      */
     void matchFont( FastPrintFontInfo& rInfo, const css::lang::Locale& rLocale );
-    static FontConfigFontOptions* getFontOptions( const FastPrintFontInfo&, int nSize, void (*subcallback)(void*));
+    static FontConfigFontOptions* getFontOptions( const FastPrintFontInfo&, int nSize);
 
     void Substitute( FontSelectPattern &rPattern, OUString& rMissingCodes );
 
diff --git a/vcl/inc/unx/glyphcache.hxx b/vcl/inc/unx/glyphcache.hxx
index 9d3f011..ac52a6a 100644
--- a/vcl/inc/unx/glyphcache.hxx
+++ b/vcl/inc/unx/glyphcache.hxx
@@ -252,13 +252,9 @@ public:
     virtual                 ~FreetypeFontInstance() override;
 
     void                    SetFreetypeFont(FreetypeFont* p);
-    void                    HandleFontOptions();
 
 private:
     FreetypeFont*           mpFreetypeFont;
-    std::shared_ptr<FontConfigFontOptions> mxFontOptions;
-    bool                    mbGotFontOptions;
-
 };
 
 class VCL_DLLPUBLIC ServerFontLayout : public GenericSalLayout
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 81285eb..dd9d17b 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -1169,8 +1169,7 @@ void FontConfigFontOptions::SyncPattern(const OString& rFileName, int nIndex, bo
     FcPatternAddBool(mpPattern, FC_EMBOLDEN, bEmbolden ? FcTrue : FcFalse);
 }
 
-FontConfigFontOptions* PrintFontManager::getFontOptions(
-    const FastPrintFontInfo& rInfo, int nSize, void (*subcallback)(void*))
+FontConfigFontOptions* PrintFontManager::getFontOptions(const FastPrintFontInfo& rInfo, int nSize)
 {
     FontCfgWrapper& rWrapper = FontCfgWrapper::get();
 
@@ -1193,8 +1192,7 @@ FontConfigFontOptions* PrintFontManager::getFontOptions(
     int hintstyle = FC_HINT_FULL;
 
     FcConfigSubstitute(pConfig, pPattern, FcMatchPattern);
-    if (subcallback)
-        subcallback(pPattern);
+    FontConfigFontOptions::cairo_font_options_substitute(pPattern);
     FcDefaultSubstitute(pPattern);
 
     FcResult eResult = FcResultNoMatch;
diff --git a/vcl/unx/generic/gdi/cairotextrender.cxx b/vcl/unx/generic/gdi/cairotextrender.cxx
index 55d5e49..eb941e2 100644
--- a/vcl/unx/generic/gdi/cairotextrender.cxx
+++ b/vcl/unx/generic/gdi/cairotextrender.cxx
@@ -138,31 +138,12 @@ bool CairoTextRender::setFont( const FontSelectPattern *pEntry, int nFallbackLev
         // register to use the font
         mpFreetypeFont[ nFallbackLevel ] = pFreetypeFont;
 
-        // apply font specific-hint settings
-        FreetypeFontInstance* pSFE = static_cast<FreetypeFontInstance*>( pEntry->mpFontInstance );
-        pSFE->HandleFontOptions();
-
         return true;
     }
 
     return false;
 }
 
-void FreetypeFontInstance::HandleFontOptions()
-{
-    if( !mpFreetypeFont )
-        return;
-    if( !mbGotFontOptions )
-    {
-        // get and cache the font options
-        mbGotFontOptions = true;
-        mxFontOptions.reset(GetFCFontOptions( *maFontSelData.mpFontData,
-            maFontSelData.mnHeight ));
-    }
-    // apply the font options
-    mpFreetypeFont->SetFontOptions(mxFontOptions);
-}
-
 void CairoFontsCache::CacheFont(void *pFont, const CairoFontsCache::CacheId &rId)
 {
     maLRUFonts.push_front( std::pair<void*, CairoFontsCache::CacheId>(pFont, rId) );
@@ -461,29 +442,16 @@ void CairoTextRender::GetDevFontList( PhysicalFontCollection* pFontCollection )
     ImplGetSVData()->maGDIData.mbNativeFontConfig = true;
 }
 
-void cairosubcallback(void* pPattern)
+void FontConfigFontOptions::cairo_font_options_substitute(FcPattern* pPattern)
 {
     ImplSVData* pSVData = ImplGetSVData();
     const cairo_font_options_t* pFontOptions = pSVData->mpDefInst->GetCairoFontOptions();
     if( !pFontOptions )
         return;
-    cairo_ft_font_options_substitute(pFontOptions, static_cast<FcPattern*>(pPattern));
+    cairo_ft_font_options_substitute(pFontOptions, pPattern);
 }
 
-FontConfigFontOptions* GetFCFontOptions( const FontAttributes& rFontAttributes, int nSize)
-{
-    psp::FastPrintFontInfo aInfo;
-
-    aInfo.m_aFamilyName = rFontAttributes.GetFamilyName();
-    aInfo.m_eItalic = rFontAttributes.GetItalic();
-    aInfo.m_eWeight = rFontAttributes.GetWeight();
-    aInfo.m_eWidth = rFontAttributes.GetWidthType();
-
-    return psp::PrintFontManager::getFontOptions(aInfo, nSize, cairosubcallback);
-}
-
-void
-CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel )
+void CairoTextRender::GetFontMetric( ImplFontMetricDataRef& rxFontMetric, int nFallbackLevel )
 {
     if( nFallbackLevel >= MAX_FALLBACK )
         return;
diff --git a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
index 9a72bf3..6df2bba 100644
--- a/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/freetype_glyphcache.cxx
@@ -20,7 +20,6 @@
 
 #include <vcl/fontcharmap.hxx>
 
-#include <unx/cairotextrender.hxx>
 #include "unx/freetype_glyphcache.hxx"
 
 #include <vcl/svapp.hxx>
@@ -589,14 +588,28 @@ void FreetypeFont::SetFontOptions(const std::shared_ptr<FontConfigFontOptions>&
         mnLoadFlags |= FT_LOAD_NO_BITMAP;
 }
 
+namespace
+{
+    FontConfigFontOptions* GetFCFontOptions( const FontAttributes& rFontAttributes, int nSize)
+    {
+        psp::FastPrintFontInfo aInfo;
+
+        aInfo.m_aFamilyName = rFontAttributes.GetFamilyName();
+        aInfo.m_eItalic = rFontAttributes.GetItalic();
+        aInfo.m_eWeight = rFontAttributes.GetWeight();
+        aInfo.m_eWidth = rFontAttributes.GetWidthType();
+
+        return psp::PrintFontManager::getFontOptions(aInfo, nSize);
+    }
+}
+
 const std::shared_ptr<FontConfigFontOptions>& FreetypeFont::GetFontOptions() const
 {
     if (!mxFontOptions)
     {
-        SAL_WARN("vcl", "this doesn't happen in practice I believe");
         mxFontOptions.reset(GetFCFontOptions(mpFontInfo->GetFontAttributes(), maFontSelData.mnHeight));
+        mxFontOptions->SyncPattern(GetFontFileName(), GetFontFaceIndex(), NeedsArtificialBold());
     }
-    mxFontOptions->SyncPattern(GetFontFileName(), GetFontFaceIndex(), NeedsArtificialBold());
     return mxFontOptions;
 }
 
diff --git a/vcl/unx/generic/glyphs/glyphcache.cxx b/vcl/unx/generic/glyphs/glyphcache.cxx
index de4bb96..3cece78 100644
--- a/vcl/unx/generic/glyphs/glyphcache.cxx
+++ b/vcl/unx/generic/glyphs/glyphcache.cxx
@@ -343,7 +343,6 @@ void FreetypeFont::GarbageCollect( long nMinLruIndex )
 FreetypeFontInstance::FreetypeFontInstance( FontSelectPattern& rFSD )
 :   LogicalFontInstance( rFSD )
 ,   mpFreetypeFont( nullptr )
-,   mbGotFontOptions( false )
 {}
 
 void FreetypeFontInstance::SetFreetypeFont(FreetypeFont* p)
commit dcbfa4be9bd95ad035770190abc625b64efd462f
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 24 11:55:53 2016 +0200

    Show also the message for the last Windows error in our own error handler
    
    That is what the default libxmlsec error handler
    xmlSecMSCryptoErrorsDefaultCallback() does. Why show less information
    in our own handler?
    
    Change-Id: Ibc9f9b5066536d0f5cabbf2bda6d1fa14eca5613

diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index fbc0f88..dc817db 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -21,6 +21,12 @@
 
 #include "xmlsec-wrapper.h"
 
+#ifdef _WIN32
+#include <prewin.h>
+#include <postwin.h>
+#include "comphelper/windowserrorstring.hxx"
+#endif
+
 extern "C"
 void errorCallback(const char* file,
                    int line,
@@ -33,7 +39,13 @@ void errorCallback(const char* file,
     const char* pErrorObject = errorObject ? errorObject : "";
     const char* pErrorSubject = errorSubject ? errorSubject : "";
     const char* pMsg = msg ? msg : "";
-    SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'");
+    OUString systemErrorString;
+
+#ifdef _WIN32
+    systemErrorString = " " + WindowsErrorString(GetLastError());
+#endif
+
+    SAL_WARN("xmlsecurity.xmlsec", file << ":" << line << ": " << func << "() '" << pErrorObject << "' '" << pErrorSubject << "' " << reason << " '" << pMsg << "'" << systemErrorString);
 }
 
 void setErrorRecorder()
commit f9fee44d1b49d859f9ee6ab22cc34c758aac71f0
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 09:51:07 2016 +0000

    can have gtk >= 3.10.0 with cairo < 1.14.0
    
    I imagine that without cairo 1.14.0 there's no point scaling, so force 1
    then.
    
    Change-Id: I0e778ed5a57f9ede9f4b78369c470b23b94fe82f

diff --git a/vcl/unx/gtk3/gtk3gtkframe.cxx b/vcl/unx/gtk3/gtk3gtkframe.cxx
index 5acb139..645f800 100644
--- a/vcl/unx/gtk3/gtk3gtkframe.cxx
+++ b/vcl/unx/gtk3/gtk3gtkframe.cxx
@@ -1576,13 +1576,19 @@ void GtkSalFrame::AllocateFrame()
             cairo_surface_destroy(m_pSurface);
 
 #if GTK_CHECK_VERSION(3,10,0)
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
         int scale = getDisplay()->IsOwnHiDpiScale() ? 1 : gtk_widget_get_scale_factor(m_pWindow);
+#else
+        int scale = 1;
+#endif
         m_pSurface = gdk_window_create_similar_image_surface(widget_get_window(m_pWindow),
                                                              CAIRO_FORMAT_ARGB32,
                                                              aFrameSize.getX() * scale,
                                                              aFrameSize.getY() * scale,
                                                              scale);
+#if CAIRO_VERSION >= CAIRO_VERSION_ENCODE(1, 14, 0)
         cairo_surface_set_device_scale(m_pSurface, scale, scale);
+#endif
 #else
         m_pSurface = cairo_image_surface_create(CAIRO_FORMAT_ARGB32,
                                                 aFrameSize.getX(),
commit c7f2115d774485a235b671c82302dbf38841e3c9
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Thu Nov 24 09:07:01 2016 +0000

    coverity#1394669 Uninitialized pointer field
    
    and
    
    coverity#1394670 Uninitialized pointer field
    
    Change-Id: I5869ff5dc19a994d33d44313becec1eb590e31f8

diff --git a/sc/qa/unit/range.cxx b/sc/qa/unit/range.cxx
index c1e4214..9684344 100644
--- a/sc/qa/unit/range.cxx
+++ b/sc/qa/unit/range.cxx
@@ -29,14 +29,14 @@ public:
     void testAddressParsing();
 
 private:
-    ScDocument *m_pDoc;
     ScDocShellRef m_xDocShRef;
 };
 
 void ScAddressTest::testAddressParsing()
 {
     ScAddress aAddr;
-    ScRefFlags nRes = aAddr.Parse("1", m_pDoc, formula::FormulaGrammar::CONV_OOO);
+    ScDocument& rDoc = m_xDocShRef->GetDocument();
+    ScRefFlags nRes = aAddr.Parse("1", &rDoc, formula::FormulaGrammar::CONV_OOO);
     CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & ScRefFlags::VALID));
 }
 
@@ -49,8 +49,6 @@ void ScAddressTest::setUp()
         SfxModelFlags::EMBEDDED_OBJECT |
         SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
         SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
-
-    m_pDoc = &m_xDocShRef->GetDocument();
 }
 
 void ScAddressTest::tearDown()
@@ -72,14 +70,14 @@ public:
     void testRangeParsing();
 
 private:
-    ScDocument *m_pDoc;
     ScDocShellRef m_xDocShRef;
 };
 
 void ScRangeTest::testRangeParsing()
 {
     ScRange aRange;
-    ScRefFlags nRes = aRange.Parse(":1", m_pDoc, formula::FormulaGrammar::CONV_OOO);
+    ScDocument& rDoc = m_xDocShRef->GetDocument();
+    ScRefFlags nRes = aRange.Parse(":1", &rDoc, formula::FormulaGrammar::CONV_OOO);
     CPPUNIT_ASSERT_MESSAGE("Should fail to parse.", !(nRes & ScRefFlags::VALID));
 }
 
@@ -92,8 +90,6 @@ void ScRangeTest::setUp()
         SfxModelFlags::EMBEDDED_OBJECT |
         SfxModelFlags::DISABLE_EMBEDDED_SCRIPTS |
         SfxModelFlags::DISABLE_DOCUMENT_RECOVERY);
-
-    m_pDoc = &m_xDocShRef->GetDocument();
 }
 
 void ScRangeTest::tearDown()
commit 8b8f315b51e2c405e3ea51b1c575bee49df7d0bd
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 24 11:33:39 2016 +0200

    Nothing from that namespace used here
    
    Change-Id: I05450a0af00b200145312301207b8f6d3af05145

diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index 6cb30e8..fbc0f88 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -21,9 +21,6 @@
 
 #include "xmlsec-wrapper.h"
 
-using namespace ::com::sun::star::xml::crypto;
-
-
 extern "C"
 void errorCallback(const char* file,
                    int line,
commit 8f08d48780dd4877a3949f39b424b8e097ee7e17
Author: Tor Lillqvist <tml at collabora.com>
Date:   Thu Nov 24 11:31:28 2016 +0200

    Bin copy-pasted comment that is meaningless here
    
    Change-Id: Ie18a1bd4c006a9c7a54dc79747cb7e300315640a

diff --git a/xmlsecurity/source/xmlsec/errorcallback.cxx b/xmlsecurity/source/xmlsec/errorcallback.cxx
index d1b25b6..6cb30e8 100644
--- a/xmlsecurity/source/xmlsec/errorcallback.cxx
+++ b/xmlsecurity/source/xmlsec/errorcallback.cxx
@@ -17,10 +17,6 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-
-/*
- * Implementation of the I/O interfaces based on stream and URI binding
- */
 #include "errorcallback.hxx"
 
 #include "xmlsec-wrapper.h"
commit 04a84913ead2f82510d91eea2bb8526274feeeae
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Nov 24 11:26:19 2016 +0200

    use o3tl::typed_flags in ConfigurationListener::ConfigurationChanged
    
    Change-Id: I0ad7c02953aa53168dc242f1f374ab871728c84e

diff --git a/basctl/source/basicide/baside2.cxx b/basctl/source/basicide/baside2.cxx
index dbfe9ca..675a0ea 100644
--- a/basctl/source/basicide/baside2.cxx
+++ b/basctl/source/basicide/baside2.cxx
@@ -1507,7 +1507,7 @@ ModulWindowLayout::SyntaxColors::~SyntaxColors ()
 }
 
 // virtual
-void ModulWindowLayout::SyntaxColors::ConfigurationChanged (utl::ConfigurationBroadcaster*, sal_uInt32)
+void ModulWindowLayout::SyntaxColors::ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints)
 {
     NewConfig(false);
 }
diff --git a/basctl/source/basicide/baside2.hxx b/basctl/source/basicide/baside2.hxx
index 3463fbb..465be0b 100644
--- a/basctl/source/basicide/baside2.hxx
+++ b/basctl/source/basicide/baside2.hxx
@@ -457,7 +457,7 @@ private:
         Color GetColor (TokenType eType) const { return aColors[eType]; }
 
     private:
-        virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, sal_uInt32) override;
+        virtual void ConfigurationChanged (utl::ConfigurationBroadcaster*, ConfigurationHints) override;
         void NewConfig (bool bFirst);
 
     private:
diff --git a/dbaccess/source/ui/control/sqledit.cxx b/dbaccess/source/ui/control/sqledit.cxx
index 1e2237d..810a78a 100644
--- a/dbaccess/source/ui/control/sqledit.cxx
+++ b/dbaccess/source/ui/control/sqledit.cxx
@@ -218,7 +218,7 @@ void OSqlEdit::startTimer()
         m_timerInvalidate.Start();
 }
 
-void OSqlEdit::ConfigurationChanged( utl::ConfigurationBroadcaster* pOption, sal_uInt32 )
+void OSqlEdit::ConfigurationChanged( utl::ConfigurationBroadcaster* pOption, ConfigurationHints )
 {
     assert( pOption == &m_ColorConfig );
     (void) pOption; // avoid warnings
diff --git a/dbaccess/source/ui/inc/sqledit.hxx b/dbaccess/source/ui/inc/sqledit.hxx
index 4150b22..038fa36 100644
--- a/dbaccess/source/ui/inc/sqledit.hxx
+++ b/dbaccess/source/ui/inc/sqledit.hxx
@@ -81,7 +81,7 @@ namespace dbaui
         void stopTimer();
         void startTimer();
 
-        virtual void    ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+        virtual void    ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
         using MultiLineEditSyntaxHighlight::Notify;
     };
 }
diff --git a/include/svl/hint.hxx b/include/svl/hint.hxx
index 8de965d..a31cea4 100644
--- a/include/svl/hint.hxx
+++ b/include/svl/hint.hxx
@@ -35,7 +35,6 @@
     // unused, formerly SFX_HINT_SAVECOMPLETED
     // unused, formerly SFX_HINT_RELEASEREF
 #define SFX_HINT_COLORS_CHANGED     0x00001000
-#define SFX_HINT_CTL_SETTINGS_CHANGED   0x00002000
 #define SFX_HINT_ACCESSIBILITY_CHANGED  0x00004000
     // unused, formerly SFX_HINT_VIEWCREATED
 #define SFX_HINT_USER00             0x00010000
diff --git a/include/svx/svdpntv.hxx b/include/svx/svdpntv.hxx
index 6188c7b..dcf6862 100644
--- a/include/svx/svdpntv.hxx
+++ b/include/svx/svdpntv.hxx
@@ -210,7 +210,7 @@ protected:
 
     // Interface to SdrPaintWindow
     void RemovePaintWindow(SdrPaintWindow& rOld);
-    void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    void ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 
 public:
     sal_uInt32 PaintWindowCount() const { return maPaintWindows.size(); }
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx
index 4c21528..a161157 100644
--- a/include/svx/svdview.hxx
+++ b/include/svx/svdview.hxx
@@ -200,7 +200,7 @@ public:
     virtual bool MouseMove(const MouseEvent& rMEvt, vcl::Window* pWin) override;
     virtual bool Command(const CommandEvent& rCEvt, vcl::Window* pWin) override;
 
-    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 
     bool SetAttributes(const SfxItemSet& rSet, bool bReplaceAll=false) { return SdrCreateView::SetAttributes(rSet,bReplaceAll); }
     bool SetStyleSheet(SfxStyleSheet* pStyleSheet, bool bDontRemoveHardAttr) { return SdrCreateView::SetStyleSheet(pStyleSheet,bDontRemoveHardAttr); }
diff --git a/include/unotools/options.hxx b/include/unotools/options.hxx
index 5b11373..552eb51 100644
--- a/include/unotools/options.hxx
+++ b/include/unotools/options.hxx
@@ -22,8 +22,24 @@
 
 #include <sal/config.h>
 #include <unotools/unotoolsdllapi.h>
+#include <o3tl/typed_flags_set.hxx>
 #include <vector>
 
+// bits for broadcasting hints of changes in ConfigurationListener::ConfigurationChanged, may be combined
+enum class ConfigurationHints {
+    NONE               = 0x0000,
+    Locale             = 0x0001,
+    Currency           = 0x0002,
+    UiLocale           = 0x0004,
+    DecSep             = 0x0008,
+    DatePatterns       = 0x0010,
+    IgnoreLang         = 0x0020,
+    CtlSettingsChanged = 0x2000,
+};
+namespace o3tl {
+    template<> struct typed_flags<ConfigurationHints> : is_typed_flags<ConfigurationHints, 0x203f> {};
+}
+
 /*
     The class utl::detail::Options provides a kind of multiplexer. It implements a ConfigurationListener
     that is usually registered at a ConfigItem class. At the same time it implements a ConfigurationBroadcaster
@@ -43,7 +59,7 @@ namespace utl {
     public:
         virtual ~ConfigurationListener();
 
-        virtual void ConfigurationChanged( ConfigurationBroadcaster* p, sal_uInt32 nHint ) = 0;
+        virtual void ConfigurationChanged( ConfigurationBroadcaster* p, ConfigurationHints nHint ) = 0;
     };
     typedef ::std::vector< ConfigurationListener* > IMPL_ConfigurationListenerList;
 
@@ -52,14 +68,14 @@ namespace utl {
     {
         IMPL_ConfigurationListenerList* mpList;
         sal_Int32               m_nBroadcastBlocked;     // broadcast only if this is 0
-        sal_uInt32              m_nBlockedHint;
+        ConfigurationHints      m_nBlockedHint;
 
     public:
         void AddListener( utl::ConfigurationListener* pListener );
         void RemoveListener( utl::ConfigurationListener* pListener );
 
         // notify listeners; nHint is an implementation detail of the particular class deriving from ConfigurationBroadcaster
-        void NotifyListeners( sal_uInt32 nHint );
+        void NotifyListeners( ConfigurationHints nHint );
         ConfigurationBroadcaster();
         virtual ~ConfigurationBroadcaster();
         virtual void BlockBroadcasts( bool bBlock );
@@ -85,7 +101,7 @@ private:
     void operator =(Options &) = delete;
 
 protected:
-    virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) override;
+    virtual void ConfigurationChanged( ::utl::ConfigurationBroadcaster* p, ConfigurationHints nHint ) override;
 };
 
 } }
diff --git a/include/unotools/syslocaleoptions.hxx b/include/unotools/syslocaleoptions.hxx
index f5cb835..d37fab8 100644
--- a/include/unotools/syslocaleoptions.hxx
+++ b/include/unotools/syslocaleoptions.hxx
@@ -29,14 +29,6 @@
 #include <i18nlangtag/languagetag.hxx>
 #include <unotools/options.hxx>
 
-// bits for broadcasting hints of changes in a SfxSimpleHint, may be combined
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_LOCALE       = 0x00000001;
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_CURRENCY     = 0x00000002;
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_UILOCALE     = 0x00000004;
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_DECSEP       = 0x00000008;
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_DATEPATTERNS = 0x00000010;
-const sal_uInt32 SYSLOCALEOPTIONS_HINT_IGNORELANG   = 0x00000020;
-
 class SvtSysLocaleOptions_Impl;
 class SvtListener;
 namespace osl { class Mutex; }
@@ -46,7 +38,7 @@ class SAL_WARN_UNUSED UNOTOOLS_DLLPUBLIC SvtSysLocaleOptions : public utl::detai
     std::shared_ptr<SvtSysLocaleOptions_Impl>  pImpl;
 
     UNOTOOLS_DLLPRIVATE static  ::osl::Mutex&       GetMutex();
-    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 nHint ) override;
+    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* p, ConfigurationHints nHint ) override;
 
 public:
 
diff --git a/include/vcl/settings.hxx b/include/vcl/settings.hxx
index e8b7c0a..343559d 100644
--- a/include/vcl/settings.hxx
+++ b/include/vcl/settings.hxx
@@ -45,6 +45,7 @@ struct ImplMiscData;
 struct ImplHelpData;
 struct ImplStyleData;
 struct ImplAllSettingsData;
+enum class ConfigurationHints;
 
 namespace vcl {
     class I18nHelper;
@@ -701,7 +702,7 @@ public:
 
     bool                                    operator ==( const AllSettings& rSet ) const;
     bool                                    operator !=( const AllSettings& rSet ) const;
-    static void                             LocaleSettingsChanged( sal_uInt32 nHint );
+    static void                             LocaleSettingsChanged( ConfigurationHints nHint );
     SvtSysLocale&                           GetSysLocale();
 };
 
diff --git a/reportdesign/source/ui/inc/ViewsWindow.hxx b/reportdesign/source/ui/inc/ViewsWindow.hxx
index 1951426..519a149 100644
--- a/reportdesign/source/ui/inc/ViewsWindow.hxx
+++ b/reportdesign/source/ui/inc/ViewsWindow.hxx
@@ -103,7 +103,7 @@ namespace rptui
         virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
 
         virtual void Paint( vcl::RenderContext& /*rRenderContext*/, const Rectangle& rRect ) override;
-        virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+        virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
     public:
         OViewsWindow(
             OReportWindow* _pReportWindow);
diff --git a/reportdesign/source/ui/report/ViewsWindow.cxx b/reportdesign/source/ui/report/ViewsWindow.cxx
index 33f9669..bdeaf06 100644
--- a/reportdesign/source/ui/report/ViewsWindow.cxx
+++ b/reportdesign/source/ui/report/ViewsWindow.cxx
@@ -533,7 +533,7 @@ void OViewsWindow::unmarkAllObjects(OSectionView* _pSectionView)
     }
 }
 
-void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32)
+void OViewsWindow::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints)
 {
     ImplInitSettings();
     Invalidate();
diff --git a/sc/inc/chgtrack.hxx b/sc/inc/chgtrack.hxx
index f00194d..1539ed3 100644
--- a/sc/inc/chgtrack.hxx
+++ b/sc/inc/chgtrack.hxx
@@ -977,7 +977,7 @@ class ScChangeTrack : public utl::ConfigurationListener
     bool IsLastAction( sal_uLong nNum ) const;
 
             void                ClearMsgQueue();
-    virtual void                ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void                ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 
 public:
 
diff --git a/sc/inc/scmod.hxx b/sc/inc/scmod.hxx
index 1715819..15ddc13 100644
--- a/sc/inc/scmod.hxx
+++ b/sc/inc/scmod.hxx
@@ -118,7 +118,7 @@ public:
     virtual            ~ScModule() override;
 
     virtual void        Notify( SfxBroadcaster& rBC, const SfxHint& rHint ) override;
-    virtual void        ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void        ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
     void                DeleteCfg();
 
                         // moved by the application
diff --git a/sc/source/core/tool/chgtrack.cxx b/sc/source/core/tool/chgtrack.cxx
index 81892b2..9a6963f 100644
--- a/sc/source/core/tool/chgtrack.cxx
+++ b/sc/source/core/tool/chgtrack.cxx
@@ -2244,7 +2244,7 @@ ScChangeAction* ScChangeTrack::GetLastSaved() const
         return nullptr;
 }
 
-void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
+void ScChangeTrack::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints )
 {
     if ( !pDoc->IsInDtorClear() )
     {
diff --git a/sc/source/ui/app/scmod.cxx b/sc/source/ui/app/scmod.cxx
index 435a00b..99e59de 100644
--- a/sc/source/ui/app/scmod.cxx
+++ b/sc/source/ui/app/scmod.cxx
@@ -212,7 +212,7 @@ ScModule::~ScModule()
     DeleteCfg(); // Called from Exit()
 }
 
-void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, sal_uInt32 )
+void ScModule::ConfigurationChanged( utl::ConfigurationBroadcaster* p, ConfigurationHints )
 {
     if ( p == pColorConfig || p == pAccessOptions )
     {
diff --git a/sc/source/ui/dbgui/csvgrid.cxx b/sc/source/ui/dbgui/csvgrid.cxx
index 2a26cc9..31cb87e 100644
--- a/sc/source/ui/dbgui/csvgrid.cxx
+++ b/sc/source/ui/dbgui/csvgrid.cxx
@@ -1012,7 +1012,7 @@ void ScCsvGrid::DataChanged( const DataChangedEvent& rDCEvt )
     ScCsvControl::DataChanged( rDCEvt );
 }
 
-void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
+void ScCsvGrid::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints )
 {
     InitColors();
     Repaint();
diff --git a/sc/source/ui/inc/csvgrid.hxx b/sc/source/ui/inc/csvgrid.hxx
index 65f909a..f813c79 100644
--- a/sc/source/ui/inc/csvgrid.hxx
+++ b/sc/source/ui/inc/csvgrid.hxx
@@ -254,7 +254,7 @@ protected:
 
     virtual void                DataChanged( const DataChangedEvent& rDCEvt ) override;
 
-    virtual void                ConfigurationChanged( ::utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void                ConfigurationChanged( ::utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 
     // painting ---------------------------------------------------------------
 protected:
diff --git a/sd/source/ui/inc/DrawViewShell.hxx b/sd/source/ui/inc/DrawViewShell.hxx
index a752df7..9a20e34 100644
--- a/sd/source/ui/inc/DrawViewShell.hxx
+++ b/sd/source/ui/inc/DrawViewShell.hxx
@@ -488,7 +488,7 @@ private:
 
     std::vector<std::unique_ptr<SdrExternalToolEdit>> m_ExternalEdits;
 
-    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, sal_uInt32 ) override;
+    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, ConfigurationHints ) override;
 
     void ConfigureAppBackgroundColor( svtools::ColorConfig* pColorConfig = nullptr );
 
diff --git a/sd/source/ui/inc/WindowUpdater.hxx b/sd/source/ui/inc/WindowUpdater.hxx
index fe531de..ee5dcd0 100644
--- a/sd/source/ui/inc/WindowUpdater.hxx
+++ b/sd/source/ui/inc/WindowUpdater.hxx
@@ -98,7 +98,7 @@ public:
     /** Callback that waits for notifications of a
         <type>SvtCTLOptions</type> object.
     */
-    virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, sal_uInt32 nHint) override;
+    virtual void ConfigurationChanged ( utl::ConfigurationBroadcaster*, ConfigurationHints nHint) override;
 
 private:
     /// Options to monitor for changes.
diff --git a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
index 87c5e8a..b0b5f55 100644
--- a/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
+++ b/sd/source/ui/slidesorter/inc/view/SlideSorterView.hxx
@@ -133,7 +133,7 @@ public:
 
     virtual void ConfigurationChanged (
         utl::ConfigurationBroadcaster* pBroadcaster,
-        sal_uInt32 nHint) override;
+        ConfigurationHints nHint) override;
 
     void HandleDataChangeEvent();
 
diff --git a/sd/source/ui/slidesorter/view/SlideSorterView.cxx b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
index f7cbdcf..e41790b 100644
--- a/sd/source/ui/slidesorter/view/SlideSorterView.cxx
+++ b/sd/source/ui/slidesorter/view/SlideSorterView.cxx
@@ -678,7 +678,7 @@ void SlideSorterView::Paint (
 
 void SlideSorterView::ConfigurationChanged (
     utl::ConfigurationBroadcaster* pBroadcaster,
-    sal_uInt32 nHint)
+    ConfigurationHints nHint)
 {
     // Some changes of the configuration (some of the colors for example)
     // may affect the previews.  Throw away the old ones and create new ones.
diff --git a/sd/source/ui/view/WindowUpdater.cxx b/sd/source/ui/view/WindowUpdater.cxx
index 4ed9b9f..54ce0e2 100644
--- a/sd/source/ui/view/WindowUpdater.cxx
+++ b/sd/source/ui/view/WindowUpdater.cxx
@@ -120,7 +120,7 @@ void WindowUpdater::UpdateWindow (OutputDevice* pDevice) const
     }
 }
 
-void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
+void WindowUpdater::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints )
 {
     // Set the current state at all registered output devices.
     tWindowList::iterator aWindowIterator (maWindowList.begin());
diff --git a/sd/source/ui/view/drviewsk.cxx b/sd/source/ui/view/drviewsk.cxx
index aaf11ddf..739fa58 100644
--- a/sd/source/ui/view/drviewsk.cxx
+++ b/sd/source/ui/view/drviewsk.cxx
@@ -14,7 +14,7 @@
 
 namespace sd {
 
-void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, sal_uInt32 )
+void DrawViewShell::ConfigurationChanged( utl::ConfigurationBroadcaster* pCb, ConfigurationHints )
 {
     ConfigureAppBackgroundColor( dynamic_cast<svtools::ColorConfig*>(pCb) );
 }
diff --git a/starmath/inc/smmod.hxx b/starmath/inc/smmod.hxx
index f88b5f1..15036a7 100644
--- a/starmath/inc/smmod.hxx
+++ b/starmath/inc/smmod.hxx
@@ -103,7 +103,7 @@ public:
     explicit SmModule(SfxObjectFactory* pObjFact);
     virtual ~SmModule() override;
 
-    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 
     svtools::ColorConfig &  GetColorConfig();
 
diff --git a/starmath/source/smmod.cxx b/starmath/source/smmod.cxx
index 1492880..c50cf31 100644
--- a/starmath/source/smmod.cxx
+++ b/starmath/source/smmod.cxx
@@ -185,7 +185,7 @@ svtools::ColorConfig & SmModule::GetColorConfig()
     return *mpColorConfig;
 }
 
-void SmModule::ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 )
+void SmModule::ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints )
 {
     ApplyColorConfigValues(*mpColorConfig);
 }
diff --git a/svl/source/config/cjkoptions.cxx b/svl/source/config/cjkoptions.cxx
index 3556cb7..6919488 100644
--- a/svl/source/config/cjkoptions.cxx
+++ b/svl/source/config/cjkoptions.cxx
@@ -144,7 +144,7 @@ void    SvtCJKOptions_Impl::SetAll(bool bSet)
 
         SetModified();
         Commit();
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 
@@ -231,7 +231,7 @@ void SvtCJKOptions_Impl::Load()
 void    SvtCJKOptions_Impl::Notify( const Sequence< OUString >& )
 {
     Load();
-    NotifyListeners(0);
+    NotifyListeners(ConfigurationHints::NONE);
 }
 
 void    SvtCJKOptions_Impl::ImplCommit()
diff --git a/svl/source/config/ctloptions.cxx b/svl/source/config/ctloptions.cxx
index 311a56a..cc46040 100644
--- a/svl/source/config/ctloptions.cxx
+++ b/svl/source/config/ctloptions.cxx
@@ -134,7 +134,7 @@ SvtCTLOptions_Impl::~SvtCTLOptions_Impl()
 void SvtCTLOptions_Impl::Notify( const Sequence< OUString >& )
 {
     Load();
-    NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED);
+    NotifyListeners(ConfigurationHints::CtlSettingsChanged);
 }
 
 void SvtCTLOptions_Impl::ImplCommit()
@@ -224,7 +224,7 @@ void SvtCTLOptions_Impl::ImplCommit()
     aValues.realloc(nRealCount);
     PutProperties( aNames, aValues );
     //broadcast changes
-    NotifyListeners(SFX_HINT_CTL_SETTINGS_CHANGED);
+    NotifyListeners(ConfigurationHints::CtlSettingsChanged);
 }
 
 void SvtCTLOptions_Impl::Load()
@@ -324,7 +324,7 @@ void SvtCTLOptions_Impl::SetCTLFontEnabled( bool _bEnabled )
     {
         m_bCTLFontEnabled = _bEnabled;
         SetModified();
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 void SvtCTLOptions_Impl::SetCTLSequenceChecking( bool _bEnabled )
@@ -333,7 +333,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceChecking( bool _bEnabled )
     {
         SetModified();
         m_bCTLSequenceChecking = _bEnabled;
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 void SvtCTLOptions_Impl::SetCTLSequenceCheckingRestricted( bool _bEnabled )
@@ -342,7 +342,7 @@ void SvtCTLOptions_Impl::SetCTLSequenceCheckingRestricted( bool _bEnabled )
     {
         SetModified();
         m_bCTLRestricted = _bEnabled;
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 void  SvtCTLOptions_Impl::SetCTLSequenceCheckingTypeAndReplace( bool _bEnabled )
@@ -351,7 +351,7 @@ void  SvtCTLOptions_Impl::SetCTLSequenceCheckingTypeAndReplace( bool _bEnabled )
     {
         SetModified();
         m_bCTLTypeAndReplace = _bEnabled;
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 void SvtCTLOptions_Impl::SetCTLCursorMovement( SvtCTLOptions::CursorMovement _eMovement )
@@ -360,7 +360,7 @@ void SvtCTLOptions_Impl::SetCTLCursorMovement( SvtCTLOptions::CursorMovement _eM
     {
         SetModified();
         m_eCTLCursorMovement = _eMovement;
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumerals )
@@ -369,7 +369,7 @@ void SvtCTLOptions_Impl::SetCTLTextNumerals( SvtCTLOptions::TextNumerals _eNumer
     {
         SetModified();
         m_eCTLTextNumerals = _eNumerals;
-        NotifyListeners(0);
+        NotifyListeners(ConfigurationHints::NONE);
     }
 }
 
diff --git a/svl/source/numbers/zforlist.cxx b/svl/source/numbers/zforlist.cxx
index c2617a5..964abdc 100644
--- a/svl/source/numbers/zforlist.cxx
+++ b/svl/source/numbers/zforlist.cxx
@@ -178,7 +178,7 @@ public:
     size_t                  Count()
                                 { return aFormatters.size(); }
 
-    virtual void            ConfigurationChanged( utl::ConfigurationBroadcaster*, sal_uInt32 ) override;
+    virtual void            ConfigurationChanged( utl::ConfigurationBroadcaster*, ConfigurationHints ) override;
 };
 
 SvNumberFormatterRegistry_Impl::SvNumberFormatterRegistry_Impl()
@@ -208,22 +208,22 @@ void SvNumberFormatterRegistry_Impl::Remove( SvNumberFormatter* pThis )
 }
 
 void SvNumberFormatterRegistry_Impl::ConfigurationChanged( utl::ConfigurationBroadcaster*,
-                                                           sal_uInt32 nHint)
+                                                           ConfigurationHints nHint)
 {
     ::osl::MutexGuard aGuard( SvNumberFormatter::GetMutex() );
 
-    if ( nHint & SYSLOCALEOPTIONS_HINT_LOCALE )
+    if ( nHint & ConfigurationHints::Locale )
     {
         for(SvNumberFormatter* pFormatter : aFormatters)
             pFormatter->ReplaceSystemCL( eSysLanguage );
         eSysLanguage = MsLangId::getRealLanguage( LANGUAGE_SYSTEM );
     }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list