[Libreoffice-commits] core.git: Branch 'distro/collabora/co-2021' - 2 commits - sal/osl vcl/source
Tor Lillqvist (via logerrit)
logerrit at kemper.freedesktop.org
Mon Apr 5 15:16:09 UTC 2021
sal/osl/unx/backtrace.c | 69 -------------------------------------------
vcl/source/window/seleng.cxx | 15 +++++++--
2 files changed, 13 insertions(+), 71 deletions(-)
New commits:
commit 02be3465334a733c7e52b352d021d810f52311c9
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Thu Mar 4 11:56:50 2021 +0200
Commit: Tor Lillqvist <tml at iki.fi>
CommitDate: Mon Apr 5 18:03:31 2021 +0300
The backtrace() etc API is available on macOS and iOS, too
Change-Id: I9a62391c4d109cd2fd2ab60d92a9e3b631ee6773
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112157
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-by: Tor Lillqvist <tml at collabora.com>
diff --git a/sal/osl/unx/backtrace.c b/sal/osl/unx/backtrace.c
index a3aeb3dae3f8..26005f7715af 100644
--- a/sal/osl/unx/backtrace.c
+++ b/sal/osl/unx/backtrace.c
@@ -212,74 +212,7 @@ void backtrace_symbols_fd( void **buffer, int size, int fd )
}
}
-#elif defined( MACOSX )
-
-#include <dlfcn.h>
-#include <stdio.h>
-#include "backtrace.h"
-
-/* glib backtrace is only available on MacOsX 10.5 or higher
- so we do it on our own */
-
-int backtrace( void **buffer, int max_frames )
-{
- void **frame = (void **)__builtin_frame_address(0);
- void **bp = ( void **)(*frame);
- void *ip = frame[1];
- int i;
-
- for ( i = 0; bp && ip && i < max_frames; i++ )
- {
- *(buffer++) = ip;
-
- ip = bp[1];
- bp = (void**)(bp[0]);
- }
-
- return i;
-}
-
-char ** backtrace_symbols(void * const * buffer, int size)
-{
- (void)buffer; (void)size;
- return NULL; /*TODO*/
-}
-
-void backtrace_symbols_fd( void **buffer, int size, int fd )
-{
- FILE *fp = fdopen( fd, "w" );
-
- if ( fp )
- {
- void **pFramePtr;
-
- for ( pFramePtr = buffer; size > 0 && pFramePtr && *pFramePtr; pFramePtr++, size-- )
- {
- Dl_info dli;
-
- if ( 0 != dladdr( *pFramePtr, &dli ) )
- {
- ptrdiff_t offset;
-
- if ( dli.dli_fname && dli.dli_fbase )
- {
- offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_fbase;
- fprintf( fp, "%s+0x%tx", dli.dli_fname, offset );
- }
- if ( dli.dli_sname && dli.dli_saddr )
- {
- offset = (ptrdiff_t)*pFramePtr - (ptrdiff_t)dli.dli_saddr;
- fprintf( fp, "(%s+0x%tx)", dli.dli_sname, offset );
- }
- }
- fprintf( fp, "[%p]\n", *pFramePtr );
- }
-
- fclose( fp );
- }
-}
-
-#elif !defined LINUX
+#elif !defined LINUX && !defined MACOSX && !defined IOS
int backtrace( void **buffer, int max_frames )
{
commit 34897c831c6451ef2cc3811c98b9d3a79ff4af40
Author: Tor Lillqvist <tml at collabora.com>
AuthorDate: Wed Mar 10 13:06:54 2021 +0200
Commit: Tor Lillqvist <tml at iki.fi>
CommitDate: Mon Apr 5 18:02:46 2021 +0300
Don't unselect an existing selection on (long) press on iOS and Android
A (long) press, also known as a long tap, in Collabora Online (as used
to bring up a context menu), shows up in core as a click of the right
mouse button. We don't want that to cause an existing selection to be
unselected.
This fixes https://github.com/CollaboraOnline/online/issues/1323
Why this problem happened only in presentation documents I have no
idea.
Change-Id: Iebbf71e75dcea7c39a92fd8d5dd07c368d92f163
Signed-off-by: Tor Lillqvist <tml at collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112261
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice at gmail.com>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/112264
diff --git a/vcl/source/window/seleng.cxx b/vcl/source/window/seleng.cxx
index 78f071126ae5..4e311785090c 100644
--- a/vcl/source/window/seleng.cxx
+++ b/vcl/source/window/seleng.cxx
@@ -256,6 +256,12 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
if (!rMEvt.IsRight())
ReleaseMouse();
+#if defined IOS || defined ANDROID
+ const bool bDoMessWithSelection = !rMEvt.IsRight();
+#else
+ constexpr bool bDoMessWithSelection = true;
+#endif
+
if( (nFlags & SelectionEngineFlags::WAIT_UPEVT) && !(nFlags & SelectionEngineFlags::CMDEVT) &&
eSelMode != SelectionMode::Single)
{
@@ -271,13 +277,16 @@ bool SelectionEngine::SelMouseButtonUp( const MouseEvent& rMEvt )
}
pFunctionSet->DeselectAtPoint( aLastMove.GetPosPixel() );
nFlags &= ~SelectionEngineFlags::HAS_ANCH; // uncheck anchor
- pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), true );
+ if (bDoMessWithSelection)
+ pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel(), true );
}
else
{
- pFunctionSet->DeselectAll();
+ if (bDoMessWithSelection)
+ pFunctionSet->DeselectAll();
nFlags &= ~SelectionEngineFlags::HAS_ANCH; // uncheck anchor
- pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel() );
+ if (bDoMessWithSelection)
+ pFunctionSet->SetCursorAtPoint( aLastMove.GetPosPixel() );
}
}
More information about the Libreoffice-commits
mailing list