[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 115 commits - accessibility/inc accessibility/source avmedia/Library_avmedia.mk avmedia/source basctl/source basegfx/source basic/inc basic/qa basic/source binaryurp/source bridges/inc compilerplugins/clang configure.ac connectivity/source cppcanvas/Library_cppcanvas.mk cppcanvas/source dictionaries distro-configs/LibreOfficeiOS.conf download.lst external/expat external/hyphen external/icu external/lcms2 external/libexttextcat external/libjpeg-turbo external/liblangtag external/librevenge external/libxml2 filter/qa filter/source framework/qa helpcontent2 hwpfilter/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_svg icon-themes/tango include/basegfx include/cppcanvas include/editeng include/filter include/sfx2 include/svtools include/svx include/test include/toolkit include/vcl include/xmloff ios/CustomTarget_iOS.mk ios/LibreOfficeKit ios/LibreOfficeLight ios/loApp.xcconfig.in officecfg/registry oox/source package/source qadevOOo/Jar_OOoRunner.mk qadevOOo/objdsc qadevOOo/tests README.md sc/CppunitTest_sc_arealinksobj.mk sc/CppunitTest_sc_subtotalfieldobj.mk sc/inc sc/Module_sc.mk sc/qa sc/README sc/source sc/uiconfig sd/qa sd/source sfx2/source slideshow/source solenv/gbuild starmath/source svl/source svx/source sw/inc sw/qa sw/source sw/uiconfig sw/UIConfig_swriter.mk test/Library_subsequenttest.mk test/source toolkit/source translations vcl/Executable_bmpfuzzer.mk vcl/Executable_giffuzzer.mk vcl/Executable_jpgfuzzer.mk vcl/Executable_pngfuzzer.mk vcl/Executable_wmffuzzer.mk vcl/Executable_xbmfuzzer.mk vcl/Executable_xpmfuzzer.mk vcl/inc vcl/ios vcl/osx vcl/source vcl/unx vcl/win vcl/workben writerfilter/source xmloff/source

Jan-Marek Glogowski glogow at fbihome.de
Wed Oct 11 12:59:20 UTC 2017


Rebased ref, commits from common ancestor:
commit f48b298e6f7a96c70c00714c60a769d2accf697d
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date:   Fri Sep 29 22:24:15 2017 +0200

    WIP Fix unprocessed shutdown events
    
    DO NOT MERGE!
    
    This is just a test patch, since I can't reproduce the
    Jenkins failures locally. It's not "make check" tested,
    just "make vcl".
    
    This fixes multiple problems, which I missed.
    
    We're not interested in WM_TIMER events, but in active
    SAL_MSG_TIMER_CALLBACK, which is indicated by PollForMessage().
    
    This includes a revert of "tdf#38915: don't wait on message queue
    if application already has quit.", which is commited as
    f054b9187155bc32b7d06808aea87127cb0a3a4f.
    
    We can't ignore the wait flag, just because the application will
    quit, as we have to deliver the expected event announced by
    pTimer->PollForMessage().
    
    And we don't try to "clean" the message queue, as invalid events
    are simply identified by their version ID.
    
    On Mac we can probably drop the workaround. We can't wait for a
    timer event in a redirected dispatch_async, for whatever reason.
    
    Then we want to correctly resize on Windows, which is tricky.
    While Windows resizes or moves a window, it spawns a nested message
    loop. No problem: our timer runs out of any message loop, we just
    can't use any direct processing anymore. But OTOH the message loop
    doen't want to deliver WM_MOVE or WM_SIZE events while busy, but
    this happens, when we open a large Writer document and the
    background job is busy. Worse, it delivers one event and then stops,
    freezing the whole GUI, until the busy job is finished.
    
    To prevent this mess, we ignore any jobs with lower then POST_PAINT
    priority, so we're not busy during resize or move... sig.
    
    Couldn't find any docs for this behaviour, nor somehow enforce
    the "appearance" of WM_MOVE or WM_SIZE messages.
    
    This also includes a fix for tdf#112975. I don't know why this was
    ever working at all, as AnyInput( ALL | ~TIMER ) was never working
    on Windows, as OTHER just checked for any messages, while it has to
    check for all messages, except the excpluded ones. Since we just
    can check for existing messages, we have to run multiple checks
    for all valid ranges. See GetOtherRanges for the implementation.
    
    In theory m_bDirectTimeout can be replaced with
    maSchedCtx.mnTimerPeriod == 0, but keeping the WinSalTimer
    independent from the Scheduler status seems to be the better
    approach here.
    
    Change-Id: If806d41c6fcfce10b0c4c7fdcf1df5df6ac16a1d

diff --git a/vcl/inc/svdata.hxx b/vcl/inc/svdata.hxx
index ad09439f60e1..dc28f7098c95 100644
--- a/vcl/inc/svdata.hxx
+++ b/vcl/inc/svdata.hxx
@@ -26,6 +26,7 @@
 #include <unotools/options.hxx>
 #include <vcl/svapp.hxx>
 #include <vcl/window.hxx>
+#include <vcl/task.hxx>
 
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/i18n/XCharacterClassification.hpp>
@@ -331,6 +332,7 @@ struct ImplSchedulerContext
     sal_uInt64              mnTimerPeriod = SAL_MAX_UINT64; ///< current timer period
     SchedulerMutex          maMutex;                        ///< lock counting mutex for scheduler locking
     bool                    mbActive = true;                ///< is the scheduler active?
+    TaskPriority            meMaxTaskPriority = TaskPriority::LOWEST;  ///< lowest task priority to schedule
 };
 
 struct ImplSVData
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 5ad6a1718f19..c242b4697ebf 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -26,15 +26,20 @@ class WinSalTimer final : public SalTimer, protected VersionedEvent
 {
     // for access to Impl* functions
     friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef );
-    // for access to m_bPollForMessage
+    // for access to GetNextVersionedEvent
     friend void CALLBACK SalTimerProc( PVOID data, BOOLEAN );
+    // for access to ImplHandleElapsedTimer
+    friend bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents, WPARAM *pTimerVer );
 
-    HANDLE       m_nTimerId;          ///< Windows timer id
-    bool         m_bPollForMessage;   ///< Run yield until a message is caught (most likely the 0ms timer)
+    HANDLE       m_nTimerId;             ///< Windows timer id
+    bool         m_bDirectTimeout;       ///< timeout can be processed directly
+    bool         m_bForceRealTimer;      ///< enforce using a real timer for 0ms
+    bool         m_bNeedsWakeupMessage;  ///< needs a wakeup message
 
     void ImplStart( sal_uIntPtr nMS );
     void ImplStop();
-    void ImplEmitTimerCallback();
+    void ImplHandleTimerEvent( WPARAM aWPARAM );
+    void ImplHandleElapsedTimer();
 
 public:
     WinSalTimer();
@@ -43,19 +48,43 @@ public:
     virtual void Start(sal_uIntPtr nMS) override;
     virtual void Stop() override;
 
-    inline bool IsValidWPARAM( WPARAM wParam ) const;
+    inline bool IsDirectTimeout() const;
+    inline bool HasTimerElapsed() const;
 
-    inline bool PollForMessage() const;
+    /**
+     * Enforces the usage of a real timer instead of the message queue
+     *
+     * Needed for Window resize processing, as this starts a modal event loop.
+     */
+    void SetForceRealTimer( bool bVal );
+    inline bool GetForceRealTimer() const;
+
+    /**
+     * Enforces the posting of a message to run the main loop
+     *
+     * If we're currently sleeping in GetMessage(), we need a wakeup message.
+     */
+    inline void SetNeedsWakeupMessage( bool bVal );
 };
 
-inline bool WinSalTimer::IsValidWPARAM( WPARAM aWPARAM ) const
+inline bool WinSalTimer::IsDirectTimeout() const
+{
+    return m_bDirectTimeout;
+}
+
+inline bool WinSalTimer::HasTimerElapsed() const
+{
+    return m_bDirectTimeout || ExistsValidEvent();
+}
+
+inline bool WinSalTimer::GetForceRealTimer() const
 {
-    return IsValidEventVersion( static_cast<sal_Int32>( aWPARAM ) );
+    return m_bForceRealTimer;
 }
 
-inline bool WinSalTimer::PollForMessage() const
+inline void WinSalTimer::SetNeedsWakeupMessage( bool bVal )
 {
-    return m_bPollForMessage;
+    m_bNeedsWakeupMessage = bVal;
 }
 
 #endif
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d475f30275b0..0334087f57cf 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -570,10 +570,10 @@ bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
         // handle available events
         NSEvent* pEvent = nil;
         NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
+        AquaSalInstance *pInst = GetSalData()->mpInstance;
         do
         {
             SolarMutexReleaser aReleaser;
-
 SAL_WNODEPRECATED_DECLARATIONS_PUSH
     // 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
             pEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
@@ -591,6 +591,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
 
             [NSApp updateWindows];
 
+            if ( AquaSalInstance::AnyInput( VclInputFlags::TIMER ) && !pInst->mbNoYieldLock && !bHadEvent )
+                continue;
             if ( !bHandleAllCurrentEvents || !pEvent || now < [pEvent timestamp] )
                 break;
         }
@@ -618,7 +620,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
         }
 
         // collect update rectangles
-        for( auto pSalFrame : GetSalData()->mpInstance->getFrames() )
+        for( auto pSalFrame : pInst->getFrames() )
         {
             AquaSalFrame* pFrame = static_cast<AquaSalFrame*>( pSalFrame );
             if( pFrame->mbShown && ! pFrame->maInvalidRect.IsEmpty() )
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 877fdfae85b5..e6336fbedd6e 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -44,30 +44,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
                                subtype: nEventId
                                data1: nUserData
                                data2: 0];
-    assert( pEvent );
     if ( nil == pEvent )
-        return;
-    if ( NO == bAtStart )
-    {
-        // nextEventMatchingMask has to run in the main thread!
-        assert([NSThread isMainThread]);
-
-        // Posting an event to the end of an empty queue fails,
-        // so we peek the queue and post to the start, if empty.
-        // Some Qt bugs even indicate nextEvent without dequeue
-        // sometimes blocks, so we dequeue and re-add the event.
-SAL_WNODEPRECATED_DECLARATIONS_PUSH
-// 'NSAnyEventMask' is deprecated: first deprecated in macOS 10.12
-        NSEvent* pPeekEvent = [NSApp nextEventMatchingMask: NSAnyEventMask
-SAL_WNODEPRECATED_DECLARATIONS_POP
-                               untilDate: nil
-                               inMode: NSDefaultRunLoopMode
-                               dequeue: YES];
-        if ( nil == pPeekEvent )
-            bAtStart = YES;
-        else
-            [NSApp postEvent: pPeekEvent atStart: YES];
-    }
+        std::abort();
     [NSApp postEvent: pEvent atStart: bAtStart];
 }
 
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 8fd26ec79a55..2b87b891a87a 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -172,7 +172,7 @@ void Scheduler::ImplDeInitScheduler()
     SAL_INFO( "vcl.schedule.deinit", "DeInit the scheduler - finished" );
     SAL_WARN_IF( 0 != nActiveTasks, "vcl.schedule.deinit", "DeInit active tasks: "
         << nActiveTasks << " (ignored: " << nIgnoredTasks << ")" );
-//    assert( nIgnoredTasks == nActiveTasks );
+    assert( nIgnoredTasks == nActiveTasks );
 #endif
 
     rSchedCtx.mpFirstSchedulerData = nullptr;
@@ -394,10 +394,15 @@ bool Scheduler::ProcessTaskScheduling()
         if ( !pSchedulerData->mpTask->IsActive() )
             goto next_entry;
 
+        // skip tasks with currently too low priority
+        const TaskPriority eTaskPriority = pSchedulerData->mpTask->GetPriority();
+        if ( eTaskPriority > rSchedCtx.meMaxTaskPriority )
+            goto next_entry;
+
         // skip ready tasks with lower priority than the most urgent (numerical lower is higher)
         nReadyPeriod = pSchedulerData->mpTask->UpdateMinPeriod( nMinPeriod, nTime );
         if ( ImmediateTimeoutMs == nReadyPeriod &&
-             (!pMostUrgent || (pSchedulerData->mpTask->GetPriority() < pMostUrgent->mpTask->GetPriority())) )
+             (!pMostUrgent || (eTaskPriority < pMostUrgent->mpTask->GetPriority())) )
         {
             if ( pMostUrgent && nMinPeriod > nMostUrgentPeriod )
                 nMinPeriod = nMostUrgentPeriod;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index a0a323b2d037..34bb7050bf24 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -472,11 +472,11 @@ static void ImplSalDispatchMessage( MSG* pMsg )
         ImplSalPostDispatchMsg( pMsg, lResult );
 }
 
