2010-10-12 15:53:47 +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-11 02:16:39 +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-11 02:16:39 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 02:16:39 +00:00
|
|
|
* This file is part of OpenOffice.org.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2008-04-11 02:16:39 +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-11 02:16:39 +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-11 02:16:39 +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-17 05:02:01 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_svx.hxx"
|
2010-01-07 18:52:36 +01:00
|
|
|
#include <editeng/eeitem.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-04-20 15:55:51 +02:00
|
|
|
#include "svx/svdstr.hrc" // Namen aus der Resource
|
|
|
|
#include "svx/svdglob.hxx" // StringCache
|
2007-06-27 18:13:08 +00:00
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
#include <svx/svdmrkv.hxx>
|
|
|
|
#include <svx/svdedxv.hxx>
|
|
|
|
#include <svx/svdobj.hxx>
|
|
|
|
#include <svx/svdopath.hxx> // fuer GetContext
|
|
|
|
#include <svx/svdograf.hxx> // fuer GetContext
|
|
|
|
#include <svx/svdomedia.hxx> // fuer GetContext
|
|
|
|
#include <svx/svdetc.hxx> // Fuer SdrEngineDefaults
|
2006-11-14 12:50:54 +00:00
|
|
|
|
|
|
|
#ifdef DBG_UTIL
|
|
|
|
#include <svdibrow.hxx>
|
|
|
|
#endif
|
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
#include "svx/svdoutl.hxx"
|
|
|
|
#include "svx/svdview.hxx"
|
2010-01-07 18:52:36 +01:00
|
|
|
#include "editeng/editview.hxx" // fuer GetField
|
|
|
|
#include "editeng/flditem.hxx" // fuer URLField
|
2008-03-12 08:57:34 +00:00
|
|
|
#include "svx/obj3d.hxx"
|
|
|
|
#include "svx/svddrgmt.hxx"
|
|
|
|
#include "svx/svdoutl.hxx"
|
|
|
|
#include "svx/svdotable.hxx"
|
2001-08-06 07:34:08 +00:00
|
|
|
#include <tools/tenccvt.hxx>
|
2006-11-14 12:50:54 +00:00
|
|
|
#include <svx/sdr/overlay/overlaypolypolygon.hxx>
|
|
|
|
#include <svx/sdr/overlay/overlaymanager.hxx>
|
2010-04-20 15:55:51 +02:00
|
|
|
#include <svx/sdrpaintwindow.hxx>
|
2007-06-27 18:13:08 +00:00
|
|
|
#include <svx/sdrpagewindow.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 14:28:15 +00:00
|
|
|
#include <svx/sdrhittesthelper.hxx>
|
2006-11-14 12:50:54 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2006-06-19 15:48:15 +00:00
|
|
|
SdrViewEvent::SdrViewEvent()
|
|
|
|
: pHdl(NULL),
|
2000-09-18 16:07:07 +00:00
|
|
|
pObj(NULL),
|
|
|
|
pRootObj(NULL),
|
|
|
|
pPV(NULL),
|
2006-06-19 15:48:15 +00:00
|
|
|
pURLField(NULL),
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit(SDRHIT_NONE),
|
|
|
|
eEvent(SDREVENT_NONE),
|
|
|
|
eHdlKind(HDL_MOVE),
|
2006-06-19 15:48:15 +00:00
|
|
|
eEndCreateCmd(SDRCREATE_NEXTPOINT),
|
|
|
|
nMouseClicks(0),
|
|
|
|
nMouseMode(0),
|
|
|
|
nMouseCode(0),
|
|
|
|
nHlplIdx(0),
|
|
|
|
nGlueId(0),
|
2011-01-10 16:11:35 +01:00
|
|
|
bMouseDown(sal_False),
|
|
|
|
bMouseUp(sal_False),
|
|
|
|
bDoubleHdlSize(sal_False),
|
|
|
|
bIsAction(sal_False),
|
|
|
|
bIsTextEdit(sal_False),
|
|
|
|
bTextEditHit(sal_False),
|
|
|
|
bAddMark(sal_False),
|
|
|
|
bUnmark(sal_False),
|
|
|
|
bPrevNextMark(sal_False),
|
|
|
|
bMarkPrev(sal_False),
|
|
|
|
bInsPointNewObj(sal_False),
|
|
|
|
bDragWithCopy(sal_False),
|
|
|
|
bCaptureMouse(sal_False),
|
|
|
|
bReleaseMouse(sal_False)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrViewEvent::~SdrViewEvent()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2006-11-14 12:50:54 +00:00
|
|
|
////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// helper class for all D&D overlays
|
|
|
|
|
|
|
|
void SdrDropMarkerOverlay::ImplCreateOverlays(const SdrView& rView, const basegfx::B2DPolyPolygon& rPolyPolygon)
|
|
|
|
{
|
|
|
|
for(sal_uInt32 a(0L); a < rView.PaintWindowCount(); a++)
|
|
|
|
{
|
|
|
|
SdrPaintWindow* pCandidate = rView.GetPaintWindow(a);
|
|
|
|
::sdr::overlay::OverlayManager* pTargetOverlay = pCandidate->GetOverlayManager();
|
|
|
|
|
|
|
|
if(pTargetOverlay)
|
|
|
|
{
|
|
|
|
::sdr::overlay::OverlayPolyPolygonStriped* pNew = new ::sdr::overlay::OverlayPolyPolygonStriped(
|
|
|
|
rPolyPolygon);
|
|
|
|
pTargetOverlay->add(*pNew);
|
|
|
|
maObjects.append(*pNew);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const SdrObject& rObject)
|
|
|
|
{
|
2008-10-17 08:40:10 +00:00
|
|
|
ImplCreateOverlays(rView, rObject.TakeXorPoly());
|
2006-11-14 12:50:54 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Rectangle& rRectangle)
|
|
|
|
{
|
|
|
|
basegfx::B2DPolygon aB2DPolygon;
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Top()));
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Top()));
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Right(), rRectangle.Bottom()));
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rRectangle.Left(), rRectangle.Bottom()));
|
|
|
|
aB2DPolygon.setClosed(true);
|
|
|
|
|
|
|
|
basegfx::B2DPolyPolygon aB2DPolyPolygon;
|
|
|
|
aB2DPolyPolygon.append(aB2DPolygon);
|
|
|
|
|
|
|
|
ImplCreateOverlays(rView, aB2DPolyPolygon);
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrDropMarkerOverlay::SdrDropMarkerOverlay(const SdrView& rView, const Point& rStart, const Point& rEnd)
|
|
|
|
{
|
|
|
|
basegfx::B2DPolygon aB2DPolygon;
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rStart.X(), rStart.Y()));
|
|
|
|
aB2DPolygon.append(basegfx::B2DPoint(rEnd.X(), rEnd.Y()));
|
|
|
|
aB2DPolygon.setClosed(true);
|
|
|
|
|
|
|
|
basegfx::B2DPolyPolygon aB2DPolyPolygon;
|
|
|
|
aB2DPolyPolygon.append(aB2DPolygon);
|
|
|
|
|
|
|
|
ImplCreateOverlays(rView, aB2DPolyPolygon);
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrDropMarkerOverlay::~SdrDropMarkerOverlay()
|
|
|
|
{
|
|
|
|
// The OverlayObjects are cleared using the destructor of OverlayObjectList.
|
|
|
|
// That destructor calls clear() at the list which removes all objects from the
|
|
|
|
// OverlayManager and deletes them.
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
TYPEINIT1(SdrView,SdrCreateView);
|
|
|
|
|
2006-11-14 12:50:54 +00:00
|
|
|
SdrView::SdrView(SdrModel* pModel1, OutputDevice* pOut)
|
|
|
|
: SdrCreateView(pModel1,pOut),
|
2011-01-10 16:11:35 +01:00
|
|
|
bNoExtendedMouseDispatcher(sal_False),
|
|
|
|
bNoExtendedKeyDispatcher(sal_False),
|
|
|
|
bNoExtendedCommandDispatcher(sal_False),
|
2004-10-12 09:13:24 +00:00
|
|
|
mbMasterPagePaintCaching(sal_False)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
bTextEditOnObjectsWithoutTextIfTextTool=sal_False;
|
2002-04-26 10:21:25 +00:00
|
|
|
|
2009-10-16 00:05:16 +02:00
|
|
|
maAccessibilityOptions.AddListener(this);
|
2002-04-26 10:21:25 +00:00
|
|
|
|
|
|
|
onAccessibilityOptionsChanged();
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrView::~SdrView()
|
|
|
|
{
|
2009-10-16 00:05:16 +02:00
|
|
|
maAccessibilityOptions.RemoveListener(this);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::KeyInput(const KeyEvent& rKEvt, Window* pWin)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetActualWin(pWin);
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bRet=SdrCreateView::KeyInput(rKEvt,pWin);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!bRet && !IsExtendedKeyInputDispatcherEnabled()) {
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
switch (rKEvt.GetKeyCode().GetFullFunction()) {
|
|
|
|
case KEYFUNC_CUT : Cut(); break;
|
|
|
|
case KEYFUNC_COPY : Yank(); break;
|
|
|
|
case KEYFUNC_PASTE : Paste(pWin); break;
|
|
|
|
case KEYFUNC_DELETE: DeleteMarked(); break;
|
|
|
|
case KEYFUNC_UNDO: pMod->Undo(); break;
|
|
|
|
case KEYFUNC_REDO: pMod->Redo(); break;
|
|
|
|
case KEYFUNC_REPEAT: pMod->Repeat(*this); break;
|
|
|
|
default: {
|
|
|
|
switch (rKEvt.GetKeyCode().GetFullCode()) {
|
|
|
|
case KEY_ESCAPE: {
|
2006-11-14 12:50:54 +00:00
|
|
|
if (IsTextEdit()) SdrEndTextEdit();
|
2000-09-18 16:07:07 +00:00
|
|
|
if (IsAction()) BrkAction();
|
|
|
|
if (pWin!=NULL) pWin->ReleaseMouse();
|
|
|
|
} break;
|
|
|
|
case KEY_DELETE: DeleteMarked(); break;
|
|
|
|
case KEY_CUT: case KEY_DELETE+KEY_SHIFT: Cut(); break;
|
|
|
|
case KEY_COPY: case KEY_INSERT+KEY_MOD1: Yank(); break;
|
|
|
|
case KEY_PASTE: case KEY_INSERT+KEY_SHIFT: Paste(pWin); break;
|
|
|
|
case KEY_UNDO: case KEY_BACKSPACE+KEY_MOD2: pMod->Undo(); break;
|
|
|
|
case KEY_BACKSPACE+KEY_MOD2+KEY_SHIFT: pMod->Redo(); break;
|
|
|
|
case KEY_REPEAT: case KEY_BACKSPACE+KEY_MOD2+KEY_MOD1: pMod->Repeat(*this); break;
|
|
|
|
case KEY_MOD1+KEY_A: MarkAll(); break;
|
2011-01-10 16:11:35 +01:00
|
|
|
default: bRet=sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
} // switch
|
|
|
|
}
|
|
|
|
} // switch
|
|
|
|
if (bRet && pWin!=NULL) {
|
|
|
|
pWin->SetPointer(GetPreferedPointer(
|
|
|
|
pWin->PixelToLogic(pWin->ScreenToOutputPixel( pWin->GetPointerPosPixel() ) ),
|
|
|
|
pWin,
|
|
|
|
rKEvt.GetKeyCode().GetModifier()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::MouseButtonDown(const MouseEvent& rMEvt, Window* pWin)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetActualWin(pWin);
|
2011-01-10 16:11:35 +01:00
|
|
|
if (rMEvt.IsLeft()) aDragStat.SetMouseDown(sal_True);
|
|
|
|
sal_Bool bRet=SdrCreateView::MouseButtonDown(rMEvt,pWin);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt);
|
|
|
|
bRet=DoMouseEvent(aVEvt);
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::MouseButtonUp(const MouseEvent& rMEvt, Window* pWin)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetActualWin(pWin);
|
2011-01-10 16:11:35 +01:00
|
|
|
if (rMEvt.IsLeft()) aDragStat.SetMouseDown(sal_False);
|
|
|
|
sal_Bool bAction=IsAction();
|
|
|
|
sal_Bool bRet=!bAction && SdrCreateView::MouseButtonUp(rMEvt,pWin);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!bRet && !IsExtendedMouseEventDispatcherEnabled()) {
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
PickAnything(rMEvt,SDRMOUSEBUTTONUP,aVEvt);
|
|
|
|
bRet=DoMouseEvent(aVEvt);
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::MouseMove(const MouseEvent& rMEvt, Window* pWin)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetActualWin(pWin);
|
|
|
|
aDragStat.SetMouseDown(rMEvt.IsLeft());
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bRet=SdrCreateView::MouseMove(rMEvt,pWin);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!IsExtendedMouseEventDispatcherEnabled() && !IsTextEditInSelectionMode()) {
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
PickAnything(rMEvt,SDRMOUSEMOVE,aVEvt);
|
2011-01-10 16:11:35 +01:00
|
|
|
if (DoMouseEvent(aVEvt)) bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2001-06-11 10:17:51 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::Command(const CommandEvent& rCEvt, Window* pWin)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
SetActualWin(pWin);
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bRet=SdrCreateView::Command(rCEvt,pWin);
|
2000-09-18 16:07:07 +00:00
|
|
|
return bRet;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::GetAttributes(SfxItemSet& rTargetSet, sal_Bool bOnlyHardAttr) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
return SdrCreateView::GetAttributes(rTargetSet, bOnlyHardAttr);
|
|
|
|
}
|
|
|
|
|
|
|
|
SfxStyleSheet* SdrView::GetStyleSheet() const
|
|
|
|
{
|
2011-05-12 11:03:28 +02:00
|
|
|
return SdrCreateView::GetStyleSheet();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
SdrHitKind SdrView::PickAnything(const MouseEvent& rMEvt, sal_uInt16 nEventKind, SdrViewEvent& rVEvt) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
rVEvt.bMouseDown=nEventKind==SDRMOUSEBUTTONDOWN;
|
|
|
|
rVEvt.bMouseUp=nEventKind==SDRMOUSEBUTTONUP;
|
|
|
|
rVEvt.nMouseClicks=rMEvt.GetClicks();
|
|
|
|
rVEvt.nMouseMode=rMEvt.GetMode();
|
|
|
|
rVEvt.nMouseCode=rMEvt.GetButtons() | rMEvt.GetModifier();
|
|
|
|
const OutputDevice* pOut=pActualOutDev;
|
2006-11-14 12:50:54 +00:00
|
|
|
if (pOut==NULL)
|
|
|
|
{
|
|
|
|
pOut = GetFirstOutputDevice();
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aPnt(rMEvt.GetPosPixel());
|
|
|
|
if (pOut!=NULL) aPnt=pOut->PixelToLogic(aPnt);
|
|
|
|
rVEvt.aLogicPos=aPnt;
|
|
|
|
return PickAnything(aPnt,rVEvt);
|
|
|
|
}
|
|
|
|
|
|
|
|
// Mit der Maus draggen (Move)
|
|
|
|
// Beispiel beim erzeugen eines Rechtecks. MouseDown muss ohne
|
|
|
|
// ModKey erfolgen, weil sonst i.d.R. Markieren forciert wird (s.u.)
|
|
|
|
// Drueckt man dann beim MouseMove gleichzeitig Shift, Ctrl, und Alt,
|
|
|
|
// so erzeugt man ein zentrisches Quadrat ohne Fang.
|
|
|
|
// Die Doppelbelegung von Ortho und Shift stellt i.d.R. kein Problem dar,
|
|
|
|
// da sich beides meisst gegenseitig ausschliesst. Einzig Shear (das beim
|
|
|
|
// Verzerren, nicht dass beim Drehen) beruecksichtigt beides gleichzeitig.
|
|
|
|
// Dass muss der Anwender erstmal noch umschiffen (z.B. mit einer Hilfslinie).
|
|
|
|
#define MODKEY_NoSnap bCtrl /* Fang temporaer aus */
|
|
|
|
#define MODKEY_Ortho bShift /* na eben ortho */
|
|
|
|
#define MODKEY_Center bAlt /* Zentrisch erzeugen/resizen */
|
|
|
|
#define MODKEY_AngleSnap bShift
|
|
|
|
#define MODKEY_CopyDrag bCtrl /* Draggen mit kopieren */
|
|
|
|
|
|
|
|
// irgendwo hinklicken (MouseDown)
|
|
|
|
#define MODKEY_PolyPoly bAlt /* Neues Poly bei InsPt und bei Create */
|
|
|
|
#define MODKEY_MultiMark bShift /* MarkObj ohne vorher UnmarkAll */
|
|
|
|
#define MODKEY_Unmark bAlt /* Unmark durch Rahmenaufziehen */
|
|
|
|
#define MODKEY_ForceMark bCtrl /* Rahmenaufziehen erzwingen, auch wenn Obj an MausPos */
|
|
|
|
#define MODKEY_DeepMark bAlt /* MarkNextObj */
|
|
|
|
#define MODKEY_DeepBackw bShift /* MarkNextObj rueckwaerts */
|
|
|
|
|
|
|
|
SdrHitKind SdrView::PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const
|
|
|
|
{
|
|
|
|
const OutputDevice* pOut=pActualOutDev;
|
2006-11-14 12:50:54 +00:00
|
|
|
if (pOut==NULL)
|
|
|
|
{
|
|
|
|
pOut = GetFirstOutputDevice();
|
|
|
|
}
|
2007-05-09 12:33:25 +00:00
|
|
|
|
|
|
|
// #i73628# Use a non-changeable copy of he logic pos
|
|
|
|
const Point aLocalLogicPosition(rLogicPos);
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bEditMode=IsEditMode();
|
|
|
|
sal_Bool bPointMode=bEditMode && HasMarkablePoints();
|
|
|
|
sal_Bool bGluePointMode=IsGluePointEditMode();
|
|
|
|
sal_Bool bInsPolyPt=bPointMode && IsInsObjPointMode() && IsInsObjPointPossible();
|
|
|
|
sal_Bool bInsGluePt=bGluePointMode && IsInsGluePointMode() && IsInsGluePointPossible();
|
|
|
|
sal_Bool bIsTextEdit=IsTextEdit();
|
|
|
|
sal_Bool bTextEditHit=IsTextEditHit(aLocalLogicPosition,0/*nHitTolLog*/);
|
|
|
|
sal_Bool bTextEditSel=IsTextEditInSelectionMode();
|
|
|
|
sal_Bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
|
|
|
|
sal_Bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
|
|
|
|
sal_Bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrHitKind eHit=SDRHIT_NONE;
|
2007-05-09 12:33:25 +00:00
|
|
|
SdrHdl* pHdl=pOut!=NULL && !bTextEditSel ? PickHandle(aLocalLogicPosition) : NULL;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrPageView* pPV=NULL;
|
|
|
|
SdrObject* pObj=NULL;
|
|
|
|
SdrObject* pHitObj=NULL;
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uInt16 nHitPassNum=0;
|
|
|
|
sal_uInt16 nHlplIdx=0;
|
|
|
|
sal_uInt16 nGlueId=0;
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bTextEditHit || bTextEditSel)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_TEXTEDIT;
|
2011-01-10 16:11:35 +01:00
|
|
|
bTextEditHit=sal_True;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (pHdl!=NULL)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_HANDLE; // Handle getroffen hat hoechste Prioritaet
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bEditMode && IsHlplVisible() && IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,nHitTolLog,*pOut,nHlplIdx,pPV))
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bGluePointMode && PickGluePoint(aLocalLogicPosition,pObj,nGlueId,pPV))
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_GLUEPOINT; // nichtmarkierter Klebepunkt getroffen
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_MARKED,&pObj,NULL,&nHitPassNum))
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_MARKEDOBJECT;
|
2008-03-12 08:57:34 +00:00
|
|
|
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( pObj );
|
|
|
|
if( pTableObj )
|
|
|
|
{
|
|
|
|
sal_Int32 nX = 0, nY = 0;
|
|
|
|
switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY, 0 ) )
|
|
|
|
{
|
|
|
|
case sdr::table::SDRTABLEHIT_CELL:
|
|
|
|
eHit = SDRHIT_CELL;
|
|
|
|
break;
|
|
|
|
case sdr::table::SDRTABLEHIT_CELLTEXTAREA:
|
|
|
|
eHit = SDRHIT_TEXTEDITOBJ;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-05-12 11:03:28 +02:00
|
|
|
else if (PickObj(aLocalLogicPosition,nHitTolLog,pHitObj,pPV,SDRSEARCH_DEEP|SDRSEARCH_ALSOONMASTER|SDRSEARCH_WHOLEPAGE,&pObj,NULL,&nHitPassNum))
|
2008-03-12 08:57:34 +00:00
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
// MasterPages und WholePage fuer Macro und URL
|
|
|
|
eHit=SDRHIT_UNMARKEDOBJECT;
|
2008-03-12 08:57:34 +00:00
|
|
|
::sdr::table::SdrTableObj* pTableObj = dynamic_cast< ::sdr::table::SdrTableObj* >( pObj );
|
|
|
|
if( pTableObj )
|
|
|
|
{
|
|
|
|
sal_Int32 nX = 0, nY = 0;
|
|
|
|
switch( pTableObj->CheckTableHit( aLocalLogicPosition, nX, nY, 0 ) )
|
|
|
|
{
|
|
|
|
case sdr::table::SDRTABLEHIT_CELL:
|
|
|
|
eHit = SDRHIT_CELL;
|
|
|
|
break;
|
|
|
|
case sdr::table::SDRTABLEHIT_CELLTEXTAREA:
|
|
|
|
eHit = SDRHIT_TEXTEDITOBJ;
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (bEditMode && IsHlplVisible() && !IsHlplFront() && pOut!=NULL && PickHelpLine(aLocalLogicPosition,nHitTolLog,*pOut,nHlplIdx,pPV))
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eHit=SDRHIT_HELPLINE; // Hilfslinie im Vordergrund getroffen zum verschieben
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT)
|
|
|
|
{
|
2006-10-12 12:17:05 +00:00
|
|
|
bool bRoot=pObj->HasMacro();
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bDeep=pObj!=pHitObj && pHitObj->HasMacro();
|
|
|
|
sal_Bool bMid=sal_False; // Gruppierte Gruppe mit Macro getroffen?
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObject* pMidObj=NULL;
|
2008-03-12 08:57:34 +00:00
|
|
|
if (pObj!=pHitObj)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObject* pObjTmp=NULL;
|
|
|
|
pObjTmp=pHitObj->GetUpGroup();
|
|
|
|
if (pObjTmp==pObj) pObjTmp=NULL;
|
2008-03-12 08:57:34 +00:00
|
|
|
while (pObjTmp!=NULL)
|
|
|
|
{
|
|
|
|
if (pObjTmp->HasMacro())
|
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
bMid=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
pMidObj=pObjTmp;
|
|
|
|
}
|
|
|
|
pObjTmp=pObjTmp->GetUpGroup();
|
|
|
|
if (pObjTmp==pObj) pObjTmp=NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bDeep || bMid || bRoot)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObjMacroHitRec aHitRec;
|
2007-05-09 12:33:25 +00:00
|
|
|
aHitRec.aPos=aLocalLogicPosition;
|
|
|
|
aHitRec.aDownPos=aLocalLogicPosition;
|
2000-09-18 16:07:07 +00:00
|
|
|
aHitRec.nTol=nHitTolLog;
|
|
|
|
aHitRec.pVisiLayer=&pPV->GetVisibleLayers();
|
|
|
|
aHitRec.pPageView=pPV;
|
|
|
|
if (bDeep) bDeep=pHitObj->IsMacroHit(aHitRec);
|
|
|
|
if (bMid ) bMid =pMidObj->IsMacroHit(aHitRec);
|
|
|
|
if (bRoot) bRoot=pObj->IsMacroHit(aHitRec);
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bRoot || bMid || bDeep)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
// Prio: 1.Root, 2.Mid, 3.Deep
|
|
|
|
rVEvt.pRootObj=pObj;
|
|
|
|
if (!bRoot) pObj=pMidObj;
|
|
|
|
if (!bRoot && !bMid) pObj=pHitObj;
|
|
|
|
eHit=SDRHIT_MACRO;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// auf URL-Field checken
|
2008-03-12 08:57:34 +00:00
|
|
|
if (IsMacroMode() && eHit==SDRHIT_UNMARKEDOBJECT)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrTextObj* pTextObj=PTR_CAST(SdrTextObj,pHitObj);
|
2008-03-12 08:57:34 +00:00
|
|
|
if (pTextObj!=NULL && pTextObj->HasText())
|
|
|
|
{
|
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
|
|
|
bool bTEHit(pPV &&
|
|
|
|
SdrObjectPrimitiveHit(*pTextObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
|
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bTEHit)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
Rectangle aTextRect;
|
|
|
|
Rectangle aAnchor;
|
|
|
|
SdrOutliner* pOutliner = &pTextObj->ImpGetDrawOutliner();
|
|
|
|
if( pTextObj->GetModel() )
|
|
|
|
pOutliner = &pTextObj->GetModel()->GetHitTestOutliner();
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
pTextObj->TakeTextRect( *pOutliner, aTextRect, sal_False, &aAnchor, sal_False );
|
2007-05-09 12:33:25 +00:00
|
|
|
|
|
|
|
// #i73628# Use a text-relative position for hit test in hit test outliner
|
|
|
|
Point aTemporaryTextRelativePosition(aLocalLogicPosition - aTextRect.TopLeft());
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// FitToSize berueksichtigen
|
2011-03-12 18:57:32 -06:00
|
|
|
bool bFitToSize(pTextObj->IsFitToSize());
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bFitToSize) {
|
|
|
|
Fraction aX(aTextRect.GetWidth()-1,aAnchor.GetWidth()-1);
|
|
|
|
Fraction aY(aTextRect.GetHeight()-1,aAnchor.GetHeight()-1);
|
2007-05-09 12:33:25 +00:00
|
|
|
ResizePoint(aTemporaryTextRelativePosition,Point(),aX,aY);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
// Drehung berueksichtigen
|
|
|
|
const GeoStat& rGeo=pTextObj->GetGeoStat();
|
2007-05-09 12:33:25 +00:00
|
|
|
if (rGeo.nDrehWink!=0) RotatePoint(aTemporaryTextRelativePosition,Point(),-rGeo.nSin,rGeo.nCos); // -sin fuer Unrotate
|
2000-09-18 16:07:07 +00:00
|
|
|
// Laufschrift berueksichtigen fehlt noch ...
|
|
|
|
if(pActualOutDev && pActualOutDev->GetOutDevType() == OUTDEV_WINDOW)
|
|
|
|
{
|
|
|
|
OutlinerView aOLV(pOutliner, (Window*)pActualOutDev);
|
|
|
|
const EditView& aEV=aOLV.GetEditView();
|
2007-05-09 12:33:25 +00:00
|
|
|
const SvxFieldItem* pItem=aEV.GetField(aTemporaryTextRelativePosition);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (pItem!=NULL) {
|
|
|
|
const SvxFieldData* pFld=pItem->GetField();
|
|
|
|
const SvxURLField* pURL=PTR_CAST(SvxURLField,pFld);
|
|
|
|
if (pURL!=NULL) {
|
|
|
|
eHit=SDRHIT_URLFIELD;
|
|
|
|
rVEvt.pURLField=pURL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
if (nHitPassNum==SDRSEARCHPASS_DIRECT &&
|
|
|
|
(eHit==SDRHIT_MARKEDOBJECT || eHit==SDRHIT_UNMARKEDOBJECT) &&
|
|
|
|
(IsTextTool() || (IsEditMode() && IsQuickTextEditMode())) && pHitObj->HasTextEdit())
|
|
|
|
{
|
|
|
|
// Ringsum die TextEditArea ein Rand zum Selektieren ohne Textedit
|
2003-11-24 16:02:08 +00:00
|
|
|
Rectangle aBoundRect(pHitObj->GetCurrentBoundRect());
|
2002-11-26 14:36:08 +00:00
|
|
|
|
2011-05-12 11:03:28 +02:00
|
|
|
// Force to SnapRect when Fontwork
|
2002-11-26 14:36:08 +00:00
|
|
|
if(pHitObj->ISA(SdrTextObj) && ((SdrTextObj*)pHitObj)->IsFontwork())
|
|
|
|
{
|
|
|
|
aBoundRect = pHitObj->GetSnapRect();
|
|
|
|
}
|
|
|
|
|
|
|
|
sal_Int32 nTolerance(nHitTolLog);
|
|
|
|
sal_Bool bBoundRectHit(sal_False);
|
|
|
|
|
|
|
|
if(pOut)
|
|
|
|
{
|
|
|
|
nTolerance = pOut->PixelToLogic(Size(2, 0)).Width();
|
|
|
|
}
|
|
|
|
|
2007-05-09 12:33:25 +00:00
|
|
|
if( (aLocalLogicPosition.X() >= aBoundRect.Left() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Left() + nTolerance)
|
|
|
|
|| (aLocalLogicPosition.X() >= aBoundRect.Right() - nTolerance && aLocalLogicPosition.X() <= aBoundRect.Right() + nTolerance)
|
|
|
|
|| (aLocalLogicPosition.Y() >= aBoundRect.Top() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Top() + nTolerance)
|
|
|
|
|| (aLocalLogicPosition.Y() >= aBoundRect.Bottom() - nTolerance && aLocalLogicPosition.Y() <= aBoundRect.Bottom() + nTolerance))
|
2002-11-26 14:36:08 +00:00
|
|
|
{
|
|
|
|
bBoundRectHit = sal_True;
|
|
|
|
}
|
|
|
|
|
|
|
|
if(!bBoundRectHit)
|
|
|
|
{
|
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
|
|
|
bool bTEHit(pPV &&
|
|
|
|
SdrObjectPrimitiveHit(*pHitObj, aLocalLogicPosition, 0, *pPV, &pPV->GetVisibleLayers(), true));
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// TextEdit an Objekten im gesperrten Layer
|
2008-03-12 08:57:34 +00:00
|
|
|
if (pPV->GetLockedLayers().IsSet(pHitObj->GetLayer()))
|
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
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
bTEHit=sal_False;
|
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
|
|
|
}
|
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bTEHit)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.pRootObj=pObj;
|
|
|
|
pObj=pHitObj;
|
|
|
|
eHit=SDRHIT_TEXTEDITOBJ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (nHitPassNum!=SDRSEARCHPASS_DIRECT && eHit==SDRHIT_UNMARKEDOBJECT) {
|
|
|
|
eHit=SDRHIT_NONE;
|
|
|
|
pObj=NULL;
|
|
|
|
pPV=NULL;
|
|
|
|
}
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
|
|
|
|
sal_Bool bMouseRight=(rVEvt.nMouseCode&MOUSE_RIGHT)!=0;
|
|
|
|
sal_Bool bMouseDown=rVEvt.bMouseDown;
|
|
|
|
sal_Bool bMouseUp=rVEvt.bMouseUp;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrEventKind eEvent=SDREVENT_NONE;
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bIsAction=IsAction();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bIsAction)
|
|
|
|
{
|
|
|
|
if (bMouseDown)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bMouseRight) eEvent=SDREVENT_BCKACTION;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bMouseUp)
|
|
|
|
{
|
|
|
|
if (bMouseLeft)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_ENDACTION;
|
2008-03-12 08:57:34 +00:00
|
|
|
if (IsDragObj())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_ENDDRAG;
|
|
|
|
rVEvt.bDragWithCopy=MODKEY_CopyDrag;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (IsCreateObj() || IsInsObjPoint())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=IsCreateObj() ? SDREVENT_ENDCREATE : SDREVENT_ENDINSOBJPOINT;
|
|
|
|
rVEvt.eEndCreateCmd=SDRCREATE_NEXTPOINT;
|
|
|
|
if (MODKEY_PolyPoly) rVEvt.eEndCreateCmd=SDRCREATE_NEXTOBJECT;
|
|
|
|
if (rVEvt.nMouseClicks>1) rVEvt.eEndCreateCmd=SDRCREATE_FORCEEND;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (IsMarking())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_ENDMARK;
|
2008-03-12 08:57:34 +00:00
|
|
|
if (!aDragStat.IsMinMoved())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BRKMARK;
|
|
|
|
rVEvt.bAddMark=MODKEY_MultiMark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
eEvent=SDREVENT_MOVACTION;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_TEXTEDIT)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_TEXTEDIT;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bMouseDown && bMouseLeft)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
if (rVEvt.nMouseClicks==2 && rVEvt.nMouseCode==MOUSE_LEFT && pObj!=NULL && pHitObj!=NULL && pHitObj->HasTextEdit() && eHit==SDRHIT_MARKEDOBJECT)
|
|
|
|
{
|
|
|
|
rVEvt.pRootObj=pObj;
|
|
|
|
pObj=pHitObj;
|
|
|
|
eEvent=SDREVENT_BEGTEXTEDIT;
|
|
|
|
}
|
|
|
|
else if (MODKEY_ForceMark && eHit!=SDRHIT_URLFIELD)
|
|
|
|
{
|
|
|
|
eEvent=SDREVENT_BEGMARK; // AddMark,Unmark */
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
else if (eHit==SDRHIT_HELPLINE)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGDRAGHELPLINE; // nix weiter
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_GLUEPOINT)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKGLUEPOINT; // AddMark+Drag
|
|
|
|
rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_HANDLE)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGDRAGOBJ; // Mark+Drag,AddMark+Drag,DeepMark+Drag,Unmark
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bGlue=pHdl->GetKind()==HDL_GLUE;
|
|
|
|
sal_Bool bPoly=!bGlue && IsPointMarkable(*pHdl);
|
2011-03-12 02:42:58 +01:00
|
|
|
sal_Bool bMarked=bGlue || (bPoly && pHdl->IsSelected());
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bGlue || bPoly)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=bGlue ? SDREVENT_MARKGLUEPOINT : SDREVENT_MARKPOINT;
|
2008-03-12 08:57:34 +00:00
|
|
|
if (MODKEY_DeepMark)
|
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
rVEvt.bAddMark=sal_True;
|
|
|
|
rVEvt.bPrevNextMark=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.bMarkPrev=MODKEY_DeepBackw;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (MODKEY_MultiMark)
|
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
rVEvt.bAddMark=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.bUnmark=bMarked; // Toggle
|
2008-03-12 08:57:34 +00:00
|
|
|
if (bGlue)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
pObj=pHdl->GetObj();
|
2006-11-14 12:50:54 +00:00
|
|
|
nGlueId=(sal_uInt16)pHdl->GetObjHdlNum();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bMarked)
|
|
|
|
{
|
|
|
|
eEvent=SDREVENT_BEGDRAGOBJ; // MarkState nicht aendern, nur Drag
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bInsPolyPt && (MODKEY_PolyPoly || (!MODKEY_MultiMark && !MODKEY_DeepMark)))
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGINSOBJPOINT;
|
|
|
|
rVEvt.bInsPointNewObj=MODKEY_PolyPoly;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (bInsGluePt && !MODKEY_MultiMark && !MODKEY_DeepMark)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGINSGLUEPOINT;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_TEXTEDITOBJ)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGTEXTEDIT; // AddMark+Drag,DeepMark+Drag,Unmark
|
2008-03-12 08:57:34 +00:00
|
|
|
if (MODKEY_MultiMark || MODKEY_DeepMark)
|
|
|
|
{ // falls bei Deep nicht getroffen
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKOBJ;
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_MACRO)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGMACROOBJ; // AddMark+Drag
|
2008-03-12 08:57:34 +00:00
|
|
|
if (MODKEY_MultiMark || MODKEY_DeepMark)
|
|
|
|
{ // falls bei Deep nicht getroffen
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKOBJ;
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_URLFIELD)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_EXECUTEURL; // AddMark+Drag
|
2008-03-12 08:57:34 +00:00
|
|
|
if (MODKEY_MultiMark || MODKEY_DeepMark)
|
|
|
|
{ // falls bei Deep nicht getroffen
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKOBJ;
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_MARKEDOBJECT)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGDRAGOBJ; // DeepMark+Drag,Unmark
|
2008-03-12 08:57:34 +00:00
|
|
|
|
|
|
|
if (MODKEY_MultiMark || MODKEY_DeepMark)
|
|
|
|
{ // falls bei Deep nicht getroffen
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKOBJ;
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (IsCreateMode())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_BEGCREATEOBJ; // Nix weiter
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (eHit==SDRHIT_UNMARKEDOBJECT)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
eEvent=SDREVENT_MARKOBJ; // AddMark+Drag
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
eEvent=SDREVENT_BEGMARK;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (eEvent==SDREVENT_MARKOBJ)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.bAddMark=MODKEY_MultiMark || MODKEY_DeepMark; // falls bei Deep nicht getroffen
|
|
|
|
rVEvt.bPrevNextMark=MODKEY_DeepMark;
|
|
|
|
rVEvt.bMarkPrev=MODKEY_DeepMark && MODKEY_DeepBackw;
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
if (eEvent==SDREVENT_BEGMARK)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.bAddMark=MODKEY_MultiMark;
|
|
|
|
rVEvt.bUnmark=MODKEY_Unmark;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
rVEvt.bIsAction=bIsAction;
|
|
|
|
rVEvt.bIsTextEdit=bIsTextEdit;
|
|
|
|
rVEvt.bTextEditHit=bTextEditHit;
|
2007-05-09 12:33:25 +00:00
|
|
|
rVEvt.aLogicPos=aLocalLogicPosition;
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.pHdl=pHdl;
|
|
|
|
rVEvt.pObj=pObj;
|
2008-03-12 08:57:34 +00:00
|
|
|
if(rVEvt.pRootObj==NULL)
|
|
|
|
rVEvt.pRootObj=pObj;
|
2000-09-18 16:07:07 +00:00
|
|
|
rVEvt.pPV=pPV;
|
|
|
|
rVEvt.nHlplIdx=nHlplIdx;
|
|
|
|
rVEvt.nGlueId=nGlueId;
|
|
|
|
rVEvt.eHit=eHit;
|
|
|
|
rVEvt.eEvent=eEvent;
|
|
|
|
rVEvt.bCaptureMouse=bMouseLeft && bMouseDown && eEvent!=SDREVENT_NONE;
|
|
|
|
rVEvt.bReleaseMouse=bMouseLeft && bMouseUp;
|
2006-10-12 12:17:05 +00:00
|
|
|
#ifdef DGB_UTIL
|
2000-09-18 16:07:07 +00:00
|
|
|
if (rVEvt.pRootObj!=NULL) {
|
|
|
|
if (rVEvt.pRootObj->GetObjList()!=rVEvt.pPV->GetObjList()) {
|
2011-03-01 19:07:44 +01:00
|
|
|
OSL_FAIL("SdrView::PickAnything(): pRootObj->GetObjList()!=pPV->GetObjList() !");
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
return eHit;
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::DoMouseEvent(const SdrViewEvent& rVEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bRet=sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrHitKind eHit=rVEvt.eHit;
|
|
|
|
Point aLogicPos(rVEvt.aLogicPos);
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bShift=(rVEvt.nMouseCode & KEY_SHIFT) !=0;
|
|
|
|
sal_Bool bCtrl=(rVEvt.nMouseCode & KEY_MOD1) !=0;
|
|
|
|
sal_Bool bAlt=(rVEvt.nMouseCode & KEY_MOD2) !=0;
|
|
|
|
sal_Bool bMouseLeft=(rVEvt.nMouseCode&MOUSE_LEFT)!=0;
|
|
|
|
sal_Bool bMouseDown=rVEvt.bMouseDown;
|
|
|
|
sal_Bool bMouseUp=rVEvt.bMouseUp;
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bMouseDown) {
|
2011-01-10 16:11:35 +01:00
|
|
|
if (bMouseLeft) aDragStat.SetMouseDown(sal_True);
|
2000-09-18 16:07:07 +00:00
|
|
|
} else if (bMouseUp) {
|
2011-01-10 16:11:35 +01:00
|
|
|
if (bMouseLeft) aDragStat.SetMouseDown(sal_False);
|
2000-09-18 16:07:07 +00:00
|
|
|
} else { // ansonsten MoueMove
|
|
|
|
aDragStat.SetMouseDown(bMouseLeft);
|
|
|
|
}
|
|
|
|
|
|
|
|
#ifdef MODKEY_NoSnap
|
|
|
|
SetSnapEnabled(!MODKEY_NoSnap);
|
|
|
|
#endif
|
|
|
|
#ifdef MODKEY_Ortho
|
|
|
|
SetOrtho(MODKEY_Ortho!=IsOrthoDesired());
|
|
|
|
#endif
|
|
|
|
#ifdef MODKEY_BigOrtho
|
|
|
|
SetBigOrtho(MODKEY_BigOrtho);
|
|
|
|
#endif
|
|
|
|
#ifdef MODKEY_AngleSnap
|
|
|
|
SetAngleSnapEnabled(MODKEY_AngleSnap);
|
|
|
|
#endif
|
|
|
|
#ifdef MODKEY_CopyDrag
|
|
|
|
SetDragWithCopy(MODKEY_CopyDrag);
|
|
|
|
#endif
|
|
|
|
#ifdef MODKEY_Center
|
|
|
|
SetCreate1stPointAsCenter(MODKEY_Center);
|
|
|
|
SetResizeAtCenter(MODKEY_Center);
|
|
|
|
SetCrookAtCenter(MODKEY_Center);
|
|
|
|
#endif
|
|
|
|
if (bMouseLeft && bMouseDown && rVEvt.bIsTextEdit && (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_NONE)) {
|
2006-11-14 12:50:54 +00:00
|
|
|
SdrEndTextEdit(); // Danebengeklickt, Ende mit Edit
|
2000-09-18 16:07:07 +00:00
|
|
|
// pHdl ist dann ungueltig. Sollte aber egal sein, wein pHdl==NULL
|
|
|
|
// sein muesste (wg. eHit).
|
|
|
|
}
|
|
|
|
switch (rVEvt.eEvent) {
|
2011-01-10 16:11:35 +01:00
|
|
|
case SDREVENT_NONE: bRet=sal_False; break;
|
|
|
|
case SDREVENT_TEXTEDIT: bRet=sal_False; break; // Events an die OutlinerView werden hier nicht beruecksichtigt
|
|
|
|
case SDREVENT_MOVACTION: MovAction(aLogicPos); bRet=sal_True; break;
|
|
|
|
case SDREVENT_ENDACTION: EndAction(); bRet=sal_True; break;
|
|
|
|
case SDREVENT_BCKACTION: BckAction(); bRet=sal_True; break;
|
|
|
|
case SDREVENT_BRKACTION: BrkAction(); bRet=sal_True; break;
|
|
|
|
case SDREVENT_ENDMARK : EndAction(); bRet=sal_True; break;
|
2000-09-18 16:07:07 +00:00
|
|
|
case SDREVENT_BRKMARK : {
|
|
|
|
BrkAction();
|
|
|
|
if (!MarkObj(aLogicPos,nHitTolLog,rVEvt.bAddMark)) {
|
|
|
|
// Kein Obj getroffen. Dann werden zuerst
|
|
|
|
// - Markierte Klebepunkte deselektiert
|
|
|
|
// - dann ggf. selektierte Polygonpunkte
|
|
|
|
// - und ansonsten Objekte
|
|
|
|
if (!rVEvt.bAddMark) UnmarkAll();
|
|
|
|
}
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
} break;
|
|
|
|
case SDREVENT_ENDCREATE: { // ggf. MarkObj
|
|
|
|
SdrCreateCmd eCmd=SDRCREATE_NEXTPOINT;
|
|
|
|
if (MODKEY_PolyPoly) eCmd=SDRCREATE_NEXTOBJECT;
|
|
|
|
if (rVEvt.nMouseClicks>1) eCmd=SDRCREATE_FORCEEND;
|
|
|
|
if (!EndCreateObj(eCmd)) { // Event fuer Create nicht ausgewerten? -> Markieren
|
|
|
|
if (eHit==SDRHIT_UNMARKEDOBJECT || eHit==SDRHIT_TEXTEDIT) {
|
|
|
|
MarkObj(rVEvt.pRootObj,rVEvt.pPV);
|
2006-11-14 12:50:54 +00:00
|
|
|
if (eHit==SDRHIT_TEXTEDIT)
|
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bRet2(pActualOutDev && OUTDEV_WINDOW == pActualOutDev->GetOutDevType() &&
|
2006-11-14 12:50:54 +00:00
|
|
|
SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, (Window*)pActualOutDev, sal_False, (SdrOutliner*)0L));
|
|
|
|
|
|
|
|
if(bRet2)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
MouseEvent aMEvt(pActualOutDev->LogicToPixel(aLogicPos),
|
|
|
|
1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
|
2006-11-14 12:50:54 +00:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
OutlinerView* pOLV=GetTextEditOutlinerView();
|
|
|
|
if (pOLV!=NULL) {
|
|
|
|
pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
|
|
|
|
pOLV->MouseButtonUp(aMEvt); // Event an den Outliner, aber ohne Doppelklick
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True; // Obj markiert und ggf. TextEdit gestartet
|
|
|
|
} else bRet=sal_False; // Create abgebrochen, sonst nix weiter.
|
|
|
|
} else bRet=sal_True; // EndCreate mit sal_True returniert
|
2000-09-18 16:07:07 +00:00
|
|
|
} break;
|
|
|
|
case SDREVENT_ENDDRAG: {
|
|
|
|
bRet=EndDragObj(IsDragWithCopy());
|
|
|
|
ForceMarkedObjToAnotherPage(); // Undo+Klammerung fehlt noch !!!
|
|
|
|
} break;
|
|
|
|
case SDREVENT_MARKOBJ: { // + ggf. BegDrag
|
|
|
|
if (!rVEvt.bAddMark) UnmarkAllObj();
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bUnmark=rVEvt.bUnmark;
|
2000-09-18 16:07:07 +00:00
|
|
|
if (rVEvt.bPrevNextMark) {
|
|
|
|
bRet=MarkNextObj(aLogicPos,nHitTolLog,rVEvt.bMarkPrev);
|
|
|
|
} else {
|
2004-07-12 13:50:13 +00:00
|
|
|
SortMarkedObjects();
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uIntPtr nAnz0=GetMarkedObjectCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
bRet=MarkObj(aLogicPos,nHitTolLog,rVEvt.bAddMark);
|
2004-07-12 13:50:13 +00:00
|
|
|
SortMarkedObjects();
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uIntPtr nAnz1=GetMarkedObjectCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
bUnmark=nAnz1<nAnz0;
|
|
|
|
}
|
|
|
|
if (!bUnmark) {
|
|
|
|
BegDragObj(aLogicPos,NULL,(SdrHdl*)NULL,nMinMovLog);
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
} break;
|
|
|
|
case SDREVENT_MARKPOINT: { // + ggf. BegDrag
|
|
|
|
if (!rVEvt.bAddMark) UnmarkAllPoints();
|
|
|
|
if (rVEvt.bPrevNextMark) {
|
|
|
|
bRet=MarkNextPoint(aLogicPos,rVEvt.bMarkPrev);
|
|
|
|
} else {
|
|
|
|
bRet=MarkPoint(*rVEvt.pHdl,rVEvt.bUnmark);
|
|
|
|
}
|
|
|
|
if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
|
|
|
|
BegDragObj(aLogicPos,NULL,rVEvt.pHdl,nMinMovLog);
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
} break;
|
|
|
|
case SDREVENT_MARKGLUEPOINT: { // + ggf. BegDrag
|
|
|
|
if (!rVEvt.bAddMark) UnmarkAllGluePoints();
|
|
|
|
if (rVEvt.bPrevNextMark) {
|
|
|
|
bRet=MarkNextGluePoint(aLogicPos,rVEvt.bMarkPrev);
|
|
|
|
} else {
|
|
|
|
bRet=MarkGluePoint(rVEvt.pObj,rVEvt.nGlueId,rVEvt.pPV,rVEvt.bUnmark);
|
|
|
|
}
|
|
|
|
if (!rVEvt.bUnmark && !rVEvt.bPrevNextMark) {
|
|
|
|
SdrHdl* pHdl=GetGluePointHdl(rVEvt.pObj,rVEvt.nGlueId);
|
|
|
|
BegDragObj(aLogicPos,NULL,pHdl,nMinMovLog);
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
} break;
|
|
|
|
case SDREVENT_BEGMARK: bRet=BegMark(aLogicPos,rVEvt.bAddMark,rVEvt.bUnmark); break;
|
2006-11-14 12:50:54 +00:00
|
|
|
case SDREVENT_BEGINSOBJPOINT: bRet = BegInsObjPoint(aLogicPos, MODKEY_PolyPoly); break;
|
2000-09-18 16:07:07 +00:00
|
|
|
case SDREVENT_ENDINSOBJPOINT: {
|
|
|
|
SdrCreateCmd eCmd=SDRCREATE_NEXTPOINT;
|
|
|
|
if (MODKEY_PolyPoly) eCmd=SDRCREATE_NEXTOBJECT;
|
|
|
|
if (rVEvt.nMouseClicks>1) eCmd=SDRCREATE_FORCEEND;
|
|
|
|
EndInsObjPoint(eCmd);
|
2011-01-10 16:11:35 +01:00
|
|
|
bRet=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
} break;
|
|
|
|
case SDREVENT_BEGINSGLUEPOINT: bRet=BegInsGluePoint(aLogicPos); break;
|
|
|
|
case SDREVENT_BEGDRAGHELPLINE: bRet=BegDragHelpLine(rVEvt.nHlplIdx,rVEvt.pPV); break;
|
|
|
|
case SDREVENT_BEGDRAGOBJ: bRet=BegDragObj(aLogicPos,NULL,rVEvt.pHdl,nMinMovLog); break;
|
|
|
|
case SDREVENT_BEGCREATEOBJ: {
|
|
|
|
if (nAktInvent==SdrInventor && nAktIdent==OBJ_CAPTION) {
|
|
|
|
long nHgt=SdrEngineDefaults::GetFontHeight();
|
|
|
|
bRet=BegCreateCaptionObj(aLogicPos,Size(5*nHgt,2*nHgt));
|
|
|
|
} else bRet=BegCreateObj(aLogicPos);
|
|
|
|
} break;
|
|
|
|
case SDREVENT_BEGMACROOBJ: bRet=BegMacroObj(aLogicPos,nHitTolLog,rVEvt.pObj,rVEvt.pPV,(Window*)pActualOutDev); break;
|
|
|
|
case SDREVENT_BEGTEXTEDIT: {
|
|
|
|
if (!IsObjMarked(rVEvt.pObj)) {
|
|
|
|
UnmarkAllObj();
|
|
|
|
MarkObj(rVEvt.pRootObj,rVEvt.pPV);
|
|
|
|
}
|
2006-11-14 12:50:54 +00:00
|
|
|
|
|
|
|
bRet = pActualOutDev && OUTDEV_WINDOW == pActualOutDev->GetOutDevType()&&
|
|
|
|
SdrBeginTextEdit(rVEvt.pObj, rVEvt.pPV, (Window*)pActualOutDev, sal_False, (SdrOutliner*)0L);
|
|
|
|
|
|
|
|
if(bRet)
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
MouseEvent aMEvt(pActualOutDev->LogicToPixel(aLogicPos),
|
|
|
|
1,rVEvt.nMouseMode,rVEvt.nMouseCode,rVEvt.nMouseCode);
|
|
|
|
OutlinerView* pOLV=GetTextEditOutlinerView();
|
|
|
|
if (pOLV!=NULL) pOLV->MouseButtonDown(aMEvt); // Event an den Outliner, aber ohne Doppelklick
|
|
|
|
}
|
|
|
|
} break;
|
2006-06-19 15:48:15 +00:00
|
|
|
default: break;
|
2000-09-18 16:07:07 +00:00
|
|
|
} // switch
|
|
|
|
if (bRet && pActualOutDev!=NULL && pActualOutDev->GetOutDevType()==OUTDEV_WINDOW) {
|
|
|
|
Window* pWin=(Window*)pActualOutDev;
|
|
|
|
// Maus links gedrueckt?
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bLeftDown=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseDown;
|
2000-09-18 16:07:07 +00:00
|
|
|
// Maus links losgelassen?
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bLeftUp=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && rVEvt.bMouseUp;
|
2000-09-18 16:07:07 +00:00
|
|
|
// Maus links gedrueckt oder gehalten?
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bLeftDown1=(rVEvt.nMouseCode&MOUSE_LEFT)!=0 && !rVEvt.bMouseUp;
|
2000-09-18 16:07:07 +00:00
|
|
|
pWin->SetPointer(GetPreferedPointer(rVEvt.aLogicPos,pWin,
|
|
|
|
rVEvt.nMouseCode & (KEY_SHIFT|KEY_MOD1|KEY_MOD2),bLeftDown1));
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bAction=IsAction();
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bLeftDown && bAction) pWin->CaptureMouse();
|
|
|
|
else if (bLeftUp || (rVEvt.bIsAction && !bAction)) pWin->ReleaseMouse();
|
|
|
|
}
|
|
|
|
return bRet;
|
|
|
|
}
|
2010-01-07 18:52:36 +01:00
|
|
|
#include <editeng/outlobj.hxx>
|
2001-01-19 15:00:14 +00:00
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
Pointer SdrView::GetPreferedPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier, sal_Bool bLeftDown) const
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// Actions
|
2006-11-14 12:50:54 +00:00
|
|
|
if (IsCreateObj())
|
|
|
|
{
|
|
|
|
return pAktCreate->GetCreatePointer();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
if (mpCurrentSdrDragMethod)
|
2008-03-12 08:57:34 +00:00
|
|
|
{
|
|
|
|
if ((IsDraggingPoints() || IsDraggingGluePoints()) && IsMouseHideWhileDraggingPoints())
|
|
|
|
return Pointer(POINTER_NULL);
|
|
|
|
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
return mpCurrentSdrDragMethod->GetSdrDragPointer();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
if (IsMarkObj() || IsMarkPoints() || IsMarkGluePoints() || IsEncirclement() || IsSetPageOrg()) return Pointer(POINTER_ARROW);
|
2006-11-14 12:50:54 +00:00
|
|
|
if (IsDragHelpLine()) return GetDraggedHelpLinePointer();
|
2000-09-18 16:07:07 +00:00
|
|
|
if (IsMacroObj()) {
|
|
|
|
SdrObjMacroHitRec aHitRec;
|
|
|
|
aHitRec.aPos=pOut->LogicToPixel(rMousePos);
|
|
|
|
aHitRec.aDownPos=aMacroDownPos;
|
|
|
|
aHitRec.nTol=nMacroTol;
|
|
|
|
aHitRec.pVisiLayer=&pMacroPV->GetVisibleLayers();
|
|
|
|
aHitRec.pPageView=pMacroPV;
|
|
|
|
aHitRec.pOut=pMacroWin;
|
|
|
|
aHitRec.bDown=bMacroDown;
|
|
|
|
return pMacroObj->GetMacroPointer(aHitRec);
|
|
|
|
}
|
2011-05-12 11:03:28 +02:00
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
// TextEdit, ObjEdit, Macro
|
2001-01-19 15:00:14 +00:00
|
|
|
if (IsTextEdit() && (IsTextEditInSelectionMode() || IsTextEditHit(rMousePos,0/*nTol*/)))
|
|
|
|
{
|
|
|
|
if(!pOut || IsTextEditInSelectionMode())
|
|
|
|
{
|
|
|
|
if(pTextEditOutliner->IsVertical())
|
|
|
|
return Pointer(POINTER_TEXT_VERTICAL);
|
|
|
|
else
|
|
|
|
return Pointer(POINTER_TEXT);
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
// hier muss besser der Outliner was liefern:
|
|
|
|
Point aPos(pOut->LogicToPixel(rMousePos));
|
|
|
|
Pointer aPointer(pTextEditOutlinerView->GetPointer(aPos));
|
2001-01-19 15:00:14 +00:00
|
|
|
if (aPointer==POINTER_ARROW)
|
|
|
|
{
|
|
|
|
if(pTextEditOutliner->IsVertical())
|
|
|
|
aPointer = POINTER_TEXT_VERTICAL;
|
|
|
|
else
|
|
|
|
aPointer = POINTER_TEXT;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
return aPointer;
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrViewEvent aVEvt;
|
|
|
|
aVEvt.nMouseCode=(nModifier&(KEY_SHIFT|KEY_MOD1|KEY_MOD2))|MOUSE_LEFT; // um zu sehen, was bei MouseLeftDown passieren wuerde
|
|
|
|
aVEvt.bMouseDown=!bLeftDown; // Was waere wenn ...
|
|
|
|
aVEvt.bMouseUp=bLeftDown; // Was waere wenn ...
|
2008-03-12 08:57:34 +00:00
|
|
|
if (pOut!=NULL)
|
|
|
|
((SdrView*)this)->SetActualWin(pOut);
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrHitKind eHit=PickAnything(rMousePos,aVEvt);
|
|
|
|
SdrEventKind eEvent=aVEvt.eEvent;
|
2008-03-12 08:57:34 +00:00
|
|
|
switch (eEvent)
|
|
|
|
{
|
|
|
|
case SDREVENT_BEGCREATEOBJ:
|
|
|
|
return aAktCreatePointer;
|
|
|
|
case SDREVENT_MARKOBJ:
|
|
|
|
case SDREVENT_BEGMARK:
|
|
|
|
return Pointer(POINTER_ARROW);
|
|
|
|
case SDREVENT_MARKPOINT:
|
|
|
|
case SDREVENT_MARKGLUEPOINT:
|
|
|
|
return Pointer(POINTER_MOVEPOINT);
|
|
|
|
case SDREVENT_BEGINSOBJPOINT:
|
|
|
|
case SDREVENT_BEGINSGLUEPOINT:
|
|
|
|
return Pointer(POINTER_CROSS);
|
|
|
|
case SDREVENT_EXECUTEURL:
|
|
|
|
return Pointer(POINTER_REFHAND);
|
|
|
|
case SDREVENT_BEGMACROOBJ:
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObjMacroHitRec aHitRec;
|
|
|
|
aHitRec.aPos=aVEvt.aLogicPos;
|
|
|
|
aHitRec.aDownPos=aHitRec.aPos;
|
|
|
|
aHitRec.nTol=nHitTolLog;
|
|
|
|
aHitRec.pVisiLayer=&aVEvt.pPV->GetVisibleLayers();
|
|
|
|
aHitRec.pPageView=aVEvt.pPV;
|
|
|
|
aHitRec.pOut=(OutputDevice*)pOut;
|
|
|
|
return aVEvt.pObj->GetMacroPointer(aHitRec);
|
|
|
|
}
|
2006-06-19 15:48:15 +00:00
|
|
|
default: break;
|
2000-09-18 16:07:07 +00:00
|
|
|
} // switch
|
2001-01-19 15:00:14 +00:00
|
|
|
|
|
|
|
switch(eHit)
|
|
|
|
{
|
2008-03-12 08:57:34 +00:00
|
|
|
case SDRHIT_CELL:
|
|
|
|
return Pointer(POINTER_ARROW);
|
2001-01-19 15:00:14 +00:00
|
|
|
case SDRHIT_HELPLINE :
|
|
|
|
return aVEvt.pPV->GetHelpLines()[aVEvt.nHlplIdx].GetPointer();
|
|
|
|
case SDRHIT_GLUEPOINT:
|
|
|
|
return Pointer(POINTER_MOVEPOINT);
|
|
|
|
case SDRHIT_TEXTEDIT :
|
|
|
|
case SDRHIT_TEXTEDITOBJ:
|
|
|
|
{
|
2008-03-12 08:57:34 +00:00
|
|
|
SdrTextObj* pText = dynamic_cast< SdrTextObj* >( aVEvt.pObj );
|
|
|
|
if(pText && pText->HasText())
|
2001-01-19 15:00:14 +00:00
|
|
|
{
|
2008-03-12 08:57:34 +00:00
|
|
|
OutlinerParaObject* pParaObj = pText->GetOutlinerParaObject();
|
|
|
|
if(pParaObj && pParaObj->IsVertical())
|
|
|
|
return Pointer(POINTER_TEXT_VERTICAL);
|
2001-01-19 15:00:14 +00:00
|
|
|
}
|
|
|
|
return Pointer(POINTER_TEXT);
|
|
|
|
}
|
2006-06-19 15:48:15 +00:00
|
|
|
default: break;
|
2001-01-19 15:00:14 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bMarkHit=eHit==SDRHIT_MARKEDOBJECT;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrHdl* pHdl=aVEvt.pHdl;
|
|
|
|
// Nun die Pointer fuer Dragging checken
|
|
|
|
if (pHdl!=NULL || bMarkHit) {
|
|
|
|
SdrHdlKind eHdl= pHdl!=NULL ? pHdl->GetKind() : HDL_MOVE;
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bCorner=pHdl!=NULL && pHdl->IsCornerHdl();
|
|
|
|
sal_Bool bVertex=pHdl!=NULL && pHdl->IsVertexHdl();
|
|
|
|
sal_Bool bMov=eHdl==HDL_MOVE;
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bMov && (eDragMode==SDRDRAG_MOVE || eDragMode==SDRDRAG_RESIZE || bMarkedHitMovesAlways)) {
|
|
|
|
if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
|
|
|
|
return Pointer(POINTER_MOVE);
|
|
|
|
}
|
|
|
|
switch (eDragMode) {
|
|
|
|
case SDRDRAG_ROTATE: {
|
2011-01-10 16:11:35 +01:00
|
|
|
if ((bCorner || bMov) && !IsRotateAllowed(sal_True))
|
2000-09-18 16:07:07 +00:00
|
|
|
return Pointer(POINTER_NOTALLOWED);
|
|
|
|
|
|
|
|
// Sind 3D-Objekte selektiert?
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool b3DObjSelected = sal_False;
|
|
|
|
for (sal_uInt32 a=0; !b3DObjSelected && a<GetMarkedObjectCount(); a++) {
|
2004-07-12 13:50:13 +00:00
|
|
|
SdrObject* pObj = GetMarkedObjectByIndex(a);
|
2000-09-18 16:07:07 +00:00
|
|
|
if(pObj && pObj->ISA(E3dObject))
|
2011-01-10 16:11:35 +01:00
|
|
|
b3DObjSelected = sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
// Falls es um ein 3D-Objekt geht, muss trotz !IsShearAllowed
|
|
|
|
// weitergemacht werden, da es sich um eine Rotation statt um
|
|
|
|
// einen Shear handelt
|
|
|
|
if (bVertex && !IsShearAllowed() && !b3DObjSelected)
|
|
|
|
return Pointer(POINTER_NOTALLOWED);
|
|
|
|
if (bMov)
|
|
|
|
return Pointer(POINTER_ROTATE);
|
|
|
|
} break;
|
|
|
|
case SDRDRAG_SHEAR: case SDRDRAG_DISTORT: {
|
|
|
|
if (bCorner) {
|
2011-01-10 16:11:35 +01:00
|
|
|
if (!IsDistortAllowed(sal_True) && !IsDistortAllowed(sal_False)) return Pointer(POINTER_NOTALLOWED);
|
2000-09-18 16:07:07 +00:00
|
|
|
else return Pointer(POINTER_REFHAND);
|
|
|
|
}
|
|
|
|
if (bVertex && !IsShearAllowed()) return Pointer(POINTER_NOTALLOWED);
|
|
|
|
if (bMov) {
|
|
|
|
if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
|
|
|
|
return Pointer(POINTER_MOVE);
|
|
|
|
}
|
|
|
|
} break;
|
|
|
|
case SDRDRAG_MIRROR: {
|
|
|
|
if (bCorner || bVertex || bMov) {
|
|
|
|
SdrHdl* pH1=aHdl.GetHdl(HDL_REF1);
|
|
|
|
SdrHdl* pH2=aHdl.GetHdl(HDL_REF2);
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool b90=sal_False;
|
|
|
|
sal_Bool b45=sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
Point aDif;
|
|
|
|
if (pH1!=NULL && pH2!=NULL) {
|
|
|
|
aDif=pH2->GetPos()-pH1->GetPos();
|
|
|
|
b90=(aDif.X()==0) || aDif.Y()==0;
|
|
|
|
b45=b90 || (Abs(aDif.X())==Abs(aDif.Y()));
|
|
|
|
}
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bNo=sal_False;
|
2011-01-13 16:27:50 +01:00
|
|
|
if (!IsMirrorAllowed(sal_True,sal_True)) bNo=sal_True; // Spiegeln ueberhaupt nicht erlaubt
|
|
|
|
if (!IsMirrorAllowed(sal_False,sal_False) && !b45) bNo=sal_True; // freies Spiegeln nicht erlaubt
|
2011-01-10 16:11:35 +01:00
|
|
|
if (!IsMirrorAllowed(sal_True,sal_False) && !b90) bNo=sal_True; // Spiegeln hor/ver erlaubt
|
2000-09-18 16:07:07 +00:00
|
|
|
if (bNo) return Pointer(POINTER_NOTALLOWED);
|
|
|
|
if (b90) {
|
|
|
|
return Pointer(POINTER_MIRROR);
|
|
|
|
}
|
|
|
|
return Pointer(POINTER_MIRROR);
|
|
|
|
}
|
|
|
|
} break;
|
|
|
|
|
|
|
|
case SDRDRAG_TRANSPARENCE:
|
|
|
|
{
|
|
|
|
if(!IsTransparenceAllowed())
|
|
|
|
return Pointer(POINTER_NOTALLOWED);
|
|
|
|
|
|
|
|
return Pointer(POINTER_REFHAND);
|
|
|
|
}
|
|
|
|
|
|
|
|
case SDRDRAG_GRADIENT:
|
|
|
|
{
|
|
|
|
if(!IsGradientAllowed())
|
|
|
|
return Pointer(POINTER_NOTALLOWED);
|
|
|
|
|
|
|
|
return Pointer(POINTER_REFHAND);
|
|
|
|
}
|
|
|
|
|
|
|
|
case SDRDRAG_CROOK: {
|
|
|
|
if (bCorner || bVertex || bMov) {
|
2011-01-10 16:11:35 +01:00
|
|
|
if (!IsCrookAllowed(sal_True) && !IsCrookAllowed(sal_False)) return Pointer(POINTER_NOTALLOWED);
|
2006-06-19 15:48:15 +00:00
|
|
|
return Pointer(POINTER_CROOK);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2008-02-26 06:39:17 +00:00
|
|
|
|
|
|
|
case SDRDRAG_CROP:
|
|
|
|
{
|
|
|
|
return Pointer(POINTER_CROP);
|
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
default: {
|
2011-01-10 16:11:35 +01:00
|
|
|
if ((bCorner || bVertex) && !IsResizeAllowed(sal_True)) return Pointer(POINTER_NOTALLOWED);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
if (pHdl!=NULL) return pHdl->GetPointer();
|
|
|
|
if (bMov) {
|
|
|
|
if (!IsMoveAllowed()) return Pointer(POINTER_ARROW); // weil Doppelklick oder Drag&Drop moeglich
|
|
|
|
return Pointer(POINTER_MOVE);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (eEditMode==SDREDITMODE_CREATE) return aAktCreatePointer;
|
|
|
|
return Pointer(POINTER_ARROW);
|
|
|
|
}
|
|
|
|
|
|
|
|
XubString SdrView::GetStatusText()
|
|
|
|
{
|
|
|
|
XubString aStr;
|
|
|
|
XubString aName;
|
|
|
|
|
|
|
|
aStr.AppendAscii("nix");
|
|
|
|
|
2008-03-12 08:57:34 +00:00
|
|
|
if (pAktCreate!=NULL)
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
aStr=pAktCreate->getSpecialDragComment(aDragStat);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if(!aStr.Len())
|
|
|
|
{
|
|
|
|
pAktCreate->TakeObjNameSingul(aName);
|
|
|
|
aStr = ImpGetResStr(STR_ViewCreateObj);
|
|
|
|
}
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
else if (mpCurrentSdrDragMethod)
|
2008-03-12 08:57:34 +00:00
|
|
|
{
|
|
|
|
if (bInsPolyPoint || IsInsertGluePoint())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
aStr=aInsPointUndoStr;
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (aDragStat.IsMinMoved())
|
|
|
|
{
|
CWS-TOOLING: integrate CWS aw059
2008-12-16 16:15:40 +0100 aw r265557 : #i95645# avoid expensive tries to stream in graphic data when stream is at end anyways
2008-12-15 16:49:58 +0100 wg r265512 : i97278
2008-12-12 16:02:15 +0100 aw r265427 : #i95645# new formulation was wrong in two places; thanks go to THB. Thanks!
2008-12-12 15:49:06 +0100 aw r265425 : #i95645# refined formulation of AA on/off constraints for VCLCanvas
2008-12-12 14:51:26 +0100 aw r265420 : #i95645# workaround for DrawTransparent of button hilighting when remote displayed; somehow GDI+ does bad dithering in that case
2008-12-12 13:23:00 +0100 aw r265414 : removed temporary build hack; it made it's way in using the rebase; with SVN the rebase is not based on pure checkouts, but uses local changes.
2008-12-11 19:35:59 +0100 aw r265352 : #i95645# need to switch off AA for WNT and UNX, the VCLCanvas is currently not able to handle AA correctly
2008-12-11 16:05:17 +0100 thb r265327 : #i95645# Changed defaults to on; as for the while svx dialog is not changed
2008-12-10 13:40:38 +0100 aw r265180 : #i95645# changed pixel snap to basegfx::fround
2008-12-10 13:25:45 +0100 aw r265177 : corrected linux warning
2008-12-10 12:28:02 +0100 aw r265167 : #i95645# added support for pixel snap/linux resp. no AA for mac (also pixel snap) when AA is switched off to the basegfx::B2DPolyPolygon painting VCL methods; needed for e.g. selection in SC and SW
2008-12-09 18:44:39 +0100 aw r265136 : #i95645# corrected filled path construction
2008-12-09 18:12:40 +0100 aw r265133 : #i95645# added support for non-AAd transparent paints
2008-12-09 18:11:58 +0100 aw r265132 : #i95645# forced selection without AA
2008-12-09 18:11:29 +0100 aw r265131 : #i88893# smoothed/corrected SW selection rects for transparent selection, forced selection without AA
2008-12-09 15:21:39 +0100 aw r265094 : #i95645# corrected FormControl full drag
2008-12-09 15:11:26 +0100 aw r265093 : #i95645# make gdiplus usages more safe when no line or fill color is selected
2008-12-09 14:30:09 +0100 aw r265085 : #i95645# added GDIPlus support
2008-12-09 13:41:06 +0100 aw r265081 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:46 +0100 aw r265080 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:40:29 +0100 aw r265079 : #i95645# added simple AA using GDIPlis to VCL
2008-12-09 13:33:16 +0100 aw r265078 : #i95645# changes to requirements, discussed with FPE
2008-12-08 14:11:39 +0100 aw r264995 : #i95646# added missing extra-wireframe for SdrDragObjOwn implementations when object has no border
2008-12-08 14:11:00 +0100 aw r264994 : #i95646# corrected RenderMarkerArrayPrimitive2D OutDev usage in VclProcessor2D
2008-12-08 12:15:10 +0100 ufi r264987 : aw059
2008-12-08 12:14:40 +0100 ufi r264986 : aw059
2008-12-05 13:16:18 +0100 aw r264905 : CWS-TOOLING: rebase CWS aw059 to trunk@264807 (milestone: DEV300:m37)
2008-12-04 11:29:48 +0100 aw r264827 : #i95645# corrected warning
2008-12-03 14:43:39 +0100 aw r264783 : #i95645# simplified overlay manager and objects to stl vector; added stuff to render some more overlay to primitive renderer to get AA support for WIN32
2008-12-03 14:42:43 +0100 aw r264782 : #i95645# added test for WIN32 for AA if cairo canvas is available
2008-12-03 14:42:13 +0100 aw r264781 : #i95645# removed unused options for writer selection overlay
2008-12-03 14:41:51 +0100 aw r264780 : #i95645# removed unused options for calc overlay
2008-12-03 14:41:21 +0100 aw r264779 : #i95645# small corrections in canvas renderer
2008-12-02 18:32:31 +0100 aw r264730 : #i95646# merged cairo version from THB's CWS cairosource01
2008-12-02 15:25:45 +0100 aw r264705 : #i95645# added helpers for the MarkerArrayPrimitive2D change which support buffered creation of the most used markers
2008-12-02 12:50:01 +0100 aw r264690 : #i95645# added a non-saved method IsAAPossibleOnThisSystem to SvtOptionsDrawinglayer to quickly test if AA can be offered on the system, added buffering of that check.
2008-12-02 12:48:51 +0100 aw r264689 : #i95645# unified MarkerArrayPrimitive2D to work bitmap-orientated, adapted usages. Added buffered preparation for needed markers. Minor adaptions for AA
2008-12-02 12:47:53 +0100 aw r264688 : #i95645# unified MarkerArrayPrimitive2D to no longer work on a enum and types of markers, but to use a BitmapEx (or any other Bitmap object) which will be displayed centerd and in discrete coordinates at positions. Adapted decomposition and all usages. Corrected minor stuff with grid primitive
2008-11-28 17:11:12 +0100 thb r264565 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:03:27 +0100 thb r264563 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 17:00:07 +0100 thb r264562 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-28 16:59:51 +0100 thb r264561 : #i95645# Added two more lists to config; to be able to differentiate canvas capabilities
2008-11-27 19:13:42 +0100 aw r264519 : #i95646# optimized getLength() a little bit
2008-11-27 19:12:50 +0100 aw r264518 : #i95646# corrected AA expansion of invalidate frame; buffered discrete distance at OM
2008-11-27 18:50:05 +0100 aw r264516 : #i95646# corrected fit to frame texts for WIN32
2008-11-27 15:32:15 +0100 aw r264496 : #i95646# helplines corrected
2008-11-27 15:32:05 +0100 aw r264495 : #i95646# helplines corrected
2008-11-27 15:01:30 +0100 aw r264492 : #i95646# enable AA support for old polygons, especially to get support for MetaFile output
2008-11-27 14:33:28 +0100 aw r264489 : #i95646# AA support for wireframe overlays
2008-11-27 13:40:54 +0100 aw r264485 : #i95646# added full repaint when AA option changes
2008-11-27 13:29:19 +0100 aw r264482 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 13:29:08 +0100 aw r264481 : #i95646# corrected handling of bSolidDragging config entries
2008-11-27 11:30:12 +0100 aw r264469 : #i95646# corrected IsAAPossibleOnThisSystem implementation
2008-11-26 16:33:04 +0100 aw r264420 : #i95646# adapted OfaViewTabPage to use disable mechanism for AA and HWAccel
2008-11-26 15:49:19 +0100 aw r264406 : #i95646# added DlgEdObj::getFullDragClone() to create specialized simple SdrUnoObj clones for solid dragging
2008-11-26 15:48:11 +0100 aw r264405 : #i95646# changed derivation of ViewObjectContactOfUnoControl to get a valid isPrimitiveVisible() implementation
2008-11-26 14:11:37 +0100 aw r264385 : #i88893# added new look for selection in sw
2008-11-26 11:32:33 +0100 aw r264360 : corrected compiler warning
2008-11-25 18:46:29 +0100 aw r264328 : #i95646# snapshot with FullDrag clones
2008-11-25 18:46:07 +0100 aw r264327 : #i95646# snapshot with FullDrag clones
2008-11-25 18:45:43 +0100 aw r264326 : #i95646# snapshot with FullDrag clones
2008-11-25 18:19:04 +0100 thb r264324 : #i96585# Added missing inline specifier
2008-11-25 13:16:25 +0100 aw r264285 : #i95646# next snapshot
2008-11-25 13:15:33 +0100 aw r264284 : #i95646# next snapshot
2008-11-25 13:15:12 +0100 aw r264283 : #i95646# next snapshot
2008-11-25 13:14:51 +0100 aw r264282 : #i95646# next snapshot
2008-11-20 13:40:49 +0100 aw r264045 : #i95646# stable snapshot
2008-11-20 13:40:29 +0100 aw r264044 : #i95646# stable snapshot
2008-11-20 13:40:06 +0100 aw r264043 : #i95646# stable snapshot
2008-11-20 13:39:45 +0100 aw r264042 : #i95646# stable snapshot
2008-11-18 11:53:39 +0100 aw r263758 : #i95646# snapshot for linux test build
2008-11-18 11:52:54 +0100 aw r263757 : #i95646# snapshot for linux test build
2008-11-18 11:52:02 +0100 aw r263756 : #i95646# snapshot for linux test build
2008-11-14 18:17:49 +0100 aw r263692 : #i95646# snapshot with most stuff working
2008-11-14 18:14:26 +0100 aw r263691 : #i95646# snapshot with most stuff working
2008-11-14 18:12:50 +0100 aw r263690 : #i95646# snapshot with most stuff working
2008-11-14 18:12:16 +0100 aw r263689 : #i95646# snapshot with most stuff working
2008-11-14 18:11:41 +0100 aw r263688 : #i95646# snapshot with most stuff working
2008-11-07 18:44:22 +0100 aw r263479 : #i95968# better support PrefMapMode; special for MAP_PIXEL was missing
2008-11-05 17:39:15 +0100 aw r263356 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 17:39:02 +0100 aw r263355 : #i95644# #i95645# #i95646# bigger change done, saving for another experiment
2008-11-05 12:28:32 +0100 aw r263350 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:27:51 +0100 aw r263349 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:58 +0100 aw r263348 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:26:17 +0100 aw r263347 : #i95644# #i95645# #i95646# in-between state before bigger change
2008-11-05 12:25:55 +0100 aw r263346 : #i95644# #i95645# #i95646# in-between state before bigger change
2009-01-05 13:44:12 +00:00
|
|
|
OSL_TRACE("SdrView::GetStatusText(%lx) %lx\n", this, mpCurrentSdrDragMethod);
|
|
|
|
mpCurrentSdrDragMethod->TakeSdrDragComment(aStr);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2006-11-14 12:50:54 +00:00
|
|
|
}
|
|
|
|
else if(IsMarkObj())
|
|
|
|
{
|
|
|
|
if(AreObjectsMarked())
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkMoreObjs);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-11-14 12:50:54 +00:00
|
|
|
else
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkObjs);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-11-14 12:50:54 +00:00
|
|
|
}
|
|
|
|
else if(IsMarkPoints())
|
|
|
|
{
|
|
|
|
if(HasMarkedPoints())
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkMorePoints);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkPoints);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2006-11-14 12:50:54 +00:00
|
|
|
} else if (IsMarkGluePoints())
|
|
|
|
{
|
|
|
|
if(HasMarkedGluePoints())
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkMoreGluePoints);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
aStr = ImpGetResStr(STR_ViewMarkGluePoints);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (IsTextEdit() && pTextEditOutlinerView!=NULL) {
|
2000-09-18 16:07:07 +00:00
|
|
|
aStr=ImpGetResStr(STR_ViewTextEdit); // "TextEdit - Zeile y Spalte x";
|
|
|
|
ESelection aSel(pTextEditOutlinerView->GetSelection());
|
|
|
|
long nPar=aSel.nEndPara,nLin=0,nCol=aSel.nEndPos;
|
|
|
|
if (aSel.nEndPara>0) {
|
2011-01-10 16:11:35 +01:00
|
|
|
for (sal_uInt16 nParaNum=0; nParaNum<aSel.nEndPara; nParaNum++) {
|
2000-09-18 16:07:07 +00:00
|
|
|
nLin+=pTextEditOutliner->GetLineCount(nParaNum);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// Noch 'ne kleine Unschoenheit:
|
|
|
|
// Am Ende einer Zeile eines mehrzeiligen Absatzes wird die Position
|
|
|
|
// der naechsten Zeile des selben Absatzes angezeigt, so es eine solche
|
|
|
|
// gibt.
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uInt16 nParaLine=0;
|
|
|
|
sal_uIntPtr nParaLineAnz=pTextEditOutliner->GetLineCount(aSel.nEndPara);
|
|
|
|
sal_Bool bBrk=sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
while (!bBrk) {
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_uInt16 nLen=pTextEditOutliner->GetLineLen(aSel.nEndPara,nParaLine);
|
|
|
|
sal_Bool bLastLine=(nParaLine==nParaLineAnz-1);
|
2000-09-18 16:07:07 +00:00
|
|
|
if (nCol>nLen || (!bLastLine && nCol==nLen)) {
|
|
|
|
nCol-=nLen;
|
|
|
|
nLin++;
|
|
|
|
nParaLine++;
|
2011-01-10 16:11:35 +01:00
|
|
|
} else bBrk=sal_True;
|
|
|
|
if (nLen==0) bBrk=sal_True; // Sicherheitshalber
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2008-03-07 13:49:23 +00:00
|
|
|
aStr.SearchAndReplaceAscii("%1", UniString::CreateFromInt32(nPar + 1));
|
|
|
|
aStr.SearchAndReplaceAscii("%2", UniString::CreateFromInt32(nLin + 1));
|
|
|
|
aStr.SearchAndReplaceAscii("%3", UniString::CreateFromInt32(nCol + 1));
|
2008-06-06 11:34:40 +00:00
|
|
|
|
2009-07-10 14:03:42 +02:00
|
|
|
#ifdef DBG_UTIL
|
2008-06-06 11:34:40 +00:00
|
|
|
aStr += UniString( RTL_CONSTASCII_USTRINGPARAM( ", Level " ) );
|
|
|
|
aStr += UniString::CreateFromInt32( pTextEditOutliner->GetDepth( aSel.nEndPara ) );
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(aStr.EqualsAscii("nix"))
|
|
|
|
{
|
2004-07-12 13:50:13 +00:00
|
|
|
if (AreObjectsMarked()) {
|
2000-09-18 16:07:07 +00:00
|
|
|
ImpTakeDescriptionStr(STR_ViewMarked,aStr);
|
|
|
|
if (IsGluePointEditMode()) {
|
|
|
|
if (HasMarkedGluePoints()) {
|
|
|
|
ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_GLUEPOINTSDESCRIPTION);
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
if (HasMarkedPoints()) {
|
|
|
|
ImpTakeDescriptionStr(STR_ViewMarked,aStr,0,IMPSDR_POINTSDESCRIPTION);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
aStr.Erase();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if(aName.Len())
|
|
|
|
{
|
2008-03-07 13:49:23 +00:00
|
|
|
aStr.SearchAndReplaceAscii("%1", aName);
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if(aStr.Len())
|
|
|
|
{
|
|
|
|
// ersten Buchstaben gross schreiben
|
|
|
|
String aTmpStr(aStr.Copy(0, 1));
|
|
|
|
aTmpStr.ToUpperAscii();
|
|
|
|
aStr.Replace(0, 1, aTmpStr);
|
|
|
|
}
|
|
|
|
return aStr;
|
|
|
|
}
|
|
|
|
|
|
|
|
SdrViewContext SdrView::GetContext() const
|
|
|
|
{
|
|
|
|
if( IsGluePointEditMode() )
|
|
|
|
return SDRCONTEXT_GLUEPOINTEDIT;
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
const sal_uIntPtr nMarkAnz = GetMarkedObjectCount();
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( HasMarkablePoints() && !IsFrameHandles() )
|
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bPath=sal_True;
|
|
|
|
for( sal_uIntPtr nMarkNum = 0; nMarkNum < nMarkAnz && bPath; nMarkNum++ )
|
2004-07-12 13:50:13 +00:00
|
|
|
if (!GetMarkedObjectByIndex(nMarkNum)->ISA(SdrPathObj))
|
2011-01-10 16:11:35 +01:00
|
|
|
bPath=sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( bPath )
|
|
|
|
return SDRCONTEXT_POINTEDIT;
|
|
|
|
}
|
|
|
|
|
2004-07-12 13:50:13 +00:00
|
|
|
if( GetMarkedObjectCount() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool bGraf = sal_True, bMedia = sal_True, bTable = sal_True;
|
2004-08-12 08:06:04 +00:00
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
for( sal_uIntPtr nMarkNum = 0; nMarkNum < nMarkAnz && ( bGraf || bMedia ); nMarkNum++ )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2004-07-12 13:50:13 +00:00
|
|
|
const SdrObject* pMarkObj = GetMarkedObjectByIndex( nMarkNum );
|
2010-02-23 00:23:09 +01:00
|
|
|
DBG_ASSERT( pMarkObj, "SdrView::GetContext(), null pointer in mark list!" );
|
|
|
|
|
|
|
|
if( !pMarkObj )
|
|
|
|
continue;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if( !pMarkObj->ISA( SdrGrafObj ) )
|
2011-01-10 16:11:35 +01:00
|
|
|
bGraf = sal_False;
|
2004-08-12 08:06:04 +00:00
|
|
|
|
|
|
|
if( !pMarkObj->ISA( SdrMediaObj ) )
|
2011-01-10 16:11:35 +01:00
|
|
|
bMedia = sal_False;
|
2008-03-12 08:57:34 +00:00
|
|
|
|
|
|
|
if( !pMarkObj->ISA( ::sdr::table::SdrTableObj ) )
|
2011-01-10 16:11:35 +01:00
|
|
|
bTable = sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if( bGraf )
|
|
|
|
return SDRCONTEXT_GRAPHIC;
|
2004-08-12 08:06:04 +00:00
|
|
|
else if( bMedia )
|
|
|
|
return SDRCONTEXT_MEDIA;
|
2008-03-12 08:57:34 +00:00
|
|
|
else if( bTable )
|
|
|
|
return SDRCONTEXT_TABLE;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
return SDRCONTEXT_STANDARD;
|
|
|
|
}
|
|
|
|
|
|
|
|
void SdrView::MarkAll()
|
|
|
|
{
|
|
|
|
if (IsTextEdit()) {
|
|
|
|
GetTextEditOutlinerView()->SetSelection(ESelection(0,0,0xFFFF,0xFFFF));
|
2006-11-14 12:50:54 +00:00
|
|
|
#ifdef DBG_UTIL
|
2000-09-18 16:07:07 +00:00
|
|
|
if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
|
2001-07-11 09:15:22 +00:00
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
} else if (IsGluePointEditMode()) MarkAllGluePoints();
|
|
|
|
else if (HasMarkablePoints()) MarkAllPoints();
|
|
|
|
else MarkAllObj();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SdrView::UnmarkAll()
|
|
|
|
{
|
|
|
|
if (IsTextEdit()) {
|
|
|
|
ESelection eSel=GetTextEditOutlinerView()->GetSelection();
|
|
|
|
eSel.nStartPara=eSel.nEndPara;
|
|
|
|
eSel.nStartPos=eSel.nEndPos;
|
|
|
|
GetTextEditOutlinerView()->SetSelection(eSel);
|
2006-11-14 12:50:54 +00:00
|
|
|
#ifdef DBG_UTIL
|
2000-09-18 16:07:07 +00:00
|
|
|
if (pItemBrowser!=NULL) pItemBrowser->SetDirty();
|
2001-07-11 09:15:22 +00:00
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
} else if (HasMarkedGluePoints()) UnmarkAllGluePoints();
|
|
|
|
else if (HasMarkedPoints()) UnmarkAllPoints(); // ! Marked statt Markable !
|
|
|
|
else UnmarkAllObj();
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::MarkNext(sal_Bool bPrev)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if (IsTextEdit()) {
|
2011-01-10 16:11:35 +01:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
if (IsGluePointEditMode() && HasMarkedGluePoints()) {
|
|
|
|
return MarkNextGluePoint(bPrev);
|
|
|
|
}
|
|
|
|
if (HasMarkedPoints()) {
|
|
|
|
return MarkNextPoint(bPrev);
|
|
|
|
}
|
|
|
|
return MarkNextObj(bPrev);
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::MarkNext(const Point& rPnt, sal_Bool bPrev)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if (IsTextEdit()) {
|
2011-01-10 16:11:35 +01:00
|
|
|
return sal_False;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
if (IsGluePointEditMode() && HasMarkedGluePoints()) {
|
|
|
|
//return MarkNextGluePoint(rPnt,bPrev); fehlende Implementation !!!
|
|
|
|
}
|
|
|
|
if (HasMarkedPoints()) {
|
|
|
|
//return MarkNextPoint(rPnt,bPrev); fehlende Implementation !!!
|
|
|
|
}
|
|
|
|
return MarkNextObj(rPnt,-2,bPrev);
|
|
|
|
}
|
|
|
|
|
|
|
|
const Rectangle& SdrView::GetMarkedRect() const
|
|
|
|
{
|
|
|
|
if (IsGluePointEditMode() && HasMarkedGluePoints()) {
|
|
|
|
return GetMarkedGluePointsRect();
|
|
|
|
}
|
|
|
|
if (HasMarkedPoints()) {
|
|
|
|
return GetMarkedPointsRect();
|
|
|
|
}
|
|
|
|
return GetMarkedObjRect();
|
|
|
|
}
|
|
|
|
|
|
|
|
void SdrView::DeleteMarked()
|
|
|
|
{
|
2008-03-12 08:57:34 +00:00
|
|
|
if (IsTextEdit())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObjEditView::KeyInput(KeyEvent(0,KeyCode(KEYFUNC_DELETE)),pTextEditWin);
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if( mxSelectionController.is() && mxSelectionController->DeleteMarked() )
|
|
|
|
{
|
|
|
|
// action already performed by current selection controller, do nothing
|
|
|
|
}
|
|
|
|
else if (IsGluePointEditMode() && HasMarkedGluePoints())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
DeleteMarkedGluePoints();
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else if (GetContext()==SDRCONTEXT_POINTEDIT && HasMarkedPoints())
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
DeleteMarkedPoints();
|
2008-03-12 08:57:34 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2000-09-18 16:07:07 +00:00
|
|
|
DeleteMarkedObj();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2011-01-10 16:11:35 +01:00
|
|
|
sal_Bool SdrView::BegMark(const Point& rPnt, sal_Bool bAddMark, sal_Bool bUnmark)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-10 16:11:35 +01:00
|
|
|
if (bUnmark) bAddMark=sal_True;
|
2000-09-18 16:07:07 +00:00
|
|
|
if (IsGluePointEditMode()) {
|
|
|
|
if (!bAddMark) UnmarkAllGluePoints();
|
|
|
|
return BegMarkGluePoints(rPnt,bUnmark);
|
|
|
|
} else if (HasMarkablePoints()) {
|
|
|
|
if (!bAddMark) UnmarkAllPoints();
|
|
|
|
return BegMarkPoints(rPnt,bUnmark);
|
|
|
|
} else {
|
|
|
|
if (!bAddMark) UnmarkAllObj();
|
|
|
|
return BegMarkObj(rPnt,bUnmark);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-10-16 00:05:16 +02:00
|
|
|
void SdrView::ConfigurationChanged( ::utl::ConfigurationBroadcaster*p, sal_uInt32 nHint)
|
2002-04-26 10:21:25 +00:00
|
|
|
{
|
2009-10-16 00:05:16 +02:00
|
|
|
onAccessibilityOptionsChanged();
|
|
|
|
SdrCreateView::ConfigurationChanged(p, nHint);
|
2002-04-26 10:21:25 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
SvtAccessibilityOptions& SdrView::getAccessibilityOptions()
|
|
|
|
{
|
|
|
|
return maAccessibilityOptions;
|
|
|
|
}
|
|
|
|
|
|
|
|
/** method is called whenever the global SvtAccessibilityOptions is changed */
|
|
|
|
void SdrView::onAccessibilityOptionsChanged()
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2004-10-12 09:13:24 +00:00
|
|
|
void SdrView::SetMasterPagePaintCaching(sal_Bool bOn)
|
|
|
|
{
|
|
|
|
if(mbMasterPagePaintCaching != bOn)
|
|
|
|
{
|
|
|
|
mbMasterPagePaintCaching = bOn;
|
|
|
|
|
2006-11-14 12:50:54 +00:00
|
|
|
// reset at all SdrPageWindow's
|
|
|
|
SdrPageView* pPageView = GetSdrPageView();
|
2004-10-12 09:13:24 +00:00
|
|
|
|
2006-11-14 12:50:54 +00:00
|
|
|
if(pPageView)
|
|
|
|
{
|
|
|
|
for(sal_uInt32 b(0L); b < pPageView->PageWindowCount(); b++)
|
2004-10-12 09:13:24 +00:00
|
|
|
{
|
2006-11-14 12:50:54 +00:00
|
|
|
SdrPageWindow* pPageWindow = pPageView->GetPageWindow(b);
|
|
|
|
DBG_ASSERT(pPageWindow, "SdrView::SetMasterPagePaintCaching: Corrupt SdrPageWindow list (!)");
|
2004-10-12 09:13:24 +00:00
|
|
|
|
|
|
|
// force deletion of ObjectContact, so at re-display all VOCs
|
|
|
|
// will be re-created with updated flag setting
|
2006-11-14 12:50:54 +00:00
|
|
|
pPageWindow->ResetObjectContact();
|
2004-10-12 09:13:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// force redraw of this view
|
|
|
|
pPageView->InvalidateAllWin();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2011-05-12 11:03:28 +02:00
|
|
|
|
2010-10-12 15:53:47 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|