[Libreoffice-commits] core.git: Branch 'feature/tiled-editing' - 2 commits - libreofficekit/qa svx/source
Miklos Vajna
vmiklos at collabora.co.uk
Wed Mar 25 08:07:50 PDT 2015
libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx | 2 +-
svx/source/svdraw/svdmrkv.cxx | 7 +++++--
2 files changed, 6 insertions(+), 3 deletions(-)
New commits:
commit cbeaaba58814d56e515a76c74d3a5fe7a8a52506
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Mar 25 16:01:57 2015 +0100
SdrMarkView tiled rendering: fix unexpected empty graphic selection events
There are a number of mark views, but we're only interested in the one
that belongs to the editing window. Ignore the virtual device of the
slide sorter and everything else.
With this, a shape remains selected after resized, and can be resized
multiple times again properly.
Change-Id: I7f31c72567b9d01aaa75871ff5d1efdb3151a0e4
diff --git a/svx/source/svdraw/svdmrkv.cxx b/svx/source/svdraw/svdmrkv.cxx
index 9376df5..fa03ab0 100644
--- a/svx/source/svdraw/svdmrkv.cxx
+++ b/svx/source/svdraw/svdmrkv.cxx
@@ -669,6 +669,9 @@ void SdrMarkView::SetMarkHandles()
// correct position )
Point aGridOff = GetGridOffset();
+ // There can be multiple mark views, but we're only interested in the one that has a window associated.
+ const bool bTiledRendering = GetModel()->isTiledRendering() && GetFirstOutputDevice() && GetFirstOutputDevice()->GetOutDevType() == OUTDEV_WINDOW;
+
// check if text edit or ole is active and handles need to be suppressed. This may be the case
// when a single object is selected
// Using a strict return statement is okay here; no handles means *no* handles.
@@ -686,7 +689,7 @@ void SdrMarkView::SetMarkHandles()
if(pSdrTextObj && pSdrTextObj->IsInEditMode())
{
- if (GetModel()->isTiledRendering())
+ if (bTiledRendering)
// Suppress handles -> empty graphic selection.
GetModel()->libreOfficeKitCallback(LOK_CALLBACK_GRAPHIC_SELECTION, "EMPTY");
return;
@@ -704,7 +707,7 @@ void SdrMarkView::SetMarkHandles()
Rectangle aRect(GetMarkedObjRect());
- if (GetModel()->isTiledRendering())
+ if (bTiledRendering)
{
Rectangle aSelection(aRect);
OString sSelection;
commit cc49a032a0543769b9a4cfe151c9f6d632cc3c16
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Wed Mar 25 15:26:37 2015 +0100
lokdocview: larger default window size
Change-Id: I1526ab6969effa043cb7d429961aa7611e1fdd06
diff --git a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
index 94433f1..194ee41 100644
--- a/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
+++ b/libreofficekit/qa/gtktiledviewer/gtktiledviewer.cxx
@@ -266,7 +266,7 @@ int main( int argc, char* argv[] )
GtkWidget *pWindow = gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_window_set_title( GTK_WINDOW(pWindow), "LibreOfficeKit GTK Tiled Viewer" );
- gtk_window_set_default_size(GTK_WINDOW(pWindow), 800, 600);
+ gtk_window_set_default_size(GTK_WINDOW(pWindow), 1024, 768);
g_signal_connect( pWindow, "destroy", G_CALLBACK(gtk_main_quit), NULL );
pVBox = gtk_vbox_new( FALSE, 0 );
More information about the Libreoffice-commits
mailing list