[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source vcl/unx
vcl/source/app/salvtables.cxx | 86 ++ vcl/unx/gtk3/gtk3gtkinst.cxx | 62 +- 2 files changed, 97 insertions(+), 51 deletions(-) New commits: commit 8ec2af41a40b56155c50329417459749dbdf5af8 Author: Caolán McNamara AuthorDate: Thu Aug 15 20:29:40 2019 +0100 Commit: Adolfo Jayme Barrientos CommitDate: Thu Aug 29 06:17:24 2019 +0200 tdf#126007 tdf#122355 online help won't look into a dialog notebook when the focus is on the help button, offline will through the help fallback route, but online will just fire and forget and let the server side do a fallback, which can't know what the current notebook page was. so bodge it to look at the notebook page right from the start if there is one and its the help button itself which starts the request Change-Id: Ida1d3101d838d99639dda12c438414c16b1ccda5 Reviewed-on: https://gerrit.libreoffice.org/77550 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index dd3a7f26bbe0..9b4ce8144916 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -765,27 +765,7 @@ public: return m_xWindow->GetText(); } -void help() -{ -//show help for widget with keyboard focus -vcl::Window* pWidget = ImplGetSVData()->maWinData.mpFocusWin; -if (!pWidget) -pWidget = m_xWindow; -OString sHelpId = pWidget->GetHelpId(); -while (sHelpId.isEmpty()) -{ -pWidget = pWidget->GetParent(); -if (!pWidget) -break; -sHelpId = pWidget->GetHelpId(); -} -std::unique_ptr xTemp(pWidget != m_xWindow ? new SalInstanceWidget(pWidget, m_pBuilder, false) : nullptr); -weld::Widget* pSource = xTemp ? xTemp.get() : this; -bool bRunNormalHelpRequest = !m_aHelpRequestHdl.IsSet() || m_aHelpRequestHdl.Call(*pSource); -Help* pHelp = bRunNormalHelpRequest ? Application::GetHelp() : nullptr; -if (pHelp) -pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pSource); -} +void help(); virtual void set_busy_cursor(bool bBusy) override { @@ -3718,6 +3698,17 @@ public: return o3tl::make_unique(); } +OString get_current_page_help_id() +{ +TabControl *pCtrl = get_builder().get("tabcontrol"); +TabPage* pTabPage = pCtrl ? pCtrl->GetTabPage(pCtrl->GetCurPageId()) : nullptr; +vcl::Window *pTabChild = pTabPage ? pTabPage->GetWindow(GetWindowType::FirstChild) : nullptr; +pTabChild = pTabChild ? pTabChild->GetWindow(GetWindowType::FirstChild) : nullptr; +if (pTabChild) +return pTabChild->GetHelpId(); +return OString(); +} + virtual ~SalInstanceBuilder() override { if (VclBuilderContainer* pOwnedToplevel = dynamic_cast(m_aOwnedToplevel.get())) @@ -3747,6 +3738,43 @@ weld::Builder* Application::CreateInterimBuilder(weld::Widget* pParent, const OU return Application::CreateInterimBuilder(pParentWidget, rUIFile); } +void SalInstanceWindow::help() +{ +//show help for widget with keyboard focus +vcl::Window* pWidget = ImplGetSVData()->maWinData.mpFocusWin; +if (!pWidget) +pWidget = m_xWindow; +OString sHelpId = pWidget->GetHelpId(); +while (sHelpId.isEmpty()) +{ +pWidget = pWidget->GetParent(); +if (!pWidget) +break; +sHelpId = pWidget->GetHelpId(); +} +std::unique_ptr xTemp(pWidget != m_xWindow ? new SalInstanceWidget(pWidget, m_pBuilder, false) : nullptr); +weld::Widget* pSource = xTemp ? xTemp.get() : this; +bool bRunNormalHelpRequest = !m_aHelpRequestHdl.IsSet() || m_aHelpRequestHdl.Call(*pSource); +Help* pHelp = bRunNormalHelpRequest ? Application::GetHelp() : nullptr; +if (pHelp) +{ +// tdf#126007, there's a nice fallback route for offline help where +// the current page of a notebook will get checked when the help +// button is pressed and there was no help for the dialog found. +// +// But for online help that route doesn't get taken, so bodge this here +// by using the page help id if available and if the help button itself +// was the original id +if (m_pBuilder && sHelpId.endsWith("/help")) +{ +OString sPageId = m_pBuilder->get_current_page_help_id(); +if (!sPageId.isEmpty()) +sHelpId = sPageId; +} +pHelp->Start(OStringToOUString(sHelpId, RTL_TEXTENCODING_UTF8), pSource); +} +} + //iterate upwards through the hierarchy from this widgets through its parents //calling func with their helpid until func returns true or we run out of parents void SalInstanceWidget::help_hierarchy_foreach(const std::function& func) @@ -3756,1
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/app/salvtables.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ef0d0e4b7d1e0ca5ed74db6345618f3b0444fd1f Author: Caolán McNamara AuthorDate: Fri Aug 16 08:54:45 2019 +0100 Commit: Xisco Faulí CommitDate: Mon Aug 19 09:11:35 2019 +0200 Resolves: tdf#126951 crash in custom slide show on selecting entry 0 which doesn't exist Change-Id: I67656bed63f9055bc6c5dd5781e79f967996500d Reviewed-on: https://gerrit.libreoffice.org/77560 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 5d3e9ababc0b3e049a7556b210bb6349e3e3322c) Reviewed-on: https://gerrit.libreoffice.org/77696 Reviewed-by: Xisco Faulí diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 88e1b1da61e1..dd3a7f26bbe0 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2073,7 +2073,7 @@ public: { assert(m_xTreeView->IsUpdateMode() && "don't select when frozen"); disable_notify_events(); -if (pos == -1) +if (pos == -1 || (pos == 0 && n_children() == 0)) m_xTreeView->SelectAll(false); else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/window.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ad372e603547d54ab28271d89adc45250368a248 Author: Miklos Vajna AuthorDate: Mon Aug 12 17:57:25 2019 +0200 Commit: Xisco Faulí CommitDate: Wed Aug 14 12:07:54 2019 +0200 tdf#126808 vcl: fix crash due to leaking the frame's buffer vdev This vdev is used to do vcl-level double-buffering, which is off by default, but e.g. listboxes/comboboxes use it to avoid flicker with Windows GDI. The root cause was introduced in commit ea5e83abcfa1406c401b8a1ec91efda65373b74b (tdf#92982 vcl: stop creating/disposing the paint buffer in PaintHelper, 2015-07-30), which removed the explicit mpBuffer.disposeAndClear() in the PaintHelper dtor, but forgot to explicitly dispose it elsewhere. This is now a much more visible problem since commit d4714b0fdb81e6e561ae526cc517ecc9a40a603e (tdf#101978 vcl combobox/listbox floating window: avoid flicker, 2019-06-17) as the infrastructure is used for all list/comboboxes. Fix the problem by explicitly disposing the vdev before deleting the frame data, so the underlying GDI resource is released, even if we have a reference cycle. Change-Id: Ia217bbd78780a214308e497044e73e378ee8ecd6 Reviewed-on: https://gerrit.libreoffice.org/77370 Reviewed-by: Miklos Vajna Tested-by: Jenkins (cherry picked from commit e71093c0bc52426647a9d3a41ac0643bbc6cb0c6) Reviewed-on: https://gerrit.libreoffice.org/77395 Reviewed-by: Xisco Faulí diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 8df50b57da1f..f2a42cf8edca 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -557,6 +557,7 @@ void Window::dispose() assert (mpWindowImpl->mpFrameData->mnFocusId == nullptr); assert (mpWindowImpl->mpFrameData->mnMouseMoveId == nullptr); +mpWindowImpl->mpFrameData->mpBuffer.disposeAndClear(); delete mpWindowImpl->mpFrameData; mpWindowImpl->mpFrameData = nullptr; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/dialog.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit d9b32fdee82e05042681a3fd4b634055edfaf00b Author: Caolán McNamara AuthorDate: Thu Jun 27 20:50:35 2019 +0100 Commit: Michael Stahl CommitDate: Fri Jun 28 17:35:00 2019 +0200 Resolves: tdf#126134 EndDialog on disposed dialog Change-Id: I079fb2bb786b66b843e8e3960643cf2db6387c79 Reviewed-on: https://gerrit.libreoffice.org/74823 Reviewed-by: Michael Stahl Tested-by: Michael Stahl diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index e88d5aacaea2..b95dfb299f41 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1092,7 +1092,7 @@ void Dialog::RemoveFromDlgList() void Dialog::EndDialog( long nResult ) { -if ( !mbInExecute ) +if (!mbInExecute || IsDisposed()) return; const bool bModal = GetType() != WindowType::MODELESSDIALOG; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/outdev/gradient.cxx |8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) New commits: commit 12cf9256fba688df367a2be7db17e0ed3d24c73c Author: Jan-Marek Glogowski AuthorDate: Mon Jun 3 22:52:05 2019 + Commit: Caolán McNamara CommitDate: Fri Jun 21 22:59:04 2019 +0200 tdf#125670 just check gradient clipping on drawing Otherwise the gradient won't be commited to the Metafile, as mbOutputClipped will be true, because the output device will have just one pixel size. Reviewed-on: https://gerrit.libreoffice.org/73423 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 710f3c63af2d8bee7d5e860614145799a3f0e491) tdf#125777 restore old RenderContext before return Related: tdf#125670 avoid possible performance issues for the general case but retain recording of gradient to metafile 6acf23675414983bd07639703f43aa934c0a48ed 5efde15f1c192b15fe647362803442ac947b63de Change-Id: Ia0c6569a28f2aa1a8f0e051b61d429e0ab23ef97 Reviewed-on: https://gerrit.libreoffice.org/74507 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 6047d537b5ea8f13f7e8d4739621c866af1d13fb) Reviewed-on: https://gerrit.libreoffice.org/74515 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/outdev/gradient.cxx b/vcl/source/outdev/gradient.cxx index aeace07e4710..2c6b884e6732 100644 --- a/vcl/source/outdev/gradient.cxx +++ b/vcl/source/outdev/gradient.cxx @@ -56,7 +56,7 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, if ( mbInitClipRegion ) InitClipRegion(); -if ( mbOutputClipped ) +if (mbOutputClipped && !mpMetaFile) return; if ( rPolyPoly.Count() && rPolyPoly[ 0 ].GetSize() ) @@ -110,6 +110,12 @@ void OutputDevice::DrawGradient( const tools::PolyPolygon& rPolyPoly, if( mbInitClipRegion ) InitClipRegion(); +if (mbOutputClipped) +{ +Pop(); +return; +} + // try to draw gradient natively bDrawn = mpGraphics->DrawGradient( aClixPolyPoly, aGradient ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/builder.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 53a2aeccd6b339bc5b7d7b403723fa48ecc5dd58 Author: Caolán McNamara AuthorDate: Mon Jun 17 11:53:11 2019 +0100 Commit: Caolán McNamara CommitDate: Mon Jun 17 15:03:57 2019 +0200 Resolves: tdf#125883 if old and new text will be the same don't change it that way the cursor and selection is left alone Change-Id: Id6efa7e2fe27f031761271fd591de7a73a1f6963 Reviewed-on: https://gerrit.libreoffice.org/74160 Reviewed-by: Michael Stahl Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 6f6189d11d57..ea4153161e3c 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -181,7 +181,9 @@ namespace weld IMPL_LINK(MetricSpinButton, spin_button_output, SpinButton&, rSpinButton, void) { -rSpinButton.set_text(format_number(rSpinButton.get_value())); +OUString sNewText(format_number(rSpinButton.get_value())); +if (sNewText != rSpinButton.get_text()) +rSpinButton.set_text(sNewText); } void MetricSpinButton::update_width_chars() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/paint.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 1fd61b1a2aac3e52f3c0a0ab8fbd3ff5170713c3 Author: Miklos Vajna AuthorDate: Thu Jun 13 15:53:06 2019 +0200 Commit: Christian Lohmaier CommitDate: Fri Jun 14 15:06:19 2019 +0200 tdf#92079 vcl: fix missing image background on dialog from basic Regression from commit e5bb5c52aeaeb60c8592b004efd88c30242e03a1 (add RenderContext to Window::PushPaintHelper, use Erase correctly, 2015-05-18), the problem was the unconditional ApplySettings() call in the direct painting case. It's not clear what was the intent of that addition, since vcl::Window::ApplySettings() is virtual, and the default implementation is empty. But at least the Dialog subclass sets the background there, leading to the loss of the original bitmap background. Fix the problem by explicitly restoring the old background after ApplySettings() at least in the bitmap case. (Wallpaper is copy-on-write, so no problem to make a copy before ApplySettings() unconditionally.) (cherry picked from commit f4e0cc1ff145287f80738f070a8c46a64b2f76d1) Change-Id: I89768a1331f9dc1ea4508336723484d112156338 Reviewed-on: https://gerrit.libreoffice.org/74023 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 4046b51e6f6bd31b0188d9c00273a1761254a9d6) Reviewed-on: https://gerrit.libreoffice.org/74034 Reviewed-by: Christian Lohmaier diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 0031baf60937..8d3f88e9dfce 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -295,7 +295,10 @@ void PaintHelper::DoPaint(const vcl::Region* pRegion) else { // direct painting +Wallpaper aBackground = m_pWindow->GetBackground(); m_pWindow->ApplySettings(*m_pWindow); +if (aBackground.IsBitmap()) +m_pWindow->SetBackground(aBackground); m_pWindow->PushPaintHelper(this, *m_pWindow); m_pWindow->Paint(*m_pWindow, m_aPaintRect); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/gdi/CommonSalLayout.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit ff8b31743305635b968b0a0f21c2778a29c0ce03 Author: Mark Hung AuthorDate: Sun Jun 2 10:00:41 2019 +0800 Commit: Michael Stahl CommitDate: Wed Jun 5 14:35:01 2019 +0200 tdf#107487 fix font fallback for non-BMP characters. Non-BMP characters use two sal_Unicodes. It is necessary to advnace with OUString::iterateCodePoints safely instead of nCharPos + 1. Change-Id: Iea1005f05421b1021a9b3ff611439357d4dcba9e Reviewed-on: https://gerrit.libreoffice.org/73326 Tested-by: Jenkins Reviewed-by: Khaled Hosny (cherry picked from commit 16faad3657fad114aa984f92a14a5f212a2f8ff5) Reviewed-on: https://gerrit.libreoffice.org/73537 Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/CommonSalLayout.cxx b/vcl/source/gdi/CommonSalLayout.cxx index 9a638663d1ca..763546346459 100644 --- a/vcl/source/gdi/CommonSalLayout.cxx +++ b/vcl/source/gdi/CommonSalLayout.cxx @@ -190,12 +190,14 @@ void GenericSalLayout::SetNeedFallback(ImplLayoutArgs& rArgs, sal_Int32 nCharPos //mark all glyphs as missing so the whole thing is rendered with the same //font sal_Int32 nDone; -sal_Int32 nGraphemeStartPos = -mxBreak->previousCharacters(rArgs.mrStr, nCharPos + 1, aLocale, -i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); sal_Int32 nGraphemeEndPos = mxBreak->nextCharacters(rArgs.mrStr, nCharPos, aLocale, i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); +// Safely advance nCharPos in case it is a non-BMP character. +rArgs.mrStr.iterateCodePoints(&nCharPos); +sal_Int32 nGraphemeStartPos = +mxBreak->previousCharacters(rArgs.mrStr, nCharPos, aLocale, +i18n::CharacterIteratorMode::SKIPCELL, 1, nDone); rArgs.NeedFallback(nGraphemeStartPos, nGraphemeEndPos, bRightToLeft); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/menufloatingwindow.cxx | 36 +++ 1 file changed, 23 insertions(+), 13 deletions(-) New commits: commit 3c40f60c1693e477d0bb85b549b30a56a8ab9378 Author: Miklos Vajna AuthorDate: Tue May 21 17:45:05 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed May 29 13:55:39 2019 +0200 tdf#125415 vcl menu floating window: avoid flicker This is similar to e8d5b8beb5958147235ff955ed38c47b51d860ff (tdf#113714 vcl menu bar window: avoid flicker, 2019-05-20), except that was for the menu bar window, and this is for the floating window opening from that one. (cherry picked from commit c04169c586ef1d55b1d0ac469bb4fbd4f50bd08a) Change-Id: Ib24f4999ad3e8cbbecc058368e9d112e106e9178 Reviewed-on: https://gerrit.libreoffice.org/72726 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index 2db8caab9aba..9debcff5e5b4 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -27,6 +27,7 @@ #include #include #include +#include #include MenuFloatingWindow::MenuFloatingWindow( Menu* pMen, vcl::Window* pParent, WinBits nStyle ) : @@ -1206,32 +1207,41 @@ void MenuFloatingWindow::Paint(vcl::RenderContext& rRenderContext, const tools:: if (!pMenu) return; -rRenderContext.Push( PushFlags::CLIPREGION ); -rRenderContext.SetClipRegion(vcl::Region(rPaintRect)); +// Make sure that all actual rendering happens in one go to avoid flicker. +ScopedVclPtrInstance pBuffer; +pBuffer->SetOutputSizePixel(GetOutputSizePixel(), false); +pBuffer->DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), +rRenderContext); + +pBuffer->Push(PushFlags::CLIPREGION); +pBuffer->SetClipRegion(vcl::Region(rPaintRect)); if (rRenderContext.IsNativeControlSupported(ControlType::MenuPopup, ControlPart::Entire)) { -rRenderContext.SetClipRegion(); +pBuffer->SetClipRegion(); long nX = 0; Size aPxSize(GetOutputSizePixel()); aPxSize.AdjustWidth( -nX ); ImplControlValue aVal(pMenu->nTextPos - GUTTERBORDER); -rRenderContext.DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, - tools::Rectangle(Point(nX, 0), aPxSize), - ControlState::ENABLED, aVal, OUString()); -InitMenuClipRegion(rRenderContext); +pBuffer->DrawNativeControl(ControlType::MenuPopup, ControlPart::Entire, + tools::Rectangle(Point(nX, 0), aPxSize), ControlState::ENABLED, + aVal, OUString()); +InitMenuClipRegion(*pBuffer); } if (IsScrollMenu()) { -ImplDrawScroller(rRenderContext, true); -ImplDrawScroller(rRenderContext, false); +ImplDrawScroller(*pBuffer, true); +ImplDrawScroller(*pBuffer, false); } - rRenderContext.SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor()); -pMenu->ImplPaint(rRenderContext, GetOutputSizePixel(), nScrollerHeight, ImplGetStartY()); + pBuffer->SetFillColor(rRenderContext.GetSettings().GetStyleSettings().GetMenuColor()); +pMenu->ImplPaint(*pBuffer, GetOutputSizePixel(), nScrollerHeight, ImplGetStartY()); if (nHighlightedItem != ITEMPOS_INVALID) -RenderHighlightItem(rRenderContext, nHighlightedItem); +RenderHighlightItem(*pBuffer, nHighlightedItem); + +pBuffer->Pop(); -rRenderContext.Pop(); +rRenderContext.DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), + *pBuffer); } void MenuFloatingWindow::ImplDrawScroller(vcl::RenderContext& rRenderContext, bool bUp) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/menubarwindow.cxx |4 1 file changed, 4 insertions(+) New commits: commit 2a1d0f3b926b6d7921849093b031f457db4cbc8a Author: Miklos Vajna AuthorDate: Tue May 21 12:27:17 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed May 29 13:53:49 2019 +0200 tdf#125413 vcl menu bar window: fix non-NWF background Windows (by default) and gtk3 paints its own background, but e.g. the Linux gen backend does not; so make sure that we not only copy from the buffer, but also initialize it. This restores the gradient background of the main menu with the Linux gen backend. (cherry picked from commit a2da909adfe07d5a093485cc28283f5c100946ba) Change-Id: I5ce8cc734f64bc1d57d343caf22071e6aa63a69f Reviewed-on: https://gerrit.libreoffice.org/72685 Tested-by: Xisco Faulí Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 66444c082153..ccee51895c3e 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -920,6 +920,9 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta // Make sure that all actual rendering happens in one go to avoid flicker. ScopedVclPtrInstance pBuffer; pBuffer->SetOutputSizePixel(aOutputSize, false); +// Copy the current state to the buffer. +pBuffer->DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), +rRenderContext); if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire)) { @@ -963,6 +966,7 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta pBuffer->Pop(); } +// Copy the current state from the buffer. rRenderContext.DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), *pBuffer); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/menubarwindow.cxx | 36 ++-- 1 file changed, 22 insertions(+), 14 deletions(-) New commits: commit 0be7366d87fb2b2c7e3d2091dbfe17660bce057f Author: Miklos Vajna AuthorDate: Mon May 20 18:30:08 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed May 29 13:53:16 2019 +0200 tdf#113714 vcl menu bar window: avoid flicker Regression from commit 458a827e96523ac52d021f1fd3653b5a734940c0 (further refactor Menu to use RenderContext, 2015-05-15), if we do full paint instead of incremental paint, then need to ensure that an intermediate state is not painted. Paint happens at idle time by default on Windows (OpenGL) and also on Linux (gtk3), but some other backends like Windows GDI had flicker, this fixes the problem. (cherry picked from commit e8d5b8beb5958147235ff955ed38c47b51d860ff) Change-Id: I530166cea93513aec4648dd0a385359f4b998b6f Reviewed-on: https://gerrit.libreoffice.org/72673 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/window/menubarwindow.cxx b/vcl/source/window/menubarwindow.cxx index 25ab264bc9d9..66444c082153 100644 --- a/vcl/source/window/menubarwindow.cxx +++ b/vcl/source/window/menubarwindow.cxx @@ -24,6 +24,7 @@ #include #include #include +#include #include #include @@ -916,47 +917,54 @@ void MenuBarWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta return; } +// Make sure that all actual rendering happens in one go to avoid flicker. +ScopedVclPtrInstance pBuffer; +pBuffer->SetOutputSizePixel(aOutputSize, false); + if (rRenderContext.IsNativeControlSupported(ControlType::Menubar, ControlPart::Entire)) { MenubarValue aMenubarValue; aMenubarValue.maTopDockingAreaHeight = ImplGetTopDockingAreaHeight(this); if (!rStyleSettings.GetPersonaHeader().IsEmpty()) -Erase(rRenderContext); +Erase(*pBuffer); else { tools::Rectangle aCtrlRegion( Point(), aOutputSize ); -rRenderContext.DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion, - ControlState::ENABLED, aMenubarValue, OUString()); +pBuffer->DrawNativeControl(ControlType::Menubar, ControlPart::Entire, aCtrlRegion, + ControlState::ENABLED, aMenubarValue, OUString()); } -ImplAddNWFSeparator(rRenderContext, aOutputSize, aMenubarValue); +ImplAddNWFSeparator(*pBuffer, aOutputSize, aMenubarValue); } // shrink the area of the buttons aOutputSize.AdjustWidth( -(aCloseBtn->GetSizePixel().Width()) ); -rRenderContext.SetFillColor(rStyleSettings.GetMenuColor()); -pMenu->ImplPaint(rRenderContext, aOutputSize, 0); +pBuffer->SetFillColor(rStyleSettings.GetMenuColor()); +pMenu->ImplPaint(*pBuffer, aOutputSize, 0); if (nHighlightedItem != ITEMPOS_INVALID && pMenu && !pMenu->GetItemList()->GetDataFromPos(nHighlightedItem)->bHiddenOnGUI) -HighlightItem(rRenderContext, nHighlightedItem); +HighlightItem(*pBuffer, nHighlightedItem); else if (ImplGetSVData()->maNWFData.mbRolloverMenubar && nRolloveredItem != ITEMPOS_INVALID) -HighlightItem(rRenderContext, nRolloveredItem); +HighlightItem(*pBuffer, nRolloveredItem); // in high contrast mode draw a separating line on the lower edge if (!rRenderContext.IsNativeControlSupported( ControlType::Menubar, ControlPart::Entire) && rStyleSettings.GetHighContrastMode()) { -rRenderContext.Push(PushFlags::LINECOLOR | PushFlags::MAPMODE); -rRenderContext.SetLineColor(COL_WHITE); -rRenderContext.SetMapMode(MapMode(MapUnit::MapPixel)); +pBuffer->Push(PushFlags::LINECOLOR | PushFlags::MAPMODE); +pBuffer->SetLineColor(COL_WHITE); +pBuffer->SetMapMode(MapMode(MapUnit::MapPixel)); Size aSize = GetSizePixel(); -rRenderContext.DrawLine(Point(0, aSize.Height() - 1), -Point(aSize.Width() - 1, aSize.Height() - 1)); -rRenderContext.Pop(); +pBuffer->DrawLine(Point(0, aSize.Height() - 1), + Point(aSize.Width() - 1, aSize.Height() - 1)); +pBuffer->Pop(); } + +rRenderContext.DrawOutDev(Point(0, 0), GetOutputSizePixel(), Point(0, 0), GetOutputSizePixel(), + *pBuffer); } void MenuBarWindow::Resize() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/app/salvtables.cxx | 12 1 file changed, 12 insertions(+) New commits: commit e4576e3da166b97c5c5b2d72903d51bddc04780f Author: Caolán McNamara AuthorDate: Fri May 17 09:38:06 2019 +0100 Commit: Caolán McNamara CommitDate: Fri May 17 16:46:36 2019 +0200 tdf#125241 SvTreeListBox has a separate SetUpdateMode so just Window:SetUpdateMode was called, not also SvTreeListBox::SetUpdateMode Change-Id: I37a91f8aff6e8a2399cb7cacfcdc6b3f8b1f44ab Reviewed-on: https://gerrit.libreoffice.org/72451 Reviewed-by: Michael Stahl Tested-by: Jenkins diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 0f925613ac8e..afb51ee80791 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1898,6 +1898,18 @@ public: m_aRadioButtonData.SetLink(LINK(this, SalInstanceTreeView, ToggleHdl)); } +virtual void freeze() override +{ +SalInstanceWidget::freeze(); +m_xTreeView->SetUpdateMode(false); +} + +virtual void thaw() override +{ +m_xTreeView->SetUpdateMode(true); +SalInstanceWidget::thaw(); +} + virtual void set_column_fixed_widths(const std::vector& rWidths) override { std::vector aTabPositions; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/dialog.cxx |8 ++-- 1 file changed, 6 insertions(+), 2 deletions(-) New commits: commit cde86a07bdd3534f75ec94955837812e2bbd24d4 Author: Caolán McNamara AuthorDate: Tue May 14 16:01:58 2019 +0100 Commit: Caolán McNamara CommitDate: Thu May 16 13:39:15 2019 +0200 Resolves: tdf#125266 hang on selecting read online help Change-Id: I46d14df66c529495a7e9f1596fcdbb0b093810c5 Reviewed-on: https://gerrit.libreoffice.org/72298 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara Reviewed-on: https://gerrit.libreoffice.org/72400 Tested-by: Xisco Faulí Reviewed-by: Michael Stahl diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 9378f71cf0a5..e88d5aacaea2 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1556,8 +1556,12 @@ void TopLevelWindowLocker::incBusy(const vcl::Window* pIgnore) vcl::Window *pTopWin = Application::GetFirstTopLevelWindow(); while (pTopWin) { -if (pTopWin != pIgnore) -aTopLevels.push_back(pTopWin); +vcl::Window* pCandidate = pTopWin; +if (pCandidate->GetType() == WindowType::BORDERWINDOW) +pCandidate = pCandidate->GetWindow(GetWindowType::FirstChild); +// tdf#125266 ignore HelpTextWindows +if (pCandidate && pCandidate->GetType() != WindowType::HELPTEXTWINDOW && pCandidate != pIgnore) +aTopLevels.push_back(pCandidate); pTopWin = Application::GetNextTopLevelWindow(pTopWin); } for (auto& a : aTopLevels) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/gdi/dibtools.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit ddb78c7435444e74c4175156025c1dc596029afe Author: Michael Stahl AuthorDate: Tue May 7 12:21:47 2019 +0200 Commit: Thorsten Behrens CommitDate: Wed May 8 12:41:49 2019 +0200 tdf#125153 vcl: fix ImplReadDIBFileHeader() Apparently the offset needs to be checked against the total size of the stream, not against the remaining size. (regression from b67d9a5db61de3cef2dac072c55bf1dac9a2dc4c) Change-Id: I7e714b7c4ce34b5285cfbf9ca81133ecbbb16fc1 Reviewed-on: https://gerrit.libreoffice.org/71903 Tested-by: Jenkins Reviewed-by: Michael Stahl (cherry picked from commit 34d1280271b74e1764bd4d1e34cb53b2b0c0dd62) Reviewed-on: https://gerrit.libreoffice.org/71917 Reviewed-by: Caolán McNamara Reviewed-by: Thorsten Behrens diff --git a/vcl/source/gdi/dibtools.cxx b/vcl/source/gdi/dibtools.cxx index b06e05527499..5def32b90b0d 100644 --- a/vcl/source/gdi/dibtools.cxx +++ b/vcl/source/gdi/dibtools.cxx @@ -1053,7 +1053,7 @@ bool ImplReadDIBFileHeader( SvStream& rIStm, sal_uLong& rOffset ) { bool bRet = false; -const sal_uInt64 nStreamLength = rIStm.remainingSize(); +const sal_uInt64 nStreamLength = rIStm.TellEnd(); sal_uInt16 nTmp16 = 0; rIStm.ReadUInt16( nTmp16 ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/filter/graphicfilter.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit dc3752ef01e7646af1978337aa5ba458f27774b6 Author: Caolán McNamara AuthorDate: Sat Apr 27 11:52:11 2019 +0100 Commit: Michael Stahl CommitDate: Mon Apr 29 11:47:41 2019 +0200 ofz#14469 null deref since... commit af84fc9d906626255aaf136eefc5e55236e0e8a6 Date: Tue Apr 23 15:48:41 2019 +0200 lazy image loading shouldn't read the entire .xls file (tdf#124828) nLength is just an unchecked value in the dff stream, it might not be sane so limit it to the max len of the stream Change-Id: Ia8a2830478952afe1317b5cd795f35059d9b380a Reviewed-on: https://gerrit.libreoffice.org/71413 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 0cc982e68082..9be6f0723079 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -1443,7 +1443,9 @@ Graphic GraphicFilter::ImportUnloadedGraphic(SvStream& rIStream, sal_uInt64 size ErrCode nStatus = ImpTestOrFindFormat("", rIStream, nFormat); rIStream.Seek(nStreamBegin); -const sal_uInt32 nStreamLength( sizeLimit ? sizeLimit : rIStream.remainingSize()); +sal_uInt32 nStreamLength(rIStream.remainingSize()); +if (sizeLimit && sizeLimit < nStreamLength) +nStreamLength = sizeLimit; OUString aFilterName = pConfig->GetImportFilterName(nFormat); OUString aExternalFilterName = pConfig->GetExternalFilterName(nFormat, false); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/control/edit.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 6de6f97e775d0c9426b51471d742ab5dd461b9df Author: Tomaž Vajngerl AuthorDate: Wed Apr 17 12:24:17 2019 +0900 Commit: Miklos Vajna CommitDate: Tue Apr 23 15:11:59 2019 +0200 tdf#124032 fix Edit background drawing IsPaintTransparent() is preventing to paint the background but not sure why this is needed. removing this condition doesn't seem to have any ill effects. Reviewed-on: https://gerrit.libreoffice.org/70855 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 1e917af27d18d934f3e9122aa98cd950b74ca246) Change-Id: I5ac54e208e4f1c9941beb4012aa44182d21dbed9 Reviewed-on: https://gerrit.libreoffice.org/70916 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index 547f9464186d..6e4e49018bff 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -328,6 +328,7 @@ void Edit::ImplInit(vcl::Window* pParent, WinBits nStyle) SetCursor( new vcl::Cursor ); SetPointer( Pointer( PointerStyle::Text ) ); +ApplySettings(*this); uno::Reference< datatransfer::dnd::XDragGestureListener> xDGL( mxDnDListener, uno::UNO_QUERY ); uno::Reference< datatransfer::dnd::XDragGestureRecognizer > xDGR = GetDragGestureRecognizer(); @@ -381,7 +382,7 @@ void Edit::ApplySettings(vcl::RenderContext& rRenderContext) Color aTextColor = rStyleSettings.GetFieldTextColor(); ApplyControlForeground(rRenderContext, aTextColor); -if (ImplUseNativeBorder(rRenderContext, GetStyle()) || IsPaintTransparent()) +if (ImplUseNativeBorder(rRenderContext, GetStyle())) { // Transparent background rRenderContext.SetBackground(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/gdi/bmpacc.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit b929fd7a369630fa70a74eec3040761cea58b660 Author: Caolán McNamara AuthorDate: Thu Apr 18 10:24:19 2019 +0100 Commit: Michael Stahl CommitDate: Tue Apr 23 13:09:22 2019 +0200 forcepoint#78 large double cast to sal_Int32 wraps to neg Change-Id: I831d0dd62d0b28dc19b90b03de3eaa159984347c Reviewed-on: https://gerrit.libreoffice.org/70923 Tested-by: Jenkins Reviewed-by: Michael Stahl diff --git a/vcl/source/gdi/bmpacc.cxx b/vcl/source/gdi/bmpacc.cxx index f970c93428ce..bb9db3d3b862 100644 --- a/vcl/source/gdi/bmpacc.cxx +++ b/vcl/source/gdi/bmpacc.cxx @@ -221,8 +221,8 @@ BitmapColor BitmapReadAccess::GetInterpolatedColorWithFallback( double fY, doubl // double values, e.g. static_cast< sal_Int32 >(-0.25) is 0, not -1, but *has* to be outside (!) if(mpBuffer && fX >= 0.0 && fY >= 0.0) { -const sal_Int32 nX(static_cast< sal_Int32 >(fX)); -const sal_Int32 nY(static_cast< sal_Int32 >(fY)); +const sal_Int64 nX(static_cast(fX)); +const sal_Int64 nY(static_cast(fY)); if(nX < mpBuffer->mnWidth && nY < mpBuffer->mnHeight) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/app/salvtables.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit 2c150f952fb75da271648bf76c3a1bbf32bd25da Author: Caolán McNamara AuthorDate: Mon Apr 1 12:09:43 2019 +0100 Commit: Xisco Faulí CommitDate: Tue Apr 2 10:58:40 2019 +0200 Resolves: tdf#124440 nospin has no subedit Change-Id: I4e801ec234e86be935a79c9e29f0e5091904f12e Reviewed-on: https://gerrit.libreoffice.org/70053 Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 297926d03012..bce3b3815f06 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2559,7 +2559,10 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); -m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); +if (Edit* pEdit = m_xButton->GetSubEdit()) +pEdit->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); +else +m_xButton->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -2621,6 +2624,8 @@ public: { if (Edit* pEdit = m_xButton->GetSubEdit()) pEdit->SetActivateHdl(Link()); +else +m_xButton->SetActivateHdl(Link()); m_xButton->SetInputHdl(Link()); m_xButton->SetOutputHdl(Link()); m_xButton->SetLoseFocusHdl(Link()); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/edit/textundo.cxx | 11 --- 1 file changed, 8 insertions(+), 3 deletions(-) New commits: commit 4cddc97ad0488cf70dab9e9fc73f54f1f254631a Author: Noel Grandin AuthorDate: Mon Apr 1 14:38:01 2019 +0200 Commit: Michael Stahl CommitDate: Mon Apr 1 17:41:57 2019 +0200 tdf#124413 Crash on undo / redo in Basic IDE regression from commit 3a9d3f271c445641bebd057c4c91279f9b3cd7d5 Date: Mon Apr 23 09:38:41 2018 +0200 loplugin:useuniqueptr in TextDoc Change-Id: I51ab5de7571e4ec358442e54d590adf88fbeb12d Reviewed-on: https://gerrit.libreoffice.org/70061 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 3ebdb97a305ada182af045ea6438432adfe74e80) Reviewed-on: https://gerrit.libreoffice.org/70070 Reviewed-by: Michael Stahl diff --git a/vcl/source/edit/textundo.cxx b/vcl/source/edit/textundo.cxx index 80e26d34c577..adbf8be9076c 100644 --- a/vcl/source/edit/textundo.cxx +++ b/vcl/source/edit/textundo.cxx @@ -163,14 +163,19 @@ void TextUndoDelPara::Undo() void TextUndoDelPara::Redo() { +auto & rDocNodes = GetDoc()->GetNodes(); // pNode is not valid anymore in case an Undo joined paragraphs -mpNode = GetDoc()->GetNodes()[ mnPara ].get(); +mpNode = rDocNodes[ mnPara ].get(); GetTEParaPortions()->Remove( mnPara ); // do not delete Node because of Undo! -GetDoc()->GetNodes().erase( ::std::find_if( GetDoc()->GetNodes().begin(), GetDoc()->GetNodes().end(), -[&] (std::unique_ptr const & p) { return p.get() == mpNode; } ) ); +auto it = ::std::find_if( rDocNodes.begin(), rDocNodes.end(), + [&] (std::unique_ptr const & p) { return p.get() == mpNode; } ); +assert(it != rDocNodes.end()); +it->release(); +GetDoc()->GetNodes().erase( it ); + GetTextEngine()->ImpParagraphRemoved( mnPara ); mbDelObject = true; // belongs again to the Undo ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/window.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit b8dce88a30e845ca0d496c69da9ec1b8b41522e3 Author: Michael Stahl AuthorDate: Fri Mar 1 14:04:52 2019 +0100 Commit: Michael Weghorn CommitDate: Wed Mar 13 00:04:21 2019 +0100 tdf#123745 vcl: fix some crash in Window::SetHelpHdl() Qt5 has some QEvent::DeferredDelete thing, perhaps that's why it calls this on a disposed Window? 0 vcl::Window::SetHelpHdl(Link const&) (this=0x60cf9e0, rLink=...) at vcl/source/window/window.cxx:1825 1 SalInstanceWindow::clear_child_help(vcl::Window*) (this=0x7fa40c0, pParent=0x60cf9e0) at vcl/source/app/salvtables.cxx:825 2 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=, __vtt_parm=) at vcl/source/app/salvtables.cxx:962 3 SalInstanceWindow::~SalInstanceWindow() (this=0x7fa40c0, __in_chrg=, __vtt_parm=) at vcl/source/app/salvtables.cxx:963 4 std::default_delete::operator()(weld::Window*) const (this=0x60d0b90, __ptr=0x7fa4190) at /usr/include/c++/8/bits/unique_ptr.h:81 5 std::unique_ptr >::~unique_ptr() (this=0x60d0b90, __in_chrg=) at /usr/include/c++/8/bits/unique_ptr.h:274 6 SalFrame::~SalFrame() (this=0x60d0b40, __in_chrg=) at vcl/source/app/salvtables.cxx:73 7 Qt5Frame::~Qt5Frame() (this=0x60d0b30, __in_chrg=) at vcl/qt5/Qt5Frame.cxx:167 8 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=) at vcl/unx/kde5/KDE5SalFrame.hxx:34 9 KDE5SalFrame::~KDE5SalFrame() (this=0x60d0b30, __in_chrg=) at vcl/unx/kde5/KDE5SalFrame.hxx:34 10 QObject::event(QEvent*) (this=0x60d0b30, e=) at kernel/qobject.cpp:1242 Change-Id: I2ac8cb24924ea3178c2b3eed14350515d8506ec3 Reviewed-on: https://gerrit.libreoffice.org/68581 Reviewed-by: Katarina Behrens Tested-by: Katarina Behrens (cherry picked from commit f8d98bcf37c790e4f02cbe19016b7f29f53e07ff) Reviewed-on: https://gerrit.libreoffice.org/69120 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index aac1dc136a71..8df50b57da1f 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -1829,7 +1829,10 @@ void Window::LoseFocus() void Window::SetHelpHdl(const Link& rLink) { -mpWindowImpl->maHelpRequestHdl = rLink; +if (mpWindowImpl) // may be called after dispose +{ +mpWindowImpl->maHelpRequestHdl = rLink; +} } void Window::RequestHelp( const HelpEvent& rHEvt ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/dialog.cxx |4 1 file changed, 4 insertions(+) New commits: commit 5f755c6455684338ccdedacdd560e1188e7fca76 Author: Caolán McNamara AuthorDate: Tue Feb 26 12:11:59 2019 + Commit: Michael Weghorn CommitDate: Fri Mar 1 10:40:52 2019 +0100 ignore disposed toplevels Change-Id: Ib5a9bad2537d43f7b6588dbdb958e4cdd34f7023 Reviewed-on: https://gerrit.libreoffice.org/68385 Tested-by: Jenkins Reviewed-by: Michael Weghorn diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 4b6a019263cc..0c75f85ae8d3 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1569,7 +1569,11 @@ void TopLevelWindowLocker::decBusy() { // unlock locked toplevel windows from being closed now busy is over for (auto& a : m_aBusyStack.top()) +{ +if (a->IsDisposed()) +continue; a->DecModalCount(); +} m_aBusyStack.pop(); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/treelist/treelistbox.cxx |4 1 file changed, 4 insertions(+) New commits: commit 8b07376f70f5e1192d9ac1e97bcf34de7a09a8a2 Author: Caolán McNamara AuthorDate: Wed Feb 27 11:15:02 2019 + Commit: Adolfo Jayme Barrientos CommitDate: Thu Feb 28 22:08:37 2019 +0100 Resolves: tdf#123711 measure scrollbar for optimal width Change-Id: I30225124e44e8a6290270ecba5024f36508817d3 Reviewed-on: https://gerrit.libreoffice.org/68429 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/treelist/treelistbox.cxx b/vcl/source/treelist/treelistbox.cxx index 6aea58ad91b4..0ece3b5eb793 100644 --- a/vcl/source/treelist/treelistbox.cxx +++ b/vcl/source/treelist/treelistbox.cxx @@ -3133,6 +3133,10 @@ Size SvTreeListBox::GetOptimalSize() const } long nMinWidth = nMinWidthInChars * approximate_char_width(); aRet.setWidth( std::max(aRet.Width(), nMinWidth) ); + +if (GetStyle() & WB_VSCROLL) +aRet.AdjustWidth(GetSettings().GetStyleSettings().GetScrollBarSize()); + return aRet; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) New commits: commit c9e1a5e8894dac6c5f1044dd0e98bc2d453fa995 Author: Caolán McNamara AuthorDate: Tue Feb 12 15:13:33 2019 + Commit: Adolfo Jayme Barrientos CommitDate: Wed Feb 13 11:26:46 2019 +0100 Resolves: tdf#123298 resize before writing to vector Change-Id: I8fc25d254781b31e4ffafcf4397a95d79e042cd8 Reviewed-on: https://gerrit.libreoffice.org/67738 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index e23bfdfb0ef9..ed542157340b 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -1990,7 +1990,8 @@ inline void PDFWriterImpl::appendUnicodeTextStringEncrypt( const OUString& rInSt //prepare a unicode string, encrypt it enableStringEncryption( nInObjectNumber ); sal_uInt8 *pCopy = m_vEncryptionBuffer.data(); -sal_Int32 nChars = 2; +sal_Int32 nChars = 2 + (nLen * 2); +m_vEncryptionBuffer.resize(nChars); *pCopy++ = 0xFE; *pCopy++ = 0xFF; // we need to prepare a byte stream from the unicode string buffer @@ -1999,10 +2000,8 @@ inline void PDFWriterImpl::appendUnicodeTextStringEncrypt( const OUString& rInSt sal_Unicode aUnChar = pStr[i]; *pCopy++ = static_cast( aUnChar >> 8 ); *pCopy++ = static_cast( aUnChar & 255 ); -nChars += 2; } //encrypt in place -m_vEncryptionBuffer.resize(nChars); rtl_cipher_encodeARCFOUR( m_aCipher, m_vEncryptionBuffer.data(), nChars, m_vEncryptionBuffer.data(), nChars ); //now append, hexadecimal (appendHex), the encrypted result for(int i = 0; i < nChars; i++) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/menufloatingwindow.cxx | 12 +++- vcl/source/window/menufloatingwindow.hxx |2 ++ 2 files changed, 13 insertions(+), 1 deletion(-) New commits: commit 385c4686717959ba26f0e35c9c582c89b730d136 Author: Caolán McNamara AuthorDate: Thu Jan 10 14:26:43 2019 + Commit: Caolán McNamara CommitDate: Fri Jan 11 12:06:35 2019 +0100 Resolves: tdf#120632 consider submenus on restoring focus from menu additionally to the menu having focus, if a submenu of that menu has focus, then restore the focus when the whole hierarchy execution ends return focus to the toplevel menu's saved focus widget Change-Id: Iefd467fb1ba67ffd0a303505a893d2453e0ffbb3 Reviewed-on: https://gerrit.libreoffice.org/66119 Tested-by: Jenkins Tested-by: Xisco Faulí Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/menufloatingwindow.cxx b/vcl/source/window/menufloatingwindow.cxx index ac79b1f0c510..2db8caab9aba 100644 --- a/vcl/source/window/menufloatingwindow.cxx +++ b/vcl/source/window/menufloatingwindow.cxx @@ -417,6 +417,16 @@ void MenuFloatingWindow::Start() GetParent()->IncModalCount(); } +bool MenuFloatingWindow::MenuInHierarchyHasFocus() const +{ +if (HasChildPathFocus()) +return true; +PopupMenu* pSub = GetActivePopup(); +if (!pSub) +return false; +return pSub->ImplGetFloatingWindow()->HasChildPathFocus(); +} + void MenuFloatingWindow::End() { if (!bInExecute) @@ -428,7 +438,7 @@ void MenuFloatingWindow::End() // restore focus to previous window if we still have the focus VclPtr xFocusId(xSaveFocusId); xSaveFocusId = nullptr; -if (HasChildPathFocus() && xFocusId != nullptr) +if (xFocusId != nullptr && MenuInHierarchyHasFocus()) { ImplGetSVData()->maWinData.mbNoDeactivate = false; Window::EndSaveFocus(xFocusId); diff --git a/vcl/source/window/menufloatingwindow.hxx b/vcl/source/window/menufloatingwindow.hxx index 9888cd220687..c091b46add4f 100644 --- a/vcl/source/window/menufloatingwindow.hxx +++ b/vcl/source/window/menufloatingwindow.hxx @@ -121,6 +121,8 @@ public: void SetPosInParent( sal_uInt16 nPos ) { nPosInParent = nPos; } +bool MenuInHierarchyHasFocus() const; + virtual css::uno::Reference CreateAccessible() override; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/app/salvtables.cxx | 11 +++ 1 file changed, 11 insertions(+) New commits: commit 3f1e853b7b6d63f4e6fea70a5ef0aa94668ab16e Author: Caolán McNamara AuthorDate: Wed Jan 9 13:05:16 2019 + Commit: Caolán McNamara CommitDate: Thu Jan 10 12:54:38 2019 +0100 Resolves: tdf#122348 make return in spinbutton signal value change before going on to close the dialog afterwards Change-Id: I9764512a944e52b0d2bff2d11c8cf74c057e2623 Reviewed-on: https://gerrit.libreoffice.org/66025 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index eec2249d5a71..6ba7c5f36493 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -2503,6 +2503,7 @@ private: DECL_LINK(LoseFocusHdl, Control&, void); DECL_LINK(OutputHdl, Edit&, bool); DECL_LINK(InputHdl, sal_Int64*, TriState); +DECL_LINK(ActivateHdl, Edit&, bool); double toField(int nValue) const { @@ -2525,6 +2526,7 @@ public: m_xButton->SetLoseFocusHdl(LINK(this, SalInstanceSpinButton, LoseFocusHdl)); m_xButton->SetOutputHdl(LINK(this, SalInstanceSpinButton, OutputHdl)); m_xButton->SetInputHdl(LINK(this, SalInstanceSpinButton, InputHdl)); +m_xButton->GetSubEdit()->SetActivateHdl(LINK(this, SalInstanceSpinButton, ActivateHdl)); } virtual int get_value() const override @@ -2584,6 +2586,8 @@ public: virtual ~SalInstanceSpinButton() override { +if (Edit* pEdit = m_xButton->GetSubEdit()) +pEdit->SetActivateHdl(Link()); m_xButton->SetInputHdl(Link()); m_xButton->SetOutputHdl(Link()); m_xButton->SetLoseFocusHdl(Link()); @@ -2592,6 +2596,13 @@ public: } }; +IMPL_LINK_NOARG(SalInstanceSpinButton, ActivateHdl, Edit&, bool) +{ +// tdf#122348 return pressed to end dialog +signal_value_changed(); +return false; +} + IMPL_LINK_NOARG(SalInstanceSpinButton, UpDownHdl, SpinField&, void) { signal_value_changed(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/builder.cxx |2 +- vcl/source/window/toolbox.cxx | 13 - 2 files changed, 13 insertions(+), 2 deletions(-) New commits: commit 454f6c11ec85dcbea849d3288963db632c90ff3f Author: Caolán McNamara AuthorDate: Wed Dec 19 11:56:23 2018 + Commit: Caolán McNamara CommitDate: Wed Dec 19 21:12:07 2018 +0100 Resolves: tdf#105602 fix extended help for non-dispatchable toolbox commands Change-Id: I832a043ca5ae3a4030b9ac22447cecfabd3650c0 Reviewed-on: https://gerrit.libreoffice.org/65423 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 91f5cd915baa..7f9e0fcec4d4 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -2123,9 +2123,9 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & //TODO: ImplToolItems::size_type -> sal_uInt16! pToolBox->InsertItem(nItemId, extractLabel(rMap), nBits); pToolBox->SetItemCommand(nItemId, aCommand); -pToolBox->SetHelpId(nItemId, m_sHelpRoot + id); } +pToolBox->SetHelpId(nItemId, m_sHelpRoot + id); OUString sTooltip(extractTooltipText(rMap)); if (!sTooltip.isEmpty()) pToolBox->SetQuickHelpText(nItemId, sTooltip); diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index a5820aff5013..fffe1042ad19 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3801,6 +3801,17 @@ void ToolBox::Resize() } } +namespace +{ +bool DispatchableCommand(const OUString& rName) +{ +return rName.startsWith(".uno") || + rName.startsWith("slot:") || + rName.startsWith("macro:") || + rName.startsWith("vnd.sun.star.script"); +} +} + const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const { ImplToolItem* pItem = ImplGetItem( nItemId ); @@ -3812,7 +3823,7 @@ const OUString& ToolBox::ImplGetHelpText( sal_uInt16 nItemId ) const Help* pHelp = Application::GetHelp(); if ( pHelp ) { -if ( pItem->maCommandStr.getLength() ) +if (DispatchableCommand(pItem->maCommandStr)) pItem->maHelpText = pHelp->GetHelpText( pItem->maCommandStr, this ); if ( pItem->maHelpText.isEmpty() && !pItem->maHelpId.isEmpty() ) pItem->maHelpText = pHelp->GetHelpText( OStringToOUString( pItem->maHelpId, RTL_TEXTENCODING_UTF8 ), this ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/tabpage.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit c3d7933d0f5df37c69fdf5f238fbbd0bef8131d3 Author: Caolán McNamara AuthorDate: Fri Dec 14 09:48:19 2018 + Commit: Caolán McNamara CommitDate: Fri Dec 14 12:04:25 2018 +0100 Resolves: tdf#122059 don't crash with no parent for tabpage Change-Id: Id27609a86558094e6b53c763aebe77c97cc11672 Reviewed-on: https://gerrit.libreoffice.org/65148 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/tabpage.cxx b/vcl/source/window/tabpage.cxx index 8cfd6243f9fe..74ab96240ab1 100644 --- a/vcl/source/window/tabpage.cxx +++ b/vcl/source/window/tabpage.cxx @@ -60,7 +60,7 @@ void TabPage::ImplInitSettings() SetParentClipMode(); SetPaintTransparent( false ); -if ( IsControlBackground() ) +if (IsControlBackground() || !pParent) SetBackground( GetControlBackground() ); else SetBackground( pParent->GetBackground() ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/gdi/sallayout.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 8e409fb74b23c053effda4c892624548acc68903 Author: Caolán McNamara AuthorDate: Thu Dec 6 10:35:05 2018 + Commit: Caolán McNamara CommitDate: Thu Dec 6 15:29:23 2018 +0100 Resolves: tdf#121936 uninitialized value used since... commit e194f597ae5882e1cda2cac2925577fff609f101 Date: Sun Sep 30 16:07:16 2018 +0200 Change GlyphItem::nFallbackLevel to font instance Change-Id: I14b40a63cd48ef527e76e15af8f421ce48cce769 Reviewed-on: https://gerrit.libreoffice.org/64699 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 4cbca56d9b70..d49ad0430cfa 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -894,7 +894,7 @@ sal_Int32 GenericSalLayout::GetTextBreak( DeviceCoordinate nMaxWidth, DeviceCoor bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph, Point& rPos, int& nStart, -const PhysicalFontFace**, int* const) const +const PhysicalFontFace**, int* const pFallbackLevel) const { std::vector::const_iterator pGlyphIter = m_GlyphItems.Impl()->begin(); std::vector::const_iterator pGlyphIterEnd = m_GlyphItems.Impl()->end(); @@ -917,6 +917,8 @@ bool GenericSalLayout::GetNextGlyph(const GlyphItem** pGlyph, // update return data with glyph info *pGlyph = &(*pGlyphIter); +if (pFallbackLevel) +*pFallbackLevel = 0; ++nStart; // calculate absolute position in pixel units ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/outdev/text.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit b6764835b4bbd532ba796b48d52f3e87453776a1 Author: Jan-Marek Glogowski AuthorDate: Tue Dec 4 14:26:18 2018 + Commit: Jan-Marek Glogowski CommitDate: Wed Dec 5 08:53:25 2018 +0100 tdf#121815 just use valid cached layout glyphs I'm not exacly sure when and why the font cache is invalidated, but as a result this also invalidates the cached layouted glyphs. So just check the glyph layout cache state before trying to use it. But actually the status bar should update it's cache, so I'm not sure where to really put the fix. At least this won't crash LO anymore. Change-Id: I5f3ff8b9d56808af74d1419e878819d6019cd893 Reviewed-on: https://gerrit.libreoffice.org/64529 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski (cherry picked from commit 9e2e6c27231f916fec349ff60cb0f2c12e0988ad) Reviewed-on: https://gerrit.libreoffice.org/64572 diff --git a/vcl/source/outdev/text.cxx b/vcl/source/outdev/text.cxx index 2bb81ad8da2d..ddc8af2c0073 100644 --- a/vcl/source/outdev/text.cxx +++ b/vcl/source/outdev/text.cxx @@ -1249,6 +1249,12 @@ std::unique_ptr OutputDevice::ImplLayout(const OUString& rOrigStr, vcl::TextLayoutCache const* pLayoutCache, const SalLayoutGlyphs* pGlyphs) const { +if (pGlyphs && !pGlyphs->IsValid()) +{ +SAL_WARN("vcl", "Trying to setup invalid cached glyphs - falling back to relayout!"); +pGlyphs = nullptr; +} + if (!InitFont()) return nullptr; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/builder.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit df2cb0625ba0952ef1013373df875d643ad989d5 Author: Caolán McNamara AuthorDate: Wed Nov 28 17:44:14 2018 + Commit: Caolán McNamara CommitDate: Thu Nov 29 09:51:43 2018 +0100 drop WB_SIMPLEMODE for TreeView multi selections are weird with this set Change-Id: I765c46294803d06911a6ac3fc37d68dd001aacdc Reviewed-on: https://gerrit.libreoffice.org/64192 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 3b04e1f7ed29..c76abc3a1f1f 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -1904,7 +1904,7 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & // everything over to SvHeaderTabListBox/SvTabListBox //c) remove the users of makeSvTabListBox and makeSvTreeListBox extractModel(id, rMap); -WinBits nWinStyle = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE; +WinBits nWinStyle = WB_CLIPCHILDREN|WB_LEFT|WB_VCENTER|WB_3DLOOK; if (m_bLegacy) { OUString sBorder = BuilderUtils::extractCustomProperty(rMap); @@ -1917,7 +1917,7 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & nWinStyle |= WB_BORDER; if (m_bLegacy) { -xWindow = VclPtr::Create(pRealParent, nWinStyle); +xWindow = VclPtr::Create(pRealParent, nWinStyle | WB_SIMPLEMODE); xWindowForPackingProps = xWindow; } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/winproc.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit c5000631d3570af93a66d7aa12f78979a14344a5 Author: Miklos Vajna AuthorDate: Mon Nov 26 16:34:10 2018 +0100 Commit: Miklos Vajna CommitDate: Wed Nov 28 09:06:55 2018 +0100 tdf#121723 vcl: leave popup mode on focus loss of toplevel windows This way it can't happen that we open a menu or context menu, the user switches away (loosing focus) and a leftover floating window is still there. Handle this at the same place where we stop blinking the cursor on focus loss. (cherry picked from commit f21d2b48bd68424a96aa6cd5572e368208378291) Change-Id: I4321e8e3fa1d3f8976c0a1fa29c6a182972023bf Reviewed-on: https://gerrit.libreoffice.org/64117 Tested-by: Jenkins Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 247b6443e366..7a54ea209268 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -1843,6 +1843,11 @@ static void ImplHandleLoseFocus( vcl::Window* pWindow ) vcl::Window* pFocusWin = pWindow->ImplGetWindowImpl()->mpFrameData->mpFocusWin; if ( pFocusWin && pFocusWin->ImplGetWindowImpl()->mpCursor ) pFocusWin->ImplGetWindowImpl()->mpCursor->ImplHide(); + +// Make sure that no menu is visible when a toplevel window loses focus. +VclPtr pFirstFloat = pSVData->maWinData.mpFirstFloat; +if (pFirstFloat && !pWindow->GetParent()) +pFirstFloat->EndPopupMode(FloatWinPopupEndFlags::Cancel | FloatWinPopupEndFlags::CloseAll); } struct DelayedCloseEvent ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/font/fontcharmap.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit ab4987667d315f371bd9cd44c2fa412477a7c617 Author: Xisco Fauli AuthorDate: Mon Nov 26 13:16:08 2018 +0100 Commit: Xisco Faulí CommitDate: Mon Nov 26 23:03:46 2018 +0100 tdf#121647: fix regression from 85b3c799ede62a3d7ad0493fc80b629214956601 the pCP = pCodePairs statement was left behind in - std::vector::const_iterator itInt = aSupportedRanges.begin(); - for( pCP = pCodePairs; itInt != aSupportedRanges.end(); ++itInt ) - *(pCP++) = *itInt; + for (auto const& supportedRange : aSupportedRanges) + *(pCP++) = supportedRange; Change-Id: Icedf7a4dae224f6b328f924691ec4c6767495389 Reviewed-on: https://gerrit.libreoffice.org/64048 Reviewed-by: Julien Nabet Tested-by: Jenkins Reviewed-by: Xisco Faulí diff --git a/vcl/source/font/fontcharmap.cxx b/vcl/source/font/fontcharmap.cxx index 153d5b62a918..ade991626dd9 100644 --- a/vcl/source/font/fontcharmap.cxx +++ b/vcl/source/font/fontcharmap.cxx @@ -357,6 +357,7 @@ bool ParseCMAP( const unsigned char* pCmap, int nLength, CmapResult& rResult ) if( nRangeCount <= 0 ) return false; pCodePairs = new sal_UCS4[ nRangeCount * 2 ]; +pCP = pCodePairs; for (auto const& supportedRange : aSupportedRanges) *(pCP++) = supportedRange; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/treelist/svimpbox.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 879b34787b795d467e9492258fe1e78de2e72663 Author: Caolán McNamara AuthorDate: Mon Nov 26 10:43:11 2018 + Commit: Caolán McNamara CommitDate: Mon Nov 26 16:49:30 2018 +0100 like keypress does, on mouse press create a cursor if missing Change-Id: I57cd718ed03846dbff164acb5cd3c329d9eee615 Reviewed-on: https://gerrit.libreoffice.org/64037 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/treelist/svimpbox.cxx b/vcl/source/treelist/svimpbox.cxx index 97ebe9a14d61..e61b0ebb05d4 100644 --- a/vcl/source/treelist/svimpbox.cxx +++ b/vcl/source/treelist/svimpbox.cxx @@ -1983,6 +1983,8 @@ void SvImpLBox::MouseButtonDown( const MouseEvent& rMEvt ) if( aPos.X() > aOutputSize.Width() || aPos.Y() > aOutputSize.Height() ) return; +if( !pCursor ) +pCursor = pStartEntry; SvTreeListEntry* pEntry = GetEntry( aPos ); if ( pEntry != pCursor ) // new entry selected -> reset current tab position to first tab ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source
vcl/source/window/layout.cxx |5 - 1 file changed, 4 insertions(+), 1 deletion(-) New commits: commit d6102e05a1efe9eca9d72caac9cddca78ced4bfe Author: Caolán McNamara AuthorDate: Wed Nov 21 11:04:41 2018 + Commit: Caolán McNamara CommitDate: Wed Nov 21 14:20:54 2018 +0100 Resolves: tdf#121547 do normal dialog layout first then, if still too small, re-layout with the bigger size Change-Id: I1425e7a55dced4bd93e365a38383eda07fb16d16 Reviewed-on: https://gerrit.libreoffice.org/63707 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/window/layout.cxx b/vcl/source/window/layout.cxx index 837d429c82b5..b68fd2dbcba1 100644 --- a/vcl/source/window/layout.cxx +++ b/vcl/source/window/layout.cxx @@ -2481,6 +2481,7 @@ void MessageDialog::set_secondary_text(const OUString &rSecondaryString) void MessageDialog::StateChanged(StateChangedType nType) { +Dialog::StateChanged(nType); if (nType == StateChangedType::InitShow) { // MessageBox should be at least as wide as to see the title @@ -2488,9 +2489,11 @@ void MessageDialog::StateChanged(StateChangedType nType) // Extra-Width for Close button nTitleWidth += mpWindowImpl->mnTopBorder; if (get_preferred_size().Width() < nTitleWidth) +{ set_width_request(nTitleWidth); +DoInitialLayout(); +} } -Dialog::StateChanged(nType); } VclVPaned::VclVPaned(vcl::Window *pParent) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'libreoffice-6-2' - vcl/source vcl/unx
vcl/source/app/salvtables.cxx|5 ++--- vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx |2 +- vcl/unx/gtk3/gtk3gtkinst.cxx |7 --- 3 files changed, 7 insertions(+), 7 deletions(-) New commits: commit 31e173eea29c2f799184085272404b12535e8259 Author: Caolán McNamara AuthorDate: Tue Nov 20 15:13:08 2018 + Commit: Caolán McNamara CommitDate: Wed Nov 21 11:29:13 2018 +0100 coverity#1441469 silence Dereference null return value and coverity#1441468 Uninitialized pointer field coverity#1441470 Uninitialized pointer field coverity#1441467 Unchecked return value Change-Id: I485fb0b5a83838a3c4913a74b5ea3ae70b4f6bd1 Reviewed-on: https://gerrit.libreoffice.org/63679 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index 67ac7ed97986..b117e34f15d6 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -1753,10 +1753,8 @@ IMPL_LINK(SalInstanceEntry, CursorListener, VclWindowEvent&, rEvent, void) struct SalInstanceTreeIter : public weld::TreeIter { SalInstanceTreeIter(const SalInstanceTreeIter* pOrig) +: iter(pOrig ? pOrig->iter : nullptr) { -if (!pOrig) -return; -iter = pOrig->iter; } SvTreeListEntry* iter; }; @@ -2160,6 +2158,7 @@ IMPL_LINK_NOARG(SalInstanceTreeView, ExpandingHdl, SvTreeListBox*, bool) if (pEntry->HasChildren()) { auto pChild = m_xTreeView->FirstChild(pEntry); +assert(pChild); if (m_xTreeView->GetEntryText(pChild) == "") { m_xTreeView->RemoveEntry(pChild); diff --git a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx index b4603bb32a80..2dd75d4f3166 100644 --- a/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx +++ b/vcl/unx/gtk/fpicker/SalGtkFilePicker.cxx @@ -1233,7 +1233,7 @@ uno::Any SalGtkFilePicker::HandleGetListValue(GtkComboBox *pWidget, sal_Int16 nC &iter, 0, &item, -1); aItemList[i] = OUString(item, strlen(item), RTL_TEXTENCODING_UTF8); g_free(item); -gtk_tree_model_iter_next(pTree, &iter); +(void)gtk_tree_model_iter_next(pTree, &iter); } } aAny <<= aItemList; diff --git a/vcl/unx/gtk3/gtk3gtkinst.cxx b/vcl/unx/gtk3/gtk3gtkinst.cxx index 7e613bd202d1..885669361d99 100644 --- a/vcl/unx/gtk3/gtk3gtkinst.cxx +++ b/vcl/unx/gtk3/gtk3gtkinst.cxx @@ -4129,9 +4129,10 @@ struct GtkInstanceTreeIter : public weld::TreeIter { GtkInstanceTreeIter(const GtkInstanceTreeIter* pOrig) { -if (!pOrig) -return; -iter = pOrig->iter; +if (pOrig) +iter = pOrig->iter; +else +memset(&iter, 0, sizeof(iter)); } GtkTreeIter iter; }; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits