15b190011SAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 35b190011SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 45b190011SAndrew Rist * or more contributor license agreements. See the NOTICE file 55b190011SAndrew Rist * distributed with this work for additional information 65b190011SAndrew Rist * regarding copyright ownership. The ASF licenses this file 75b190011SAndrew Rist * to you under the Apache License, Version 2.0 (the 85b190011SAndrew Rist * "License"); you may not use this file except in compliance 95b190011SAndrew Rist * with the License. You may obtain a copy of the License at 105b190011SAndrew Rist * 115b190011SAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 125b190011SAndrew Rist * 135b190011SAndrew Rist * Unless required by applicable law or agreed to in writing, 145b190011SAndrew Rist * software distributed under the License is distributed on an 155b190011SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 165b190011SAndrew Rist * KIND, either express or implied. See the License for the 175b190011SAndrew Rist * specific language governing permissions and limitations 185b190011SAndrew Rist * under the License. 195b190011SAndrew Rist * 205b190011SAndrew Rist *************************************************************/ 215b190011SAndrew Rist 225b190011SAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove 25cdf0e10cSrcweir #include "precompiled_sd.hxx" 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <sot/object.hxx> 28cdf0e10cSrcweir #include <editeng/eeitem.hxx> 29cdf0e10cSrcweir #include <vcl/waitobj.hxx> 30cdf0e10cSrcweir 31cdf0e10cSrcweir #include <editeng/flditem.hxx> 32cdf0e10cSrcweir #include <svx/svdogrp.hxx> 33cdf0e10cSrcweir #include <tools/urlobj.hxx> 34cdf0e10cSrcweir #include <vcl/help.hxx> 35cdf0e10cSrcweir #include <svx/bmpmask.hxx> 36cdf0e10cSrcweir #include <svx/svdotext.hxx> 37cdf0e10cSrcweir #include <sfx2/app.hxx> 38cdf0e10cSrcweir #include <sfx2/dispatch.hxx> 39cdf0e10cSrcweir #include <sfx2/bindings.hxx> 40cdf0e10cSrcweir #include <svx/svdpagv.hxx> 41cdf0e10cSrcweir #include <svtools/imapobj.hxx> 42cdf0e10cSrcweir #include <svx/svxids.hrc> 43cdf0e10cSrcweir #include <svx/obj3d.hxx> 44cdf0e10cSrcweir #include <svx/polysc3d.hxx> 45cdf0e10cSrcweir #include <svx/svdpagv.hxx> 46cdf0e10cSrcweir 47cdf0e10cSrcweir #include <sfx2/viewfrm.hxx> 48cdf0e10cSrcweir 49cdf0e10cSrcweir #include "anminfo.hxx" 50cdf0e10cSrcweir #include "anmdef.hxx" 51cdf0e10cSrcweir #include "imapinfo.hxx" 52cdf0e10cSrcweir #include "app.hrc" 53cdf0e10cSrcweir #include "glob.hrc" 54cdf0e10cSrcweir #include "strings.hrc" 55cdf0e10cSrcweir #include "res_bmp.hrc" 56cdf0e10cSrcweir 57cdf0e10cSrcweir #include "app.hxx" 58cdf0e10cSrcweir #include "GraphicDocShell.hxx" 59cdf0e10cSrcweir #include "fudraw.hxx" 60cdf0e10cSrcweir #include "ViewShell.hxx" 61cdf0e10cSrcweir #include "FrameView.hxx" 62cdf0e10cSrcweir #include "View.hxx" 63cdf0e10cSrcweir #ifndef SD_WINDOW_SHELL_HXX 64cdf0e10cSrcweir #include "Window.hxx" 65cdf0e10cSrcweir #endif 66cdf0e10cSrcweir #include "drawdoc.hxx" 67cdf0e10cSrcweir #include "DrawDocShell.hxx" 68cdf0e10cSrcweir #include "Client.hxx" 69cdf0e10cSrcweir #include "sdresid.hxx" 70cdf0e10cSrcweir #include "drawview.hxx" 71cdf0e10cSrcweir #include "fusel.hxx" 72cdf0e10cSrcweir #include <svl/aeitem.hxx> 73cdf0e10cSrcweir #include <vcl/msgbox.hxx> 74cdf0e10cSrcweir #include "slideshow.hxx" 75cdf0e10cSrcweir #include <svx/sdrhittesthelper.hxx> 76cdf0e10cSrcweir 77cdf0e10cSrcweir using namespace ::com::sun::star; 78cdf0e10cSrcweir 79cdf0e10cSrcweir namespace sd { 80cdf0e10cSrcweir 81cdf0e10cSrcweir TYPEINIT1( FuDraw, FuPoor ); 82cdf0e10cSrcweir 83cdf0e10cSrcweir /************************************************************************* 84cdf0e10cSrcweir |* 85cdf0e10cSrcweir |* Base-class for all drawmodul-specific functions 86cdf0e10cSrcweir |* 87cdf0e10cSrcweir \************************************************************************/ 88cdf0e10cSrcweir 89cdf0e10cSrcweir FuDraw::FuDraw(ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, 90cdf0e10cSrcweir SdDrawDocument* pDoc, SfxRequest& rReq) : 91cdf0e10cSrcweir FuPoor(pViewSh, pWin, pView, pDoc, rReq), 92cdf0e10cSrcweir bMBDown(sal_False), 93cdf0e10cSrcweir bDragHelpLine(sal_False), 94cdf0e10cSrcweir bPermanent(sal_False) 95cdf0e10cSrcweir { 96cdf0e10cSrcweir } 97cdf0e10cSrcweir 98cdf0e10cSrcweir /************************************************************************* 99cdf0e10cSrcweir |* 100cdf0e10cSrcweir |* Destruktor 101cdf0e10cSrcweir |* 102cdf0e10cSrcweir \************************************************************************/ 103cdf0e10cSrcweir 104cdf0e10cSrcweir FuDraw::~FuDraw() 105cdf0e10cSrcweir { 106cdf0e10cSrcweir mpView->BrkAction(); 107cdf0e10cSrcweir } 108cdf0e10cSrcweir 109cdf0e10cSrcweir /************************************************************************* 110cdf0e10cSrcweir |* 111cdf0e10cSrcweir |* MouseButtonDown-event 112cdf0e10cSrcweir |* 113cdf0e10cSrcweir \************************************************************************/ 114cdf0e10cSrcweir 115cdf0e10cSrcweir sal_Bool FuDraw::MouseButtonDown(const MouseEvent& rMEvt) 116cdf0e10cSrcweir { 117cdf0e10cSrcweir // #95491# remember button state for creation of own MouseEvents 118cdf0e10cSrcweir SetMouseButtonCode(rMEvt.GetButtons()); 119cdf0e10cSrcweir 120cdf0e10cSrcweir sal_Bool bReturn = sal_False; 121cdf0e10cSrcweir 122cdf0e10cSrcweir bDragHelpLine = sal_False; 123cdf0e10cSrcweir 124cdf0e10cSrcweir aMDPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() ); 125cdf0e10cSrcweir 126cdf0e10cSrcweir if ( rMEvt.IsLeft() ) 127cdf0e10cSrcweir { 128cdf0e10cSrcweir FrameView* pFrameView = mpViewShell->GetFrameView(); 129cdf0e10cSrcweir 130cdf0e10cSrcweir // sal_Bool bOrtho = mpView->IsOrthoDesired() || pFrameView->IsOrtho(); 131cdf0e10cSrcweir // bOrtho = bOrtho != rMEvt.IsShift(); 132cdf0e10cSrcweir sal_Bool bOrtho = sal_False; 133cdf0e10cSrcweir 134cdf0e10cSrcweir sal_Bool bRestricted = sal_True; 135cdf0e10cSrcweir 136cdf0e10cSrcweir if (mpView->IsDragObj()) 137cdf0e10cSrcweir { 138cdf0e10cSrcweir // object is dragged (move, resize,...) 139cdf0e10cSrcweir const SdrHdl* pHdl = mpView->GetDragStat().GetHdl(); 140cdf0e10cSrcweir 141cdf0e10cSrcweir if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl())) 142cdf0e10cSrcweir { 143cdf0e10cSrcweir // Move 144cdf0e10cSrcweir bRestricted = sal_False; 145cdf0e10cSrcweir } 146cdf0e10cSrcweir } 147cdf0e10cSrcweir 148cdf0e10cSrcweir // #i33136# 149cdf0e10cSrcweir if(bRestricted && doConstructOrthogonal()) 150cdf0e10cSrcweir { 151cdf0e10cSrcweir // Restrict movement: 152cdf0e10cSrcweir // rectangle->quadrat, ellipse->circle etc. 153cdf0e10cSrcweir bOrtho = !rMEvt.IsShift(); 154cdf0e10cSrcweir } 155cdf0e10cSrcweir else 156cdf0e10cSrcweir { 157cdf0e10cSrcweir bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho(); 158cdf0e10cSrcweir } 159cdf0e10cSrcweir 160cdf0e10cSrcweir if (!mpView->IsSnapEnabled()) 161cdf0e10cSrcweir mpView->SetSnapEnabled(sal_True); 162cdf0e10cSrcweir sal_Bool bSnapModPressed = rMEvt.IsMod1(); 163cdf0e10cSrcweir 164cdf0e10cSrcweir sal_Bool bGridSnap = pFrameView->IsGridSnap(); 165cdf0e10cSrcweir bGridSnap = (bSnapModPressed != bGridSnap); 166cdf0e10cSrcweir 167cdf0e10cSrcweir if (mpView->IsGridSnap() != bGridSnap) 168cdf0e10cSrcweir mpView->SetGridSnap(bGridSnap); 169cdf0e10cSrcweir 170cdf0e10cSrcweir sal_Bool bBordSnap = pFrameView->IsBordSnap(); 171cdf0e10cSrcweir bBordSnap = (bSnapModPressed != bBordSnap); 172cdf0e10cSrcweir 173cdf0e10cSrcweir if (mpView->IsBordSnap() != bBordSnap) 174cdf0e10cSrcweir mpView->SetBordSnap(bBordSnap); 175cdf0e10cSrcweir 176cdf0e10cSrcweir sal_Bool bHlplSnap = pFrameView->IsHlplSnap(); 177cdf0e10cSrcweir bHlplSnap = (bSnapModPressed != bHlplSnap); 178cdf0e10cSrcweir 179cdf0e10cSrcweir if (mpView->IsHlplSnap() != bHlplSnap) 180cdf0e10cSrcweir mpView->SetHlplSnap(bHlplSnap); 181cdf0e10cSrcweir 182cdf0e10cSrcweir sal_Bool bOFrmSnap = pFrameView->IsOFrmSnap(); 183cdf0e10cSrcweir bOFrmSnap = (bSnapModPressed != bOFrmSnap); 184cdf0e10cSrcweir 185cdf0e10cSrcweir if (mpView->IsOFrmSnap() != bOFrmSnap) 186cdf0e10cSrcweir mpView->SetOFrmSnap(bOFrmSnap); 187cdf0e10cSrcweir 188cdf0e10cSrcweir sal_Bool bOPntSnap = pFrameView->IsOPntSnap(); 189cdf0e10cSrcweir bOPntSnap = (bSnapModPressed != bOPntSnap); 190cdf0e10cSrcweir 191cdf0e10cSrcweir if (mpView->IsOPntSnap() != bOPntSnap) 192cdf0e10cSrcweir mpView->SetOPntSnap(bOPntSnap); 193cdf0e10cSrcweir 194cdf0e10cSrcweir sal_Bool bOConSnap = pFrameView->IsOConSnap(); 195cdf0e10cSrcweir bOConSnap = (bSnapModPressed != bOConSnap); 196cdf0e10cSrcweir 197cdf0e10cSrcweir if (mpView->IsOConSnap() != bOConSnap) 198cdf0e10cSrcweir mpView->SetOConSnap(bOConSnap); 199cdf0e10cSrcweir 200cdf0e10cSrcweir sal_Bool bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled(); 201cdf0e10cSrcweir 202cdf0e10cSrcweir if (mpView->IsAngleSnapEnabled() != bAngleSnap) 203cdf0e10cSrcweir mpView->SetAngleSnapEnabled(bAngleSnap); 204cdf0e10cSrcweir 205cdf0e10cSrcweir if (mpView->IsOrtho() != bOrtho) 206cdf0e10cSrcweir mpView->SetOrtho(bOrtho); 207cdf0e10cSrcweir 208cdf0e10cSrcweir sal_Bool bCenter = rMEvt.IsMod2(); 209cdf0e10cSrcweir 210cdf0e10cSrcweir if ( mpView->IsCreate1stPointAsCenter() != bCenter || 211cdf0e10cSrcweir mpView->IsResizeAtCenter() != bCenter ) 212cdf0e10cSrcweir { 213cdf0e10cSrcweir mpView->SetCreate1stPointAsCenter(bCenter); 214cdf0e10cSrcweir mpView->SetResizeAtCenter(bCenter); 215cdf0e10cSrcweir } 216cdf0e10cSrcweir 217cdf0e10cSrcweir SdrPageView* pPV = 0; 218cdf0e10cSrcweir sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); 219cdf0e10cSrcweir 220cdf0e10cSrcweir // #76572# look only for HelpLines when they are visible (!) 221cdf0e10cSrcweir sal_Bool bHelpLine(sal_False); 222cdf0e10cSrcweir if(mpView->IsHlplVisible()) 223cdf0e10cSrcweir bHelpLine = mpView->PickHelpLine(aMDPos, nHitLog, *mpWindow, nHelpLine, pPV); 224cdf0e10cSrcweir sal_Bool bHitHdl = (mpView->PickHandle(aMDPos) != NULL); 225cdf0e10cSrcweir 226cdf0e10cSrcweir if ( bHelpLine 227cdf0e10cSrcweir && !mpView->IsCreateObj() 228cdf0e10cSrcweir && ((mpView->GetEditMode() == SDREDITMODE_EDIT && !bHitHdl) || (rMEvt.IsShift() && bSnapModPressed)) ) 229cdf0e10cSrcweir { 230cdf0e10cSrcweir mpWindow->CaptureMouse(); 231cdf0e10cSrcweir mpView->BegDragHelpLine(nHelpLine, pPV); 232cdf0e10cSrcweir bDragHelpLine = mpView->IsDragHelpLine(); 233cdf0e10cSrcweir bReturn = sal_True; 234cdf0e10cSrcweir } 235cdf0e10cSrcweir } 236cdf0e10cSrcweir ForcePointer(&rMEvt); 237cdf0e10cSrcweir 238cdf0e10cSrcweir return bReturn; 239cdf0e10cSrcweir } 240cdf0e10cSrcweir 241cdf0e10cSrcweir /************************************************************************* 242cdf0e10cSrcweir |* 243cdf0e10cSrcweir |* MouseMove-event 244cdf0e10cSrcweir |* 245cdf0e10cSrcweir \************************************************************************/ 246cdf0e10cSrcweir 247cdf0e10cSrcweir sal_Bool FuDraw::MouseMove(const MouseEvent& rMEvt) 248cdf0e10cSrcweir { 249cdf0e10cSrcweir FrameView* pFrameView = mpViewShell->GetFrameView(); 250cdf0e10cSrcweir Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() ); 251cdf0e10cSrcweir 252cdf0e10cSrcweir // sal_Bool bOrtho = mpView->IsOrthoDesired() || pFrameView->IsOrtho(); 253cdf0e10cSrcweir // bOrtho = bOrtho != rMEvt.IsShift(); 254cdf0e10cSrcweir sal_Bool bOrtho = sal_False; 255cdf0e10cSrcweir 256cdf0e10cSrcweir sal_Bool bRestricted = sal_True; 257cdf0e10cSrcweir 258cdf0e10cSrcweir if (mpView->IsDragObj()) 259cdf0e10cSrcweir { 260cdf0e10cSrcweir // object is dragged (move, resize, ...) 261cdf0e10cSrcweir const SdrHdl* pHdl = mpView->GetDragStat().GetHdl(); 262cdf0e10cSrcweir 263cdf0e10cSrcweir if (!pHdl || (!pHdl->IsCornerHdl() && !pHdl->IsVertexHdl())) 264cdf0e10cSrcweir { 265cdf0e10cSrcweir // Move 266cdf0e10cSrcweir bRestricted = sal_False; 267cdf0e10cSrcweir } 268cdf0e10cSrcweir } 269cdf0e10cSrcweir 270cdf0e10cSrcweir if (mpView->IsAction()) 271cdf0e10cSrcweir { 272cdf0e10cSrcweir // #i33136# 273cdf0e10cSrcweir if(bRestricted && doConstructOrthogonal()) 274cdf0e10cSrcweir { 275cdf0e10cSrcweir // Restrict movement: 276cdf0e10cSrcweir // rectangle->quadrat, ellipse->circle etc. 277cdf0e10cSrcweir bOrtho = !rMEvt.IsShift(); 278cdf0e10cSrcweir } 279cdf0e10cSrcweir else 280cdf0e10cSrcweir { 281cdf0e10cSrcweir bOrtho = rMEvt.IsShift() != pFrameView->IsOrtho(); 282cdf0e10cSrcweir } 283cdf0e10cSrcweir 284cdf0e10cSrcweir sal_Bool bSnapModPressed = rMEvt.IsMod2(); 285cdf0e10cSrcweir mpView->SetDragWithCopy(rMEvt.IsMod1() && pFrameView->IsDragWithCopy()); 286cdf0e10cSrcweir 287cdf0e10cSrcweir sal_Bool bGridSnap = pFrameView->IsGridSnap(); 288cdf0e10cSrcweir bGridSnap = (bSnapModPressed != bGridSnap); 289cdf0e10cSrcweir 290cdf0e10cSrcweir if (mpView->IsGridSnap() != bGridSnap) 291cdf0e10cSrcweir mpView->SetGridSnap(bGridSnap); 292cdf0e10cSrcweir 293cdf0e10cSrcweir sal_Bool bBordSnap = pFrameView->IsBordSnap(); 294cdf0e10cSrcweir bBordSnap = (bSnapModPressed != bBordSnap); 295cdf0e10cSrcweir 296cdf0e10cSrcweir if (mpView->IsBordSnap() != bBordSnap) 297cdf0e10cSrcweir mpView->SetBordSnap(bBordSnap); 298cdf0e10cSrcweir 299cdf0e10cSrcweir sal_Bool bHlplSnap = pFrameView->IsHlplSnap(); 300cdf0e10cSrcweir bHlplSnap = (bSnapModPressed != bHlplSnap); 301cdf0e10cSrcweir 302cdf0e10cSrcweir if (mpView->IsHlplSnap() != bHlplSnap) 303cdf0e10cSrcweir mpView->SetHlplSnap(bHlplSnap); 304cdf0e10cSrcweir 305cdf0e10cSrcweir sal_Bool bOFrmSnap = pFrameView->IsOFrmSnap(); 306cdf0e10cSrcweir bOFrmSnap = (bSnapModPressed != bOFrmSnap); 307cdf0e10cSrcweir 308cdf0e10cSrcweir if (mpView->IsOFrmSnap() != bOFrmSnap) 309cdf0e10cSrcweir mpView->SetOFrmSnap(bOFrmSnap); 310cdf0e10cSrcweir 311cdf0e10cSrcweir sal_Bool bOPntSnap = pFrameView->IsOPntSnap(); 312cdf0e10cSrcweir bOPntSnap = (bSnapModPressed != bOPntSnap); 313cdf0e10cSrcweir 314cdf0e10cSrcweir if (mpView->IsOPntSnap() != bOPntSnap) 315cdf0e10cSrcweir mpView->SetOPntSnap(bOPntSnap); 316cdf0e10cSrcweir 317cdf0e10cSrcweir sal_Bool bOConSnap = pFrameView->IsOConSnap(); 318cdf0e10cSrcweir bOConSnap = (bSnapModPressed != bOConSnap); 319cdf0e10cSrcweir 320cdf0e10cSrcweir if (mpView->IsOConSnap() != bOConSnap) 321cdf0e10cSrcweir mpView->SetOConSnap(bOConSnap); 322cdf0e10cSrcweir 323cdf0e10cSrcweir sal_Bool bAngleSnap = rMEvt.IsShift() == !pFrameView->IsAngleSnapEnabled(); 324cdf0e10cSrcweir 325cdf0e10cSrcweir if (mpView->IsAngleSnapEnabled() != bAngleSnap) 326cdf0e10cSrcweir mpView->SetAngleSnapEnabled(bAngleSnap); 327cdf0e10cSrcweir 328cdf0e10cSrcweir if (mpView->IsOrtho() != bOrtho) 329cdf0e10cSrcweir mpView->SetOrtho(bOrtho); 330cdf0e10cSrcweir 331cdf0e10cSrcweir sal_Bool bCenter = rMEvt.IsMod2(); 332cdf0e10cSrcweir 333cdf0e10cSrcweir if ( mpView->IsCreate1stPointAsCenter() != bCenter || 334cdf0e10cSrcweir mpView->IsResizeAtCenter() != bCenter ) 335cdf0e10cSrcweir { 336cdf0e10cSrcweir mpView->SetCreate1stPointAsCenter(bCenter); 337cdf0e10cSrcweir mpView->SetResizeAtCenter(bCenter); 338cdf0e10cSrcweir } 339cdf0e10cSrcweir 340cdf0e10cSrcweir if ( mpView->IsDragHelpLine() ) 341cdf0e10cSrcweir mpView->MovDragHelpLine(aPos); 342cdf0e10cSrcweir } 343cdf0e10cSrcweir 344cdf0e10cSrcweir sal_Bool bReturn = mpView->MouseMove(rMEvt, mpWindow); 345cdf0e10cSrcweir 346cdf0e10cSrcweir if (mpView->IsAction()) 347cdf0e10cSrcweir { 348cdf0e10cSrcweir // Because the flag set back if necessary in MouseMove 349cdf0e10cSrcweir if (mpView->IsOrtho() != bOrtho) 350cdf0e10cSrcweir mpView->SetOrtho(bOrtho); 351cdf0e10cSrcweir } 352cdf0e10cSrcweir 353cdf0e10cSrcweir ForcePointer(&rMEvt); 354cdf0e10cSrcweir 355cdf0e10cSrcweir return bReturn; 356cdf0e10cSrcweir } 357cdf0e10cSrcweir 358cdf0e10cSrcweir /************************************************************************* 359cdf0e10cSrcweir |* 360cdf0e10cSrcweir |* MouseButtonUp-event 361cdf0e10cSrcweir |* 362cdf0e10cSrcweir \************************************************************************/ 363cdf0e10cSrcweir 364cdf0e10cSrcweir sal_Bool FuDraw::MouseButtonUp(const MouseEvent& rMEvt) 365cdf0e10cSrcweir { 366cdf0e10cSrcweir if ( mpView->IsDragHelpLine() ) 367cdf0e10cSrcweir mpView->EndDragHelpLine(); 368cdf0e10cSrcweir 369cdf0e10cSrcweir if ( bDragHelpLine ) 370cdf0e10cSrcweir { 371cdf0e10cSrcweir Rectangle aOutputArea(Point(0,0), mpWindow->GetOutputSizePixel()); 372cdf0e10cSrcweir 373cdf0e10cSrcweir if ( !aOutputArea.IsInside(rMEvt.GetPosPixel()) ) 374cdf0e10cSrcweir mpView->GetSdrPageView()->DeleteHelpLine(nHelpLine); 375cdf0e10cSrcweir 376cdf0e10cSrcweir mpWindow->ReleaseMouse(); 377cdf0e10cSrcweir } 378cdf0e10cSrcweir 379cdf0e10cSrcweir FrameView* pFrameView = mpViewShell->GetFrameView(); 380cdf0e10cSrcweir mpView->SetOrtho( pFrameView->IsOrtho() ); 381cdf0e10cSrcweir mpView->SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() ); 382cdf0e10cSrcweir mpView->SetSnapEnabled(sal_True); 383cdf0e10cSrcweir mpView->SetCreate1stPointAsCenter(sal_False); 384cdf0e10cSrcweir mpView->SetResizeAtCenter(sal_False); 385cdf0e10cSrcweir mpView->SetDragWithCopy(pFrameView->IsDragWithCopy()); 386cdf0e10cSrcweir mpView->SetGridSnap(pFrameView->IsGridSnap()); 387cdf0e10cSrcweir mpView->SetBordSnap(pFrameView->IsBordSnap()); 388cdf0e10cSrcweir mpView->SetHlplSnap(pFrameView->IsHlplSnap()); 389cdf0e10cSrcweir mpView->SetOFrmSnap(pFrameView->IsOFrmSnap()); 390cdf0e10cSrcweir mpView->SetOPntSnap(pFrameView->IsOPntSnap()); 391cdf0e10cSrcweir mpView->SetOConSnap(pFrameView->IsOConSnap()); 392cdf0e10cSrcweir 393cdf0e10cSrcweir bIsInDragMode = sal_False; 394cdf0e10cSrcweir ForcePointer(&rMEvt); 395cdf0e10cSrcweir FuPoor::MouseButtonUp(rMEvt); 396cdf0e10cSrcweir 397cdf0e10cSrcweir return sal_False; 398cdf0e10cSrcweir } 399cdf0e10cSrcweir 400cdf0e10cSrcweir /************************************************************************* 401cdf0e10cSrcweir |* 402cdf0e10cSrcweir |* Process keyboard-events 403cdf0e10cSrcweir |* 404cdf0e10cSrcweir |* When processing a KeyEvent the returnvalue is sal_True, otherwise sal_False. 405cdf0e10cSrcweir |* 406cdf0e10cSrcweir \************************************************************************/ 407cdf0e10cSrcweir 408cdf0e10cSrcweir sal_Bool FuDraw::KeyInput(const KeyEvent& rKEvt) 409cdf0e10cSrcweir { 410cdf0e10cSrcweir sal_Bool bReturn = sal_False; 411cdf0e10cSrcweir 412cdf0e10cSrcweir switch ( rKEvt.GetKeyCode().GetCode() ) 413cdf0e10cSrcweir { 414cdf0e10cSrcweir case KEY_ESCAPE: 415cdf0e10cSrcweir { 416cdf0e10cSrcweir bReturn = FuDraw::cancel(); 417cdf0e10cSrcweir } 418cdf0e10cSrcweir break; 419cdf0e10cSrcweir 420cdf0e10cSrcweir case KEY_DELETE: 421cdf0e10cSrcweir case KEY_BACKSPACE: 422cdf0e10cSrcweir { 423cdf0e10cSrcweir if (!mpDocSh->IsReadOnly()) 424cdf0e10cSrcweir { 425cdf0e10cSrcweir if ( mpView && mpView->IsPresObjSelected(sal_False, sal_True, sal_False, sal_True) ) 426cdf0e10cSrcweir { 427cdf0e10cSrcweir InfoBox(mpWindow, String(SdResId(STR_ACTION_NOTPOSSIBLE) ) ).Execute(); 428cdf0e10cSrcweir } 429cdf0e10cSrcweir else 430cdf0e10cSrcweir { 431cdf0e10cSrcweir // Falls IP-Client aktiv, werden die Pointer 432cdf0e10cSrcweir // auf das OLE- und das alte Graphic-Object 433cdf0e10cSrcweir // am SdClient zurueckgesetzt, damit bei 434cdf0e10cSrcweir // ::SelectionHasChanged nach dem Loeschen 435cdf0e10cSrcweir // nicht mehr versucht wird, ein Grafik-Objekt 436cdf0e10cSrcweir // zu restaurieren, das gar nicht mehr existiert. 437cdf0e10cSrcweir // Alle anderen OLE-Objekte sind davon nicht 438cdf0e10cSrcweir // betroffen (KA 06.10.95) 439cdf0e10cSrcweir OSL_ASSERT (mpViewShell->GetViewShell()!=NULL); 440cdf0e10cSrcweir Client* pIPClient = static_cast<Client*>( 441cdf0e10cSrcweir mpViewShell->GetViewShell()->GetIPClient()); 442cdf0e10cSrcweir if (pIPClient && pIPClient->IsObjectInPlaceActive()) 443cdf0e10cSrcweir pIPClient->SetSdrGrafObj(NULL); 444cdf0e10cSrcweir 445cdf0e10cSrcweir // wait-mousepointer while deleting object 446cdf0e10cSrcweir WaitObject aWait( (Window*)mpViewShell->GetActiveWindow() ); 447cdf0e10cSrcweir // delete object 448cdf0e10cSrcweir mpView->DeleteMarked(); 449cdf0e10cSrcweir } 450cdf0e10cSrcweir } 451cdf0e10cSrcweir bReturn = sal_True; 452cdf0e10cSrcweir } 453cdf0e10cSrcweir break; 454cdf0e10cSrcweir 455cdf0e10cSrcweir case KEY_TAB: 456cdf0e10cSrcweir { 457cdf0e10cSrcweir KeyCode aCode = rKEvt.GetKeyCode(); 458cdf0e10cSrcweir 459cdf0e10cSrcweir if ( !aCode.IsMod1() && !aCode.IsMod2() ) 460cdf0e10cSrcweir { 461cdf0e10cSrcweir // #105336# Moved next line which was a bugfix itself into 462cdf0e10cSrcweir // the scope which really does the object selection travel 463cdf0e10cSrcweir // and thus is allowed to call SelectionHasChanged(). 464cdf0e10cSrcweir 465cdf0e10cSrcweir // Switch to FuSelect. 466cdf0e10cSrcweir mpViewShell->GetViewFrame()->GetDispatcher()->Execute( 467cdf0e10cSrcweir SID_OBJECT_SELECT, 468cdf0e10cSrcweir SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); 469cdf0e10cSrcweir 470cdf0e10cSrcweir // changeover to the next object 471cdf0e10cSrcweir if(!mpView->MarkNextObj( !aCode.IsShift() )) 472cdf0e10cSrcweir { 473*0deba7fbSSteve Yin //IAccessibility2 Implementation 2009----- 474*0deba7fbSSteve Yin //If there is only one object, don't do the UnmarkAlllObj() & MarkNextObj(). 475*0deba7fbSSteve Yin if ( mpView->GetMarkableObjCount() > 1 && mpView->AreObjectsMarked() ) 476*0deba7fbSSteve Yin { 477*0deba7fbSSteve Yin // #97016# No next object: go over open end and 478*0deba7fbSSteve Yin // get first from the other side 479*0deba7fbSSteve Yin mpView->UnmarkAllObj(); 480*0deba7fbSSteve Yin mpView->MarkNextObj(!aCode.IsShift()); 481*0deba7fbSSteve Yin } 482*0deba7fbSSteve Yin //-----IAccessibility2 Implementation 2009 483cdf0e10cSrcweir } 484cdf0e10cSrcweir 485cdf0e10cSrcweir // #97016# II 486cdf0e10cSrcweir if(mpView->AreObjectsMarked()) 487cdf0e10cSrcweir mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow); 488cdf0e10cSrcweir 489cdf0e10cSrcweir bReturn = sal_True; 490cdf0e10cSrcweir } 491cdf0e10cSrcweir } 492cdf0e10cSrcweir break; 493cdf0e10cSrcweir 494cdf0e10cSrcweir case KEY_END: 495cdf0e10cSrcweir { 496cdf0e10cSrcweir KeyCode aCode = rKEvt.GetKeyCode(); 497cdf0e10cSrcweir 498cdf0e10cSrcweir if ( aCode.IsMod1() ) 499cdf0e10cSrcweir { 500cdf0e10cSrcweir // #97016# mark last object 501cdf0e10cSrcweir mpView->UnmarkAllObj(); 502cdf0e10cSrcweir mpView->MarkNextObj(sal_False); 503cdf0e10cSrcweir 504cdf0e10cSrcweir // #97016# II 505cdf0e10cSrcweir if(mpView->AreObjectsMarked()) 506cdf0e10cSrcweir mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow); 507cdf0e10cSrcweir 508cdf0e10cSrcweir bReturn = sal_True; 509cdf0e10cSrcweir } 510cdf0e10cSrcweir } 511cdf0e10cSrcweir break; 512cdf0e10cSrcweir 513cdf0e10cSrcweir case KEY_HOME: 514cdf0e10cSrcweir { 515cdf0e10cSrcweir KeyCode aCode = rKEvt.GetKeyCode(); 516cdf0e10cSrcweir 517cdf0e10cSrcweir if ( aCode.IsMod1() ) 518cdf0e10cSrcweir { 519cdf0e10cSrcweir // #97016# mark first object 520cdf0e10cSrcweir mpView->UnmarkAllObj(); 521cdf0e10cSrcweir mpView->MarkNextObj(sal_True); 522cdf0e10cSrcweir 523cdf0e10cSrcweir // #97016# II 524cdf0e10cSrcweir if(mpView->AreObjectsMarked()) 525cdf0e10cSrcweir mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow); 526cdf0e10cSrcweir 527cdf0e10cSrcweir bReturn = sal_True; 528cdf0e10cSrcweir } 529cdf0e10cSrcweir } 530cdf0e10cSrcweir break; 531cdf0e10cSrcweir 532cdf0e10cSrcweir default: 533cdf0e10cSrcweir break; 534cdf0e10cSrcweir } 535cdf0e10cSrcweir 536cdf0e10cSrcweir if (!bReturn) 537cdf0e10cSrcweir { 538cdf0e10cSrcweir bReturn = FuPoor::KeyInput(rKEvt); 539cdf0e10cSrcweir } 540cdf0e10cSrcweir else 541cdf0e10cSrcweir { 542cdf0e10cSrcweir mpWindow->ReleaseMouse(); 543cdf0e10cSrcweir } 544cdf0e10cSrcweir 545cdf0e10cSrcweir return (bReturn); 546cdf0e10cSrcweir } 547cdf0e10cSrcweir 548cdf0e10cSrcweir /************************************************************************* 549cdf0e10cSrcweir |* 550cdf0e10cSrcweir |* Fade out the selection-presentation before scrolling 551cdf0e10cSrcweir |* 552cdf0e10cSrcweir \************************************************************************/ 553cdf0e10cSrcweir 554cdf0e10cSrcweir void FuDraw::ScrollStart() 555cdf0e10cSrcweir { 556cdf0e10cSrcweir } 557cdf0e10cSrcweir 558cdf0e10cSrcweir /************************************************************************* 559cdf0e10cSrcweir |* 560cdf0e10cSrcweir |* After scrolling show the selection-presentation again 561cdf0e10cSrcweir |* 562cdf0e10cSrcweir \************************************************************************/ 563cdf0e10cSrcweir 564cdf0e10cSrcweir void FuDraw::ScrollEnd() 565cdf0e10cSrcweir { 566cdf0e10cSrcweir } 567cdf0e10cSrcweir 568cdf0e10cSrcweir /************************************************************************* 569cdf0e10cSrcweir |* 570cdf0e10cSrcweir |* Aktivate function 571cdf0e10cSrcweir |* 572cdf0e10cSrcweir \************************************************************************/ 573cdf0e10cSrcweir 574cdf0e10cSrcweir void FuDraw::Activate() 575cdf0e10cSrcweir { 576cdf0e10cSrcweir FuPoor::Activate(); 577cdf0e10cSrcweir ForcePointer(); 578cdf0e10cSrcweir } 579cdf0e10cSrcweir 580cdf0e10cSrcweir /************************************************************************* 581cdf0e10cSrcweir |* 582cdf0e10cSrcweir |* Deaktivate function 583cdf0e10cSrcweir |* 584cdf0e10cSrcweir \************************************************************************/ 585cdf0e10cSrcweir 586cdf0e10cSrcweir void FuDraw::Deactivate() 587cdf0e10cSrcweir { 588cdf0e10cSrcweir FuPoor::Deactivate(); 589cdf0e10cSrcweir } 590cdf0e10cSrcweir 591cdf0e10cSrcweir 592cdf0e10cSrcweir /************************************************************************* 593cdf0e10cSrcweir |* 594cdf0e10cSrcweir |* Toggle mouse-pointer 595cdf0e10cSrcweir |* 596cdf0e10cSrcweir \************************************************************************/ 597cdf0e10cSrcweir 598cdf0e10cSrcweir void FuDraw::ForcePointer(const MouseEvent* pMEvt) 599cdf0e10cSrcweir { 600cdf0e10cSrcweir Point aPnt; 601cdf0e10cSrcweir sal_uInt16 nModifier = 0; 602cdf0e10cSrcweir sal_Bool bLeftDown = sal_False; 603cdf0e10cSrcweir sal_Bool bDefPointer = sal_True; 604cdf0e10cSrcweir 605cdf0e10cSrcweir if (pMEvt) 606cdf0e10cSrcweir { 607cdf0e10cSrcweir aPnt = mpWindow->PixelToLogic(pMEvt->GetPosPixel()); 608cdf0e10cSrcweir nModifier = pMEvt->GetModifier(); 609cdf0e10cSrcweir bLeftDown = pMEvt->IsLeft(); 610cdf0e10cSrcweir } 611cdf0e10cSrcweir else 612cdf0e10cSrcweir { 613cdf0e10cSrcweir aPnt = mpWindow->PixelToLogic(mpWindow->GetPointerPosPixel()); 614cdf0e10cSrcweir } 615cdf0e10cSrcweir 616cdf0e10cSrcweir if (mpView->IsDragObj()) 617cdf0e10cSrcweir { 618cdf0e10cSrcweir if (SD_MOD()->GetWaterCan() && !mpView->PickHandle(aPnt)) 619cdf0e10cSrcweir { 620cdf0e10cSrcweir /****************************************************************** 621cdf0e10cSrcweir * Giesskannenmodus 622cdf0e10cSrcweir ******************************************************************/ 623cdf0e10cSrcweir bDefPointer = sal_False; 624cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_FILL)); 625cdf0e10cSrcweir } 626cdf0e10cSrcweir } 627cdf0e10cSrcweir else 628cdf0e10cSrcweir { 629cdf0e10cSrcweir SdrHdl* pHdl = mpView->PickHandle(aPnt); 630cdf0e10cSrcweir 631cdf0e10cSrcweir if (SD_MOD()->GetWaterCan() && !pHdl) 632cdf0e10cSrcweir { 633cdf0e10cSrcweir /****************************************************************** 634cdf0e10cSrcweir * Giesskannenmodus 635cdf0e10cSrcweir ******************************************************************/ 636cdf0e10cSrcweir bDefPointer = sal_False; 637cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_FILL)); 638cdf0e10cSrcweir } 639cdf0e10cSrcweir else if (!pHdl && 640cdf0e10cSrcweir mpViewShell->GetViewFrame()->HasChildWindow(SvxBmpMaskChildWindow::GetChildWindowId())) 641cdf0e10cSrcweir { 642cdf0e10cSrcweir /****************************************************************** 643cdf0e10cSrcweir * Pipettenmodus 644cdf0e10cSrcweir ******************************************************************/ 645cdf0e10cSrcweir SvxBmpMask* pMask = (SvxBmpMask*) mpViewShell->GetViewFrame()->GetChildWindow(SvxBmpMaskChildWindow::GetChildWindowId())->GetWindow(); 646cdf0e10cSrcweir 647cdf0e10cSrcweir if (pMask && pMask->IsEyedropping()) 648cdf0e10cSrcweir { 649cdf0e10cSrcweir bDefPointer = sal_False; 650cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_REFHAND)); 651cdf0e10cSrcweir } 652cdf0e10cSrcweir } 653cdf0e10cSrcweir else if (!mpView->IsAction()) 654cdf0e10cSrcweir { 655cdf0e10cSrcweir SdrObject* pObj = NULL; 656cdf0e10cSrcweir SdrPageView* pPV = NULL; 657cdf0e10cSrcweir SdrViewEvent aVEvt; 658cdf0e10cSrcweir SdrHitKind eHit = SDRHIT_NONE; 659cdf0e10cSrcweir SdrDragMode eDragMode = mpView->GetDragMode(); 660cdf0e10cSrcweir 661cdf0e10cSrcweir if (pMEvt) 662cdf0e10cSrcweir { 663cdf0e10cSrcweir eHit = mpView->PickAnything(*pMEvt, SDRMOUSEMOVE, aVEvt); 664cdf0e10cSrcweir } 665cdf0e10cSrcweir 666cdf0e10cSrcweir if ((eDragMode == SDRDRAG_ROTATE) && (eHit == SDRHIT_MARKEDOBJECT)) 667cdf0e10cSrcweir { 668cdf0e10cSrcweir // The goal of this request is show always the rotation-arrow for 3D-objects at rotation-modus 669cdf0e10cSrcweir // Independent of the settings at Extras->Optionen->Grafik "Objekte immer verschieben" 670cdf0e10cSrcweir // 2D-objects acquit in an other way. Otherwise, the rotation of 3d-objects around any axises 671cdf0e10cSrcweir // wouldn't be possible per default. 672cdf0e10cSrcweir const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); 673cdf0e10cSrcweir SdrObject* pObject = rMarkList.GetMark(0)->GetMarkedSdrObj(); 674cdf0e10cSrcweir if ((pObject->ISA(E3dObject)) && (rMarkList.GetMarkCount() == 1)) 675cdf0e10cSrcweir { 676cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_ROTATE)); 677cdf0e10cSrcweir bDefPointer = sal_False; // Otherwise it'll be calles Joes routine and the mousepointer will reconfigurate again 678cdf0e10cSrcweir } 679cdf0e10cSrcweir } 680cdf0e10cSrcweir 681cdf0e10cSrcweir if (eHit == SDRHIT_NONE) 682cdf0e10cSrcweir { 683cdf0e10cSrcweir // found nothing -> look after at the masterpage 684cdf0e10cSrcweir mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER); 685cdf0e10cSrcweir } 686cdf0e10cSrcweir else if (eHit == SDRHIT_UNMARKEDOBJECT) 687cdf0e10cSrcweir { 688cdf0e10cSrcweir pObj = aVEvt.pObj; 689cdf0e10cSrcweir } 690cdf0e10cSrcweir else if (eHit == SDRHIT_TEXTEDITOBJ && this->ISA(FuSelection)) 691cdf0e10cSrcweir { 692cdf0e10cSrcweir sal_uInt16 nSdrObjKind = aVEvt.pObj->GetObjIdentifier(); 693cdf0e10cSrcweir 694cdf0e10cSrcweir if ( nSdrObjKind != OBJ_TEXT && 695cdf0e10cSrcweir nSdrObjKind != OBJ_TITLETEXT && 696cdf0e10cSrcweir nSdrObjKind != OBJ_OUTLINETEXT && 697cdf0e10cSrcweir aVEvt.pObj->IsEmptyPresObj() ) 698cdf0e10cSrcweir { 699cdf0e10cSrcweir pObj = NULL; 700cdf0e10cSrcweir bDefPointer = sal_False; 701cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_ARROW)); 702cdf0e10cSrcweir } 703cdf0e10cSrcweir } 704cdf0e10cSrcweir 705cdf0e10cSrcweir if (pObj && pMEvt && !pMEvt->IsMod2() && this->ISA(FuSelection)) 706cdf0e10cSrcweir { 707cdf0e10cSrcweir // Auf Animation oder ImageMap pruefen 708cdf0e10cSrcweir bDefPointer = !SetPointer(pObj, aPnt); 709cdf0e10cSrcweir 710cdf0e10cSrcweir if (bDefPointer && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene))) 711cdf0e10cSrcweir { 712cdf0e10cSrcweir // In die Gruppe hineinschauen 713cdf0e10cSrcweir if (mpView->PickObj(aPnt, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP)) 714cdf0e10cSrcweir bDefPointer = !SetPointer(pObj, aPnt); 715cdf0e10cSrcweir } 716cdf0e10cSrcweir } 717cdf0e10cSrcweir } 718cdf0e10cSrcweir } 719cdf0e10cSrcweir 720cdf0e10cSrcweir if (bDefPointer) 721cdf0e10cSrcweir { 722cdf0e10cSrcweir mpWindow->SetPointer(mpView->GetPreferedPointer( 723cdf0e10cSrcweir aPnt, mpWindow, nModifier, bLeftDown)); 724cdf0e10cSrcweir } 725cdf0e10cSrcweir } 726cdf0e10cSrcweir 727cdf0e10cSrcweir /************************************************************************* 728cdf0e10cSrcweir |* 729cdf0e10cSrcweir |* Set cursor for animaton or imagemap 730cdf0e10cSrcweir |* 731cdf0e10cSrcweir \************************************************************************/ 732cdf0e10cSrcweir 733cdf0e10cSrcweir sal_Bool FuDraw::SetPointer(SdrObject* pObj, const Point& rPos) 734cdf0e10cSrcweir { 735cdf0e10cSrcweir sal_Bool bSet = sal_False; 736cdf0e10cSrcweir 737cdf0e10cSrcweir sal_Bool bAnimationInfo = (!mpDocSh->ISA(GraphicDocShell) && 738cdf0e10cSrcweir mpDoc->GetAnimationInfo(pObj)) ? sal_True:sal_False; 739cdf0e10cSrcweir 740cdf0e10cSrcweir sal_Bool bImageMapInfo = sal_False; 741cdf0e10cSrcweir 742cdf0e10cSrcweir if (!bAnimationInfo) 743cdf0e10cSrcweir bImageMapInfo = mpDoc->GetIMapInfo(pObj) ? sal_True:sal_False; 744cdf0e10cSrcweir 745cdf0e10cSrcweir if (bAnimationInfo || bImageMapInfo) 746cdf0e10cSrcweir { 747cdf0e10cSrcweir const SetOfByte* pVisiLayer = &mpView->GetSdrPageView()->GetVisibleLayers(); 748cdf0e10cSrcweir sal_uInt16 nHitLog(sal_uInt16 (mpWindow->PixelToLogic(Size(HITPIX,0)).Width())); 749cdf0e10cSrcweir long n2HitLog(nHitLog * 2); 750cdf0e10cSrcweir Point aHitPosR(rPos); 751cdf0e10cSrcweir Point aHitPosL(rPos); 752cdf0e10cSrcweir Point aHitPosT(rPos); 753cdf0e10cSrcweir Point aHitPosB(rPos); 754cdf0e10cSrcweir 755cdf0e10cSrcweir aHitPosR.X() += n2HitLog; 756cdf0e10cSrcweir aHitPosL.X() -= n2HitLog; 757cdf0e10cSrcweir aHitPosT.Y() += n2HitLog; 758cdf0e10cSrcweir aHitPosB.Y() -= n2HitLog; 759cdf0e10cSrcweir 760cdf0e10cSrcweir if ( !pObj->IsClosedObj() || 761cdf0e10cSrcweir ( SdrObjectPrimitiveHit(*pObj, aHitPosR, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) && 762cdf0e10cSrcweir SdrObjectPrimitiveHit(*pObj, aHitPosL, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) && 763cdf0e10cSrcweir SdrObjectPrimitiveHit(*pObj, aHitPosT, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false) && 764cdf0e10cSrcweir SdrObjectPrimitiveHit(*pObj, aHitPosB, nHitLog, *mpView->GetSdrPageView(), pVisiLayer, false))) 765cdf0e10cSrcweir { 766cdf0e10cSrcweir /********************************************************** 767cdf0e10cSrcweir * hit inside the object (without margin) or open object 768cdf0e10cSrcweir ********************************************************/ 769cdf0e10cSrcweir 770cdf0e10cSrcweir if (bAnimationInfo) 771cdf0e10cSrcweir { 772cdf0e10cSrcweir /****************************************************** 773cdf0e10cSrcweir * Click-Action 774cdf0e10cSrcweir ******************************************************/ 775cdf0e10cSrcweir SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj); 776cdf0e10cSrcweir 777cdf0e10cSrcweir if ((mpView->ISA(DrawView) && 778cdf0e10cSrcweir (pInfo->meClickAction == presentation::ClickAction_BOOKMARK || 779cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_DOCUMENT || 780cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_PREVPAGE || 781cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_NEXTPAGE || 782cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_FIRSTPAGE || 783cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_LASTPAGE || 784cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_VERB || 785cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_PROGRAM || 786cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_MACRO || 787cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_SOUND)) 788cdf0e10cSrcweir || 789cdf0e10cSrcweir (mpView->ISA(DrawView) && 790cdf0e10cSrcweir SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) && 791cdf0e10cSrcweir (pInfo->meClickAction == presentation::ClickAction_VANISH || 792cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_INVISIBLE || 793cdf0e10cSrcweir pInfo->meClickAction == presentation::ClickAction_STOPPRESENTATION || 794cdf0e10cSrcweir (pInfo->mbActive && 795cdf0e10cSrcweir ( pInfo->meEffect != presentation::AnimationEffect_NONE || 796cdf0e10cSrcweir pInfo->meTextEffect != presentation::AnimationEffect_NONE ))))) 797cdf0e10cSrcweir { 798cdf0e10cSrcweir // Animations-Objekt 799cdf0e10cSrcweir bSet = sal_True; 800cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_REFHAND)); 801cdf0e10cSrcweir } 802cdf0e10cSrcweir } 803cdf0e10cSrcweir else if (bImageMapInfo && 804cdf0e10cSrcweir mpDoc->GetHitIMapObject(pObj, rPos, *mpWindow)) 805cdf0e10cSrcweir { 806cdf0e10cSrcweir /****************************************************** 807cdf0e10cSrcweir * ImageMap 808cdf0e10cSrcweir ******************************************************/ 809cdf0e10cSrcweir bSet = sal_True; 810cdf0e10cSrcweir mpWindow->SetPointer(Pointer(POINTER_REFHAND)); 811cdf0e10cSrcweir } 812cdf0e10cSrcweir } 813cdf0e10cSrcweir } 814cdf0e10cSrcweir 815cdf0e10cSrcweir return bSet; 816cdf0e10cSrcweir } 817cdf0e10cSrcweir 818cdf0e10cSrcweir 819cdf0e10cSrcweir 820cdf0e10cSrcweir /************************************************************************* 821cdf0e10cSrcweir |* 822cdf0e10cSrcweir |* Response of doubleclick 823cdf0e10cSrcweir |* 824cdf0e10cSrcweir \************************************************************************/ 825cdf0e10cSrcweir 826cdf0e10cSrcweir void FuDraw::DoubleClick(const MouseEvent& rMEvt) 827cdf0e10cSrcweir { 828cdf0e10cSrcweir sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() ); 829cdf0e10cSrcweir 830cdf0e10cSrcweir if ( mpView->AreObjectsMarked() ) 831cdf0e10cSrcweir { 832cdf0e10cSrcweir const SdrMarkList& rMarkList = mpView->GetMarkedObjectList(); 833cdf0e10cSrcweir 834cdf0e10cSrcweir if (rMarkList.GetMarkCount() == 1) 835cdf0e10cSrcweir { 836cdf0e10cSrcweir SdrMark* pMark = rMarkList.GetMark(0); 837cdf0e10cSrcweir SdrObject* pObj = pMark->GetMarkedSdrObj(); 838cdf0e10cSrcweir 839cdf0e10cSrcweir sal_uInt32 nInv = pObj->GetObjInventor(); 840cdf0e10cSrcweir sal_uInt16 nSdrObjKind = pObj->GetObjIdentifier(); 841cdf0e10cSrcweir 842cdf0e10cSrcweir if (nInv == SdrInventor && nSdrObjKind == OBJ_OLE2) 843cdf0e10cSrcweir { 844cdf0e10cSrcweir DrawDocShell* pDocSh = mpDoc->GetDocSh(); 845cdf0e10cSrcweir 846cdf0e10cSrcweir if ( !pDocSh->IsUIActive() ) 847cdf0e10cSrcweir { 848cdf0e10cSrcweir /********************************************************** 849cdf0e10cSrcweir * aktivate OLE-object 850cdf0e10cSrcweir **********************************************************/ 851cdf0e10cSrcweir //HMHmpView->HideMarkHdl(); 852cdf0e10cSrcweir mpViewShell->ActivateObject( (SdrOle2Obj*) pObj, 0); 853cdf0e10cSrcweir } 854cdf0e10cSrcweir } 855cdf0e10cSrcweir else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRAF && pObj->IsEmptyPresObj() ) 856cdf0e10cSrcweir { 857cdf0e10cSrcweir mpViewShell->GetViewFrame()-> 858cdf0e10cSrcweir GetDispatcher()->Execute( SID_INSERT_GRAPHIC, 859cdf0e10cSrcweir SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD ); 860cdf0e10cSrcweir } 861cdf0e10cSrcweir else if ( ( pObj->ISA(SdrTextObj) || pObj->ISA(SdrObjGroup) ) && 862cdf0e10cSrcweir !SD_MOD()->GetWaterCan() && 863cdf0e10cSrcweir mpViewShell->GetFrameView()->IsDoubleClickTextEdit() && 864cdf0e10cSrcweir !mpDocSh->IsReadOnly()) 865cdf0e10cSrcweir { 866cdf0e10cSrcweir SfxUInt16Item aItem(SID_TEXTEDIT, 2); 867cdf0e10cSrcweir mpViewShell->GetViewFrame()->GetDispatcher()-> 868cdf0e10cSrcweir Execute(SID_TEXTEDIT, SFX_CALLMODE_ASYNCHRON | 869cdf0e10cSrcweir SFX_CALLMODE_RECORD, &aItem, 0L); 870cdf0e10cSrcweir } 871cdf0e10cSrcweir else if (nInv == SdrInventor && nSdrObjKind == OBJ_GRUP) 872cdf0e10cSrcweir { 873cdf0e10cSrcweir // hit group -> select subobject 874cdf0e10cSrcweir mpView->UnMarkAll(); 875cdf0e10cSrcweir mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift(), sal_True); 876cdf0e10cSrcweir } 877cdf0e10cSrcweir } 878cdf0e10cSrcweir } 879cdf0e10cSrcweir else 880cdf0e10cSrcweir mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); 881cdf0e10cSrcweir } 882cdf0e10cSrcweir 883cdf0e10cSrcweir /************************************************************************* 884cdf0e10cSrcweir |* 885cdf0e10cSrcweir |* Help-event 886cdf0e10cSrcweir |* 887cdf0e10cSrcweir \************************************************************************/ 888cdf0e10cSrcweir 889cdf0e10cSrcweir sal_Bool FuDraw::RequestHelp(const HelpEvent& rHEvt) 890cdf0e10cSrcweir { 891cdf0e10cSrcweir sal_Bool bReturn = sal_False; 892cdf0e10cSrcweir 893cdf0e10cSrcweir if (Help::IsBalloonHelpEnabled() || Help::IsQuickHelpEnabled()) 894cdf0e10cSrcweir { 895cdf0e10cSrcweir SdrViewEvent aVEvt; 896cdf0e10cSrcweir 897cdf0e10cSrcweir MouseEvent aMEvt(mpWindow->GetPointerPosPixel(), 1, 0, MOUSE_LEFT); 898cdf0e10cSrcweir 899cdf0e10cSrcweir SdrHitKind eHit = mpView->PickAnything(aMEvt, SDRMOUSEBUTTONDOWN, aVEvt); 900cdf0e10cSrcweir 901cdf0e10cSrcweir SdrObject* pObj = aVEvt.pObj; 902cdf0e10cSrcweir 903cdf0e10cSrcweir if (eHit != SDRHIT_NONE && pObj != NULL) 904cdf0e10cSrcweir { 905cdf0e10cSrcweir Point aPosPixel = rHEvt.GetMousePosPixel(); 906cdf0e10cSrcweir 907cdf0e10cSrcweir bReturn = SetHelpText(pObj, aPosPixel, aVEvt); 908cdf0e10cSrcweir 909cdf0e10cSrcweir if (!bReturn && (pObj->ISA(SdrObjGroup) || pObj->ISA(E3dPolyScene))) 910cdf0e10cSrcweir { 911cdf0e10cSrcweir // In die Gruppe hineinschauen 912cdf0e10cSrcweir SdrPageView* pPV = NULL; 913cdf0e10cSrcweir 914cdf0e10cSrcweir Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(aPosPixel))); 915cdf0e10cSrcweir 916cdf0e10cSrcweir if (mpView->PickObj(aPos, mpView->getHitTolLog(), pObj, pPV, SDRSEARCH_ALSOONMASTER | SDRSEARCH_DEEP)) 917cdf0e10cSrcweir bReturn = SetHelpText(pObj, aPosPixel, aVEvt); 918cdf0e10cSrcweir } 919cdf0e10cSrcweir } 920cdf0e10cSrcweir } 921cdf0e10cSrcweir 922cdf0e10cSrcweir if (!bReturn) 923cdf0e10cSrcweir { 924cdf0e10cSrcweir bReturn = FuPoor::RequestHelp(rHEvt); 925cdf0e10cSrcweir } 926cdf0e10cSrcweir 927cdf0e10cSrcweir return(bReturn); 928cdf0e10cSrcweir } 929cdf0e10cSrcweir 930cdf0e10cSrcweir 931cdf0e10cSrcweir 932cdf0e10cSrcweir /************************************************************************* 933cdf0e10cSrcweir |* 934cdf0e10cSrcweir |* Command-event 935cdf0e10cSrcweir |* 936cdf0e10cSrcweir \************************************************************************/ 937cdf0e10cSrcweir 938cdf0e10cSrcweir sal_Bool FuDraw::SetHelpText(SdrObject* pObj, const Point& rPosPixel, const SdrViewEvent& rVEvt) 939cdf0e10cSrcweir { 940cdf0e10cSrcweir sal_Bool bSet = sal_False; 941cdf0e10cSrcweir String aHelpText; 942cdf0e10cSrcweir Point aPos(mpWindow->PixelToLogic(mpWindow->ScreenToOutputPixel(rPosPixel))); 943cdf0e10cSrcweir 944cdf0e10cSrcweir // URL fuer IMapObject unter Pointer ist Hilfetext 945cdf0e10cSrcweir if ( mpDoc->GetIMapInfo(pObj) ) 946cdf0e10cSrcweir { 947cdf0e10cSrcweir IMapObject* pIMapObj = mpDoc->GetHitIMapObject(pObj, aPos, *mpWindow ); 948cdf0e10cSrcweir 949cdf0e10cSrcweir if ( pIMapObj ) 950cdf0e10cSrcweir { 951cdf0e10cSrcweir // show name 952cdf0e10cSrcweir aHelpText = pIMapObj->GetAltText(); 953cdf0e10cSrcweir 954cdf0e10cSrcweir if (aHelpText.Len() == 0) 955cdf0e10cSrcweir { 956cdf0e10cSrcweir // show url if no name is available 957cdf0e10cSrcweir aHelpText = INetURLObject::decode( pIMapObj->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET ); 958cdf0e10cSrcweir } 959cdf0e10cSrcweir } 960cdf0e10cSrcweir } 961cdf0e10cSrcweir else if (!mpDocSh->ISA(GraphicDocShell) && mpDoc->GetAnimationInfo(pObj)) 962cdf0e10cSrcweir { 963cdf0e10cSrcweir SdAnimationInfo* pInfo = mpDoc->GetAnimationInfo(pObj); 964cdf0e10cSrcweir 965cdf0e10cSrcweir switch (pInfo->meClickAction) 966cdf0e10cSrcweir { 967cdf0e10cSrcweir case presentation::ClickAction_PREVPAGE: 968cdf0e10cSrcweir { 969cdf0e10cSrcweir // jump to the prior page 970cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_PREVPAGE)); 971cdf0e10cSrcweir } 972cdf0e10cSrcweir break; 973cdf0e10cSrcweir 974cdf0e10cSrcweir case presentation::ClickAction_NEXTPAGE: 975cdf0e10cSrcweir { 976cdf0e10cSrcweir // jump to the next page 977cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_NEXTPAGE)); 978cdf0e10cSrcweir } 979cdf0e10cSrcweir break; 980cdf0e10cSrcweir 981cdf0e10cSrcweir case presentation::ClickAction_FIRSTPAGE: 982cdf0e10cSrcweir { 983cdf0e10cSrcweir // jump to the first page 984cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_FIRSTPAGE)); 985cdf0e10cSrcweir } 986cdf0e10cSrcweir break; 987cdf0e10cSrcweir 988cdf0e10cSrcweir case presentation::ClickAction_LASTPAGE: 989cdf0e10cSrcweir { 990cdf0e10cSrcweir // jump to the last page 991cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_LASTPAGE)); 992cdf0e10cSrcweir } 993cdf0e10cSrcweir break; 994cdf0e10cSrcweir 995cdf0e10cSrcweir case presentation::ClickAction_BOOKMARK: 996cdf0e10cSrcweir { 997cdf0e10cSrcweir // jump to object/page 998cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_BOOKMARK)); 999cdf0e10cSrcweir aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 1000cdf0e10cSrcweir aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); 1001cdf0e10cSrcweir } 1002cdf0e10cSrcweir break; 1003cdf0e10cSrcweir 1004cdf0e10cSrcweir case presentation::ClickAction_DOCUMENT: 1005cdf0e10cSrcweir { 1006cdf0e10cSrcweir // jump to document (object/page) 1007cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_DOCUMENT)); 1008cdf0e10cSrcweir aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 1009cdf0e10cSrcweir aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); 1010cdf0e10cSrcweir } 1011cdf0e10cSrcweir break; 1012cdf0e10cSrcweir 1013cdf0e10cSrcweir case presentation::ClickAction_PROGRAM: 1014cdf0e10cSrcweir { 1015cdf0e10cSrcweir // execute program 1016cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_PROGRAM)); 1017cdf0e10cSrcweir aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 1018cdf0e10cSrcweir aHelpText.Append( String(INetURLObject::decode( pInfo->GetBookmark(), '%', INetURLObject::DECODE_WITH_CHARSET ) )); 1019cdf0e10cSrcweir } 1020cdf0e10cSrcweir break; 1021cdf0e10cSrcweir 1022cdf0e10cSrcweir case presentation::ClickAction_MACRO: 1023cdf0e10cSrcweir { 1024cdf0e10cSrcweir // execute program 1025cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_MACRO)); 1026cdf0e10cSrcweir aHelpText.AppendAscii( RTL_CONSTASCII_STRINGPARAM( ": " ) ); 1027cdf0e10cSrcweir 1028cdf0e10cSrcweir if ( SfxApplication::IsXScriptURL( pInfo->GetBookmark() ) ) 1029cdf0e10cSrcweir { 1030cdf0e10cSrcweir aHelpText.Append( pInfo->GetBookmark() ); 1031cdf0e10cSrcweir } 1032cdf0e10cSrcweir else 1033cdf0e10cSrcweir { 1034cdf0e10cSrcweir String sBookmark( pInfo->GetBookmark() ); 1035cdf0e10cSrcweir sal_Unicode cToken = '.'; 1036cdf0e10cSrcweir aHelpText.Append( sBookmark.GetToken( 2, cToken ) ); 1037cdf0e10cSrcweir aHelpText.Append( cToken ); 1038cdf0e10cSrcweir aHelpText.Append( sBookmark.GetToken( 1, cToken ) ); 1039cdf0e10cSrcweir aHelpText.Append( cToken ); 1040cdf0e10cSrcweir aHelpText.Append( sBookmark.GetToken( 0, cToken ) ); 1041cdf0e10cSrcweir } 1042cdf0e10cSrcweir } 1043cdf0e10cSrcweir break; 1044cdf0e10cSrcweir 1045cdf0e10cSrcweir case presentation::ClickAction_SOUND: 1046cdf0e10cSrcweir { 1047cdf0e10cSrcweir // play-back sound 1048cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_SOUND)); 1049cdf0e10cSrcweir } 1050cdf0e10cSrcweir break; 1051cdf0e10cSrcweir 1052cdf0e10cSrcweir case presentation::ClickAction_VERB: 1053cdf0e10cSrcweir { 1054cdf0e10cSrcweir // execute OLE-verb 1055cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_VERB)); 1056cdf0e10cSrcweir } 1057cdf0e10cSrcweir break; 1058cdf0e10cSrcweir 1059cdf0e10cSrcweir case presentation::ClickAction_STOPPRESENTATION: 1060cdf0e10cSrcweir { 1061cdf0e10cSrcweir // quit presentation 1062cdf0e10cSrcweir aHelpText = String(SdResId(STR_CLICK_ACTION_STOPPRESENTATION)); 1063cdf0e10cSrcweir } 1064cdf0e10cSrcweir break; 1065cdf0e10cSrcweir default: 1066cdf0e10cSrcweir break; 1067cdf0e10cSrcweir } 1068cdf0e10cSrcweir } 1069cdf0e10cSrcweir else if (rVEvt.pURLField) 1070cdf0e10cSrcweir { 1071cdf0e10cSrcweir /************************************************************** 1072cdf0e10cSrcweir * URL-Field 1073cdf0e10cSrcweir **************************************************************/ 1074cdf0e10cSrcweir aHelpText = INetURLObject::decode( rVEvt.pURLField->GetURL(), '%', INetURLObject::DECODE_WITH_CHARSET ); 1075cdf0e10cSrcweir } 1076cdf0e10cSrcweir 1077cdf0e10cSrcweir if (aHelpText.Len()) 1078cdf0e10cSrcweir { 1079cdf0e10cSrcweir bSet = sal_True; 1080cdf0e10cSrcweir Rectangle aLogicPix = mpWindow->LogicToPixel(pObj->GetLogicRect()); 1081cdf0e10cSrcweir Rectangle aScreenRect(mpWindow->OutputToScreenPixel(aLogicPix.TopLeft()), 1082cdf0e10cSrcweir mpWindow->OutputToScreenPixel(aLogicPix.BottomRight())); 1083cdf0e10cSrcweir 1084cdf0e10cSrcweir if (Help::IsBalloonHelpEnabled()) 1085cdf0e10cSrcweir Help::ShowBalloon( (Window*)mpWindow, rPosPixel, aScreenRect, aHelpText); 1086cdf0e10cSrcweir else if (Help::IsQuickHelpEnabled()) 1087cdf0e10cSrcweir Help::ShowQuickHelp( (Window*)mpWindow, aScreenRect, aHelpText); 1088cdf0e10cSrcweir } 1089cdf0e10cSrcweir 1090cdf0e10cSrcweir return bSet; 1091cdf0e10cSrcweir } 1092cdf0e10cSrcweir 1093cdf0e10cSrcweir 1094cdf0e10cSrcweir /** is called when the currenct function should be aborted. <p> 1095cdf0e10cSrcweir This is used when a function gets a KEY_ESCAPE but can also 1096cdf0e10cSrcweir be called directly. 1097cdf0e10cSrcweir 1098cdf0e10cSrcweir @returns true if a active function was aborted 1099cdf0e10cSrcweir */ 1100cdf0e10cSrcweir bool FuDraw::cancel() 1101cdf0e10cSrcweir { 1102cdf0e10cSrcweir bool bReturn = false; 1103cdf0e10cSrcweir 1104cdf0e10cSrcweir if ( mpView->IsAction() ) 1105cdf0e10cSrcweir { 1106cdf0e10cSrcweir mpView->BrkAction(); 1107cdf0e10cSrcweir bReturn = true; 1108cdf0e10cSrcweir } 1109cdf0e10cSrcweir else if ( mpView->IsTextEdit() ) 1110cdf0e10cSrcweir { 1111cdf0e10cSrcweir mpView->SdrEndTextEdit(); 1112cdf0e10cSrcweir bReturn = true; 1113cdf0e10cSrcweir 1114cdf0e10cSrcweir SfxBindings& rBindings = mpViewShell->GetViewFrame()->GetBindings(); 1115cdf0e10cSrcweir rBindings.Invalidate( SID_PARASPACE_INCREASE ); 1116cdf0e10cSrcweir rBindings.Invalidate( SID_PARASPACE_DECREASE ); 1117cdf0e10cSrcweir } 1118cdf0e10cSrcweir else if ( mpView->AreObjectsMarked() ) 1119cdf0e10cSrcweir { 1120cdf0e10cSrcweir // #97016# II 1121cdf0e10cSrcweir const SdrHdlList& rHdlList = mpView->GetHdlList(); 1122cdf0e10cSrcweir SdrHdl* pHdl = rHdlList.GetFocusHdl(); 1123cdf0e10cSrcweir 1124cdf0e10cSrcweir if(pHdl) 1125cdf0e10cSrcweir { 1126cdf0e10cSrcweir ((SdrHdlList&)rHdlList).ResetFocusHdl(); 1127cdf0e10cSrcweir } 1128cdf0e10cSrcweir else 1129cdf0e10cSrcweir { 1130cdf0e10cSrcweir mpView->UnmarkAll(); 1131cdf0e10cSrcweir } 1132cdf0e10cSrcweir 1133cdf0e10cSrcweir // Switch to FuSelect. 1134cdf0e10cSrcweir mpViewShell->GetViewFrame()->GetDispatcher()->Execute( 1135cdf0e10cSrcweir SID_OBJECT_SELECT, 1136cdf0e10cSrcweir SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD); 1137cdf0e10cSrcweir 1138cdf0e10cSrcweir bReturn = true; 1139cdf0e10cSrcweir } 1140cdf0e10cSrcweir 1141cdf0e10cSrcweir return bReturn; 1142cdf0e10cSrcweir } 1143cdf0e10cSrcweir 1144cdf0e10cSrcweir } // end of namespace sd 1145