[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/mouse.cxx | 19 ++-- vcl/source/window/toolbox.cxx |2 - vcl/source/window/winproc.cxx | 47 +- 3 files changed, 42 insertions(+), 26 deletions(-) New commits: commit 54916b178bdee9be0f3faef7b62aa735cb3d3ab5 Author: Gabriel Masei AuthorDate: Fri May 28 14:37:52 2021 +0300 Commit: Dennis Francis CommitDate: Wed Jun 9 11:01:04 2021 +0200 vcl: check mpWindowImpl before referencing it Fixed some cases generating crashes because mpWindowImpl was not checked for nullptr. Conflicts: vcl/source/window/toolbox.cxx Change-Id: I5540f9f21a870b02655b5bf2afdbf3a8153c1519 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116330 Tested-by: Jenkins Reviewed-by: Jan Holesovsky Reviewed-on: https://gerrit.libreoffice.org/c/core/+/116774 Tested-by: Jenkins CollaboraOffice Reviewed-by: Gabriel Masei Reviewed-by: Dennis Francis diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 47116725856f..663da0ff872c 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -253,7 +253,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) bool bAsyncFocusWaiting = false; vcl::Window *pFrame = pSVData->maFrameData.mpFirstFrame; -while( pFrame ) +while( pFrame && pFrame->mpWindowImpl && pFrame->mpWindowImpl->mpFrameData ) { if( pFrame != mpWindowImpl->mpFrameWindow.get() && pFrame->mpWindowImpl->mpFrameData->mnFocusId ) { @@ -276,6 +276,8 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) bMustNotGrabFocus = true; break; } +if (!pParent->mpWindowImpl) +break; pParent = pParent->mpWindowImpl->mpParent; } @@ -333,13 +335,16 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) else { vcl::Window* pNewOverlapWindow = ImplGetFirstOverlapWindow(); -vcl::Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); -pNewOverlapWindow->mpWindowImpl->mbActive = true; -pNewOverlapWindow->Activate(); -if ( pNewRealWindow != pNewOverlapWindow ) +if ( pNewOverlapWindow && pNewOverlapWindow->mpWindowImpl ) { -pNewRealWindow->mpWindowImpl->mbActive = true; -pNewRealWindow->Activate(); +vcl::Window* pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); +pNewOverlapWindow->mpWindowImpl->mbActive = true; +pNewOverlapWindow->Activate(); +if ( pNewRealWindow != pNewOverlapWindow && pNewRealWindow && pNewRealWindow->mpWindowImpl ) +{ +pNewRealWindow->mpWindowImpl->mbActive = true; +pNewRealWindow->Activate(); +} } } diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index ef8641986555..0d22f446dea7 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -3209,7 +3209,7 @@ void ToolBox::MouseMove( const MouseEvent& rMEvt ) // and do not highlight when focus is in a different toolbox bool bDrawHotSpot = true; vcl::Window *pWin = Application::GetFocusWindow(); -if( pWin && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) +if( pWin && pWin->ImplGetWindowImpl() && pWin->ImplGetWindowImpl()->mbToolBox && pWin != this ) bDrawHotSpot = false; if ( mbSelection && bDrawHotSpot ) diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 31620bc6a0ac..4dea82046299 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -814,17 +814,20 @@ static vcl::Window* ImplGetKeyInputWindow( vcl::Window* pWindow ) vcl::Window* pChild = pSVData->mpWinData->mpFirstFloat; while (pChild) { -if (pChild->ImplGetWindowImpl()->mbFloatWin) +if (pChild->ImplGetWindowImpl()) { -if (static_cast(pChild)->GrabsFocus()) -break; -} -else if (pChild->ImplGetWindowImpl()->mbDockWin) -{ -vcl::Window* pParent = pChild->GetWindow(GetWindowType::RealParent); -if (pParent && pParent->ImplGetWindowImpl()->mbFloatWin && -static_cast(pParent)->GrabsFocus()) -break; +if (pChild->ImplGetWindowImpl()->mbFloatWin) +{ +if (static_cast(pChild)->GrabsFocus()) +break; +} +else if (pChild->ImplGetWindowImpl()->mbDockWin) +{ +vcl::Window* pParent = pChild->GetWindow(GetWindowType::RealParent); +if (pParent && pParent->ImplGetWindowImpl()->mbFloatWin && +static_cast(pParent)->GrabsFocus()) +break; +} } pChild = pChild->GetParent(); } @@ -832,7 +835,7 @@ static vcl::Window*
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/app/salvtables.cxx |3 ++- vcl/source/control/button.cxx |2 +- vcl/source/window/dialog.cxx |2 +- 3 files changed, 4 insertions(+), 3 deletions(-) New commits: commit 07c19a0c04305ce28612f45aef293f3f538b5535 Author: Szymon Kłos AuthorDate: Thu Dec 17 14:44:51 2020 +0100 Commit: Andras Timar CommitDate: Thu Apr 29 10:50:41 2021 +0200 lok: don't use focus window to request help Use clicked button instead - what leads to the correct window. If only focused window was taken into account sometimes it caused incorrect help link to be used. Change-Id: I645dc1ffa6a6d6d363ea5f9874fa830c441516c7 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107882 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos (cherry picked from commit 70f2fc7a10f41204e353bd3487377983a1018b53) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114728 Reviewed-by: Andras Timar diff --git a/vcl/source/app/salvtables.cxx b/vcl/source/app/salvtables.cxx index c47d46422b53..2b8474f5c0cf 100644 --- a/vcl/source/app/salvtables.cxx +++ b/vcl/source/app/salvtables.cxx @@ -53,6 +53,7 @@ #include #include #include +#include SalFrame::SalFrame() : m_pWindow(nullptr) @@ -3484,7 +3485,7 @@ void SalInstanceWindow::help() { //show help for widget with keyboard focus vcl::Window* pWidget = ImplGetSVData()->mpWinData->mpFocusWin; -if (!pWidget) +if (!pWidget || comphelper::LibreOfficeKit::isActive()) pWidget = m_xWindow; OString sHelpId = pWidget->GetHelpId(); while (sHelpId.isEmpty()) diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 845c397b0eef..d9ce10ae4549 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1846,7 +1846,7 @@ void HelpButton::Click() if ( !GetClickHdl() ) { vcl::Window* pFocusWin = Application::GetFocusWindow(); -if ( !pFocusWin ) +if ( !pFocusWin || comphelper::LibreOfficeKit::isActive() ) pFocusWin = this; HelpEvent aEvt( pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT ); diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 209179cc9591..db183d7ca1d9 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1421,7 +1421,7 @@ IMPL_LINK(Dialog, ResponseHdl, Button*, pButton, void) if (nResponse == RET_HELP) { vcl::Window* pFocusWin = Application::GetFocusWindow(); -if (!pFocusWin) +if (!pFocusWin || comphelper::LibreOfficeKit::isActive()) pFocusWin = pButton; HelpEvent aEvt(pFocusWin->GetPointerPosPixel(), HelpEventMode::CONTEXT); pFocusWin->RequestHelp(aEvt); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 4e3186e82891c8a8108a45d31dea2a32472a2733 Author: Ashod Nakashian AuthorDate: Sun Nov 8 09:15:25 2020 -0500 Commit: Andras Timar CommitDate: Thu Apr 29 10:49:24 2021 +0200 vcl: lok: don't use window impl after destroy When destroying floating windows, accessing the GetLOKNotifier can segfault. The following is the stack-trace from such a case. /usr/bin/loolforkit(_ZN7SigUtil13dumpBacktraceEv+0x5e)[0x55cbf9da62fe] /usr/bin/loolforkit(+0x1d0af5)[0x55cbf9da6af5] /lib/x86_64-linux-gnu/libpthread.so.0(+0x128a0)[0x7fe0a125f8a0] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZNK3vcl6Window14GetLOKNotifierEv+0x7)[0x7fe09e67b827] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window24GetParentWithLOKNotifierEv+0x2b)[0x7fe09e67b86b] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14FloatingWindow12StateChangedE16StateChangedType+0x43)[0x7fe09e609a13] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN3vcl6Window4ShowEb9ShowFlags+0x2ba)[0x7fe09e67cd5a] /opt/collaboraoffice6.4/program/libmergedlo.so(_Z21ImplDestroyHelpWindowR14ImplSVHelpDatab+0xe3)[0x7fe09e90c193] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN9Scheduler21ProcessTaskSchedulingEv+0x8ea)[0x7fe09e93817a] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance12CheckTimeoutEb+0x107)[0x7fe09ea06807] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN14SvpSalInstance7DoYieldEbb+0x85)[0x7fe09ea06905] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x2f5d6fb)[0x7fe09e94f6fb] /opt/collaboraoffice6.4/program/libmergedlo.so(_ZN11Application7ExecuteEv+0x45)[0x7fe09e950295] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f6d545)[0x7fe09d95f545] /opt/collaboraoffice6.4/program/libmergedlo.so(_Z10ImplSVMainv+0x51)[0x7fe09e957321] /opt/collaboraoffice6.4/program/libmergedlo.so(soffice_main+0x98)[0x7fe09d980b88] /opt/collaboraoffice6.4/program/libmergedlo.so(+0x1f9e7c1)[0x7fe09d9907c1] /usr/bin/loolforkit(_Z10lokit_mainRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_S6_m+0x2562)[0x55cbf9d4c792] /usr/bin/loolforkit(+0x15fc77)[0x55cbf9d35c77] /usr/bin/loolforkit(_Z18forkLibreOfficeKitRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES6_S6_S6_i+0xb44)[0x55cbf9d36b24] /usr/bin/loolforkit(main+0x18a7)[0x55cbf9d00e17] /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7)[0x7fe0a0e7db97] /usr/bin/loolforkit(_start+0x2a)[0x55cbf9d07efa] Change-Id: Ia467d51896d1ac657bde5ae2803fcb2557ebd3fe Reviewed-on: https://gerrit.libreoffice.org/c/core/+/105445 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks (cherry picked from commit 5a3837034960327743154887732c4cae04cfc971) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/114727 Reviewed-by: Andras Timar diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 10638fa43957..bf270d6f2ffb 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3236,12 +3236,12 @@ void Window::ReleaseLOKNotifier() const vcl::ILibreOfficeKitNotifier* Window::GetLOKNotifier() const { -return mpWindowImpl->mpLOKNotifier; +return mpWindowImpl ? mpWindowImpl->mpLOKNotifier : nullptr; } vcl::LOKWindowId Window::GetLOKWindowId() const { -return mpWindowImpl->mnLOKWindowId; +return mpWindowImpl ? mpWindowImpl->mnLOKWindowId : 0; } VclPtr Window::GetParentWithLOKNotifier() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/seleng.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit f009782694548358abec1e2a5b346b5a20b5caf2 Author: Pranam Lashkari AuthorDate: Thu Feb 4 17:33:44 2021 +0530 Commit: Pranam Lashkari CommitDate: Fri Feb 5 09:52:40 2021 +0100 on SelMouseButtonDown check if window pointer is not null Change-Id: Ib6f7821e685c407d29bed8fa61b9abf0e3535037 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110412 Tested-by: Jenkins CollaboraOffice Reviewed-by: Pranam Lashkari diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index d50a4d50b6ac..e1955f315fb2 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -115,7 +115,7 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { nFlags &= ~SelectionEngineFlags::CMDEVT; -if ( !pFunctionSet || rMEvt.GetClicks() > 1 ) +if ( !pFunctionSet || rMEvt.GetClicks() > 1 || !pWin ) return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/seleng.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 979aa2a49872176e45dcff2df50211a5dc28c4e0 Author: Samuel Mehrbrodt AuthorDate: Fri Jul 5 12:40:16 2019 +0200 Commit: Pranam Lashkari CommitDate: Fri Feb 5 09:12:10 2021 +0100 Right clicking in text should move the cursor Currently the cursor stays at the old position when you right click in a different position in the text. This causes some issues, e.g. when you right click on a hyperlink in draw, you don't get the context menu for the link if the cursor is not on the link (see tdf#98575 for related bug). So generally, when right clicking on a piece of text, move the cursor to where the click happened. The new behavior is now matching the behavior of Word, PowerPoint, etc. Change-Id: I5e0ac37b7ac6c859d3056c5b8ed453f97c747360 Reviewed-on: https://gerrit.libreoffice.org/75127 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110392 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx index e659db7a5875..d50a4d50b6ac 100644 --- a/vcl/source/window/seleng.cxx +++ b/vcl/source/window/seleng.cxx @@ -114,8 +114,8 @@ void SelectionEngine::CursorPosChanging( bool bShift, bool bMod1 ) bool SelectionEngine::SelMouseButtonDown( const MouseEvent& rMEvt ) { -nFlags &= (~SelectionEngineFlags::CMDEVT); -if ( !pFunctionSet || !pWin || rMEvt.GetClicks() > 1 || rMEvt.IsRight() ) +nFlags &= ~SelectionEngineFlags::CMDEVT; +if ( !pFunctionSet || rMEvt.GetClicks() > 1 ) return false; sal_uInt16 nModifier = rMEvt.GetModifier() | nLockedMods; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/event.cxx | 10 ++ vcl/source/window/window2.cxx |5 + 2 files changed, 15 insertions(+) New commits: commit 7c4435b8c69ca3a9d5ff1d280152cec1bfc51a1e Author: Miklos Vajna AuthorDate: Tue Feb 11 21:06:06 2020 +0100 Commit: Tamás Zolnai CommitDate: Thu Feb 4 16:31:07 2021 +0100 vcl: fix UB in Window::ImplGetFirstOverlapWindow() mpWindowImpl can be nullptr here, see online.git's unit-load-torture test: vcl/source/window/window2.cxx:882:24: runtime error: member access within null pointer of type 'WindowImpl' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/window2.cxx:882:24 in Surrouding code already checks for nullptr mpWindowImpl, so fix it directly where the problem is reported, not a caller. (Also fix a similar case in Window::ImplCallFocusChangeActivate().) Change-Id: I34dee0fd49483c428a78fd48b54c00b2f0a26417 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88474 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit d1378b92c6697c09def7b3db8b36c3cf883b55c4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110418 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/vcl/source/window/event.cxx b/vcl/source/window/event.cxx index 797d40a79912..e7752ae77043 100644 --- a/vcl/source/window/event.cxx +++ b/vcl/source/window/event.cxx @@ -576,7 +576,17 @@ void Window::ImplCallFocusChangeActivate( vcl::Window* pNewOverlapWindow, bool bCallActivate = true; bool bCallDeactivate = true; +if (!pOldOverlapWindow) +{ +return; +} + pOldRealWindow = pOldOverlapWindow->ImplGetWindow(); +if (!pNewOverlapWindow) +{ +return; +} + pNewRealWindow = pNewOverlapWindow->ImplGetWindow(); if ( (pOldRealWindow->GetType() != WindowType::FLOATINGWINDOW) || pOldRealWindow->GetActivateMode() != ActivateModeFlags::NONE ) diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 61ea3d80c3d0..3037491703fd 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -893,6 +893,11 @@ vcl::Window* Window::ImplGetBorderWindow() const vcl::Window* Window::ImplGetFirstOverlapWindow() { +if (!mpWindowImpl) +{ +return nullptr; +} + if ( mpWindowImpl->mbOverlapWin ) return this; else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/mouse.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 1663c19834fbff0b9bddfaa7f353c9a1e0589739 Author: Miklos Vajna AuthorDate: Wed Jan 29 21:06:35 2020 +0100 Commit: Miklos Vajna CommitDate: Mon Dec 14 15:59:26 2020 +0100 vcl: fix UB in vcl::Cursor::ImplDoShow() pWindow->mpWindowImpl can be nullptr here, see online.git's unit-load-torture test: vcl/source/window/cursor.cxx:204:54: runtime error: member access within null pointer of type 'WindowImpl' SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior vcl/source/window/cursor.cxx:204:54 in (And one more similar case in Window::ImplGrabFocus().) (cherry picked from commit f12fc2d07e6f2e9d33ad9350b1f005cbcbe72a18) Conflicts: vcl/source/window/cursor.cxx Change-Id: Idd145082b58c10139be53e9b997efedeb0cec364 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/107597 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/window/mouse.cxx b/vcl/source/window/mouse.cxx index 01adba1a2b80..47116725856f 100644 --- a/vcl/source/window/mouse.cxx +++ b/vcl/source/window/mouse.cxx @@ -313,7 +313,7 @@ void Window::ImplGrabFocus( GetFocusFlags nFlags ) pSVData->mpWinData->mpFocusWin = this; -if ( pOldFocusWindow ) +if ( pOldFocusWindow && pOldFocusWindow->mpWindowImpl ) { // Cursor hidden if ( pOldFocusWindow->mpWindowImpl->mpCursor ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source vcl/unx
vcl/source/font/fontmetric.cxx |4 - vcl/source/fontsubset/sft.cxx |5 +- vcl/unx/generic/fontmanager/fontconfig.cxx | 51 - vcl/unx/generic/glyphs/freetype_glyphcache.cxx |6 +- 4 files changed, 34 insertions(+), 32 deletions(-) New commits: commit 2bd4f2d375b7b915ec17f17f30e36b2a8aa50a4a Author: Khaled Hosny AuthorDate: Tue Aug 27 15:19:15 2019 +0200 Commit: Tor Lillqvist CommitDate: Mon Nov 30 09:47:21 2020 +0100 Make Noto Color Emoji font work on Linux Noto Color Emoji is a bitmap color font, Cairo knows how to scale such fonts and FontConfig will identify them as scalable but not outline fonts, so change the FontConfig checks to checks for scalability. Make sft.cxx:doOpenTTFont() accept non-outline fonts, the text will not show in PDF but that is not worse than the status quo. Change-Id: I756c718296d2c43e3165cd2f07b11bbb981318d3 Reviewed-on: https://gerrit.libreoffice.org/78218 Tested-by: Jenkins Reviewed-by: Khaled Hosny Reviewed-on: https://gerrit.libreoffice.org/c/core/+/106836 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea Reviewed-by: Tor Lillqvist diff --git a/vcl/source/font/fontmetric.cxx b/vcl/source/font/fontmetric.cxx index 5a108ca26f47..4dd3cf88abcd 100644 --- a/vcl/source/font/fontmetric.cxx +++ b/vcl/source/font/fontmetric.cxx @@ -484,8 +484,8 @@ void ImplFontMetricData::ImplCalcLineSpacing(const std::vector& rHheaDa if (mnAscent || mnDescent) mnIntLeading = mnAscent + mnDescent - mnHeight; -SAL_INFO("vcl.gdi.fontmetric", - "fsSelection: " << rInfo.fsSelection +SAL_INFO("vcl.gdi.fontmetric", GetFamilyName() + << ": fsSelection: " << rInfo.fsSelection << ", typoAscender: " << rInfo.typoAscender << ", typoDescender: " << rInfo.typoDescender << ", typoLineGap: " << rInfo.typoLineGap diff --git a/vcl/source/fontsubset/sft.cxx b/vcl/source/fontsubset/sft.cxx index 9262c2bca365..802453ae7446 100644 --- a/vcl/source/fontsubset/sft.cxx +++ b/vcl/source/fontsubset/sft.cxx @@ -1661,7 +1661,10 @@ static SFErrCodes doOpenTTFont( sal_uInt32 facenum, TrueTypeFont* t ) /* TODO: implement to get subsetting */ assert(t->goffsets != nullptr); } else { -return SFErrCodes::TtFormat; +// Bitmap font, accept for now. +t->goffsets = static_cast(calloc(1+t->nglyphs, sizeof(sal_uInt32))); +/* TODO: implement to get subsetting */ +assert(t->goffsets != nullptr); } table = getTable(t, O_hhea); diff --git a/vcl/unx/generic/fontmanager/fontconfig.cxx b/vcl/unx/generic/fontmanager/fontconfig.cxx index 7205ef386668..ffd36c62f7bb 100644 --- a/vcl/unx/generic/fontmanager/fontconfig.cxx +++ b/vcl/unx/generic/fontmanager/fontconfig.cxx @@ -65,7 +65,7 @@ namespace class FontCfgWrapper { -FcFontSet* m_pOutlineSet; +FcFontSet* m_pFontSet; void addFontSet( FcSetName ); @@ -93,17 +93,14 @@ private: }; FontCfgWrapper::FontCfgWrapper() -: m_pOutlineSet( nullptr ) +: m_pFontSet( nullptr ) { FcInit(); } void FontCfgWrapper::addFontSet( FcSetName eSetName ) { -/* - add only acceptable outlined fonts to our config, - for future fontconfig use -*/ +// Add only acceptable fonts to our config, for future fontconfig use. FcFontSet* pOrig = FcConfigGetFonts( FcConfigGetCurrent(), eSetName ); if( !pOrig ) return; @@ -112,10 +109,12 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName ) for( int i = 0; i < pOrig->nfont; ++i ) { FcPattern* pPattern = pOrig->fonts[i]; -// #i115131# ignore non-outline fonts -FcBool bOutline = FcFalse; -FcResult eOutRes = FcPatternGetBool( pPattern, FC_OUTLINE, 0, ); -if( (eOutRes != FcResultMatch) || (bOutline == FcFalse) ) +// #i115131# ignore non-scalable fonts +// Scalable fonts are usually outline fonts, but some bitmaps fonts +// (like Noto Color Emoji) are also scalable. +FcBool bScalable = FcFalse; +FcResult eScalableRes = FcPatternGetBool(pPattern, FC_SCALABLE, 0, ); +if ((eScalableRes != FcResultMatch) || (bScalable == FcFalse)) continue; // Ignore Type 1 fonts, too. @@ -125,7 +124,7 @@ void FontCfgWrapper::addFontSet( FcSetName eSetName ) continue; FcPatternReference( pPattern ); -FcFontSetAdd( m_pOutlineSet, pPattern ); +FcFontSetAdd( m_pFontSet, pPattern ); } // TODO?: FcFontSetDestroy( pOrig ); @@ -216,16 +215,16 @@ namespace FcFontSet* FontCfgWrapper::getFontSet() { -if( !m_pOutlineSet ) +if( !m_pFontSet ) { -m_pOutlineSet = FcFontSetCreate(); +m_pFontSet = FcFontSetCreate(); addFontSet( FcSetSystem ); addFontSet( FcSetApplication );
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window2.cxx | 20 +++- 1 file changed, 19 insertions(+), 1 deletion(-) New commits: commit 0eb85f9ac13d089bda58e7a7ef68c5b4bbb0c2a8 Author: Szymon Kłos AuthorDate: Wed Sep 30 19:09:32 2020 +0200 Commit: Andras Timar CommitDate: Mon Oct 5 21:52:35 2020 +0200 Allow invalidate after queue_resize for lok in sidebar This is a fix for regression introduced by 61a35560cb412d7ab0e3d0574eec4a790e3b9dfd Sidebar wasn't properly refreshed in Online eg. in Impress change 'Background' in sidebar 'Slide' deck to 'Color' -> resulted in overlapping content Change-Id: Id64f5d8694908d28cf5fa9787b65e555fb317e35 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/103724 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 92d62792feb5..61ea3d80c3d0 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1320,6 +1320,19 @@ void Window::InvalidateSizeCache() pWindowImpl->mnOptimalHeightCache = -1; } +static bool HasParentDockingWindow(const vcl::Window* pWindow) +{ +while( pWindow ) +{ +if( pWindow->IsDockingWindow() ) +return true; + +pWindow = pWindow->GetParent(); +} + +return pWindow && pWindow->IsDockingWindow(); +} + void Window::queue_resize(StateChangedType eReason) { if (IsDisposed()) @@ -1355,7 +1368,12 @@ void Window::queue_resize(StateChangedType eReason) if (VclPtr pParent = GetParentWithLOKNotifier()) { Size aSize = GetSizePixel(); -if (aSize.getWidth() > 0 && aSize.getHeight() > 0 && GetParentDialog() + +// Form controls (VCL controls inside document window) was causing +// infinite loop of calls, so call it only for widgets having as a parent +// dialog or docking window (eg. sidebar) +if (aSize.getWidth() > 0 && aSize.getHeight() > 0 +&& (GetParentDialog() || HasParentDockingWindow(this)) && !pParent->IsInInitShow()) LogicInvalidate(nullptr); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/combobox.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 769fc49f87ccfd1858da4cddab09d978ff19df5a Author: Szymon Kłos AuthorDate: Wed Jul 8 13:52:43 2020 +0200 Commit: Jan Holesovsky CommitDate: Fri Aug 14 22:41:57 2020 +0200 Call modified handler on combobox selection SelectEntryPos is used by uitest framework to perform combobox selection action. Calling handler is required to propagate changes to the client code. Change-Id: I83d3d72ee5f17f382ce5f56b35b0a91ec98ebfb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/98370 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100470 Reviewed-by: Jan Holesovsky diff --git a/vcl/source/control/combobox.cxx b/vcl/source/control/combobox.cxx index 944860e0ca74..227856bee234 100644 --- a/vcl/source/control/combobox.cxx +++ b/vcl/source/control/combobox.cxx @@ -453,7 +453,10 @@ IMPL_LINK( ComboBox::Impl, ImplSelectionChangedHdl, sal_Int32, nChanged, void ) if (!m_pImplLB->IsTrackingSelect()) { if (!m_pSubEdit->IsReadOnly() && m_pImplLB->GetEntryList()->IsEntryPosSelected(nChanged)) +{ m_pSubEdit->SetText(m_pImplLB->GetEntryList()->GetEntryText(nChanged)); +m_pSubEdit->Modify(); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox2.cxx |6 -- 1 file changed, 6 deletions(-) New commits: commit 8cf49d72e4688c0c83d6c073384f1345e45a777f Author: Jan Holesovsky AuthorDate: Thu Jul 23 14:06:57 2020 +0200 Commit: Andras Timar CommitDate: Tue Jul 28 09:35:43 2020 +0200 Revert "android: avoid expensive load of un-used sidebar icons on mobile." Unfortunately we need this on Android for the tablets, otherwise the sidebar lacks the icons. Also it is not easily possible to use the isLOKMobilePhone() check here, because that is per-view in general, and handled in sfx in particular, making it hard to use here in vcl. This reverts commit 9a38b194eec5bcf6cb8d073e5d35173c5856f28f. Change-Id: I2b599e884ad4d00b7c246743c180a5324c9a143d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99328 Tested-by: Andras Timar Reviewed-by: Andras Timar diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index ade4c3360df8..48accb906242 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -20,7 +20,6 @@ #include #include -#include #include #include @@ -425,12 +424,7 @@ void ToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference sal_uInt16! ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 13 ++--- 1 file changed, 10 insertions(+), 3 deletions(-) New commits: commit c91a8faaf6b03bde165894d6d35ce5f71a39c7c4 Author: Miklos Vajna AuthorDate: Mon Jul 20 11:36:13 2020 +0200 Commit: Miklos Vajna CommitDate: Tue Jul 21 08:45:03 2020 +0200 tdf#50879 PDF export: ensure only built-in fonts are used for forms Alternative would be to embed the whole font, which is unusual: PDF typically just embeds the used subset. (cherry picked from commit 6294ecd7b4da38de98b24ddfb9f201cef98c1f41) [ Backport is missing the testcase, pdfium on this branch is too old. ] Change-Id: Ic0b7e121b3ae38804c1a396ea36104ebcc0b9588 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99070 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 60be24294217..e44edd1fe8a9 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4066,6 +4066,13 @@ Font PDFWriterImpl::replaceFont( const vcl::Font& rControlFont, const vcl::Font& sal_Int32 PDFWriterImpl::getBestBuildinFont( const vcl::Font& rFont ) { sal_Int32 nBest = 4; // default to Helvetica + +if (rFont.GetFamilyType() == FAMILY_ROMAN) +{ +// Serif: default to Times-Roman. +nBest = 8; +} + OUString aFontName( rFont.GetFamilyName() ); aFontName = aFontName.toAsciiLowerCase(); @@ -4212,14 +4219,14 @@ void PDFWriterImpl::createDefaultEditAppearance( PDFWidget& rEdit, const PDFWrit // prepare font to use, draw field border Font aFont = drawFieldBorder( rEdit, rWidget, rSettings ); -sal_Int32 nBest = getSystemFont( aFont ); +// Get the built-in font which is closest to aFont. +sal_Int32 nBest = getBestBuildinFont(aFont); // prepare DA string OStringBuffer aDA( 32 ); appendNonStrokingColor( replaceColor( rWidget.TextColor, rSettings.GetFieldTextColor() ), aDA ); aDA.append( ' ' ); -aDA.append( "/F" ); -aDA.append( nBest ); +aDA.append(pdf::BuildinFontFace::Get(nBest).getNameObject()); OStringBuffer aDR( 32 ); aDR.append( "/Font " ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/edit.cxx |1 + vcl/source/control/spinfld.cxx |1 + vcl/source/window/accessibility.cxx |4 +++- vcl/source/window/brdwin.cxx|2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) New commits: commit d546297203a90e7b412e00a4afb38debeb895522 Author: Michael Weghorn AuthorDate: Fri May 29 16:53:59 2020 +0200 Commit: Andras Timar CommitDate: Tue Jun 2 15:34:23 2020 +0200 tdf#133498 Make native drawing of FormattedField work (again) Commit 2a694f9e0e7789b4b3b792a9eedd29366fa10c1c ("lok: fix the window type of the formatted field control", 2020-05-06) had introduced the new 'WindowType::FORMATTEDFIELD' and sets it for the 'FormattedField' control, instead of using the previous default value set in the 'SpinField' ctor, which is 'WindowType::SPINFIELD'. This commit adds the corresponding 'WindowType::FORMATTEDFIELD' cases relevant to make native drawing of the control work (again). Also map the corresponding accessibility roles. Change-Id: Ied0b0548c03dee3feaf1b6252c81b2a33b68b938 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95156 Tested-by: Jenkins Reviewed-by: Michael Weghorn (cherry picked from commit 33cac418db78f64f7fa84b8e65c01c2b02cf17a7) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95357 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/control/edit.cxx b/vcl/source/control/edit.cxx index c38490de2280..ab36a212855d 100644 --- a/vcl/source/control/edit.cxx +++ b/vcl/source/control/edit.cxx @@ -959,6 +959,7 @@ ControlType Edit::ImplGetNativeControlType() const case WindowType::LONGCURRENCYFIELD: case WindowType::NUMERICFIELD: case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: if (pControl->GetStyle() & WB_SPIN) nCtrl = ControlType::Spinbox; else diff --git a/vcl/source/control/spinfld.cxx b/vcl/source/control/spinfld.cxx index dd6d22502974..c954c698dffd 100644 --- a/vcl/source/control/spinfld.cxx +++ b/vcl/source/control/spinfld.cxx @@ -177,6 +177,7 @@ void ImplDrawSpinButton(vcl::RenderContext& rRenderContext, vcl::Window* pWindow case WindowType::LONGCURRENCYFIELD: case WindowType::NUMERICFIELD: case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: aControl = ControlType::Spinbox; break; default: diff --git a/vcl/source/window/accessibility.cxx b/vcl/source/window/accessibility.cxx index de117cce9554..d8f66cbc3c10 100644 --- a/vcl/source/window/accessibility.cxx +++ b/vcl/source/window/accessibility.cxx @@ -362,7 +362,8 @@ sal_uInt16 Window::getDefaultAccessibleRole() const case WindowType::METRICFIELD: case WindowType::CURRENCYFIELD: case WindowType::LONGCURRENCYFIELD: -case WindowType::SPINFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break; +case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: nRole = accessibility::AccessibleRole::SPIN_BOX; break; case WindowType::TOOLBOX: nRole = accessibility::AccessibleRole::TOOL_BAR; break; case WindowType::STATUSBAR: nRole = accessibility::AccessibleRole::STATUS_BAR; break; @@ -462,6 +463,7 @@ OUString Window::getDefaultAccessibleName() const case WindowType::DATEFIELD: case WindowType::TIMEFIELD: case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: case WindowType::COMBOBOX: case WindowType::LISTBOX: diff --git a/vcl/source/window/brdwin.cxx b/vcl/source/window/brdwin.cxx index 9248f65c1955..ad40fe141e9d 100644 --- a/vcl/source/window/brdwin.cxx +++ b/vcl/source/window/brdwin.cxx @@ -474,6 +474,7 @@ void ImplSmallBorderWindowView::Init( OutputDevice* pDev, long nWidth, long nHei case WindowType::LONGCURRENCYFIELD: case WindowType::NUMERICFIELD: case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: case WindowType::CALCINPUTLINE: mbNWFBorder = true; if (pCtrl->GetStyle() & WB_SPIN) @@ -615,6 +616,7 @@ void ImplSmallBorderWindowView::DrawWindow(vcl::RenderContext& rRenderContext, c case WindowType::LONGCURRENCYFIELD: case WindowType::NUMERICFIELD: case WindowType::SPINFIELD: +case WindowType::FORMATTEDFIELD: case WindowType::CALCINPUTLINE: if (pCtrl->GetStyle() & WB_SPIN) aCtrlType = ControlType::Spinbox; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/tabctrl.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 6218e0fc6551279f586ed5e84d4454474f2eed06 Author: Szymon Kłos AuthorDate: Wed Mar 11 14:45:10 2020 +0100 Commit: Szymon Kłos CommitDate: Thu May 21 15:58:32 2020 +0200 jsdialog: send selected tab and names Change-Id: I54db09a7a0311b5ed9bc0764c353b82bb99b9e41 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94620 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos diff --git a/vcl/source/control/tabctrl.cxx b/vcl/source/control/tabctrl.cxx index cab39a8feb94..8d1806006dfe 100644 --- a/vcl/source/control/tabctrl.cxx +++ b/vcl/source/control/tabctrl.cxx @@ -2194,10 +2194,12 @@ boost::property_tree::ptree TabControl::DumpAsPropertyTree() boost::property_tree::ptree aTab; aTab.put("text", GetPageText(id)); aTab.put("id", id); +aTab.put("name", GetPageName(id)); aTabs.push_back(std::make_pair("", aTab)); } aTree.add_child("tabs", aTabs); +aTree.put("selected", GetCurPageId()); return aTree; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/fmtfield.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 20f42f4f41ee4e719931bfa0e68b8d2a9ff9eea6 Author: Henry Castro AuthorDate: Tue May 12 15:05:48 2020 -0400 Commit: Henry Castro CommitDate: Wed May 13 03:21:01 2020 +0200 lok: notify data change of the formatted field control Change-Id: I997ed1fb3900ab46e6182e529762bf5b04e82fcd Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94076 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/vcl/source/control/fmtfield.cxx b/vcl/source/control/fmtfield.cxx index 1ca963d2b017..b504342a5a87 100644 --- a/vcl/source/control/fmtfield.cxx +++ b/vcl/source/control/fmtfield.cxx @@ -849,6 +849,11 @@ void FormattedField::SetValueFromString(const OUString& rStr) nEnd == rStr.getLength()) { SetValue(fValue); +SetModifyFlag(); +Modify(); + +// Notify the value has changed +SpinField::Up(); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/field.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b833f0a8c98e46c51a0e5fab21d8dbae32d3070e Author: Henry Castro AuthorDate: Tue May 12 11:57:03 2020 -0400 Commit: Henry Castro CommitDate: Tue May 12 20:54:48 2020 +0200 lok: replace SetValue for ImplNewFieldValue The ImplNewFieldValue notify changes in the spin control Change-Id: I64c0239b0a12ecdf9a3b7af4c496cee88d1b2cb3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94070 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index 5ef09683269f..fae8506a92e6 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -655,7 +655,7 @@ void NumericFormatter::SetValueFromString(const OUString& rStr) if (ImplNumericGetValue(rStr, nValue, GetDecimalDigits(), Application::GetSettings().GetNeutralLocaleDataWrapper())) { -SetValue(nValue); +ImplNewFieldValue(nValue); } else { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window2.cxx |4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) New commits: commit 61a35560cb412d7ab0e3d0574eec4a790e3b9dfd Author: Samuel Mehrbrodt AuthorDate: Wed Mar 25 14:08:14 2020 +0100 Commit: Andras Timar CommitDate: Sun May 10 21:50:55 2020 +0200 tdf#131280 Fix endless invalidation loop on documents with form controls Restores a condition which was removed in 8de98e61fbc96bf523b3dec7e1e52eb7e2d7693e Change-Id: I68a9f8a362d2ded9975e7c73e2a0533aa5ad9e94 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91053 Tested-by: Jenkins Reviewed-by: Samuel Mehrbrodt Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93867 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index 8092b1a12aba..5539fb3b8463 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1354,8 +1354,8 @@ void Window::queue_resize(StateChangedType eReason) if (VclPtr pParent = GetParentWithLOKNotifier()) { Size aSize = GetSizePixel(); -if (aSize.getWidth() > 0 && aSize.getHeight() > 0 && -!pParent->IsInInitShow()) +if (aSize.getWidth() > 0 && aSize.getHeight() > 0 && GetParentDialog() +&& !pParent->IsInInitShow()) LogicInvalidate(nullptr); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/app/settings.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 303577c66c7084fc061cf61d6567a1cb42213d57 Author: Henry Castro AuthorDate: Wed May 6 13:59:52 2020 -0400 Commit: Henry Castro CommitDate: Sat May 9 14:38:02 2020 +0200 lok: replace locale name "en_US" -> "en-US" Change-Id: Ic4792e35d14e2865f8bd9998b61c9024f822d454 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93774 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/vcl/source/app/settings.cxx b/vcl/source/app/settings.cxx index a072d02e272b..0388beedc754 100644 --- a/vcl/source/app/settings.cxx +++ b/vcl/source/app/settings.cxx @@ -2881,7 +2881,7 @@ const LocaleDataWrapper& AllSettings::GetNeutroLocaleDataWrapper() const { if ( !mxData->mpNeutroLocaleDataWrapper ) const_cast(this)->mxData->mpNeutroLocaleDataWrapper.reset( new LocaleDataWrapper( -comphelper::getProcessComponentContext(), LanguageTag("en_US") ) ); +comphelper::getProcessComponentContext(), LanguageTag("en-US") ) ); return *mxData->mpNeutroLocaleDataWrapper; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx |7 ++- vcl/source/gdi/pdfwriter_impl.hxx |5 - 2 files changed, 10 insertions(+), 2 deletions(-) New commits: commit 2d1a0e36ec2eb851b487e75d3103bc76359bb1dd Author: Tomaž Vajngerl AuthorDate: Sun Apr 26 12:07:19 2020 +0200 Commit: Tomaž Vajngerl CommitDate: Sun Apr 26 18:19:00 2020 +0200 vcl: When exporintg PDF write the correct page of embedded PDF We can display PDF as an graphic in the document, where the PDF is treated as a vector graphic and rendered with Pdfium. When in that case we export the document as PDF, we can insert the original PDF page as an reference XObject. This workes fine, however the PDF as an graphic also contains the page number, which page should be rendered. This was not taken into account in the PDF export - it was hardcored to first page. This extends the support so it reads the page index from the graphic, and sets the correct PDF page. Change-Id: I15188ee495f9b3fcc3aa7df6f4bad4fa09903c6a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92923 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 8aec8544431a..c5d0e441254d 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -9145,7 +9145,9 @@ void PDFWriterImpl::writeReferenceXObject(ReferenceXObjectEmit& rEmit) return; } -filter::PDFObjectElement* pPage = aPages[0]; +size_t nPageIndex = rEmit.m_nPDFPageIndex >= 0 ? rEmit.m_nPDFPageIndex : 0; + +filter::PDFObjectElement* pPage = aPages[nPageIndex]; if (!pPage) { SAL_WARN("vcl.pdfwriter", "PDFWriterImpl::writeReferenceXObject: no page"); @@ -9699,7 +9701,10 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject rEmit.m_nEmbeddedObject = m_aEmbeddedFiles.back().m_nObject; } else +{ +rEmit.m_nPDFPageIndex = rGraphic.getVectorGraphicData()->getPageIndex(); rEmit.m_aPDFData = *pPDFData; +} rEmit.m_nFormObject = createObject(); rEmit.m_aPixelSize = rGraphic.GetPrefSize(); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index ca3b797d5b6f..98d2f8812059 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -203,13 +203,16 @@ public: sal_Int32 m_nBitmapObject; /// Size of the bitmap replacement, in pixels. Size m_aPixelSize; + /// PDF data from the graphic object, if not writing a reference XObject. std::vector m_aPDFData; +sal_Int32 m_nPDFPageIndex; ReferenceXObjectEmit() : m_nFormObject(0), m_nEmbeddedObject(0), - m_nBitmapObject(0) + m_nBitmapObject(0), + m_nPDFPageIndex(-1) { } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/winproc.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit b834f5fe933c0876ce61d8550a0d6144e098876f Author: Tamás Zolnai AuthorDate: Tue Apr 7 10:31:51 2020 +0200 Commit: Tamás Zolnai CommitDate: Tue Apr 7 11:40:19 2020 +0200 lok: Don't show tooltip for color picker. Change-Id: I0715875cdc194ac7d7a9683d644183d75984a466 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91802 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tamás Zolnai diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index b3ea4f5bf97e..8377691e1527 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -166,7 +166,7 @@ static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMouse // (e.g. Character Properties dialog -> Font Effects -> Font Color) if(pChild->GetType() == WindowType::CONTROL && pChild->GetParent() && pChild->GetParent()->GetParent() && - pChild->GetParent()->GetParent()->GetType() == WindowType::DOCKINGWINDOW) + pChild->GetParent()->GetParent()->GetType() == WindowType::SCROLLWINDOW) return; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/uitest/uiobject.cxx |7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) New commits: commit e4f28d0642e4663d558a55e99ec1cc2ea9ad27ed Author: Mert Tumer AuthorDate: Fri Apr 3 15:34:37 2020 +0300 Commit: Andras Timar CommitDate: Mon Apr 6 21:43:55 2020 +0200 mobile: cannot change linestyle on impress Change-Id: I6e63c951f7a7d4fc70eed424cc2f7da60dbad9b5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91632 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/uitest/uiobject.cxx b/vcl/source/uitest/uiobject.cxx index 899fbb97d75c..af3f486569d8 100644 --- a/vcl/source/uitest/uiobject.cxx +++ b/vcl/source/uitest/uiobject.cxx @@ -21,6 +21,7 @@ #include #include +#include #include #include @@ -936,7 +937,11 @@ ListBoxUIObject::~ListBoxUIObject() void ListBoxUIObject::execute(const OUString& rAction, const StringMap& rParameters) { -if (!mxListBox->IsEnabled() || !mxListBox->IsReallyVisible()) +if (!mxListBox->IsEnabled()) +return; + +bool isTiledRendering = comphelper::LibreOfficeKit::isActive(); +if (!isTiledRendering && !mxListBox->IsReallyVisible()) return; if (rAction == "SELECT") ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/gdi/impgraph.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 8631282f450afad4c112497814a984a75c87884e Author: Tomaž Vajngerl AuthorDate: Fri Mar 27 20:38:06 2020 +0100 Commit: Tomaž Vajngerl CommitDate: Wed Apr 1 08:47:32 2020 +0200 graphic: sPdfDataCache is not used anymore Change-Id: I3fd13784c80dc3308f751594830ee08761e8d8c3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91235 Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl (cherry picked from commit 211dbdb78838e77ae8eea6cadd8050973b2f6080) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91445 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/gdi/impgraph.cxx b/vcl/source/gdi/impgraph.cxx index e885e2a103e5..065bf3db4385 100644 --- a/vcl/source/gdi/impgraph.cxx +++ b/vcl/source/gdi/impgraph.cxx @@ -1706,8 +1706,6 @@ sal_Int32 ImpGraphic::getPageNumber() const return -1; } -static std::map>> sPdfDataCache; - void ReadImpGraphic( SvStream& rIStm, ImpGraphic& rImpGraphic ) { if (rIStm.GetError()) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/gdi/pdfwriter_impl.cxx | 10 +- vcl/source/gdi/pdfwriter_impl.hxx |2 +- 2 files changed, 6 insertions(+), 6 deletions(-) New commits: commit bfe4c908d1a83337d0eeb0c08145908183793975 Author: Jan Holesovsky AuthorDate: Tue Apr 2 23:07:59 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Wed Mar 25 19:41:04 2020 +0100 Embedded PDF: It is a shared_ptr, no need to copy. Reviewed-on: https://gerrit.libreoffice.org/70208 Reviewed-by: Jan Holesovsky Tested-by: Jan Holesovsky (cherry picked from commit ff2c5e766517bbc23409f04335c418bb6fcad6eb) Reviewed-on: https://gerrit.libreoffice.org/77694 Tested-by: Jenkins Reviewed-by: Ashod Nakashian (cherry picked from commit 254fd20dd5cb8206c7eac19f11dec0369c12d366) Change-Id: Iedb31bbe0e81dc9568e84858d8d26eac03c47ffb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91057 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/gdi/pdfwriter_impl.cxx b/vcl/source/gdi/pdfwriter_impl.cxx index 4557100b957e..8aec8544431a 100644 --- a/vcl/source/gdi/pdfwriter_impl.cxx +++ b/vcl/source/gdi/pdfwriter_impl.cxx @@ -4875,12 +4875,12 @@ bool PDFWriterImpl::emitEmbeddedFiles() aLine.append(rEmbeddedFile.m_nObject); aLine.append(" 0 obj\n"); aLine.append("<< /Type /EmbeddedFile /Length "); -aLine.append(static_cast(rEmbeddedFile.m_aData.size())); +aLine.append(static_cast(rEmbeddedFile.m_pData->size())); aLine.append(" >>\nstream\n"); CHECK_RETURN(writeBuffer(aLine.getStr(), aLine.getLength())); aLine.setLength(0); -CHECK_RETURN(writeBuffer(rEmbeddedFile.m_aData.data(), rEmbeddedFile.m_aData.size())); +CHECK_RETURN(writeBuffer(rEmbeddedFile.m_pData->data(), rEmbeddedFile.m_pData->size())); aLine.append("\nendstream\nendobj\n\n"); CHECK_RETURN(writeBuffer(aLine.getStr(), aLine.getLength())); @@ -9688,18 +9688,18 @@ void PDFWriterImpl::createEmbeddedFile(const Graphic& rGraphic, ReferenceXObject sal_uInt32 nLength = rGraphic.getVectorGraphicData()->getVectorGraphicDataArrayLength(); auto const & rArray = rGraphic.getVectorGraphicData()->getVectorGraphicDataArray(); -std::vector aPDFData(rArray.getConstArray(), rArray.getConstArray() + nLength); +auto pPDFData = std::make_shared>(rArray.getConstArray(), rArray.getConstArray() + nLength); if (m_aContext.UseReferenceXObject) { // Store the original PDF data as an embedded file. m_aEmbeddedFiles.emplace_back(); m_aEmbeddedFiles.back().m_nObject = createObject(); -m_aEmbeddedFiles.back().m_aData = aPDFData; +m_aEmbeddedFiles.back().m_pData = pPDFData; rEmit.m_nEmbeddedObject = m_aEmbeddedFiles.back().m_nObject; } else -rEmit.m_aPDFData = aPDFData; +rEmit.m_aPDFData = *pPDFData; rEmit.m_nFormObject = createObject(); rEmit.m_aPixelSize = rGraphic.GetPrefSize(); diff --git a/vcl/source/gdi/pdfwriter_impl.hxx b/vcl/source/gdi/pdfwriter_impl.hxx index 18b0059fb69e..ca3b797d5b6f 100644 --- a/vcl/source/gdi/pdfwriter_impl.hxx +++ b/vcl/source/gdi/pdfwriter_impl.hxx @@ -424,7 +424,7 @@ public: /// ID of the file. sal_Int32 m_nObject; /// Contents of the file. -std::vector m_aData; +std::shared_ptr> m_pData; PDFEmbeddedFile() : m_nObject(0) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/gdi/bitmapex.cxx | 14 +- 1 file changed, 9 insertions(+), 5 deletions(-) New commits: commit c53afa8a577f58e75cdf22683af52553d292dc16 Author: Noel Grandin AuthorDate: Tue Apr 30 10:49:44 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Mon Mar 23 13:12:34 2020 +0100 fix bug in BitmapEx::operator== Just because this image is transparent, does not mean it is equal to the other image. Similarly, just because this image has transparency color, does not mean the other image has valid transparency color. Also move the cheaper mbAlpha check before the more expensive ShallowEquals check. there since commit 8ab086b6cc054501bfbf7ef6fa509c393691e860 Date: Mon Sep 18 16:07:07 2000 + initial import Change-Id: I63033bc8e7fed991513a171e637768e826eafad9 Reviewed-on: https://gerrit.libreoffice.org/71572 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 36f306d8891ef8cba53676e4a2a30434718228e4) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90880 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/gdi/bitmapex.cxx b/vcl/source/gdi/bitmapex.cxx index b89719c70b42..ccf70a6c4dca 100644 --- a/vcl/source/gdi/bitmapex.cxx +++ b/vcl/source/gdi/bitmapex.cxx @@ -187,13 +187,17 @@ bool BitmapEx::operator==( const BitmapEx& rBitmapEx ) const if (GetSizePixel() != rBitmapEx.GetSizePixel()) return false; -if (meTransparent == TransparentType::NONE) -return true; +if (meTransparent != rBitmapEx.meTransparent) +return false; -if (meTransparent == TransparentType::Color) -return maTransparentColor == rBitmapEx.maTransparentColor; +if (meTransparent == TransparentType::Color +&& maTransparentColor != rBitmapEx.maTransparentColor) +return false; + +if (mbAlpha != rBitmapEx.mbAlpha) +return false; -return maMask.ShallowEquals(rBitmapEx.maMask) && mbAlpha == rBitmapEx.mbAlpha; +return maMask.ShallowEquals(rBitmapEx.maMask); } bool BitmapEx::IsEmpty() const ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/ipdf/pdfread.cxx | 17 + 1 file changed, 17 insertions(+) New commits: commit 86b0eacce8f7a0bb08cc418c917d04726fd84cbc Author: Miklos Vajna AuthorDate: Mon Aug 26 10:40:31 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Sat Mar 21 15:50:58 2020 +0100 vcl: fix --disable-pdfium build Which is not covered by Jenkins, but used implicitly by the Android build e.g. Change-Id: Id1ffab54a619fc94bcc3d8bea9eba6301d3d7381 (cherry picked from commit 28bf81694aaeacd260a3b7d8ba2f6be172eb08c3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90842 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index bd406deac93e..80557c1091e2 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -153,6 +153,7 @@ namespace vcl size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& rBitmaps, const size_t nFirstPage, int nPages, const double fResolutionDPI) { +#if HAVE_FEATURE_PDFIUM FPDF_LIBRARY_CONFIG aConfig; aConfig.version = 2; aConfig.m_pUserFontPaths = nullptr; @@ -211,6 +212,15 @@ size_t RenderPDFBitmaps(const void* pBuffer, int nSize, std::vector& rBi FPDF_DestroyLibrary(); return rBitmaps.size(); +#else +(void)pBuffer; +(void)nSize; +(void)rBitmaps; +(void)nFirstPage; +(void)nPages; +(void)fResolutionDPI; +return 0; +#endif // HAVE_FEATURE_PDFIUM } bool ImportPDF(SvStream& rStream, Bitmap& rBitmap, size_t nPageIndex, @@ -275,6 +285,7 @@ size_t ImportPDF(const OUString& rURL, std::vector& rBitmaps, size_t ImportPDFUnloaded(const OUString& rURL, std::vector>& rGraphics, const double fResolutionDPI) { +#if HAVE_FEATURE_PDFIUM std::unique_ptr xStream( ::utl::UcbStreamHelper::CreateStream(rURL, StreamMode::READ | StreamMode::SHARE_DENYNONE)); @@ -342,6 +353,12 @@ size_t ImportPDFUnloaded(const OUString& rURL, std::vectorhttps://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/ipdf/pdfread.cxx | 17 - 1 file changed, 4 insertions(+), 13 deletions(-) New commits: commit 512e58a3962b403df9d995fdb4ca8d3f7c6768eb Author: Miklos Vajna AuthorDate: Tue Apr 9 21:48:03 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Sat Mar 21 15:41:04 2020 +0100 vcl PDF import: clean up CompatibleWriter It's cleaner to avoid member functions and constructors when we inherit from a C struct and we pass it to pdfium's C API. Change-Id: Iac9ab99b3d1b66241bb49d3a7707e242078ab5df Reviewed-on: https://gerrit.libreoffice.org/70472 Tested-by: Jenkins Reviewed-by: Miklos Vajna (cherry picked from commit 3c24774d85a8c0ac03faa4ba2b82c8c9dfe0a2b3) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90832 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/filter/ipdf/pdfread.cxx b/vcl/source/filter/ipdf/pdfread.cxx index 9815e89a1a2b..edd354f19e5b 100644 --- a/vcl/source/filter/ipdf/pdfread.cxx +++ b/vcl/source/filter/ipdf/pdfread.cxx @@ -30,22 +30,10 @@ namespace /// Callback class to be used with FPDF_SaveWithVersion(). struct CompatibleWriter : public FPDF_FILEWRITE { -public: -CompatibleWriter(); -static int WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const void* pData, - unsigned long nSize); - SvMemoryStream m_aStream; }; -CompatibleWriter::CompatibleWriter() -{ -FPDF_FILEWRITE::version = 1; -FPDF_FILEWRITE::WriteBlock = CompatibleWriter::WriteBlockCallback; -} - -int CompatibleWriter::WriteBlockCallback(FPDF_FILEWRITE* pFileWrite, const void* pData, - unsigned long nSize) +int CompatibleWriterCallback(FPDF_FILEWRITE* pFileWrite, const void* pData, unsigned long nSize) { auto pImpl = static_cast(pFileWrite); pImpl->m_aStream.WriteBytes(pData, nSize); @@ -182,6 +170,9 @@ bool getCompatibleStream(SvStream& rInStream, SvStream& rOutStream, sal_uInt64 n return false; CompatibleWriter aWriter; +aWriter.version = 1; +aWriter.WriteBlock = + // 15 means PDF-1.5. if (!FPDF_SaveWithVersion(pPdfDocument, , 0, 15)) return false; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 89549af5fc4c3517c03140d073ef86e1ae7b5744 Author: Ashod Nakashian AuthorDate: Sun Mar 1 15:14:13 2020 -0500 Commit: Ashod Nakashian CommitDate: Sun Mar 15 18:52:35 2020 +0100 vcl: prefer emplace to insert on std::map Change-Id: I513c1bdb63a8a57a40b36c908dfb4387322f2cc3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90300 Tested-by: Jenkins CollaboraOffice Reviewed-by: Ashod Nakashian diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index a0e49fbfcfa0..0a4a79a16d15 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -3202,7 +3202,7 @@ void Window::SetLOKNotifier(const vcl::ILibreOfficeKitNotifier* pNotifier, bool // assign the LOK window id assert(mpWindowImpl->mnLOKWindowId == 0); mpWindowImpl->mnLOKWindowId = sLastLOKWindowId++; -GetLOKWindowsMap().insert(std::map>::value_type(mpWindowImpl->mnLOKWindowId, this)); +GetLOKWindowsMap().emplace(mpWindowImpl->mnLOKWindowId, this); } else mpWindowImpl->mbLOKParentNotifier = true; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/graphicfilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 7235e423751ad81c39c8bc02374a4dfed44469e0 Author: Jan Holesovsky AuthorDate: Thu Mar 12 15:03:01 2020 +0100 Commit: Jan Holesovsky CommitDate: Fri Mar 13 08:08:31 2020 +0100 android: Fix 32bit build. Change-Id: Ife6740860cd7e1844b1ff0166694652538048a44 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90407 Tested-by: Jenkins CollaboraOffice Reviewed-by: Yunusemre Şentürk Reviewed-by: Jan Holesovsky diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index a8c6719f3123..4bb26182a918 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2545,7 +2545,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) aFilterData.realloc(aFilterData.getLength() + 1); aFilterData[aFilterData.getLength() - 1].Name = "Compression"; // We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. -aFilterData[aFilterData.getLength() - 1].Value <<= 1; +aFilterData[aFilterData.getLength() - 1].Value <<= static_cast(1); } #endif nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/graphicfilter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit 07fb148971b6853c2020cea6660fa62d6caacb85 Author: Jan Holesovsky AuthorDate: Tue Mar 10 15:04:43 2020 +0100 Commit: Jan Holesovsky CommitDate: Wed Mar 11 14:59:23 2020 +0100 android: Use the best speed compression as on iOS. Change-Id: Ib2be570a924c6ac6e226f47e6b183975df1fca2d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90258 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 4a8f5a80cfff..a8c6719f3123 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2539,7 +2539,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) else if( !aShortName.isEmpty() ) { // Export -#ifdef IOS +#if defined(IOS) || defined(ANDROID) if (aShortName == PNG_SHORTNAME) { aFilterData.realloc(aFilterData.getLength() + 1); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/outdev/bitmap.cxx | 15 +++ 1 file changed, 3 insertions(+), 12 deletions(-) New commits: commit 0b99af16f0286fce9fb410c904bea32d0e510280 Author: Michael Meeks AuthorDate: Wed Feb 26 03:59:35 2020 + Commit: Michael Meeks CommitDate: Wed Feb 26 09:53:10 2020 +0100 Revert "tdf#130768 need to use mnOutOffX/mnOutOffY" This reverts commit 1c62465ff27a5721fac7f60798e8d674fefdd2aa. Change-Id: I48cc7069e69b98e02b67d460f55e6cba0a3297dc Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89495 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 4aba910cf599..7fe75ec21a14 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1230,10 +1230,7 @@ void OutputDevice::DrawTransformedBitmapEx( if(bAllowPreferDirectPaint && bTryDirectPaint) { -// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may -// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at -// ImplGetDeviceTransformation declaration -const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); +const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx)) { @@ -1280,10 +1277,7 @@ void OutputDevice::DrawTransformedBitmapEx( // to specify order of executions, so give bTryDirectPaint a call if(bTryDirectPaint) { -// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may -// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at -// ImplGetDeviceTransformation declaration -const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); +const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx)) { @@ -1322,10 +1316,7 @@ void OutputDevice::DrawTransformedBitmapEx( const double fOrigArea(rOriginalSizePixel.Width() * rOriginalSizePixel.Height() * 0.5); const double fOrigAreaScaled(fOrigArea * 1.44); double fMaximumArea(std::min(450.0, std::max(100.0, fOrigAreaScaled))); -// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may -// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at -// ImplGetDeviceTransformation declaration -basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); +basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); if(!bMetafile) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/outdev/bitmap.cxx | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) New commits: commit 1c62465ff27a5721fac7f60798e8d674fefdd2aa Author: Armin Le Grand (Collabora) AuthorDate: Sat Feb 22 16:38:50 2020 +0100 Commit: Miklos Vajna CommitDate: Mon Feb 24 14:39:38 2020 +0100 tdf#130768 need to use mnOutOffX/mnOutOffY in OutputDevice local stuff when want to get to pixel coordiantes. These are not often used local members of OutputDevice specially used in fake-Windows as internal windows offset. Thus there is the protected internal replacement ImplGetDeviceTransformation() for the usually used GetViewTransformation(). A very problematic thing - we should in principle add this to GetViewTransformation() but I am sure that this will lead to other problems - argh! Change-Id: Ibedc3a7d6eb3f17c266082729872b81f607836a5 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89259 Tested-by: Jenkins Reviewed-by: Armin Le Grand (cherry picked from commit f1d6788fe1767f97e3ca2c67c7415f8c18c3d618) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89340 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/outdev/bitmap.cxx b/vcl/source/outdev/bitmap.cxx index 7fe75ec21a14..4aba910cf599 100644 --- a/vcl/source/outdev/bitmap.cxx +++ b/vcl/source/outdev/bitmap.cxx @@ -1230,7 +1230,10 @@ void OutputDevice::DrawTransformedBitmapEx( if(bAllowPreferDirectPaint && bTryDirectPaint) { -const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); +// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may +// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at +// ImplGetDeviceTransformation declaration +const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx)) { @@ -1277,7 +1280,10 @@ void OutputDevice::DrawTransformedBitmapEx( // to specify order of executions, so give bTryDirectPaint a call if(bTryDirectPaint) { -const basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); +// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may +// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at +// ImplGetDeviceTransformation declaration +const basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); if(DrawTransformBitmapExDirect(aFullTransform, rBitmapEx)) { @@ -1316,7 +1322,10 @@ void OutputDevice::DrawTransformedBitmapEx( const double fOrigArea(rOriginalSizePixel.Width() * rOriginalSizePixel.Height() * 0.5); const double fOrigAreaScaled(fOrigArea * 1.44); double fMaximumArea(std::min(450.0, std::max(100.0, fOrigAreaScaled))); -basegfx::B2DHomMatrix aFullTransform(GetViewTransformation() * rTransformation); +// tdf#130768 CAUTION(!) using GetViewTransformation() is *not* enough here, it may +// be that mnOutOffX/mnOutOffY is used - see AOO bug 75163, mentioned at +// ImplGetDeviceTransformation declaration +basegfx::B2DHomMatrix aFullTransform(ImplGetDeviceTransformation() * rTransformation); if(!bMetafile) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox2.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 7d722e6d9809959a2f48a456d157882b7f1778d8 Author: Michael Meeks AuthorDate: Sat Feb 15 21:31:19 2020 + Commit: Michael Meeks CommitDate: Tue Feb 18 10:36:18 2020 +0100 jsdialog: don't report hidden toolbox items as present. Change-Id: I965d41b15c437965b605e70b228f4da6ccbeb857 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88766 Tested-by: Michael Meeks Reviewed-by: Michael Meeks (cherry picked from commit cb3f23082e74c291720c8cd56f23e9d752b6fe76) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88796 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 92b54e661b96..ade4c3360df8 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1808,6 +1808,8 @@ boost::property_tree::ptree ToolBox::DumpAsPropertyTree() { boost::property_tree::ptree aEntry; int nId = GetItemId(i); +if (!IsItemVisible(nId)) +continue; aEntry.put("type", "toolitem"); aEntry.put("text", GetItemText(nId)); aEntry.put("command", GetItemCommand(nId)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/cursor.cxx |5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) New commits: commit 9ec3d637c1c99c729da67eafc375efce1cc7f026 Author: Ashod Nakashian AuthorDate: Sun Feb 2 14:37:38 2020 -0500 Commit: Aron Budea CommitDate: Thu Feb 6 10:28:05 2020 +0100 vcl: avoid accessing null member on unloading views Change-Id: If4e416c7257c861b9e13352b3329d9719b159e61 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87830 Reviewed-by: Michael Meeks Tested-by: Aron Budea diff --git a/vcl/source/window/cursor.cxx b/vcl/source/window/cursor.cxx index f4cb6f52e13f..2787b3566c8a 100644 --- a/vcl/source/window/cursor.cxx +++ b/vcl/source/window/cursor.cxx @@ -179,8 +179,9 @@ void vcl::Cursor::ImplDoShow( bool bDrawDirect, bool bRestore ) // show the cursor, if there is an active window and the cursor // has been selected in this window pWindow = Application::GetFocusWindow(); -if ( !pWindow || (pWindow->mpWindowImpl->mpCursor != this) || pWindow->mpWindowImpl->mbInPaint -|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus ) +if (!pWindow || !pWindow->mpWindowImpl || (pWindow->mpWindowImpl->mpCursor != this) +|| pWindow->mpWindowImpl->mbInPaint +|| !pWindow->mpWindowImpl->mpFrameData->mbHasFocus) pWindow = nullptr; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/image/ImplImageTree.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit 60f7e70bfbab194b19b342dc3438614064c3a1c6 Author: Michael Meeks AuthorDate: Mon Jan 20 19:35:42 2020 + Commit: Michael Meeks CommitDate: Mon Jan 20 22:15:45 2020 +0100 vcl: close UNO streams with closeInput. We can end up with lingering XBufferedThreadedStreams from the package ZIP code otherwise. Change-Id: I2a489c975b6f460c38317cb0bb93c2aa7ccc383d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/87099 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/image/ImplImageTree.cxx b/vcl/source/image/ImplImageTree.cxx index 22fd194b3a8d..182cfa0d4abd 100644 --- a/vcl/source/image/ImplImageTree.cxx +++ b/vcl/source/image/ImplImageTree.cxx @@ -145,6 +145,7 @@ std::shared_ptr wrapStream(css::uno::Reference< css::io::XInputS break; } s->Seek(0); +stream->closeInput(); return s; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/jpeg/JpegWriter.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit fdd7c8cadad0a86bdc6349a9c967c99fc247005a Author: Luboš Luňák AuthorDate: Mon Mar 25 16:58:25 2019 +0100 Commit: Miklos Vajna CommitDate: Fri Jan 17 19:02:08 2020 +0100 8bit image is "native" only if it has grey palette (tdf#116888) The image in the bugreport apparently has a different palette even thought it seems to be a grayscale image. (cherry picked from commit f8dbee4d860b95717fa906935a8162c7edcd5973) Change-Id: I3b442b7e2529a60493b64761eb1c537ee9f05a10 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86989 Tested-by: Jenkins CollaboraOffice Reviewed-by: Miklos Vajna diff --git a/vcl/source/filter/jpeg/JpegWriter.cxx b/vcl/source/filter/jpeg/JpegWriter.cxx index 64a8149194f6..870b1e1abbcc 100644 --- a/vcl/source/filter/jpeg/JpegWriter.cxx +++ b/vcl/source/filter/jpeg/JpegWriter.cxx @@ -229,7 +229,7 @@ bool JPEGWriter::Write( const Graphic& rGraphic ) *mpExpWasGrey = mbGreys; if ( mbGreys ) -mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal ); +mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N8BitPal && aGraphicBmp.HasGreyPalette()); else mbNative = ( mpReadAccess->GetScanlineFormat() == ScanlineFormat::N24BitTcRgb ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/paint.cxx |6 +- vcl/source/window/window2.cxx |5 +++-- 2 files changed, 8 insertions(+), 3 deletions(-) New commits: commit ec327cf0c1057de747cadabcb404f67b15ece36f Author: Michael Meeks AuthorDate: Fri Jan 10 12:29:48 2020 + Commit: Michael Meeks CommitDate: Fri Jan 10 15:08:46 2020 +0100 lok: avoid emission storms of un-necessary invalidations. Common when constructing widgets with VclBuilder - which avoids the 'Show' detection Pranav introduced in 8de98e61fbc. This saves ~80% of the ~100k mostly bogus calls I get to: desktop::CallbackFlushHandler::processWindowEvent when opening and closing a few windows. Change-Id: Ie508d6e19274472b85543275aee33f078ddcbbb2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86533 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index 88712e3c72fa..54d0dfc1f58c 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -1215,6 +1215,10 @@ void Window::PixelInvalidate(const tools::Rectangle* pRectangle) if (comphelper::LibreOfficeKit::isDialogPainting() || !comphelper::LibreOfficeKit::isActive()) return; +Size aSize = GetSizePixel(); +if (aSize.getWidth() <= 0 || aSize.getHeight() <= 0) +return; + if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { // In case we are routing the window, notify the client @@ -1223,7 +1227,7 @@ void Window::PixelInvalidate(const tools::Rectangle* pRectangle) aPayload.emplace_back("rectangle", pRectangle->toString()); else { -const tools::Rectangle aRect(Point(0, 0), GetSizePixel()); +const tools::Rectangle aRect(Point(0, 0), aSize); aPayload.emplace_back("rectangle", aRect.toString()); } diff --git a/vcl/source/window/window2.cxx b/vcl/source/window/window2.cxx index dcf5af8a7eed..8092b1a12aba 100644 --- a/vcl/source/window/window2.cxx +++ b/vcl/source/window/window2.cxx @@ -1351,10 +1351,11 @@ void Window::queue_resize(StateChangedType eReason) if (pBorderWindow) pBorderWindow->Resize(); } - if (VclPtr pParent = GetParentWithLOKNotifier()) { -if (!pParent->IsInInitShow()) +Size aSize = GetSizePixel(); +if (aSize.getWidth() > 0 && aSize.getHeight() > 0 && +!pParent->IsInInitShow()) LogicInvalidate(nullptr); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox2.cxx |6 ++ 1 file changed, 6 insertions(+) New commits: commit 0063b202a1973bb967ba47bd350a7cfe90875a15 Author: Michael Meeks AuthorDate: Mon Jan 6 21:56:20 2020 + Commit: Michael Meeks CommitDate: Tue Jan 7 18:56:14 2020 +0100 android: avoid expensive load of un-used sidebar icons on mobile. Change-Id: I34c24c40009eeb4e8edbac785f9367f1dc3d56c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86367 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 1e8efa249a57..92b54e661b96 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -20,6 +20,7 @@ #include #include +#include #include #include @@ -424,7 +425,12 @@ void ToolBox::InsertItem(const OUString& rCommand, const css::uno::Reference sal_uInt16! ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/floatwin.cxx |8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) New commits: commit 25d8db8598ac54fe3ef1d6f40076ff19db87cd2f Author: Ashod Nakashian AuthorDate: Wed Dec 18 10:20:56 2019 -0500 Commit: Ashod Nakashian CommitDate: Wed Dec 18 19:53:43 2019 +0100 sfx2: tolerate missing LOKNotifier on FloatingWindow hide It seems the assumption is that if we get to hide state then we must have initialized properly and set a LOKNotifier. But this seems not to always hold, for whatever reason. Here we are more forgiving if we don't have LOKNotifier. Change-Id: Id21ec83489776f34228dd31f63e711b0dd77af55 Reviewed-on: https://gerrit.libreoffice.org/85401 Reviewed-by: Michael Meeks Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 6c27982ae74f..0ef5125e92c7 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -666,9 +666,11 @@ void FloatingWindow::StateChanged( StateChangedType nType ) } else if (!IsVisible() && nType == StateChangedType::Visible) { -assert(GetLOKNotifier()); -GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "close"); -ReleaseLOKNotifier(); +if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) +{ +pNotifier->notifyWindow(GetLOKWindowId(), "close"); +ReleaseLOKNotifier(); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/floatwin.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit 65685bac09a4320602f4dda5151d247c5a83a75c Author: Ashod Nakashian AuthorDate: Wed Dec 18 07:30:14 2019 -0500 Commit: Ashod Nakashian CommitDate: Wed Dec 18 16:26:15 2019 +0100 vcl: don't use null window in FloatingWindow HitTest Change-Id: I551f31cf30c7a58642becebe0256684055d0703a Reviewed-on: https://gerrit.libreoffice.org/85383 Reviewed-by: Ashod Nakashian Tested-by: Ashod Nakashian diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 9de1efdaf221..6c27982ae74f 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -521,6 +521,8 @@ FloatingWindow* FloatingWindow::ImplFloatHitTest( vcl::Window* pReference, const // use the border window to have the exact position vcl::Window *pBorderWin = pWin->GetWindow( GetWindowType::Border ); +if (!pBorderWin) +break; // the top-left corner in output coordinates ie (0,0) tools::Rectangle devRect( pBorderWin->ImplOutputToUnmirroredAbsoluteScreenPixel( tools::Rectangle( Point(), pBorderWin->GetSizePixel()) ) ) ; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/floatwin.cxx |9 ++--- 1 file changed, 6 insertions(+), 3 deletions(-) New commits: commit 19722a41a2f3f9231702f9508840b6124d290a0a Author: Michael Meeks AuthorDate: Thu Dec 12 01:44:23 2019 + Commit: Ashod Nakashian CommitDate: Thu Dec 12 03:36:31 2019 +0100 lok: vcl: fix multiple floatwin removal case. We need to progress in our while loop to remove children, even if they are currently not in popup-mode; fixes infinite loop with two popups present concurrently. Change-Id: I4926ef8c88152dbf532ccd3fdb8e28ca2d0c62d3 Reviewed-on: https://gerrit.libreoffice.org/85000 Reviewed-by: Ashod Nakashian Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index bef5dfc13069..55784bdb2aa2 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -818,9 +818,6 @@ void FloatingWindow::StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags ) void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPtr& xFocusId ) { -if ( !mbInPopupMode ) -return; - ImplSVData* pSVData = ImplGetSVData(); mbInCleanUp = true; // prevent killing this window due to focus change while working with it @@ -833,6 +830,12 @@ void FloatingWindow::ImplEndPopupMode( FloatWinPopupEndFlags nFlags, const VclPt pSVData->mpWinData->mpFirstFloat = mpNextFloat; mpNextFloat = nullptr; +if ( !mbInPopupMode ) +{ +mbInCleanUp = false; +return; +} + FloatWinPopupFlags nPopupModeFlags = mnPopupModeFlags; mbPopupModeTearOff = nFlags & FloatWinPopupEndFlags::TearOff && nPopupModeFlags & FloatWinPopupFlags::AllowTearOff; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/app/help.cxx | 19 +-- 1 file changed, 13 insertions(+), 6 deletions(-) New commits: commit 435659fd7e401353fc114246813b811190362293 Author: Michael Meeks AuthorDate: Wed Dec 11 23:58:08 2019 + Commit: Michael Meeks CommitDate: Thu Dec 12 01:14:04 2019 +0100 lok: avoid crash cleaning up help-windows with multiple views. Change-Id: Ic57018396de7730d9fa4fb3b4803a221cb9678da Reviewed-on: https://gerrit.libreoffice.org/84999 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/vcl/source/app/help.cxx b/vcl/source/app/help.cxx index b7cf9f4d4b6b..784dc3ea86fb 100644 --- a/vcl/source/app/help.cxx +++ b/vcl/source/app/help.cxx @@ -573,13 +573,20 @@ void ImplDestroyHelpWindow( bool bUpdateHideTime ) void ImplDestroyHelpWindow(ImplSVHelpData& rHelpData, bool bUpdateHideTime) { VclPtr pHelpWin = rHelpData.mpHelpWin; -if ( pHelpWin ) +if( pHelpWin ) { -vcl::Window * pWindow = pHelpWin->GetParent()->ImplGetFrameWindow(); -// find out screen area covered by system help window -tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); -if( pHelpWin->IsVisible() ) -pWindow->Invalidate( aInvRect ); +vcl::Window * pParent = pHelpWin->GetParent(); +if( pParent ) +{ +VclPtr pWindow( pParent->ImplGetFrameWindow() ); +if( pWindow ) +{ +// find out screen area covered by system help window +tools::Rectangle aInvRect( pHelpWin->GetWindowExtentsRelative( pWindow ) ); +if( pHelpWin->IsVisible() ) +pWindow->Invalidate( aInvRect ); +} +} rHelpData.mpHelpWin = nullptr; rHelpData.mbKeyboardHelp = false; pHelpWin->Hide(); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/dialog.cxx | 28 ++-- 1 file changed, 18 insertions(+), 10 deletions(-) New commits: commit b7e4b1a27b55dff4792ccd32b0c6658956dcf27a Author: Henry Castro AuthorDate: Tue Dec 10 20:34:51 2019 -0400 Commit: Henry Castro CommitDate: Wed Dec 11 03:18:24 2019 +0100 lok: dialog: check if exists a LOK Window Notifier When the dialog is about to show, it requires to send to client side the "created" message. However, in the constructor has already assigned a notifier from the parent window. Change-Id: I1120ad1c1c70449048d6739b8564d1c1f6b1c7e3 Reviewed-on: https://gerrit.libreoffice.org/84908 Tested-by: Jenkins CollaboraOffice Reviewed-by: Henry Castro diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index a8e5240ec68c..d3710414385b 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -752,18 +752,26 @@ void Dialog::StateChanged( StateChangedType nType ) { if (nType == StateChangedType::InitShow) { -if (comphelper::LibreOfficeKit::isActive() && !GetLOKNotifier()) +if (comphelper::LibreOfficeKit::isActive()) { -vcl::ILibreOfficeKitNotifier* pViewShell = mpDialogImpl->m_aInstallLOKNotifierHdl.Call(nullptr); -if (pViewShell) +std::vector aItems; +aItems.emplace_back("type", "dialog"); +aItems.emplace_back("size", GetSizePixel().toString()); +if (!GetText().isEmpty()) +aItems.emplace_back("title", GetText().toUtf8()); + +if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { -SetLOKNotifier(pViewShell); -std::vector aItems; -aItems.emplace_back("type", "dialog"); -aItems.emplace_back("size", GetSizePixel().toString()); -if (!GetText().isEmpty()) -aItems.emplace_back("title", GetText().toUtf8()); -pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems); +pNotifier->notifyWindow(GetLOKWindowId(), "created", aItems); +} +else +{ +vcl::ILibreOfficeKitNotifier* pViewShell = mpDialogImpl->m_aInstallLOKNotifierHdl.Call(nullptr); +if (pViewShell) +{ +SetLOKNotifier(pViewShell); +pViewShell->notifyWindow(GetLOKWindowId(), "created", aItems); +} } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/winproc.cxx | 10 ++ 1 file changed, 10 insertions(+) New commits: commit 20db668fe98ed2a90387393dd1a965b80d5fdd9f Author: Tamás Zolnai AuthorDate: Mon Jul 22 17:26:38 2019 +0200 Commit: Andras Timar CommitDate: Mon Dec 9 16:37:15 2019 +0100 lok: don't show tooltip for popup menus inside dialogs Check Character Properties dialog -> Font Effects -> Font Color popup button. Moving the mouse above the colors, a tooltip is shown with the color name. However when the tooltip window is displayed LO online closes the popup window unexpectedly. Change-Id: I4bb8611640e122fc8187271c8c843c9f29fc0ce0 Reviewed-on: https://gerrit.libreoffice.org/84716 Reviewed-by: Andras Timar Tested-by: Andras Timar diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 56ffa108812d..26b0f5d33531 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -160,6 +160,16 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMousePos ) { +if (comphelper::LibreOfficeKit::isActive()) +{ +// Ignore tooltips in popup color pallets +// (e.g. Character Properties dialog -> Font Effects -> Font Color) +if(pChild->GetType() == WindowType::CONTROL && + pChild->GetParent() && pChild->GetParent()->GetParent() && + pChild->GetParent()->GetParent()->GetType() == WindowType::DOCKINGWINDOW) +return; +} + ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maHelpData.mpHelpWin || !( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/floatwin.cxx |6 +- vcl/source/window/winproc.cxx |3 --- 2 files changed, 5 insertions(+), 4 deletions(-) New commits: commit 5700f6173c3a7f30011b44d960b10a983726b3ec Author: Tamás Zolnai AuthorDate: Sat Jul 20 19:17:39 2019 +0200 Commit: Andras Timar CommitDate: Mon Dec 9 16:36:37 2019 +0100 lok: show tooltips on dialogs Change-Id: I40fca6ff13cc41ec9e1ec6bba48dce207e364c79 Reviewed-on: https://gerrit.libreoffice.org/84715 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/window/floatwin.cxx b/vcl/source/window/floatwin.cxx index 77aca029ca29..72dff4985c34 100644 --- a/vcl/source/window/floatwin.cxx +++ b/vcl/source/window/floatwin.cxx @@ -651,7 +651,11 @@ void FloatingWindow::StateChanged( StateChangedType nType ) SetLOKNotifier(pParent->GetLOKNotifier()); aItems.emplace_back("type", "child"); aItems.emplace_back("parentId", OString::number(pParent->GetLOKWindowId())); -aItems.emplace_back("position", mpImplData->maPos.toString()); // pixels +if (mbInPopupMode) +aItems.emplace_back("position", mpImplData->maPos.toString()); // pixels +else // mpImplData->maPos is not set +aItems.emplace_back("position", GetPosPixel().toString()); + } aItems.emplace_back("size", GetSizePixel().toString()); GetLOKNotifier()->notifyWindow(GetLOKWindowId(), "created", aItems); diff --git a/vcl/source/window/winproc.cxx b/vcl/source/window/winproc.cxx index 99fefdeece20..56ffa108812d 100644 --- a/vcl/source/window/winproc.cxx +++ b/vcl/source/window/winproc.cxx @@ -160,9 +160,6 @@ static bool ImplHandleMouseFloatMode( vcl::Window* pChild, const Point& rMousePo static void ImplHandleMouseHelpRequest( vcl::Window* pChild, const Point& rMousePos ) { -if (comphelper::LibreOfficeKit::isActive()) -return; - ImplSVData* pSVData = ImplGetSVData(); if ( !pSVData->maHelpData.mpHelpWin || !( pSVData->maHelpData.mpHelpWin->IsWindowOrChild( pChild ) || ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/listbox.cxx |3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) New commits: commit b77396a256bf8f4cc01bc5f286c06283da2b2daf Author: Noel Grandin AuthorDate: Mon May 13 15:17:58 2019 +0200 Commit: Tomaž Vajngerl CommitDate: Thu Nov 21 17:09:35 2019 +0100 sizing button wrong in ListBox::Resize Passing a right edge co-ordinate to a width param, ever since commit 4849fb6d668f6cf8fa7e6bf33c15db4696355001 Date: Mon May 10 14:47:20 2004 + INTEGRATION: CWS nwf (1.25.36); FILE MERGED Probably only works because the button is on the right edge, and consequently the width will be clamped to the widget area. Change-Id: I28a88cd298bc5beb20162f457c7cc125e1d0303a Reviewed-on: https://gerrit.libreoffice.org/72231 Tested-by: Jenkins Reviewed-by: Noel Grandin (cherry picked from commit 3841143d9abf6b1c2ccf4839e9a1168dbaaf0568) Reviewed-on: https://gerrit.libreoffice.org/83400 Tested-by: Jenkins CollaboraOffice Reviewed-by: Tomaž Vajngerl diff --git a/vcl/source/control/listbox.cxx b/vcl/source/control/listbox.cxx index 1cc98f12a97c..0c780d1199b3 100644 --- a/vcl/source/control/listbox.cxx +++ b/vcl/source/control/listbox.cxx @@ -592,14 +592,13 @@ void ListBox::Resize() if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::ButtonDown, aArea, ControlState::NONE, aControlValue, aBound, aContent) ) { -long nTop = 0; // Convert back from border space to local coordinates aPoint = pBorder->ScreenToOutputPixel( OutputToScreenPixel( aPoint ) ); aContent.Move( -aPoint.X(), -aPoint.Y() ); // Use the themes drop down size for the button aOutSz.setWidth( aContent.Left() ); -mpBtn->setPosSizePixel( aContent.Left(), nTop, aContent.Right(), (nBottom-nTop) ); +mpBtn->setPosSizePixel( aContent.Left(), 0, aContent.GetWidth(), nBottom ); // Adjust the size of the edit field if ( GetNativeControlRegion( ControlType::Listbox, ControlPart::SubEdit, ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/treelist/transfer.cxx | 11 ++- 1 file changed, 10 insertions(+), 1 deletion(-) New commits: commit ec08a6508eb7ac43579d69668685aa9211ce66a4 Author: Tor Lillqvist AuthorDate: Tue Nov 12 14:46:11 2019 +0200 Commit: Tor Lillqvist CommitDate: Wed Nov 13 15:14:53 2019 +0200 tdf#128465: Enable pasting also JPEG images in presentation documents Change-Id: I0f3254ad536c26c975452f800a464f5498e66a78 Reviewed-on: https://gerrit.libreoffice.org/82507 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist Reviewed-on: https://gerrit.libreoffice.org/82587 Tested-by: Jenkins (cherry picked from commit 9c40a13144cdbb31791ee3e2e7340461a2520af2) diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 1f73b377e5a8..824af36710e0 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -1237,7 +1237,7 @@ void TransferableDataHelper::FillDataFlavorExVector( const Sequence< DataFlavor rDataFlavorExVector.push_back( aFlavorEx ); // add additional formats for special mime types -if(SotClipboardFormatId::BMP == aFlavorEx.mnSotId || SotClipboardFormatId::PNG == aFlavorEx.mnSotId) +if(SotClipboardFormatId::BMP == aFlavorEx.mnSotId || SotClipboardFormatId::PNG == aFlavorEx.mnSotId || SotClipboardFormatId::JPEG == aFlavorEx.mnSotId) { if( SotExchange::GetFormatDataFlavor( SotClipboardFormatId::BITMAP, aFlavorEx ) ) { @@ -1509,6 +1509,15 @@ bool TransferableDataHelper::GetBitmapEx( SotClipboardFormatId nFormat, BitmapEx return true; } } + +// then JPEG +if(SotExchange::GetFormatDataFlavor(SotClipboardFormatId::JPEG, aFlavor)) +{ +if(GetBitmapEx(aFlavor, rBmpEx)) +{ +return true; +} +} } DataFlavor aFlavor; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/dialog.cxx | 13 - 1 file changed, 8 insertions(+), 5 deletions(-) New commits: commit 264d0e7cb5385a8c3c2b8ce10b739e107775d8f8 Author: Caolán McNamara AuthorDate: Fri May 10 10:22:27 2019 +0100 Commit: Aron Budea CommitDate: Sun Nov 10 00:20:34 2019 +0100 Resolves: tdf#125198 modeless dialog not appearing in online Change-Id: I01916000ba2300a3905fe606301abd8ddadd3770 Reviewed-on: https://gerrit.libreoffice.org/72113 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara (cherry picked from commit 9a78a4a16ff7b9a9d8f22809c5127f6389ec4805) diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index b5d1b013b97e..a8e5240ec68c 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -883,16 +883,19 @@ bool Dialog::ImplStartExecute() ImplSVData* pSVData = ImplGetSVData(); const bool bKitActive = comphelper::LibreOfficeKit::isActive(); -if (bKitActive && !GetLOKNotifier()) -{ -if (vcl::ILibreOfficeKitNotifier* pViewShell = mpDialogImpl->m_aInstallLOKNotifierHdl.Call(nullptr)) -SetLOKNotifier(pViewShell); -} const bool bModal = GetType() != WindowType::MODELESSDIALOG; if (bModal) { +if (bKitActive && !GetLOKNotifier()) +{ +if (vcl::ILibreOfficeKitNotifier* pViewShell = mpDialogImpl->m_aInstallLOKNotifierHdl.Call(nullptr)) +{ +SetLOKNotifier(pViewShell); +} +} + switch ( Application::GetDialogCancelMode() ) { case Application::DialogCancelMode::Off: ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/outdev/rect.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit fb974bc968b3a1a95f8e621776076522ec719dc6 Author: Michael Meeks AuthorDate: Thu Nov 7 14:11:35 2019 + Commit: Michael Meeks CommitDate: Thu Nov 7 15:54:22 2019 +0100 Drawing calc grid misses pixels on bottom and right; fix. Don't attempt to offset empty rectangles causing serious problems. Change-Id: I6fcac11f5f5e03f7edc0662cf4e06e7f8a109f00 Reviewed-on: https://gerrit.libreoffice.org/82220 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 63a876eb2bdb..45c38c5d23d3 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -224,10 +224,6 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); -// FIXME: seems we have an off-by-one around the border -// here with the cairo / svp backend at least. -aDstRect.AdjustRight(1); -aDstRect.AdjustBottom(1); if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) return; @@ -241,6 +237,11 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D if( mbOutputClipped ) return; +// FIXME: seems we have an off-by-one around the border +// here with the cairo / svp backend at least. +aDstRect.AdjustRight(1); +aDstRect.AdjustBottom(1); + const long nDistX = std::max( rDist.Width(), 1L ); const long nDistY = std::max( rDist.Height(), 1L ); long nX = ( rRect.Left() >= aDstRect.Left() ) ? rRect.Left() : ( rRect.Left() + ( ( aDstRect.Left() - rRect.Left() ) / nDistX ) * nDistX ); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/outdev/rect.cxx |4 1 file changed, 4 insertions(+) New commits: commit 81f8d21ea3ad226e68dcdeac62d3182cd4141ddd Author: Michael Meeks AuthorDate: Thu Sep 19 20:24:00 2019 +0100 Commit: Michael Meeks CommitDate: Wed Nov 6 14:28:44 2019 +0100 Drawing calc grid misses pixels on bottom and right. Change-Id: I2ac7911b35d942b7167a3243d04e1b5710ed367d Reviewed-on: https://gerrit.libreoffice.org/82097 Reviewed-by: Michael Meeks Tested-by: Michael Meeks diff --git a/vcl/source/outdev/rect.cxx b/vcl/source/outdev/rect.cxx index 0770b68db5b6..63a876eb2bdb 100644 --- a/vcl/source/outdev/rect.cxx +++ b/vcl/source/outdev/rect.cxx @@ -224,6 +224,10 @@ void OutputDevice::DrawGrid( const tools::Rectangle& rRect, const Size& rDist, D tools::Rectangle aDstRect( PixelToLogic( Point() ), GetOutputSize() ); aDstRect.Intersection( rRect ); +// FIXME: seems we have an off-by-one around the border +// here with the cairo / svp backend at least. +aDstRect.AdjustRight(1); +aDstRect.AdjustBottom(1); if( aDstRect.IsEmpty() || ImplIsRecordLayout() ) return; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox2.cxx |2 -- 1 file changed, 2 deletions(-) New commits: commit 78cf248d13360e468bcb317cee2cf8239da5f99a Author: Tamás Zolnai AuthorDate: Thu Oct 31 15:12:40 2019 +0100 Commit: Tamás Zolnai CommitDate: Mon Nov 4 18:48:03 2019 +0100 Remove useless bool manipulation. Must be a left over of sal_Bool -> bool conversion. Change-Id: I8b37e513dc1f36b015b29ce3dad4ade2df7807d9 Reviewed-on: https://gerrit.libreoffice.org/81898 Reviewed-by: Tamás Zolnai Tested-by: Tamás Zolnai (cherry picked from commit f875aca60c46f070e72f61836b33c39b62adcda3) Reviewed-on: https://gerrit.libreoffice.org/82029 diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index 9a618a0b07eb..1e8efa249a57 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -1257,8 +1257,6 @@ void ToolBox::EnableItem( sal_uInt16 nItemId, bool bEnable ) if ( nPos != ITEM_NOTFOUND ) { ImplToolItem* pItem = >m_aItems[nPos]; -if ( bEnable ) -bEnable = true; if ( pItem->mbEnabled != bEnable ) { pItem->mbEnabled = bEnable; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/imp_listbox.cxx |2 ++ 1 file changed, 2 insertions(+) New commits: commit e6ae619a59e9447da84f7f5fed77cbaa9f86edae Author: Szymon Kłos AuthorDate: Wed Aug 14 15:18:17 2019 +0200 Commit: Szymon Kłos CommitDate: Mon Nov 4 12:39:57 2019 +0100 Update listbox after scroll To show updated content in the Online after scroll. Change-Id: Ieb58c2a24bfcd76495d7046a0721db789b5c141a Reviewed-on: https://gerrit.libreoffice.org/81967 Tested-by: Jenkins Reviewed-by: Szymon Kłos (cherry picked from commit d13cda5236596386cfd3ddaf90b0c5a1ae4cc60d) Reviewed-on: https://gerrit.libreoffice.org/81990 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/control/imp_listbox.cxx b/vcl/source/control/imp_listbox.cxx index 1d9b246e4d6a..8e2632c518e0 100644 --- a/vcl/source/control/imp_listbox.cxx +++ b/vcl/source/control/imp_listbox.cxx @@ -2292,6 +2292,8 @@ IMPL_LINK( ImplListBox, ScrollBarHdl, ScrollBar*, pSB, void ) SetTopEntry( nPos ); else if( pSB == mpHScrollBar ) SetLeftIndent( nPos ); +if( GetParent() ) +GetParent()->Invalidate( InvalidateFlags::Update ); } void ImplListBox::ImplCheckScrollBars() ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/graphicfilter.cxx |8 1 file changed, 4 insertions(+), 4 deletions(-) New commits: commit 105d98caa70389c12ad4f9a2a2b7474a4be73aa2 Author: Jan Holesovsky AuthorDate: Fri Oct 18 00:40:59 2019 +0200 Commit: Jan Holesovsky CommitDate: Tue Oct 22 14:20:08 2019 +0200 pdfium: Switch the condition for better readibility. Change-Id: I8acf1e98f032f6943b2e7d09ac276f0f1ac4b120 Reviewed-on: https://gerrit.libreoffice.org/81061 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 0aea92f7ad36..4a8f5a80cfff 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2013,12 +2013,12 @@ ErrCode GraphicFilter::ImportGraphic( Graphic& rGraphic, const OUString& rPath, nStatus = ERRCODE_GRFILTER_FILTERERROR; } } -else if (aFilterName == IMP_PDF) +else if (aFilterName.equalsIgnoreAsciiCase(IMP_PDF)) { -if (!vcl::ImportPDF(rIStream, rGraphic)) -nStatus = ERRCODE_GRFILTER_FILTERERROR; -else +if (vcl::ImportPDF(rIStream, rGraphic)) eLinkType = GfxLinkType::NativePdf; +else +nStatus = ERRCODE_GRFILTER_FILTERERROR; } else nStatus = ERRCODE_GRFILTER_FILTERERROR; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/builder.cxx | 25 - 1 file changed, 20 insertions(+), 5 deletions(-) New commits: commit d0cc12b246e9fd2437b3b87c89d8c4a16ef8c512 Author: Jan Holesovsky AuthorDate: Fri Oct 4 11:01:31 2019 +0200 Commit: Jan Holesovsky CommitDate: Mon Oct 7 12:15:04 2019 +0200 lok preload: Some symbols are in-process when we need them. But OTOH in the preload case, the libraries we'd otherwise load are not there. An example was libcuilo.so where the instantiation of the spell checking dialog was failing, because it was impossible to find the makeSentenceEditWindow symbol. Change-Id: Ifc0bc5d8b295912728505fe3ce11fa4a0d198124 Reviewed-on: https://gerrit.libreoffice.org/80230 Tested-by: Jenkins CollaboraOffice Reviewed-by: Jan Holesovsky diff --git a/vcl/source/window/builder.cxx b/vcl/source/window/builder.cxx index 7ef2e2a13c8f..8e4113aee6da 100644 --- a/vcl/source/window/builder.cxx +++ b/vcl/source/window/builder.cxx @@ -59,8 +59,9 @@ #include #include #include +#include -#ifdef DISABLE_DYNLOADING +#if defined(DISABLE_DYNLOADING) || defined(LINUX) #include #endif @@ -2153,7 +2154,8 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & sal_Int32 nDelim = name.indexOf('-'); if (nDelim != -1) { -OUString sFunction(OStringToOUString(OString("make") + name.copy(nDelim+1), RTL_TEXTENCODING_UTF8)); +OString aFunction(OString("make") + name.copy(nDelim+1)); +OUString sFunction(OStringToOUString(aFunction, RTL_TEXTENCODING_UTF8)); customMakeWidget pFunction = nullptr; #ifndef DISABLE_DYNLOADING @@ -2177,9 +2179,22 @@ VclPtr VclBuilder::makeObject(vcl::Window *pParent, const OString & { pModule.reset(new NoAutoUnloadModule); bool ok = pModule->loadRelative(, sModule); -assert(ok && "bad module name in .ui"); -(void) ok; -pFunction = reinterpret_cast(pModule->getFunctionSymbol(sFunction)); +#ifdef LINUX +if (!ok && comphelper::LibreOfficeKit::isActive()) +{ +// in the case of preloading, we don't have eg. the +// libcuilo.so, but still need to dlsym the symbols - +// which are already in-process +pFunction = reinterpret_cast(dlsym(RTLD_DEFAULT, aFunction.getStr())); +assert(pFunction && "couldn't even directly dlsym the sFunction (available via preload)"); +} +else +#endif +{ +assert(ok && "bad module name in .ui"); +(void) ok; +pFunction = reinterpret_cast(pModule->getFunctionSymbol(sFunction)); +} } g_aModuleMap.insert(std::make_pair(sModule, pModule)); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox2.cxx | 15 --- 1 file changed, 15 deletions(-) New commits: commit 8d2f644e04f4d52d71c48ab17e19d7834e16f3c3 Author: Szymon Kłos AuthorDate: Fri Oct 4 14:21:31 2019 +0200 Commit: Andras Timar CommitDate: Mon Oct 7 10:36:04 2019 +0200 Revert "jsdialogs: send images for toolbox items" We use svg icons from online resources - no need for sending this. This reverts commit 657b73d6be7c0efbbe838b3d3b90276bda702d58. Change-Id: Id98a9704ee88857a0231514b741e63a8a7929e1a Reviewed-on: https://gerrit.libreoffice.org/80212 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/window/toolbox2.cxx b/vcl/source/window/toolbox2.cxx index e0a6e93c087b..5e5de5430d22 100644 --- a/vcl/source/window/toolbox2.cxx +++ b/vcl/source/window/toolbox2.cxx @@ -36,9 +36,6 @@ #include #include #include -#include -#include -#include #include @@ -1804,18 +1801,6 @@ boost::property_tree::ptree ToolBox::DumpAsPropertyTree() { boost::property_tree::ptree aEntry; int nId = GetItemId(i); - -Image aImage = GetItemImage(nId); -SvMemoryStream aOStm(65535, 65535); - -if(GraphicConverter::Export(aOStm, aImage.GetBitmapEx(), ConvertDataFormat::PNG) == ERRCODE_NONE) -{ -css::uno::Sequence aSeq( static_cast(aOStm.GetData()), aOStm.Tell()); -OUStringBuffer aBuffer("data:image/png;base64,"); -::comphelper::Base64::encode(aBuffer, aSeq); -aEntry.put("image", aBuffer.makeStringAndClear()); -} - aEntry.put("type", "toolitem"); aEntry.put("text", GetItemText(nId)); aEntry.put("command", GetItemCommand(nId)); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/helper/commandinfoprovider.cxx |3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) New commits: commit 6eb45e25ef821fff45e1074d73384bbf10ccb058 Author: Michael Meeks AuthorDate: Fri Oct 4 14:08:19 2019 +0100 Commit: Michael Meeks CommitDate: Fri Oct 4 14:09:40 2019 +0100 Fix merge issue in ad747625c821; try harder to find icons. Change-Id: I3eaf187d770413bfafde84245a3e7ed186e2cdc4 diff --git a/vcl/source/helper/commandinfoprovider.cxx b/vcl/source/helper/commandinfoprovider.cxx index 80bc04f876a5..e4b4b3d2cc75 100644 --- a/vcl/source/helper/commandinfoprovider.cxx +++ b/vcl/source/helper/commandinfoprovider.cxx @@ -324,7 +324,8 @@ static Reference GetXGraphicForCommand(const OUString& rsComm aGraphicSeq = xDocImgMgr->getImages( nImageType, aImageCmdSeq ); Reference xGraphic = aGraphicSeq[0]; -return xGraphic; +if (xGraphic) +return xGraphic; } } catch (Exception&) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/paint.cxx |3 +++ 1 file changed, 3 insertions(+) New commits: commit 287d46b192d0da14cac30468d33e9486aaa0e4de Author: Henry Castro AuthorDate: Wed Sep 25 07:11:24 2019 -0400 Commit: Andras Timar CommitDate: Sat Sep 28 21:21:28 2019 +0200 tdf#126967:vcl: lok: avoid starting idle paint task In the Tiled rendering case the invalidation is handled by sending logic invalidate notifications to client side. Starting an idle paint task, it provokes an infinity loop that it does not have the chance to process client side messages (mpPollCallback). Change-Id: I6ef1bbd6270592eebfeef0c8a37945bf5ddd3580 Reviewed-on: https://gerrit.libreoffice.org/79537 Tested-by: Jenkins Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit bb11efa477b6700744560d3999190c65d016600b) Reviewed-on: https://gerrit.libreoffice.org/79662 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/paint.cxx b/vcl/source/window/paint.cxx index a94689cc42ad..979adc09dd0a 100644 --- a/vcl/source/window/paint.cxx +++ b/vcl/source/window/paint.cxx @@ -653,6 +653,9 @@ IMPL_LINK_NOARG(Window, ImplHandlePaintHdl, Timer *, void) else if ( mpWindowImpl->mbReallyVisible ) { ImplCallOverlapPaint(); +if (comphelper::LibreOfficeKit::isActive() && +mpWindowImpl->mpFrameData->maPaintIdle.IsActive()) +mpWindowImpl->mpFrameData->maPaintIdle.Stop(); } } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/dialog.cxx | 19 +++ 1 file changed, 11 insertions(+), 8 deletions(-) New commits: commit 4faf8989c52eaa21c3f4a9e7b30e014d9fb01c6d Author: Michael Meeks AuthorDate: Fri Sep 27 22:04:49 2019 +0100 Commit: Michael Meeks CommitDate: Sat Sep 28 09:24:24 2019 +0200 Avoid lambda being destroyed while it is being called. Also armor against mpDialogImpl going down during EndDialog. This can happen during an insert chart wizard cancel, as out of place embedded dialog cleanup occurs. Change-Id: I1b666f07d4ec72e07fdf6888cea44a5a13976073 Reviewed-on: https://gerrit.libreoffice.org/79772 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index 1f912fff6cdb..b5d1b013b97e 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -1179,13 +1179,13 @@ void Dialog::EndDialog( long nResult ) if ( mpDialogImpl->mbStartedModal ) ImplEndExecuteModal(); -if (mpDialogImpl->maEndCtx.isSet()) +if ( mpDialogImpl && mpDialogImpl->maEndCtx.isSet() ) { -mpDialogImpl->maEndCtx.maEndDialogFn(nResult); -mpDialogImpl->maEndCtx.maEndDialogFn = nullptr; +auto fn = std::move(mpDialogImpl->maEndCtx.maEndDialogFn); +fn(nResult); } -if ( mpDialogImpl->mbStartedModal ) +if ( mpDialogImpl && mpDialogImpl->mbStartedModal ) { mpDialogImpl->mbStartedModal = false; mpDialogImpl->mnResult = -1; @@ -1193,10 +1193,13 @@ void Dialog::EndDialog( long nResult ) mbInExecute = false; -// Destroy ourselves (if we have a context with VclPtr owner) -std::shared_ptr xOwnerDialog = std::move(mpDialogImpl->maEndCtx.mxOwnerDialog); -mpDialogImpl->maEndCtx.mxOwner.disposeAndClear(); -xOwnerDialog.reset(); +if ( mpDialogImpl ) +{ +// Destroy ourselves (if we have a context with VclPtr owner) +std::shared_ptr xOwnerDialog = std::move(mpDialogImpl->maEndCtx.mxOwnerDialog); +mpDialogImpl->maEndCtx.mxOwner.disposeAndClear(); +xOwnerDialog.reset(); +} } void Dialog::EndAllDialogs( vcl::Window const * pParent ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/button.cxx |9 + 1 file changed, 5 insertions(+), 4 deletions(-) New commits: commit f5308a09498cde2fc6ab039e17649c5b3ea33e54 Author: Michael Meeks AuthorDate: Fri Sep 27 22:02:06 2019 +0100 Commit: Michael Meeks CommitDate: Sat Sep 28 09:24:41 2019 +0200 Hold reference on parent dialog while emitting EndDialog. Also cleanup the code. Change-Id: I5f9d562319dc244ee22feb2e3fd64023bc229c4e Reviewed-on: https://gerrit.libreoffice.org/79771 Tested-by: Jenkins CollaboraOffice Reviewed-by: Michael Meeks diff --git a/vcl/source/control/button.cxx b/vcl/source/control/button.cxx index 4fcd195ae535..c90a280639f6 100644 --- a/vcl/source/control/button.cxx +++ b/vcl/source/control/button.cxx @@ -1737,13 +1737,14 @@ void OKButton::Click() { if ( pParent->IsDialog() ) { -if ( static_cast(pParent)->IsInExecute() ) -static_cast(pParent)->EndDialog( RET_OK ); +VclPtr xParent( static_cast(pParent) ); +if ( xParent->IsInExecute() ) +xParent->EndDialog( RET_OK ); // prevent recursive calls -else if ( !static_cast(pParent)->IsInClose() ) +else if ( !xParent->IsInClose() ) { if ( pParent->GetStyle() & WB_CLOSEABLE ) -static_cast(pParent)->Close(); +xParent->Close(); } } else ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/toolbox.cxx | 47 -- 1 file changed, 19 insertions(+), 28 deletions(-) New commits: commit a61fb06583ea67c97eea7a1ea6d3db68c83d338c Author: Michael Meeks AuthorDate: Fri Nov 23 02:14:00 2018 + Commit: Andras Timar CommitDate: Mon Sep 23 14:32:08 2019 +0200 Anti-alias toolbar button drop-downs. Change-Id: Id4eed12f3d4a32b71d00b99e6e82ca7cefb3f8ec (cherry picked from commit 121a30224bbbe85b559b0e4559c14e145101511f) diff --git a/vcl/source/window/toolbox.cxx b/vcl/source/window/toolbox.cxx index fffe1042ad19..78a235deb57b 100644 --- a/vcl/source/window/toolbox.cxx +++ b/vcl/source/window/toolbox.cxx @@ -2491,36 +2491,27 @@ static void ImplDrawDropdownArrow(vcl::RenderContext& rRenderContext, const tool float fScaleFactor = rRenderContext.GetDPIScaleFactor(); -if( !bRotate ) -{ -long width = 5 * fScaleFactor; -long height = 3 * fScaleFactor; +tools::Polygon aPoly(4); -long x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2; -long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; -while( width >= 1) -{ -rRenderContext.DrawRect( tools::Rectangle( x, y, x+width-1, y ) ); -y++; -x++; -width -= 2; -} -} -else -{ -long width = 3 * fScaleFactor; -long height = 5 * fScaleFactor; +long width = 7 * fScaleFactor; +long height = 4 * fScaleFactor; -long x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2; -long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; -while( height >= 1) -{ -rRenderContext.DrawRect( tools::Rectangle( x, y, x, y+height-1 ) ); -y++; -x++; -height -= 2; -} -} +long x = rDropDownRect.Left() + (rDropDownRect.getWidth() - width)/2; +long y = rDropDownRect.Top() + (rDropDownRect.getHeight() - height)/2; + +long halfwidth = (width+1)>>1; +aPoly.SetPoint(Point(x, y), 0); +aPoly.SetPoint(Point(x + halfwidth, y + height), 1); +aPoly.SetPoint(Point(x + halfwidth*2, y), 2); +aPoly.SetPoint(Point(x, y), 3); + +if (bRotate) // TESTME: harder ... +aPoly.Rotate(Point(x,y+height/2),-900); + +auto aaflags = rRenderContext.GetAntialiasing(); +rRenderContext.SetAntialiasing(AntialiasingFlags::EnableB2dDraw); +rRenderContext.DrawPolygon( aPoly ); +rRenderContext.SetAntialiasing(aaflags); if( bFillColor ) rRenderContext.SetFillColor(aOldFillColor); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/graphicfilter.cxx | 30 ++ 1 file changed, 14 insertions(+), 16 deletions(-) New commits: commit 5f309214aa83fd7a68fac664586123171a71f78f Author: Tor Lillqvist AuthorDate: Tue Jun 4 14:20:45 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Sep 20 14:35:56 2019 +0200 Fix "external" graphic filter code for the DISABLE_DYNLOADING case The DISABLE_DYNLOADING case in ImpFilterLibCacheEntry::GetImportFunction() had apparently been broken from the start, but nobody never noticed as the common formats (PNG, JPEG, GIF etc) use a more "internal" code path. The problem was noticed now with a TIFF image in a presentation. The fix for the import case seems to work, but I could not test the fix for the export case. Change-Id: Icbd33c7cb654136a562f18b06d5b0896e701bf3d Reviewed-on: https://gerrit.libreoffice.org/79239 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 5da009d46bcf..0aea92f7ad36 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -973,27 +973,27 @@ PFilterCall ImpFilterLibCacheEntry::GetImportFunction() else if (maFormatName == "iti") mpfnImport = reinterpret_cast(maLibrary.getFunctionSymbol("itiGraphicImport")); #else -if (maFiltername == "icd") +if (maFormatName == "icd") mpfnImport = icdGraphicImport; -else if (maFiltername == "idx") +else if (maFormatName == "idx") mpfnImport = idxGraphicImport; -else if (maFiltername == "ime") +else if (maFormatName == "ime") mpfnImport = imeGraphicImport; -else if (maFiltername == "ipb") +else if (maFormatName == "ipb") mpfnImport = ipbGraphicImport; -else if (maFiltername == "ipd") +else if (maFormatName == "ipd") mpfnImport = ipdGraphicImport; -else if (maFiltername == "ips") +else if (maFormatName == "ips") mpfnImport = ipsGraphicImport; -else if (maFiltername == "ipt") +else if (maFormatName == "ipt") mpfnImport = iptGraphicImport; -else if (maFiltername == "ipx") +else if (maFormatName == "ipx") mpfnImport = ipxGraphicImport; -else if (maFiltername == "ira") +else if (maFormatName == "ira") mpfnImport = iraGraphicImport; -else if (maFiltername == "itg") +else if (maFormatName == "itg") mpfnImport = itgGraphicImport; -else if (maFiltername == "iti") +else if (maFormatName == "iti") mpfnImport = itiGraphicImport; #endif } @@ -2174,9 +2174,7 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r FilterConfigItem aConfigItem( pFilterData ); OUString aFilterName( pConfig->GetExportFilterName( nFormat ) ); -#ifndef DISABLE_DYNLOADING OUString aExternalFilterName(pConfig->GetExternalFilterName(nFormat, true)); -#endif ErrCode nStatus = ERRCODE_NONE; GraphicType eType; Graphic aGraphic( rGraphic ); @@ -2470,11 +2468,11 @@ ErrCode GraphicFilter::ExportGraphic( const Graphic& rGraphic, const OUString& r #else --nIdx; // Just one iteration PFilterCall pFunc = NULL; -if (aFilterName == "egi") +if (aExternalFilterName == "egi") pFunc = egiGraphicExport; -else if (aFilterName == "eps") +else if (aExternalFilterName == "eps") pFunc = epsGraphicExport; -else if (aFilterName == "eti") +else if (aExternalFilterName == "eti") pFunc = etiGraphicExport; #endif if( pFunc ) ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/treelist/transfer.cxx | 18 +- 1 file changed, 17 insertions(+), 1 deletion(-) New commits: commit 652bc0c107af6a41ca31c3d2adf1cc8137a94aa5 Author: Tor Lillqvist AuthorDate: Tue May 28 21:51:53 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Sep 20 14:12:04 2019 +0200 tdf#124752: Use best speed for PNG encoding on iOS Still awfully slow for "realistic" images as taken by modern digital cameras, though. It would be much better to not encode the PNG to put on the clipboard from the internal bitmap representation, but use the ooriginal PNG or JPEG data. Change-Id: Ib72a573bd31d4ae7380dacccb4287e19afabb0d4 Reviewed-on: https://gerrit.libreoffice.org/79230 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/vcl/source/treelist/transfer.cxx b/vcl/source/treelist/transfer.cxx index 82ffa7dbde1b..1f73b377e5a8 100644 --- a/vcl/source/treelist/transfer.cxx +++ b/vcl/source/treelist/transfer.cxx @@ -670,7 +670,23 @@ bool TransferableHelper::SetBitmapEx( const BitmapEx& rBitmapEx, const DataFlavo if(rFlavor.MimeType.equalsIgnoreAsciiCase("image/png")) { // write a PNG -vcl::PNGWriter aPNGWriter(rBitmapEx); +css::uno::Sequence aFilterData; + +#ifdef IOS +// Use faster compression on slow devices +aFilterData.realloc(aFilterData.getLength() + 1); +aFilterData[aFilterData.getLength() - 1].Name = "Compression"; + +// We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. For a +// typical 15 megapixel image from a DSLR, we are talking about a difference of 17 s for +// the default compression level vs 4 s for best speed, on an iPad Pro from 2017. +// +// Sure, the best would be to not have to re-encode the image at all, but have access to +// the original JPEG or PNG when there is a such. + +aFilterData[aFilterData.getLength() - 1].Value <<= 1; +#endif +vcl::PNGWriter aPNGWriter(rBitmapEx, ); aPNGWriter.Write(aMemStm); } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window.cxx |4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) New commits: commit 0b1cb77806227a9d998f857dbe404a3de9f1bbde Author: Tor Lillqvist AuthorDate: Tue May 21 01:26:53 2019 +0300 Commit: Tor Lillqvist CommitDate: Fri Sep 20 13:59:34 2019 +0200 tdf#125397: Avoid crash if GetpApp() returns null, can happen on iOS at least Change-Id: Ib0dfb00c6a00640fe35769f21f167bf3eae8769b (cherry picked from commit 30b8d352bdfd2128769f3ae1e8a3616118d3e754) Reviewed-on: https://gerrit.libreoffice.org/79214 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index 5f66921a23aa..b75793329981 100644 --- a/vcl/source/window/window.cxx +++ b/vcl/source/window/window.cxx @@ -2314,7 +2314,9 @@ void Window::Show(bool bVisible, ShowFlags nFlags) if ( !pSVData->mpIntroWindow ) { // The right way would be just to call this (not even in the 'if') -GetpApp()->InitFinished(); +auto pApp = GetpApp(); +if ( pApp ) +pApp->InitFinished(); } else if ( !ImplIsWindowOrChild( pSVData->mpIntroWindow ) ) { ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/app/IconThemeSelector.cxx |5 + 1 file changed, 5 insertions(+) New commits: commit 638ccbc07d2dea12bdc4df528df4b6d8e12ddd2c Author: Tor Lillqvist AuthorDate: Fri Mar 29 16:32:01 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Sep 20 13:04:05 2019 +0200 Use the colibre icon theme in Online and apps Change-Id: Idb79b3d4b1f14712f2e03d17fca6bec56f317edf Reviewed-on: https://gerrit.libreoffice.org/79193 Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist diff --git a/vcl/source/app/IconThemeSelector.cxx b/vcl/source/app/IconThemeSelector.cxx index d0454c37fb34..92998724c34f 100644 --- a/vcl/source/app/IconThemeSelector.cxx +++ b/vcl/source/app/IconThemeSelector.cxx @@ -7,6 +7,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +#include + #include #include @@ -51,6 +53,9 @@ IconThemeSelector::IconThemeSelector() /*static*/ OUString IconThemeSelector::GetIconThemeForDesktopEnvironment(const OUString& desktopEnvironment) { +if (comphelper::LibreOfficeKit::isActive()) +return OUString("colibre"); + #ifdef _WIN32 (void)desktopEnvironment; return OUString("colibre"); ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/filter/graphicfilter.cxx | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) New commits: commit 3d7419d01f963bb3ab5633968905a8e2a2e6f2bf Author: Tor Lillqvist AuthorDate: Wed Feb 27 14:28:55 2019 +0200 Commit: Tor Lillqvist CommitDate: Fri Sep 20 11:47:31 2019 +0200 tdf#122537: Use "best speed" instead of default compression level on iOS Speed is more important than size in the use case where this showed up in a profile of the iOS app (inserting an image). This change causes zlib's deflate_fast() being used instead of its deflate_slow(). For a specific image I tested with the former takes 1.5 s, the latter 3.4 s. This is just one aspect of the slowness of image insertio. The resizing operations mentioned in the bug report is not yet investigated. Change-Id: Icf023522b965cb0265000c821a478610d098cd0a Reviewed-on: https://gerrit.libreoffice.org/68434 Reviewed-by: Tomaž Vajngerl Reviewed-by: Tor Lillqvist Tested-by: Tor Lillqvist (cherry picked from commit 68c8b98dfb9f3463bdc8f1233fd578e236e4d570) Reviewed-on: https://gerrit.libreoffice.org/79173 diff --git a/vcl/source/filter/graphicfilter.cxx b/vcl/source/filter/graphicfilter.cxx index 0fb9b2992899..5da009d46bcf 100644 --- a/vcl/source/filter/graphicfilter.cxx +++ b/vcl/source/filter/graphicfilter.cxx @@ -2513,6 +2513,7 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) sal_uInt16 nFormat = GRFILTER_FORMAT_DONTKNOW; OString aShortName; +css::uno::Sequence< css::beans::PropertyValue > aFilterData; switch( rData.mnFormat ) { case ConvertDataFormat::BMP: aShortName = BMP_SHORTNAME; break; @@ -2540,8 +2541,17 @@ IMPL_LINK( GraphicFilter, FilterCallback, ConvertData&, rData, bool ) else if( !aShortName.isEmpty() ) { // Export +#ifdef IOS +if (aShortName == PNG_SHORTNAME) +{ +aFilterData.realloc(aFilterData.getLength() + 1); +aFilterData[aFilterData.getLength() - 1].Name = "Compression"; +// We "know" that this gets passed to zlib's deflateInit2_(). 1 means best speed. +aFilterData[aFilterData.getLength() - 1].Value <<= 1; +} +#endif nFormat = GetExportFormatNumberForShortName( OStringToOUString(aShortName, RTL_TEXTENCODING_UTF8) ); -bRet = ExportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat ) == ERRCODE_NONE; +bRet = ExportGraphic( rData.maGraphic, OUString(), rData.mrStm, nFormat, ) == ERRCODE_NONE; } return bRet; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/control/field.cxx | 25 + 1 file changed, 1 insertion(+), 24 deletions(-) New commits: commit 121474509f920d404a8940f87660adcf2190da70 Author: Aron Budea AuthorDate: Mon Sep 16 12:39:59 2019 +0200 Commit: Aron Budea CommitDate: Mon Sep 16 13:31:09 2019 +0200 Revert "vcl: better decimal handling in NumericFormatter" This reverts commit e9a48869fe1f1e90c03d299ae419ea5b1f43de50. Change-Id: I81269296ab3ca3f071707cf22c4b59964baed863 Reviewed-on: https://gerrit.libreoffice.org/78980 Tested-by: Jenkins CollaboraOffice Reviewed-by: Aron Budea diff --git a/vcl/source/control/field.cxx b/vcl/source/control/field.cxx index bbbdbceb86e4..59220ac21258 100644 --- a/vcl/source/control/field.cxx +++ b/vcl/source/control/field.cxx @@ -131,29 +131,6 @@ bool ImplNumericGetValue( const OUString& rStr, sal_Int64& rValue, aStr1.appendCopy(aStr, 0, nDecPos); aStr2.appendCopy(aStr, nDecPos+1); } -else if (nDecDigits > 0 && aStr.getLength() > nDecDigits) -{ -// We expect a decimal point and a certain number of decimal digits, -// but seems the user has deleted the decimal point, so we restore it. -// Otherwise, they end up with unexpectedly (to them) large numbers. - -// Find the first digit from the right. -sal_Int32 nVirtualDecPos = aStr.getLength(); -while (--nVirtualDecPos > 0) -{ -if ((aStr[nVirtualDecPos] >= '0') && (aStr[nVirtualDecPos] <= '9')) -break; -} - -if (nVirtualDecPos >= nDecDigits) -{ -nVirtualDecPos -= nDecDigits - 1; // nVirtualDecPos is already on a digit (so discount it). -aStr1.append(aStr.getStr(), nVirtualDecPos); -aStr2.append(aStr.getStr() + nVirtualDecPos); -} -else -aStr1 = aStr; -} else aStr1 = aStr; @@ -493,7 +470,7 @@ void NumericFormatter::ImplInit() mnFieldValue= 0; mnLastValue = 0; mnMin = 0; -mnMax = 1; // A user-friendly round number. +mnMax = SAL_MAX_INT32; // a "large" value substantially smaller than SAL_MAX_INT64, to avoid // overflow in computations using this "dummy" value mnDecimalDigits = 2; ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/dialog.cxx | 19 +-- 1 file changed, 17 insertions(+), 2 deletions(-) New commits: commit 19329f086f09f1dc4db589f12d73a4daae728269 Author: Ashod Nakashian AuthorDate: Wed May 8 08:15:52 2019 -0400 Commit: Andras Timar CommitDate: Tue Sep 3 13:41:48 2019 +0200 vcl: LOK: emit size_changed after window creation This guarantees that the correct size of the window is set on the client side. Some windows are created with default (and invalid) size and rely on Resize to be called right after. This doesn't happen with message boxes and they need to get size_changed right after the window is fully created and ready. (cherry picked from commit abd504c70b7b36b20082677a1b1eef6ff937a6f7) Change-Id: I8c281a31770de4b37b9de6d333159e5379344dff Reviewed-on: https://gerrit.libreoffice.org/77508 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar diff --git a/vcl/source/window/dialog.cxx b/vcl/source/window/dialog.cxx index afc975412186..314d135d973b 100644 --- a/vcl/source/window/dialog.cxx +++ b/vcl/source/window/dialog.cxx @@ -894,7 +894,7 @@ bool Dialog::ImplStartExecute() if (bKitActive) { -if(const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) +if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) { std::vector aItems; aItems.emplace_back("type", "dialog"); @@ -954,7 +954,8 @@ bool Dialog::ImplStartExecute() if (bModal) pSVData->maAppData.mnModalMode++; -css::uno::Reference xEventBroadcaster(css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); +css::uno::Reference xEventBroadcaster( +css::frame::theGlobalEventBroadcaster::get(xContext), css::uno::UNO_QUERY_THROW); css::document::DocumentEvent aObject; aObject.EventName = "DialogExecute"; xEventBroadcaster->documentEventOccured(aObject); @@ -963,6 +964,20 @@ bool Dialog::ImplStartExecute() else UITestLogger::getInstance().log("ModelessDialogExecuted Id:" + get_id()); +if (comphelper::LibreOfficeKit::isActive()) +{ +if (const vcl::ILibreOfficeKitNotifier* pNotifier = GetLOKNotifier()) +{ +// Dialog boxes don't get the Resize call and they +// can have invalid size at 'created' message above. +// If there is no difference, the client should detect it and ignore us, +// otherwise, this should make sure that the window has the correct size. +std::vector aItems; +aItems.emplace_back("size", GetSizePixel().toString()); +pNotifier->notifyWindow(GetLOKWindowId(), "size_changed", aItems); +} +} + return true; } ___ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.2' - vcl/source
vcl/source/app/salvtables.cxx |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) New commits: commit cf788fcf0789881b59f59fe19dbeea5491a7b2dd Author: Caolán McNamara AuthorDate: Fri Aug 16 08:54:45 2019 +0100 Commit: Andras Timar CommitDate: Thu Aug 29 09:20:32 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í Reviewed-on: https://gerrit.libreoffice.org/77920 Tested-by: Jenkins CollaboraOffice Reviewed-by: Andras Timar 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 'distro/collabora/cp-6.2' - vcl/source
vcl/source/window/window.cxx |1 + 1 file changed, 1 insertion(+) New commits: commit a730ce1c5043c65fb61b34d4e9ffb9c7c9ad5b86 Author: Miklos Vajna AuthorDate: Mon Aug 12 17:57:25 2019 +0200 Commit: Miklos Vajna CommitDate: Tue Aug 27 11:44:24 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í Reviewed-on: https://gerrit.libreoffice.org/77915 Tested-by: Jenkins CollaboraOffice diff --git a/vcl/source/window/window.cxx b/vcl/source/window/window.cxx index d86f2fe51d7b..5f66921a23aa 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