-static bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
+bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents, WPARAM *pTimerVer = nullptr )
 {
     static sal_uInt32 nLastTicks = 0;
     MSG aMsg;
-    bool bWasMsg = false, bOneEvent = false;
+    bool bWasMsg = false, bOneEvent = false, bWasTimeoutMsg = false;
     ImplSVData *const pSVData = ImplGetSVData();
     WinSalTimer* pTimer = static_cast<WinSalTimer*>( pSVData->maSchedCtx.mpSalTimer );
 
@@ -491,6 +491,15 @@ static bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
         if ( bOneEvent )
         {
             bWasMsg = true;
+            if ( !bWasTimeoutMsg )
+            {
+                bWasTimeoutMsg = (aMsg.message == SAL_MSG_TIMER_CALLBACK);
+                if ( pTimerVer )
+                {
+                    *pTimerVer = aMsg.wParam;
+                    break;
+                }
+            }
             TranslateMessage( &aMsg );
             ImplSalDispatchMessage( &aMsg );
             if ( bHandleAllCurrentEvents
@@ -499,32 +508,42 @@ static bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
                 bHadNewerEvent = true;
             bOneEvent = !bHadNewerEvent;
         }
-        // busy loop to catch a message, eventually the 0ms timer.
-        // we don't need to loop, if we wait anyway.
-        if ( !bWait && !bWasMsg && pTimer && pTimer->PollForMessage() )
-        {
-            SwitchToThread();
-            continue;
-        }
+
         if ( !(bHandleAllCurrentEvents && bOneEvent) )
             break;
     }
     while( true );
 
+    // 0ms timeouts are handled out-of-bounds to prevent busy-locking the
+    // event loop
+    if ( (bHandleAllCurrentEvents || !bWasMsg)
+        && !bWasTimeoutMsg && pTimer && pTimer->IsDirectTimeout() )
+    {
+        pTimer->ImplHandleElapsedTimer();
+        bWasMsg = true;
+    }
+
     if ( bHandleAllCurrentEvents )
         nLastTicks = nCurTicks;
 
-    // Also check that we don't wait when application already has quit
-    if ( bWait && !bWasMsg && !pSVData->maAppData.mbAppQuit )
+    if ( bWait && !bWasMsg )
     {
+        pTimer->SetNeedsWakeupMessage( true );
         if ( GetMessageW( &aMsg, nullptr, 0, 0 ) )
         {
+            pTimer->SetNeedsWakeupMessage( false );
             bWasMsg = true;
             TranslateMessage( &aMsg );
             ImplSalDispatchMessage( &aMsg );
         }
+        else
+            pTimer->SetNeedsWakeupMessage( false );
     }
 
+    // we're back in the main loop after resize
+    if ( pTimer && !pTimerVer )
+        pTimer->SetForceRealTimer( false );
+
     return bWasMsg;
 }
 
@@ -540,8 +559,6 @@ bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
     SolarMutexReleaser aReleaser;
     if ( !IsMainThread() )
     {
-        // If you change the SendMessageW function, you might need to update
-        // the PeekMessage( ... PM_QS_POSTMESSAGE) calls!
         bDidWork = SendMessageW( mhComWnd, SAL_MSG_THREADYIELD,
                                  (WPARAM) false, (LPARAM) bHandleAllCurrentEvents );
         if ( !bDidWork && bWait )
@@ -659,17 +676,9 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, i
         {
             WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
             assert( pTimer != nullptr );
-            MSG aMsg;
-            bool bValidMSG = pTimer->IsValidWPARAM( wParam );
-            // PM_QS_POSTMESSAGE is needed, so we don't process the SendMessage from DoYield!
-            while ( PeekMessageW(&aMsg, pInst->mhComWnd, SAL_MSG_TIMER_CALLBACK,
-                                 SAL_MSG_TIMER_CALLBACK, PM_REMOVE | PM_NOYIELD | PM_QS_POSTMESSAGE) )
-            {
-                assert( !bValidMSG && "Unexpected non-last valid message" );
-                bValidMSG = pTimer->IsValidWPARAM( aMsg.wParam );
-            }
-            if ( bValidMSG )
-                pTimer->ImplEmitTimerCallback();
+            if ( pTimer->GetForceRealTimer() )
+                ImplSalYield( false, true, &wParam );
+            pTimer->ImplHandleTimerEvent( wParam );
             break;
         }
     }
@@ -696,10 +705,120 @@ LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lPa
     return nRet;
 }
 
+struct MsgRange
+{
+    UINT nStart;
+    UINT nEnd;
+};
+
+static std::vector<MsgRange> GetOtherRanges( VclInputFlags nType )
+{
+    assert( nType != VCL_INPUT_ANY );
+
+    const unsigned MAX_EXCL = 20;
+    // this array must be kept sorted!
+    const UINT nExclMessageIds[ MAX_EXCL ] =
+    {
+        0,
+
+        WM_MOVE, // 3
+        WM_SIZE, // 5
+        WM_PAINT, // 15
+        WM_TIMER, // 275
+
+        WM_MOUSEFIRST, // 512
+        513,
+        514,
+        515,
+        516,
+        517,
+        518,
+        519,
+        520,
+        WM_MOUSELAST, // 521
+
+        WM_KEYDOWN, // 656
+
+        SAL_MSG_POSTMOVE, // WM_USER+136
+        SAL_MSG_POSTCALLSIZE, // WM_USER+137
+
+        SAL_MSG_TIMER_CALLBACK, // WM_USER+162
+
+        UINT_MAX
+    };
+
+    bool aExclMessageList[ MAX_EXCL ] = { false, };
+    std::vector<MsgRange> aResult;
+
+    // set the excluded values
+    if ( !(nType & VclInputFlags::MOUSE) )
+    {
+        for ( unsigned i = 0; nExclMessageIds[ 5 + i ] <= WM_MOUSELAST; ++i )
+            aExclMessageList[ 5 + i ] = true;
+    }
+
+    if ( !(nType & VclInputFlags::KEYBOARD) )
+        aExclMessageList[ 15 ] = true;
+
+    if ( !(nType & VclInputFlags::PAINT) )
+    {
+        aExclMessageList[ 1 ] = true;
+        aExclMessageList[ 2 ] = true;
+        aExclMessageList[ 3 ] = true;
+        aExclMessageList[ 16 ] = true;
+        aExclMessageList[ 17 ] = true;
+    }
+
+    if ( !(nType & VclInputFlags::TIMER) )
+    {
+        aExclMessageList[ 4 ]  = true;
+        aExclMessageList[ 18 ]  = true;
+    }
+
+    // build the message ranges
+    MsgRange aRange = { 0, 0 };
+    bool doEnd = true;
+    for ( unsigned i = 1; i < MAX_EXCL; ++i )
+    {
+        if ( aExclMessageList[ i ] )
+        {
+            if ( !doEnd )
+            {
+                if ( nExclMessageIds[ i ] == aRange.nStart )
+                    ++aRange.nStart;
+                else
+                    doEnd = true;
+            }
+            if ( doEnd )
+            {
+                aRange.nEnd = nExclMessageIds[ i ] - 1;
+                aResult.push_back( aRange );
+                doEnd = false;
+                aRange.nStart = aRange.nEnd + 2;
+            }
+        }
+    }
+
+    if ( aRange.nStart != UINT_MAX )
+    {
+        aRange.nEnd = UINT_MAX;
+        aResult.push_back( aRange );
+    }
+
+    return aResult;
+}
+
 bool WinSalInstance::AnyInput( VclInputFlags nType )
 {
     MSG aMsg;
 
+    if ( nType & VclInputFlags::TIMER )
+    {
+        const WinSalTimer* pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
+        if ( pTimer && pTimer->HasTimerElapsed() )
+            return true;
+    }
+
     if ( (nType & VCL_INPUT_ANY) == VCL_INPUT_ANY )
     {
         // revert bugfix for #108919# which never reported timeouts when called from the timer handler
@@ -756,20 +875,13 @@ bool WinSalInstance::AnyInput( VclInputFlags nType )
                 return true;
         }
 
-        if ( nType & VclInputFlags::TIMER )
-        {
-            // Test for timer input
-            if ( PeekMessageW( &aMsg, nullptr, WM_TIMER, WM_TIMER,
-                                  PM_NOREMOVE | PM_NOYIELD ) )
-                return true;
-
-        }
-
         if ( nType & VclInputFlags::OTHER )
         {
-            // Test for any input
-            if ( PeekMessageW( &aMsg, nullptr, 0, 0, PM_NOREMOVE | PM_NOYIELD ) )
-                return true;
+            std::vector<MsgRange> aMsgRangeList( GetOtherRanges( nType ) );
+            for ( MsgRange aRange : aMsgRangeList )
+                if ( PeekMessageW( &aMsg, nullptr, aRange.nStart,
+                                   aRange.nEnd, PM_NOREMOVE | PM_NOYIELD ) )
+                    return true;
         }
     }
 
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 93b93fbb832f..013157e8b206 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -41,21 +41,16 @@ void WinSalTimer::ImplStop()
     const WinSalInstance *pInst = pSalData->mpInstance;
     assert( !pInst || pSalData->mnAppThreadId == GetCurrentThreadId() );
 
-    const HANDLE hTimer = m_nTimerId;
-    if ( nullptr == hTimer )
-        return;
+    if ( nullptr != m_nTimerId )
+    {
+        const HANDLE hTimer = m_nTimerId;
+        m_nTimerId = nullptr;
+        DeleteTimerQueueTimer( nullptr, hTimer, INVALID_HANDLE_VALUE );
+    }
 
-    m_nTimerId = nullptr;
-    DeleteTimerQueueTimer( nullptr, hTimer, INVALID_HANDLE_VALUE );
-    // Keep both after DeleteTimerQueueTimer, because they are set in SalTimerProc
+    m_bDirectTimeout = false;
+    // Keep after DeleteTimerQueueTimer, because it's set in SalTimerProc
     InvalidateEvent();
-    m_bPollForMessage = false;
-
-    // remove as many pending SAL_MSG_TIMER_CALLBACK messages as possible
-    // PM_QS_POSTMESSAGE is needed, so we don't process the SendMessage from DoYield!
-    MSG aMsg;
-    while ( PeekMessageW(&aMsg, pInst->mhComWnd, SAL_MSG_TIMER_CALLBACK,
-                         SAL_MSG_TIMER_CALLBACK, PM_REMOVE | PM_NOYIELD | PM_QS_POSTMESSAGE) );
 }
 
 void WinSalTimer::ImplStart( sal_uLong nMS )
@@ -70,20 +65,23 @@ void WinSalTimer::ImplStart( sal_uLong nMS )
     // cannot change a one-shot timer, so delete it and create a new one
     ImplStop();
 
-    // keep the yield running, if a 0ms Idle is scheduled
-    m_bPollForMessage = ( 0 == nMS );
+    // directly indicate an elapsed timer
+    m_bDirectTimeout = ( 0 == nMS );
     // probably WT_EXECUTEONLYONCE is not needed, but it enforces Period
     // to be 0 and should not hurt; also see
     // https://www.microsoft.com/msj/0499/pooling/pooling.aspx
-    CreateTimerQueueTimer(&m_nTimerId, nullptr, SalTimerProc,
-                          reinterpret_cast<void*>(
-                              sal_IntPtr(GetNextEventVersion())),
-                          nMS, 0, WT_EXECUTEINTIMERTHREAD | WT_EXECUTEONLYONCE);
+    if ( !m_bDirectTimeout || m_bForceRealTimer )
+        CreateTimerQueueTimer(&m_nTimerId, nullptr, SalTimerProc, this,
+                              nMS, 0, WT_EXECUTEINTIMERTHREAD | WT_EXECUTEONLYONCE);
+    else if ( m_bNeedsWakeupMessage )
+        PostMessageW( pSalData->mpInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK,
+                      static_cast<WPARAM>(GetNextEventVersion()), 0 );
 }
 
 WinSalTimer::WinSalTimer()
     : m_nTimerId( nullptr )
-    , m_bPollForMessage( false )
+    , m_bDirectTimeout( false )
+    , m_bForceRealTimer( false )
 {
 }
 
