2010-10-12 15:59:00 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-11-30 12:23:25 +00:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (the "License"); you may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of
|
|
|
|
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-01-08 18:32:51 +01:00
|
|
|
#include <editeng/outliner.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/svditer.hxx>
|
|
|
|
#include <svx/svdobj.hxx>
|
|
|
|
#include <svx/svdpagv.hxx>
|
|
|
|
|
|
|
|
#include "fupoor.hxx"
|
|
|
|
#include "tabvwsh.hxx"
|
|
|
|
#include "drawview.hxx"
|
|
|
|
#include "detfunc.hxx"
|
2004-02-03 11:36:33 +00:00
|
|
|
#include "document.hxx"
|
2006-11-14 14:52:06 +00:00
|
|
|
#include <vcl/svapp.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>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-09-23 11:20:40 +02:00
|
|
|
FuPoor::FuPoor(ScTabViewShell* pViewSh, vcl::Window* pWin, ScDrawView* pViewP,
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrModel* pDoc, SfxRequest& rReq) :
|
2007-02-27 12:13:25 +00:00
|
|
|
pView(pViewP),
|
2000-09-18 16:07:07 +00:00
|
|
|
pViewShell(pViewSh),
|
|
|
|
pWindow(pWin),
|
|
|
|
pDrDoc(pDoc),
|
|
|
|
aSfxRequest(rReq),
|
|
|
|
pDialog(NULL),
|
2011-03-10 16:55:21 -05:00
|
|
|
bIsInDragMode(false),
|
2011-03-01 14:29:24 +01:00
|
|
|
// remember MouseButton state
|
2002-07-18 08:57:13 +00:00
|
|
|
mnCode(0)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
aScrollTimer.SetTimeoutHdl( LINK(this, FuPoor, ScrollHdl) );
|
|
|
|
aScrollTimer.SetTimeout(SELENG_AUTOREPEAT_INTERVAL);
|
|
|
|
|
|
|
|
aDragTimer.SetTimeoutHdl( LINK(this, FuPoor, DragTimerHdl) );
|
|
|
|
aDragTimer.SetTimeout(SELENG_DRAGDROP_TIMEOUT);
|
|
|
|
}
|
|
|
|
|
|
|
|
FuPoor::~FuPoor()
|
|
|
|
{
|
|
|
|
aDragTimer.Stop();
|
|
|
|
aScrollTimer.Stop();
|
|
|
|
|
2013-02-22 04:29:56 +01:00
|
|
|
delete pDialog;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::Activate()
|
|
|
|
{
|
|
|
|
if (pDialog)
|
|
|
|
{
|
|
|
|
pDialog->Show();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::Deactivate()
|
|
|
|
{
|
|
|
|
aDragTimer.Stop();
|
|
|
|
aScrollTimer.Stop();
|
|
|
|
|
|
|
|
if (pDialog)
|
|
|
|
{
|
|
|
|
pDialog->Hide();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Scrollen bei Erreichen des Fensterrandes; wird von
|
|
|
|
|* MouseMove aufgerufen
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuPoor::ForceScroll(const Point& aPixPos)
|
|
|
|
{
|
|
|
|
aScrollTimer.Stop();
|
|
|
|
|
|
|
|
Size aSize = pWindow->GetSizePixel();
|
2004-06-04 10:27:11 +00:00
|
|
|
SCsCOL dx = 0;
|
|
|
|
SCsROW dy = 0;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( aPixPos.X() <= 0 ) dx = -1;
|
|
|
|
if ( aPixPos.X() >= aSize.Width() ) dx = 1;
|
|
|
|
if ( aPixPos.Y() <= 0 ) dy = -1;
|
|
|
|
if ( aPixPos.Y() >= aSize.Height() ) dy = 1;
|
|
|
|
|
2014-06-18 12:14:29 +02:00
|
|
|
ScViewData& rViewData = pViewShell->GetViewData();
|
|
|
|
if ( rViewData.GetDocument()->IsNegativePage( rViewData.GetTabNo() ) )
|
2004-02-03 11:36:33 +00:00
|
|
|
dx = -dx;
|
|
|
|
|
2014-06-18 12:14:29 +02:00
|
|
|
ScSplitPos eWhich = rViewData.GetActivePart();
|
|
|
|
if ( dx > 0 && rViewData.GetHSplitMode() == SC_SPLIT_FIX && WhichH(eWhich) == SC_SPLIT_LEFT )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
pViewShell->ActivatePart( ( eWhich == SC_SPLIT_TOPLEFT ) ?
|
|
|
|
SC_SPLIT_TOPRIGHT : SC_SPLIT_BOTTOMRIGHT );
|
|
|
|
dx = 0;
|
|
|
|
}
|
2014-06-18 12:14:29 +02:00
|
|
|
if ( dy > 0 && rViewData.GetVSplitMode() == SC_SPLIT_FIX && WhichV(eWhich) == SC_SPLIT_TOP )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
pViewShell->ActivatePart( ( eWhich == SC_SPLIT_TOPLEFT ) ?
|
|
|
|
SC_SPLIT_BOTTOMLEFT : SC_SPLIT_BOTTOMRIGHT );
|
|
|
|
dy = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if ( dx != 0 || dy != 0 )
|
|
|
|
{
|
|
|
|
pViewShell->ScrollLines(2*dx, 4*dy);
|
|
|
|
aScrollTimer.Start();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Timer-Handler fuer Fensterscrolling
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG_INLINE_START(FuPoor, ScrollHdl)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
Point aPosPixel = pWindow->GetPointerPosPixel();
|
2002-07-18 08:57:13 +00:00
|
|
|
|
2011-03-01 14:29:24 +01:00
|
|
|
// use remembered MouseButton state to create correct
|
2014-04-10 10:52:22 +02:00
|
|
|
// MouseEvents for this artificial MouseMove.
|
2002-07-18 08:57:13 +00:00
|
|
|
MouseMove(MouseEvent(aPosPixel, 1, 0, GetMouseButtonCode()));
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
|
|
|
|
|
2011-03-01 14:29:24 +01:00
|
|
|
// moved from inline to *.cxx
|
2014-02-17 15:28:10 +02:00
|
|
|
bool FuPoor::MouseButtonUp(const MouseEvent& rMEvt)
|
2002-07-18 08:57:13 +00:00
|
|
|
{
|
2011-03-01 14:29:24 +01:00
|
|
|
// remember button state for creation of own MouseEvents
|
2002-07-18 08:57:13 +00:00
|
|
|
SetMouseButtonCode(rMEvt.GetButtons());
|
|
|
|
|
2011-03-10 16:55:21 -05:00
|
|
|
return false;
|
2002-07-18 08:57:13 +00:00
|
|
|
}
|
|
|
|
|
2011-03-01 14:29:24 +01:00
|
|
|
// moved from inline to *.cxx
|
2014-02-17 15:33:39 +02:00
|
|
|
bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
|
2002-07-18 08:57:13 +00:00
|
|
|
{
|
2011-03-01 14:29:24 +01:00
|
|
|
// remember button state for creation of own MouseEvents
|
2002-07-18 08:57:13 +00:00
|
|
|
SetMouseButtonCode(rMEvt.GetButtons());
|
|
|
|
|
2011-03-10 16:55:21 -05:00
|
|
|
return false;
|
2002-07-18 08:57:13 +00:00
|
|
|
}
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* String in Applikations-Statuszeile ausgeben
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
// WriteStatus gibt's nicht mehr
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Tastaturereignisse bearbeiten
|
|
|
|
|*
|
2011-01-17 13:20:22 +01:00
|
|
|
|* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
|
2000-09-18 16:07:07 +00:00
|
|
|
|* FALSE.
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2014-02-17 15:13:44 +02:00
|
|
|
bool FuPoor::KeyInput(const KeyEvent& /* rKEvt */)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2014-02-17 15:13:44 +02:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt8 FuPoor::Command(const CommandEvent& rCEvt)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
if ( COMMAND_STARTDRAG == rCEvt.GetCommand() )
|
|
|
|
{
|
|
|
|
//!!! sollte Joe eigentlich machen:
|
|
|
|
// nur, wenn im Outliner was selektiert ist, darf
|
2011-01-17 13:20:22 +01:00
|
|
|
// Command sal_True zurueckliefern:
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
OutlinerView* pOutView = pView->GetTextEditOutlinerView();
|
|
|
|
|
|
|
|
if ( pOutView )
|
2014-04-01 11:32:26 +02:00
|
|
|
return pOutView->HasSelection() ? (pView->Command(rCEvt,pWindow) ? 1 : 0) : SC_CMD_NONE;
|
2000-09-18 16:07:07 +00:00
|
|
|
else
|
|
|
|
return pView->Command(rCEvt,pWindow);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
return pView->Command(rCEvt,pWindow);
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::DoCut()
|
|
|
|
{
|
|
|
|
if (pView)
|
|
|
|
{
|
|
|
|
//! pView->DoCut(pWindow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Copy object to clipboard
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
|
|
|
void FuPoor::DoCopy()
|
|
|
|
{
|
|
|
|
if (pView)
|
|
|
|
{
|
|
|
|
//! pView->DoCopy(pWindow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::DoPaste()
|
|
|
|
{
|
|
|
|
if (pView)
|
|
|
|
{
|
|
|
|
//! pView->DoPaste(pWindow);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Timer-Handler fuer Drag&Drop
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(FuPoor, DragTimerHdl)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
|
|
|
// ExecuteDrag (und das damit verbundene Reschedule) direkt aus dem Timer
|
|
|
|
// aufzurufen, bringt die VCL-Timer-Verwaltung durcheinander, wenn dabei
|
|
|
|
// (z.B. im Drop) wieder ein Timer gestartet wird (z.B. ComeBack-Timer der
|
|
|
|
// DrawView fuer Solid Handles / ModelHasChanged) - der neue Timer laeuft
|
|
|
|
// dann um die Dauer des Drag&Drop zu spaet ab.
|
|
|
|
// Darum Drag&Drop aus eigenem Event:
|
|
|
|
|
|
|
|
Application::PostUserEvent( LINK( this, FuPoor, DragHdl ) );
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2012-03-01 18:00:32 +01:00
|
|
|
IMPL_LINK_NOARG(FuPoor, DragHdl)
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-11-14 14:52:06 +00:00
|
|
|
SdrHdl* pHdl = pView->PickHandle(aMDPos);
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
if ( pHdl==NULL && pView->IsMarkedHit(aMDPos) )
|
|
|
|
{
|
|
|
|
pWindow->ReleaseMouse();
|
2014-02-17 15:45:18 +02:00
|
|
|
bIsInDragMode = true;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
// pView->BeginDrag(pWindow, aMDPos);
|
|
|
|
pViewShell->GetScDrawView()->BeginDrag(pWindow, aMDPos);
|
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Detektiv-Linie
|
|
|
|
|
2014-02-17 15:45:18 +02:00
|
|
|
bool FuPoor::IsDetectiveHit( const Point& rLogicPos )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2006-11-14 14:52:06 +00:00
|
|
|
SdrPageView* pPV = pView->GetSdrPageView();
|
2000-09-18 16:07:07 +00:00
|
|
|
if (!pPV)
|
2011-03-10 16:55:21 -05:00
|
|
|
return false;
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2014-02-17 15:45:18 +02:00
|
|
|
bool bFound = false;
|
2000-09-18 16:07:07 +00:00
|
|
|
SdrObjListIter aIter( *pPV->GetObjList(), IM_FLAT );
|
|
|
|
SdrObject* pObject = aIter.Next();
|
|
|
|
while (pObject && !bFound)
|
|
|
|
{
|
|
|
|
if (ScDetectiveFunc::IsNonAlienArrow( pObject ))
|
|
|
|
{
|
2011-01-17 13:20:22 +01:00
|
|
|
sal_uInt16 nHitLog = (sal_uInt16) pWindow->PixelToLogic(
|
2000-09-18 16:07:07 +00:00
|
|
|
Size(pView->GetHitTolerancePixel(),0)).Width();
|
CWS-TOOLING: integrate CWS aw065
2009-06-17 13:48:12 +0200 aw r273068 : #99385# corrected small error in SCs selection visualisation
2009-06-16 15:45:28 +0200 wg r273021 : i102838
2009-06-16 12:46:07 +0200 wg r273016 : i102833
2009-06-11 17:40:29 +0200 aw r272895 : #i98870# added implementation for getPageCount helper
2009-06-11 16:39:54 +0200 aw r272885 : #i102663#, #i102667#, #i98870# incluide file typo corrected
2009-06-11 16:24:07 +0200 aw r272881 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-11 16:23:52 +0200 aw r272880 : #i102663#, #i102667#, #i98870# changes to SdrText, it's usage in SdrTextPrimitive2D and to OverlayObject base implementation. Also support for PageCountField added
2009-06-09 13:50:29 +0200 aw r272769 : #i98917# added support for the OverlayHatchRectanglePrimitive to follow rotation with it's hatch; simplified OverlayHatchRect
2009-06-09 13:04:06 +0200 aw r272766 : #i98870# re-added PageNumber identification in SdrTextPrimitive2D::get2DDecomposition
2009-06-08 18:56:05 +0200 aw r272744 : #i99385# added some last corrections to OverlayObjects in SD (had to do some merges on resync, needed to optically check and correct)
2009-06-08 11:17:57 +0200 aw r272725 : cws aw065: corrections after resync
2009-06-08 11:02:25 +0200 aw r272723 : cws aw065: corrections after resync
2009-06-08 10:36:22 +0200 aw r272722 : cws aw065: corrections after resync
2009-06-05 18:57:06 +0200 aw r272712 : CWS-TOOLING: rebase CWS aw065 to trunk@272291 (milestone: DEV300:m49)
2009-06-05 14:56:34 +0200 aw r272690 : #i89784# stripped old stuff no longer needed due to text-to-polygon conversion using primitives
2009-06-05 14:50:07 +0200 aw r272688 : #102091# removed on-model-lock suppression for SdrObject::ActionChanged()
2009-06-05 14:47:29 +0200 aw r272687 : #102091# corrected local value buffering in ScenePrimitive2D::get2DDecomposition
2009-06-03 17:53:32 +0200 aw r272599 : #i89784# version before stripping
2009-06-03 17:52:18 +0200 aw r272598 : #i89784# version before stripping
2009-05-28 17:15:47 +0200 aw r272420 : #i101872# old stuff removed/stripped
2009-05-28 17:15:32 +0200 aw r272419 : #i101872# old stuff removed/stripped
2009-05-28 17:15:15 +0200 aw r272418 : #i101872# old stuff removed/stripped
2009-05-28 17:14:45 +0200 aw r272417 : #i101872# old stuff removed/stripped
2009-05-28 12:13:56 +0200 aw r272396 : #i101872# stable hybrid state
2009-05-28 12:13:46 +0200 aw r272395 : #i101872# stable hybrid state
2009-05-28 12:13:35 +0200 aw r272394 : #i101872# stable hybrid state
2009-05-28 12:13:20 +0200 aw r272393 : #i101872# stable hybrid state
2009-05-28 12:13:05 +0200 aw r272392 : #i101872# stable hybrid state
2009-05-28 12:12:51 +0200 aw r272391 : #i101872# stable hybrid state
2009-05-15 16:56:02 +0200 aw r271952 : #i101872# HitTest unifications
2009-05-15 16:55:22 +0200 aw r271951 : #i101872# HitTest unifications
2009-05-15 16:55:12 +0200 aw r271950 : #i101872# HitTest unifications
2009-05-15 16:55:01 +0200 aw r271949 : #i101872# HitTest unifications
2009-05-15 16:54:51 +0200 aw r271948 : #i101872# HitTest unifications
2009-05-15 16:54:35 +0200 aw r271947 : #i101872# HitTest unifications
2009-05-15 16:54:22 +0200 aw r271946 : #i101872# HitTest unifications
2009-05-12 19:08:38 +0200 aw r271834 : #i101684# corrected AutoShape's preparation of text transformation due to different definitions in TextBounds
2009-05-12 15:44:49 +0200 aw r271827 : #i89784# expanded TextLayouterDevice::getTextOutlines() to support DXArray and X-Font scaling
2009-05-11 19:40:40 +0200 aw r271790 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:25 +0200 aw r271789 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 19:40:12 +0200 aw r271788 : #i99385# extended HitTest primitive usage, removed IsHdlHit implementations; prepared further HitTest simplifications
2009-05-11 13:01:53 +0200 aw r271765 : #i99385# corrections and optimizations
2009-05-08 14:48:40 +0200 aw r271718 : #i1016180# added optimizations in model operations when model is locked
2009-05-08 14:11:45 +0200 aw r271716 : #i101679# added flush() calls to OverlayManager when interaction step is prepared
2009-05-07 17:44:03 +0200 aw r271689 : #i99385# last corrections/changes
2009-05-07 17:43:47 +0200 aw r271688 : #i99385# last corrections/changes
2009-05-07 13:20:09 +0200 aw r271654 : #i99385# added changes from WFH
2009-05-07 13:19:38 +0200 aw r271653 : #i99385# added changes from WFH
2009-05-07 13:19:11 +0200 aw r271652 : #i99385# added changes from WFH
2009-05-07 11:33:17 +0200 aw r271643 : #i99385# corrections after resync
2009-05-07 11:17:31 +0200 aw r271642 : #i99385# corrections after resync
2009-05-06 18:46:53 +0200 aw r271609 : CWS-TOOLING: rebase CWS aw065 to trunk@271427 (milestone: DEV300:m47)
2009-05-05 18:24:03 +0200 aw r271548 : #i101443# force new text decomposition when TextBackgroundColor has changed
2009-05-05 17:44:42 +0200 aw r271542 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:32 +0200 aw r271541 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:20 +0200 aw r271540 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 17:44:09 +0200 aw r271539 : #i99385# 3rd round, simplifications and corrections done
2009-05-05 15:48:38 +0200 aw r271527 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:15 +0200 aw r271526 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:48:03 +0200 aw r271525 : #i99385# 2nd round, usages checked and corrected
2009-05-05 15:47:51 +0200 aw r271524 : #i99385# 2nd round, usages checked and corrected
2009-04-27 18:33:10 +0200 aw r271300 : #i99385# state commit after all implementations are done
2009-04-27 15:36:53 +0200 aw r271283 : #i99385# state commit after all implementations are done
2009-04-27 15:27:49 +0200 aw r271280 : #i99385# state commit after all implementations are done
2009-04-27 15:27:33 +0200 aw r271279 : #i99385# state commit after all implementations are done
2009-04-27 15:27:00 +0200 aw r271278 : #i99385# state commit after all implementations are done
2009-04-27 15:26:15 +0200 aw r271277 : #i99385# state commit after all implementations are done
2009-04-27 15:25:40 +0200 aw r271275 : #i99385# state commit after all implementations are done
2009-04-27 15:25:19 +0200 aw r271274 : #i99385# state commit after all implementations are done
2009-04-27 15:24:00 +0200 aw r271272 : #i99385# state commit after all implementations are done
2009-03-19 17:12:00 +0100 aw r269757 : #i100360# corrected bitmap's PefSize calculation for bitmap filled objects when Bitmap is Pixel-based on it's mapping
2009-02-19 17:09:47 +0100 aw r268298 : #i98917# corrected attributes
2009-02-19 17:09:30 +0100 aw r268297 : #i98917# corrected attributes
2009-02-19 17:08:22 +0100 aw r268296 : #i98917# corrected attributes
2009-02-19 11:56:25 +0100 aw r268268 : #i98870# added extra code to react on PageNumber change
2009-02-18 16:57:24 +0100 aw r268243 : #i98917# in OverlayHatchRect::getGeometry the rotation was not applied to the TopLeft of the centered rectangle, but to the already extended one, thus the visualisation was rotating around the wrong edge
2009-07-02 14:28:15 +00:00
|
|
|
if(SdrObjectPrimitiveHit(*pObject, rLogicPos, nHitLog, *pPV, 0, false))
|
|
|
|
{
|
2014-02-17 15:45:18 +02:00
|
|
|
bFound = true;
|
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
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
pObject = aIter.Next();
|
|
|
|
}
|
|
|
|
return bFound;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::StopDragTimer()
|
|
|
|
{
|
|
|
|
if (aDragTimer.IsActive() )
|
|
|
|
aDragTimer.Stop();
|
|
|
|
}
|
|
|
|
|
2002-03-22 08:41:37 +00:00
|
|
|
/*************************************************************************
|
|
|
|
|*
|
2011-03-01 14:29:24 +01:00
|
|
|
|* Create default drawing objects via keyboard
|
2002-03-22 08:41:37 +00:00
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2007-02-27 12:13:25 +00:00
|
|
|
SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16 /* nID */, const Rectangle& /* rRectangle */)
|
2002-03-22 08:41:37 +00:00
|
|
|
{
|
|
|
|
// empty base implementation
|
|
|
|
return 0L;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuPoor::ImpForceQuadratic(Rectangle& rRect)
|
|
|
|
{
|
|
|
|
if(rRect.GetWidth() > rRect.GetHeight())
|
|
|
|
{
|
|
|
|
rRect = Rectangle(
|
|
|
|
Point(rRect.Left() + ((rRect.GetWidth() - rRect.GetHeight()) / 2), rRect.Top()),
|
|
|
|
Size(rRect.GetHeight(), rRect.GetHeight()));
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
rRect = Rectangle(
|
|
|
|
Point(rRect.Left(), rRect.Top() + ((rRect.GetHeight() - rRect.GetWidth()) / 2)),
|
|
|
|
Size(rRect.GetWidth(), rRect.GetWidth()));
|
|
|
|
}
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-11-17 08:28:23 +00:00
|
|
|
// #i33136#
|
|
|
|
bool FuPoor::doConstructOrthogonal() const
|
|
|
|
{
|
2014-09-27 00:44:52 +02:00
|
|
|
// Check whether an image is selected -> they should scale proportionally
|
|
|
|
if (pView->AreObjectsMarked())
|
|
|
|
{
|
|
|
|
const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
|
|
|
|
if (rMarkList.GetMarkCount() == 1)
|
|
|
|
{
|
|
|
|
if (rMarkList.GetMark(0)->GetMarkedSdrObj()->GetObjIdentifier() == OBJ_GRAF)
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
2004-11-17 08:28:23 +00:00
|
|
|
return false;
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2010-10-12 15:59:00 +02:00
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|