Files
libreoffice/sd/source/ui/func/fusel.cxx

1521 lines
53 KiB
C++
Raw Normal View History

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