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

Generated by: LCOV version 1.10