xref: /trunk/main/sd/source/ui/func/fuediglu.cxx (revision cdf0e10c4e3984b49a9502b011690b615761d4a3)
1*cdf0e10cSrcweir /*************************************************************************
2*cdf0e10cSrcweir  *
3*cdf0e10cSrcweir  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4*cdf0e10cSrcweir  *
5*cdf0e10cSrcweir  * Copyright 2000, 2010 Oracle and/or its affiliates.
6*cdf0e10cSrcweir  *
7*cdf0e10cSrcweir  * OpenOffice.org - a multi-platform office productivity suite
8*cdf0e10cSrcweir  *
9*cdf0e10cSrcweir  * This file is part of OpenOffice.org.
10*cdf0e10cSrcweir  *
11*cdf0e10cSrcweir  * OpenOffice.org is free software: you can redistribute it and/or modify
12*cdf0e10cSrcweir  * it under the terms of the GNU Lesser General Public License version 3
13*cdf0e10cSrcweir  * only, as published by the Free Software Foundation.
14*cdf0e10cSrcweir  *
15*cdf0e10cSrcweir  * OpenOffice.org is distributed in the hope that it will be useful,
16*cdf0e10cSrcweir  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17*cdf0e10cSrcweir  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18*cdf0e10cSrcweir  * GNU Lesser General Public License version 3 for more details
19*cdf0e10cSrcweir  * (a copy is included in the LICENSE file that accompanied this code).
20*cdf0e10cSrcweir  *
21*cdf0e10cSrcweir  * You should have received a copy of the GNU Lesser General Public License
22*cdf0e10cSrcweir  * version 3 along with OpenOffice.org.  If not, see
23*cdf0e10cSrcweir  * <http://www.openoffice.org/license.html>
24*cdf0e10cSrcweir  * for a copy of the LGPLv3 License.
25*cdf0e10cSrcweir  *
26*cdf0e10cSrcweir  ************************************************************************/
27*cdf0e10cSrcweir 
28*cdf0e10cSrcweir // MARKER(update_precomp.py): autogen include statement, do not remove
29*cdf0e10cSrcweir #include "precompiled_sd.hxx"
30*cdf0e10cSrcweir 
31*cdf0e10cSrcweir #include "fuediglu.hxx"
32*cdf0e10cSrcweir #include <svl/eitem.hxx>
33*cdf0e10cSrcweir #include <svx/dialogs.hrc>
34*cdf0e10cSrcweir #include <svx/svdglue.hxx>
35*cdf0e10cSrcweir #include <sfx2/request.hxx>
36*cdf0e10cSrcweir 
37*cdf0e10cSrcweir 
38*cdf0e10cSrcweir #include "app.hrc"
39*cdf0e10cSrcweir #include "strings.hrc"
40*cdf0e10cSrcweir #include "res_bmp.hrc"
41*cdf0e10cSrcweir #ifndef SD_WINDOW_SHELL_HXX
42*cdf0e10cSrcweir #include "Window.hxx"
43*cdf0e10cSrcweir #endif
44*cdf0e10cSrcweir #include "drawdoc.hxx"
45*cdf0e10cSrcweir #ifndef SD_FRAMW_VIEW_HXX
46*cdf0e10cSrcweir #include "FrameView.hxx"
47*cdf0e10cSrcweir #endif
48*cdf0e10cSrcweir #include "View.hxx"
49*cdf0e10cSrcweir #include "ViewShell.hxx"
50*cdf0e10cSrcweir #include "ViewShellBase.hxx"
51*cdf0e10cSrcweir #include "ToolBarManager.hxx"
52*cdf0e10cSrcweir 
53*cdf0e10cSrcweir namespace sd {
54*cdf0e10cSrcweir 
55*cdf0e10cSrcweir TYPEINIT1( FuEditGluePoints, FuDraw );
56*cdf0e10cSrcweir 
57*cdf0e10cSrcweir /*************************************************************************
58*cdf0e10cSrcweir |*
59*cdf0e10cSrcweir |* Konstruktor
60*cdf0e10cSrcweir |*
61*cdf0e10cSrcweir \************************************************************************/
62*cdf0e10cSrcweir 
63*cdf0e10cSrcweir FuEditGluePoints::FuEditGluePoints (
64*cdf0e10cSrcweir     ViewShell* pViewSh,
65*cdf0e10cSrcweir     ::sd::Window* pWin,
66*cdf0e10cSrcweir     ::sd::View* pView,
67*cdf0e10cSrcweir     SdDrawDocument* pDoc,
68*cdf0e10cSrcweir     SfxRequest& rReq)
69*cdf0e10cSrcweir     : FuDraw(pViewSh, pWin, pView, pDoc, rReq)
70*cdf0e10cSrcweir {
71*cdf0e10cSrcweir }
72*cdf0e10cSrcweir 
73*cdf0e10cSrcweir FunctionReference FuEditGluePoints::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq, bool bPermanent )
74*cdf0e10cSrcweir {
75*cdf0e10cSrcweir     FuEditGluePoints* pFunc;
76*cdf0e10cSrcweir     FunctionReference xFunc( pFunc = new FuEditGluePoints( pViewSh, pWin, pView, pDoc, rReq ) );
77*cdf0e10cSrcweir     xFunc->DoExecute(rReq);
78*cdf0e10cSrcweir     pFunc->SetPermanent( bPermanent );
79*cdf0e10cSrcweir     return xFunc;
80*cdf0e10cSrcweir }
81*cdf0e10cSrcweir 
82*cdf0e10cSrcweir void FuEditGluePoints::DoExecute( SfxRequest& rReq )
83*cdf0e10cSrcweir {
84*cdf0e10cSrcweir     FuDraw::DoExecute( rReq );
85*cdf0e10cSrcweir     mpView->SetInsGluePointMode(sal_False);
86*cdf0e10cSrcweir     mpViewShell->GetViewShellBase().GetToolBarManager()->AddToolBar(
87*cdf0e10cSrcweir         ToolBarManager::TBG_FUNCTION,
88*cdf0e10cSrcweir         ToolBarManager::msGluePointsToolBar);
89*cdf0e10cSrcweir }
90*cdf0e10cSrcweir 
91*cdf0e10cSrcweir /*************************************************************************
92*cdf0e10cSrcweir |*
93*cdf0e10cSrcweir |* Destruktor
94*cdf0e10cSrcweir |*
95*cdf0e10cSrcweir \************************************************************************/
96*cdf0e10cSrcweir 
97*cdf0e10cSrcweir FuEditGluePoints::~FuEditGluePoints()
98*cdf0e10cSrcweir {
99*cdf0e10cSrcweir     mpView->BrkAction();
100*cdf0e10cSrcweir     mpView->UnmarkAllGluePoints();
101*cdf0e10cSrcweir     mpView->SetInsGluePointMode(sal_False);
102*cdf0e10cSrcweir }
103*cdf0e10cSrcweir 
104*cdf0e10cSrcweir /*************************************************************************
105*cdf0e10cSrcweir |*
106*cdf0e10cSrcweir |* MouseButtonDown-event
107*cdf0e10cSrcweir |*
108*cdf0e10cSrcweir \************************************************************************/
109*cdf0e10cSrcweir 
110*cdf0e10cSrcweir sal_Bool FuEditGluePoints::MouseButtonDown(const MouseEvent& rMEvt)
111*cdf0e10cSrcweir {
112*cdf0e10cSrcweir     mpView->SetActualWin( mpWindow );
113*cdf0e10cSrcweir 
114*cdf0e10cSrcweir     sal_Bool bReturn = FuDraw::MouseButtonDown(rMEvt);
115*cdf0e10cSrcweir 
116*cdf0e10cSrcweir     if (mpView->IsAction())
117*cdf0e10cSrcweir     {
118*cdf0e10cSrcweir         if (rMEvt.IsRight())
119*cdf0e10cSrcweir             mpView->BckAction();
120*cdf0e10cSrcweir 
121*cdf0e10cSrcweir         return sal_True;
122*cdf0e10cSrcweir     }
123*cdf0e10cSrcweir 
124*cdf0e10cSrcweir     if (rMEvt.IsLeft())
125*cdf0e10cSrcweir     {
126*cdf0e10cSrcweir         bReturn = sal_True;
127*cdf0e10cSrcweir         sal_uInt16 nHitLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(HITPIX,0)).Width() );
128*cdf0e10cSrcweir         sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
129*cdf0e10cSrcweir         mpWindow->CaptureMouse();
130*cdf0e10cSrcweir 
131*cdf0e10cSrcweir         SdrViewEvent aVEvt;
132*cdf0e10cSrcweir         SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
133*cdf0e10cSrcweir 
134*cdf0e10cSrcweir         if (eHit == SDRHIT_HANDLE)
135*cdf0e10cSrcweir         {
136*cdf0e10cSrcweir             /******************************************************************
137*cdf0e10cSrcweir             * Handle draggen
138*cdf0e10cSrcweir             ******************************************************************/
139*cdf0e10cSrcweir             SdrHdl* pHdl = aVEvt.pHdl;
140*cdf0e10cSrcweir 
141*cdf0e10cSrcweir             if (mpView->IsGluePointMarked(aVEvt.pObj, aVEvt.nGlueId) && rMEvt.IsShift())
142*cdf0e10cSrcweir             {
143*cdf0e10cSrcweir                 mpView->UnmarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, aVEvt.pPV);
144*cdf0e10cSrcweir                 pHdl = NULL;
145*cdf0e10cSrcweir             }
146*cdf0e10cSrcweir 
147*cdf0e10cSrcweir             if (pHdl)
148*cdf0e10cSrcweir             {
149*cdf0e10cSrcweir                 // Handle draggen
150*cdf0e10cSrcweir                 mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
151*cdf0e10cSrcweir             }
152*cdf0e10cSrcweir         }
153*cdf0e10cSrcweir         else if (eHit == SDRHIT_MARKEDOBJECT && mpView->IsInsGluePointMode())
154*cdf0e10cSrcweir         {
155*cdf0e10cSrcweir             /******************************************************************
156*cdf0e10cSrcweir             * Klebepunkt einfuegen
157*cdf0e10cSrcweir             ******************************************************************/
158*cdf0e10cSrcweir             mpView->BegInsGluePoint(aMDPos);
159*cdf0e10cSrcweir         }
160*cdf0e10cSrcweir         else if (eHit == SDRHIT_MARKEDOBJECT && rMEvt.IsMod1())
161*cdf0e10cSrcweir         {
162*cdf0e10cSrcweir             /******************************************************************
163*cdf0e10cSrcweir             * Klebepunkt selektieren
164*cdf0e10cSrcweir             ******************************************************************/
165*cdf0e10cSrcweir             if (!rMEvt.IsShift())
166*cdf0e10cSrcweir                 mpView->UnmarkAllGluePoints();
167*cdf0e10cSrcweir 
168*cdf0e10cSrcweir             mpView->BegMarkGluePoints(aMDPos);
169*cdf0e10cSrcweir         }
170*cdf0e10cSrcweir         else if (eHit == SDRHIT_MARKEDOBJECT && !rMEvt.IsShift() && !rMEvt.IsMod2())
171*cdf0e10cSrcweir         {
172*cdf0e10cSrcweir             /******************************************************************
173*cdf0e10cSrcweir             * Objekt verschieben
174*cdf0e10cSrcweir             ******************************************************************/
175*cdf0e10cSrcweir             mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, NULL, nDrgLog);
176*cdf0e10cSrcweir         }
177*cdf0e10cSrcweir         else if (eHit == SDRHIT_GLUEPOINT)
178*cdf0e10cSrcweir         {
179*cdf0e10cSrcweir             /******************************************************************
180*cdf0e10cSrcweir             * Klebepunkt selektieren
181*cdf0e10cSrcweir             ******************************************************************/
182*cdf0e10cSrcweir             if (!rMEvt.IsShift())
183*cdf0e10cSrcweir                 mpView->UnmarkAllGluePoints();
184*cdf0e10cSrcweir 
185*cdf0e10cSrcweir             mpView->MarkGluePoint(aVEvt.pObj, aVEvt.nGlueId, aVEvt.pPV);
186*cdf0e10cSrcweir             SdrHdl* pHdl = mpView->GetGluePointHdl(aVEvt.pObj, aVEvt.nGlueId);
187*cdf0e10cSrcweir 
188*cdf0e10cSrcweir             if (pHdl)
189*cdf0e10cSrcweir             {
190*cdf0e10cSrcweir                 mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, pHdl, nDrgLog);
191*cdf0e10cSrcweir             }
192*cdf0e10cSrcweir         }
193*cdf0e10cSrcweir         else
194*cdf0e10cSrcweir         {
195*cdf0e10cSrcweir             /******************************************************************
196*cdf0e10cSrcweir             * Objekt selektieren oder draggen
197*cdf0e10cSrcweir             ******************************************************************/
198*cdf0e10cSrcweir             if (!rMEvt.IsShift() && !rMEvt.IsMod2() && eHit == SDRHIT_UNMARKEDOBJECT)
199*cdf0e10cSrcweir             {
200*cdf0e10cSrcweir                mpView->UnmarkAllObj();
201*cdf0e10cSrcweir             }
202*cdf0e10cSrcweir 
203*cdf0e10cSrcweir             sal_Bool bMarked = sal_False;
204*cdf0e10cSrcweir 
205*cdf0e10cSrcweir             if (!rMEvt.IsMod1())
206*cdf0e10cSrcweir             {
207*cdf0e10cSrcweir                 if (rMEvt.IsMod2())
208*cdf0e10cSrcweir                 {
209*cdf0e10cSrcweir                     bMarked = mpView->MarkNextObj(aMDPos, nHitLog, rMEvt.IsShift());
210*cdf0e10cSrcweir                 }
211*cdf0e10cSrcweir                 else
212*cdf0e10cSrcweir                 {
213*cdf0e10cSrcweir                     bMarked = mpView->MarkObj(aMDPos, nHitLog, rMEvt.IsShift());
214*cdf0e10cSrcweir                 }
215*cdf0e10cSrcweir             }
216*cdf0e10cSrcweir 
217*cdf0e10cSrcweir             if (bMarked &&
218*cdf0e10cSrcweir                 (!rMEvt.IsShift() || eHit == SDRHIT_MARKEDOBJECT))
219*cdf0e10cSrcweir             {
220*cdf0e10cSrcweir                 // Objekt verschieben
221*cdf0e10cSrcweir                 mpView->BegDragObj(aMDPos, (OutputDevice*) NULL, aVEvt.pHdl, nDrgLog);
222*cdf0e10cSrcweir             }
223*cdf0e10cSrcweir             else if (mpView->AreObjectsMarked())
224*cdf0e10cSrcweir             {
225*cdf0e10cSrcweir                 /**************************************************************
226*cdf0e10cSrcweir                 * Klebepunkt selektieren
227*cdf0e10cSrcweir                 **************************************************************/
228*cdf0e10cSrcweir                 if (!rMEvt.IsShift())
229*cdf0e10cSrcweir                     mpView->UnmarkAllGluePoints();
230*cdf0e10cSrcweir 
231*cdf0e10cSrcweir                 mpView->BegMarkGluePoints(aMDPos);
232*cdf0e10cSrcweir             }
233*cdf0e10cSrcweir             else
234*cdf0e10cSrcweir             {
235*cdf0e10cSrcweir                 /**************************************************************
236*cdf0e10cSrcweir                 * Objekt selektieren
237*cdf0e10cSrcweir                 **************************************************************/
238*cdf0e10cSrcweir                 mpView->BegMarkObj(aMDPos);
239*cdf0e10cSrcweir             }
240*cdf0e10cSrcweir         }
241*cdf0e10cSrcweir 
242*cdf0e10cSrcweir         ForcePointer(&rMEvt);
243*cdf0e10cSrcweir     }
244*cdf0e10cSrcweir 
245*cdf0e10cSrcweir     return bReturn;
246*cdf0e10cSrcweir }
247*cdf0e10cSrcweir 
248*cdf0e10cSrcweir /*************************************************************************
249*cdf0e10cSrcweir |*
250*cdf0e10cSrcweir |* MouseMove-event
251*cdf0e10cSrcweir |*
252*cdf0e10cSrcweir \************************************************************************/
253*cdf0e10cSrcweir 
254*cdf0e10cSrcweir sal_Bool FuEditGluePoints::MouseMove(const MouseEvent& rMEvt)
255*cdf0e10cSrcweir {
256*cdf0e10cSrcweir     mpView->SetActualWin( mpWindow );
257*cdf0e10cSrcweir 
258*cdf0e10cSrcweir     FuDraw::MouseMove(rMEvt);
259*cdf0e10cSrcweir 
260*cdf0e10cSrcweir     if (mpView->IsAction())
261*cdf0e10cSrcweir     {
262*cdf0e10cSrcweir         Point aPix(rMEvt.GetPosPixel());
263*cdf0e10cSrcweir         Point aPnt( mpWindow->PixelToLogic(aPix) );
264*cdf0e10cSrcweir         ForceScroll(aPix);
265*cdf0e10cSrcweir         mpView->MovAction(aPnt);
266*cdf0e10cSrcweir     }
267*cdf0e10cSrcweir 
268*cdf0e10cSrcweir     ForcePointer(&rMEvt);
269*cdf0e10cSrcweir 
270*cdf0e10cSrcweir     return sal_True;
271*cdf0e10cSrcweir }
272*cdf0e10cSrcweir 
273*cdf0e10cSrcweir /*************************************************************************
274*cdf0e10cSrcweir |*
275*cdf0e10cSrcweir |* MouseButtonUp-event
276*cdf0e10cSrcweir |*
277*cdf0e10cSrcweir \************************************************************************/
278*cdf0e10cSrcweir 
279*cdf0e10cSrcweir sal_Bool FuEditGluePoints::MouseButtonUp(const MouseEvent& rMEvt)
280*cdf0e10cSrcweir {
281*cdf0e10cSrcweir     mpView->SetActualWin( mpWindow );
282*cdf0e10cSrcweir 
283*cdf0e10cSrcweir     sal_Bool bReturn = sal_False;
284*cdf0e10cSrcweir 
285*cdf0e10cSrcweir     if (mpView->IsAction())
286*cdf0e10cSrcweir     {
287*cdf0e10cSrcweir         bReturn = sal_True;
288*cdf0e10cSrcweir         mpView->EndAction();
289*cdf0e10cSrcweir     }
290*cdf0e10cSrcweir 
291*cdf0e10cSrcweir     FuDraw::MouseButtonUp(rMEvt);
292*cdf0e10cSrcweir 
293*cdf0e10cSrcweir     sal_uInt16 nDrgLog = sal_uInt16 ( mpWindow->PixelToLogic(Size(DRGPIX,0)).Width() );
294*cdf0e10cSrcweir     Point aPos = mpWindow->PixelToLogic( rMEvt.GetPosPixel() );
295*cdf0e10cSrcweir 
296*cdf0e10cSrcweir     if (Abs(aMDPos.X() - aPos.X()) < nDrgLog &&
297*cdf0e10cSrcweir         Abs(aMDPos.Y() - aPos.Y()) < nDrgLog &&
298*cdf0e10cSrcweir         !rMEvt.IsShift() && !rMEvt.IsMod2())
299*cdf0e10cSrcweir     {
300*cdf0e10cSrcweir         SdrViewEvent aVEvt;
301*cdf0e10cSrcweir         SdrHitKind eHit = mpView->PickAnything(rMEvt, SDRMOUSEBUTTONDOWN, aVEvt);
302*cdf0e10cSrcweir 
303*cdf0e10cSrcweir         if (eHit == SDRHIT_NONE)
304*cdf0e10cSrcweir         {
305*cdf0e10cSrcweir             // Klick auf der Stelle: deselektieren
306*cdf0e10cSrcweir             mpView->UnmarkAllObj();
307*cdf0e10cSrcweir         }
308*cdf0e10cSrcweir     }
309*cdf0e10cSrcweir 
310*cdf0e10cSrcweir     mpWindow->ReleaseMouse();
311*cdf0e10cSrcweir 
312*cdf0e10cSrcweir     return bReturn;
313*cdf0e10cSrcweir }
314*cdf0e10cSrcweir 
315*cdf0e10cSrcweir /*************************************************************************
316*cdf0e10cSrcweir |*
317*cdf0e10cSrcweir |* Tastaturereignisse bearbeiten
318*cdf0e10cSrcweir |*
319*cdf0e10cSrcweir |* Wird ein KeyEvent bearbeitet, so ist der Return-Wert sal_True, andernfalls
320*cdf0e10cSrcweir |* sal_False.
321*cdf0e10cSrcweir |*
322*cdf0e10cSrcweir \************************************************************************/
323*cdf0e10cSrcweir 
324*cdf0e10cSrcweir sal_Bool FuEditGluePoints::KeyInput(const KeyEvent& rKEvt)
325*cdf0e10cSrcweir {
326*cdf0e10cSrcweir     mpView->SetActualWin( mpWindow );
327*cdf0e10cSrcweir 
328*cdf0e10cSrcweir     sal_Bool bReturn = FuDraw::KeyInput(rKEvt);
329*cdf0e10cSrcweir 
330*cdf0e10cSrcweir     return bReturn;
331*cdf0e10cSrcweir }
332*cdf0e10cSrcweir 
333*cdf0e10cSrcweir /*************************************************************************
334*cdf0e10cSrcweir |*
335*cdf0e10cSrcweir |* Command-event
336*cdf0e10cSrcweir |*
337*cdf0e10cSrcweir \************************************************************************/
338*cdf0e10cSrcweir 
339*cdf0e10cSrcweir sal_Bool FuEditGluePoints::Command(const CommandEvent& rCEvt)
340*cdf0e10cSrcweir {
341*cdf0e10cSrcweir     mpView->SetActualWin( mpWindow );
342*cdf0e10cSrcweir     return FuPoor::Command( rCEvt );
343*cdf0e10cSrcweir }
344*cdf0e10cSrcweir 
345*cdf0e10cSrcweir /*************************************************************************
346*cdf0e10cSrcweir |*
347*cdf0e10cSrcweir |* Funktion aktivieren
348*cdf0e10cSrcweir |*
349*cdf0e10cSrcweir \************************************************************************/
350*cdf0e10cSrcweir 
351*cdf0e10cSrcweir void FuEditGluePoints::Activate()
352*cdf0e10cSrcweir {
353*cdf0e10cSrcweir     mpView->SetGluePointEditMode();
354*cdf0e10cSrcweir     FuDraw::Activate();
355*cdf0e10cSrcweir }
356*cdf0e10cSrcweir 
357*cdf0e10cSrcweir /*************************************************************************
358*cdf0e10cSrcweir |*
359*cdf0e10cSrcweir |* Funktion deaktivieren
360*cdf0e10cSrcweir |*
361*cdf0e10cSrcweir \************************************************************************/
362*cdf0e10cSrcweir 
363*cdf0e10cSrcweir void FuEditGluePoints::Deactivate()
364*cdf0e10cSrcweir {
365*cdf0e10cSrcweir     mpView->SetGluePointEditMode( sal_False );
366*cdf0e10cSrcweir     FuDraw::Deactivate();
367*cdf0e10cSrcweir }
368*cdf0e10cSrcweir 
369*cdf0e10cSrcweir /*************************************************************************
370*cdf0e10cSrcweir |*
371*cdf0e10cSrcweir |* Request verarbeiten
372*cdf0e10cSrcweir |*
373*cdf0e10cSrcweir \************************************************************************/
374*cdf0e10cSrcweir 
375*cdf0e10cSrcweir void FuEditGluePoints::ReceiveRequest(SfxRequest& rReq)
376*cdf0e10cSrcweir {
377*cdf0e10cSrcweir     switch (rReq.GetSlot())
378*cdf0e10cSrcweir     {
379*cdf0e10cSrcweir         case SID_GLUE_INSERT_POINT:
380*cdf0e10cSrcweir         {
381*cdf0e10cSrcweir             mpView->SetInsGluePointMode(!mpView->IsInsGluePointMode());
382*cdf0e10cSrcweir         }
383*cdf0e10cSrcweir         break;
384*cdf0e10cSrcweir 
385*cdf0e10cSrcweir         case SID_GLUE_ESCDIR_LEFT:
386*cdf0e10cSrcweir         {
387*cdf0e10cSrcweir             mpView->SetMarkedGluePointsEscDir( SDRESC_LEFT,
388*cdf0e10cSrcweir                     !mpView->IsMarkedGluePointsEscDir( SDRESC_LEFT ) );
389*cdf0e10cSrcweir         }
390*cdf0e10cSrcweir         break;
391*cdf0e10cSrcweir 
392*cdf0e10cSrcweir         case SID_GLUE_ESCDIR_RIGHT:
393*cdf0e10cSrcweir         {
394*cdf0e10cSrcweir             mpView->SetMarkedGluePointsEscDir( SDRESC_RIGHT,
395*cdf0e10cSrcweir                     !mpView->IsMarkedGluePointsEscDir( SDRESC_RIGHT ) );
396*cdf0e10cSrcweir         }
397*cdf0e10cSrcweir         break;
398*cdf0e10cSrcweir 
399*cdf0e10cSrcweir         case SID_GLUE_ESCDIR_TOP:
400*cdf0e10cSrcweir         {
401*cdf0e10cSrcweir             mpView->SetMarkedGluePointsEscDir( SDRESC_TOP,
402*cdf0e10cSrcweir                     !mpView->IsMarkedGluePointsEscDir( SDRESC_TOP ) );
403*cdf0e10cSrcweir         }
404*cdf0e10cSrcweir         break;
405*cdf0e10cSrcweir 
406*cdf0e10cSrcweir         case SID_GLUE_ESCDIR_BOTTOM:
407*cdf0e10cSrcweir         {
408*cdf0e10cSrcweir             mpView->SetMarkedGluePointsEscDir( SDRESC_BOTTOM,
409*cdf0e10cSrcweir                     !mpView->IsMarkedGluePointsEscDir( SDRESC_BOTTOM ) );
410*cdf0e10cSrcweir         }
411*cdf0e10cSrcweir         break;
412*cdf0e10cSrcweir 
413*cdf0e10cSrcweir         case SID_GLUE_PERCENT:
414*cdf0e10cSrcweir         {
415*cdf0e10cSrcweir             const SfxItemSet* pSet = rReq.GetArgs();
416*cdf0e10cSrcweir             const SfxPoolItem& rItem = pSet->Get(SID_GLUE_PERCENT);
417*cdf0e10cSrcweir             sal_Bool bPercent = ((const SfxBoolItem&) rItem).GetValue();
418*cdf0e10cSrcweir             mpView->SetMarkedGluePointsPercent(bPercent);
419*cdf0e10cSrcweir         }
420*cdf0e10cSrcweir         break;
421*cdf0e10cSrcweir 
422*cdf0e10cSrcweir         case SID_GLUE_HORZALIGN_CENTER:
423*cdf0e10cSrcweir         {
424*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_CENTER);
425*cdf0e10cSrcweir         }
426*cdf0e10cSrcweir         break;
427*cdf0e10cSrcweir 
428*cdf0e10cSrcweir         case SID_GLUE_HORZALIGN_LEFT:
429*cdf0e10cSrcweir         {
430*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_LEFT);
431*cdf0e10cSrcweir         }
432*cdf0e10cSrcweir         break;
433*cdf0e10cSrcweir 
434*cdf0e10cSrcweir         case SID_GLUE_HORZALIGN_RIGHT:
435*cdf0e10cSrcweir         {
436*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_False, SDRHORZALIGN_RIGHT);
437*cdf0e10cSrcweir         }
438*cdf0e10cSrcweir         break;
439*cdf0e10cSrcweir 
440*cdf0e10cSrcweir         case SID_GLUE_VERTALIGN_CENTER:
441*cdf0e10cSrcweir         {
442*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_CENTER);
443*cdf0e10cSrcweir         }
444*cdf0e10cSrcweir         break;
445*cdf0e10cSrcweir 
446*cdf0e10cSrcweir         case SID_GLUE_VERTALIGN_TOP:
447*cdf0e10cSrcweir         {
448*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_TOP);
449*cdf0e10cSrcweir         }
450*cdf0e10cSrcweir         break;
451*cdf0e10cSrcweir 
452*cdf0e10cSrcweir         case SID_GLUE_VERTALIGN_BOTTOM:
453*cdf0e10cSrcweir         {
454*cdf0e10cSrcweir             mpView->SetMarkedGluePointsAlign(sal_True, SDRVERTALIGN_BOTTOM);
455*cdf0e10cSrcweir         }
456*cdf0e10cSrcweir         break;
457*cdf0e10cSrcweir     }
458*cdf0e10cSrcweir 
459*cdf0e10cSrcweir     // Zum Schluss Basisklasse rufen
460*cdf0e10cSrcweir     FuPoor::ReceiveRequest(rReq);
461*cdf0e10cSrcweir }
462*cdf0e10cSrcweir 
463*cdf0e10cSrcweir 
464*cdf0e10cSrcweir } // end of namespace sd
465