@@ -126,12 +124,10 @@ void CALLBACK SalTimerProc(PVOID data, BOOLEAN)
 {
     __try
     {
-        // always post message when the timer fires, we will remove the ones
-        // that happened during execution of the callback later directly from
-        // the message queue
-        BOOL const ret = PostMessageW(GetSalData()->mpInstance->mhComWnd,
-                                      SAL_MSG_TIMER_CALLBACK,
-                                      reinterpret_cast<WPARAM>(data), 0);
+        WinSalTimer *pTimer = reinterpret_cast<WinSalTimer*>( data );
+        BOOL const ret = PostMessageW(
+            GetSalData()->mpInstance->mhComWnd, SAL_MSG_TIMER_CALLBACK,
+            static_cast<WPARAM>(pTimer->GetNextEventVersion()), 0 );
 #if OSL_DEBUG_LEVEL > 0
         if (0 == ret) // SEH prevents using SAL_WARN here?
             fputs("ERROR: PostMessage() failed!\n", stderr);
@@ -142,15 +138,51 @@ void CALLBACK SalTimerProc(PVOID data, BOOLEAN)
     }
 }
 
-void WinSalTimer::ImplEmitTimerCallback()
+void WinSalTimer::ImplHandleElapsedTimer()
 {
     // Test for MouseLeave
     SalTestMouseLeave();
 
-    m_bPollForMessage = false;
+    m_bDirectTimeout = false;
     ImplSalYieldMutexAcquireWithWait();
     CallCallback();
     ImplSalYieldMutexRelease();
 }
 
+void WinSalTimer::ImplHandleTimerEvent( WPARAM aWPARAM )
+{
+    assert( aWPARAM <= SAL_MAX_INT32 );
+    if ( !IsValidEventVersion( static_cast<sal_Int32>( aWPARAM ) ) )
+        return;
+
+    ImplHandleElapsedTimer();
+}
+
+void WinSalTimer::SetForceRealTimer( bool bVal )
+{
+    if ( m_bForceRealTimer == bVal )
+        return;
+
+    m_bForceRealTimer = bVal;
+
+    ImplSchedulerContext &rSchedCtx = ImplGetSVData()->maSchedCtx;
+    if ( bVal )
+    {
+        rSchedCtx.meMaxTaskPriority = TaskPriority::POST_PAINT;
+        // we need a real timer, as m_bDirectTimeout won't be processed
+        if ( m_bDirectTimeout )
+            Start( 0 );
+    }
+    else
+    {
+        // we increase the potentially scheduled task list, so re-check
+        rSchedCtx.meMaxTaskPriority = TaskPriority::LOWEST;
+        if ( !m_bDirectTimeout )
+        {
+            rSchedCtx.mnTimerPeriod = 0;
+            Start( 0 );
+        }
+    }
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/win/window/salframe.cxx b/vcl/win/window/salframe.cxx
index 622fa7bba2b2..bb37d39563d4 100644
--- a/vcl/win/window/salframe.cxx
+++ b/vcl/win/window/salframe.cxx
@@ -3901,8 +3901,8 @@ static void ImplCallMoveHdl( HWND hWnd )
     {
         pFrame->CallCallback( SalEvent::Move, nullptr );
         // to avoid doing Paint twice by VCL and SAL
-        //if ( IsWindowVisible( hWnd ) && !pFrame->mbInShow )
-        //    UpdateWindow( hWnd );
+        if ( IsWindowVisible( hWnd ) && !pFrame->mbInShow )
+            UpdateWindow( hWnd );
     }
 }
 
@@ -3935,14 +3935,15 @@ static void ImplHandleMoveMsg( HWND hWnd )
                 pFrame->mbInMoveMsg = FALSE;
             }
 
-            // save state
             ImplSaveFrameState( pFrame );
 
-            // Call Hdl
-            //#93851 if we call this handler, VCL floating windows are not updated correctly
             ImplCallMoveHdl( hWnd );
 
             ImplSalYieldMutexRelease();
+
+            WinSalTimer* pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
+            if ( pTimer )
+                pTimer->SetForceRealTimer( true );
         }
 }
 
@@ -3977,6 +3978,10 @@ static void ImplHandleSizeMsg( HWND hWnd, WPARAM wParam, LPARAM lParam )
             ImplSaveFrameState( pFrame );
             // Call Hdl
             ImplCallSizeHdl( hWnd );
+
+            WinSalTimer* pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
+            if ( pTimer )
+                pTimer->SetForceRealTimer( true );
         }
     }
 }
