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