2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2008-04-10 14:18:22 -05:00
|
|
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2010-02-12 08:01:35 -06:00
|
|
|
* Copyright 2000, 2010 Oracle and/or its affiliates.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 14:18:22 -05:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 14:18:22 -05:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 11:07:07 -05:00
|
|
|
*
|
2008-04-10 14:18:22 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-10 14:18:22 -05: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 11:07:07 -05:00
|
|
|
*
|
2008-04-10 14:18:22 -05: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 11:07:07 -05:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 12:49:27 -05:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <sot/object.hxx>
|
2010-01-08 11:32:51 -06:00
|
|
|
#include <editeng/eeitem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <vcl/waitobj.hxx>
|
|
|
|
|
2010-01-08 11:32:51 -06:00
|
|
|
#include <editeng/flditem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <svx/svdogrp.hxx>
|
2003-04-24 08:38:13 -05:00
|
|
|
#include <tools/urlobj.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <vcl/help.hxx>
|
|
|
|
#include <svx/bmpmask.hxx>
|
|
|
|
#include <svx/svdotext.hxx>
|
|
|
|
#include <sfx2/app.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/bindings.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
#include <svtools/imapobj.hxx>
|
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
#include <svx/obj3d.hxx>
|
|
|
|
#include <svx/polysc3d.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
|
2004-10-04 12:31:33 -05:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "anminfo.hxx"
|
|
|
|
#include "anmdef.hxx"
|
|
|
|
#include "imapinfo.hxx"
|
|
|
|
#include "app.hrc"
|
|
|
|
#include "glob.hrc"
|
|
|
|
#include "strings.hrc"
|
|
|
|
#include "res_bmp.hrc"
|
|
|
|
|
|
|
|
#include "app.hxx"
|
2004-01-20 04:01:09 -06:00
|
|
|
#include "GraphicDocShell.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "fudraw.hxx"
|
2004-01-20 04:01:09 -06:00
|
|
|
#include "ViewShell.hxx"
|
|
|
|
#include "FrameView.hxx"
|
|
|
|
#include "View.hxx"
|
|
|
|
#ifndef SD_WINDOW_SHELL_HXX
|
|
|
|
#include "Window.hxx"
|
|
|
|
#endif
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "drawdoc.hxx"
|
2004-01-20 04:01:09 -06:00
|
|
|
#include "DrawDocShell.hxx"
|
|
|
|
#include "Client.hxx"
|
2000-09-18 11:07:07 -05:00
|
|
|
#include "sdresid.hxx"
|
|
|
|
#include "drawview.hxx"
|
|
|
|
#include "fusel.hxx"
|
2009-10-15 17:05:16 -05:00
|
|
|
#include <svl/aeitem.hxx>
|
2000-09-18 11:07:07 -05:00
|
|
|
#include <vcl/msgbox.hxx>
|
2008-04-03 07:47:14 -05:00
|
|
|
#include "slideshow.hxx"
|
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 09:28:15 -05:00
|
|
|
#include <svx/sdrhittesthelper.hxx>
|
2008-04-03 07:47:14 -05:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
using namespace ::com::sun::star;
|
|
|
|
|
2004-01-20 04:01:09 -06:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
TYPEINIT1( FuDraw, FuPoor );
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Base-class for all drawmodul-specific functions
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-01-20 04:01:09 -06:00
|
|
|
FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView,
|
2000-09-18 11:07:07 -05:00
|
|
|
SdDrawDocument* pDoc, SfxRequest& rReq) :
|
|
|
|
FuPoor(pViewSh, pWin, pView, pDoc, rReq),
|
|
|
|
bMBDown(FALSE),
|
2006-12-13 10:55:48 -06:00
|
|
|
bDragHelpLine(FALSE),
|
|
|
|
bPermanent(FALSE)
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2005-12-14 09:57:45 -06:00
|
|
|
FunctionReference FuDraw::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent )
|
|
|
|
{
|
|
|
|
FuDraw* pFunc;
|
|
|
|
FunctionReference xFunc( pFunc = new FuDraw( pViewSh, pWin, pView, pDoc, rReq ) );
|
|
|
|
pFunc->SetPermanent(bPermanent);
|
|
|
|
return xFunc;
|
|
|
|
}
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Destruktor
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
FuDraw::~FuDraw()
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->BrkAction();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseButtonDown-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::MouseButtonDown(const MouseEvent& rMEvt)
|
|
|
|
{
|
2002-03-01 03:04:09 -06:00
|
|
|
// #95491# remember button state for creation of own MouseEvents
|
|
|
|
SetMouseButtonCode(rMEvt.GetButtons());
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
BOOL bReturn = FALSE;
|
|
|
|
|
|
|
|
bDragHelpLine = FALSE;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
aMDPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( rMEvt.IsLeft() )
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
// BOOL bOrtho = mpView->IsOrthoDesired() || pFrameView->IsOrtho();
|
2000-09-18 11:07:07 -05:00
|
|
|
// bOrtho = bOrtho != rMEvt.IsShift();
|
|
|
|
BOOL bOrtho = FALSE;
|
|
|
|
|
|
|
|
BOOL bRestricted = TRUE;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsDragObj())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// object is dragged (move, resize,...)
|
2006-12-13 10:55:48 -06:00
|
|
|
const SdrHdl* pHdl = mpView->GetDragStat().GetHdl();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl()))
|
|
|
|
{
|
|
|
|
// Move
|
|
|
|
bRestricted = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2004-11-17 02:20:02 -06:00
|
|
|
// #i33136#
|
|
|
|
if(bRestricted && doConstructOrthogonal())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// Restrict movement:
|
|
|
|
// rectangle->quadrat, ellipse->circle etc.
|
2001-07-17 00:51:52 -05:00
|
|
|
bOrtho = !rMEvt.IsShift();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho();
|
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (!mpView->IsSnapEnabled())
|
|
|
|
mpView->SetSnapEnabled(TRUE);
|
2000-09-18 11:07:07 -05:00
|
|
|
BOOL bCntrl = rMEvt.IsMod1();
|
|
|
|
|
|
|
|
BOOL bGridSnap = pFrameView->IsGridSnap();
|
|
|
|
bGridSnap = (bCntrl != bGridSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsGridSnap() != bGridSnap)
|
|
|
|
mpView->SetGridSnap(bGridSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bBordSnap = pFrameView->IsBordSnap();
|
|
|
|
bBordSnap = (bCntrl != bBordSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsBordSnap() != bBordSnap)
|
|
|
|
mpView->SetBordSnap(bBordSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bHlplSnap = pFrameView->IsHlplSnap();
|
|
|
|
bHlplSnap = (bCntrl != bHlplSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsHlplSnap() != bHlplSnap)
|
|
|
|
mpView->SetHlplSnap(bHlplSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
|
|
|
|
bOFrmSnap = (bCntrl != bOFrmSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOFrmSnap() != bOFrmSnap)
|
|
|
|
mpView->SetOFrmSnap(bOFrmSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOPntSnap = pFrameView->IsOPntSnap();
|
|
|
|
bOPntSnap = (bCntrl != bOPntSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOPntSnap() != bOPntSnap)
|
|
|
|
mpView->SetOPntSnap(bOPntSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOConSnap = pFrameView->IsOConSnap();
|
|
|
|
bOConSnap = (bCntrl != bOConSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOConSnap() != bOConSnap)
|
|
|
|
mpView->SetOConSnap(bOConSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsAngleSnapEnabled() != bAngleSnap)
|
|
|
|
mpView->SetAngleSnapEnabled(bAngleSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOrtho() != bOrtho)
|
|
|
|
mpView->SetOrtho(bOrtho);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bCenter = rMEvt.IsMod2();
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->IsCreate1stPointAsCenter() != bCenter ||
|
|
|
|
mpView->IsResizeAtCenter() != bCenter )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->SetCreate1stPointAsCenter(bCenter);
|
|
|
|
mpView->SetResizeAtCenter(bCenter);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
SdrPageView* pPV = 0;
|
|
|
|
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
// #76572# look only for HelpLines when they are visible (!)
|
|
|
|
BOOL bHelpLine(FALSE);
|
2006-12-13 10:55:48 -06:00
|
|
|
if(mpView->IsHlplVisible())
|
|
|
|
bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV);
|
|
|
|
BOOL bHitHdl = (mpView->PickHandle(aMDPos) != NULL);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( bHelpLine
|
2006-12-13 10:55:48 -06:00
|
|
|
&& !mpView->IsCreateObj()
|
|
|
|
&& ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bCntrl)) )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->CaptureMouse();
|
|
|
|
mpView->BegDragHelpLine(nHelpLine, pPV);
|
|
|
|
bDragHelpLine = mpView->IsDragHelpLine();
|
2000-09-18 11:07:07 -05:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
|
|
|
|
return bReturn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseMove-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::MouseMove(const MouseEvent& rMEvt)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
|
|
|
Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
// BOOL bOrtho = mpView->IsOrthoDesired() || pFrameView->IsOrtho();
|
2000-09-18 11:07:07 -05:00
|
|
|
// bOrtho = bOrtho != rMEvt.IsShift();
|
|
|
|
BOOL bOrtho = FALSE;
|
|
|
|
|
|
|
|
BOOL bRestricted = TRUE;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsDragObj())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// object is dragged (move, resize, ...)
|
2006-12-13 10:55:48 -06:00
|
|
|
const SdrHdl* pHdl = mpView->GetDragStat().GetHdl();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl()))
|
|
|
|
{
|
|
|
|
// Move
|
|
|
|
bRestricted = FALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsAction())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2004-11-17 02:20:02 -06:00
|
|
|
// #i33136#
|
|
|
|
if(bRestricted && doConstructOrthogonal())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// Restrict movement:
|
|
|
|
// rectangle->quadrat, ellipse->circle etc.
|
2001-07-17 00:51:52 -05:00
|
|
|
bOrtho = !rMEvt.IsShift();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho();
|
|
|
|
}
|
|
|
|
|
|
|
|
BOOL bCntrl = rMEvt.IsMod1();
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->SetDragWithCopy(rMEvt.IsMod1() && pFrameView->IsDragWithCopy());
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bGridSnap = pFrameView->IsGridSnap();
|
|
|
|
bGridSnap = (bCntrl != bGridSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsGridSnap() != bGridSnap)
|
|
|
|
mpView->SetGridSnap(bGridSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bBordSnap = pFrameView->IsBordSnap();
|
|
|
|
bBordSnap = (bCntrl != bBordSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsBordSnap() != bBordSnap)
|
|
|
|
mpView->SetBordSnap(bBordSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bHlplSnap = pFrameView->IsHlplSnap();
|
|
|
|
bHlplSnap = (bCntrl != bHlplSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsHlplSnap() != bHlplSnap)
|
|
|
|
mpView->SetHlplSnap(bHlplSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOFrmSnap = pFrameView->IsOFrmSnap();
|
|
|
|
bOFrmSnap = (bCntrl != bOFrmSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOFrmSnap() != bOFrmSnap)
|
|
|
|
mpView->SetOFrmSnap(bOFrmSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOPntSnap = pFrameView->IsOPntSnap();
|
|
|
|
bOPntSnap = (bCntrl != bOPntSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOPntSnap() != bOPntSnap)
|
|
|
|
mpView->SetOPntSnap(bOPntSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bOConSnap = pFrameView->IsOConSnap();
|
|
|
|
bOConSnap = (bCntrl != bOConSnap);
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOConSnap() != bOConSnap)
|
|
|
|
mpView->SetOConSnap(bOConSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled();
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsAngleSnapEnabled() != bAngleSnap)
|
|
|
|
mpView->SetAngleSnapEnabled(bAngleSnap);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOrtho() != bOrtho)
|
|
|
|
mpView->SetOrtho(bOrtho);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bCenter = rMEvt.IsMod2();
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->IsCreate1stPointAsCenter() != bCenter ||
|
|
|
|
mpView->IsResizeAtCenter() != bCenter )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->SetCreate1stPointAsCenter(bCenter);
|
|
|
|
mpView->SetResizeAtCenter(bCenter);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->IsDragHelpLine() )
|
|
|
|
mpView->MovDragHelpLine(aPos);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
BOOL bReturn = mpView->MouseMove(rMEvt, mpWindow);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsAction())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// Because the flag set back if necessary in MouseMove
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsOrtho() != bOrtho)
|
|
|
|
mpView->SetOrtho(bOrtho);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
|
|
|
|
return bReturn;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* MouseButtonUp-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::MouseButtonUp(const MouseEvent& rMEvt)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->IsDragHelpLine() )
|
|
|
|
mpView->EndDragHelpLine();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( bDragHelpLine )
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel());
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) )
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
FrameView* pFrameView = mpViewShell->GetFrameView();
|
|
|
|
mpView->SetOrtho( pFrameView->IsOrtho() );
|
|
|
|
mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
|
|
|
|
mpView->SetSnapEnabled(TRUE);
|
|
|
|
mpView->SetCreate1stPointAsCenter(FALSE);
|
|
|
|
mpView->SetResizeAtCenter(FALSE);
|
|
|
|
mpView->SetDragWithCopy(pFrameView->IsDragWithCopy());
|
|
|
|
mpView->SetGridSnap(pFrameView->IsGridSnap());
|
|
|
|
mpView->SetBordSnap(pFrameView->IsBordSnap());
|
|
|
|
mpView->SetHlplSnap(pFrameView->IsHlplSnap());
|
|
|
|
mpView->SetOFrmSnap(pFrameView->IsOFrmSnap());
|
|
|
|
mpView->SetOPntSnap(pFrameView->IsOPntSnap());
|
|
|
|
mpView->SetOConSnap(pFrameView->IsOConSnap());
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
bIsInDragMode = FALSE;
|
|
|
|
ForcePointer(&rMEvt);
|
|
|
|
FuPoor::MouseButtonUp(rMEvt);
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Process keyboard-events
|
|
|
|
|*
|
|
|
|
|* When processing a KeyEvent the returnvalue is TRUE, otherwise FALSE.
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::KeyInput(const KeyEvent& rKEvt)
|
|
|
|
{
|
|
|
|
BOOL bReturn = FALSE;
|
|
|
|
|
|
|
|
switch ( rKEvt.GetKeyCode().GetCode() )
|
|
|
|
{
|
|
|
|
case KEY_ESCAPE:
|
|
|
|
{
|
2002-12-05 08:29:50 -06:00
|
|
|
bReturn = FuDraw::cancel();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KEY_DELETE:
|
|
|
|
case KEY_BACKSPACE:
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
if (!mpDocSh->IsReadOnly())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView && mpView->IsPresObjSelected(FALSE, TRUE, FALSE, TRUE) )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
InfoBox(mpWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
// Falls IP-Client aktiv, werden die Pointer
|
|
|
|
// auf das OLE- und das alte Graphic-Object
|
|
|
|
// am SdClient zurueckgesetzt, damit bei
|
|
|
|
// ::SelectionHasChanged nach dem Loeschen
|
|
|
|
// nicht mehr versucht wird, ein Grafik-Objekt
|
|
|
|
// zu restaurieren, das gar nicht mehr existiert.
|
|
|
|
// Alle anderen OLE-Objekte sind davon nicht
|
|
|
|
// betroffen (KA 06.10.95)
|
2006-12-13 10:55:48 -06:00
|
|
|
OSL_ASSERT (mpViewShell->GetViewShell()!=NULL);
|
2004-01-20 04:01:09 -06:00
|
|
|
Client* pIPClient = static_cast<Client*>(
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewShell()->GetIPClient());
|
2004-10-04 12:31:33 -05:00
|
|
|
if (pIPClient && pIPClient->IsObjectInPlaceActive())
|
2000-09-18 11:07:07 -05:00
|
|
|
pIPClient->SetSdrGrafObj(NULL);
|
|
|
|
|
|
|
|
// wait-mousepointer while deleting object
|
2006-12-13 10:55:48 -06:00
|
|
|
WaitObject aWait( (Window*)mpViewShell->GetActiveWindow() );
|
2000-09-18 11:07:07 -05:00
|
|
|
// delete object
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->DeleteMarked();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KEY_TAB:
|
|
|
|
{
|
|
|
|
KeyCode aCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( !aCode.IsMod1() && !aCode.IsMod2() )
|
|
|
|
{
|
2002-11-19 08:54:09 -06:00
|
|
|
// #105336# Moved next line which was a bugfix itself into
|
|
|
|
// the scope which really does the object selection travel
|
|
|
|
// and thus is allowed to call SelectionHasChanged().
|
|
|
|
|
|
|
|
// Switch to FuSelect.
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
|
2002-11-19 08:54:09 -06:00
|
|
|
SID_OBJECT_SELECT,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
// changeover to the next object
|
2006-12-13 10:55:48 -06:00
|
|
|
if(!mpView->MarkNextObj( !aCode.IsShift() ))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2002-02-15 09:56:24 -06:00
|
|
|
// #97016# No next object: go over open end and
|
|
|
|
// get first from the other side
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->UnmarkAllObj();
|
|
|
|
mpView->MarkNextObj(!aCode.IsShift());
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
2002-02-26 07:28:41 -06:00
|
|
|
|
|
|
|
// #97016# II
|
2006-12-13 10:55:48 -06:00
|
|
|
if(mpView->AreObjectsMarked())
|
|
|
|
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
|
2002-02-26 07:28:41 -06:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KEY_END:
|
|
|
|
{
|
|
|
|
KeyCode aCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( aCode.IsMod1() )
|
|
|
|
{
|
2002-02-15 09:56:24 -06:00
|
|
|
// #97016# mark last object
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->UnmarkAllObj();
|
|
|
|
mpView->MarkNextObj(FALSE);
|
2002-02-15 09:56:24 -06:00
|
|
|
|
2002-02-26 07:28:41 -06:00
|
|
|
// #97016# II
|
2006-12-13 10:55:48 -06:00
|
|
|
if(mpView->AreObjectsMarked())
|
|
|
|
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
|
2002-02-26 07:28:41 -06:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case KEY_HOME:
|
|
|
|
{
|
|
|
|
KeyCode aCode = rKEvt.GetKeyCode();
|
|
|
|
|
|
|
|
if ( aCode.IsMod1() )
|
|
|
|
{
|
2002-02-15 09:56:24 -06:00
|
|
|
// #97016# mark first object
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->UnmarkAllObj();
|
|
|
|
mpView->MarkNextObj(TRUE);
|
2002-02-15 09:56:24 -06:00
|
|
|
|
2002-02-26 07:28:41 -06:00
|
|
|
// #97016# II
|
2006-12-13 10:55:48 -06:00
|
|
|
if(mpView->AreObjectsMarked())
|
|
|
|
mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
|
2002-02-26 07:28:41 -06:00
|
|
|
|
2000-09-18 11:07:07 -05:00
|
|
|
bReturn = TRUE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bReturn)
|
|
|
|
{
|
|
|
|
bReturn = FuPoor::KeyInput(rKEvt);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->ReleaseMouse();
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return (bReturn);
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Fade out the selection-presentation before scrolling
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::ScrollStart()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* After scrolling show the selection-presentation again
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::ScrollEnd()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Aktivate function
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::Activate()
|
|
|
|
{
|
|
|
|
FuPoor::Activate();
|
|
|
|
ForcePointer();
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Deaktivate function
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::Deactivate()
|
|
|
|
{
|
|
|
|
FuPoor::Deactivate();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Toggle mouse-pointer
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::ForcePointer(const MouseEvent* pMEvt)
|
|
|
|
{
|
|
|
|
Point aPnt;
|
|
|
|
USHORT nModifier = 0;
|
|
|
|
BOOL bLeftDown = FALSE;
|
|
|
|
BOOL bDefPointer = TRUE;
|
|
|
|
|
|
|
|
if (pMEvt)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
aPnt = mpWindow->PixelToLogic(pMEvt->GetPosPixel());
|
2000-09-18 11:07:07 -05:00
|
|
|
nModifier = pMEvt->GetModifier();
|
|
|
|
bLeftDown = pMEvt->IsLeft();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
aPnt = mpWindow->PixelToLogic(mpWindow->GetPointerPosPixel());
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if (mpView->IsDragObj())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
if (SD_MOD()->GetWaterCan() && !mpView->PickHandle(aPnt))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Giesskannenmodus
|
|
|
|
******************************************************************/
|
|
|
|
bDefPointer = FALSE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_FILL));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
SdrHdl* pHdl = mpView->PickHandle(aPnt);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (SD_MOD()->GetWaterCan() && !pHdl)
|
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Giesskannenmodus
|
|
|
|
******************************************************************/
|
|
|
|
bDefPointer = FALSE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_FILL));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else if (!pHdl &&
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->HasChildWindow(SvxBmpMaskChildWindow::GetChildWindowId()))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
/******************************************************************
|
|
|
|
* Pipettenmodus
|
|
|
|
******************************************************************/
|
2006-12-13 10:55:48 -06:00
|
|
|
SvxBmpMask* pMask = (SvxBmpMask*) mpViewShell->GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId())->GetWindow();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (pMask && pMask->IsEyedropping())
|
|
|
|
{
|
|
|
|
bDefPointer = FALSE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
2006-12-13 10:55:48 -06:00
|
|
|
else if (!mpView->IsAction())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
SdrObject* pObj = NULL;
|
|
|
|
SdrPageView* pPV = NULL;
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
SdrHitKind eHit = SDRHIT_NONE;
|
2006-12-13 10:55:48 -06:00
|
|
|
SdrDragMode eDragMode = mpView->GetDragMode();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (pMEvt)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
eHit = mpView->PickAnything(*pMEvt, SDRMOUSEMOVE, aVEvt);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if ((eDragMode == SDRDRAG_ROTATE) && (eHit == SDRHIT_MARKEDOBJECT))
|
|
|
|
{
|
|
|
|
// The goal of this request is show always the rotation-arrow for 3D-objects at rotation-modus
|
|
|
|
// Independent of the settings at Extras->Optionen->Grafik "Objekte immer verschieben"
|
|
|
|
// 2D-objects acquit in an other way. Otherwise, the rotation of 3d-objects around any axises
|
|
|
|
// wouldn't be possible per default.
|
2006-12-13 10:55:48 -06:00
|
|
|
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
|
2006-07-25 05:33:24 -05:00
|
|
|
SdrObject* pObject = rMarkList.GetMark(0)->GetMarkedSdrObj();
|
2000-09-18 11:07:07 -05:00
|
|
|
if ((pObject->ISA(E3dObject)) && (rMarkList.GetMarkCount() == 1))
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_ROTATE));
|
2000-09-18 11:07:07 -05:00
|
|
|
bDefPointer = FALSE; // Otherwise it'll be calles Joes routine and the mousepointer will reconfigurate again
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (eHit == SDRHIT_NONE)
|
|
|
|
{
|
|
|
|
// found nothing -> look after at the masterpage
|
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 09:28:15 -05:00
|
|
|
mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_UNMARKEDOBJECT)
|
|
|
|
{
|
|
|
|
pObj = aVEvt.pObj;
|
|
|
|
}
|
|
|
|
else if (eHit == SDRHIT_TEXTEDITOBJ && this->ISA(FuSelection))
|
|
|
|
{
|
|
|
|
UINT16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier();
|
|
|
|
|
|
|
|
if ( nSdrObjKind != OBJ_TEXT &&
|
|
|
|
nSdrObjKind != OBJ_TITLETEXT &&
|
|
|
|
nSdrObjKind != OBJ_OUTLINETEXT &&
|
|
|
|
aVEvt.pObj->IsEmptyPresObj() )
|
|
|
|
{
|
|
|
|
pObj = NULL;
|
|
|
|
bDefPointer = FALSE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_ARROW));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (pObj && pMEvt && !pMEvt->IsMod2() && this->ISA(FuSelection))
|
|
|
|
{
|
|
|
|
// Auf Animation oder ImageMap pruefen
|
|
|
|
bDefPointer = !SetPointer(pObj, aPnt);
|
|
|
|
|
|
|
|
if (bDefPointer && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene)))
|
|
|
|
{
|
|
|
|
// 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 09:28:15 -05:00
|
|
|
if (mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
|
2000-09-18 11:07:07 -05:00
|
|
|
bDefPointer = !SetPointer(pObj, aPnt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (bDefPointer)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(mpView->GetPreferedPointer(
|
|
|
|
aPnt, mpWindow, nModifier, bLeftDown));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Set cursor for animaton or imagemap
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::SetPointer(SdrObject* pObj, const Point& rPos)
|
|
|
|
{
|
|
|
|
BOOL bSet = FALSE;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
BOOL bAnimationInfo = (!mpDocSh->ISA(GraphicDocShell) &&
|
|
|
|
mpDoc->GetAnimationInfo(pObj)) ? TRUE:FALSE;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
BOOL bImageMapInfo = FALSE;
|
|
|
|
|
|
|
|
if (!bAnimationInfo)
|
2006-12-13 10:55:48 -06:00
|
|
|
bImageMapInfo = mpDoc->GetIMapInfo(pObj) ? TRUE:FALSE;
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (bAnimationInfo || bImageMapInfo)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers();
|
|
|
|
USHORT nHitLog(USHORT (mpWindow->PixelToLogic(Size(HITPIX,0)).Width()));
|
2000-09-18 11:07:07 -05:00
|
|
|
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 ( !pObj->IsClosedObj() ||
|
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 09:28:15 -05: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 11:07:07 -05:00
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* hit inside the object (without margin) or open object
|
|
|
|
********************************************************/
|
|
|
|
|
|
|
|
if (bAnimationInfo)
|
|
|
|
{
|
|
|
|
/******************************************************
|
|
|
|
* Click-Action
|
|
|
|
******************************************************/
|
2006-12-13 10:55:48 -06:00
|
|
|
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj);
|
|
|
|
|
|
|
|
if ((mpView->ISA(DrawView) &&
|
|
|
|
(pInfo->meClickAction == presentation::ClickAction_BOOKMARK ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_DOCUMENT ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_PREVPAGE ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_NEXTPAGE ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_FIRSTPAGE ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_LASTPAGE ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_VERB ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_PROGRAM ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_MACRO ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_SOUND))
|
2000-09-18 11:07:07 -05:00
|
|
|
||
|
2008-04-03 07:47:14 -05:00
|
|
|
(mpView->ISA(DrawView) &&
|
|
|
|
SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) &&
|
2006-12-13 10:55:48 -06:00
|
|
|
(pInfo->meClickAction == presentation::ClickAction_VANISH ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_INVISIBLE ||
|
|
|
|
pInfo->meClickAction == presentation::ClickAction_STOPPRESENTATION ||
|
|
|
|
(pInfo->mbActive &&
|
|
|
|
( pInfo->meEffect != presentation::AnimationEffect_NONE ||
|
|
|
|
pInfo->meTextEffect != presentation::AnimationEffect_NONE )))))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
// Animations-Objekt
|
|
|
|
bSet = TRUE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (bImageMapInfo &&
|
2006-12-13 10:55:48 -06:00
|
|
|
mpDoc->GetHitIMapObject(pObj, rPos, *mpWindow))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
/******************************************************
|
|
|
|
* ImageMap
|
|
|
|
******************************************************/
|
|
|
|
bSet = TRUE;
|
2006-12-13 10:55:48 -06:00
|
|
|
mpWindow->SetPointer(Pointer(POINTER_REFHAND));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
return bSet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Response of doubleclick
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuDraw::DoubleClick(const MouseEvent& rMEvt)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
USHORT nHitLog = USHORT ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->AreObjectsMarked() )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (rMarkList.GetMarkCount() == 1)
|
|
|
|
{
|
|
|
|
SdrMark* pMark = rMarkList.GetMark(0);
|
2006-07-25 05:33:24 -05:00
|
|
|
SdrObject* pObj = pMark->GetMarkedSdrObj();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
UINT32 nInv = pObj->GetObjInventor();
|
|
|
|
UINT16 nSdrObjKind = pObj->GetObjIdentifier();
|
|
|
|
|
|
|
|
if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2)
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
DrawDocShell* pDocSh = mpDoc->GetDocSh();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( !pDocSh->IsUIActive() )
|
|
|
|
{
|
|
|
|
/**********************************************************
|
|
|
|
* aktivate OLE-object
|
|
|
|
**********************************************************/
|
2006-12-13 10:55:48 -06:00
|
|
|
//HMHmpView->HideMarkHdl();
|
|
|
|
mpViewShell->ActivateObject( (SdrOle2Obj*) pObj, 0);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRAF && pObj->IsEmptyPresObj() )
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->
|
2000-09-18 11:07:07 -05:00
|
|
|
GetDispatcher()->Execute( SID_INSERT_GRAPHIC,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
|
|
|
|
}
|
|
|
|
else if ( ( pObj->ISA(SdrTextObj) || pObj->ISA(SdrObjGroup) ) &&
|
|
|
|
!SD_MOD()->GetWaterCan() &&
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetFrameView()->IsDoubleClickTextEdit() &&
|
|
|
|
!mpDocSh->IsReadOnly())
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
SfxUInt16Item aItem(SID_TEXTEDIT, 2);
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->
|
2000-09-18 11:07:07 -05:00
|
|
|
Execute(SID_TEXTEDIT, SFX_CALLMODE_ASYNCHRON |
|
|
|
|
SFX_CALLMODE_RECORD, &aItem, 0L);
|
|
|
|
}
|
|
|
|
else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRUP)
|
|
|
|
{
|
|
|
|
// hit group -> select subobject
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->UnMarkAll();
|
|
|
|
mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), TRUE);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Help-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::RequestHelp(const HelpEvent& rHEvt)
|
|
|
|
{
|
|
|
|
BOOL bReturn = FALSE;
|
|
|
|
|
|
|
|
if (Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled())
|
|
|
|
{
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
MouseEvent aMEvt(mpWindow->GetPointerPosPixel(), 1, 0, MOUSE_LEFT);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
SdrHitKind eHit = mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
SdrObject* pObj = aVEvt.pObj;
|
|
|
|
|
|
|
|
if (eHit != SDRHIT_NONE && pObj != NULL)
|
|
|
|
{
|
|
|
|
Point aPosPixel = rHEvt.GetMousePosPixel();
|
|
|
|
|
|
|
|
bReturn = SetHelpText(pObj, aPosPixel, aVEvt);
|
|
|
|
|
|
|
|
if (!bReturn && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene)))
|
|
|
|
{
|
|
|
|
// In die Gruppe hineinschauen
|
|
|
|
SdrPageView* pPV = NULL;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(aPosPixel)));
|
2000-09-18 11:07:07 -05: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 09:28:15 -05:00
|
|
|
if (mpView->PickObj(aPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP))
|
2000-09-18 11:07:07 -05:00
|
|
|
bReturn = SetHelpText(pObj, aPosPixel, aVEvt);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!bReturn)
|
|
|
|
{
|
|
|
|
bReturn = FuPoor::RequestHelp(rHEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
return(bReturn);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Command-event
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
BOOL FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewEvent& rVEvt)
|
|
|
|
{
|
|
|
|
BOOL bSet = FALSE;
|
|
|
|
String aHelpText;
|
2006-12-13 10:55:48 -06:00
|
|
|
Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(rPosPixel)));
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
// URL fuer IMapObject unter Pointer ist Hilfetext
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpDoc->GetIMapInfo(pObj) )
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
IMapObject* pIMapObj = mpDoc->GetHitIMapObject(pObj, aPos, *mpWindow );
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if ( pIMapObj )
|
|
|
|
{
|
|
|
|
// show name
|
2007-06-26 07:40:00 -05:00
|
|
|
aHelpText = pIMapObj->GetAltText();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (aHelpText.Len() == 0)
|
|
|
|
{
|
|
|
|
// show url if no name is available
|
2003-04-24 08:38:13 -05:00
|
|
|
aHelpText = INetURLObject::decode( pIMapObj->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2006-12-13 10:55:48 -06:00
|
|
|
else if (!mpDocSh->ISA(GraphicDocShell) && mpDoc->GetAnimationInfo(pObj))
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj);
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
switch (pInfo->meClickAction)
|
2000-09-18 11:07:07 -05:00
|
|
|
{
|
|
|
|
case presentation::ClickAction_PREVPAGE:
|
|
|
|
{
|
|
|
|
// jump to the prior page
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_PREVPAGE));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_NEXTPAGE:
|
|
|
|
{
|
|
|
|
// jump to the next page
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_NEXTPAGE));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_FIRSTPAGE:
|
|
|
|
{
|
|
|
|
// jump to the first page
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_FIRSTPAGE));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_LASTPAGE:
|
|
|
|
{
|
|
|
|
// jump to the last page
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_LASTPAGE));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_BOOKMARK:
|
|
|
|
{
|
|
|
|
// jump to object/page
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_BOOKMARK));
|
|
|
|
aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_DOCUMENT:
|
|
|
|
{
|
|
|
|
// jump to document (object/page)
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_DOCUMENT));
|
|
|
|
aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_PROGRAM:
|
|
|
|
{
|
|
|
|
// execute program
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_PROGRAM));
|
|
|
|
aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) ));
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_MACRO:
|
|
|
|
{
|
|
|
|
// execute program
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_MACRO));
|
|
|
|
aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) );
|
|
|
|
|
2009-05-19 04:32:45 -05:00
|
|
|
if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) )
|
2004-05-19 01:43:53 -05:00
|
|
|
{
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( pInfo->GetBookmark() );
|
2004-05-19 01:43:53 -05:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-05-19 04:32:45 -05:00
|
|
|
String sBookmark( pInfo->GetBookmark() );
|
2004-05-19 01:43:53 -05:00
|
|
|
sal_Unicode cToken = '.';
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( sBookmark.GetToken( 2, cToken ) );
|
2004-05-19 01:43:53 -05:00
|
|
|
aHelpText.Append( cToken );
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( sBookmark.GetToken( 1, cToken ) );
|
2004-05-19 01:43:53 -05:00
|
|
|
aHelpText.Append( cToken );
|
2009-05-19 04:32:45 -05:00
|
|
|
aHelpText.Append( sBookmark.GetToken( 0, cToken ) );
|
2004-05-19 01:43:53 -05:00
|
|
|
}
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_SOUND:
|
|
|
|
{
|
|
|
|
// play-back sound
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_SOUND));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_VERB:
|
|
|
|
{
|
|
|
|
// execute OLE-verb
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_VERB));
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case presentation::ClickAction_STOPPRESENTATION:
|
|
|
|
{
|
|
|
|
// quit presentation
|
|
|
|
aHelpText = String(SdResId(STR_CLICK_ACTION_STOPPRESENTATION));
|
|
|
|
}
|
|
|
|
break;
|
2006-12-13 10:55:48 -06:00
|
|
|
default:
|
|
|
|
break;
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (rVEvt.pURLField)
|
|
|
|
{
|
|
|
|
/**************************************************************
|
|
|
|
* URL-Field
|
|
|
|
**************************************************************/
|
2003-04-24 08:38:13 -05:00
|
|
|
aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET );
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
if (aHelpText.Len())
|
|
|
|
{
|
|
|
|
bSet = TRUE;
|
2006-12-13 10:55:48 -06:00
|
|
|
Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect());
|
|
|
|
Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()),
|
|
|
|
mpWindow->OutputToScreenPixel(aLogicPix.BottomRight()));
|
2000-09-18 11:07:07 -05:00
|
|
|
|
|
|
|
if (Help::IsBalloonHelpEnabled())
|
2006-12-13 10:55:48 -06:00
|
|
|
Help::ShowBalloon( (Window*)mpWindow, rPosPixel, aScreenRect, aHelpText);
|
2000-09-18 11:07:07 -05:00
|
|
|
else if (Help::IsQuickHelpEnabled())
|
2006-12-13 10:55:48 -06:00
|
|
|
Help::ShowQuickHelp( (Window*)mpWindow, aScreenRect, aHelpText);
|
2000-09-18 11:07:07 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
return bSet;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2002-11-29 07:23:07 -06: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 FuDraw::cancel()
|
|
|
|
{
|
|
|
|
bool bReturn = false;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
if ( mpView->IsAction() )
|
2002-11-29 07:23:07 -06:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->BrkAction();
|
2002-11-29 07:23:07 -06:00
|
|
|
bReturn = true;
|
|
|
|
}
|
2006-12-13 10:55:48 -06:00
|
|
|
else if ( mpView->IsTextEdit() )
|
2002-11-29 07:23:07 -06:00
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->SdrEndTextEdit();
|
2002-11-29 07:23:07 -06:00
|
|
|
bReturn = true;
|
|
|
|
|
2006-12-13 10:55:48 -06:00
|
|
|
SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings();
|
2002-11-29 07:23:07 -06:00
|
|
|
rBindings.Invalidate( SID_PARASPACE_INCREASE );
|
|
|
|
rBindings.Invalidate( SID_PARASPACE_DECREASE );
|
|
|
|
}
|
2006-12-13 10:55:48 -06:00
|
|
|
else if ( mpView->AreObjectsMarked() )
|
2002-11-29 07:23:07 -06:00
|
|
|
{
|
|
|
|
// #97016# II
|
2006-12-13 10:55:48 -06:00
|
|
|
const SdrHdlList& rHdlList = mpView->GetHdlList();
|
2002-11-29 07:23:07 -06:00
|
|
|
SdrHdl* pHdl = rHdlList.GetFocusHdl();
|
2000-09-18 11:07:07 -05:00
|
|
|
|
2002-11-29 07:23:07 -06:00
|
|
|
if(pHdl)
|
|
|
|
{
|
|
|
|
((SdrHdlList&)rHdlList).ResetFocusHdl();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2006-12-13 10:55:48 -06:00
|
|
|
mpView->UnmarkAll();
|
2002-11-29 07:23:07 -06:00
|
|
|
}
|
|
|
|
|
|
|
|
// Switch to FuSelect.
|
2006-12-13 10:55:48 -06:00
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
|
2002-11-29 07:23:07 -06:00
|
|
|
SID_OBJECT_SELECT,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
|
|
|
|
|
|
|
bReturn = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
return bReturn;
|
2003-10-06 09:24:47 -05:00
|
|
|
}
|
2004-01-20 04:01:09 -06:00
|
|
|
|
|
|
|
} // end of namespace sd
|