@@ -5440,39 +5445,45 @@ LRESULT CALLBACK SalFrameWndProc( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lP
     static int  bInWheelMsg = FALSE;
     static int  bInQueryEnd = FALSE;
 
-    // By WM_CRETAE we connect the frame with the window handle
-    if ( nMsg == WM_CREATE )
-    {
-        // Save Window-Instance in Windowhandle
-        // Can also be used for the A-Version, because the struct
-        // to access lpCreateParams is the same structure
-        CREATESTRUCTW* pStruct = reinterpret_cast<CREATESTRUCTW*>(lParam);
-        WinSalFrame* pFrame = static_cast<WinSalFrame*>(pStruct->lpCreateParams);
-        if ( pFrame != nullptr )
-        {
-            SetWindowPtr( hWnd, pFrame );
-            // Set HWND already here, as data might be used already
-            // when messages are being sent by CreateWindow()
-            pFrame->mhWnd = hWnd;
-            pFrame->maSysData.hWnd = hWnd;
-        }
-        return 0;
-    }
-
     ImplSVData* pSVData = ImplGetSVData();
     // #i72707# TODO: the mbDeInit check will not be needed
     // once all windows that are not properly closed on exit got fixed
-    if( pSVData->mbDeInit )
+    if( pSVData->mbDeInit && nMsg != WM_CREATE )
+    {
+        SAL_WARN( "vcl", "Frame message after deinit!" );
+        rDef = FALSE;
         return 0;
+    }
 
-    if ( WM_USER_SYSTEM_WINDOW_ACTIVATED == nMsg )
+    // Handle global registered message AKA non-const
+    if ( nMsg == WM_USER_SYSTEM_WINDOW_ACTIVATED )
     {
         ImplHideSplash();
+        rDef = FALSE;
         return 0;
     }
 
     switch( nMsg )
     {
+        // By WM_CREATE we connect the frame with the window handle
+        case WM_CREATE:
+        {
+            // Save Window-Instance in Windowhandle
+            // Can also be used for the A-Version, because the struct
+            // to access lpCreateParams is the same structure
+            CREATESTRUCTW* pStruct = reinterpret_cast<CREATESTRUCTW*>(lParam);
+            WinSalFrame* pFrame = static_cast<WinSalFrame*>(pStruct->lpCreateParams);
+            if ( pFrame != nullptr )
+            {
+                SetWindowPtr( hWnd, pFrame );
+                // Set HWND already here, as data might be used already
+                // when messages are being sent by CreateWindow()
+                pFrame->mhWnd = hWnd;
+                pFrame->maSysData.hWnd = hWnd;
+            }
+            break;
+        }
+
         case WM_MOUSEMOVE:
         case WM_LBUTTONDOWN:
         case WM_MBUTTONDOWN:
commit fbfe55e58c4b14f86cbb2c7b822f727e5b2e4a66
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Mon Oct 9 16:25:27 2017 +0200

    There appears to be no need for -I. in SOLARINC
    
    See the mail sub-thread starting at
    <https://lists.freedesktop.org/archives/libreoffice/2017-October/078609.html>
    "Re: C[++]: Normalizing include syntax ("" vs <>)".
    
    Change-Id: Ibb636be643789d455e771fcd54913dd3cdd03815
    Reviewed-on: https://gerrit.libreoffice.org/43284
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/configure.ac b/configure.ac
index 475e81a5f2f0..85b603060e3a 100644
--- a/configure.ac
+++ b/configure.ac
@@ -4296,7 +4296,7 @@ WORKDIR="${BUILDDIR}/workdir"
 INSTDIR="${BUILDDIR}/instdir"
 INSTROOTBASE=${INSTDIR}${INSTROOTBASESUFFIX}
 INSTROOT=${INSTROOTBASE}${INSTROOTCONTENTSUFFIX}
-SOLARINC="-I. -I$SRC_ROOT/include $SOLARINC"
+SOLARINC="-I$SRC_ROOT/include $SOLARINC"
 AC_SUBST(COM)
 AC_SUBST(CPUNAME)
 AC_SUBST(RTL_OS)
diff --git a/solenv/gbuild/SdiTarget.mk b/solenv/gbuild/SdiTarget.mk
index 3e64fda43fd7..d7febb92aced 100644
--- a/solenv/gbuild/SdiTarget.mk
+++ b/solenv/gbuild/SdiTarget.mk
@@ -63,7 +63,7 @@ $(call gb_SdiTarget_get_clean_target,%) :
 			$(call gb_SdiTarget_get_target,$*))
 
 define gb_SdiTarget_SdiTarget
-$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $$(subst -I. ,-I$$(dir $(SRCDIR)/$(1)) ,$$(SOLARINC))
+$(call gb_SdiTarget_get_target,$(1)) : INCLUDE := $(SOLARINC)
 $(call gb_SdiTarget_get_target,$(1)) : EXPORTS := $(SRCDIR)/$(2).sdi
 ifeq ($(gb_FULLDEPS),$(true))
 -include $(call gb_SdiTarget_get_dep_target,$(1))
diff --git a/solenv/gbuild/platform/com_GCC_defs.mk b/solenv/gbuild/platform/com_GCC_defs.mk
index 977aa0c1eac1..11b7871a3e6f 100644
--- a/solenv/gbuild/platform/com_GCC_defs.mk
+++ b/solenv/gbuild/platform/com_GCC_defs.mk
@@ -193,7 +193,7 @@ gb_DEBUG_CXXFLAGS := $(FNO_DEFAULT_INLINE)
 
 
 gb_LinkTarget_INCLUDE :=\
-    $(subst -I. , ,$(SOLARINC)) \
+    $(SOLARINC) \
     -I$(BUILDDIR)/config_$(gb_Side) \
 
 ifeq ($(COM_IS_CLANG),TRUE)
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 08f1fa28fd98..cb4bc73b88ac 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -109,7 +109,7 @@ gb_LinkTarget_CXXFLAGS := $(gb_CXXFLAGS)
 gb_LinkTarget_CXXCLRFLAGS := $(gb_CXXCLRFLAGS)
 
 gb_LinkTarget_INCLUDE :=\
-	$(subst -I. , ,$(SOLARINC)) \
+	$(SOLARINC) \
 	$(foreach inc,$(subst ;, ,$(JDKINC)),-I$(inc)) \
 	-I$(BUILDDIR)/config_$(gb_Side) \
 
@@ -530,7 +530,7 @@ gb_AUTOCONF_WRAPPERS = \
     LD="$(shell cygpath -w $(COMPATH)/bin/link.exe) -nologo"
 
 gb_ExternalProject_INCLUDE := \
-	$(subst -I,,$(subst $(WHITESPACE),;,$(subst -I. , ,$(SOLARINC))))
+	$(subst -I,,$(subst $(WHITESPACE),;,$(SOLARINC)))
 
 # InstallScript class
 
commit 948c9c0a313d932d22cf275792077862eb4de334
Author: Stephan Bergmann <sbergman at redhat.com>
Date:   Wed Oct 11 10:45:27 2017 +0200

    Use unique class names for better FlameGraph results
    
    ...of measuring loplugin performance, when gathering data with perf and all
    plugins that used "Visitor" as class name were lumped together.  (Cf.
    <https://whatofhow.wordpress.com/2016/06/28/plugin-flamed/>.)
    
    Change-Id: Ie482f443faced7469528da4772e735bc2eda596d
    Reviewed-on: https://gerrit.libreoffice.org/43324
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>
    Tested-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/compilerplugins/clang/casttovoid.cxx b/compilerplugins/clang/casttovoid.cxx
index 10f1a6556d66..c6fccf07e7ab 100644
--- a/compilerplugins/clang/casttovoid.cxx
+++ b/compilerplugins/clang/casttovoid.cxx
@@ -43,11 +43,11 @@ Expr const * lookThroughInitListExpr(Expr const * expr) {
     return expr;
 }
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class CastToVoid final:
+    public RecursiveASTVisitor<CastToVoid>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit CastToVoid(InstantiationData const & data): Plugin(data) {}
 
     bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
         auto const dre = checkCast(expr);
@@ -325,13 +325,13 @@ private:
         DeclRefExpr const * firstConsumption = nullptr;
     };
 
-    struct CastToVoid {
+    struct Cast {
         ExplicitCastExpr const * cast;
         DeclRefExpr const * sub;
     };
 
     std::map<VarDecl const *, Usage> vars_;
-    std::stack<CastToVoid> castToVoid_;
+    std::stack<Cast> castToVoid_;
     std::stack<QualType> returnTypes_;
 
     void run() override {
@@ -490,7 +490,7 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("casttovoid");
+static loplugin::Plugin::Registration<CastToVoid> reg("casttovoid");
 
 }
 
diff --git a/compilerplugins/clang/dllprivate.cxx b/compilerplugins/clang/dllprivate.cxx
index 05cf26d7d5d2..3dc54e2fce64 100644
--- a/compilerplugins/clang/dllprivate.cxx
+++ b/compilerplugins/clang/dllprivate.cxx
@@ -11,11 +11,11 @@
 
 namespace {
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class DllPrivate final:
+    public RecursiveASTVisitor<DllPrivate>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit DllPrivate(InstantiationData const & data): Plugin(data) {}
 
     bool VisitNamedDecl(NamedDecl const * decl) {
         if (!decl->getLocation().isInvalid()&&ignoreLocation(decl)) {
@@ -72,7 +72,7 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("dllprivate");
+static loplugin::Plugin::Registration<DllPrivate> reg("dllprivate");
 
 }
 
diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx
index 8cae22fbe534..e6e1f6eb79df 100644
--- a/compilerplugins/clang/dyncastvisibility.cxx
+++ b/compilerplugins/clang/dyncastvisibility.cxx
@@ -75,11 +75,11 @@ StringRef vis(Visibility v) {
     }
 }
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class DynCastVisibility final:
+    public RecursiveASTVisitor<DynCastVisibility>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit DynCastVisibility(InstantiationData const & data): Plugin(data) {}
 
     bool shouldVisitTemplateInstantiations() const { return true; }
 
@@ -156,7 +156,8 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("dyncastvisibility");
+static loplugin::Plugin::Registration<DynCastVisibility> reg(
+    "dyncastvisibility");
 
 }
 
diff --git a/compilerplugins/clang/redundantcopy.cxx b/compilerplugins/clang/redundantcopy.cxx
index 18190f1eb0e4..b1216689dbb4 100644
--- a/compilerplugins/clang/redundantcopy.cxx
+++ b/compilerplugins/clang/redundantcopy.cxx
@@ -13,11 +13,11 @@
 
 namespace {
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class RedundantCopy final:
+    public RecursiveASTVisitor<RedundantCopy>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit RedundantCopy(InstantiationData const & data): Plugin(data) {}
 
     bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) {
         if (ignoreLocation(expr)) {
@@ -51,7 +51,7 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("redundantcopy");
+static loplugin::Plugin::Registration<RedundantCopy> reg("redundantcopy");
 
 }
 
diff --git a/compilerplugins/clang/redundantinline.cxx b/compilerplugins/clang/redundantinline.cxx
index 88c870d75465..8ef9e040a997 100644
--- a/compilerplugins/clang/redundantinline.cxx
+++ b/compilerplugins/clang/redundantinline.cxx
@@ -13,11 +13,12 @@
 
 namespace {
 
-class Visitor:
-    public RecursiveASTVisitor<Visitor>, public loplugin::RewritePlugin
+class RedundantInline:
+    public RecursiveASTVisitor<RedundantInline>, public loplugin::RewritePlugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): RewritePlugin(data) {}
+    explicit RedundantInline(InstantiationData const & data):
+        RewritePlugin(data) {}
 
     void run() override {
         if (compiler.getLangOpts().CPlusPlus) {
@@ -120,7 +121,7 @@ private:
     }
 };
 
-loplugin::Plugin::Registration<Visitor> reg("redundantinline", true);
+loplugin::Plugin::Registration<RedundantInline> reg("redundantinline", true);
 
 }
 
diff --git a/compilerplugins/clang/salunicodeliteral.cxx b/compilerplugins/clang/salunicodeliteral.cxx
index 410a1aba45c9..a095da8267d9 100644
--- a/compilerplugins/clang/salunicodeliteral.cxx
+++ b/compilerplugins/clang/salunicodeliteral.cxx
@@ -19,11 +19,11 @@ bool isAsciiCharacterLiteral(Expr const * expr) {
     return false;
 }
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class SalUnicodeLiteral final:
+    public RecursiveASTVisitor<SalUnicodeLiteral>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit SalUnicodeLiteral(InstantiationData const & data): Plugin(data) {}
 
     bool VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) {
         check(expr);
@@ -89,7 +89,8 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("salunicodeliteral");
+static loplugin::Plugin::Registration<SalUnicodeLiteral> reg(
+    "salunicodeliteral");
 
 }
 
diff --git a/compilerplugins/clang/subtlezeroinit.cxx b/compilerplugins/clang/subtlezeroinit.cxx
index c6c3486bd8c0..0871dbbabc67 100644
--- a/compilerplugins/clang/subtlezeroinit.cxx
+++ b/compilerplugins/clang/subtlezeroinit.cxx
@@ -17,11 +17,11 @@
 
 namespace {
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class SubtleZeroInit final:
+    public RecursiveASTVisitor<SubtleZeroInit>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit SubtleZeroInit(InstantiationData const & data): Plugin(data) {}
 
     bool VisitCXXNewExpr(CXXNewExpr const * expr) {
         if (ignoreLocation(expr)) {
@@ -52,7 +52,7 @@ private:
     }
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("subtlezeroinit");
+static loplugin::Plugin::Registration<SubtleZeroInit> reg("subtlezeroinit");
 
 }
 
diff --git a/compilerplugins/clang/unicodetochar.cxx b/compilerplugins/clang/unicodetochar.cxx
index 92660a118722..ad25c9b4508e 100644
--- a/compilerplugins/clang/unicodetochar.cxx
+++ b/compilerplugins/clang/unicodetochar.cxx
@@ -17,11 +17,11 @@
 
 namespace {
 
-class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::Plugin
+class UnicodeToChar final:
+    public RecursiveASTVisitor<UnicodeToChar>, public loplugin::Plugin
 {
 public:
-    explicit Visitor(InstantiationData const & data): Plugin(data) {}
+    explicit UnicodeToChar(InstantiationData const & data): Plugin(data) {}
 
     bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
         subExprs_.push(expr->getSubExpr());
@@ -81,7 +81,7 @@ private:
     std::stack<Expr const *> subExprs_;
 };
 
-static loplugin::Plugin::Registration<Visitor> reg("unicodetochar");
+static loplugin::Plugin::Registration<UnicodeToChar> reg("unicodetochar");
 
 }
 
commit 10ba813b349fc7db3a2304ab9d31cccd06039cc6
Author: Andrea Gelmini <andrea.gelmini at gelma.net>
Date:   Wed Oct 11 12:47:52 2017 +0200

    Fix typo
    
    Change-Id: Iab17008c8cc122176fb51b8766540d59cd681b35
    Reviewed-on: https://gerrit.libreoffice.org/43316
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
    Tested-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 8e1423cf1380..3ae08a1f56cf 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -4971,7 +4971,7 @@ void DomainMapper_Impl::startOrEndPermissionRange(sal_Int32 permissinId)
                 xTextAppend->insertTextContent(xCurrent, xPerm, bAbsorb);
             }
 
-            // remove proccessed permission
+            // remove processed permission
             m_aPermMap.erase(aPermIter);
 
             // clean up
commit 9e6154152cb2a5ea4649bb62c6c1070ffecf7115
Author: jan Iversen <jani at libreoffice.org>
Date:   Wed Oct 11 13:07:44 2017 +0200

    iOS, actived more 3rd libraries
    
    configure.ac compete with autogen.input, meaning a lot of enable/disable
    are set set in configure.ac and cannot be changed.
    
    Change-Id: I9e2b42b676fef67af6df81288214428f45fc4844

diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index 56737ffe42dc..2041cabe51a9 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -3,7 +3,6 @@
 --disable-online-update
 --disable-systray
 
---without-doxygen
 --without-export-validation
 --without-helppack-integration
 --without-java
@@ -14,7 +13,6 @@
 
 --disable-avahi
 --disable-avmedia
---disable-cairo-canvas
 --disable-compiler-plugins
 --disable-cups
 --disable-database-connectivity
commit 0df51086b71af8755f3eacca8a3c2dd1329fa191
Author: jan Iversen <jani at libreoffice.org>
Date:   Wed Oct 11 11:58:32 2017 +0200

    iOS, make linking of LO dependent
    
    Added a flag to remove need for LO in app, this allows faster change
    of UI changes.
    
    Change-Id: Iad3be518733cbd3ce092eebab76f8f66e91e579d

diff --git a/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm b/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
index 677386ce196b..501c21cea8ae 100644
--- a/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
+++ b/ios/LibreOfficeLight/LibreOfficeLight/LibreOfficeKit.mm
@@ -9,16 +9,16 @@
 #include <TargetConditionals.h>
 #define LOK_USE_UNSTABLE_API
 #include <LibreOfficeKit/LibreOfficeKitInit.h>
-
 #include <osl/process.h>
-
 #include <unicode/udata.h>
 #include <unicode/ucnv.h>
 
+//#define NO_LO
+
 // generated by solenv/bin/native-code.py:
+#ifndef NO_LO
 #include "native-code.mm"
 
-
 // Force reference to libreofficekit_hook
 extern "C" __attribute__((used)) void *libreofficekit_hook(const char *);
 static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook;
@@ -26,6 +26,7 @@ static __attribute__((used)) void *(*foop)(const char *) = libreofficekit_hook;
 // pointers to our instance
 static LibreOfficeKit* kit;
 static LibreOfficeKitDocument* document;
+#endif
 
 
 
@@ -38,15 +39,19 @@ extern "C" int BridgeLOkit_Init(const char *path)
     strcpy(bufUserPath + strlen(path), "/user");
 
     // Initialize LibreOfficeKit
+#ifndef NO_LO
     if (!kit)
       kit = lok_init_2(path, bufUserPath);
+#endif
     return 0;
 }
 
 int LOkit_open(char *file)
 {
+#ifndef NO_LO
     document = kit->pClass->documentLoad(kit, file);
     document->pClass->initializeForRendering(document, "");
+#endif
     return 0;
 }
 
commit dd292ad0c87c2657de0722e0eff30c84ad30efba
Author: jan Iversen <jani at libreoffice.org>
Date:   Wed Oct 11 11:56:58 2017 +0200

    iOS, support for more 3rd party libraries
    
    Change-Id: I56bd134bc854578f52a56256e164a3279a0c74b1

diff --git a/distro-configs/LibreOfficeiOS.conf b/distro-configs/LibreOfficeiOS.conf
index e53884470923..56737ffe42dc 100644
--- a/distro-configs/LibreOfficeiOS.conf
+++ b/distro-configs/LibreOfficeiOS.conf
@@ -21,21 +21,13 @@
 --disable-dbgutil
 --disable-dconf
 --disable-dependency-tracking
---disable-dynamic-loading
---disable-epm
 --disable-extensions
---disable-gltf
---disable-gstreamer-0-10
---disable-gstreamer-1-0
 --disable-kde4
 --disable-odk
 --disable-openssl
 --disable-pdfium
 --disable-python
---disable-randr
---disable-scripting
 
---without-galleries
 --without-tls
 
 --enable-debug
commit be3bc11d38dbd10bf6fe3ac78003515dbd6cbd3c
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 10 17:14:19 2017 +0100

    ofz#3507: keep early failure of ofz#3110 in sync to address oom
    
    Change-Id: Ic3bcfd684295293431d576931ef082a4ea09404a
    Reviewed-on: https://gerrit.libreoffice.org/43322
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/sw/source/filter/ww8/ww8scan.cxx b/sw/source/filter/ww8/ww8scan.cxx
index e41a89e8e682..d02cb762ed78 100644
--- a/sw/source/filter/ww8/ww8scan.cxx
+++ b/sw/source/filter/ww8/ww8scan.cxx
@@ -2153,7 +2153,7 @@ void WW8PLCF::GeneratePLCF(SvStream& rSt, sal_Int32 nPN, sal_Int32 ncpN)
     bool failure = false;
     nIMax = ncpN;
 
