[Libreoffice-commits] core.git: Branch 'private/jmux/scheduler-fixes' - 154 commits - apple_remote/source basctl/source basctl/uiconfig bin/lo-all-static-libs chart2/source chart2/uiconfig compilerplugins/clang configmgr/source connectivity/source cppcanvas/source cui/source cui/uiconfig dbaccess/source dbaccess/uiconfig desktop/source dictionaries download.lst drawinglayer/source editeng/CppunitTest_editeng_core.mk editeng/inc editeng/qa editeng/source extensions/source extensions/uiconfig external/libepubgen external/pdfium extras/source filter/source filter/uiconfig forms/source formula/uiconfig framework/source helpcontent2 i18npool/source icon-themes/breeze icon-themes/breeze_dark icon-themes/breeze_svg icon-themes/sifr icon-themes/sifr_dark icon-themes/sifr_svg include/editeng include/oox include/sal include/sfx2 include/svl include/svtools include/svx include/tools include/unotools include/vcl ios/CustomTarget_iOS.mk ios/LibreOfficeKit ios/LibreOfficeLight ios/loApp.xcconfig.in jvmfwk/plug ins jvmfwk/source lotuswordpro/source odk/examples officecfg/registry oox/source reportdesign/source reportdesign/uiconfig sal/osl sc/inc sc/source sc/uiconfig sc/UIConfig_scalc.mk sdext/source sd/qa sd/source sd/uiconfig sfx2/source sfx2/uiconfig solenv/bin solenv/gbuild svl/qa svl/source svx/source svx/uiconfig sw/inc sw/qa sw/source sw/uiconfig tools/source uitest/writer_tests unotools/source unoxml/inc unoxml/source uui/source vcl/android vcl/Executable_602fuzzer.mk vcl/Executable_dxffuzzer.mk vcl/Executable_epsfuzzer.mk vcl/Executable_hwpfuzzer.mk vcl/Executable_lwpfuzzer.mk vcl/Executable_metfuzzer.mk vcl/Executable_olefuzzer.mk vcl/Executable_pcdfuzzer.mk vcl/Executable_pctfuzzer.mk vcl/Executable_pcxfuzzer.mk vcl/Executable_ppmfuzzer.mk vcl/Executable_psdfuzzer.mk vcl/Executable_rasfuzzer.mk vcl/Executable_svmfuzzer.mk vcl/Executable_tgafuzzer.mk vcl/Executable_tiffuzzer.mk vcl/headless vcl/inc vcl/osx vcl/qa vcl/README.scheduler vcl/source vcl/uiconfig vcl/unx vcl/win vcl/w orkben writerfilter/source xmloff/source xmlsecurity/inc xmlsecurity/source xmlsecurity/uiconfig
Jan-Marek Glogowski
glogow at fbihome.de
Tue Oct 17 11:17:19 UTC 2017
Rebased ref, commits from common ancestor:
commit 6d688a849f09f5249ea9e9f8a55d6dbb33adb83f
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Tue Oct 17 13:13:23 2017 +0200
Also process all current LO tasks
Change-Id: Icab8671ceae724a96959fa092ad00bff20c919e1
diff --git a/include/vcl/scheduler.hxx b/include/vcl/scheduler.hxx
index ac429ed33b09..136448532142 100644
--- a/include/vcl/scheduler.hxx
+++ b/include/vcl/scheduler.hxx
@@ -43,16 +43,21 @@ class VCL_DLLPUBLIC Scheduler final
static void Lock( sal_uInt32 nLockCount = 1 );
static sal_uInt32 Unlock( bool bUnlockAll = false );
+ static bool ProcessSingleTask( bool bHandleAllCurrentEvents, sal_uInt64 nTime );
+
public:
static constexpr sal_uInt64 ImmediateTimeoutMs = 0;
static constexpr sal_uInt64 InfiniteTimeoutMs = SAL_MAX_UINT64;
static void ImplDeInitScheduler();
- /// Process one pending Timer with highhest priority
- static void CallbackTaskScheduling();
- /// Process one pending task ahead of time with highest priority.
- static bool ProcessTaskScheduling();
+ /**
+ * Process one or all current pending tasks, ranked by priority
+ *
+ * @param bHandleAllCurrentEvents process one or all pending tasks
+ * @return true, if any task was processed
+ */
+ static bool ProcessTaskScheduling( bool bHandleAllCurrentEvents );
/**
* Process all events until none is pending
*
diff --git a/sd/qa/unit/misc-tests.cxx b/sd/qa/unit/misc-tests.cxx
index 60be08f83c09..64890b02129f 100644
--- a/sd/qa/unit/misc-tests.cxx
+++ b/sd/qa/unit/misc-tests.cxx
@@ -105,7 +105,7 @@ sd::DrawDocShellRef SdMiscTest::Load(const OUString& rURL, sal_Int32 nFormat)
for (int i = 0; i < 1000; i++)
{
// Process all Tasks - slide sorter is created here
- while (Scheduler::ProcessTaskScheduling());
+ Scheduler::ProcessEventsToIdle();
if ((pSSVS = sd::slidesorter::SlideSorterViewShell::GetSlideSorter(pViewShell->GetViewShellBase())) != nullptr)
break;
osl::Thread::wait(std::chrono::milliseconds(100));
@@ -149,7 +149,7 @@ void SdMiscTest::testTdf96708()
// Now wait for timers to trigger creation of auto-layout
osl::Thread::wait(std::chrono::milliseconds(100));
- Scheduler::ProcessTaskScheduling();
+ Scheduler::ProcessEventsToIdle();
rSSController.GetClipboard().DoPaste();
const sal_uInt16 nMasterPageCnt2 = xDocSh->GetDoc()->GetMasterSdPageCount(PageKind::Standard);
diff --git a/vcl/README.scheduler b/vcl/README.scheduler
index 80c14b032c54..78971d1d38ad 100644
--- a/vcl/README.scheduler
+++ b/vcl/README.scheduler
@@ -105,11 +105,8 @@ bool DoYield( bool bWait, bool bAllCurrent )
if ( !bAllCurrent && bWasEvent )
return true;
bWasEvent = ProcessSystemEvents( bAllCurrent, &bWasSchedulerEvent ) || bWasEvent;
- if ( !bWasSchedulerEvent && IsSchedulerEvent() )
- {
- ProcessSchedulerEvent()
- bWasEvent = true;
- }
+ if ( (!bWasSchedulerEvent || bAllCurrent) && IsSchedulerEvent() )
+ bWasEvent = ProcessSchedulerEvent( bAllCurrent ) || bWasEvent;
if ( !bWasEvent && bWait )
{
WaitForSystemEvents();
diff --git a/vcl/android/androidinst.cxx b/vcl/android/androidinst.cxx
index 3c181ace2ff6..13ce4f83061f 100644
--- a/vcl/android/androidinst.cxx
+++ b/vcl/android/androidinst.cxx
@@ -69,7 +69,7 @@ AndroidSalInstance::~AndroidSalInstance()
bool AndroidSalInstance::AnyInput( VclInputFlags nType )
{
if( nType & VclInputFlags::TIMER )
- return CheckTimeout( false );
+ return HandleTimeout( HandleTimeoutMode::CheckOnly );
// Unfortunately there is no way to check for a specific type of
// input being queued. That information is too hidden, sigh.
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 44df78a7df60..478fcfd85c5e 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -164,7 +164,7 @@ void SvpSalInstance::Wakeup()
#endif
}
-bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
+bool SvpSalInstance::HandleTimeout( const HandleTimeoutMode eMode )
{
bool bRet = false;
if( m_aTimeout.tv_sec ) // timer is started
@@ -174,7 +174,7 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
if( aTimeOfDay >= m_aTimeout )
{
bRet = true;
- if( bExecuteTimers )
+ if( eMode != HandleTimeoutMode::CheckOnly )
{
// timed out, update timeout
m_aTimeout = aTimeOfDay;
@@ -183,9 +183,8 @@ bool SvpSalInstance::CheckTimeout( bool bExecuteTimers )
osl::Guard< comphelper::SolarMutex > aGuard( mpSalYieldMutex.get() );
// notify
- ImplSVData* pSVData = ImplGetSVData();
- if( pSVData->maSchedCtx.mpSalTimer )
- pSVData->maSchedCtx.mpSalTimer->CallCallback();
+ bRet = SalTimer::CallCallback(
+ eMode == HandleTimeoutMode::ProcessAllCurrentTasks );
}
}
}
@@ -269,7 +268,9 @@ bool SvpSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
if ( !bHandleAllCurrentEvents &&bEvent )
return true;
- bEvent = CheckTimeout() || bEvent;
+ bEvent = HandleTimeout( bHandleAllCurrentEvents
+ ? HandleTimeoutMode::ProcessAllCurrentTasks
+ : HandleTimeoutMode::ProcessSingleTask ) || bEvent;
if (bWait && ! bEvent )
{
@@ -330,7 +331,7 @@ void SvpSalInstance::DoReleaseYield( int nTimeoutMS )
bool SvpSalInstance::AnyInput( VclInputFlags nType )
{
if( nType & VclInputFlags::TIMER )
- return CheckTimeout( false );
+ return HandleTimeout( HandleTimeoutMode::CheckOnly );
return false;
}
diff --git a/vcl/inc/headless/svpinst.hxx b/vcl/inc/headless/svpinst.hxx
index ba80960326dc..17ee24cd8107 100644
--- a/vcl/inc/headless/svpinst.hxx
+++ b/vcl/inc/headless/svpinst.hxx
@@ -85,7 +85,7 @@ public:
inline void registerFrame( SalFrame* pFrame );
inline void deregisterFrame( SalFrame* pFrame );
- bool CheckTimeout( bool bExecuteTimers = true );
+ bool HandleTimeout( HandleTimeoutMode eMode );
// Frame
virtual SalFrame* CreateChildFrame( SystemParentData* pParent, SalFrameStyleFlags nStyle ) override;
diff --git a/vcl/inc/osx/saldata.hxx b/vcl/inc/osx/saldata.hxx
index 357a2df6a74b..fea6d4908ea2 100644
--- a/vcl/inc/osx/saldata.hxx
+++ b/vcl/inc/osx/saldata.hxx
@@ -62,7 +62,6 @@ class SystemFontList;
class SalData
{
public:
- SALTIMERPROC mpTimerProc; // timer callback proc
AquaSalInstance *mpInstance;
std::list<AquaSalFrame*> maPresentationFrames; // list of frames in presentation mode
SalObject *mpFirstObject; // pointer of first object window
diff --git a/vcl/inc/osx/saltimer.h b/vcl/inc/osx/saltimer.h
index a9934f280636..6985abadfc37 100644
--- a/vcl/inc/osx/saltimer.h
+++ b/vcl/inc/osx/saltimer.h
@@ -58,7 +58,7 @@ public:
void handleStartTimerEvent( NSEvent* pEvent );
bool handleDispatchTimerEvent( NSEvent* pEvent );
- void handleTimerElapsed();
+ bool handleTimerElapsed( bool bHandleAllCurrentEvents );
void handleWindowShouldClose();
bool IsTimerElapsed() const;
diff --git a/vcl/inc/saltimer.hxx b/vcl/inc/saltimer.hxx
index 983e0771ee9b..9fde8de82071 100644
--- a/vcl/inc/saltimer.hxx
+++ b/vcl/inc/saltimer.hxx
@@ -22,8 +22,9 @@
#include <sal/config.h>
#include <vcl/dllapi.h>
-#include <salwtype.hxx>
-#include <iostream>
+#include <svdata.hxx>
+
+typedef bool (*SALTIMERPROC)( bool bHandleAllCurrentEvents );
/*
* note: there will be only a single instance of SalTimer
@@ -40,19 +41,32 @@ public:
virtual ~SalTimer() COVERITY_NOEXCEPT_FALSE;
// AutoRepeat and Restart
- virtual void Start( sal_uLong nMS ) = 0;
- virtual void Stop() = 0;
+ virtual void Start( sal_uLong nMS ) = 0;
+ virtual void Stop() = 0;
// Callbacks (indepen in \sv\source\app\timer.cxx)
- void SetCallback( SALTIMERPROC pProc )
+ void SetCallback( SALTIMERPROC pProc )
{
m_pProc = pProc;
}
- void CallCallback()
+ bool Timeout( bool bHandleAllCurrentEvents )
{
+ bool bRet = false;
if( m_pProc )
- m_pProc();
+ bRet = m_pProc( bHandleAllCurrentEvents );
+ return bRet;
+ }
+
+ static bool CallCallback( bool bHandleAllCurrentEvents )
+ {
+ ImplSVData* pSVData = ImplGetSVData();
+ bool bRet = false;
+ assert( pSVData );
+ SalTimer *pTimer = pSVData->maSchedCtx.mpSalTimer;
+ if( pTimer )
+ bRet = pTimer->Timeout( bHandleAllCurrentEvents );
+ return bRet;
}
};
diff --git a/vcl/inc/salwtype.hxx b/vcl/inc/salwtype.hxx
index 1538c8e78a25..e4eca95dcfe8 100644
--- a/vcl/inc/salwtype.hxx
+++ b/vcl/inc/salwtype.hxx
@@ -215,7 +215,8 @@ struct SalQueryCharPositionEvent
typedef bool (*SALFRAMEPROC)( vcl::Window* pInst, SalEvent nEvent, const void* pEvent );
-enum class SalObjEvent {
+enum class SalObjEvent
+{
GetFocus = 1,
LoseFocus = 2,
ToTop = 3
@@ -258,7 +259,12 @@ struct SalLongPressEvent
long mnY;
};
-typedef void (*SALTIMERPROC)();
+enum class HandleTimeoutMode
+{
+ CheckOnly,
+ ProcessSingleTask,
+ ProcessAllCurrentTasks
+};
#endif // INCLUDED_VCL_INC_SALWTYPE_HXX
diff --git a/vcl/inc/unx/saldata.hxx b/vcl/inc/unx/saldata.hxx
index 6a7902dbf444..753f6ce8973b 100644
--- a/vcl/inc/unx/saldata.hxx
+++ b/vcl/inc/unx/saldata.hxx
@@ -72,8 +72,6 @@ public:
SalXLib* GetLib() const { return pXLib_; }
- static void Timeout();
-
// X errors
virtual void ErrorTrapPush() override;
virtual bool ErrorTrapPop( bool bIgnoreError = true ) override;
diff --git a/vcl/inc/unx/saldisp.hxx b/vcl/inc/unx/saldisp.hxx
index 54799149e25c..e8d0f7b67bb9 100644
--- a/vcl/inc/unx/saldisp.hxx
+++ b/vcl/inc/unx/saldisp.hxx
@@ -179,7 +179,7 @@ public:
virtual void StartTimer( sal_uLong nMS );
virtual void StopTimer();
- virtual bool CheckTimeout( bool bExecuteTimers = true );
+ virtual bool HandleTimeout( HandleTimeoutMode eMode );
SalI18N_InputMethod* GetInputMethod() const { return m_pInputMethod; }
Display* GetDisplay() const { return m_pDisplay; }
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index 61d284d82ddb..ec6b8faebd7a 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -43,7 +43,7 @@ class WinSalTimer final : public SalTimer, protected VersionedEvent
void ImplStart( sal_uIntPtr nMS );
void ImplStop();
bool ImplHandleTimerEvent( WPARAM aWPARAM );
- void ImplHandleElapsedTimer();
+ bool ImplHandleElapsedTimer( bool bHandleAllCurrentEvents );
bool ImplHandle_WM_TIMER( WPARAM aWPARAM );
public:
diff --git a/vcl/osx/saldata.cxx b/vcl/osx/saldata.cxx
index a445e5cfb7ad..b35210bc6754 100644
--- a/vcl/osx/saldata.cxx
+++ b/vcl/osx/saldata.cxx
@@ -36,7 +36,6 @@ static void SAL_CALL releasePool( void* pPool )
SalData::SalData()
:
- mpTimerProc( nullptr ),
mpInstance( nullptr ),
mpFirstObject( nullptr ),
mpFirstVD( nullptr ),
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 922046bcbfe8..8add64168bb3 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -603,11 +603,8 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
while( true );
AquaSalTimer *pTimer = static_cast<AquaSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
- if ( !mbTimerProcessed && pTimer && pTimer->IsDirectTimeout() )
- {
- pTimer->handleTimerElapsed();
- bHadEvent = true;
- }
+ if ( (!mbTimerProcessed || bHandleAllCurrentEvents) && pTimer && pTimer->IsDirectTimeout() )
+ bHadEvent = pTimer->handleTimerElapsed( bHandleAllCurrentEvents ) || bHadEvent;
// if we had no event yet, wait for one if requested
if( bWait && ! bHadEvent )
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 64702c0d907d..dd18ba1a373f 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -136,13 +136,11 @@ void AquaSalTimer::Stop()
InvalidateEvent();
}
-void AquaSalTimer::callTimerCallback()
+bool AquaSalTimer::callTimerCallback( bool bHandleAllCurrentEvents )
{
- ImplSVData* pSVData = ImplGetSVData();
SolarMutexGuard aGuard;
m_bDirectTimeout = false;
- if( pSVData->maSchedCtx.mpSalTimer )
- pSVData->maSchedCtx.mpSalTimer->CallCallback();
+ return SalTimer::CallCallback( bHandleAllCurrentEvents );
}
void AquaSalTimer::handleTimerElapsed()
@@ -151,7 +149,7 @@ void AquaSalTimer::handleTimerElapsed()
{
// Stop the timer, as it is just invalidated after the firing function
Stop();
- callTimerCallback();
+ callTimerCallback( false );
}
else
queueDispatchTimerEvent( YES );
@@ -161,7 +159,7 @@ bool AquaSalTimer::handleDispatchTimerEvent( NSEvent *pEvent )
{
bool bIsValidEvent = IsValidEventVersion( [pEvent data1] );
if ( bIsValidEvent )
- callTimerCallback();
+ callTimerCallback( false );
return bIsValidEvent;
}
diff --git a/vcl/qa/cppunit/lifecycle.cxx b/vcl/qa/cppunit/lifecycle.cxx
index 26f8796a57ea..18160ccdb056 100644
--- a/vcl/qa/cppunit/lifecycle.cxx
+++ b/vcl/qa/cppunit/lifecycle.cxx
@@ -212,7 +212,7 @@ void LifecycleTest::testFocus()
xWin->Show();
xChild->GrabFocus();
// process asynchronous ToTop
- Scheduler::ProcessTaskScheduling();
+ Scheduler::ProcessTaskScheduling( false );
// FIXME: really awful to test focus issues without showing windows.
// CPPUNIT_ASSERT(xChild->HasFocus());
}
diff --git a/vcl/source/app/scheduler.cxx b/vcl/source/app/scheduler.cxx
index 8fd26ec79a55..53e8dfea483f 100644
--- a/vcl/source/app/scheduler.cxx
+++ b/vcl/source/app/scheduler.cxx
@@ -236,7 +236,7 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce, sal_uInt64 nTime)
rSchedCtx.mnTimerStart = 0;
rSchedCtx.mnTimerPeriod = InfiniteTimeoutMs;
rSchedCtx.mpSalTimer = pSVData->mpDefInst->CreateSalTimer();
- rSchedCtx.mpSalTimer->SetCallback(Scheduler::CallbackTaskScheduling);
+ rSchedCtx.mpSalTimer->SetCallback( Scheduler::ProcessTaskScheduling );
}
assert(SAL_MAX_UINT64 - nMS >= nTime);
@@ -256,12 +256,6 @@ void Scheduler::ImplStartTimer(sal_uInt64 nMS, bool bForce, sal_uInt64 nTime)
}
}
-void Scheduler::CallbackTaskScheduling()
-{
- // this function is for the saltimer callback
- Scheduler::ProcessTaskScheduling();
-}
-
static bool g_bDeterministicMode = false;
void Scheduler::SetDeterministicMode(bool bDeterministic)
@@ -325,7 +319,8 @@ static inline ImplSchedulerData* DropSchedulerData(
return pSchedulerDataNext;
}
-bool Scheduler::ProcessTaskScheduling()
+bool Scheduler::ProcessSingleTask( const bool bHandleAllCurrentEvents,
+ const sal_uInt64 nTime )
{
ImplSVData *pSVData = ImplGetSVData();
ImplSchedulerContext &rSchedCtx = pSVData->maSchedCtx;
@@ -336,10 +331,10 @@ bool Scheduler::ProcessTaskScheduling()
if ( !rSchedCtx.mbActive || InfiniteTimeoutMs == rSchedCtx.mnTimerPeriod )
return false;
- sal_uInt64 nTime = tools::Time::GetSystemTicks();
if ( nTime < rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod )
{
- SAL_WARN( "vcl.schedule", "we're too early - restart the timer!" );
+ SAL_WARN_IF( !bHandleAllCurrentEvents,
+ "vcl.schedule", "we're too early - restart the timer!" );
UpdateSystemTimer( rSchedCtx,
rSchedCtx.mnTimerStart + rSchedCtx.mnTimerPeriod - nTime,
true, nTime );
@@ -484,6 +479,20 @@ next_entry:
return !!pMostUrgent;
}
+bool Scheduler::ProcessTaskScheduling( bool bHandleAllCurrentEvents )
+{
+ sal_uInt64 nTime = tools::Time::GetSystemTicks();
+ bool bWasEvent = false, bAnyEvent = false;
+ do
+ {
+ bWasEvent = ProcessSingleTask( bHandleAllCurrentEvents, nTime );
+ if ( !bAnyEvent && bWasEvent )
+ bAnyEvent = bWasEvent;
+ }
+ while ( bWasEvent && bHandleAllCurrentEvents );
+ return bAnyEvent;
+}
+
void Task::StartTimer( sal_uInt64 nMS )
{
Scheduler::ImplStartTimer( nMS, false, tools::Time::GetSystemTicks() );
diff --git a/vcl/unx/generic/app/saldata.cxx b/vcl/unx/generic/app/saldata.cxx
index 4ad2c02db54f..39bab4f7368f 100644
--- a/vcl/unx/generic/app/saldata.cxx
+++ b/vcl/unx/generic/app/saldata.cxx
@@ -560,13 +560,6 @@ void X11SalData::XError( Display *pDisplay, XErrorEvent *pEvent )
m_aXErrorHandlerStack.back().m_bWas = true;
}
-void X11SalData::Timeout()
-{
- ImplSVData* pSVData = ImplGetSVData();
- if( pSVData->maSchedCtx.mpSalTimer )
- pSVData->maSchedCtx.mpSalTimer->CallCallback();
-}
-
struct YieldEntry
{
int fd; // file descriptor for reading
@@ -622,7 +615,7 @@ void SalXLib::Remove( int nFD )
}
}
-bool SalXLib::CheckTimeout( bool bExecuteTimers )
+bool SalXLib::HandleTimeout( HandleTimeoutMode eMode )
{
bool bRet = false;
if( m_aTimeout.tv_sec ) // timer is started
@@ -632,7 +625,7 @@ bool SalXLib::CheckTimeout( bool bExecuteTimers )
if( aTimeOfDay >= m_aTimeout )
{
bRet = true;
- if( bExecuteTimers )
+ if( eMode != HandleTimeoutMode::CheckOnly )
{
// timed out, update timeout
m_aTimeout = aTimeOfDay;
@@ -644,7 +637,7 @@ bool SalXLib::CheckTimeout( bool bExecuteTimers )
*/
m_aTimeout += m_nTimeoutMS;
// notify
- X11SalData::Timeout();
+ bRet = SalTimer::CallCallback( eMode == HandleTimeoutMode::ProcessAllCurrentTasks );
}
}
}
@@ -655,10 +648,7 @@ bool
SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
{
// check for timeouts here if you want to make screenshots
- static char* p_prioritize_timer = getenv ("SAL_HIGHPRIORITY_REPAINT");
bool bHandledEvent = false;
- if (p_prioritize_timer != nullptr)
- bHandledEvent = CheckTimeout();
const int nMaxEvents = bHandleAllCurrentEvents ? 100 : 1;
@@ -724,8 +714,9 @@ SalXLib::Yield( bool bWait, bool bHandleAllCurrentEvents )
}
// usually handle timeouts here (as in 5.2)
- if (p_prioritize_timer == nullptr)
- bHandledEvent = CheckTimeout() || bHandledEvent;
+ bHandledEvent = HandleTimeout( bHandleAllCurrentEvents
+ ? HandleTimeoutMode::ProcessAllCurrentTasks
+ : HandleTimeoutMode::ProcessSingleTask ) || bHandledEvent;
// handle wakeup events.
if ((nFound > 0) && FD_ISSET(m_pTimeoutFDS[0], &ReadFDS))
diff --git a/vcl/unx/generic/app/salinst.cxx b/vcl/unx/generic/app/salinst.cxx
index 0d30e1d17a99..b1615b052e94 100644
--- a/vcl/unx/generic/app/salinst.cxx
+++ b/vcl/unx/generic/app/salinst.cxx
@@ -145,7 +145,8 @@ bool X11SalInstance::AnyInput(VclInputFlags nType)
Display *pDisplay = vcl_sal::getSalDisplay(pData)->GetDisplay();
bool bRet = false;
- if( (nType & VclInputFlags::TIMER) && (mpXLib && mpXLib->CheckTimeout(false)) )
+ if( (nType & VclInputFlags::TIMER)
+ && mpXLib && mpXLib->HandleTimeout( HandleTimeoutMode::CheckOnly ) )
bRet = true;
if( !bRet && XPending(pDisplay) )
diff --git a/vcl/unx/gtk/gtkdata.cxx b/vcl/unx/gtk/gtkdata.cxx
index 97541eed22c1..6f849f212eaa 100644
--- a/vcl/unx/gtk/gtkdata.cxx
+++ b/vcl/unx/gtk/gtkdata.cxx
@@ -728,9 +728,7 @@ extern "C" {
sal_gtk_timeout_defer( pTSource );
- ImplSVData* pSVData = ImplGetSVData();
- if( pSVData->maSchedCtx.mpSalTimer )
- pSVData->maSchedCtx.mpSalTimer->CallCallback();
+ SalTimer::CallCallback( false );
return G_SOURCE_REMOVE;
}
diff --git a/vcl/unx/gtk3/gtk3gtkdata.cxx b/vcl/unx/gtk3/gtk3gtkdata.cxx
index f4d41a53d2c0..bf69882d181f 100644
--- a/vcl/unx/gtk3/gtk3gtkdata.cxx
+++ b/vcl/unx/gtk3/gtk3gtkdata.cxx
@@ -693,9 +693,7 @@ extern "C" {
sal_gtk_timeout_defer( pTSource );
- ImplSVData* pSVData = ImplGetSVData();
- if( pSVData->maSchedCtx.mpSalTimer )
- pSVData->maSchedCtx.mpSalTimer->CallCallback();
+ SalTimer::CallCallback( false );
return G_SOURCE_REMOVE;
}
diff --git a/vcl/unx/kde4/KDEXLib.cxx b/vcl/unx/kde4/KDEXLib.cxx
index 43e055a2c0bb..8be84f99a925 100644
--- a/vcl/unx/kde4/KDEXLib.cxx
+++ b/vcl/unx/kde4/KDEXLib.cxx
@@ -42,6 +42,8 @@
#include "KDESalDisplay.hxx"
+#include <saltimer.hxx>
+
#if KDE4_HAVE_GLIB
#include "KDE4FilePicker.hxx"
#include "tst_exclude_socket_notifiers.moc"
@@ -356,11 +358,11 @@ void KDEXLib::StopTimer()
timeoutTimer.stop();
}
-bool KDEXLib::CheckTimeout( bool bExecuteTimers )
+bool KDEXLib::HandleTimeout( HandleTimeoutMode eMode )
{
if( !m_isGlibEventLoopType )
- return SalXLib::CheckTimeout( bExecuteTimers );
- assert( !bExecuteTimers );
+ return SalXLib::HandleTimeout( eMode );
+ assert( eMode == HandleTimeoutMode::CheckOnly );
return m_bTimedOut;
}
@@ -376,7 +378,7 @@ void KDEXLib::customEvent(QEvent* e)
if( e->type() == m_timerEventId )
{
m_bTimedOut = false;
- X11SalData::Timeout();
+ SalTimer::CallCallback( false );
}
}
diff --git a/vcl/unx/kde4/KDEXLib.hxx b/vcl/unx/kde4/KDEXLib.hxx
index 452aae8b3286..e2d6d6b024fb 100644
--- a/vcl/unx/kde4/KDEXLib.hxx
+++ b/vcl/unx/kde4/KDEXLib.hxx
@@ -84,7 +84,7 @@ public:
virtual void Remove( int fd ) override;
virtual void StartTimer( sal_uLong nMS ) override;
virtual void StopTimer() override;
- virtual bool CheckTimeout( bool bExecuteTimers = true ) override;
+ virtual bool HandleTimeout( HandleTimeoutMode eMode ) override;
virtual void Wakeup() override;
void TriggerUserEventProcessing();
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index f2a998ee78e7..ceb3651b4353 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -512,11 +512,8 @@ bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
// event loop with timeout messages.
// We ensure we never handle more then one timeout per call.
// This way we'll always process a normal system message.
- if ( !bWasTimeoutMsg && pTimer && pTimer->IsDirectTimeout() )
- {
- pTimer->ImplHandleElapsedTimer();
- bWasMsg = true;
- }
+ if ( (!bWasTimeoutMsg || bHandleAllCurrentEvents) && pTimer && pTimer->IsDirectTimeout() )
+ bWasMsg = pTimer->ImplHandleElapsedTimer( bHandleAllCurrentEvents ) || bWasMsg;
if ( bHandleAllCurrentEvents )
nLastTicks = nCurTicks;
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 9c67e841956e..5b72cb7d8760 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -147,15 +147,16 @@ void CALLBACK SalTimerProc(PVOID data, BOOLEAN)
}
}
-void WinSalTimer::ImplHandleElapsedTimer()
+bool WinSalTimer::ImplHandleElapsedTimer( bool bHandleAllCurrentEvents )
{
// Test for MouseLeave
SalTestMouseLeave();
m_bDirectTimeout = false;
ImplSalYieldMutexAcquireWithWait();
- CallCallback();
+ bool bRet = Timeout( bHandleAllCurrentEvents );
ImplSalYieldMutexRelease();
+ return bRet;
}
bool WinSalTimer::ImplHandleTimerEvent( const WPARAM aWPARAM )
commit d0bc23eeb2b998e1b7acd77f1b1cc63652b15299
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Mon Oct 16 19:03:59 2017 +0200
tdf#105062 prevent AutoRecovery DB deadlock
AutoRecovery document event notification - at least for Firebird
DB files - needs the SolarMutex for getLocation().
If I place the SolarMutex inside the CacheLockGuard I get a the
css::uno::RuntimeException from CacheLockGuard::lock.
Change-Id: I3341a80ecf144d29e0a68de6695d1ca6a7241c60
diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx
index d1b106592d4e..53f02f4e3d5f 100644
--- a/framework/source/services/autorecovery.cxx
+++ b/framework/source/services/autorecovery.cxx
@@ -2606,6 +2606,7 @@ void AutoRecovery::implts_updateDocumentUsedForSavingState(const css::uno::Refer
void AutoRecovery::implts_markDocumentAsSaved(const css::uno::Reference< css::frame::XModel >& xDocument)
{
+ SolarMutexGuard aSolarGuard;
CacheLockGuard aCacheLock(this, cppu::WeakComponentImplHelperBase::rBHelper.rMutex, m_nDocCacheLock, LOCK_FOR_CACHE_USE);
AutoRecovery::TDocumentInfo aInfo;
commit 03c60e9f7f5de1b362d8ca1c6c4375c8aebc2bd9
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Mon Oct 16 17:04:24 2017 +0200
Cleanup and refactoring
Change-Id: If1f2477fc8817b4ae7816e807154e35004bb4da9
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 01e50af77b99..a80af4fb5ee7 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -63,6 +63,8 @@ public:
class AquaSalInstance : public SalInstance, public SalUserEventList
{
+ friend class AquaSalFrame;
+
bool RunInMainYield( bool bHandleAllCurrentEvents );
virtual void TriggerUserEventProcessing() override;
@@ -81,7 +83,6 @@ public:
static std::list<const ApplicationEvent*> aAppEventList;
-public:
AquaSalInstance();
virtual ~AquaSalInstance() override;
@@ -136,9 +137,6 @@ public:
// this is needed to avoid duplicate open events through a) command line and b) NSApp's openFile
static bool isOnCommandLine( const OUString& );
-public:
- friend class AquaSalFrame;
-
void delayedSettingsChanged( bool bInvalidate );
// Is this the NSAppThread?
diff --git a/vcl/inc/win/saldata.hxx b/vcl/inc/win/saldata.hxx
index 0f3e05b8f31a..659fd68f7dda 100644
--- a/vcl/inc/win/saldata.hxx
+++ b/vcl/inc/win/saldata.hxx
@@ -180,8 +180,8 @@ bool ImplHandleSalObjSysCharMsg( HWND hWnd, WPARAM wParam, LPARAM lParam );
bool ImplHandleGlobalMsg( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam, LRESULT& rlResult );
WinSalObject* ImplFindSalObject( HWND hWndChild );
-bool ImplSalPreDispatchMsg( MSG* pMsg );
-void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT nDispatchResult );
+bool ImplSalPreDispatchMsg( const MSG* pMsg );
+void ImplSalPostDispatchMsg( const MSG* pMsg );
void ImplSalLogFontToFontW( HDC hDC, const LOGFONTW& rLogFont, vcl::Font& rFont );
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index b7d1a1e0d0f1..61d284d82ddb 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -25,7 +25,7 @@
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 );
+ friend LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, bool& rDef );
// for access to GetNextVersionedEvent
friend void CALLBACK SalTimerProc( PVOID data, BOOLEAN );
// for access to ImplHandleElapsedTimer
diff --git a/vcl/osx/vclnsapp.mm b/vcl/osx/vclnsapp.mm
index 4dd8ceac8169..23b22c360eeb 100644
--- a/vcl/osx/vclnsapp.mm
+++ b/vcl/osx/vclnsapp.mm
@@ -66,7 +66,7 @@ SAL_WNODEPRECATED_DECLARATIONS_PUSH
NSEvent* pEvent = [NSEvent otherEventWithType: NSApplicationDefined
location: NSZeroPoint
modifierFlags: 0
- timestamp: 0
+ timestamp: [[NSProcessInfo processInfo] systemUptime]
windowNumber: 0
context: nil
subtype: AquaSalInstance::AppExecuteSVMain
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index 5fcca5cde5b4..f2a998ee78e7 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -569,124 +569,108 @@ bool WinSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
return bDidWork;
}
-LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, int& rDef )
+#define CASE_NOYIELDLOCK( salmsg, function ) \
+ case salmsg: \
+ assert( !pInst->mbNoYieldLock ); \
+ pInst->mbNoYieldLock = true; \
+ function; \
+ pInst->mbNoYieldLock = false; \
+ break;
+
+#define CASE_NOYIELDLOCK_RESULT( salmsg, function ) \
+ case salmsg: \
+ assert( !pInst->mbNoYieldLock ); \
+ pInst->mbNoYieldLock = true; \
+ nRet = reinterpret_cast<LRESULT>( function ); \
+ pInst->mbNoYieldLock = false; \
+ break;
+
+LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, bool& rDef )
{
LRESULT nRet = 0;
WinSalInstance *pInst = GetSalData()->mpInstance;
+ WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
switch ( nMsg )
{
case SAL_MSG_THREADYIELD:
assert( !(bool)wParam );
- nRet = static_cast<LRESULT>(ImplSalYield( false, (bool)lParam ));
- rDef = FALSE;
+ nRet = static_cast<LRESULT>(ImplSalYield(
+ false, static_cast<bool>( lParam ) ));
break;
+
case SAL_MSG_STARTTIMER:
{
sal_uInt64 nTime = tools::Time::GetSystemTicks();
- if ( nTime < (sal_uInt64) lParam )
- nTime = (sal_uInt64) lParam - nTime;
+ if ( nTime < static_cast<sal_uInt64>( lParam ) )
+ nTime = static_cast<sal_uInt64>( lParam ) - nTime;
else
nTime = 0;
- static_cast<WinSalTimer*>(ImplGetSVData()->maSchedCtx.mpSalTimer)->ImplStart( nTime );
- rDef = FALSE;
+ assert( pTimer != nullptr );
+ pTimer->ImplStart( nTime );
break;
}
+
case SAL_MSG_STOPTIMER:
- static_cast<WinSalTimer*>(ImplGetSVData()->maSchedCtx.mpSalTimer)->ImplStop();
- break;
- case SAL_MSG_CREATEFRAME:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- nRet = reinterpret_cast<LRESULT>(ImplSalCreateFrame( GetSalData()->mpInstance, reinterpret_cast<HWND>(lParam), (SalFrameStyleFlags)wParam ));
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_RECREATEHWND:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- nRet = reinterpret_cast<LRESULT>(ImplSalReCreateHWND( reinterpret_cast<HWND>(wParam), reinterpret_cast<HWND>(lParam), false ));
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_RECREATECHILDHWND:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- nRet = reinterpret_cast<LRESULT>(ImplSalReCreateHWND( reinterpret_cast<HWND>(wParam), reinterpret_cast<HWND>(lParam), true ));
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_DESTROYFRAME:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- delete reinterpret_cast<SalFrame*>(lParam);
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
+ assert( pTimer != nullptr );
+ pTimer->ImplStop();
break;
+
+ CASE_NOYIELDLOCK_RESULT( SAL_MSG_CREATEFRAME, ImplSalCreateFrame( GetSalData()->mpInstance,
+ reinterpret_cast<HWND>(lParam), static_cast<SalFrameStyleFlags>(wParam)) )
+ CASE_NOYIELDLOCK_RESULT( SAL_MSG_RECREATEHWND, ImplSalReCreateHWND(
+ reinterpret_cast<HWND>(wParam), reinterpret_cast<HWND>(lParam), false) )
+ CASE_NOYIELDLOCK_RESULT( SAL_MSG_RECREATECHILDHWND, ImplSalReCreateHWND(
+ reinterpret_cast<HWND>(wParam), reinterpret_cast<HWND>(lParam), true) )
+ CASE_NOYIELDLOCK( SAL_MSG_DESTROYFRAME, delete reinterpret_cast<SalFrame*>(lParam) )
+
case SAL_MSG_DESTROYHWND:
- //We only destroy the native window here. We do NOT destroy the SalFrame contained
- //in the structure (GetWindowPtr()).
+ // We only destroy the native window here. We do NOT destroy the SalFrame contained
+ // in the structure (GetWindowPtr()).
if (DestroyWindow(reinterpret_cast<HWND>(lParam)) == 0)
{
OSL_FAIL("DestroyWindow failed!");
- //Failure: We remove the SalFrame from the window structure. So we avoid that
+ // Failure: We remove the SalFrame from the window structure. So we avoid that
// the window structure may contain an invalid pointer, once the SalFrame is deleted.
- SetWindowPtr(reinterpret_cast<HWND>(lParam), nullptr);
+ SetWindowPtr(reinterpret_cast<HWND>(lParam), nullptr);
}
- rDef = FALSE;
- break;
- case SAL_MSG_CREATEOBJECT:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- nRet = reinterpret_cast<LRESULT>(ImplSalCreateObject( GetSalData()->mpInstance, reinterpret_cast<WinSalFrame*>(lParam) ));
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_DESTROYOBJECT:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- delete reinterpret_cast<SalObject*>(lParam);
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_GETDC:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- nRet = reinterpret_cast<LRESULT>(GetDCEx( reinterpret_cast<HWND>(wParam), nullptr, DCX_CACHE ));
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
- break;
- case SAL_MSG_RELEASEDC:
- assert( !pInst->mbNoYieldLock );
- pInst->mbNoYieldLock = true;
- ReleaseDC( reinterpret_cast<HWND>(wParam), reinterpret_cast<HDC>(lParam) );
- pInst->mbNoYieldLock = false;
- rDef = FALSE;
break;
+
+ CASE_NOYIELDLOCK_RESULT( SAL_MSG_CREATEOBJECT, ImplSalCreateObject(
+ GetSalData()->mpInstance, reinterpret_cast<WinSalFrame*>(lParam)) )
+ CASE_NOYIELDLOCK( SAL_MSG_DESTROYOBJECT, delete reinterpret_cast<SalObject*>(lParam) )
+ CASE_NOYIELDLOCK_RESULT( SAL_MSG_GETDC, GetDCEx(
+ reinterpret_cast<HWND>(wParam), nullptr, DCX_CACHE) )
+ CASE_NOYIELDLOCK( SAL_MSG_RELEASEDC, ReleaseDC(
+ reinterpret_cast<HWND>(wParam), reinterpret_cast<HDC>(lParam)) )
+
case SAL_MSG_TIMER_CALLBACK:
- {
- WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
assert( pTimer != nullptr );
nRet = static_cast<LRESULT>( pTimer->ImplHandleTimerEvent( wParam ) );
- nDef = FALSE;
break;
- }
+
case WM_TIMER:
- {
- WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
assert( pTimer != nullptr );
nRet = static_cast<LRESULT>( pTimer->ImplHandle_WM_TIMER( wParam ) );
- nDef = FALSE;
break;
- }
+
+ case SAL_MSG_DUMMY:
+ break;
+
+ default:
+ rDef = TRUE;
+ break;
}
return nRet;
}
+#undef CASE_NOYIELDLOCK
+#undef CASE_NOYIELDLOCK_RESULT
+
LRESULT CALLBACK SalComWndProcW( HWND hWnd, UINT nMsg, WPARAM wParam, LPARAM lParam )
{
- int bDef = TRUE;
+ bool bDef = FALSE;
LRESULT nRet = 0;
__try
{
diff --git a/vcl/win/window/salobj.cxx b/vcl/win/window/salobj.cxx
index 172f61e923d3..75e406c33f61 100644
--- a/vcl/win/window/salobj.cxx
+++ b/vcl/win/window/salobj.cxx
@@ -145,7 +145,7 @@ LRESULT CALLBACK SalSysMsgProc( int nCode, WPARAM wParam, LPARAM lParam )
return CallNextHookEx( pSalData->mhSalObjMsgHook, nCode, wParam, lParam );
}
-bool ImplSalPreDispatchMsg( MSG* pMsg )
+bool ImplSalPreDispatchMsg( const MSG* pMsg )
{
// Used for Unicode and none Unicode
SalData* pSalData = GetSalData();
@@ -231,10 +231,10 @@ bool ImplSalPreDispatchMsg( MSG* pMsg )
return FALSE;
}
-void ImplSalPostDispatchMsg( MSG* pMsg, LRESULT /* nDispatchResult */ )
+void ImplSalPostDispatchMsg( const MSG* pMsg )
{
// Used for Unicode and none Unicode
- SalData* pSalData = GetSalData();
+ SalData *pSalData = GetSalData();
if ( (pMsg->message == WM_KEYDOWN) || (pMsg->message == WM_KEYUP) )
{
commit 0ea75033971dde1733410a6ce95022bf9c879665
Author: Jan-Marek Glogowski <glogow at fbihome.de>
Date: Mon Oct 16 16:59:45 2017 +0200
Guarantee direct timout handling
Change-Id: I3c31f8b9cec592631b4089411163dadecffde816
diff --git a/vcl/README.scheduler b/vcl/README.scheduler
index 17648ae3b439..80c14b032c54 100644
--- a/vcl/README.scheduler
+++ b/vcl/README.scheduler
@@ -89,6 +89,35 @@ can be added to the scheduler reasonably.
= Implementation details =
+== General: event priority for DoYield ==
+
+There are three types of events, with different priority:
+
+1. LO user events
+2. System events
+3. LO Scheduler event
+
+They should be processed according to the following code:
+
+bool DoYield( bool bWait, bool bAllCurrent )
+{
+ bool bWasEvent = ProcessUserEvents( bAllCurrent );
+ if ( !bAllCurrent && bWasEvent )
+ return true;
+ bWasEvent = ProcessSystemEvents( bAllCurrent, &bWasSchedulerEvent ) || bWasEvent;
+ if ( !bWasSchedulerEvent && IsSchedulerEvent() )
+ {
+ ProcessSchedulerEvent()
+ bWasEvent = true;
+ }
+ if ( !bWasEvent && bWait )
+ {
+ WaitForSystemEvents();
+ bWasEvent = true;
+ }
+ return bWasEvent;
+}
+
== General: main thread deferral ==
Currently for Mac and Windows, we run main thread deferrals by disabling the
diff --git a/vcl/inc/osx/salinst.h b/vcl/inc/osx/salinst.h
index 272cfc722d64..01e50af77b99 100644
--- a/vcl/inc/osx/salinst.h
+++ b/vcl/inc/osx/salinst.h
@@ -77,6 +77,7 @@ public:
osl::Condition maWaitingYieldCond;
bool mbIsLiveResize;
bool mbNoYieldLock;
+ bool mbTimerProcessed;
static std::list<const ApplicationEvent*> aAppEventList;
diff --git a/vcl/inc/osx/saltimer.h b/vcl/inc/osx/saltimer.h
index c860ad5cbdda..a9934f280636 100644
--- a/vcl/inc/osx/saltimer.h
+++ b/vcl/inc/osx/saltimer.h
@@ -44,6 +44,7 @@ public:
class AquaSalTimer final : public SalTimer, protected VersionedEvent
{
NSTimer *m_pRunningTimer;
+ bool m_bDirectTimeout; ///< timeout can be processed directly
void queueDispatchTimerEvent( bool bAtStart );
void callTimerCallback();
@@ -56,13 +57,19 @@ public:
void Stop() override;
void handleStartTimerEvent( NSEvent* pEvent );
- void handleDispatchTimerEvent( NSEvent* pEvent );
+ bool handleDispatchTimerEvent( NSEvent* pEvent );
void handleTimerElapsed();
void handleWindowShouldClose();
bool IsTimerElapsed() const;
+ inline bool IsDirectTimeout() const;
};
+inline bool AquaSalTimer::IsDirectTimeout() const
+{
+ return m_bDirectTimeout;
+}
+
#endif // INCLUDED_VCL_INC_OSX_SALTIMER_H
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/inc/win/saltimer.h b/vcl/inc/win/saltimer.h
index d762b51b6716..b7d1a1e0d0f1 100644
--- a/vcl/inc/win/saltimer.h
+++ b/vcl/inc/win/saltimer.h
@@ -42,9 +42,9 @@ class WinSalTimer final : public SalTimer, protected VersionedEvent
void ImplStart( sal_uIntPtr nMS );
void ImplStop();
- void ImplHandleTimerEvent( WPARAM aWPARAM );
+ bool ImplHandleTimerEvent( WPARAM aWPARAM );
void ImplHandleElapsedTimer();
- void ImplHandle_WM_TIMER( WPARAM aWPARAM );
+ bool ImplHandle_WM_TIMER( WPARAM aWPARAM );
public:
WinSalTimer();
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index d475f30275b0..922046bcbfe8 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -379,6 +379,7 @@ AquaSalInstance::AquaSalInstance()
: mnActivePrintJobs( 0 )
, mbIsLiveResize( false )
, mbNoYieldLock( false )
+ , mbTimerProcessed( false )
{
mpSalYieldMutex = new SalYieldMutex;
mpSalYieldMutex->acquire();
@@ -452,9 +453,12 @@ void AquaSalInstance::handleAppDefinedEvent( NSEvent* pEvent )
break;
}
case DispatchTimerEvent:
- if ( pTimer )
- pTimer->handleDispatchTimerEvent( pEvent );
+ {
+ AquaSalInstance *pInst = GetSalData()->mpInstance;
+ if ( pTimer && pInst )
+ pInst->mbTimerProcessed = pTimer->handleDispatchTimerEvent( pEvent );
break;
+ }
#if !HAVE_FEATURE_MACOSX_SANDBOX
case AppleRemoteControlEvent: // Defined in <apple_remote/RemoteMainController.h>
{
@@ -570,6 +574,8 @@ bool AquaSalInstance::DoYield(bool bWait, bool bHandleAllCurrentEvents)
// handle available events
NSEvent* pEvent = nil;
NSTimeInterval now = [[NSProcessInfo processInfo] systemUptime];
+ mbTimerProcessed = false;
+
do
{
SolarMutexReleaser aReleaser;
@@ -596,6 +602,13 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
}
while( true );
+ AquaSalTimer *pTimer = static_cast<AquaSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
+ if ( !mbTimerProcessed && pTimer && pTimer->IsDirectTimeout() )
+ {
+ pTimer->handleTimerElapsed();
+ bHadEvent = true;
+ }
+
// if we had no event yet, wait for one if requested
if( bWait && ! bHadEvent )
{
diff --git a/vcl/osx/saltimer.cxx b/vcl/osx/saltimer.cxx
index 3226b1d1f9ec..64702c0d907d 100644
--- a/vcl/osx/saltimer.cxx
+++ b/vcl/osx/saltimer.cxx
@@ -74,6 +74,7 @@ SAL_WNODEPRECATED_DECLARATIONS_POP
void AquaSalTimer::queueDispatchTimerEvent( bool bAtStart )
{
Stop();
+ m_bDirectTimeout = true;
ImplNSAppPostEvent( AquaSalInstance::DispatchTimerEvent,
bAtStart, GetNextEventVersion() );
}
@@ -139,13 +140,14 @@ void AquaSalTimer::callTimerCallback()
{
ImplSVData* pSVData = ImplGetSVData();
SolarMutexGuard aGuard;
+ m_bDirectTimeout = false;
if( pSVData->maSchedCtx.mpSalTimer )
pSVData->maSchedCtx.mpSalTimer->CallCallback();
}
void AquaSalTimer::handleTimerElapsed()
{
- if ( GetSalData()->mpInstance->mbIsLiveResize )
+ if ( m_bDirectTimeout || GetSalData()->mpInstance->mbIsLiveResize )
{
// Stop the timer, as it is just invalidated after the firing function
Stop();
@@ -155,10 +157,12 @@ void AquaSalTimer::handleTimerElapsed()
queueDispatchTimerEvent( YES );
}
-void AquaSalTimer::handleDispatchTimerEvent( NSEvent *pEvent )
+bool AquaSalTimer::handleDispatchTimerEvent( NSEvent *pEvent )
{
- if ( IsValidEventVersion( [pEvent data1] ) )
+ bool bIsValidEvent = IsValidEventVersion( [pEvent data1] );
+ if ( bIsValidEvent )
callTimerCallback();
+ return bIsValidEvent;
}
void AquaSalTimer::handleStartTimerEvent( NSEvent* pEvent )
@@ -177,8 +181,8 @@ void AquaSalTimer::handleStartTimerEvent( NSEvent* pEvent )
bool AquaSalTimer::IsTimerElapsed() const
{
- assert( !(ExistsValidEvent() && m_pRunningTimer) );
- if ( ExistsValidEvent() )
+ assert( !((ExistsValidEvent() || m_bDirectTimeout) && m_pRunningTimer) );
+ if ( ExistsValidEvent() || m_bDirectTimeout )
return true;
if ( !m_pRunningTimer )
return false;
diff --git a/vcl/win/app/salinst.cxx b/vcl/win/app/salinst.cxx
index d1fc8adb6272..5fcca5cde5b4 100644
--- a/vcl/win/app/salinst.cxx
+++ b/vcl/win/app/salinst.cxx
@@ -459,17 +459,15 @@ void WinSalInstance::AcquireYieldMutex( sal_uInt32 nCount )
mpSalYieldMutex->acquire( nCount );
}
-static void ImplSalDispatchMessage( MSG* pMsg )
+static LRESULT ImplSalDispatchMessage( const MSG* pMsg )
{
SalData* pSalData = GetSalData();
- if ( pSalData->mpFirstObject )
- {
- if ( ImplSalPreDispatchMsg( pMsg ) )
- return;
- }
+ if ( pSalData->mpFirstObject && ImplSalPreDispatchMsg( pMsg ) )
+ return 0;
LRESULT lResult = DispatchMessageW( pMsg );
if ( pSalData->mpFirstObject )
- ImplSalPostDispatchMsg( pMsg, lResult );
+ ImplSalPostDispatchMsg( pMsg );
+ return lResult;
}
bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
@@ -491,10 +489,13 @@ bool ImplSalYield( bool bWait, bool bHandleAllCurrentEvents )
if ( bOneEvent )
{
bWasMsg = true;
- if ( !bWasTimeoutMsg )
- bWasTimeoutMsg = (SAL_MSG_TIMER_CALLBACK == aMsg.message);
TranslateMessage( &aMsg );
- ImplSalDispatchMessage( &aMsg );
+ LRESULT nRet = ImplSalDispatchMessage( &aMsg );
+
+ if ( !bWasTimeoutMsg )
+ bWasTimeoutMsg = (SAL_MSG_TIMER_CALLBACK == aMsg.message)
+ && static_cast<bool>( nRet );
+
if ( bHandleAllCurrentEvents
&& !bHadNewerEvent && aMsg.time > nCurTicks
&& (nLastTicks <= nCurTicks || aMsg.time < nLastTicks) )
@@ -666,14 +667,16 @@ LRESULT CALLBACK SalComWndProc( HWND, UINT nMsg, WPARAM wParam, LPARAM lParam, i
{
WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
assert( pTimer != nullptr );
- pTimer->ImplHandleTimerEvent( wParam );
+ nRet = static_cast<LRESULT>( pTimer->ImplHandleTimerEvent( wParam ) );
+ nDef = FALSE;
break;
}
case WM_TIMER:
{
WinSalTimer *const pTimer = static_cast<WinSalTimer*>( ImplGetSVData()->maSchedCtx.mpSalTimer );
assert( pTimer != nullptr );
- pTimer->ImplHandle_WM_TIMER( wParam );
+ nRet = static_cast<LRESULT>( pTimer->ImplHandle_WM_TIMER( wParam ) );
+ nDef = FALSE;
break;
}
}
diff --git a/vcl/win/app/saltimer.cxx b/vcl/win/app/saltimer.cxx
index 9d20c70bdb5a..9c67e841956e 100644
--- a/vcl/win/app/saltimer.cxx
+++ b/vcl/win/app/saltimer.cxx
@@ -158,13 +158,14 @@ void WinSalTimer::ImplHandleElapsedTimer()
ImplSalYieldMutexRelease();
}
-void WinSalTimer::ImplHandleTimerEvent( const WPARAM aWPARAM )
+bool WinSalTimer::ImplHandleTimerEvent( const WPARAM aWPARAM )
{
assert( aWPARAM <= SAL_MAX_INT32 );
if ( !IsValidEventVersion( static_cast<sal_Int32>( aWPARAM ) ) )
- return;
+ return false;
ImplHandleElapsedTimer();
+ return true;
}
void WinSalTimer::SetForceRealTimer( const bool bVal )
@@ -179,11 +180,14 @@ void WinSalTimer::SetForceRealTimer( const bool bVal )
Start( 0 );
}
-void WinSalTimer::ImplHandle_WM_TIMER( const WPARAM aWPARAM )
+bool WinSalTimer::ImplHandle_WM_TIMER( const WPARAM aWPARAM )
{
assert( m_aWmTimerId == aWPARAM );
- if ( m_aWmTimerId == aWPARAM && m_bDirectTimeout && m_bForceRealTimer )
- ImplHandleElapsedTimer();
+ if ( !(m_aWmTimerId == aWPARAM && m_bDirectTimeout && m_bForceRealTimer) )
+ return false;
+
+ ImplHandleElapsedTimer();
+ return true;
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 01b9fdb2712e1a10e9a24b11976bb4fb94ac5bd9
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Oct 17 12:04:45 2017 +0200
loplugin:useuniqueptr in tools/inetmsg.hxx
Change-Id: Ifdf0da7f59af1777f214cbafeb75b46136775f67
Reviewed-on: https://gerrit.libreoffice.org/43450
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index 4c2b039442cc..73bbd8a8afcc 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -938,10 +938,8 @@ void ODatabaseForm::Encode( OUString& rString )
void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rName,
const OUString& rData )
{
-
// Create part as MessageChild
- INetMIMEMessage* pChild = new INetMIMEMessage();
-
+ std::unique_ptr<INetMIMEMessage> pChild(new INetMIMEMessage);
// Header
//TODO: Encode rName into a properly formatted Content-Disposition header
@@ -965,7 +963,7 @@ void ODatabaseForm::InsertTextPart( INetMIMEMessage& rParent, const OUString& rN
pStream->Flush();
pStream->Seek( 0 );
pChild->SetDocumentLB( new SvLockBytes(pStream, true) );
- rParent.AttachChild( *pChild );
+ rParent.AttachChild( std::move(pChild) );
}
@@ -1005,7 +1003,7 @@ bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
// Create part as MessageChild
- INetMIMEMessage* pChild = new INetMIMEMessage;
+ std::unique_ptr<INetMIMEMessage> pChild(new INetMIMEMessage);
// Header
@@ -1025,7 +1023,7 @@ bool ODatabaseForm::InsertFilePart( INetMIMEMessage& rParent, const OUString& rN
// Body
pChild->SetDocumentLB( new SvLockBytes(pStream, true) );
- rParent.AttachChild( *pChild );
+ rParent.AttachChild( std::move(pChild) );
return true;
}
diff --git a/include/tools/inetmsg.hxx b/include/tools/inetmsg.hxx
index bb99ee3296be..e1b26dbe43b7 100644
--- a/include/tools/inetmsg.hxx
+++ b/include/tools/inetmsg.hxx
@@ -28,6 +28,7 @@
#include <vector>
#include <map>
+#include <memory>
class DateTime;
@@ -72,14 +73,15 @@ enum class InetMessageMime
class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage
{
- ::std::vector< INetMessageHeader* >
+ ::std::vector< std::unique_ptr<INetMessageHeader> >
m_aHeaderList;
SvLockBytesRef m_xDocLB;
::std::map<InetMessageMime, sal_uIntPtr> m_nMIMEIndex;
INetMIMEMessage* pParent;
- ::std::vector< INetMIMEMessage* > aChildren;
+ ::std::vector< std::unique_ptr<INetMIMEMessage> >
+ aChildren;
OString m_aBoundary;
OUString GetHeaderValue_Impl (
@@ -99,12 +101,11 @@ class SAL_WARN_UNUSED TOOLS_DLLPUBLIC INetMIMEMessage
if (m_aHeaderList.size() <= rnIndex)
{
rnIndex = m_aHeaderList.size();
- m_aHeaderList.push_back( p );
+ m_aHeaderList.emplace_back( p );
}
else
{
- delete m_aHeaderList[ rnIndex ];
- m_aHeaderList[ rnIndex ] = p;
+ m_aHeaderList[ rnIndex ].reset(p);
}
}
@@ -170,12 +171,12 @@ public:
INetMIMEMessage* GetChild (sal_uIntPtr nIndex) const
{
- return ( nIndex < aChildren.size() ) ? aChildren[ nIndex ] : nullptr;
+ return ( nIndex < aChildren.size() ) ? aChildren[ nIndex ].get() : nullptr;
}
INetMIMEMessage* GetParent() const { return pParent; }
void EnableAttachMultipartFormDataChild();
- void AttachChild( INetMIMEMessage& rChildMsg );
+ void AttachChild( std::unique_ptr<INetMIMEMessage> pChildMsg );
const OString& GetMultipartBoundary() const { return m_aBoundary; }
};
diff --git a/tools/source/inet/inetmsg.cxx b/tools/source/inet/inetmsg.cxx
index 704c44fad587..b3dc426ad7b6 100644
--- a/tools/source/inet/inetmsg.cxx
+++ b/tools/source/inet/inetmsg.cxx
@@ -218,12 +218,6 @@ INetMIMEMessage::INetMIMEMessage()
INetMIMEMessage::~INetMIMEMessage()
{
- for (auto i: m_aHeaderList) {
- delete i;
- }
- for (auto i: aChildren) {
- delete i;
- }
}
void INetMIMEMessage::SetMIMEVersion (const OUString& rVersion)
@@ -293,12 +287,13 @@ void INetMIMEMessage::EnableAttachMultipartFormDataChild()
SetContentTransferEncoding("7bit");
}
-void INetMIMEMessage::AttachChild(INetMIMEMessage& rChildMsg)
+void INetMIMEMessage::AttachChild(std::unique_ptr<INetMIMEMessage> pChildMsg)
{
+ assert(IsContainer());
if (IsContainer())
{
- rChildMsg.pParent = this;
- aChildren.push_back( &rChildMsg );
+ pChildMsg->pParent = this;
+ aChildren.push_back( std::move(pChildMsg) );
}
}
commit d728492f4aa195fd4aec3ddb116879de76a95c6d
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 17 12:34:35 2017 +0200
Add to nPos once instead of in each iteration
Change-Id: I9ab9d5be1edead3a83375d87910bc9128c894b85
diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 5855f8928220..79212d271461 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -2411,19 +2411,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nCounter++;
i++;
while (i < nStringsCnt &&
sStrArray[i][0] == '0')
{
rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
nResultStringsCnt--;
nCounter++;
i++;
}
+ nPos += rStr.getLength();
}
else
{
@@ -2561,19 +2560,18 @@ sal_Int32 ImpSvNumberformatScan::FinalScan( OUString& rString )
bDecSep = true;
nTypeArray[i] = NF_SYMBOLTYPE_DIGIT;
OUString& rStr = sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
- i++;
nCounter++;
+ i++;
while (i < nStringsCnt &&
sStrArray[i][0] == '0')
{
rStr += sStrArray[i];
- nPos = nPos + sStrArray[i].getLength();
nTypeArray[i] = NF_SYMBOLTYPE_EMPTY;
nResultStringsCnt--;
nCounter++;
i++;
}
+ nPos += rStr.getLength();
}
else
{
commit d1538ef63863f7a016bd2c3752ccdd9819e41781
Author: Eike Rathke <erack at redhat.com>
Date: Tue Oct 17 12:32:09 2017 +0200
More tests for time and date+time fractions of seconds, tdf#112933 related
Covering the loop and non-loop states in
ImpSvNumberformatScan::FinalScan()
Change-Id: I4a8da617a2a61ad12a99462bfe4014aaa5a75c1b
diff --git a/svl/qa/unit/svl.cxx b/svl/qa/unit/svl.cxx
index 43824e4d8c71..a8ebfbc281aa 100644
--- a/svl/qa/unit/svl.cxx
+++ b/svl/qa/unit/svl.cxx
@@ -1311,6 +1311,25 @@ void Test::testUserDefinedNumberFormats()
sCode = "MM:SS.0";
sExpected = "23:53.6";
checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+ // Two decimals.
+ sCode = "MM:SS.00";
+ sExpected = "23:53.61";
+ checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+ // Three decimals.
+ sCode = "MM:SS.000";
+ sExpected = "23:53.605";
+ checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+
+ // Same with date+time.
+ sCode = "YYYY-MM-DD MM:SS.0";
+ sExpected = "1900-01-02 23:53.6";
+ checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+ sCode = "YYYY-MM-DD MM:SS.00";
+ sExpected = "1900-01-02 23:53.61";
+ checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
+ sCode = "YYYY-MM-DD MM:SS.000";
+ sExpected = "1900-01-02 23:53.605";
+ checkPreviewString(aFormatter, sCode, M_PI, eLang, sExpected);
}
}
commit 0f50f4d91809c65b50da087a84fb7b8722fda3f9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 17 10:32:41 2017 +0200
EPUB export: ignore underline type/style 'none'
This is similar to commit ebf34ec31fb441d6226075a51f5f83ebf4668082 (EPUB
export: ignore line though type/style 'none', 2017-09-11), but this time
for underline.
Change-Id: I806f64cc59e8cd8ab944500256755c18ed3d1249
Reviewed-on: https://gerrit.libreoffice.org/43449
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/external/libepubgen/libepubgen-epub3.patch.1 b/external/libepubgen/libepubgen-epub3.patch.1
index d1d1af2333f6..95ad47038ba9 100644
--- a/external/libepubgen/libepubgen-epub3.patch.1
+++ b/external/libepubgen/libepubgen-epub3.patch.1
@@ -2383,3 +2383,39 @@ index 07aa50d..26675af 100644
--
2.12.3
+From 4f46bc715a5fc8a0e13bb1596f6f5dbb55ca0632 Mon Sep 17 00:00:00 2001
+From: Miklos Vajna <vmiklos at collabora.co.uk>
+Date: Tue, 17 Oct 2017 10:22:35 +0200
+Subject: [PATCH] EPUBSpanStyleManager: ignore underline type/style 'none'
+
+This is similar to commit 7be89d1881e175182039ca93a1546d79933cab85
+(EPUBSpanStyleManager: ignore line though type/style 'none',
+2017-09-11).
+---
+ src/lib/EPUBSpanStyleManager.cpp | 9 ++++++++-
+ src/test/EPUBTextGeneratorTest.cpp | 22 ++++++++++++++++++++++
+ 2 files changed, 30 insertions(+), 1 deletion(-)
+
+diff --git a/src/lib/EPUBSpanStyleManager.cpp b/src/lib/EPUBSpanStyleManager.cpp
+index 5e53ee2..e25fa26 100644
+--- a/src/lib/EPUBSpanStyleManager.cpp
++++ b/src/lib/EPUBSpanStyleManager.cpp
+@@ -161,7 +161,14 @@ void EPUBSpanStyleManager::extractDecorations(RVNGPropertyList const &pList, EPU
+
+ if (pList["style:text-overline-style"] || pList["style:text-overline-type"])
+ s << " overline";
+- if (pList["style:text-underline-style"] || pList["style:text-underline-type"])
++ const librevenge::RVNGProperty *textUnderlineStyle = pList["style:text-underline-style"];
++ bool underline = textUnderlineStyle && textUnderlineStyle->getStr() != "none";
++ if (!underline)
++ {
++ const librevenge::RVNGProperty *textUnderlineType = pList["style:text-underline-type"];
++ underline = textUnderlineType && textUnderlineType->getStr() != "none";
++ }
++ if (underline)
+ s << " underline";
+ if (s.str().length())
+ cssProps["text-decoration"] = s.str();
+--
+2.12.3
+
commit 6ee33d0772f991f04e97b5b61d7b11810a1b8ac0
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Tue Oct 17 09:04:33 2017 +0200
tdf#104079 RTF import: fix handling fields inside TOC fields
The marker trick is not needed for these, but the paragraph margins are
lost when using it, so avoid it.
Change-Id: I3fc9644cb85138b5473cb1478196ae8538041fb1
Reviewed-on: https://gerrit.libreoffice.org/43446
Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
Tested-by: Jenkins <ci at libreoffice.org>
diff --git a/sw/qa/extras/rtfexport/data/tdf104079.rtf b/sw/qa/extras/rtfexport/data/tdf104079.rtf
new file mode 100644
index 000000000000..f173ce2ddf91
--- /dev/null
+++ b/sw/qa/extras/rtfexport/data/tdf104079.rtf
@@ -0,0 +1,48 @@
+{\rtf1\mac\ansicpg10000\uc1 \deff0\deflang1033\deflangfe1033
+{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;
+\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}
+{\stylesheet
+{\sa120\nowidctlpar\adjustright \cgrid \snext0 Normal;}
+{\s24\sa120\nowidctlpar\tqr\tx9360\adjustright \b\caps\cgrid \sbasedon0 \snext0 \sautoupd toc 1;}
+}
+\margl1440\margr1440\margt1296\margb1296 \widowctrl\ftnbj\aenddoc\hyphcaps0\viewkind1\viewscale100 \fet0\sectd \linex0\sectdefaultcl
+\pard\plain \s24\sa120\nowidctlpar\tqr\tx9360\adjustright \b\caps\cgrid
+{\field\fldedit
+{\*\fldinst TOC \\o "1-3" }
+{\fldrslt
+{\lang1024 toc1\tab }
+{\field\flddirty
+{\*\fldinst GOTOBUTTON _Toc434317063
+{\field
+{\*\fldinst PAGEREF _Toc434317063 }
+{\fldrslt 3 }
+}
+}
+}
+{\lang1024
+\par }
+\pard\plain \s24\sa120\nowidctlpar\tqr\tx9360\adjustright \b\caps\cgrid
+{\lang1024 toc2\tab }
+{\field\flddirty
+{\*\fldinst GOTOBUTTON _Toc434317068
+{\field
+{\*\fldinst PAGEREF _Toc434317068 }
+{\fldrslt 8 }
+}
+}
+}
+{\lang1024
+\par toc3\tab }
+{\field\flddirty
+{\*\fldinst GOTOBUTTON _Toc434317069
+{\field
+{\*\fldinst PAGEREF _Toc434317069 }
+{\fldrslt 8 }
+}
+}
+}
+\par
+\pard\plain \s24\sa120\nowidctlpar\tqr\tx9360\adjustright \b\caps\cgrid }
+}
+\prad\par
+}
diff --git a/sw/qa/extras/rtfexport/rtfexport.cxx b/sw/qa/extras/rtfexport/rtfexport.cxx
index ff05e4e7cfea..5664cc8872f6 100644
--- a/sw/qa/extras/rtfexport/rtfexport.cxx
+++ b/sw/qa/extras/rtfexport/rtfexport.cxx
@@ -1001,6 +1001,22 @@ DECLARE_RTFEXPORT_TEST(testTdf94377, "tdf94377.rtf")
CPPUNIT_ASSERT_EQUAL(12.f, getProperty<float>(getRun(getParagraphOfText(2, xText, "asdf12"), 1), "CharHeight"));
}
+DECLARE_RTFEXPORT_TEST(testTdf104079, "tdf104079.rtf")
+{
+ bool bFound = false;
+ int nIndex = 0;
+ while (!bFound)
+ {
+ uno::Reference<text::XTextRange> xParagraph = getParagraph(++nIndex);
+ if (!xParagraph->getString().startsWith("toc3"))
+ continue;
+
+ bFound = true;
+ // This was 0, 3rd paragraph of ToC lost its bottom paragraph margin.
+ CPPUNIT_ASSERT_EQUAL(static_cast<sal_Int32>(212), getProperty<sal_Int32>(xParagraph, "ParaBottomMargin"));
+ }
+}
+
DECLARE_RTFEXPORT_TEST(testPageBackground, "page-background.rtf")
{
// The problem was that \background was ignored.
diff --git a/writerfilter/source/dmapper/DomainMapper_Impl.cxx b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
index 3ae08a1f56cf..545a003bb3e3 100644
--- a/writerfilter/source/dmapper/DomainMapper_Impl.cxx
+++ b/writerfilter/source/dmapper/DomainMapper_Impl.cxx
@@ -1182,10 +1182,11 @@ void DomainMapper_Impl::finishParagraph( const PropertyMapPtr& pPropertyMap )
else
{
uno::Reference<text::XTextCursor> xCursor;
- if (m_bParaHadField && !m_bIsInComments)
+ if (m_bParaHadField && !m_bIsInComments && !xTOCMarkerCursor.is())
{
// Workaround to make sure char props of the field are not lost.
// Not relevant for editeng-based comments.
+ // Nor revelent for fields inside a TOC field.
OUString const sMarker("X");
xCursor = xTextAppend->getText()->createTextCursor();
if (xCursor.is())
commit 899a656870f916e97944f2d74977177cb1032f33
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Tue Oct 17 09:08:45 2017 +0200
use rtl::Reference in BibDataManager
instead of manual reference counting
Change-Id: Ia8fd5487fb8d25d6725dd36b74aab57272aba911
Reviewed-on: https://gerrit.libreoffice.org/43447
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
diff --git a/extensions/source/bibliography/datman.cxx b/extensions/source/bibliography/datman.cxx
index 9e2dd31805e8..5afbd5f33590 100644
--- a/extensions/source/bibliography/datman.cxx
+++ b/extensions/source/bibliography/datman.cxx
@@ -607,7 +607,6 @@ OUString const gViewSize("theViewSize");
BibDataManager::BibDataManager()
:BibDataManager_Base( GetMutex() )
- ,m_pInterceptorHelper( nullptr )
,m_aLoadListeners(m_aMutex)
,pBibView( nullptr )
,pToolbar(nullptr)
@@ -633,11 +632,10 @@ BibDataManager::~BibDataManager()
xConnection->dispose();
m_xForm = nullptr;
}
- if( m_pInterceptorHelper )
+ if( m_xInterceptorHelper.is() )
{
- m_pInterceptorHelper->ReleaseInterceptor();
- m_pInterceptorHelper->release();
- m_pInterceptorHelper = nullptr;
+ m_xInterceptorHelper->ReleaseInterceptor();
+ m_xInterceptorHelper.clear();
}
}
@@ -1590,12 +1588,10 @@ uno::Reference< form::runtime::XFormController > const & BibDataManager::GetForm
void BibDataManager::RegisterInterceptor( ::bib::BibBeamer* pBibBeamer)
{
- DBG_ASSERT( !m_pInterceptorHelper, "BibDataManager::RegisterInterceptor: called twice!" );
+ DBG_ASSERT( !m_xInterceptorHelper.is(), "BibDataManager::RegisterInterceptor: called twice!" );
if( pBibBeamer )
- m_pInterceptorHelper = new BibInterceptorHelper( pBibBeamer, m_xFormDispatch);
- if( m_pInterceptorHelper )
- m_pInterceptorHelper->acquire();
+ m_xInterceptorHelper = new BibInterceptorHelper( pBibBeamer, m_xFormDispatch);
}
diff --git a/extensions/source/bibliography/datman.hxx b/extensions/source/bibliography/datman.hxx
index f988e29f9fad..139c0b7dd9ff 100644
--- a/extensions/source/bibliography/datman.hxx
+++ b/extensions/source/bibliography/datman.hxx
@@ -86,7 +86,7 @@ private:
css::uno::Reference< css::sdb::XSingleSelectQueryComposer > m_xParser;
css::uno::Reference< css::form::runtime::XFormController > m_xFormCtrl;
css::uno::Reference< css::frame::XDispatch > m_xFormDispatch;
- BibInterceptorHelper* m_pInterceptorHelper;
+ rtl::Reference<BibInterceptorHelper> m_xInterceptorHelper;
OUString aActiveDataTable;
OUString aDataSourceURL;
commit 843dca2f4d5436f5abbc031df95a86eaae395feb
Author: Kiyotaka Nishibori <ml.nishibori.kiyotaka at gmail.com>
Date: Sat Oct 14 20:57:23 2017 +0900
Fixed duplicated context attributes in a .ui file.
The duplication has generated an invalid .pot file: sw/messages.pot
Change-Id: I9b2ce8bb957c1bd3775bc78cbcac4bea9e46ba77
Reviewed-on: https://gerrit.libreoffice.org/43396
Tested-by: Jenkins <ci at libreoffice.org>
Reviewed-by: Muhammet Kara <muhammet.kara at pardus.org.tr>
Reviewed-by: Katarina Behrens <Katarina.Behrens at cib.de>
diff --git a/sw/uiconfig/swriter/ui/notebookbar_compact.ui b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
index b1c771b3cd21..64f213054fc5 100644
--- a/sw/uiconfig/swriter/ui/notebookbar_compact.ui
+++ b/sw/uiconfig/swriter/ui/notebookbar_compact.ui
@@ -1734,7 +1734,7 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="action_name">.uno:MenuBar</property>
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|menubarD">Menubar</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|menubarD">Menubar</property>
</object>
</child>
<child>
@@ -2605,7 +2605,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="fileb:MenuFile">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|fileb">_File</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|fileb">_File</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -2634,7 +2634,7 @@
<object class="GtkLabel" id="FileLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|FileLabel">File</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|FileLabel">File</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -3148,7 +3148,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="formatb:MenuFormat">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|formatb">F_ormat</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|formatb">F_ormat</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -3455,7 +3455,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="editb:MenuEdit">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|editb">_Edit</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|editb">_Edit</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
@@ -3471,7 +3471,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="menub:MenuSettings">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|menub">_Menu</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|menub">_Menu</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="receives_default">False</property>
@@ -3501,7 +3501,7 @@
<object class="GtkLabel" id="HomeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|HomeLabel">Home</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|HomeLabel">Home</property>
<property name="use_underline">True</property>
<style>
<class name="context-any"/>
@@ -3847,7 +3847,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="insertb:MenuInsert">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">_Insert</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|insertb">_Insert</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -3876,7 +3876,7 @@
<object class="GtkLabel" id="InsertLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|InsertLabel">Insert</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|InsertLabel">Insert</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -4250,7 +4250,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="reviewb:MenuPage">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">Pag_e</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|reviewb">Pag_e</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -4279,7 +4279,7 @@
<object class="GtkLabel" id="LayoutLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|LayoutLabel">Page layout</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|LayoutLabel">Page layout</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -4548,7 +4548,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="referenceb:MenuReference">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|referenceb">Reference_s</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|referenceb">Reference_s</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -4577,7 +4577,7 @@
<object class="GtkLabel" id="ReferencesLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|ReferencesLabel">References</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|ReferencesLabel">References</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -4961,7 +4961,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="reviewR:MenuReview">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">_Review</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|reviewR">_Review</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -4990,7 +4990,7 @@
<object class="GtkLabel" id="ReviewLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|ReviewLabel">Review</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|ReviewLabel">Review</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -5422,7 +5422,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="viewb:MenuView">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">_View</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|viewb">_View</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -5451,7 +5451,7 @@
<object class="GtkLabel" id="ViewLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|ViewLabel">View</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|ViewLabel">View</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -6104,7 +6104,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="tableT:MenuTable">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">T_able</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|tableT">T_able</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -6133,7 +6133,7 @@
<object class="GtkLabel" id="TableLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|TableLabel">Table</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|TableLabel">Table</property>
<property name="use_underline">True</property>
<style>
<class name="context-Table"/>
@@ -6634,7 +6634,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="graphicB:MenuGraphic">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">_Graphic</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|graphicB">_Graphic</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -6664,7 +6664,7 @@
<object class="GtkLabel" id="ImageLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|ImageLabel">Image</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|ImageLabel">Image</property>
<property name="use_underline">True</property>
<style>
<class name="context-Graphic"/>
@@ -7079,7 +7079,7 @@
<property name="can_focus">False</property>
<child>
<object class="svtlo-ManagedMenuButton" id="wrapb:MenuWrap">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|wrapb">Wrap</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|wrapb">Wrap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7106,7 +7106,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="alignb:MenuAlign">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|alignb">Align</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|alignb">Align</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7180,7 +7180,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="drab:MenuDraw">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">D_raw</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|drab">D_raw</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7212,7 +7212,7 @@
<object class="GtkLabel" id="ShapeLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|ShapeLabel">Draw</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|ShapeLabel">Draw</property>
<style>
<class name="context-Draw"/>
</style>
@@ -7534,7 +7534,7 @@
<property name="can_focus">False</property>
<child>
<object class="svtlo-ManagedMenuButton" id="frame:MenuWrap">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|wrapb">Wrap</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|frame:MenuWrap">Wrap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7561,7 +7561,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="frame:MenuAlign">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_full|alignb">Align</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|frame:MenuAlign">Align</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7630,7 +7630,7 @@
</child>
<child>
<object class="svtlo-ManagedMenuButton" id="frame:MenuDraw">
- <property name="label" translatable="yes" context="notebookbar_groupedbar_compact|insertb">Object</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|frame:MenuDraw">Object</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="receives_default">False</property>
@@ -7659,7 +7659,7 @@
<object class="GtkLabel" id="FrameLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes" context="notebookbar|FrameLabel">Object</property>
+ <property name="label" translatable="yes" context="notebookbar_compact|FrameLabel">Object</property>
<style>
<class name="context-Frame"/>
<class name="context-OLE"/>
commit aae1907150e22a44b1463096ba4ecaec499b6bb0
Author: Caolán McNamara <caolanm at redhat.com>
Date: Tue Oct 17 09:15:44 2017 +0100
ole fuzzer needs more services
Change-Id: I5b09edb9c3012dfa282077ea537cf8cbe4ce23d0
diff --git a/vcl/workben/olefuzzer.cxx b/vcl/workben/olefuzzer.cxx
index 90caf7659f42..7193a0292575 100644
--- a/vcl/workben/olefuzzer.cxx
+++ b/vcl/workben/olefuzzer.cxx
@@ -13,6 +13,12 @@
#include <config_features.h>
#include <osl/detail/component-mapping.h>
+extern "C" {
+void * com_sun_star_comp_uui_UUIInteractionHandler_get_implementation( void *, void * );
+void * com_sun_star_i18n_CharacterClassification_Unicode_get_implementation( void *, void * );
+void * com_sun_star_i18n_CharacterClassification_get_implementation( void *, void * );
+}
+
const lib_to_factory_mapping *
lo_get_factory_map(void)
{
@@ -27,6 +33,9 @@ const lib_to_constructor_mapping *
lo_get_constructor_map(void)
{
static lib_to_constructor_mapping map[] = {
+ { "com_sun_star_comp_uui_UUIInteractionHandler_get_implementation", com_sun_star_comp_uui_UUIInteractionHandler_get_implementation },
+ { "com_sun_star_i18n_CharacterClassification_Unicode_get_implementation", com_sun_star_i18n_CharacterClassification_Unicode_get_implementation },
+ { "com_sun_star_i18n_CharacterClassification_get_implementation", com_sun_star_i18n_CharacterClassification_get_implementation },
{ 0, 0 }
};
commit 9b8828174dca6971d2490844b4c6cab2b9d57b8d
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Oct 4 12:07:20 2017 +0100
turn implicit container explicit in buildable notebooks
as in interim measure for SfxTabDialogs we throw
away the TabPage if its not suitable for reuse
Change-Id: Ic5776ca3d2a8cb6bf41f33df01b211f81c62a842
Reviewed-on: https://gerrit.libreoffice.org/43134
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/basctl/uiconfig/basicide/ui/organizedialog.ui b/basctl/uiconfig/basicide/ui/organizedialog.ui
index fcb89bac70ff..4a0edcb5a4ee 100644
--- a/basctl/uiconfig/basicide/ui/organizedialog.ui
+++ b/basctl/uiconfig/basicide/ui/organizedialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="basctl">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="OrganizeDialog">
@@ -63,7 +63,13 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
<child type="tab">
<object class="GtkLabel" id="modules">
@@ -76,7 +82,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="dialogs">
@@ -90,7 +105,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="libraries">
diff --git a/chart2/uiconfig/ui/chardialog.ui b/chart2/uiconfig/ui/chardialog.ui
index 7461a6e8d808..10381940a152 100644
--- a/chart2/uiconfig/ui/chardialog.ui
+++ b/chart2/uiconfig/ui/chardialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="chart">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="CharDialog">
@@ -90,7 +90,13 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
<child type="tab">
<object class="GtkLabel" id="font">
@@ -103,7 +109,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="fonteffects">
@@ -117,7 +132,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="position">
diff --git a/chart2/uiconfig/ui/paradialog.ui b/chart2/uiconfig/ui/paradialog.ui
index aef016979345..f9131db0c16d 100644
--- a/chart2/uiconfig/ui/paradialog.ui
+++ b/chart2/uiconfig/ui/paradialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="chart">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="ParagraphDialog">
@@ -90,7 +90,13 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_STD">
@@ -103,14 +109,23 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_ALIGN">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0.4699999988079071</property>
<property name="label" translatable="yes" context="paradialog|labelTP_PARA_ALIGN">Alignment</property>
+ <property name="xalign">0.4699999988079071</property>
</object>
<packing>
<property name="position">1</property>
@@ -118,7 +133,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_PARA_ASIAN">
@@ -132,7 +156,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">3</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="labelTP_TABULATOR">
diff --git a/cui/uiconfig/ui/areadialog.ui b/cui/uiconfig/ui/areadialog.ui
index 5a0c983f7c76..055260753e70 100644
--- a/cui/uiconfig/ui/areadialog.ui
+++ b/cui/uiconfig/ui/areadialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.16.1 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.0"/>
<object class="GtkDialog" id="AreaDialog">
@@ -91,7 +91,13 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_AREA">
@@ -104,7 +110,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_SHADOW">
@@ -118,7 +133,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="RID_SVXPAGE_TRANSPARENCE">
diff --git a/cui/uiconfig/ui/autocorrectdialog.ui b/cui/uiconfig/ui/autocorrectdialog.ui
index d8fbf1f30183..dac0ac090cc1 100644
--- a/cui/uiconfig/ui/autocorrectdialog.ui
+++ b/cui/uiconfig/ui/autocorrectdialog.ui
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.18.3 -->
+<!-- Generated with glade 3.20.0 -->
<interface domain="cui">
<requires lib="gtk+" version="3.0"/>
<requires lib="LibreOffice" version="1.0"/>
@@ -100,8 +100,8 @@
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
<property name="label" translatable="yes" context="autocorrectdialog|label1">Replacements and exceptions for language:</property>
+ <property name="xalign">0</property>
</object>
<packing>
<property name="expand">False</property>
@@ -134,7 +134,13 @@
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
</child>
<child type="tab">
<object class="GtkLabel" id="replace">
@@ -147,7 +153,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">1</property>
+ </packing>
</child>
<child type="tab">
<object class="GtkLabel" id="exceptions">
@@ -161,7 +176,16 @@
</packing>
</child>
<child>
- <placeholder/>
+ <object class="GtkGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <placeholder/>
+ </child>
+ </object>
+ <packing>
+ <property name="position">2</property>
+ </packing>
</child>
<child type="tab">
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list