2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2010-02-12 15:01:35 +01:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* OpenOffice.org is free software: you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU Lesser General Public License version 3
|
|
|
|
* only, as published by the Free Software Foundation.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* OpenOffice.org is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU Lesser General Public License version 3 for more details
|
|
|
|
* (a copy is included in the LICENSE file that accompanied this code).
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-10 19:25:23 +00:00
|
|
|
* You should have received a copy of the GNU Lesser General Public License
|
|
|
|
* version 3 along with OpenOffice.org. If not, see
|
|
|
|
* <http://www.openoffice.org/license.html>
|
|
|
|
* for a copy of the LGPLv3 License.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 17:55:05 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
|
|
|
|
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>
|
|
|
|
#include <tools/debug.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"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "app.hxx"
|
2004-01-20 10:12:35 +00:00
|
|
|
#include "DrawDocShell.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "stlpool.hxx"
|
|
|
|
#include "anmdef.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
|
|
|
// #108981#
|
|
|
|
#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 );
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Konstruktor
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
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),
|
|
|
|
bTempRotation(FALSE),
|
|
|
|
bSelectionChanged(FALSE),
|
2006-12-13 16:56:45 +00:00
|
|
|
bHideAndAnimate(FALSE),
|
2004-01-20 10:12:35 +00:00
|
|
|
pHdl(NULL),
|
|
|
|
bSuppressChangesOfSelection(FALSE),
|
|
|
|
bMirrorSide0(FALSE),
|
|
|
|
nEditMode(SID_BEZIER_MOVE),
|
|
|
|
pWaterCanCandidate(NULL)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-12-14 16:03:18 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
FunctionReference FuSelection::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
|
|
|
|
{
|
|
|
|
FunctionReference xFunc( new FuSelection( pViewSh, pWin, pView, pDoc, rReq ) );
|
|
|
|
xFunc->DoExecute(rReq);
|
|
|
|
return xFunc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuSelection::DoExecute( SfxRequest& rReq )
|
|
|
|
{
|
|
|
|
FuDraw::DoExecute( rReq );
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// Objektbar auswaehlen
|
|
|
|
SelectionHasChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Destruktor
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseButtonDown-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuSelection::MouseButtonDown(const MouseEvent& rMEvt)
|
|
|
|
{
|
|
|
|
// Hack fuer #?????#
|
|
|
|
bHideAndAnimate = FALSE;
|
|
|
|
|
|
|
|
pHdl = NULL;
|
|
|
|
BOOL bReturn = FuDraw::MouseButtonDown(rMEvt);
|
|
|
|
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
|
|
|
|
|
|
|
bMBDown = TRUE;
|
|
|
|
bSelectionChanged = FALSE;
|
|
|
|
|
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();
|
2000-09-18 16:07:07 +00:00
|
|
|
return TRUE;
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
USHORT nDrgLog = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
|
|
|
|
USHORT nHitLog = USHORT ( 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)
|
|
|
|
// it makes no sense and b) to have IsAction() return FALSE when called
|
|
|
|
// 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
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* KEIN BEZIER_EDITOR
|
|
|
|
******************************************************************/
|
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);
|
|
|
|
bMirrorSide0 = BOOL (nAngle0 < 18000L);
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (!pHdl && mpView->Is3DRotationCreationActive())
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Wenn 3D-Rotationskoerper erstellt werden sollen, jetzt
|
|
|
|
* die Erstellung beenden
|
|
|
|
******************************************************************/
|
|
|
|
bSuppressChangesOfSelection = TRUE;
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->EnterWait();
|
|
|
|
mpView->End3DCreation();
|
2000-09-18 16:07:07 +00:00
|
|
|
bSuppressChangesOfSelection = FALSE;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->ResetCreationActive();
|
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->LeaveWait();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
BOOL bTextEdit = FALSE;
|
|
|
|
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
|
|
|
{
|
|
|
|
bTextEdit = TRUE;
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
{
|
|
|
|
// Wechsel Rotationskoerper -> Selektion
|
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
|
|
|
|
{
|
|
|
|
// Handle oder markiertes Objekt getroffen
|
|
|
|
bFirstMouseMove = TRUE;
|
|
|
|
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);
|
2000-09-18 16:07:07 +00:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
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);
|
2000-09-18 16:07:07 +00:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
else if ( bTextEdit )
|
|
|
|
{
|
|
|
|
UINT16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
|
|
|
|
|
|
|
|
if (aVEvt.pObj->GetObjInventor() == SdrInventor &&
|
|
|
|
(nSdrObjKind == OBJ_TEXT ||
|
|
|
|
nSdrObjKind == OBJ_TITLETEXT ||
|
|
|
|
nSdrObjKind == OBJ_OUTLINETEXT ||
|
|
|
|
!aVEvt.pObj->IsEmptyPresObj()))
|
|
|
|
{
|
|
|
|
// Seamless Editing: Verzweigen zur Texteingabe
|
|
|
|
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);
|
|
|
|
return bReturn; // VORSICHT, durch den synchronen Slot ist das objekt jetzt geloescht
|
|
|
|
}
|
|
|
|
}
|
|
|
|
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());
|
2001-06-12 11:46:15 +00: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())
|
|
|
|
{
|
|
|
|
// Im neuen Frame oeffnen
|
|
|
|
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Im aktuellen Frame oeffnen
|
|
|
|
SfxFrameItem aFrameItem(SID_DOCFRAME, pFrame);
|
|
|
|
pFrame->GetDispatcher()->Execute(SID_OPENDOC, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aStrItem, &aFrameItem, &aBrowseItem, &aReferer, 0L);
|
|
|
|
}
|
|
|
|
|
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
// In die Gruppe hineinschauen
|
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
|
|
|
{
|
|
|
|
// Neu: Doppelklick auf selektiertes Gruppenobjekt
|
|
|
|
// Gruppe betreten
|
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();
|
2000-09-18 16:07:07 +00:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
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
|
|
|
{
|
2003-04-08 14:20:47 +00:00
|
|
|
bReturn = TRUE;
|
|
|
|
BOOL bDeactivateOLE = FALSE;
|
|
|
|
|
|
|
|
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
|
|
|
{
|
|
|
|
// OLE-Objekt wird im nachfolgenden UnmarkAll() deaktiviert
|
|
|
|
bDeactivateOLE = TRUE;
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAll();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2003-04-08 14:20:47 +00:00
|
|
|
BOOL bMarked = FALSE;
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
|
|
|
BOOL bToggle = 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
|
|
|
{
|
|
|
|
// Bei Einfachselektion kein Toggle
|
|
|
|
bToggle = TRUE;
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00: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)))
|
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* Objekt verschieben
|
|
|
|
**********************************************************/
|
|
|
|
aDragTimer.Start();
|
|
|
|
|
|
|
|
pHdl=mpView->PickHandle(aMDPos);
|
|
|
|
if ( ! rMEvt.IsRight())
|
|
|
|
mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* Objekt selektieren
|
|
|
|
**********************************************************/
|
|
|
|
if ( ! rMEvt.IsRight())
|
|
|
|
mpView->BegMarkObj(aMDPos);
|
|
|
|
}
|
2003-04-08 14:20:47 +00:00
|
|
|
}
|
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)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Handle draggen
|
|
|
|
******************************************************************/
|
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)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Klebepunkt einfuegen
|
|
|
|
******************************************************************/
|
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())
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Klebepunkt selektieren
|
|
|
|
******************************************************************/
|
|
|
|
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())
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Objekt verschieben
|
|
|
|
******************************************************************/
|
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)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Klebepunkt selektieren
|
|
|
|
******************************************************************/
|
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
|
|
|
|
{
|
|
|
|
// #90239# point IS marked and NO shift is pressed. Start
|
|
|
|
// 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
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Objekt selektieren oder draggen
|
|
|
|
******************************************************************/
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
BOOL bMarked = FALSE;
|
|
|
|
|
|
|
|
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
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), FALSE);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bMarked &&
|
|
|
|
(!rMEvt.IsShift() || eHit == SDRHIT_MARKEDOBJECT))
|
|
|
|
{
|
|
|
|
// Objekt verschieben
|
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
|
|
|
{
|
|
|
|
/**************************************************************
|
|
|
|
* Klebepunkt selektieren
|
|
|
|
**************************************************************/
|
|
|
|
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
|
|
|
|
{
|
|
|
|
/**************************************************************
|
|
|
|
* Objekt selektieren
|
|
|
|
**************************************************************/
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseMove-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuSelection::MouseMove(const MouseEvent& rMEvt)
|
|
|
|
{
|
|
|
|
BOOL bReturn = FuDraw::MouseMove(rMEvt);
|
|
|
|
|
|
|
|
if (aDragTimer.IsActive())
|
|
|
|
{
|
|
|
|
if(bFirstMouseMove)
|
|
|
|
{
|
|
|
|
bFirstMouseMove = FALSE;
|
|
|
|
}
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseButtonUp-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuSelection::MouseButtonUp(const MouseEvent& rMEvt)
|
|
|
|
{
|
|
|
|
BOOL bReturn = 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();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if (bHideAndAnimate)
|
|
|
|
{
|
|
|
|
// Animation laeuft noch -> sofort returnieren
|
|
|
|
bHideAndAnimate = FALSE;
|
|
|
|
pHdl = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 16:07:07 +00:00
|
|
|
return(TRUE);
|
|
|
|
}
|
|
|
|
|
|
|
|
if (aDragTimer.IsActive() )
|
|
|
|
{
|
|
|
|
aDragTimer.Stop();
|
|
|
|
bIsInDragMode = FALSE;
|
|
|
|
}
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if( !mpView )
|
2006-11-01 13:15:58 +00:00
|
|
|
return (FALSE);
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
Point aPnt( mpWindow->PixelToLogic( rMEvt.GetPosPixel() ) );
|
|
|
|
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
|
|
|
USHORT nDrgLog = USHORT ( 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
|
|
|
{
|
|
|
|
/**********************************************************************
|
|
|
|
* KEIN BEZIER_EDITOR
|
|
|
|
**********************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
if ( mpView->IsDragObj() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Objekt wurde verschoben
|
|
|
|
******************************************************************/
|
2006-12-13 16:56:45 +00:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
|
|
|
|
|
|
|
|
if (bDragWithCopy)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
bDragWithCopy = !mpView->IsPresObjSelected(FALSE, 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 &&
|
|
|
|
Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
|
|
|
|
Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
|
|
|
{
|
|
|
|
/**************************************************************
|
|
|
|
* Toggle zw. Selektion und Rotation
|
|
|
|
**************************************************************/
|
|
|
|
SdrObject* pSingleObj = NULL;
|
2006-12-13 16:56:45 +00:00
|
|
|
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()
|
|
|
|
&& (mpViewShell->GetFrameView()->IsClickChangeRotation()
|
2004-05-17 16:21:38 +00:00
|
|
|
|| (pSingleObj
|
|
|
|
&& pSingleObj->GetObjInventor()==E3dInventor))
|
|
|
|
&& ! bSelectionOnly)
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
{
|
|
|
|
bTempRotation = TRUE;
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
bSuppressChangesOfSelection = TRUE;
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->Start3DCreation();
|
2000-09-18 16:07:07 +00:00
|
|
|
bSuppressChangesOfSelection = FALSE;
|
|
|
|
}
|
|
|
|
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
|
|
|
{
|
|
|
|
/*********************************************************
|
|
|
|
* Wenn 3D-Rotationskoerper erstellt werden sollen, jetzt
|
|
|
|
* die Erstellung beenden
|
|
|
|
**********************************************************/
|
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);
|
|
|
|
BOOL bMirrorSide1 = BOOL (nAngle1 < 18000L);
|
|
|
|
|
|
|
|
if (bMirrorSide0 != bMirrorSide1)
|
|
|
|
{
|
|
|
|
bSuppressChangesOfSelection = TRUE;
|
2006-12-13 16:56:45 +00:00
|
|
|
if(mpWindow)
|
|
|
|
mpWindow->EnterWait();
|
|
|
|
mpView->End3DCreation();
|
2000-09-18 16:07:07 +00:00
|
|
|
bSuppressChangesOfSelection = FALSE;
|
|
|
|
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()
|
|
|
|
&& Abs(aPnt.X() - aMDPos.X()) < nDrgLog
|
|
|
|
&& Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// Gruppe betreten
|
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() )
|
|
|
|
{
|
|
|
|
// Bei rechter Maustaste wird im Giesskannenmodus ein Undo ausgefuehrt
|
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
|
|
|
// #108981#
|
|
|
|
// Added UNDOs for the WaterCan mode. This was never done in
|
|
|
|
// the past, thus it was missing all the time.
|
2006-12-13 16:56:45 +00:00
|
|
|
SdrUndoAction* pUndoAttr = mpDoc->GetSdrUndoFactory().CreateUndoAttrObject(*pWaterCanCandidate, sal_True, sal_True);
|
|
|
|
mpView->BegUndo(pUndoAttr->GetComment());
|
|
|
|
mpView->AddUndo(mpDoc->GetSdrUndoFactory().CreateUndoGeoObject(*pWaterCanCandidate));
|
|
|
|
mpView->AddUndo(pUndoAttr);
|
2003-04-24 15:43:39 +00:00
|
|
|
|
2003-04-08 14:20:47 +00:00
|
|
|
pWaterCanCandidate->SetStyleSheet (pStyleSheet, FALSE);
|
2003-04-24 15:43:39 +00:00
|
|
|
|
|
|
|
// #108981#
|
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
|
|
|
}
|
|
|
|
|
|
|
|
USHORT nClicks = rMEvt.GetClicks();
|
|
|
|
|
|
|
|
if (nClicks == 2 && rMEvt.IsLeft() && bMBDown &&
|
|
|
|
!rMEvt.IsMod1() && !rMEvt.IsShift() )
|
|
|
|
{
|
|
|
|
DoubleClick(rMEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
bMBDown = FALSE;
|
|
|
|
|
|
|
|
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;
|
2006-12-13 16:56:45 +00:00
|
|
|
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) ) )
|
|
|
|
{
|
|
|
|
bReturn = TRUE;
|
|
|
|
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);
|
2000-09-18 16:07:07 +00:00
|
|
|
return bReturn; // VORSICHT, durch den synchronen Slot ist das objekt jetzt geloescht
|
|
|
|
}
|
|
|
|
|
|
|
|
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();
|
2000-09-18 16:07:07 +00:00
|
|
|
BOOL bDragWithCopy = (rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
|
|
|
|
|
|
|
|
if (bDragWithCopy)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
bDragWithCopy = !mpView->IsPresObjSelected(FALSE, 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
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
USHORT nDrgLog2 = USHORT ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
|
|
|
|
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if (Abs(aMDPos.X() - aPos.X()) < nDrgLog2 &&
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
// Klick auf der Stelle: deselektieren
|
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() &&
|
|
|
|
Abs(aPnt.X() - aMDPos.X()) < nDrgLog &&
|
|
|
|
Abs(aPnt.Y() - aMDPos.Y()) < nDrgLog)
|
|
|
|
{
|
|
|
|
// Gruppe betreten
|
2006-12-13 16:56:45 +00: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);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Tastaturereignisse bearbeiten
|
|
|
|
|*
|
|
|
|
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert TRUE, andernfalls
|
|
|
|
|* FALSE.
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuSelection::KeyInput(const KeyEvent& rKEvt)
|
|
|
|
{
|
|
|
|
BOOL bReturn = FALSE;
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Function aktivieren
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
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:
|
|
|
|
{
|
|
|
|
// (gemapter) Slot wird explizit auf Rotate gesetzt #31052#
|
2006-12-13 16:56:45 +00:00
|
|
|
if( mpViewShell->ISA(DrawViewShell) )
|
2001-02-13 11:43:44 +00:00
|
|
|
{
|
2004-01-20 10:12:35 +00:00
|
|
|
USHORT* 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;
|
|
|
|
bSuppressChangesOfSelection = TRUE;
|
|
|
|
|
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
|
|
|
|
|
|
|
bSuppressChangesOfSelection = FALSE;
|
|
|
|
}
|
|
|
|
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)
|
|
|
|
{
|
|
|
|
bTempRotation = FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
FuDraw::Activate();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Function deaktivieren
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuSelection::Deactivate()
|
|
|
|
{
|
|
|
|
FuDraw::Deactivate();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Selektion hat sich geaendert
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuSelection::SelectionHasChanged()
|
|
|
|
{
|
|
|
|
bSelectionChanged = TRUE;
|
|
|
|
|
|
|
|
FuDraw::SelectionHasChanged();
|
|
|
|
|
2006-12-13 16:56:45 +00:00
|
|
|
if ((mpView->Is3DRotationCreationActive() && !bSuppressChangesOfSelection))
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// Wechsel Rotationskoerper -> Selektion
|
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
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Aktuellen Bezier-Editmodus setzen
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuSelection::SetEditMode(USHORT nMode)
|
|
|
|
{
|
|
|
|
nEditMode = nMode;
|
|
|
|
|
|
|
|
if (nEditMode == SID_BEZIER_INSERT)
|
|
|
|
{
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->SetInsObjPointMode(TRUE);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 16:56:45 +00: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);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Animation oder Interaktion ausfuehren
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuSelection::AnimateObj(SdrObject* pObj, const Point& rPos)
|
|
|
|
{
|
|
|
|
BOOL bAnimated = FALSE;
|
|
|
|
BOOL bClosed = pObj->IsClosedObj();
|
|
|
|
BOOL bFilled = FALSE;
|
|
|
|
|
|
|
|
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();
|
|
|
|
USHORT nHitLog = USHORT ( 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
|
|
|
|
|
|
|
if ( pIMapObj && pIMapObj->GetURL().Len() )
|
|
|
|
{
|
|
|
|
// Sprung zu Dokument
|
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);
|
2001-06-12 11:46:15 +00: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);
|
|
|
|
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
}
|
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
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* Animations-Objekt in der Mitte getroffen -> Interaktion
|
|
|
|
**********************************************************/
|
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:
|
|
|
|
{
|
|
|
|
// Sprung zu Bookmark (Seite oder Objekt)
|
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);
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_DOCUMENT:
|
|
|
|
{
|
2009-05-19 09:32:45 +00:00
|
|
|
String sBookmark( pInfo->GetBookmark() );
|
2000-09-18 16:07:07 +00:00
|
|
|
// Sprung zu Dokument
|
2009-05-19 09:32:45 +00:00
|
|
|
if (sBookmark.Len())
|
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);
|
2001-06-12 11:46:15 +00: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);
|
|
|
|
}
|
|
|
|
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_PREVPAGE:
|
|
|
|
{
|
|
|
|
// Sprung zur vorherigen Seite
|
|
|
|
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);
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_NEXTPAGE:
|
|
|
|
{
|
|
|
|
// Sprung zur naechsten Seite
|
|
|
|
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);
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_FIRSTPAGE:
|
|
|
|
{
|
|
|
|
// Sprung zu erster Seite
|
|
|
|
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);
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_LASTPAGE:
|
|
|
|
{
|
|
|
|
// Sprung zu letzter Seite
|
|
|
|
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);
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_SOUND:
|
|
|
|
{
|
2008-03-07 15:26:28 +00:00
|
|
|
try
|
|
|
|
{
|
2009-05-19 09:32:45 +00:00
|
|
|
mxPlayer.set( avmedia::MediaWindow::createPlayer( pInfo->GetBookmark()), uno::UNO_QUERY_THROW );
|
2008-03-07 15:26:28 +00:00
|
|
|
mxPlayer->start();
|
|
|
|
}
|
|
|
|
catch( uno::Exception& e )
|
|
|
|
{
|
|
|
|
(void)e;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_VERB:
|
|
|
|
{
|
|
|
|
// Verb zuweisen
|
2006-12-13 16:56:45 +00:00
|
|
|
mpView->UnmarkAll();
|
|
|
|
mpView->MarkObj(pObj, mpView->GetSdrPageView(), FALSE, FALSE);
|
|
|
|
pDrViewSh->DoVerb((sal_Int16)pInfo->mnVerb);
|
2000-09-18 16:07:07 +00:00
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_PROGRAM:
|
|
|
|
{
|
2005-01-11 11:12:11 +00:00
|
|
|
String 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 ) );
|
|
|
|
SfxBoolItem aBrowsing( SID_BROWSE, TRUE );
|
|
|
|
|
|
|
|
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
|
|
|
}
|
|
|
|
|
|
|
|
bAnimated = TRUE;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_MACRO:
|
|
|
|
{
|
|
|
|
// Execute makro
|
2009-05-19 09:32:45 +00:00
|
|
|
String 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
|
2007-01-09 10:29:19 +00:00
|
|
|
BOOL bTmp = sal_False;
|
2004-05-19 06:44:08 +00:00
|
|
|
if ( eErr == ERRCODE_NONE &&
|
|
|
|
aRet.getValueType() == getCppuBooleanType() &&
|
|
|
|
sal_True == ( aRet >>= bTmp ) &&
|
|
|
|
bTmp == TRUE )
|
|
|
|
{
|
|
|
|
bAnimated = TRUE;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bAnimated = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// aMacro has got following format:
|
|
|
|
// "Macroname.Modulname.Libname.Documentname" or
|
|
|
|
// "Macroname.Modulname.Libname.Applicationsname"
|
|
|
|
String aMacroName =
|
|
|
|
aMacro.GetToken(0, sal_Unicode('.'));
|
|
|
|
String aModulName =
|
|
|
|
aMacro.GetToken(1, sal_Unicode('.'));
|
|
|
|
String aLibName =
|
|
|
|
aMacro.GetToken(2, sal_Unicode('.'));
|
|
|
|
String aDocName =
|
|
|
|
aMacro.GetToken(3, sal_Unicode('.'));
|
|
|
|
|
|
|
|
// In this moment the Call-method only
|
|
|
|
// resolves modulename+macroname
|
|
|
|
String aExecMacro(aModulName);
|
|
|
|
aExecMacro.Append( sal_Unicode('.') );
|
|
|
|
aExecMacro.Append( 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:
|
|
|
|
{
|
|
|
|
bAnimated = FALSE;
|
|
|
|
}
|
|
|
|
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
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* Effekt-Objekt in der Mitte getroffen -> Effekt abspielen
|
|
|
|
**********************************************************/
|
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:
|
|
|
|
bAnimated = FALSE;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bAnimated;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2002-11-29 13:23:07 +00:00
|
|
|
/** is called when the currenct function should be aborted. <p>
|
|
|
|
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;
|
2006-12-13 16:56:45 +00:00
|
|
|
USHORT nHitLog = USHORT (mpWindow->PixelToLogic(Size(HITPIX,0)).Width());
|
|
|
|
mpView->PickObj (rTestPoint, nHitLog, pObject, pPageView, SDRSEARCH_PICKMARKABLE);
|
2003-04-08 14:20:47 +00:00
|
|
|
return pObject;
|
|
|
|
}
|
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: */
|