-    if ((nIMax < 1) || (nIMax > (WW8_CP_MAX - 4)/6) || ((nPN + ncpN) > USHRT_MAX) || nPN < 0)
+    if ((nIMax < 1) || (nIMax > (WW8_CP_MAX - 4) / (4 + nStru)) || ((nPN + ncpN) > USHRT_MAX) || nPN < 0)
         failure = true;
 
     if (!failure)
commit 8809915132522a2a05aab0020a6c424c271fcf6b
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 10 17:43:08 2017 +0100

    tighten eps preview search
    
    Change-Id: I61e870dc408564b889c2ef115191f34c99286f2a
    Reviewed-on: https://gerrit.libreoffice.org/43323
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/graphicfilter/ieps/ieps.cxx b/filter/source/graphicfilter/ieps/ieps.cxx
index 4c9f66e49ab7..b74f0805bab2 100644
--- a/filter/source/graphicfilter/ieps/ieps.cxx
+++ b/filter/source/graphicfilter/ieps/ieps.cxx
@@ -669,8 +669,11 @@ ipsGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
                                     {
                                         while ( bIsValid && ( nBitsLeft != 7 ) )
                                         {
-                                            rStream.ReadChar( nByte );
-                                            switch ( nByte )
+                                            rStream.ReadChar(nByte);
+                                            bIsValid = rStream.good();
+                                            if (!bIsValid)
+                                                break;
+                                            switch (nByte)
                                             {
                                                 case 0x0a :
                                                     if ( --nScanLines < 0 )
commit 68a41746093cad4307fe582d2c907d7b609b4498
Author: Caolán McNamara <caolanm at redhat.com>
Date:   Tue Oct 10 14:26:56 2017 +0100

    ofz#3602: some modes depend on unread data existing
    
    Change-Id: I08309010e5138fe62c15c803da3284217b685c8b
    Reviewed-on: https://gerrit.libreoffice.org/43321
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>
    Tested-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/filter/source/graphicfilter/itiff/itiff.cxx b/filter/source/graphicfilter/itiff/itiff.cxx
index c38ee4975540..192f3deae086 100644
--- a/filter/source/graphicfilter/itiff/itiff.cxx
+++ b/filter/source/graphicfilter/itiff/itiff.cxx
@@ -107,6 +107,8 @@ private:
     void    ReadHeader();
     void    ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen );
 
+    sal_uInt8* getMapData(sal_uInt32 np);
+
     bool    ReadMap();
         // reads/decompresses the bitmap data and fills aMap
 
@@ -503,6 +505,11 @@ void TIFFReader::ReadTagData( sal_uInt16 nTagType, sal_uInt32 nDataLen)
         bStatus = false;
 }
 
+sal_uInt8* TIFFReader::getMapData(sal_uInt32 np)
+{
+    aMap[np].resize(nBytesPerRow);
+    return aMap[np].data();
+}
 
 bool TIFFReader::ReadMap()
 {
@@ -524,15 +531,7 @@ bool TIFFReader::ReadMap()
                 if ( nStrip >= aStripOffsets.size())
                     return false;
                 pTIFF->Seek( aStripOffsets[ nStrip ] + ( ny % GetRowsPerStrip() ) * nStripBytesPerRow );
-                try
-                {
-                    aMap[np].resize(nBytesPerRow);
-                }
-                catch (const std::bad_alloc &)
-                {
-                    return false;
-                }
-                pTIFF->ReadBytes(aMap[np].data(), nBytesPerRow);
+                pTIFF->ReadBytes(getMapData(np), nBytesPerRow);
                 if (!pTIFF->good())
                     return false;
             }
@@ -599,15 +598,7 @@ bool TIFFReader::ReadMap()
                 }
                 if (np >= SAL_N_ELEMENTS(aMap))
                     return false;
-                try
-                {
-                    aMap[np].resize(nBytesPerRow);
-                }
-                catch (const std::bad_alloc &)
-                {
-                    return false;
-                }
-                DecompressStatus aResult = aCCIDecom.DecompressScanline(aMap[np].data(), nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes, np + 1 == nPlanes);
+                DecompressStatus aResult = aCCIDecom.DecompressScanline(getMapData(np), nImageWidth * nBitsPerSample * nSamplesPerPixel / nPlanes, np + 1 == nPlanes);
                 if (!aResult.m_bSuccess)
                     return false;
                 bDifferentToPrev |= !aResult.m_bBufferUnchanged;
@@ -652,15 +643,7 @@ bool TIFFReader::ReadMap()
                 }
                 if (np >= SAL_N_ELEMENTS(aMap))
                     return false;
-                try
-                {
-                    aMap[np].resize(nBytesPerRow);
-                }
-                catch (const std::bad_alloc &)
-                {
-                    return false;
-                }
-                if ( ( aLZWDecom.Decompress(aMap[np].data(), nBytesPerRow) != nBytesPerRow ) || pTIFF->GetError() )
+                if ( ( aLZWDecom.Decompress(getMapData(np), nBytesPerRow) != nBytesPerRow ) || pTIFF->GetError() )
                     return false;
             }
             if ( !ConvertScanline( ny ) )
@@ -687,15 +670,7 @@ bool TIFFReader::ReadMap()
                 sal_uInt32 nRowBytesLeft = nBytesPerRow;
                 if (np >= SAL_N_ELEMENTS(aMap))
                     return false;
