LCOV - code coverage report
Current view: top level - sd/source/ui/func - fupoor.cxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 42 475 8.8 %
Date: 2014-11-03 Functions: 10 39 25.6 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : #include "fupoor.hxx"
      21             : 
      22             : #include <svx/svxids.hrc>
      23             : #include <svl/aeitem.hxx>
      24             : #include <svx/svdpagv.hxx>
      25             : #include <svx/svdoole2.hxx>
      26             : #include <svx/svdograf.hxx>
      27             : #include <vcl/seleng.hxx>
      28             : #include <sfx2/app.hxx>
      29             : #include <sfx2/dispatch.hxx>
      30             : #include <sfx2/bindings.hxx>
      31             : #include <sfx2/request.hxx>
      32             : #include <vcl/dialog.hxx>
      33             : #include <com/sun/star/beans/XPropertySet.hpp>
      34             : #include <com/sun/star/drawing/XLayer.hpp>
      35             : #include <com/sun/star/drawing/XLayerManager.hpp>
      36             : #include <com/sun/star/container/XChild.hpp>
      37             : 
      38             : #include "FrameView.hxx"
      39             : #include "app.hrc"
      40             : #include "fusel.hxx"
      41             : #include "sdpage.hxx"
      42             : #include "drawview.hxx"
      43             : #include "DrawViewShell.hxx"
      44             : #include "Window.hxx"
      45             : #include "drawdoc.hxx"
      46             : #include "DrawDocShell.hxx"
      47             : #include "zoomlist.hxx"
      48             : #include "Client.hxx"
      49             : #include "slideshow.hxx"
      50             : #include "LayerTabBar.hxx"
      51             : 
      52             : #include <sfx2/viewfrm.hxx>
      53             : 
      54             : #include <svx/svditer.hxx>
      55             : 
      56             : #include <editeng/editeng.hxx>
      57             : 
      58             : using namespace ::com::sun::star;
      59             : using ::com::sun::star::uno::Reference;
      60             : 
      61             : namespace sd {
      62             : 
      63           0 : TYPEINIT0( FuPoor );
      64             : 
      65         338 : FuPoor::FuPoor (
      66             :     ViewShell* pViewSh,
      67             :     ::sd::Window* pWin,
      68             :     ::sd::View* pView,
      69             :     SdDrawDocument* pDrDoc,
      70             :     SfxRequest& rReq)
      71             :     : mpView(pView),
      72             :       mpViewShell(pViewSh),
      73             :       mpWindow(pWin),
      74         338 :       mpDocSh( pDrDoc->GetDocSh() ),
      75             :       mpDoc(pDrDoc),
      76         338 :       nSlotId( rReq.GetSlot() ),
      77             :       nSlotValue(0),
      78             :       pDialog(NULL),
      79             :       bIsInDragMode(false),
      80             :       bNoScrollUntilInside (true),
      81             :       bScrollable (false),
      82             :       bDelayActive (false),
      83             :       bFirstMouseMove (false),
      84             :       // remember MouseButton state
      85        1014 :       mnCode(0)
      86             : {
      87         338 :     ReceiveRequest(rReq);
      88             : 
      89         338 :     aScrollTimer.SetTimeoutHdl( LINK(this, FuPoor, ScrollHdl) );
      90         338 :     aScrollTimer.SetTimeout(SELENG_AUTOREPEAT_INTERVAL);
      91             : 
      92         338 :     aDragTimer.SetTimeoutHdl( LINK(this, FuPoor, DragHdl) );
      93         338 :     aDragTimer.SetTimeout(SELENG_DRAGDROP_TIMEOUT);
      94             : 
      95         338 :     aDelayToScrollTimer.SetTimeoutHdl( LINK(this, FuPoor, DelayHdl) );
      96         338 :     aDelayToScrollTimer.SetTimeout(2000);
      97         338 : }
      98             : 
      99         676 : FuPoor::~FuPoor()
     100             : {
     101         338 :     aDragTimer.Stop();
     102         338 :     aScrollTimer.Stop();
     103         338 :     aDelayToScrollTimer.Stop ();
     104             : 
     105         338 :     if (pDialog)
     106           0 :         delete pDialog;
     107         338 : }
     108             : 
     109         676 : void FuPoor::Activate()
     110             : {
     111         676 :     if (pDialog)
     112             :     {
     113           0 :         pDialog->Show();
     114             :     }
     115         676 : }
     116             : 
     117         590 : void FuPoor::Deactivate()
     118             : {
     119         590 :     aDragTimer.Stop();
     120         590 :     aScrollTimer.Stop();
     121         590 :     aDelayToScrollTimer.Stop ();
     122             :         bScrollable  =
     123         590 :         bDelayActive = false;
     124             : 
     125         590 :     if (pDialog)
     126             :     {
     127           0 :         pDialog->Hide();
     128             :     }
     129             : 
     130         590 :     if (mpWindow) mpWindow->ReleaseMouse ();
     131         590 : }
     132             : 
     133             : /**
     134             :  * scroll when approached the border of the window; is called by MouseMove
     135             :  */
     136           0 : void FuPoor::ForceScroll(const Point& aPixPos)
     137             : {
     138           0 :     aScrollTimer.Stop();
     139             : 
     140           0 :     if ( !mpView->IsDragHelpLine() && !mpView->IsSetPageOrg() &&
     141           0 :             !SlideShow::IsRunning( mpViewShell->GetViewShellBase() ) )
     142             :     {
     143           0 :         Point aPos = mpWindow->OutputToScreenPixel(aPixPos);
     144           0 :         const Rectangle& rRect = mpViewShell->GetAllWindowRect();
     145             : 
     146           0 :         if ( bNoScrollUntilInside )
     147             :         {
     148           0 :             if ( rRect.IsInside(aPos) )
     149           0 :                 bNoScrollUntilInside = false;
     150             :         }
     151             :         else
     152             :         {
     153           0 :             short dx = 0, dy = 0;
     154             : 
     155           0 :             if ( aPos.X() <= rRect.Left()   ) dx = -1;
     156           0 :             if ( aPos.X() >= rRect.Right()  ) dx =  1;
     157           0 :             if ( aPos.Y() <= rRect.Top()    ) dy = -1;
     158           0 :             if ( aPos.Y() >= rRect.Bottom() ) dy =  1;
     159             : 
     160           0 :             if ( dx != 0 || dy != 0 )
     161             :             {
     162           0 :                 if (bScrollable)
     163             :                 {
     164             :                     // scroll action in derived class
     165           0 :                     mpViewShell->ScrollLines(dx, dy);
     166           0 :                     aScrollTimer.Start();
     167             :                 }
     168           0 :                 else if (! bDelayActive) StartDelayToScrollTimer ();
     169             :             }
     170             :         }
     171             :     }
     172           0 : }
     173             : 
     174             : /**
     175             :  * timer handler for window scrolling
     176             :  */
     177           0 : IMPL_LINK_NOARG_INLINE_START(FuPoor, ScrollHdl)
     178             : {
     179           0 :     Point aPnt(mpWindow->GetPointerPosPixel());
     180             : 
     181             :     // use remembered MouseButton state to create correct
     182             :     // MouseEvents for this artificial MouseMove.
     183           0 :     MouseMove(MouseEvent(aPnt, 1, 0, GetMouseButtonCode()));
     184             : 
     185           0 :     return 0;
     186             : }
     187           0 : IMPL_LINK_INLINE_END( FuPoor, ScrollHdl, Timer *, pTimer )
     188             : 
     189             : /**
     190             :  * handle keyboard events
     191             :  * @returns sal_True if the event was handled, sal_False otherwise
     192             :  */
     193           0 : bool FuPoor::KeyInput(const KeyEvent& rKEvt)
     194             : {
     195           0 :     sal_uInt16          nCode = rKEvt.GetKeyCode().GetCode();
     196           0 :     bool            bReturn = false;
     197           0 :     bool            bSlideShow = SlideShow::IsRunning( mpViewShell->GetViewShellBase() );
     198             : 
     199           0 :     switch (nCode)
     200             :     {
     201             :         case KEY_RETURN:
     202             :         {
     203           0 :             if(rKEvt.GetKeyCode().IsMod1())
     204             :             {
     205           0 :                 if(mpViewShell && mpViewShell->ISA(DrawViewShell))
     206             :                 {
     207             :                     DrawViewShell* pDrawViewShell =
     208           0 :                         static_cast<DrawViewShell*>(mpViewShell);
     209           0 :                     SdPage* pActualPage = pDrawViewShell->GetActualPage();
     210           0 :                     SdrTextObj* pCandidate = 0L;
     211             : 
     212           0 :                     if(pActualPage)
     213             :                     {
     214           0 :                         SdrObjListIter aIter(*pActualPage, IM_DEEPNOGROUPS);
     215             : 
     216           0 :                         while(aIter.IsMore() && !pCandidate)
     217             :                         {
     218           0 :                             SdrObject* pObj = aIter.Next();
     219             : 
     220           0 :                             if(pObj && pObj->ISA(SdrTextObj))
     221             :                             {
     222           0 :                                 sal_uInt32 nInv(pObj->GetObjInventor());
     223           0 :                                 sal_uInt16 nKnd(pObj->GetObjIdentifier());
     224             : 
     225           0 :                                 if(SdrInventor == nInv &&
     226           0 :                                     (OBJ_TITLETEXT == nKnd || OBJ_OUTLINETEXT == nKnd || OBJ_TEXT == nKnd))
     227             :                                 {
     228           0 :                                     pCandidate = (SdrTextObj*)pObj;
     229             :                                 }
     230             :                             }
     231           0 :                         }
     232             :                     }
     233             : 
     234           0 :                     if(pCandidate)
     235             :                     {
     236           0 :                         mpView->UnMarkAll();
     237           0 :                         mpView->MarkObj(pCandidate, mpView->GetSdrPageView());
     238             : 
     239             :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
     240           0 :                             SID_ATTR_CHAR, SfxCallMode::ASYNCHRON);
     241             :                     }
     242             :                     else
     243             :                     {
     244             :                         // insert a new page with the same page layout
     245             :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
     246           0 :                             SID_INSERTPAGE_QUICK, SfxCallMode::ASYNCHRON);
     247             :                     }
     248             : 
     249             :                     // consumed
     250           0 :                     bReturn = true;
     251             :                 }
     252             :             }
     253             :             else
     254             :             {
     255             :                 // activate OLE object on RETURN for selected object
     256             :                 // activate text edit on RETURN for selected object
     257           0 :                 const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
     258             : 
     259           0 :                 if( !mpView->IsTextEdit() && 1 == rMarkList.GetMarkCount() )
     260             :                 {
     261           0 :                     SdrObject* pObj = rMarkList.GetMark( 0 )->GetMarkedSdrObj();
     262             : 
     263           0 :                     if( pObj && pObj->ISA( SdrOle2Obj ) && !mpDocSh->IsUIActive() )
     264             :                     {
     265             :                         //HMHmpView->HideMarkHdl();
     266           0 :                         mpViewShell->ActivateObject( static_cast< SdrOle2Obj* >( pObj ), 0 );
     267             :                     }
     268           0 :                     else if( pObj && pObj->IsEmptyPresObj() && pObj->ISA( SdrGrafObj ) )
     269             :                     {
     270           0 :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_INSERT_GRAPHIC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
     271             :                     }
     272             :                     else
     273             :                     {
     274           0 :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_ATTR_CHAR, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
     275             :                     }
     276             : 
     277             :                     // consumed
     278           0 :                     bReturn = true;
     279             :                 }
     280             :             }
     281             :         }
     282           0 :         break;
     283             : 
     284             :         case KEY_TAB:
     285             :         {
     286             :             // handle Mod1 and Mod2 to get travelling running on different systems
     287           0 :             if(rKEvt.GetKeyCode().IsMod1() || rKEvt.GetKeyCode().IsMod2())
     288             :             {
     289             :                 // do something with a selected handle?
     290           0 :                 const SdrHdlList& rHdlList = mpView->GetHdlList();
     291           0 :                 bool bForward(!rKEvt.GetKeyCode().IsShift());
     292             : 
     293           0 :                 ((SdrHdlList&)rHdlList).TravelFocusHdl(bForward);
     294             : 
     295             :                 // guarantee visibility of focused handle
     296           0 :                 SdrHdl* pHdl = rHdlList.GetFocusHdl();
     297             : 
     298           0 :                 if(pHdl)
     299             :                 {
     300           0 :                     Point aHdlPosition(pHdl->GetPos());
     301           0 :                     Rectangle aVisRect(aHdlPosition - Point(100, 100), Size(200, 200));
     302           0 :                     mpView->MakeVisible(aVisRect, *mpWindow);
     303             :                 }
     304             : 
     305             :                 // consumed
     306           0 :                 bReturn = true;
     307             :             }
     308             :         }
     309           0 :         break;
     310             : 
     311             :         case KEY_ESCAPE:
     312             :         {
     313           0 :             bReturn = FuPoor::cancel();
     314             :         }
     315           0 :         break;
     316             : 
     317             :         case KEY_ADD:
     318             :         {
     319           0 :             if (!mpView->IsTextEdit() && !bSlideShow && !mpDocSh->IsUIActive())
     320             :             {
     321             :                 // increase zoom
     322           0 :                 mpViewShell->SetZoom(mpWindow->GetZoom() * 3 / 2);
     323             : 
     324           0 :                 if (mpViewShell->ISA(DrawViewShell))
     325             :                     static_cast<DrawViewShell*>(mpViewShell)
     326           0 :                         ->SetZoomOnPage(false);
     327             : 
     328           0 :                 bReturn = true;
     329             :             }
     330             :         }
     331           0 :         break;
     332             : 
     333             :         case KEY_SUBTRACT:
     334             :         {
     335           0 :             if (!mpView->IsTextEdit() && !bSlideShow && !mpDocSh->IsUIActive())
     336             :             {
     337             :                 // decrease zoom
     338           0 :                 mpViewShell->SetZoom(mpWindow->GetZoom() * 2 / 3);
     339             : 
     340           0 :                 if (mpViewShell->ISA(DrawViewShell))
     341             :                     static_cast<DrawViewShell*>(mpViewShell)
     342           0 :                         ->SetZoomOnPage(false);
     343             : 
     344           0 :                 bReturn = true;
     345             :             }
     346             :         }
     347           0 :         break;
     348             : 
     349             :         case KEY_MULTIPLY:
     350             :         {
     351           0 :             if (!mpView->IsTextEdit() && !bSlideShow)
     352             :             {
     353             :                 // zoom to page
     354             :                 mpViewShell->GetViewFrame()->GetDispatcher()->
     355           0 :                 Execute(SID_SIZE_PAGE, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
     356           0 :                 bReturn = true;
     357             :             }
     358             :         }
     359           0 :         break;
     360             : 
     361             :         case KEY_DIVIDE:
     362             :         {
     363           0 :             if (!mpView->IsTextEdit() && !bSlideShow)
     364             :             {
     365             :                 // zoom to selected objects
     366             :                 mpViewShell->GetViewFrame()->GetDispatcher()->
     367           0 :                 Execute(SID_SIZE_OPTIMAL, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD);
     368           0 :                 bReturn = true;
     369             :             }
     370             :         }
     371           0 :         break;
     372             : 
     373             :         case KEY_POINT:
     374             :         {
     375           0 :             ZoomList* pZoomList = mpViewShell->GetZoomList();
     376             : 
     377           0 :             if (!mpView->IsTextEdit() && pZoomList->IsNextPossible() && !bSlideShow && !mpDocSh->IsUIActive())
     378             :             {
     379             :                 // use next ZoomRect
     380           0 :                 mpViewShell->SetZoomRect(pZoomList->GetNextZoomRect());
     381           0 :                 bReturn = true;
     382             :             }
     383             :         }
     384           0 :         break;
     385             : 
     386             :         case KEY_COMMA:
     387             :         {
     388           0 :             ZoomList* pZoomList = mpViewShell->GetZoomList();
     389             : 
     390           0 :             if (!mpView->IsTextEdit() && pZoomList->IsPreviousPossible() && !bSlideShow && !mpDocSh->IsUIActive())
     391             :             {
     392             :                 // use previous ZoomRect
     393           0 :                 mpViewShell->SetZoomRect(pZoomList->GetPreviousZoomRect());
     394           0 :                 bReturn = true;
     395             :             }
     396             :         }
     397           0 :         break;
     398             : 
     399             :         case KEY_HOME:
     400             :         {
     401           0 :             if (!mpView->IsTextEdit()
     402           0 :                 && mpViewShell->ISA(DrawViewShell)
     403           0 :                 && !bSlideShow)
     404             :             {
     405             :                // jump to first page
     406           0 :                static_cast<DrawViewShell*>(mpViewShell)->SwitchPage(0);
     407           0 :                bReturn = true;
     408             :             }
     409             :         }
     410           0 :         break;
     411             : 
     412             :         case KEY_END:
     413             :         {
     414           0 :             if (!mpView->IsTextEdit()
     415           0 :                 && mpViewShell->ISA(DrawViewShell)
     416           0 :                 && !bSlideShow)
     417             :             {
     418             :                 // jump to last page
     419             :                 SdPage* pPage =
     420           0 :                     static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
     421             :                 static_cast<DrawViewShell*>(mpViewShell)
     422             :                     ->SwitchPage(mpDoc->GetSdPageCount(
     423           0 :                         pPage->GetPageKind()) - 1);
     424           0 :                 bReturn = true;
     425             :             }
     426             :         }
     427           0 :         break;
     428             : 
     429             :         case KEY_PAGEUP:
     430             :         {
     431           0 :             if( rKEvt.GetKeyCode().IsMod1() && rKEvt.GetKeyCode().IsMod2() )
     432           0 :                 break;
     433             : 
     434           0 :             if(mpViewShell->ISA(DrawViewShell) && !bSlideShow)
     435             :             {
     436             :                 // The page-up key switches layers or pages depending on the
     437             :                 // modifier key.
     438           0 :                 if ( ! rKEvt.GetKeyCode().GetModifier())
     439             :                 {
     440             :                     // With no modifier pressed we move to the previous
     441             :                     // slide.
     442           0 :                     mpView->SdrEndTextEdit();
     443             : 
     444             :                     // Previous page.
     445           0 :                     bReturn = true;
     446           0 :                     SdPage* pPage = static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
     447           0 :                     sal_uInt16 nSdPage = (pPage->GetPageNum() - 1) / 2;
     448             : 
     449           0 :                     if (nSdPage > 0)
     450             :                     {
     451             :                         // Switch the page and send events regarding
     452             :                         // deactivation the old page and activating the new
     453             :                         // one.
     454             :                         TabControl& rPageTabControl =
     455             :                             static_cast<DrawViewShell*>(mpViewShell)
     456           0 :                             ->GetPageTabControl();
     457           0 :                         if (rPageTabControl.IsReallyShown())
     458           0 :                             rPageTabControl.SendDeactivatePageEvent ();
     459           0 :                         static_cast<DrawViewShell*>(mpViewShell)->SwitchPage(nSdPage - 1);
     460           0 :                         if (rPageTabControl.IsReallyShown())
     461           0 :                             rPageTabControl.SendActivatePageEvent ();
     462             :                     }
     463             :                 }
     464           0 :                 else if (rKEvt.GetKeyCode().IsMod1())
     465             :                 {
     466             :                     // With the CONTROL modifier we switch layers.
     467           0 :                     if (static_cast<DrawViewShell*>(mpViewShell)->IsLayerModeActive())
     468             :                     {
     469             :                         // Moves to the previous layer.
     470           0 :                         SwitchLayer (-1);
     471             :                     }
     472             :                 }
     473             :             }
     474             :         }
     475           0 :         break;
     476             : 
     477             :         case KEY_PAGEDOWN:
     478             :         {
     479           0 :             if( rKEvt.GetKeyCode().IsMod1() && rKEvt.GetKeyCode().IsMod2() )
     480           0 :                 break;
     481           0 :             if(mpViewShell->ISA(DrawViewShell) && !bSlideShow)
     482             :             {
     483             :                 // The page-down key switches layers or pages depending on the
     484             :                 // modifier key.
     485           0 :                 if ( ! rKEvt.GetKeyCode().GetModifier())
     486             :                 {
     487             :                     // With no modifier pressed we move to the next slide.
     488           0 :                     mpView->SdrEndTextEdit();
     489             : 
     490             :                     // Next page.
     491           0 :                     bReturn = true;
     492           0 :                     SdPage* pPage = static_cast<DrawViewShell*>(mpViewShell)->GetActualPage();
     493           0 :                     sal_uInt16 nSdPage = (pPage->GetPageNum() - 1) / 2;
     494             : 
     495           0 :                     if (nSdPage < mpDoc->GetSdPageCount(pPage->GetPageKind()) - 1)
     496             :                     {
     497             :                         // Switch the page and send events regarding
     498             :                         // deactivation the old page and activating the new
     499             :                         // one.
     500             :                         TabControl& rPageTabControl =
     501           0 :                             static_cast<DrawViewShell*>(mpViewShell)->GetPageTabControl();
     502           0 :                         if (rPageTabControl.IsReallyShown())
     503           0 :                             rPageTabControl.SendDeactivatePageEvent ();
     504           0 :                         static_cast<DrawViewShell*>(mpViewShell)->SwitchPage(nSdPage + 1);
     505           0 :                         if (rPageTabControl.IsReallyShown())
     506           0 :                             rPageTabControl.SendActivatePageEvent ();
     507             :                     }
     508             :                 }
     509           0 :                 else if (rKEvt.GetKeyCode().IsMod1())
     510             :                 {
     511             :                     // With the CONTROL modifier we switch layers.
     512           0 :                     if (static_cast<DrawViewShell*>(mpViewShell)->IsLayerModeActive())
     513             :                     {
     514             :                         // With the layer mode active pressing page-down
     515             :                         // moves to the next layer.
     516           0 :                         SwitchLayer (+1);
     517             :                     }
     518             :                 }
     519             :             }
     520             :         }
     521           0 :         break;
     522             : 
     523             :         // change select state when focus is on poly point
     524             :         case KEY_SPACE:
     525             :         {
     526           0 :             const SdrHdlList& rHdlList = mpView->GetHdlList();
     527           0 :             SdrHdl* pHdl = rHdlList.GetFocusHdl();
     528             : 
     529           0 :             if(pHdl)
     530             :             {
     531           0 :                 if(pHdl->GetKind() == HDL_POLY)
     532             :                 {
     533             :                     // rescue ID of point with focus
     534           0 :                     sal_uInt32 nPol(pHdl->GetPolyNum());
     535           0 :                     sal_uInt32 nPnt(pHdl->GetPointNum());
     536             : 
     537           0 :                     if(mpView->IsPointMarked(*pHdl))
     538             :                     {
     539           0 :                         if(rKEvt.GetKeyCode().IsShift())
     540             :                         {
     541           0 :                             mpView->UnmarkPoint(*pHdl);
     542             :                         }
     543             :                     }
     544             :                     else
     545             :                     {
     546           0 :                         if(!rKEvt.GetKeyCode().IsShift())
     547             :                         {
     548           0 :                             mpView->UnmarkAllPoints();
     549             :                         }
     550             : 
     551           0 :                         mpView->MarkPoint(*pHdl);
     552             :                     }
     553             : 
     554           0 :                     if(0L == rHdlList.GetFocusHdl())
     555             :                     {
     556             :                         // restore point with focus
     557           0 :                         SdrHdl* pNewOne = 0L;
     558             : 
     559           0 :                         for(size_t a = 0; !pNewOne && a < rHdlList.GetHdlCount(); ++a)
     560             :                         {
     561           0 :                             SdrHdl* pAct = rHdlList.GetHdl(a);
     562             : 
     563           0 :                             if(pAct
     564           0 :                                 && pAct->GetKind() == HDL_POLY
     565           0 :                                 && pAct->GetPolyNum() == nPol
     566           0 :                                 && pAct->GetPointNum() == nPnt)
     567             :                             {
     568           0 :                                 pNewOne = pAct;
     569             :                             }
     570             :                         }
     571             : 
     572           0 :                         if(pNewOne)
     573             :                         {
     574           0 :                             ((SdrHdlList&)rHdlList).SetFocusHdl(pNewOne);
     575             :                         }
     576             :                     }
     577             : 
     578           0 :                     bReturn = true;
     579             :                 }
     580             :             }
     581             :         }
     582           0 :         break;
     583             : 
     584             :         case KEY_UP:
     585             :         case KEY_DOWN:
     586             :         case KEY_LEFT:
     587             :         case KEY_RIGHT:
     588             :         {
     589           0 :             if (!mpView->IsTextEdit() && !bSlideShow)
     590             :             {
     591           0 :                 long nX = 0;
     592           0 :                 long nY = 0;
     593             : 
     594           0 :                 if (nCode == KEY_UP)
     595             :                 {
     596             :                     // scroll up
     597           0 :                     nX = 0;
     598           0 :                     nY =-1;
     599             :                 }
     600           0 :                 else if (nCode == KEY_DOWN)
     601             :                 {
     602             :                     // scroll down
     603           0 :                     nX = 0;
     604           0 :                     nY = 1;
     605             :                 }
     606           0 :                 else if (nCode == KEY_LEFT)
     607             :                 {
     608             :                     // scroll left
     609           0 :                     nX =-1;
     610           0 :                     nY = 0;
     611             :                 }
     612           0 :                 else if (nCode == KEY_RIGHT)
     613             :                 {
     614             :                     // scroll right
     615           0 :                     nX = 1;
     616           0 :                     nY = 0;
     617             :                 }
     618             : 
     619           0 :                 if (mpView->AreObjectsMarked() && !rKEvt.GetKeyCode().IsMod1() &&
     620           0 :                     !mpDocSh->IsReadOnly())
     621             :                 {
     622           0 :                     const SdrHdlList& rHdlList = mpView->GetHdlList();
     623           0 :                     SdrHdl* pHdl = rHdlList.GetFocusHdl();
     624             : 
     625           0 :                     bool bIsMoveOfConnectedHandle(false);
     626           0 :                     bool bOldSuppress = false;
     627           0 :                     SdrEdgeObj* pEdgeObj = 0L;
     628             : 
     629           0 :                     if(pHdl && pHdl->GetObj() && pHdl->GetObj()->ISA(SdrEdgeObj) && 0 == pHdl->GetPolyNum())
     630             :                     {
     631           0 :                         pEdgeObj = (SdrEdgeObj*)pHdl->GetObj();
     632             : 
     633           0 :                         if(0L == pHdl->GetPointNum())
     634             :                         {
     635           0 :                             if(pEdgeObj->GetConnection(true).GetObject())
     636             :                             {
     637           0 :                                 bIsMoveOfConnectedHandle = true;
     638             :                             }
     639             :                         }
     640           0 :                         if(1L == pHdl->GetPointNum())
     641             :                         {
     642           0 :                             if(pEdgeObj->GetConnection(false).GetObject())
     643             :                             {
     644           0 :                                 bIsMoveOfConnectedHandle = true;
     645             :                             }
     646             :                         }
     647             :                     }
     648             : 
     649           0 :                     if(pEdgeObj)
     650             :                     {
     651             :                         // Suppress default connects to inside object and object center
     652           0 :                         bOldSuppress = pEdgeObj->GetSuppressDefaultConnect();
     653           0 :                         pEdgeObj->SetSuppressDefaultConnect(true);
     654             :                     }
     655             : 
     656           0 :                     if(bIsMoveOfConnectedHandle)
     657             :                     {
     658           0 :                         sal_uInt16 nMarkHdSiz(mpView->GetMarkHdlSizePixel());
     659           0 :                         Size aHalfConSiz(nMarkHdSiz + 1, nMarkHdSiz + 1);
     660           0 :                         aHalfConSiz = mpWindow->PixelToLogic(aHalfConSiz);
     661             : 
     662           0 :                         if(100 < aHalfConSiz.Width())
     663           0 :                             nX *= aHalfConSiz.Width();
     664             :                         else
     665           0 :                             nX *= 100;
     666             : 
     667           0 :                         if(100 < aHalfConSiz.Height())
     668           0 :                             nY *= aHalfConSiz.Height();
     669             :                         else
     670           0 :                             nY *= 100;
     671             :                     }
     672           0 :                     else if(rKEvt.GetKeyCode().IsMod2())
     673             :                     {
     674             :                         // move in 1 pixel distance
     675           0 :                         Size aLogicSizeOnePixel = mpWindow->PixelToLogic(Size(1,1));
     676           0 :                         nX *= aLogicSizeOnePixel.Width();
     677           0 :                         nY *= aLogicSizeOnePixel.Height();
     678             :                     }
     679           0 :                     else if(rKEvt.GetKeyCode().IsShift())
     680             :                     {
     681           0 :                         nX *= 1000;
     682           0 :                         nY *= 1000;
     683             :                     }
     684             :                     else
     685             :                     {
     686             :                         // old, fixed move distance
     687           0 :                         nX *= 100;
     688           0 :                         nY *= 100;
     689             :                     }
     690             : 
     691           0 :                     if(0L == pHdl)
     692             :                     {
     693             :                         // only take action when move is allowed
     694           0 :                         if(mpView->IsMoveAllowed())
     695             :                         {
     696             :                             // restrict movement to WorkArea
     697           0 :                             const Rectangle& rWorkArea = mpView->GetWorkArea();
     698             : 
     699           0 :                             if(!rWorkArea.IsEmpty())
     700             :                             {
     701           0 :                                 Rectangle aMarkRect(mpView->GetMarkedObjRect());
     702           0 :                                 aMarkRect.Move(nX, nY);
     703             : 
     704           0 :                                 if(!aMarkRect.IsInside(rWorkArea))
     705             :                                 {
     706           0 :                                     if(aMarkRect.Left() < rWorkArea.Left())
     707             :                                     {
     708           0 :                                         nX += rWorkArea.Left() - aMarkRect.Left();
     709             :                                     }
     710             : 
     711           0 :                                     if(aMarkRect.Right() > rWorkArea.Right())
     712             :                                     {
     713           0 :                                         nX -= aMarkRect.Right() - rWorkArea.Right();
     714             :                                     }
     715             : 
     716           0 :                                     if(aMarkRect.Top() < rWorkArea.Top())
     717             :                                     {
     718           0 :                                         nY += rWorkArea.Top() - aMarkRect.Top();
     719             :                                     }
     720             : 
     721           0 :                                     if(aMarkRect.Bottom() > rWorkArea.Bottom())
     722             :                                     {
     723           0 :                                         nY -= aMarkRect.Bottom() - rWorkArea.Bottom();
     724             :                                     }
     725             :                                 }
     726             :                             }
     727             : 
     728             :                             // no handle selected
     729           0 :                             if(0 != nX || 0 != nY)
     730             :                             {
     731           0 :                                 mpView->MoveAllMarked(Size(nX, nY));
     732             : 
     733           0 :                                 mpView->MakeVisible(mpView->GetAllMarkedRect(), *mpWindow);
     734             :                             }
     735             :                         }
     736             :                     }
     737             :                     else
     738             :                     {
     739             :                         // move handle with index nHandleIndex
     740           0 :                         if(pHdl && (nX || nY))
     741             :                         {
     742             :                             // now move the Handle (nX, nY)
     743           0 :                             Point aStartPoint(pHdl->GetPos());
     744           0 :                             Point aEndPoint(pHdl->GetPos() + Point(nX, nY));
     745           0 :                             const SdrDragStat& rDragStat = mpView->GetDragStat();
     746             : 
     747             :                             // start dragging
     748           0 :                             mpView->BegDragObj(aStartPoint, 0, pHdl, 0);
     749             : 
     750           0 :                             if(mpView->IsDragObj())
     751             :                             {
     752           0 :                                 bool bWasNoSnap = rDragStat.IsNoSnap();
     753           0 :                                 bool bWasSnapEnabled = mpView->IsSnapEnabled();
     754             : 
     755             :                                 // switch snapping off
     756           0 :                                 if(!bWasNoSnap)
     757           0 :                                     ((SdrDragStat&)rDragStat).SetNoSnap(true);
     758           0 :                                 if(bWasSnapEnabled)
     759           0 :                                     mpView->SetSnapEnabled(false);
     760             : 
     761           0 :                                 mpView->MovAction(aEndPoint);
     762           0 :                                 mpView->EndDragObj();
     763             : 
     764             :                                 // restore snap
     765           0 :                                 if(!bWasNoSnap)
     766           0 :                                     ((SdrDragStat&)rDragStat).SetNoSnap(bWasNoSnap);
     767           0 :                                 if(bWasSnapEnabled)
     768           0 :                                     mpView->SetSnapEnabled(bWasSnapEnabled);
     769             :                             }
     770             : 
     771             :                             // make moved handle visible
     772           0 :                             Rectangle aVisRect(aEndPoint - Point(100, 100), Size(200, 200));
     773           0 :                             mpView->MakeVisible(aVisRect, *mpWindow);
     774             :                         }
     775             :                     }
     776             : 
     777           0 :                     if(pEdgeObj)
     778             :                     {
     779             :                         // Restore original suppress value
     780           0 :                         pEdgeObj->SetSuppressDefaultConnect(bOldSuppress);
     781             :                     }
     782             :                 }
     783             :                 else
     784             :                 {
     785             :                     // scroll page
     786           0 :                     mpViewShell->ScrollLines(nX, nY);
     787             :                 }
     788             : 
     789           0 :                 bReturn = true;
     790             :             }
     791             :         }
     792           0 :         break;
     793             :     }
     794             : 
     795           0 :     if (bReturn)
     796             :     {
     797           0 :         mpWindow->ReleaseMouse();
     798             :     }
     799             : 
     800             :     // when a text-editable object is selected and the
     801             :     // input character is printable, activate text edit on that object
     802             :     // and feed character to object
     803           0 :     if(!bReturn && !mpDocSh->IsReadOnly())
     804             :     {
     805           0 :         if(!mpView->IsTextEdit() && mpViewShell)
     806             :         {
     807           0 :             const SdrMarkList& rMarkList = mpView->GetMarkedObjectList();
     808             : 
     809           0 :             if(1 == rMarkList.GetMarkCount())
     810             :             {
     811           0 :                 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
     812             : 
     813             :                 // #i118485# allow TextInput for OLEs, too
     814           0 :                 if(pObj->ISA(SdrTextObj) && pObj->HasTextEdit())
     815             :                 {
     816             :                     // use common IsSimpleCharInput from the EditEngine.
     817           0 :                     bool bPrintable(EditEngine::IsSimpleCharInput(rKEvt));
     818             : 
     819           0 :                     if(bPrintable)
     820             :                     {
     821             :                         // try to activate textedit mode for the selected object
     822           0 :                         SfxStringItem aInputString(SID_ATTR_CHAR, OUString(rKEvt.GetCharCode()));
     823             : 
     824             :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
     825             :                             SID_ATTR_CHAR,
     826             :                             SfxCallMode::ASYNCHRON,
     827             :                             &aInputString,
     828           0 :                             0L);
     829             : 
     830             :                         // consumed
     831           0 :                         bReturn = true;
     832             :                     }
     833             :                 }
     834             :             }
     835             :             else
     836             :             {
     837             :                 // test if there is a title object there. If yes, try to
     838             :                 // set it to edit mode and start typing...
     839           0 :                 if(mpViewShell->ISA(DrawViewShell)
     840           0 :                     && EditEngine::IsSimpleCharInput(rKEvt))
     841             :                 {
     842             :                     DrawViewShell* pDrawViewShell =
     843           0 :                         static_cast<DrawViewShell*>(mpViewShell);
     844           0 :                     SdPage* pActualPage = pDrawViewShell->GetActualPage();
     845           0 :                     SdrTextObj* pCandidate = 0L;
     846             : 
     847           0 :                     if(pActualPage)
     848             :                     {
     849           0 :                         SdrObjListIter aIter(*pActualPage, IM_DEEPNOGROUPS);
     850             : 
     851           0 :                         while(aIter.IsMore() && !pCandidate)
     852             :                         {
     853           0 :                             SdrObject* pObj = aIter.Next();
     854             : 
     855           0 :                             if(pObj && pObj->ISA(SdrTextObj))
     856             :                             {
     857           0 :                                 sal_uInt32 nInv(pObj->GetObjInventor());
     858           0 :                                 sal_uInt16 nKnd(pObj->GetObjIdentifier());
     859             : 
     860           0 :                                 if(SdrInventor == nInv && OBJ_TITLETEXT == nKnd)
     861             :                                 {
     862           0 :                                     pCandidate = (SdrTextObj*)pObj;
     863             :                                 }
     864             :                             }
     865           0 :                         }
     866             :                     }
     867             : 
     868             :                     // when candidate found and candidate is untouched, start editing text...
     869           0 :                     if(pCandidate && pCandidate->IsEmptyPresObj())
     870             :                     {
     871           0 :                         mpView->UnMarkAll();
     872           0 :                         mpView->MarkObj(pCandidate, mpView->GetSdrPageView());
     873           0 :                         SfxStringItem aInputString(SID_ATTR_CHAR, OUString(rKEvt.GetCharCode()));
     874             : 
     875             :                         mpViewShell->GetViewFrame()->GetDispatcher()->Execute(
     876             :                             SID_ATTR_CHAR,
     877             :                             SfxCallMode::ASYNCHRON,
     878             :                             &aInputString,
     879           0 :                             0L);
     880             : 
     881             :                         // consumed
     882           0 :                         bReturn = true;
     883             :                     }
     884             :                 }
     885             :             }
     886             :         }
     887             :     }
     888             : 
     889           0 :     return(bReturn);
     890             : }
     891             : 
     892           0 : bool FuPoor::MouseMove(const MouseEvent& )
     893             : {
     894           0 :     return false;
     895             : }
     896             : 
     897         214 : void FuPoor::SelectionHasChanged()
     898             : {
     899         214 :     const SdrHdlList& rHdlList = mpView->GetHdlList();
     900         214 :     ((SdrHdlList&)rHdlList).ResetFocusHdl();
     901         214 : }
     902             : 
     903             : /**
     904             :  * Cut object to clipboard
     905             :  */
     906           0 : void FuPoor::DoCut()
     907             : {
     908           0 :     if (mpView)
     909             :     {
     910           0 :         mpView->DoCut(mpWindow);
     911             :     }
     912           0 : }
     913             : 
     914             : /**
     915             :  * Copy object to clipboard
     916             :  */
     917           0 : void FuPoor::DoCopy()
     918             : {
     919           0 :     if (mpView)
     920             :     {
     921           0 :         mpView->DoCopy(mpWindow);
     922             :     }
     923           0 : }
     924             : 
     925             : /**
     926             :  * Paste object from clipboard
     927             :  */
     928           0 : void FuPoor::DoPaste()
     929             : {
     930           0 :     if (mpView)
     931             :     {
     932           0 :         mpView->DoPaste(mpWindow);
     933             :     }
     934           0 : }
     935             : 
     936             : /**
     937             :  * Paste unformatted text from clipboard
     938             :  */
     939           0 : void FuPoor::DoPasteUnformatted()
     940             : {
     941           0 :     if (mpView)
     942             :     {
     943           0 :         sal_Int8 nAction = DND_ACTION_COPY;
     944           0 :         TransferableDataHelper aDataHelper( TransferableDataHelper::CreateFromSystemClipboard( mpViewShell->GetActiveWindow() ) );
     945           0 :         if (aDataHelper.GetTransferable().is())
     946             :         {
     947             :             mpView->InsertData( aDataHelper,
     948           0 :                                 mpWindow->PixelToLogic( Rectangle( Point(), mpWindow->GetOutputSizePixel() ).Center() ),
     949           0 :                                 nAction, false, FORMAT_STRING);
     950           0 :         }
     951             :     }
     952           0 : }
     953             : 
     954             : /**
     955             :  * Timer handler for Drag&Drop
     956             :  */
     957           0 : IMPL_LINK_NOARG(FuPoor, DragHdl)
     958             : {
     959           0 :     if( mpView )
     960             :     {
     961           0 :         sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
     962           0 :         SdrHdl* pHdl = mpView->PickHandle(aMDPos);
     963             : 
     964           0 :         if ( pHdl==NULL && mpView->IsMarkedHit(aMDPos, nHitLog)
     965           0 :              && !mpView->IsPresObjSelected(false, true) )
     966             :         {
     967           0 :             mpWindow->ReleaseMouse();
     968           0 :             bIsInDragMode = true;
     969           0 :             mpView->StartDrag( aMDPos, mpWindow );
     970             :         }
     971             :     }
     972           0 :     return 0;
     973             : }
     974             : 
     975           0 : bool FuPoor::Command(const CommandEvent& rCEvt)
     976             : {
     977           0 :     return( mpView->Command(rCEvt,mpWindow) );
     978             : }
     979             : 
     980             : /**
     981             :  * Timer handler for window scrolling
     982             :  */
     983           0 : IMPL_LINK_NOARG_INLINE_START(FuPoor, DelayHdl)
     984             : {
     985           0 :     aDelayToScrollTimer.Stop ();
     986           0 :     bScrollable = true;
     987             : 
     988           0 :     Point aPnt(mpWindow->GetPointerPosPixel());
     989             : 
     990             :     // use remembered MouseButton state to create correct
     991             :     // MouseEvents for this artificial MouseMove.
     992           0 :     MouseMove(MouseEvent(aPnt, 1, 0, GetMouseButtonCode()));
     993             : 
     994           0 :     return 0;
     995             : }
     996           0 : IMPL_LINK_INLINE_END( FuPoor, DelayHdl, Timer *, pTimer )
     997             : 
     998           0 : bool FuPoor::MouseButtonUp (const MouseEvent& rMEvt)
     999             : {
    1000             :     // remember button state for creation of own MouseEvents
    1001           0 :     SetMouseButtonCode(rMEvt.GetButtons());
    1002             : 
    1003           0 :     aDelayToScrollTimer.Stop ();
    1004             :     return bScrollable  =
    1005           0 :         bDelayActive = false;
    1006             : }
    1007             : 
    1008           0 : bool FuPoor::MouseButtonDown(const MouseEvent& rMEvt)
    1009             : {
    1010             :     // remember button state for creation of own MouseEvents
    1011           0 :     SetMouseButtonCode(rMEvt.GetButtons());
    1012             : 
    1013           0 :     return false;
    1014             : }
    1015             : 
    1016           0 : void FuPoor::StartDelayToScrollTimer ()
    1017             : {
    1018           0 :     bDelayActive = true;
    1019           0 :     aDelayToScrollTimer.Start ();
    1020           0 : }
    1021             : 
    1022           0 : bool FuPoor::RequestHelp(const HelpEvent& rHEvt)
    1023             : {
    1024           0 :     bool bReturn = false;
    1025             : 
    1026           0 :     SdrPageView* pPV = mpView->GetSdrPageView();
    1027             : 
    1028           0 :     if (pPV)
    1029             :     {
    1030           0 :         SdPage* pPage = (SdPage*) pPV->GetPage();
    1031             : 
    1032           0 :         if (pPage)
    1033             :         {
    1034           0 :             bReturn = pPage->RequestHelp(mpWindow, mpView, rHEvt);
    1035             :         }
    1036             :     }
    1037             : 
    1038           0 :     return(bReturn);
    1039             : }
    1040             : 
    1041         477 : void FuPoor::Paint(const Rectangle&, ::sd::Window* )
    1042             : {
    1043         477 : }
    1044             : 
    1045         338 : void FuPoor::ReceiveRequest(SfxRequest& rReq)
    1046             : {
    1047         338 :     const SfxItemSet* pSet = rReq.GetArgs();
    1048             : 
    1049         338 :     if (pSet)
    1050             :     {
    1051           0 :         if( pSet->GetItemState( nSlotId ) == SfxItemState::SET )
    1052             :         {
    1053           0 :             const SfxPoolItem& rItem = pSet->Get( nSlotId );
    1054             : 
    1055           0 :             if( rItem.ISA( SfxAllEnumItem ) )
    1056             :             {
    1057           0 :                 nSlotValue = ( ( const SfxAllEnumItem& ) rItem ).GetValue();
    1058             :             }
    1059             :         }
    1060             :     }
    1061         338 : }
    1062             : 
    1063           0 : SdrObject* FuPoor::CreateDefaultObject(const sal_uInt16, const Rectangle& )
    1064             : {
    1065             :     // empty base implementation
    1066           0 :     return 0L;
    1067             : }
    1068             : 
    1069           0 : void FuPoor::ImpForceQuadratic(Rectangle& rRect)
    1070             : {
    1071           0 :     if(rRect.GetWidth() > rRect.GetHeight())
    1072             :     {
    1073             :         rRect = Rectangle(
    1074           0 :             Point(rRect.Left() + ((rRect.GetWidth() - rRect.GetHeight()) / 2), rRect.Top()),
    1075           0 :             Size(rRect.GetHeight(), rRect.GetHeight()));
    1076             :     }
    1077             :     else
    1078             :     {
    1079             :         rRect = Rectangle(
    1080           0 :             Point(rRect.Left(), rRect.Top() + ((rRect.GetHeight() - rRect.GetWidth()) / 2)),
    1081           0 :             Size(rRect.GetWidth(), rRect.GetWidth()));
    1082             :     }
    1083           0 : }
    1084             : 
    1085           0 : void FuPoor::SwitchLayer (sal_Int32 nOffset)
    1086             : {
    1087           0 :     if(mpViewShell && mpViewShell->ISA(DrawViewShell))
    1088             :     {
    1089             :         DrawViewShell* pDrawViewShell =
    1090           0 :             static_cast<DrawViewShell*>(mpViewShell);
    1091             : 
    1092             :         // Calculate the new index.
    1093           0 :         sal_Int32 nIndex = pDrawViewShell->GetActiveTabLayerIndex() + nOffset;
    1094             : 
    1095             :         // Make sure the new index lies inside the range of valid indices.
    1096           0 :         if (nIndex < 0)
    1097           0 :             nIndex = 0;
    1098           0 :         else if (nIndex >= pDrawViewShell->GetTabLayerCount ())
    1099           0 :             nIndex = pDrawViewShell->GetTabLayerCount() - 1;
    1100             : 
    1101             :         // Set the new active layer.
    1102           0 :         if (nIndex != pDrawViewShell->GetActiveTabLayerIndex ())
    1103             :         {
    1104             :             LayerTabBar* pLayerTabControl =
    1105           0 :                 static_cast<DrawViewShell*>(mpViewShell)->GetLayerTabControl();
    1106           0 :             if (pLayerTabControl != NULL)
    1107           0 :                 pLayerTabControl->SendDeactivatePageEvent ();
    1108             : 
    1109           0 :             pDrawViewShell->SetActiveTabLayerIndex (nIndex);
    1110             : 
    1111           0 :             if (pLayerTabControl != NULL)
    1112           0 :                 pLayerTabControl->SendActivatePageEvent ();
    1113             :         }
    1114             :     }
    1115           0 : }
    1116             : 
    1117             : /** is called when the current function should be aborted. <p>
    1118             :     This is used when a function gets a KEY_ESCAPE but can also
    1119             :     be called directly.
    1120             : 
    1121             :     @returns true if a active function was aborted
    1122             : */
    1123           0 : bool FuPoor::cancel()
    1124             : {
    1125           0 :     if ( !this->ISA(FuSelection) )
    1126             :     {
    1127           0 :         mpViewShell->GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
    1128           0 :         return true;
    1129             :     }
    1130             : 
    1131           0 :     return false;
    1132             : }
    1133             : 
    1134             : // #i33136#
    1135           0 : bool FuPoor::doConstructOrthogonal() const
    1136             : {
    1137             :     return (
    1138           0 :         SID_DRAW_XLINE == nSlotId ||
    1139           0 :         SID_DRAW_CIRCLEARC == nSlotId ||
    1140           0 :         SID_DRAW_SQUARE == nSlotId ||
    1141           0 :         SID_DRAW_SQUARE_NOFILL == nSlotId ||
    1142           0 :         SID_DRAW_SQUARE_ROUND == nSlotId ||
    1143           0 :         SID_DRAW_SQUARE_ROUND_NOFILL == nSlotId ||
    1144           0 :         SID_DRAW_CIRCLE == nSlotId ||
    1145           0 :         SID_DRAW_CIRCLE_NOFILL == nSlotId ||
    1146           0 :         SID_DRAW_CIRCLEPIE == nSlotId ||
    1147           0 :         SID_DRAW_CIRCLEPIE_NOFILL == nSlotId ||
    1148           0 :         SID_DRAW_CIRCLECUT == nSlotId ||
    1149           0 :         SID_DRAW_CIRCLECUT_NOFILL == nSlotId ||
    1150           0 :         SID_DRAW_XPOLYGON == nSlotId ||
    1151           0 :         SID_DRAW_XPOLYGON_NOFILL == nSlotId ||
    1152           0 :         SID_3D_CUBE == nSlotId ||
    1153           0 :         SID_3D_SPHERE == nSlotId ||
    1154           0 :         SID_3D_SHELL == nSlotId ||
    1155           0 :         SID_3D_HALF_SPHERE == nSlotId ||
    1156           0 :         SID_3D_TORUS == nSlotId ||
    1157           0 :         SID_3D_CYLINDER == nSlotId ||
    1158           0 :         SID_3D_CONE == nSlotId ||
    1159           0 :         SID_3D_PYRAMID == nSlotId);
    1160             : }
    1161             : 
    1162         212 : void FuPoor::DoExecute( SfxRequest& )
    1163             : {
    1164         212 : }
    1165             : 
    1166         114 : } // end of namespace sd
    1167             : 
    1168             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10