2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-27 16:10:40 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "fusel.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <basic/sbstar.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
#include <svx/svdogrp.hxx>
|
|
|
|
#include <svx/polysc3d.hxx>
|
|
|
|
#include "drawview.hxx"
|
|
|
|
#include <svtools/imapobj.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/urihelper.hxx>
|
2001-05-28 09:54:31 +00:00
|
|
|
#include <unotools/localfilehelper.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#include <svx/xfillit0.hxx>
|
2006-05-02 14:06:27 +00:00
|
|
|
#include <sfx2/app.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
2009-10-16 00:05:16 +02:00
|
|
|
#include <svl/aeitem.hxx>
|
|
|
|
#include <svl/stritem.hxx>
|
|
|
|
#include <svl/intitem.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <tools/urlobj.hxx>
|
|
|
|
#include <sfx2/docfile.hxx>
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/eeitem.hxx>
|
|
|
|
#include <editeng/flditem.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:40:17 +00:00
|
|
|
#include <svx/svdotable.hxx>
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "app.hrc"
|
|
|
|
#include "strings.hrc"
|
|
|
|
#include "res_bmp.hrc"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "GraphicDocShell.hxx"
|
2013-04-19 15:49:58 -04:00
|
|
|
#include "sdmod.hxx"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "DrawDocShell.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "stlpool.hxx"
|
|
|
|
#include "anminfo.hxx"
|
|
|
|
#include "fudraw.hxx"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "ViewShell.hxx"
|
2006-03-21 16:18:41 +00:00
|
|
|
#include "ViewShellBase.hxx"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "FrameView.hxx"
|
|
|
|
#include "View.hxx"
|
|
|
|
#include "Window.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "drawdoc.hxx"
|
|
|
|
#include "sdpage.hxx"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "DrawViewShell.hxx"
|
2006-03-21 16:18:41 +00:00
|
|
|
#include "ToolBarManager.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "pgjump.hxx"
|
|
|
|
#include <svx/globl3d.hxx>
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "Client.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-04-03 12:50:06 +00:00
|
|
|
#include "slideshow.hxx"
|
|
|
|
|
2003-04-24 15:43:39 +00:00
|
|
|
#include <svx/svdundo.hxx>
|
2008-03-07 15:26:28 +00:00
|
|
|
#include <avmedia/mediawindow.hxx>
|
2003-04-24 15:43:39 +00:00
|
|
|
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
#include <svx/sdrhittesthelper.hxx>
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2004-01-20 10:12:35 +00:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
TYPEINIT1( FuSelection, FuDraw );
|
|
|
|
|
2004-01-20 10:12:35 +00:00
|
|
|
FuSelection::FuSelection (
|
|
|
|
ViewShell* pViewSh,
|
|
|
|
::sd::Window* pWin,
|
|
|
|
::sd::View* pView,
|
|
|
|
SdDrawDocument* pDoc,
|
|
|
|
SfxRequest& rReq)
|
|
|
|
: FuDraw(pViewSh, pWin, pView, pDoc, rReq),
|
2011-01-17 11:41:00 +01:00
|
|
|
bTempRotation(sal_False),
|
|
|
|
bSelectionChanged(sal_False),
|
|
|
|
bHideAndAnimate(sal_False),
|
2004-01-20 10:12:35 +00:00
|
|
|
pHdl(NULL),
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection(sal_False),
|
|
|
|
bMirrorSide0(sal_False),
|
2004-01-20 10:12:35 +00:00
|
|
|
nEditMode(SID_BEZIER_MOVE),
|
|
|
|
pWaterCanCandidate(NULL)
|
2013-11-28 12:09:19 +00:00
|
|
|
//Add Shift+UP/DOWN/LEFT/RIGHT key to move the position of insert point,
|
|
|
|
//and SHIFT+ENTER key to decide the postion and draw the new insert point
|
|
|
|
,bBeginInsertPoint(sal_False),
|
|
|
|
oldPoint(0,0)
|
|
|
|
,bMovedToCenterPoint(sal_False)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-12-14 16:03:18 +00:00
|
|
|
}
|
|
|
|
|
2013-10-25 15:42:11 +02:00
|
|
|
rtl::Reference<FuPoor> FuSelection::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
|
2005-12-14 16:03:18 +00:00
|
|
|
{
|
2013-10-25 15:42:11 +02:00
|
|
|
rtl::Reference<FuPoor> xFunc( new FuSelection( pViewSh, pWin, pView, pDoc, rReq ) );
|
2005-12-14 16:03:18 +00:00
|
|
|
xFunc->DoExecute(rReq);
|
|
|
|
return xFunc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuSelection::DoExecute( SfxRequest& rReq )
|
|
|
|
{
|
|
|
|
FuDraw::DoExecute( rReq );
|
|
|
|
|
2012-10-14 19:50:17 +02:00
|
|
|
// Select object bar
|
2000-09-18 16:07:07 +00:00
|
|
|
SelectionHasChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
FuSelection::~FuSelection()
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllPoints();
|
|
|
|
mpView->ResetCreationActive();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != SDRDRAG_MOVE )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragMode(SDRDRAG_MOVE);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Hack for #?????#
|
2011-01-17 11:41:00 +01:00
|
|
|
bHideAndAnimate = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
pHdl = NULL;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
|
|
|
|
sal_Bool bWaterCan = SD_MOD()->GetWaterCan();
|
2006-12-13 16:56:45 +00:00
|
|
|
const bool bReadOnly = mpDocSh->IsReadOnly();
|
2004-05-17 16:21:38 +00:00
|
|
|
// When the right mouse button is pressed then only select objects
|
|
|
|
// (and deselect others) as a preparation for showing the context
|
|
|
|
// menu.
|
|
|
|
const bool bSelectionOnly = rMEvt.IsRight();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bMBDown = sal_True;
|
|
|
|
bSelectionChanged = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->IsAction() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( rMEvt.IsRight() )
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BckAction();
|
2011-01-17 11:41:00 +01:00
|
|
|
return sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
|
|
|
|
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-03 06:44:09 +00:00
|
|
|
// The following code is executed for right clicks as well as for left
|
|
|
|
// clicks in order to modify the selection for the right button as a
|
|
|
|
// preparation for the context menu. The functions BegMarkObject() and
|
|
|
|
// BegDragObject(), however, are not called for right clicks because a)
|
2011-01-17 11:41:00 +01:00
|
|
|
// it makes no sense and b) to have IsAction() return sal_False when called
|
2004-06-03 06:44:09 +00:00
|
|
|
// from Command() which is a prerequisite for the context menu.
|
2004-05-17 16:21:38 +00:00
|
|
|
if ((rMEvt.IsLeft() || rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
&& !mpView->IsAction()
|
|
|
|
&& (mpView->IsFrameDragSingles() || !mpView->HasMarkablePoints()))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* NO BEZIER_EDITOR
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->CaptureMouse();
|
|
|
|
pHdl = mpView->PickHandle(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObject* pObj;
|
|
|
|
SdrPageView* pPV;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
long nAngle0 = GetAngle(aMDPos - mpView->GetRef1());
|
2000-09-18 16:07:07 +00:00
|
|
|
nAngle0 -= 27000;
|
|
|
|
nAngle0 = NormAngle360(nAngle0);
|
2011-01-17 11:41:00 +01:00
|
|
|
bMirrorSide0 = sal_Bool (nAngle0 < 18000L);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (!pHdl && mpView->Is3DRotationCreationActive())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* If 3D-rotation bodies are about to be created,
|
|
|
|
* end creation now.
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_True;
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->EnterWait();
|
|
|
|
mpView->End3DCreation();
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_False;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->LeaveWait();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bTextEdit = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrViewEvent aVEvt;
|
2006-12-13 16:56:45 +00:00
|
|
|
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 10:40:17 +00:00
|
|
|
if ( eHit == SDRHIT_TEXTEDITOBJ && ( mpViewShell->GetFrameView()->IsQuickEdit() || dynamic_cast< sdr::table::SdrTableObj* >( aVEvt.pObj ) != NULL ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bTextEdit = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(!bTextEdit
|
2006-12-13 16:56:45 +00:00
|
|
|
&& !mpDocSh->IsReadOnly()
|
|
|
|
&& ((mpView->IsMarkedHit(aMDPos, nHitLog) && !rMEvt.IsShift() && !rMEvt.IsMod2()) || pHdl != NULL)
|
2000-09-18 16:07:07 +00:00
|
|
|
&& (rMEvt.GetClicks() != 2)
|
|
|
|
)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
if (!pHdl && mpView->Is3DRotationCreationActive())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Switch between 3D-rotation body -> selection
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
else if (bWaterCan)
|
|
|
|
{
|
|
|
|
// Remember the selected object for proper handling in
|
|
|
|
// MouseButtonUp().
|
|
|
|
pWaterCanCandidate = pickObject (aMDPos);
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
{
|
2013-03-12 20:27:21 +01:00
|
|
|
// hit handle or marked object
|
2011-01-17 11:41:00 +01:00
|
|
|
bFirstMouseMove = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
aDragTimer.Start();
|
|
|
|
}
|
|
|
|
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
if (!rMEvt.IsMod2() && mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_PICKMACRO))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegMacroObj(aMDPos, nHitLog, pObj, pPV, mpWindow);
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if ( bTextEdit )
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (aVEvt.pObj->GetObjInventor() == SdrInventor &&
|
|
|
|
(nSdrObjKind == OBJ_TEXT ||
|
|
|
|
nSdrObjKind == OBJ_TITLETEXT ||
|
|
|
|
nSdrObjKind == OBJ_OUTLINETEXT ||
|
|
|
|
!aVEvt.pObj->IsEmptyPresObj()))
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Seamless Editing: branch to text input
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!rMEvt.IsShift())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAll();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
SfxUInt16Item aItem(SID_TEXTEDIT, 1);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_TEXTEDIT, SFX_CALLMODE_SYNCHRON |
|
|
|
|
SFX_CALLMODE_RECORD, &aItem, 0L);
|
2012-10-14 19:50:17 +02:00
|
|
|
return bReturn; // CAUTION, due to the synchronous slot the object is deleted now
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if ( !rMEvt.IsMod2() && rMEvt.GetClicks() == 1 &&
|
|
|
|
aVEvt.eEvent == SDREVENT_EXECUTEURL )
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxStringItem aStrItem(SID_FILE_NAME, aVEvt.pURLField->GetURL());
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
|
2014-01-28 20:00:21 +01:00
|
|
|
SfxBoolItem aBrowseItem( SID_BROWSE, true );
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
|
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (rMEvt.IsMod1())
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Open in new frame
|
2000-09-18 16:07:07 +00:00
|
|
|
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Open in current frame
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
|
|
|
|
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if(!rMEvt.IsMod2()
|
2006-12-13 16:56:45 +00:00
|
|
|
&& mpViewShell->ISA(DrawViewShell)
|
2000-09-18 16:07:07 +00:00
|
|
|
)
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
if(mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-05-17 16:21:38 +00:00
|
|
|
// Animate object when not just selecting.
|
|
|
|
if ( ! bSelectionOnly)
|
|
|
|
bReturn = AnimateObj(pObj, aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (!bReturn && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene)))
|
|
|
|
{
|
|
|
|
if(rMEvt.GetClicks() == 1)
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Look into the group
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
|
2000-09-18 16:07:07 +00:00
|
|
|
bReturn = AnimateObj(pObj, aMDPos);
|
|
|
|
}
|
2002-06-07 12:25:13 +00:00
|
|
|
else if( !bReadOnly && rMEvt.GetClicks() == 2)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// New: double click on selected Group object
|
|
|
|
// enter group
|
2004-05-17 16:21:38 +00:00
|
|
|
if ( ! bSelectionOnly
|
|
|
|
&& pObj
|
|
|
|
&& pObj->GetPage() == pPV->GetPage())
|
2000-09-18 16:07:07 +00:00
|
|
|
bReturn = pPV->EnterGroup(pObj);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-12-12 14:53:18 +00:00
|
|
|
|
|
|
|
// #i71727# replaced else here with two possibilities, once the original else (!pObj)
|
|
|
|
// and also ignoring the found object when it's on a masterpage
|
|
|
|
if(!pObj || (pObj->GetPage() && pObj->GetPage()->IsMasterPage()))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-14 15:22:59 +00:00
|
|
|
if(mpView->IsGroupEntered() && 2 == rMEvt.GetClicks())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-12 14:53:18 +00:00
|
|
|
// New: double click on empty space/on obj on MasterPage, leave group
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->LeaveOneGroup();
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bReturn)
|
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
if (bWaterCan)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
if ( ! (rMEvt.IsShift() || rMEvt.IsMod2()))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
// Find the object under the current mouse position
|
|
|
|
// and store it for the MouseButtonUp() method to
|
|
|
|
// evaluate.
|
|
|
|
pWaterCanCandidate = pickObject (aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
else
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
|
|
|
sal_Bool bDeactivateOLE = sal_False;
|
2003-04-08 14:20:47 +00:00
|
|
|
|
|
|
|
if ( !rMEvt.IsShift() && !rMEvt.IsMod2() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
OSL_ASSERT (mpViewShell->GetViewShell()!=NULL);
|
2004-01-20 10:12:35 +00:00
|
|
|
Client* pIPClient = static_cast<Client*>(
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewShell()->GetIPClient());
|
2003-04-08 14:20:47 +00:00
|
|
|
|
2004-10-04 17:33:48 +00:00
|
|
|
if (pIPClient && pIPClient->IsObjectInPlaceActive())
|
2003-04-08 14:20:47 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// OLE-Objekt gets deactivated in subsequent UnmarkAll()
|
2011-01-17 11:41:00 +01:00
|
|
|
bDeactivateOLE = sal_True;
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAll();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bMarked = sal_False;
|
2003-04-08 14:20:47 +00:00
|
|
|
|
|
|
|
if ( !rMEvt.IsMod1() && !bDeactivateOLE)
|
|
|
|
{
|
|
|
|
if ( rMEvt.IsMod2() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
bMarked = mpView->MarkNextObj(aMDPos, nHitLog, rMEvt.IsShift() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
else
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bToggle = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (rMEvt.IsShift() && mpView->GetMarkedObjectList().GetMarkCount() > 1)
|
2003-04-08 14:20:47 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// No Toggle on single selection
|
2011-01-17 11:41:00 +01:00
|
|
|
bToggle = sal_True;
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
|
|
|
|
2014-03-10 11:09:59 +02:00
|
|
|
bMarked = mpView->MarkObj(aMDPos, nHitLog, bToggle, false);
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2009-01-06 08:40:41 +00:00
|
|
|
if( !bDeactivateOLE )
|
2003-04-08 14:20:47 +00:00
|
|
|
{
|
2009-01-06 08:40:41 +00:00
|
|
|
if ( !bReadOnly &&
|
|
|
|
bMarked &&
|
|
|
|
(!rMEvt.IsShift() || mpView->IsMarkedHit(aMDPos, nHitLog)))
|
|
|
|
{
|
|
|
|
/**********************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Move object
|
2009-01-06 08:40:41 +00:00
|
|
|
**********************************************************/
|
|
|
|
aDragTimer.Start();
|
|
|
|
|
|
|
|
pHdl=mpView->PickHandle(aMDPos);
|
|
|
|
if ( ! rMEvt.IsRight())
|
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/**********************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select object
|
2009-01-06 08:40:41 +00:00
|
|
|
**********************************************************/
|
|
|
|
if ( ! rMEvt.IsRight())
|
|
|
|
mpView->BegMarkObj(aMDPos);
|
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
2010-09-22 17:52:19 +02:00
|
|
|
|
2010-12-08 10:42:58 +01:00
|
|
|
if( bMarked && bTempRotation && (nSlotId == SID_OBJECT_ROTATE) && !rMEvt.IsShift() && (rMEvt.GetClicks() != 2) )
|
|
|
|
{
|
|
|
|
nSlotId = SID_OBJECT_SELECT;
|
|
|
|
Activate();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-05-17 16:21:38 +00:00
|
|
|
else if ( !bReadOnly
|
2004-06-03 06:44:09 +00:00
|
|
|
&& (rMEvt.IsLeft() || rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
&& !mpView->IsAction())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/**********************************************************************
|
|
|
|
* BEZIER-EDITOR
|
|
|
|
**********************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->CaptureMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrViewEvent aVEvt;
|
2006-12-13 16:56:45 +00:00
|
|
|
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (eHit == SDRHIT_HANDLE && aVEvt.pHdl->GetKind() == HDL_BWGT)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Drag Handle
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_MARKEDOBJECT && nEditMode == SID_BEZIER_INSERT)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Insert glue point
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegInsObjPoint(aMDPos, rMEvt.IsMod1());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select glue point
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
|
|
|
if (!rMEvt.IsShift())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllPoints();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegMarkPoints(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Move object
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, NULL, nDrgLog);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_HANDLE)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select glue point
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
if (!mpView->IsPointMarked(*aVEvt.pHdl) || rMEvt.IsShift())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if (!rMEvt.IsShift())
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllPoints();
|
|
|
|
pHdl = mpView->PickHandle(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->IsPointMarked(*aVEvt.pHdl))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkPoint(*aVEvt.pHdl);
|
2000-09-18 16:07:07 +00:00
|
|
|
pHdl = NULL;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
pHdl = mpView->PickHandle(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pHdl)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->MarkPoint(*pHdl);
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2001-08-09 11:02:05 +00:00
|
|
|
else
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Point IS marked and NO shift is pressed. Start
|
2001-08-09 11:02:05 +00:00
|
|
|
// dragging of selected point(s)
|
2006-12-13 16:56:45 +00:00
|
|
|
pHdl = mpView->PickHandle(aMDPos);
|
2001-08-09 11:02:05 +00:00
|
|
|
if(pHdl)
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*)NULL, pHdl, nDrgLog);
|
2001-08-09 11:02:05 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select or drag object
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
|
|
|
if (!rMEvt.IsShift() && !rMEvt.IsMod2() && eHit == SDRHIT_UNMARKEDOBJECT)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllObj();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bMarked = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (!rMEvt.IsMod1())
|
|
|
|
{
|
|
|
|
if (rMEvt.IsMod2())
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
bMarked = mpView->MarkNextObj(aMDPos, nHitLog, rMEvt.IsShift());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), false);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bMarked &&
|
|
|
|
(!rMEvt.IsShift() || eHit == SDRHIT_MARKEDOBJECT))
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Move object
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-12-13 16:56:45 +00:00
|
|
|
else if (mpView->AreObjectsMarked())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/**************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select glue point
|
2000-09-18 16:07:07 +00:00
|
|
|
**************************************************************/
|
|
|
|
if (!rMEvt.IsShift())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllPoints();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegMarkPoints(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/**************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Select object
|
2000-09-18 16:07:07 +00:00
|
|
|
**************************************************************/
|
2004-06-03 06:44:09 +00:00
|
|
|
if ( ! rMEvt.IsRight())
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegMarkObj(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bIsInDragMode)
|
|
|
|
{
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
return bReturn;
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool FuSelection::MouseMove(const MouseEvent& rMEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bReturn = FuDraw::MouseMove(rMEvt);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (aDragTimer.IsActive())
|
|
|
|
{
|
|
|
|
if(bFirstMouseMove)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bFirstMouseMove = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aDragTimer.Stop();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->IsAction())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Point aPix(rMEvt.GetPosPixel());
|
2006-12-13 16:56:45 +00:00
|
|
|
Point aPnt(mpWindow->PixelToLogic(aPix));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
ForceScroll(aPix);
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->IsInsObjPoint())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->MovInsObjPoint(aPnt);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->MovAction(aPnt);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
|
|
|
|
return (bReturn);
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bReturn = sal_False;
|
2004-05-17 16:21:38 +00:00
|
|
|
// When the right mouse button is pressed then only select objects
|
|
|
|
// (and deselect others) as a preparation for showing the context
|
|
|
|
// menu.
|
|
|
|
const bool bSelectionOnly = rMEvt.IsRight();
|
2012-10-27 18:59:14 +02:00
|
|
|
SdrObject* pObj;
|
|
|
|
SdrPageView* pPV;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bHideAndAnimate)
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Animation is still running -> return immediately
|
2011-01-17 11:41:00 +01:00
|
|
|
bHideAndAnimate = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
pHdl = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2011-01-17 11:41:00 +01:00
|
|
|
return(sal_True);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (aDragTimer.IsActive() )
|
|
|
|
{
|
|
|
|
aDragTimer.Stop();
|
2011-01-17 11:41:00 +01:00
|
|
|
bIsInDragMode = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if( !mpView )
|
2011-01-17 11:41:00 +01:00
|
|
|
return (sal_False);
|
2006-11-01 13:15:58 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
|
|
|
sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->IsFrameDragSingles() || !mpView->HasMarkablePoints())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/**********************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* NO BEZIER_EDITOR
|
2000-09-18 16:07:07 +00:00
|
|
|
**********************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->IsDragObj() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/******************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Object was moved
|
2000-09-18 16:07:07 +00:00
|
|
|
******************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bDragWithCopy)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragWithCopy(bDragWithCopy);
|
|
|
|
mpView->EndDragObj( mpView->IsDragWithCopy() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ForceMarkedToAnotherPage();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (!rMEvt.IsShift() && !rMEvt.IsMod1() && !rMEvt.IsMod2() &&
|
|
|
|
!bSelectionChanged &&
|
2013-04-11 00:21:40 -03:00
|
|
|
std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
|
|
|
|
std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-27 18:59:14 +02:00
|
|
|
/*************************************************************
|
2013-02-09 14:31:21 +01:00
|
|
|
* If a user wants to click on an object in front of a marked
|
2012-10-27 18:59:14 +02:00
|
|
|
* one, he releases the mouse button immediately
|
|
|
|
**************************************************************/
|
|
|
|
if (mpView->PickObj(aMDPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_BEFOREMARK))
|
|
|
|
{
|
|
|
|
mpView->UnmarkAllObj();
|
|
|
|
mpView->MarkObj(pObj,pPV,false,false);
|
2013-02-09 14:31:21 +01:00
|
|
|
return (sal_True);
|
2012-10-27 18:59:14 +02:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
/**************************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Toggle between selection and rotation
|
2000-09-18 16:07:07 +00:00
|
|
|
**************************************************************/
|
|
|
|
SdrObject* pSingleObj = NULL;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (nMarkCount==1)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
pSingleObj = mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2004-05-17 16:21:38 +00:00
|
|
|
if (nSlotId == SID_OBJECT_SELECT
|
2006-12-13 16:56:45 +00:00
|
|
|
&& mpView->IsRotateAllowed()
|
2010-12-08 10:42:58 +01:00
|
|
|
|
|
|
|
&& (rMEvt.GetClicks() != 2)
|
2006-12-13 16:56:45 +00:00
|
|
|
&& (mpViewShell->GetFrameView()->IsClickChangeRotation()
|
2004-05-17 16:21:38 +00:00
|
|
|
|| (pSingleObj
|
|
|
|
&& pSingleObj->GetObjInventor()==E3dInventor))
|
|
|
|
&& ! bSelectionOnly)
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bTempRotation = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
nSlotId = SID_OBJECT_ROTATE;
|
|
|
|
Activate();
|
|
|
|
}
|
|
|
|
else if (nSlotId == SID_OBJECT_ROTATE)
|
|
|
|
{
|
|
|
|
nSlotId = SID_OBJECT_SELECT;
|
|
|
|
Activate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (nSlotId == SID_CONVERT_TO_3D_LATHE)
|
|
|
|
{
|
|
|
|
if (!pHdl)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_True;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->Start3DCreation();
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else if (pHdl->GetKind() != HDL_MIRX &&
|
|
|
|
pHdl->GetKind() != HDL_REF1 &&
|
2006-12-13 16:56:45 +00:00
|
|
|
pHdl->GetKind() != HDL_REF2 && mpView->Is3DRotationCreationActive())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/*********************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* If 3D-rotation bodies are about to be created,
|
|
|
|
* end creation now
|
2000-09-18 16:07:07 +00:00
|
|
|
**********************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
long nAngle1 = GetAngle(aPnt - mpView->GetRef1());
|
2000-09-18 16:07:07 +00:00
|
|
|
nAngle1 -= 27000;
|
|
|
|
nAngle1 = NormAngle360(nAngle1);
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bMirrorSide1 = sal_Bool (nAngle1 < 18000L);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bMirrorSide0 != bMirrorSide1)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_True;
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->EnterWait();
|
|
|
|
mpView->End3DCreation();
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
nSlotId = SID_OBJECT_SELECT;
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->LeaveWait();
|
2000-09-18 16:07:07 +00:00
|
|
|
Activate();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2004-05-17 16:21:38 +00:00
|
|
|
else if (rMEvt.IsMod1()
|
|
|
|
&& !rMEvt.IsMod2()
|
2013-04-11 00:21:40 -03:00
|
|
|
&& std::abs(aPnt.X() - aMDPos.X()) < nDrgLog
|
|
|
|
&& std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Enter group
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->MarkObj(aPnt, nHitLog, rMEvt.IsShift(), rMEvt.IsMod1());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->IsAction() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->EndAction();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( SD_MOD()->GetWaterCan() )
|
|
|
|
{
|
|
|
|
if( rMEvt.IsRight() )
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// In watering-can mode, on press onto right mouse button, a undo is executed
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_UNDO, SFX_CALLMODE_ASYNCHRON );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
else if (pWaterCanCandidate != NULL)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
// Is the candiate object still under the mouse?
|
|
|
|
if (pickObject (aPnt) == pWaterCanCandidate)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
SdStyleSheetPool* pPool = static_cast<SdStyleSheetPool*>(
|
2006-12-13 16:56:45 +00:00
|
|
|
mpDocSh->GetStyleSheetPool());
|
2003-04-08 14:20:47 +00:00
|
|
|
if (pPool != NULL)
|
|
|
|
{
|
|
|
|
SfxStyleSheet* pStyleSheet = static_cast<SfxStyleSheet*>(
|
|
|
|
pPool->GetActualStyleSheet());
|
2009-06-04 16:21:29 +00:00
|
|
|
if (pStyleSheet != NULL && mpView->IsUndoEnabled() )
|
2003-04-08 14:20:47 +00:00
|
|
|
{
|
2003-04-24 15:43:39 +00:00
|
|
|
// Added UNDOs for the WaterCan mode. This was never done in
|
|
|
|
// the past, thus it was missing all the time.
|
2014-01-28 20:00:21 +01:00
|
|
|
SdrUndoAction* pUndoAttr = mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pWaterCanCandidate, true, true);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->BegUndo(pUndoAttr->GetComment());
|
|
|
|
mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoGeoObject(*pWaterCanCandidate));
|
|
|
|
mpView->AddUndo(pUndoAttr);
|
2003-04-24 15:43:39 +00:00
|
|
|
|
2014-01-28 20:00:21 +01:00
|
|
|
pWaterCanCandidate->SetStyleSheet (pStyleSheet, false);
|
2003-04-24 15:43:39 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->EndUndo();
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
// else when there has been no object under the mouse when the
|
|
|
|
// button was pressed then nothing happens even when there is
|
|
|
|
// one now.
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nClicks = rMEvt.GetClicks();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (nClicks == 2 && rMEvt.IsLeft() && bMBDown &&
|
|
|
|
!rMEvt.IsMod1() && !rMEvt.IsShift() )
|
|
|
|
{
|
|
|
|
DoubleClick(rMEvt);
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bMBDown = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
pHdl = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObject* pSingleObj = NULL;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uLong nMarkCount = mpView->GetMarkedObjectList().GetMarkCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (nMarkCount==1)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
pSingleObj = mpView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
CWS-TOOLING: integrate CWS impress172
2009-07-30 15:29:39 +0200 cl r274492 : #i102921# remove reference to inssrc.obj which was moved to svx
2009-07-29 11:40:35 +0200 wg r274445 : i103869
2009-07-22 14:39:13 +0200 sj r274241 : #i102713# fixed cloud shape
2009-07-07 15:28:04 +0200 sj r273800 : fixed build problem
2009-07-07 13:27:13 +0200 cl r273792 : #i102921# moved insert col/rows dialog to svx
2009-07-07 10:36:05 +0200 cl r273782 : fixed compiler warnings
2009-07-02 10:40:21 +0200 sj r273626 : fixed build problem
2009-07-02 10:27:56 +0200 cl r273624 : fixed merge problem
2009-07-02 10:27:19 +0200 cl r273623 : fixed compiler warning
2009-07-01 10:04:58 +0200 cl r273550 : CWS-TOOLING: rebase CWS impress172 to trunk@273468 (milestone: DEV300:m51)
2009-06-30 16:22:02 +0200 cl r273518 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:46 +0200 cl r273517 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:20:28 +0200 cl r273516 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:49 +0200 cl r273515 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:19:28 +0200 cl r273514 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 16:17:38 +0200 cl r273513 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:45:44 +0200 cl r273511 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:37:16 +0200 cl r273510 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:33:47 +0200 cl r273509 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:32:10 +0200 cl r273508 : #i102921# added insert table row/col dialog for impress tables
2009-06-30 15:30:05 +0200 cl r273507 : #i102921# added insert table row/col dialog for impress tables
2009-06-29 12:32:42 +0200 sj r273465 : #158632# fixed textrange hyperlinks to specific pages, added slide names
2009-06-24 15:17:59 +0200 sj r273349 : #158636# fixed text range hyperlink to first/last slide
2009-06-22 13:18:30 +0200 sj r273224 : #158651# fixed header footer import
2009-06-19 15:18:24 +0200 sj r273160 : #158614# default text of presentation objects now cleared
2009-06-16 15:54:19 +0200 sj r273023 : #i101545# fixed crash - bracketing of graphic links has been done twice leading to a broken graphic state stack
2009-06-15 16:26:26 +0200 sj r272998 : #158635# importing bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-15 16:25:26 +0200 sj r272997 : #158635# added bookmark interactions: firstslide, lastslide, nextslide, previousslide
2009-06-12 13:17:32 +0200 sj r272915 : #i102713# fixed cloud shape
2009-06-10 18:36:58 +0200 sj r272833 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-08 19:52:28 +0200 sj r272746 : #158674# fixed curvedleftarrow, curvedrightarrow, curveddownarrow, curveduparrow
2009-06-04 15:28:32 +0200 cl r272640 : #i102358# applied patch to remove warnings
2009-06-04 14:39:45 +0200 cl r272630 : #i99423# applied path to change impress wizard create button to open when opening exisitng documents
2009-06-03 18:21:26 +0200 sj r272601 : #158635# now using the correct paragraph bottom spacing. using font independent linespacing for impress text objects
2009-06-03 15:47:27 +0200 cl r272583 : #i101817# added color collection based on scribus
2009-06-03 14:43:59 +0200 cl r272580 : #i102163# use weak ref to SdrObject instead of listening to the model
2009-06-03 12:39:29 +0200 cl r272556 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 12:27:00 +0200 cl r272555 : #i93308# correct namespace for com.sun.star.text.textfields
2009-06-03 11:33:44 +0200 cl r272553 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:59 +0200 cl r272552 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-03 11:30:22 +0200 cl r272551 : #i23221# allow all settings (that make sense) for presentation styles
2009-06-02 18:41:07 +0200 sj r272527 : #i28358# applied patch (better conversion of dotted lines)
2009-06-02 11:52:13 +0200 cl r272491 : #i98668# applied patch to fix possible endless loop if exception occours
2009-05-28 17:02:55 +0200 sj r272416 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:25 +0200 sj r272415 : #i102336# retaining graphic file names unchanged
2009-05-28 17:00:10 +0200 sj r272414 : #i102336# retaining graphic file names unchanged
2009-05-25 12:43:58 +0200 sj r272232 : #i102069# added patch from thb (fixed rotated group objects)
2009-08-05 17:01:07 +00:00
|
|
|
if ( (nSlotId != SID_OBJECT_SELECT && nMarkCount==0) ||
|
2006-12-13 16:56:45 +00:00
|
|
|
( mpView->GetDragMode() == SDRDRAG_CROOK &&
|
|
|
|
!mpView->IsCrookAllowed( mpView->IsCrookNoContortion() ) ) ||
|
|
|
|
( mpView->GetDragMode() == SDRDRAG_SHEAR &&
|
|
|
|
!mpView->IsShearAllowed() && !mpView->IsDistortAllowed() ) ||
|
2000-09-18 16:07:07 +00:00
|
|
|
( nSlotId==SID_CONVERT_TO_3D_LATHE && pSingleObj &&
|
|
|
|
(pSingleObj->GetObjInventor() != SdrInventor ||
|
|
|
|
pSingleObj->GetObjIdentifier() == OBJ_MEASURE) ) )
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bReturn = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
pHdl = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
FuDraw::MouseButtonUp(rMEvt);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_SYNCHRON);
|
2012-10-14 19:50:17 +02:00
|
|
|
return bReturn; // CAUTION, due to the synchronous slot, the object is deleted now.
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FuDraw::MouseButtonUp(rMEvt);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/**********************************************************************
|
|
|
|
* BEZIER_EDITOR
|
|
|
|
**********************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->IsAction() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->IsInsObjPoint() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->EndInsObjPoint(SDRCREATE_FORCEEND);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-12-13 16:56:45 +00:00
|
|
|
else if ( mpView->IsDragObj() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bDragWithCopy)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bDragWithCopy = !mpView->IsPresObjSelected(sal_False, sal_True);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragWithCopy(bDragWithCopy);
|
|
|
|
mpView->EndDragObj( mpView->IsDragWithCopy() );
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->EndAction();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nDrgLog2 = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
|
2006-12-13 16:56:45 +00:00
|
|
|
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-04-11 00:21:40 -03:00
|
|
|
if (std::abs(aMDPos.X() - aPos.X()) < nDrgLog2 &&
|
|
|
|
std::abs(aMDPos.Y() - aPos.Y()) < nDrgLog2 &&
|
2000-09-18 16:07:07 +00:00
|
|
|
!rMEvt.IsShift() && !rMEvt.IsMod2())
|
|
|
|
{
|
|
|
|
SdrViewEvent aVEvt;
|
2006-12-13 16:56:45 +00:00
|
|
|
SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (eHit == SDRHIT_NONE)
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Click on the same place - unselect
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAllObj();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (!rMEvt.IsShift() && rMEvt.IsMod1() && !rMEvt.IsMod2() &&
|
2013-04-11 00:21:40 -03:00
|
|
|
std::abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
|
|
|
|
std::abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Enter group
|
2014-03-10 11:09:59 +02:00
|
|
|
mpView->MarkObj(aPnt, nHitLog, false, rMEvt.IsMod1());
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
pHdl = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
FuDraw::MouseButtonUp(rMEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
return (bReturn);
|
|
|
|
}
|
|
|
|
|
2013-03-12 20:27:21 +01:00
|
|
|
/**
|
|
|
|
* Process keyboard input
|
|
|
|
* @returns sal_True if a KeyEvent is being processed, sal_False otherwise
|
|
|
|
*/
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool FuSelection::KeyInput(const KeyEvent& rKEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bReturn = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
switch (rKEvt.GetKeyCode().GetCode())
|
|
|
|
{
|
|
|
|
case KEY_ESCAPE:
|
|
|
|
{
|
2002-12-05 14:29:50 +00:00
|
|
|
bReturn = FuSelection::cancel();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
2013-11-28 12:09:19 +00:00
|
|
|
//add keyboard operation for insert points in drawing curve
|
|
|
|
case KEY_UP:
|
|
|
|
case KEY_DOWN:
|
|
|
|
case KEY_LEFT:
|
|
|
|
case KEY_RIGHT:
|
|
|
|
{
|
|
|
|
if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT)){
|
|
|
|
long nX = 0;
|
|
|
|
long nY = 0;
|
|
|
|
sal_uInt16 nCode = rKEvt.GetKeyCode().GetCode();
|
|
|
|
if (nCode == KEY_UP)
|
|
|
|
{
|
|
|
|
// Scroll nach oben
|
|
|
|
nX = 0;
|
|
|
|
nY =-1;
|
|
|
|
}
|
|
|
|
else if (nCode == KEY_DOWN)
|
|
|
|
{
|
|
|
|
// Scroll nach unten
|
|
|
|
nX = 0;
|
|
|
|
nY = 1;
|
|
|
|
}
|
|
|
|
else if (nCode == KEY_LEFT)
|
|
|
|
{
|
|
|
|
// Scroll nach links
|
|
|
|
nX =-1;
|
|
|
|
nY = 0;
|
|
|
|
}
|
|
|
|
else if (nCode == KEY_RIGHT)
|
|
|
|
{
|
|
|
|
// Scroll nach rechts
|
|
|
|
nX = 1;
|
|
|
|
nY = 0;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-11-28 12:09:19 +00:00
|
|
|
Point centerPoint;
|
|
|
|
Rectangle rect = mpView->GetMarkedObjRect();
|
|
|
|
centerPoint = mpWindow->LogicToPixel(rect.Center());
|
|
|
|
Point aPoint = bMovedToCenterPoint? oldPoint:centerPoint;
|
|
|
|
Point ePoint = aPoint + Point(nX,nY);
|
|
|
|
mpWindow->SetPointerPosPixel(ePoint);
|
|
|
|
//simulate mouse move action
|
|
|
|
MouseEvent eMevt(ePoint,1,2, MOUSE_LEFT, 0);
|
|
|
|
MouseMove(eMevt);
|
|
|
|
oldPoint = ePoint;
|
|
|
|
bMovedToCenterPoint = sal_True;
|
|
|
|
bReturn = sal_True;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
case KEY_RETURN:
|
|
|
|
if(rKEvt.GetKeyCode().IsShift()&&(nEditMode == SID_BEZIER_INSERT))
|
|
|
|
{
|
|
|
|
if(!bBeginInsertPoint)
|
|
|
|
{
|
|
|
|
//simulate mouse button down action
|
|
|
|
MouseEvent aMevt(oldPoint,1,3, MOUSE_LEFT, KEY_SHIFT);
|
|
|
|
MouseButtonDown(aMevt);
|
|
|
|
mpWindow->CaptureMouse();
|
|
|
|
bBeginInsertPoint = sal_True;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
//simulate mouse button up action
|
|
|
|
MouseEvent rMEvt(oldPoint,1,17, MOUSE_LEFT, KEY_SHIFT);
|
|
|
|
MouseButtonUp(rMEvt);
|
|
|
|
bBeginInsertPoint = sal_False;
|
|
|
|
}
|
|
|
|
bReturn= sal_True;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!bReturn)
|
|
|
|
{
|
|
|
|
bReturn = FuDraw::KeyInput(rKEvt);
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpView->GetMarkedObjectList().GetMarkCount() == 0)
|
2002-11-29 13:23:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
2002-11-29 13:23:07 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return(bReturn);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FuSelection::Activate()
|
|
|
|
{
|
|
|
|
SdrDragMode eMode;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
|
|
|
mpView->SetEditMode(SDREDITMODE_EDIT);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
switch( nSlotId )
|
|
|
|
{
|
|
|
|
case SID_OBJECT_ROTATE:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// (mapped) Slot is explicitly set to rotate
|
2006-12-13 16:56:45 +00:00
|
|
|
if( mpViewShell->ISA(DrawViewShell) )
|
2001-02-13 11:43:44 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16* pSlotArray =
|
2006-12-13 16:56:45 +00:00
|
|
|
static_cast<DrawViewShell*>(mpViewShell)->GetSlotArray();
|
2001-02-13 11:43:44 +00:00
|
|
|
pSlotArray[ 1 ] = SID_OBJECT_ROTATE;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
eMode = SDRDRAG_ROTATE;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_MIRROR:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_MIRROR;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2008-02-26 06:27:04 +00:00
|
|
|
case SID_OBJECT_CROP:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_CROP;
|
|
|
|
|
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
case SID_OBJECT_TRANSPARENCE:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_TRANSPARENCE;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_GRADIENT:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_GRADIENT;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_SHEAR:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_SHEAR;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_CROOK_ROTATE:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_CROOK;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragMode(eMode);
|
|
|
|
mpView->SetCrookMode(SDRCROOK_ROTATE);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_CROOK_SLANT:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_CROOK;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragMode(eMode);
|
|
|
|
mpView->SetCrookMode(SDRCROOK_SLANT);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_OBJECT_CROOK_STRETCH:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_CROOK;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetDragMode(eMode);
|
|
|
|
mpView->SetCrookMode(SDRCROOK_STRETCH);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case SID_CONVERT_TO_3D_LATHE:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_MIRROR;
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (!mpView->Is3DRotationCreationActive())
|
|
|
|
mpView->Start3DCreation();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bSuppressChangesOfSelection = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
|
|
|
eMode = SDRDRAG_MOVE;
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->GetDragMode() != eMode )
|
|
|
|
mpView->SetDragMode(eMode);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nSlotId != SID_OBJECT_ROTATE)
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bTempRotation = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FuDraw::Activate();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void FuSelection::Deactivate()
|
|
|
|
{
|
|
|
|
FuDraw::Deactivate();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void FuSelection::SelectionHasChanged()
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bSelectionChanged = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
FuDraw::SelectionHasChanged();
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ((mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Switch rotation body -> selection
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
2000-09-18 16:07:07 +00:00
|
|
|
nSlotId = SID_OBJECT_SELECT;
|
|
|
|
Activate();
|
|
|
|
}
|
|
|
|
|
2004-11-26 14:10:47 +00:00
|
|
|
// Activate the right tool bar for the current context of the view.
|
2007-06-27 14:42:58 +00:00
|
|
|
mpViewShell->GetViewShellBase().GetToolBarManager()->SelectionHasChanged(*mpViewShell, *mpView);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
2013-03-12 20:27:21 +01:00
|
|
|
/**
|
|
|
|
* Set current bezier edit mode
|
|
|
|
*/
|
2011-01-17 11:41:00 +01:00
|
|
|
void FuSelection::SetEditMode(sal_uInt16 nMode)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
nEditMode = nMode;
|
|
|
|
|
|
|
|
if (nEditMode == SID_BEZIER_INSERT)
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
mpView->SetInsObjPointMode(true);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2014-03-10 11:09:59 +02:00
|
|
|
mpView->SetInsObjPointMode(false);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
ForcePointer();
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
|
2000-09-18 16:07:07 +00:00
|
|
|
rBindings.Invalidate(SID_BEZIER_MOVE);
|
|
|
|
rBindings.Invalidate(SID_BEZIER_INSERT);
|
|
|
|
}
|
|
|
|
|
2013-03-12 20:27:21 +01:00
|
|
|
/**
|
|
|
|
* Execute animation or interaction
|
|
|
|
*/
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bAnimated = sal_False;
|
|
|
|
sal_Bool bClosed = pObj->IsClosedObj();
|
|
|
|
sal_Bool bFilled = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bClosed)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxItemSet aSet(mpDoc->GetPool());
|
2000-10-30 10:50:43 +00:00
|
|
|
|
2003-11-24 16:13:21 +00:00
|
|
|
aSet.Put(pObj->GetMergedItemSet());
|
2000-10-30 10:50:43 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
const XFillStyleItem& rFillStyle = (const XFillStyleItem&) aSet.Get(XATTR_FILLSTYLE);
|
|
|
|
bFilled = rFillStyle.GetValue() != XFILL_NONE;
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
2000-09-18 16:07:07 +00:00
|
|
|
const long n2HitLog = nHitLog * 2;
|
|
|
|
Point aHitPosR(rPos);
|
|
|
|
Point aHitPosL(rPos);
|
|
|
|
Point aHitPosT(rPos);
|
|
|
|
Point aHitPosB(rPos);
|
|
|
|
|
|
|
|
aHitPosR.X() += n2HitLog;
|
|
|
|
aHitPosL.X() -= n2HitLog;
|
|
|
|
aHitPosT.Y() += n2HitLog;
|
|
|
|
aHitPosB.Y() -= n2HitLog;
|
|
|
|
|
|
|
|
if ( !bClosed ||
|
|
|
|
!bFilled ||
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
(SdrObjectPrimitiveHit(*pObj, aHitPosR, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
|
|
|
|
SdrObjectPrimitiveHit(*pObj, aHitPosL, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
|
|
|
|
SdrObjectPrimitiveHit(*pObj, aHitPosT, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) &&
|
|
|
|
SdrObjectPrimitiveHit(*pObj, aHitPosB, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpDoc->GetIMapInfo( pObj ) )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
const IMapObject* pIMapObj = mpDoc->GetHitIMapObject( pObj, rPos, *mpWindow );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2013-08-15 09:10:28 +02:00
|
|
|
if ( pIMapObj && !pIMapObj->GetURL().isEmpty() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to Document
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxStringItem aStrItem(SID_FILE_NAME, pIMapObj->GetURL());
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
|
|
|
|
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
|
2014-01-28 20:00:21 +01:00
|
|
|
SfxBoolItem aBrowseItem( SID_BROWSE, true );
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
pFrame->GetDispatcher()->
|
|
|
|
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2006-12-13 16:56:45 +00:00
|
|
|
else if (!mpDocSh->ISA(GraphicDocShell) &&
|
|
|
|
mpView->ISA(DrawView) &&
|
|
|
|
mpDoc->GetAnimationInfo(pObj))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/**********************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Animation-object hit in the middle -> interaction
|
2000-09-18 16:07:07 +00:00
|
|
|
**********************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj);
|
|
|
|
DrawViewShell* pDrViewSh = static_cast<DrawViewShell*>(mpViewShell);
|
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
switch (pInfo->meClickAction)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
case presentation::ClickAction_BOOKMARK:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to Bookmark (Page or Object)
|
2009-05-19 09:32:45 +00:00
|
|
|
SfxStringItem aItem(SID_NAVIGATOR_OBJECT, pInfo->GetBookmark());
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_NAVIGATOR_OBJECT, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD, &aItem, 0L);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_DOCUMENT:
|
|
|
|
{
|
2013-08-24 22:22:45 +04:00
|
|
|
OUString sBookmark( pInfo->GetBookmark() );
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to document
|
2013-08-24 22:22:45 +04:00
|
|
|
if (!sBookmark.isEmpty())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxStringItem aReferer(SID_REFERER, mpDocSh->GetMedium()->GetName());
|
2009-05-19 09:32:45 +00:00
|
|
|
SfxStringItem aStrItem(SID_FILE_NAME, sBookmark);
|
2006-12-13 16:56:45 +00:00
|
|
|
SfxViewFrame* pFrame = mpViewShell->GetViewFrame();
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
|
2014-01-28 20:00:21 +01:00
|
|
|
SfxBoolItem aBrowseItem( SID_BROWSE, true );
|
2000-09-18 16:07:07 +00:00
|
|
|
pFrame->GetDispatcher()->
|
|
|
|
Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_PREVPAGE:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to the previous page
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_PREVIOUS);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
|
|
|
|
&aItem, 0L);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_NEXTPAGE:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to the next page
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_NEXT);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
|
|
|
|
&aItem, 0L);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_FIRSTPAGE:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to the first page
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_FIRST);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
|
|
|
|
&aItem, 0L);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_LASTPAGE:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Jump to the last page
|
2000-09-18 16:07:07 +00:00
|
|
|
SfxUInt16Item aItem(SID_NAVIGATOR_PAGE, PAGE_LAST);
|
2006-12-13 16:56:45 +00:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 16:07:07 +00:00
|
|
|
Execute(SID_NAVIGATOR_PAGE, SFX_CALLMODE_SLOT | SFX_CALLMODE_RECORD,
|
|
|
|
&aItem, 0L);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_SOUND:
|
|
|
|
{
|
2008-03-07 15:26:28 +00:00
|
|
|
try
|
|
|
|
{
|
2013-11-20 14:43:45 +01:00
|
|
|
mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark(), ""/*TODO?*/), uno::UNO_QUERY_THROW );
|
2008-03-07 15:26:28 +00:00
|
|
|
mxPlayer->start();
|
|
|
|
}
|
2011-12-25 15:08:11 +09:00
|
|
|
catch( uno::Exception& )
|
2008-03-07 15:26:28 +00:00
|
|
|
{
|
|
|
|
}
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_VERB:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Assign verb
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAll();
|
2014-03-10 11:09:59 +02:00
|
|
|
mpView->MarkObj(pObj, mpView->GetSdrPageView(), false, false);
|
2006-12-13 16:56:45 +00:00
|
|
|
pDrViewSh->DoVerb((sal_Int16)pInfo->mnVerb);
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_PROGRAM:
|
|
|
|
{
|
2013-08-24 22:22:45 +04:00
|
|
|
OUString aBaseURL = GetDocSh()->GetMedium()->GetBaseURL();
|
2009-05-19 09:32:45 +00:00
|
|
|
INetURLObject aURL( ::URIHelper::SmartRel2Abs( INetURLObject(aBaseURL), pInfo->GetBookmark(),
|
2005-01-11 11:12:11 +00:00
|
|
|
URIHelper::GetMaybeFileHdl(), true, false,
|
|
|
|
INetURLObject::WAS_ENCODED, INetURLObject::DECODE_UNAMBIGUOUS ) );
|
2001-05-28 09:54:31 +00:00
|
|
|
|
2001-10-17 08:36:40 +00:00
|
|
|
if( INET_PROT_FILE == aURL.GetProtocol() )
|
2001-05-28 09:54:31 +00:00
|
|
|
{
|
2005-05-10 06:54:00 +00:00
|
|
|
SfxStringItem aUrl( SID_FILE_NAME, aURL.GetMainURL( INetURLObject::NO_DECODE ) );
|
2014-01-28 20:00:21 +01:00
|
|
|
SfxBoolItem aBrowsing( SID_BROWSE, true );
|
2005-05-10 06:54:00 +00:00
|
|
|
|
|
|
|
SfxViewFrame* pViewFrm = SfxViewFrame::Current();
|
|
|
|
if (pViewFrm)
|
|
|
|
pViewFrm->GetDispatcher()->Execute( SID_OPENDOC,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aUrl,
|
|
|
|
&aBrowsing,
|
|
|
|
0L );
|
2001-05-28 09:54:31 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_MACRO:
|
|
|
|
{
|
2012-10-14 19:50:17 +02:00
|
|
|
// Execute macro
|
2013-08-24 22:22:45 +04:00
|
|
|
OUString aMacro = pInfo->GetBookmark();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-05-19 06:44:08 +00:00
|
|
|
if ( SfxApplication::IsXScriptURL( aMacro ) )
|
|
|
|
{
|
|
|
|
uno::Any aRet;
|
|
|
|
uno::Sequence< sal_Int16 > aOutArgsIndex;
|
|
|
|
uno::Sequence< uno::Any > aOutArgs;
|
|
|
|
uno::Sequence< uno::Any >* pInArgs =
|
|
|
|
new uno::Sequence< uno::Any >(0);
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
ErrCode eErr = mpDocSh->CallXScript( aMacro,
|
2004-05-19 06:44:08 +00:00
|
|
|
*pInArgs, aRet, aOutArgsIndex, aOutArgs);
|
|
|
|
|
|
|
|
// Check the return value from the script
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_Bool bTmp = sal_False;
|
2004-05-19 06:44:08 +00:00
|
|
|
if ( eErr == ERRCODE_NONE &&
|
|
|
|
aRet.getValueType() == getCppuBooleanType() &&
|
2014-01-22 00:57:35 +01:00
|
|
|
( aRet >>= bTmp ) &&
|
2011-01-17 11:41:00 +01:00
|
|
|
bTmp == sal_True )
|
2004-05-19 06:44:08 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_True;
|
2004-05-19 06:44:08 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_False;
|
2004-05-19 06:44:08 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// aMacro has got following format:
|
|
|
|
// "Macroname.Modulname.Libname.Documentname" or
|
2013-02-25 05:41:44 +01:00
|
|
|
// "Macroname.Modulname.Libname.Applicationname"
|
2013-08-24 22:22:45 +04:00
|
|
|
OUString aMacroName = aMacro.getToken(0, '.');
|
|
|
|
OUString aModulName = aMacro.getToken(1, '.');
|
2004-05-19 06:44:08 +00:00
|
|
|
|
|
|
|
// In this moment the Call-method only
|
|
|
|
// resolves modulename+macroname
|
2013-08-24 22:22:45 +04:00
|
|
|
OUString aExecMacro(aModulName + "." + aMacroName);
|
2006-12-13 16:56:45 +00:00
|
|
|
bAnimated = mpDocSh->GetBasic()->Call(aExecMacro);
|
2004-05-19 06:44:08 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bAnimated &&
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ISA(DrawView) &&
|
|
|
|
!mpDocSh->ISA(GraphicDocShell) &&
|
2008-04-03 12:50:06 +00:00
|
|
|
SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) &&
|
2006-12-13 16:56:45 +00:00
|
|
|
mpDoc->GetAnimationInfo(pObj))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/**********************************************************
|
2012-10-14 19:50:17 +02:00
|
|
|
* Effect-Object hit in the middle -> Play effect
|
2000-09-18 16:07:07 +00:00
|
|
|
**********************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
switch (pInfo->meClickAction)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
case presentation::ClickAction_VANISH:
|
|
|
|
case presentation::ClickAction_INVISIBLE:
|
2006-12-13 16:56:45 +00:00
|
|
|
break;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
default:
|
2011-01-17 11:41:00 +01:00
|
|
|
bAnimated = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bAnimated;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-10-14 19:50:17 +02:00
|
|
|
/** is called when the current function should be aborted. <p>
|
2002-11-29 13:23:07 +00:00
|
|
|
This is used when a function gets a KEY_ESCAPE but can also
|
|
|
|
be called directly.
|
|
|
|
|
|
|
|
@returns true if a active function was aborted
|
|
|
|
*/
|
|
|
|
bool FuSelection::cancel()
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
if (mpView->Is3DRotationCreationActive())
|
2002-11-29 13:23:07 +00:00
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
2002-11-29 13:23:07 +00:00
|
|
|
return true;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
SdrObject* FuSelection::pickObject (const Point& rTestPoint)
|
|
|
|
{
|
|
|
|
SdrObject* pObject = NULL;
|
|
|
|
SdrPageView* pPageView;
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nHitLog = sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SDRSEARCH_PICKMARKABLE);
|
2003-04-08 14:20:47 +00:00
|
|
|
return pObject;
|
|
|
|
}
|
2013-11-28 12:09:19 +00:00
|
|
|
|
|
|
|
void FuSelection::ForcePointer(const MouseEvent* pMEvt)
|
|
|
|
{
|
|
|
|
if(bMovedToCenterPoint && !bBeginInsertPoint && pMEvt)
|
|
|
|
{
|
|
|
|
MouseEvent aMEvt(pMEvt->GetPosPixel(), pMEvt->GetClicks(),
|
|
|
|
pMEvt->GetMode(), pMEvt->GetButtons(), pMEvt->GetModifier() & ~KEY_SHIFT);
|
|
|
|
FuDraw::ForcePointer(&aMEvt);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
FuDraw::ForcePointer(pMEvt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-01-20 10:12:35 +00:00
|
|
|
} // end of namespace sd
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|