-                try
-                {
-                    aMap[np].resize(nBytesPerRow);
-                }
-                catch (const std::bad_alloc &)
-                {
-                    return false;
-                }
-                sal_uInt8* pdst = aMap[np].data();
+                sal_uInt8* pdst = getMapData(np);
                 do
                 {
                     sal_uInt8 nRecHeader(0);
@@ -810,7 +785,7 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
         if ( nBitsPerSample == 8 && nSamplesPerPixel >= 3 &&
              nPlanes == 1 && nPhotometricInterpretation == 2 )
         {
-            sal_uInt8*  pt = aMap[0].data();
+            sal_uInt8* pt = getMapData(0);
 
             // are the values being saved as difference?
             if ( 2 == nPredictor )
@@ -854,15 +829,15 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
                 {
                     if ( nPlanes < 3 )
                     {
-                        nRed = GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample );
-                        nGreen = GetBits( aMap[1].data(), ( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
-                        nBlue = GetBits( aMap[2].data(), ( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
+                        nRed = GetBits( getMapData(0), ( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample );
+                        nGreen = GetBits( getMapData(1), ( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
+                        nBlue = GetBits( getMapData(2), ( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
                     }
                     else
                     {
-                        nRed = GetBits( aMap[0].data(), nx * nBitsPerSample, nBitsPerSample );
-                        nGreen = GetBits( aMap[1].data(), nx * nBitsPerSample, nBitsPerSample );
-                        nBlue = GetBits( aMap[2].data(), nx * nBitsPerSample, nBitsPerSample );
+                        nRed = GetBits( getMapData(0), nx * nBitsPerSample, nBitsPerSample );
+                        nGreen = GetBits( getMapData(1), nx * nBitsPerSample, nBitsPerSample );
+                        nBlue = GetBits( getMapData(2), nx * nBitsPerSample, nBitsPerSample );
                     }
                     xAcc->SetPixel( nY, nx, Color( (sal_uInt8)( nRed - nMinMax ), (sal_uInt8)( nGreen - nMinMax ), (sal_uInt8)(nBlue - nMinMax) ) );
                 }
@@ -877,15 +852,15 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
                 {
                     if ( nPlanes < 3 )
                     {
-                        nRed = GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample );
-                        nGreen = GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
-                        nBlue = GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
+                        nRed = GetBits( getMapData(0), ( nx * nSamplesPerPixel + 0 ) * nBitsPerSample, nBitsPerSample );
+                        nGreen = GetBits( getMapData(0), ( nx * nSamplesPerPixel + 1 ) * nBitsPerSample, nBitsPerSample );
+                        nBlue = GetBits( getMapData(0), ( nx * nSamplesPerPixel + 2 ) * nBitsPerSample, nBitsPerSample );
                     }
                     else
                     {
-                        nRed = GetBits( aMap[0].data(), nx * nBitsPerSample, nBitsPerSample );
-                        nGreen = GetBits( aMap[1].data(), nx * nBitsPerSample, nBitsPerSample );
-                        nBlue = GetBits( aMap[2].data(), nx * nBitsPerSample, nBitsPerSample );
+                        nRed = GetBits( getMapData(0), nx * nBitsPerSample, nBitsPerSample );
+                        nGreen = GetBits( getMapData(1), nx * nBitsPerSample, nBitsPerSample );
+                        nBlue = GetBits( getMapData(2), nx * nBitsPerSample, nBitsPerSample );
                     }
                     nRed = 255 - (sal_uInt8)( nRed - nMinMax );
                     nGreen = 255 - (sal_uInt8)( nGreen - nMinMax );
@@ -909,9 +884,9 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
                         for( ns = 0; ns < 4; ns++ )
                         {
                             if( nPlanes < 3 )
-                                nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
+                                nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( getMapData(0), ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
                             else
-                                nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( aMap[ns].data(), nx * nBitsPerSample, nBitsPerSample );
+                                nSampLast[ ns ] = nSampLast[ ns ] + (sal_uInt8) GetBits( getMapData(ns), nx * nBitsPerSample, nBitsPerSample );
                             nSamp[ ns ] = nSampLast[ ns ];
                         }
                     }
@@ -920,9 +895,9 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
                         for( ns = 0; ns < 4; ns++ )
                         {
                             if( nPlanes < 3 )
-                                nSamp[ ns ] = (sal_uInt8) GetBits( aMap[0].data(), ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
+                                nSamp[ ns ] = (sal_uInt8) GetBits( getMapData(0), ( nx * nSamplesPerPixel + ns ) * nBitsPerSample, nBitsPerSample );
                             else
-                                nSamp[ ns ]= (sal_uInt8) GetBits( aMap[ns].data(), nx * nBitsPerSample, nBitsPerSample );
+                                nSamp[ ns ]= (sal_uInt8) GetBits( getMapData(ns), nx * nBitsPerSample, nBitsPerSample );
                         }
                     }
                     const long nBlack = nSamp[ 3 ];
@@ -942,7 +917,7 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
         if ( nMaxSampleValue > nMinSampleValue )
         {
             sal_uInt32 nMinMax = ( ( 1 << nDstBitsPerPixel ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
-            sal_uInt8* pt = aMap[0].data();
+            sal_uInt8* pt = getMapData(0);
             sal_uInt8* ptend = pt + nBytesPerRow;
             sal_uInt8 nShift;
 
@@ -1100,7 +1075,7 @@ bool TIFFReader::ConvertScanline(sal_Int32 nY)
         if ( nMaxSampleValue > nMinSampleValue )
         {
             sal_uInt32 nMinMax = ( ( 1 << 8 /*nDstBitsPerPixel*/ ) - 1 ) / ( nMaxSampleValue - nMinSampleValue );
-            sal_uInt8*  pt = aMap[0].data();
+            sal_uInt8*  pt = getMapData(0);
             for (sal_Int32 nx = 0; nx < nImageWidth; nx++, pt += 2 )
             {
                 SetPixelIndex(xAcc.get(), nY, nx, static_cast<sal_uInt8>( ((sal_uInt32)*pt - nMinSampleValue) * nMinMax));
@@ -1581,8 +1556,14 @@ extern "C" SAL_DLLPUBLIC_EXPORT bool SAL_CALL
 itiGraphicImport( SvStream & rStream, Graphic & rGraphic, FilterConfigItem* )
 {
     TIFFReader aTIFFReader;
-
-    return aTIFFReader.ReadTIFF( rStream, rGraphic );
+    try
+    {
+        return aTIFFReader.ReadTIFF(rStream, rGraphic);
+    }
+    catch (const std::bad_alloc &)
+    {
+        return false;
+    }
 }
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit d8d0914be7b5fee3e21ec088f518b09281ed34ee
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Wed Oct 11 00:31:44 2017 +0200

    connectivity writer driver: survive merged cells
    
    Fow now just don't crash on them, instead give empty result for those
    cells.
    
    Change-Id: I9edd231b00fa00af95408a550484da74c98275da
    Reviewed-on: https://gerrit.libreoffice.org/43319
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

diff --git a/connectivity/source/drivers/writer/WTable.cxx b/connectivity/source/drivers/writer/WTable.cxx
index fd759cc88ad9..9f08b05ca48a 100644
--- a/connectivity/source/drivers/writer/WTable.cxx
+++ b/connectivity/source/drivers/writer/WTable.cxx
@@ -28,6 +28,7 @@
 #include <com/sun/star/util/NumberFormat.hpp>
 #include <com/sun/star/util/XNumberFormatsSupplier.hpp>
 #include <com/sun/star/text/XText.hpp>
+#include <com/sun/star/lang/IndexOutOfBoundsException.hpp>
 #include <svl/converter.hxx>
 #include "writer/WConnection.hxx"
 #include "component/CColumns.hxx"
@@ -87,7 +88,17 @@ static void lcl_SetValue(connectivity::ORowSetValue& rValue, const uno::Referenc
         ++nDocRow;
 
     uno::Reference<table::XCellRange> xCellRange(xTable, uno::UNO_QUERY);
-    const uno::Reference<table::XCell> xCell = xCellRange->getCellByPosition(nDocColumn, nDocRow);
+    uno::Reference<table::XCell> xCell;
+    try
+    {
+        xCell = xCellRange->getCellByPosition(nDocColumn, nDocRow);
+    }
+    catch (const lang::IndexOutOfBoundsException& /*rException*/)
+    {
+        SAL_WARN("connectivity.writer", "getCellByPosition(" << nDocColumn << ", " << nDocRow << ") failed");
+        rValue = OUString();
+    }
+
     if (xCell.is())
     {
         const uno::Reference<text::XText> xText(xCell, uno::UNO_QUERY);
diff --git a/sw/qa/extras/mailmerge/data/10-testing-addresses-writer-merged.odt b/sw/qa/extras/mailmerge/data/10-testing-addresses-writer-merged.odt
new file mode 100644
index 000000000000..e61d9fc04635
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/10-testing-addresses-writer-merged.odt differ
diff --git a/sw/qa/extras/mailmerge/data/writer-merged-mail-merge.odt b/sw/qa/extras/mailmerge/data/writer-merged-mail-merge.odt
new file mode 100644
index 000000000000..8ec76852a34a
Binary files /dev/null and b/sw/qa/extras/mailmerge/data/writer-merged-mail-merge.odt differ
diff --git a/sw/qa/extras/mailmerge/mailmerge.cxx b/sw/qa/extras/mailmerge/mailmerge.cxx
index d7413f33a68a..3e29b7a9b01e 100644
--- a/sw/qa/extras/mailmerge/mailmerge.cxx
+++ b/sw/qa/extras/mailmerge/mailmerge.cxx
@@ -440,6 +440,22 @@ DECLARE_FILE_MAILMERGE_TEST(testWriterDataSource, "writer-mail-merge.odt", "10-t
     }
 }
 
+DECLARE_FILE_MAILMERGE_TEST(testWriterMergedDataSource, "writer-merged-mail-merge.odt", "10-testing-addresses-writer-merged.odt", "testing-addresses-writer-merged")
+{
+    // This failed with com.sun.star.lang.IndexOutOfBoundsException, leading to
+    // a crash, as the last row had merged cells in
+    // 10-testing-addresses-writer-merged.odt.
+    executeMailMerge();
+    for (int doc = 0; doc < 10; ++doc)
+    {
+        loadMailMergeDocument(doc);
+        CPPUNIT_ASSERT_EQUAL(1, getPages());
+        CPPUNIT_ASSERT_EQUAL(OUString("Fixed text."), getRun(getParagraph(1), 1)->getString());
+        CPPUNIT_ASSERT_EQUAL(OUString("lastname" + OUString::number(doc + 1)), getRun(getParagraph(2), 1)->getString());
+        CPPUNIT_ASSERT_EQUAL(OUString("Another fixed text."), getRun(getParagraph(3), 1)->getString());
+    }
+}
+
 DECLARE_FILE_MAILMERGE_TEST(test2Pages, "simple-mail-merge-2pages.odt", "10-testing-addresses.ods", "testing-addresses")
 {
     executeMailMerge();
commit 33f126b4262d1af9c3f0c2e850f5a13b3c6acfc2
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Oct 10 21:39:41 2017 +0200

    Replace list by vector "DataPilotSort" from dbfunc3 (sc)
    
    Change-Id: Ib8754d7e459d1019ed2d5f49ce593e20af0b7f0c
    Reviewed-on: https://gerrit.libreoffice.org/43315
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/sc/source/ui/view/dbfunc3.cxx b/sc/source/ui/view/dbfunc3.cxx
index 186007cae57a..0b65d959edc4 100644
--- a/sc/source/ui/view/dbfunc3.cxx
+++ b/sc/source/ui/view/dbfunc3.cxx
@@ -84,7 +84,6 @@ using ::com::sun::star::uno::UNO_QUERY;
 using ::com::sun::star::beans::XPropertySet;
 using ::com::sun::star::container::XNameAccess;
 using ::com::sun::star::sheet::XDimensionsSupplier;
-using ::std::list;
 using ::std::vector;
 
 //          outliner
@@ -1649,7 +1648,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending
     {
         typedef ScDPSaveDimension::MemberList MemList;
         const MemList& rDimMembers = pSaveDim->GetMembers();
-        list<OUString> aMembers;
+        vector<OUString> aMembers;
         std::unordered_set<OUString, OUStringHash> aMemberSet;
         size_t nMemberCount = 0;
         for (MemList::const_iterator itr = rDimMembers.begin(), itrEnd = rDimMembers.end();
@@ -1663,7 +1662,7 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending
 
         // Sort the member list in ascending order.
         ScOUStringCollate aCollate( ScGlobal::GetCollator() );
-        aMembers.sort(aCollate);
+        std::stable_sort(aMembers.begin(), aMembers.end(), aCollate);
 
         // Collect and rank those custom sort strings that also exist in the member name list.
 
@@ -1699,12 +1698,10 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending
 
         vector<OUString> aRankedNames(nMemberCount);
         sal_uInt16 nCurStrId = 0;
-        for (list<OUString>::const_iterator itr = aMembers.begin(), itrEnd = aMembers.end();
-              itr != itrEnd; ++itr)
+        for (auto const& aMemberName : aMembers)
         {
-            OUString aName = *itr;
             sal_uInt16 nRank = 0;
-            UserSortMap::const_iterator itrSub = aSubStrs.find(aName);
+            UserSortMap::const_iterator itrSub = aSubStrs.find(aMemberName);
             if (itrSub == aSubStrs.end())
                 nRank = nSubCount + nCurStrId++;
             else
@@ -1713,15 +1710,13 @@ void ScDBFunc::DataPilotSort(ScDPObject* pDPObj, long nDimIndex, bool bAscending
             if (!bAscending)
                 nRank = static_cast< sal_uInt16 >( nMemberCount - nRank - 1 );
 
-            aRankedNames[nRank] = aName;
+            aRankedNames[nRank] = aMemberName;
         }
 
         // Re-order ScDPSaveMember instances with the new ranks.
-
-        for (vector<OUString>::const_iterator itr = aRankedNames.begin(), itrEnd = aRankedNames.end();
-              itr != itrEnd; ++itr)
+        for (auto const& aRankedName : aRankedNames)
         {
-            const ScDPSaveMember* pOldMem = pSaveDim->GetExistingMemberByName(*itr);
+            const ScDPSaveMember* pOldMem = pSaveDim->GetExistingMemberByName(aRankedName);
             if (!pOldMem)
                 // All members are supposed to be present.
                 continue;
commit ff578127e279c1f9949923c601636aa274d52892
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Wed Oct 11 00:28:36 2017 +0300

    binaryurp: consistently use "" and <> for include directives
    
    Change-Id: If328428d7f88d8a160888857acd3a07bbd8dab83
    Reviewed-on: https://gerrit.libreoffice.org/43318
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/binaryurp/source/binaryany.cxx b/binaryurp/source/binaryany.cxx
index a4163767ec3c..af1493331160 100644
--- a/binaryurp/source/binaryany.cxx
+++ b/binaryurp/source/binaryany.cxx
@@ -17,14 +17,14 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <utility>
 
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.hxx"
-#include "uno/any2.h"
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
 
 #include "binaryany.hxx"
 
diff --git a/binaryurp/source/binaryany.hxx b/binaryurp/source/binaryany.hxx
index 1faf4841b79b..7b4a9011a256 100644
--- a/binaryurp/source/binaryany.hxx
+++ b/binaryurp/source/binaryany.hxx
@@ -20,9 +20,9 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
 #define INCLUDED_BINARYURP_SOURCE_BINARYANY_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
-#include "uno/any2.h"
+#include <uno/any2.h>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class TypeDescription;
diff --git a/binaryurp/source/bridge.cxx b/binaryurp/source/bridge.cxx
index a31722418864..fcb26805f1e7 100644
--- a/binaryurp/source/bridge.cxx
+++ b/binaryurp/source/bridge.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <algorithm>
 #include <cassert>
@@ -26,37 +26,37 @@
 #include <memory>
 #include <vector>
 
-#include "com/sun/star/bridge/InvalidProtocolChangeException.hpp"
-#include "com/sun/star/bridge/XBridge.hpp"
-#include "com/sun/star/bridge/XInstanceProvider.hpp"
-#include "com/sun/star/bridge/XProtocolProperties.hpp"
-#include "com/sun/star/connection/XConnection.hpp"
-#include "com/sun/star/io/IOException.hpp"
-#include "com/sun/star/lang/DisposedException.hpp"
-#include "com/sun/star/lang/EventObject.hpp"
-#include "com/sun/star/lang/XEventListener.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "cppuhelper/weak.hxx"
-#include "osl/mutex.hxx"
-#include "osl/thread.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/random.h"
-#include "rtl/ref.hxx"
-#include "rtl/ustrbuf.hxx"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/log.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
-#include "uno/environment.hxx"
-#include "uno/lbnames.h"
+#include <com/sun/star/bridge/InvalidProtocolChangeException.hpp>
+#include <com/sun/star/bridge/XBridge.hpp>
+#include <com/sun/star/bridge/XInstanceProvider.hpp>
+#include <com/sun/star/bridge/XProtocolProperties.hpp>
+#include <com/sun/star/connection/XConnection.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/lang/DisposedException.hpp>
+#include <com/sun/star/lang/EventObject.hpp>
+#include <com/sun/star/lang/XEventListener.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <cppuhelper/weak.hxx>
+#include <osl/mutex.hxx>
+#include <osl/thread.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/random.h>
+#include <rtl/ref.hxx>
+#include <rtl/ustrbuf.hxx>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
+#include <uno/dispatcher.hxx>
+#include <uno/environment.hxx>
+#include <uno/lbnames.h>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/bridge.hxx b/binaryurp/source/bridge.hxx
index 89bfac393a90..476d4af1cf22 100644
--- a/binaryurp/source/bridge.hxx
+++ b/binaryurp/source/bridge.hxx
@@ -20,26 +20,26 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX
 #define INCLUDED_BINARYURP_SOURCE_BRIDGE_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cstddef>
 #include <list>
 #include <map>
 #include <vector>
 
-#include "com/sun/star/bridge/XBridge.hpp"
-#include "com/sun/star/lang/XComponent.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "cppuhelper/implbase.hxx"
-#include "osl/conditn.hxx"
-#include "osl/mutex.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "uno/environment.hxx"
-#include "uno/mapping.hxx"
-#include "uno/threadpool.h"
+#include <com/sun/star/bridge/XBridge.hpp>
+#include <com/sun/star/lang/XComponent.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <cppuhelper/implbase.hxx>
+#include <osl/conditn.hxx>
+#include <osl/mutex.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <uno/environment.hxx>
+#include <uno/mapping.hxx>
+#include <uno/threadpool.h>
 
 #include "outgoingrequest.hxx"
 #include "outgoingrequests.hxx"
diff --git a/binaryurp/source/bridgefactory.cxx b/binaryurp/source/bridgefactory.cxx
index b531910403e7..7da9ccd39aa0 100644
--- a/binaryurp/source/bridgefactory.cxx
+++ b/binaryurp/source/bridgefactory.cxx
@@ -17,26 +17,26 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <algorithm>
 #include <cassert>
 #include <exception>
 
-#include "com/sun/star/bridge/BridgeExistsException.hpp"
-#include "com/sun/star/connection/XConnection.hpp"
-#include "com/sun/star/lang/IllegalArgumentException.hpp"
-#include "com/sun/star/uno/Exception.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/XComponentContext.hpp"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppuhelper/factory.hxx"
-#include "cppuhelper/implementationentry.hxx"
+#include <com/sun/star/bridge/BridgeExistsException.hpp>
+#include <com/sun/star/connection/XConnection.hpp>
+#include <com/sun/star/lang/IllegalArgumentException.hpp>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <cppuhelper/factory.hxx>
+#include <cppuhelper/implementationentry.hxx>
 #include <cppuhelper/supportsservice.hxx>
-#include "rtl/ref.hxx"
-#include "sal/log.hxx"
-#include "sal/types.h"
+#include <rtl/ref.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
 
 #include "bridge.hxx"
 #include "bridgefactory.hxx"
diff --git a/binaryurp/source/bridgefactory.hxx b/binaryurp/source/bridgefactory.hxx
index 4d392c1e6a10..a08016932200 100644
--- a/binaryurp/source/bridgefactory.hxx
+++ b/binaryurp/source/bridgefactory.hxx
@@ -20,20 +20,20 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX
 #define INCLUDED_BINARYURP_SOURCE_BRIDGEFACTORY_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <exception>
 #include <list>
 #include <map>
 
-#include "com/sun/star/bridge/XBridgeFactory2.hpp"
-#include "com/sun/star/lang/XServiceInfo.hpp"
-#include "com/sun/star/uno/Exception.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "cppuhelper/basemutex.hxx"
-#include "cppuhelper/compbase.hxx"
-#include "sal/types.h"
+#include <com/sun/star/bridge/XBridgeFactory2.hpp>
+#include <com/sun/star/lang/XServiceInfo.hpp>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <cppuhelper/basemutex.hxx>
+#include <cppuhelper/compbase.hxx>
+#include <sal/types.h>
 
 namespace com { namespace sun { namespace star {
     namespace connection { class XConnection; }
diff --git a/binaryurp/source/cache.hxx b/binaryurp/source/cache.hxx
index 009886eb8f38..578b6f4fd0b6 100644
--- a/binaryurp/source/cache.hxx
+++ b/binaryurp/source/cache.hxx
@@ -20,14 +20,14 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_CACHE_HXX
 #define INCLUDED_BINARYURP_SOURCE_CACHE_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <cstddef>
 #include <map>
 #include <list>
 
-#include "sal/types.h"
+#include <sal/types.h>
 
 namespace binaryurp {
 
diff --git a/binaryurp/source/currentcontext.cxx b/binaryurp/source/currentcontext.cxx
index 52718e15fab6..510f2509486b 100644
--- a/binaryurp/source/currentcontext.cxx
+++ b/binaryurp/source/currentcontext.cxx
@@ -17,16 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
-
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "uno/current_context.h"
-#include "uno/dispatcher.hxx"
-#include "uno/lbnames.h"
+#include <sal/config.h>
+
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <uno/current_context.h>
+#include <uno/dispatcher.hxx>
+#include <uno/lbnames.h>
 
 #include "currentcontext.hxx"
 
diff --git a/binaryurp/source/currentcontext.hxx b/binaryurp/source/currentcontext.hxx
index 396a9feaf407..2a929bf294f8 100644
--- a/binaryurp/source/currentcontext.hxx
+++ b/binaryurp/source/currentcontext.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX
 #define INCLUDED_BINARYURP_SOURCE_CURRENTCONTEXT_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class UnoInterfaceReference;
diff --git a/binaryurp/source/incomingreply.hxx b/binaryurp/source/incomingreply.hxx
index f051387bc41d..058d0edf8c47 100644
--- a/binaryurp/source/incomingreply.hxx
+++ b/binaryurp/source/incomingreply.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX
 #define INCLUDED_BINARYURP_SOURCE_INCOMINGREPLY_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <vector>
 
diff --git a/binaryurp/source/incomingrequest.cxx b/binaryurp/source/incomingrequest.cxx
index 2a94ed2c7611..86b3cc107c05 100644
--- a/binaryurp/source/incomingrequest.cxx
+++ b/binaryurp/source/incomingrequest.cxx
@@ -17,23 +17,23 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <list>
 #include <vector>
 
-#include "com/sun/star/bridge/XInstanceProvider.hpp"
-#include "com/sun/star/container/NoSuchElementException.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "o3tl/runtimetooustring.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/log.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
+#include <com/sun/star/bridge/XInstanceProvider.hpp>
+#include <com/sun/star/container/NoSuchElementException.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <o3tl/runtimetooustring.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.hxx>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/incomingrequest.hxx b/binaryurp/source/incomingrequest.hxx
index 64b5664bd7b0..d6ed7fbccc7c 100644
--- a/binaryurp/source/incomingrequest.hxx
+++ b/binaryurp/source/incomingrequest.hxx
@@ -20,16 +20,16 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX
 #define INCLUDED_BINARYURP_SOURCE_INCOMINGREQUEST_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <vector>
 
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.hxx>
+#include <uno/dispatcher.hxx>
 
 namespace binaryurp {
     class BinaryAny;
diff --git a/binaryurp/source/lessoperators.cxx b/binaryurp/source/lessoperators.cxx
index 66375178be71..98857171f108 100644
--- a/binaryurp/source/lessoperators.cxx
+++ b/binaryurp/source/lessoperators.cxx
@@ -17,16 +17,16 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <algorithm>
 #include <cassert>
 
-#include "rtl/byteseq.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.hxx"
+#include <rtl/byteseq.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.hxx>
 
 #include "lessoperators.hxx"
 
diff --git a/binaryurp/source/lessoperators.hxx b/binaryurp/source/lessoperators.hxx
index f3202b5fb5af..8090db850e66 100644
--- a/binaryurp/source/lessoperators.hxx
+++ b/binaryurp/source/lessoperators.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_LESSOPERATORS_HXX
 #define INCLUDED_BINARYURP_SOURCE_LESSOPERATORS_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class TypeDescription;
diff --git a/binaryurp/source/marshal.cxx b/binaryurp/source/marshal.cxx
index b2251e9ca6a8..009cd06968e7 100644
--- a/binaryurp/source/marshal.cxx
+++ b/binaryurp/source/marshal.cxx
@@ -17,27 +17,27 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <vector>
 
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppu/unotype.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/string.hxx"
-#include "rtl/textcvt.h"
-#include "rtl/textenc.h"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <cppu/unotype.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/string.hxx>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/marshal.hxx b/binaryurp/source/marshal.hxx
index 4a20395423f2..333c8f90f43c 100644
--- a/binaryurp/source/marshal.hxx
+++ b/binaryurp/source/marshal.hxx
@@ -20,15 +20,15 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_MARSHAL_HXX
 #define INCLUDED_BINARYURP_SOURCE_MARSHAL_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <vector>
 
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.hxx"
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.hxx>
 
 namespace binaryurp {
     class BinaryAny;
diff --git a/binaryurp/source/outgoingrequest.hxx b/binaryurp/source/outgoingrequest.hxx
index a8339f7cea0c..aaf68e23f64a 100644
--- a/binaryurp/source/outgoingrequest.hxx
+++ b/binaryurp/source/outgoingrequest.hxx
@@ -20,9 +20,9 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUEST_HXX
 #define INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUEST_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
-#include "typelib/typedescription.hxx"
+#include <typelib/typedescription.hxx>
 
 namespace binaryurp {
 
diff --git a/binaryurp/source/outgoingrequests.cxx b/binaryurp/source/outgoingrequests.cxx
index 705ae2cbda5e..d18c01434f8f 100644
--- a/binaryurp/source/outgoingrequests.cxx
+++ b/binaryurp/source/outgoingrequests.cxx
@@ -17,13 +17,13 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "rtl/byteseq.hxx"
-#include "osl/mutex.hxx"
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <rtl/byteseq.hxx>
+#include <osl/mutex.hxx>
 
 #include "lessoperators.hxx"
 #include "outgoingrequest.hxx"
diff --git a/binaryurp/source/outgoingrequests.hxx b/binaryurp/source/outgoingrequests.hxx
index f774dab7c438..e085288bf971 100644
--- a/binaryurp/source/outgoingrequests.hxx
+++ b/binaryurp/source/outgoingrequests.hxx
@@ -20,12 +20,12 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUESTS_HXX
 #define INCLUDED_BINARYURP_SOURCE_OUTGOINGREQUESTS_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <map>
 #include <vector>
 
-#include "osl/mutex.hxx"
+#include <osl/mutex.hxx>
 
 namespace binaryurp { struct OutgoingRequest; }
 namespace rtl { class ByteSequence; }
diff --git a/binaryurp/source/proxy.cxx b/binaryurp/source/proxy.cxx
index d7c7ba410631..5f83660f1ddd 100644
--- a/binaryurp/source/proxy.cxx
+++ b/binaryurp/source/proxy.cxx
@@ -17,22 +17,22 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <exception>
 #include <vector>
 
-#include "cppuhelper/exc_hlp.hxx"
-#include "o3tl/runtimetooustring.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/any2.h"
-#include "uno/dispatcher.h"
-#include "uno/dispatcher.hxx"
+#include <cppuhelper/exc_hlp.hxx>
+#include <o3tl/runtimetooustring.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
+#include <uno/dispatcher.h>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/proxy.hxx b/binaryurp/source/proxy.hxx
index e8ed0fea2dad..238685d4e4be 100644
--- a/binaryurp/source/proxy.hxx
+++ b/binaryurp/source/proxy.hxx
@@ -20,17 +20,17 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_PROXY_HXX
 #define INCLUDED_BINARYURP_SOURCE_PROXY_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <atomic>
 #include <cstddef>
 
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/any2.h"
-#include "uno/dispatcher.h"
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
+#include <uno/dispatcher.h>
 
 namespace binaryurp { class Bridge; }
 namespace com { namespace sun { namespace star { namespace uno {
diff --git a/binaryurp/source/reader.cxx b/binaryurp/source/reader.cxx
index b50d3d50c187..7ce1ba1244c3 100644
--- a/binaryurp/source/reader.cxx
+++ b/binaryurp/source/reader.cxx
@@ -17,31 +17,31 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <exception>
 #include <memory>
 #include <vector>
 
-#include "com/sun/star/connection/XConnection.hpp"
-#include "com/sun/star/io/IOException.hpp"
-#include "com/sun/star/uno/Any.hxx"
-#include "com/sun/star/uno/Exception.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/Type.hxx"
-#include "com/sun/star/uno/XCurrentContext.hpp"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppu/unotype.hxx"
-#include "rtl/byteseq.h"
-#include "rtl/ustring.hxx"
-#include "sal/log.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
+#include <com/sun/star/connection/XConnection.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/uno/Any.hxx>
+#include <com/sun/star/uno/Exception.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/Type.hxx>
+#include <com/sun/star/uno/XCurrentContext.hpp>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <cppu/unotype.hxx>
+#include <rtl/byteseq.h>
+#include <rtl/ustring.hxx>
+#include <sal/log.hxx>
+#include <sal/types.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/reader.hxx b/binaryurp/source/reader.hxx
index c4a7355ed7dd..6510bbb30706 100644
--- a/binaryurp/source/reader.hxx
+++ b/binaryurp/source/reader.hxx
@@ -20,14 +20,14 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_READER_HXX
 #define INCLUDED_BINARYURP_SOURCE_READER_HXX
 
-#include "sal/config.h"
-
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "salhelper/thread.hxx"
-#include "typelib/typedescription.hxx"
+#include <sal/config.h>
+
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <salhelper/thread.hxx>
+#include <typelib/typedescription.hxx>
 
 #include "readerstate.hxx"
 
diff --git a/binaryurp/source/readerstate.hxx b/binaryurp/source/readerstate.hxx
index 879b0851279f..5b401faec1ca 100644
--- a/binaryurp/source/readerstate.hxx
+++ b/binaryurp/source/readerstate.hxx
@@ -20,11 +20,11 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_READERSTATE_HXX
 #define INCLUDED_BINARYURP_SOURCE_READERSTATE_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
-#include "rtl/byteseq.hxx"
-#include "rtl/ustring.hxx"
-#include "typelib/typedescription.hxx"
+#include <rtl/byteseq.hxx>
+#include <rtl/ustring.hxx>
+#include <typelib/typedescription.hxx>
 
 #include "cache.hxx"
 
diff --git a/binaryurp/source/specialfunctionids.hxx b/binaryurp/source/specialfunctionids.hxx
index 2aa88a239f44..ef147a326be9 100644
--- a/binaryurp/source/specialfunctionids.hxx
+++ b/binaryurp/source/specialfunctionids.hxx
@@ -20,7 +20,7 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_SPECIALFUNCTIONIDS_HXX
 #define INCLUDED_BINARYURP_SOURCE_SPECIALFUNCTIONIDS_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 namespace binaryurp {
 
diff --git a/binaryurp/source/unmarshal.cxx b/binaryurp/source/unmarshal.cxx
index 9c51a0b619ff..3ea3d2058553 100644
--- a/binaryurp/source/unmarshal.cxx
+++ b/binaryurp/source/unmarshal.cxx
@@ -17,32 +17,32 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <cstdlib>
 #include <new>
 #include <vector>
 
-#include "com/sun/star/io/IOException.hpp"
-#include "com/sun/star/uno/Reference.hxx"
-#include "com/sun/star/uno/RuntimeException.hpp"
-#include "com/sun/star/uno/Sequence.hxx"
-#include "com/sun/star/uno/XInterface.hpp"
-#include "cppu/unotype.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/textcvt.h"
-#include "rtl/textenc.h"
-#include "rtl/ustring.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
-#include "typelib/typedescription.hxx"
-#include "uno/any2.h"
-#include "uno/data.h"
-#include "uno/dispatcher.hxx"
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/uno/Reference.hxx>
+#include <com/sun/star/uno/RuntimeException.hpp>
+#include <com/sun/star/uno/Sequence.hxx>
+#include <com/sun/star/uno/XInterface.hpp>
+#include <cppu/unotype.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/textcvt.h>
+#include <rtl/textenc.h>
+#include <rtl/ustring.h>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
+#include <typelib/typedescription.hxx>
+#include <uno/any2.h>
+#include <uno/data.h>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/unmarshal.hxx b/binaryurp/source/unmarshal.hxx
index 0cbb1193c9ed..86378497a372 100644
--- a/binaryurp/source/unmarshal.hxx
+++ b/binaryurp/source/unmarshal.hxx
@@ -20,14 +20,14 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX
 #define INCLUDED_BINARYURP_SOURCE_UNMARSHAL_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <vector>
 
-#include "com/sun/star/uno/Sequence.hxx"
-#include "rtl/ref.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.hxx"
+#include <com/sun/star/uno/Sequence.hxx>
+#include <rtl/ref.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.hxx>
 
 namespace binaryurp {
     class BinaryAny;
diff --git a/binaryurp/source/writer.cxx b/binaryurp/source/writer.cxx
index 9c71763c738d..14b87449926a 100644
--- a/binaryurp/source/writer.cxx
+++ b/binaryurp/source/writer.cxx
@@ -17,7 +17,7 @@
  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
  */
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <cassert>
 #include <cstddef>
@@ -26,14 +26,14 @@
 #include <limits>
 #include <vector>
 
-#include "com/sun/star/connection/XConnection.hpp"
-#include "com/sun/star/io/IOException.hpp"
-#include "com/sun/star/lang/WrappedTargetRuntimeException.hpp"
-#include "com/sun/star/uno/XCurrentContext.hpp"
-#include "cppuhelper/exc_hlp.hxx"
-#include "osl/mutex.hxx"
-#include "sal/log.hxx"
-#include "uno/dispatcher.hxx"
+#include <com/sun/star/connection/XConnection.hpp>
+#include <com/sun/star/io/IOException.hpp>
+#include <com/sun/star/lang/WrappedTargetRuntimeException.hpp>
+#include <com/sun/star/uno/XCurrentContext.hpp>
+#include <cppuhelper/exc_hlp.hxx>
+#include <osl/mutex.hxx>
+#include <sal/log.hxx>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "bridge.hxx"
diff --git a/binaryurp/source/writer.hxx b/binaryurp/source/writer.hxx
index d5f7e3d3a36a..42ea687cea7a 100644
--- a/binaryurp/source/writer.hxx
+++ b/binaryurp/source/writer.hxx
@@ -20,19 +20,19 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_WRITER_HXX
 #define INCLUDED_BINARYURP_SOURCE_WRITER_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
 #include <deque>
 #include <vector>
 
-#include "osl/conditn.hxx"
-#include "osl/mutex.hxx"
-#include "rtl/byteseq.hxx"
-#include "rtl/ref.hxx"
-#include "rtl/ustring.hxx"
-#include "salhelper/thread.hxx"
-#include "typelib/typedescription.hxx"
-#include "uno/dispatcher.hxx"
+#include <osl/conditn.hxx>
+#include <osl/mutex.hxx>
+#include <rtl/byteseq.hxx>
+#include <rtl/ref.hxx>
+#include <rtl/ustring.hxx>
+#include <salhelper/thread.hxx>
+#include <typelib/typedescription.hxx>
+#include <uno/dispatcher.hxx>
 
 #include "binaryany.hxx"
 #include "marshal.hxx"
diff --git a/binaryurp/source/writerstate.hxx b/binaryurp/source/writerstate.hxx
index 94207959a5a8..3386ef94335f 100644
--- a/binaryurp/source/writerstate.hxx
+++ b/binaryurp/source/writerstate.hxx
@@ -20,11 +20,11 @@
 #ifndef INCLUDED_BINARYURP_SOURCE_WRITERSTATE_HXX
 #define INCLUDED_BINARYURP_SOURCE_WRITERSTATE_HXX
 
-#include "sal/config.h"
+#include <sal/config.h>
 
-#include "rtl/byteseq.hxx"
-#include "rtl/ustring.hxx"
-#include "typelib/typedescription.hxx"
+#include <rtl/byteseq.hxx>
+#include <rtl/ustring.hxx>
+#include <typelib/typedescription.hxx>
 
 #include "cache.hxx"
 
commit 6beaa8aae6b4a56ceb2075d131b6ae319ef9ea9d
Author: Mike Kaganski <mike.kaganski at collabora.com>
Date:   Wed Oct 11 01:37:03 2017 +0300

    bridges: consistently use "" and <> in include directives
    
    Change-Id: I8fb8e4fad4d6bfb4e24648833826f1a7e211b062
    Reviewed-on: https://gerrit.libreoffice.org/43320
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Mike Kaganski <mike.kaganski at collabora.com>

diff --git a/bridges/inc/bridge.hxx b/bridges/inc/bridge.hxx
index a01bb42bc163..bae89b4b1364 100644
--- a/bridges/inc/bridge.hxx
+++ b/bridges/inc/bridge.hxx
@@ -25,10 +25,10 @@
 #include <atomic>
 #include <cstddef>
 
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-#include "uno/environment.h"
-#include "uno/mapping.h"
+#include <sal/types.h>
+#include <typelib/typedescription.h>
+#include <uno/environment.h>
+#include <uno/mapping.h>
 
 namespace bridges { namespace cpp_uno { namespace shared {
 
diff --git a/bridges/inc/cppinterfaceproxy.hxx b/bridges/inc/cppinterfaceproxy.hxx
index 00972829a53c..fb25532855eb 100644
--- a/bridges/inc/cppinterfaceproxy.hxx
+++ b/bridges/inc/cppinterfaceproxy.hxx
@@ -25,12 +25,12 @@
 #include <atomic>
 #include <cstddef>
 
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-#include "uno/dispatcher.h"
-#include "uno/environment.h"
-#include "vtablefactory.hxx"
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.h>
+#include <uno/dispatcher.h>
+#include <uno/environment.h>
+#include <vtablefactory.hxx>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class XInterface;
diff --git a/bridges/inc/types.hxx b/bridges/inc/types.hxx
index 12e8812b5c8e..9612232228e3 100644
--- a/bridges/inc/types.hxx
+++ b/bridges/inc/types.hxx
@@ -20,8 +20,8 @@
 #ifndef INCLUDED_BRIDGES_INC_TYPES_HXX
 #define INCLUDED_BRIDGES_INC_TYPES_HXX
 
-#include "typelib/typeclass.h"
-#include "typelib/typedescription.h"
+#include <typelib/typeclass.h>
+#include <typelib/typedescription.h>
 
 namespace bridges { namespace cpp_uno { namespace shared {
 
diff --git a/bridges/inc/unointerfaceproxy.hxx b/bridges/inc/unointerfaceproxy.hxx
index c76b62dd28b0..ba3ddcbb5624 100644
--- a/bridges/inc/unointerfaceproxy.hxx
+++ b/bridges/inc/unointerfaceproxy.hxx
@@ -25,11 +25,11 @@
 #include <atomic>
 #include <cstddef>
 
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.h"
-#include "uno/dispatcher.h"
-#include "uno/environment.h"
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.h>
+#include <uno/dispatcher.h>
+#include <uno/environment.h>
 
 namespace com { namespace sun { namespace star { namespace uno {
     class XInterface;
diff --git a/bridges/inc/vtablefactory.hxx b/bridges/inc/vtablefactory.hxx
index 3d431efc4409..e099f3b3251a 100644
--- a/bridges/inc/vtablefactory.hxx
+++ b/bridges/inc/vtablefactory.hxx
@@ -20,11 +20,11 @@
 #ifndef INCLUDED_BRIDGES_INC_VTABLEFACTORY_HXX
 #define INCLUDED_BRIDGES_INC_VTABLEFACTORY_HXX
 
-#include "osl/mutex.hxx"
-#include "rtl/alloc.h"
-#include "rtl/ustring.hxx"
-#include "sal/types.h"
-#include "typelib/typedescription.hxx"
+#include <osl/mutex.hxx>
+#include <rtl/alloc.h>
+#include <rtl/ustring.hxx>
+#include <sal/types.h>
+#include <typelib/typedescription.hxx>
 
 #include <unordered_map>
 
diff --git a/bridges/inc/vtables.hxx b/bridges/inc/vtables.hxx
index cd4c2f183c02..bf4edc6c3564 100644
--- a/bridges/inc/vtables.hxx
+++ b/bridges/inc/vtables.hxx
@@ -20,8 +20,8 @@
 #ifndef INCLUDED_BRIDGES_INC_VTABLES_HXX
 #define INCLUDED_BRIDGES_INC_VTABLES_HXX
 
-#include "sal/types.h"
-#include "typelib/typedescription.h"
+#include <sal/types.h>
+#include <typelib/typedescription.h>
 
 namespace bridges { namespace cpp_uno { namespace shared {
 
commit 78f79760d5cb768cb482646fc71a90cd6cd1e630
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Tue Oct 10 23:18:10 2017 +0200

    Replace list by vector fontconfig/manager (vcl)
    
    + refactor a bit "analyzeFontFile" to return a vector of std::unique_ptr<PrintFont>
    instead of just a bool
    
    Change-Id: I9c8c307c5c323e40667359f5094672c1cde589fd
    Reviewed-on: https://gerrit.libreoffice.org/43317
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/vcl/inc/unx/fontmanager.hxx b/vcl/inc/unx/fontmanager.hxx
index 47ea4348bdcc..16e819bace48 100644
--- a/vcl/inc/unx/fontmanager.hxx
+++ b/vcl/inc/unx/fontmanager.hxx
@@ -148,7 +148,7 @@ class VCL_PLUGIN_PUBLIC PrintFontManager
 
     OString getFontFile(const PrintFont* pFont) const;
 
-    bool analyzeFontFile(int nDirID, const OString& rFileName, std::list<std::unique_ptr<PrintFont>>& rNewFonts, const char *pFormat=nullptr) const;
+    std::vector<std::unique_ptr<PrintFont>> analyzeFontFile(int nDirID, const OString& rFileName, const char *pFormat=nullptr) const;
     static OUString convertSfntName( void* pNameRecord ); // actually a NameRecord* format font subsetting code
     static void analyzeSfntFamilyName( void* pTTFont, std::list< OUString >& rnames ); // actually a TrueTypeFont* from font subsetting code
     bool analyzeSfntFile(PrintFont* pFont) const;
diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx
index 459678819575..34b9ba27f642 100644
--- a/vcl/unx/generic/fontmanager/fontconfig.cxx
+++ b/vcl/unx/generic/fontmanager/fontconfig.cxx
@@ -548,7 +548,6 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
 
             // see if this font is already cached
             // update attributes
-            std::list<std::unique_ptr<PrintFont>> aFonts;
             OString aDir, aBase, aOrgPath( reinterpret_cast<char*>(file) );
             splitPath( aOrgPath, aDir, aBase );
 
@@ -562,7 +561,7 @@ void PrintFontManager::countFontconfigFonts( std::unordered_map<OString, int, OS
             // not described by fontconfig (e.g. alias names, PSName)
             if (eFormatRes != FcResultMatch)
                 format = nullptr;
-            analyzeFontFile( nDirID, aBase, aFonts, reinterpret_cast<char*>(format) );

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list