xref: /aoo41x/main/sd/source/ui/view/frmview.cxx (revision 79aad27f)
1*5b190011SAndrew Rist /**************************************************************
2cdf0e10cSrcweir  *
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
12*5b190011SAndrew Rist  *
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 "FrameView.hxx"
28cdf0e10cSrcweir 
29cdf0e10cSrcweir #ifndef _SVXIDS_HRC
30cdf0e10cSrcweir #include <svx/svxids.hrc>
31cdf0e10cSrcweir #endif
32cdf0e10cSrcweir #include <com/sun/star/awt/Rectangle.hpp>
33cdf0e10cSrcweir #include <com/sun/star/drawing/framework/ResourceId.hpp>
34cdf0e10cSrcweir #include <rtl/ustrbuf.hxx>
35cdf0e10cSrcweir #include "unokywds.hxx"
36cdf0e10cSrcweir 
37cdf0e10cSrcweir #include <vector>
38cdf0e10cSrcweir #include "ViewShell.hxx"
39cdf0e10cSrcweir #include "drawdoc.hxx"
40cdf0e10cSrcweir #include "DrawDocShell.hxx"
41cdf0e10cSrcweir #include "optsitem.hxx"
42cdf0e10cSrcweir #include "ViewShellBase.hxx"
43cdf0e10cSrcweir #include "DrawViewShell.hxx"
44cdf0e10cSrcweir #include "OutlineViewShell.hxx"
45cdf0e10cSrcweir #include "app.hxx"
46cdf0e10cSrcweir #include "sdresid.hxx"
47cdf0e10cSrcweir #include "pres.hxx"
48cdf0e10cSrcweir #include "glob.hrc"
49cdf0e10cSrcweir #include "sdiocmpt.hxx"
50cdf0e10cSrcweir #include "framework/FrameworkHelper.hxx"
51cdf0e10cSrcweir #include <comphelper/processfactory.hxx>
52cdf0e10cSrcweir #include <sfx2/viewfrm.hxx>
53cdf0e10cSrcweir 
54cdf0e10cSrcweir using namespace ::com::sun::star;
55cdf0e10cSrcweir using namespace ::com::sun::star::uno;
56cdf0e10cSrcweir using namespace ::com::sun::star::beans;
57cdf0e10cSrcweir using namespace ::std;
58cdf0e10cSrcweir using ::rtl::OUString;
59cdf0e10cSrcweir 
60cdf0e10cSrcweir namespace sd {
61cdf0e10cSrcweir 
62cdf0e10cSrcweir /*************************************************************************
63cdf0e10cSrcweir |*
64cdf0e10cSrcweir |* Ctor
65cdf0e10cSrcweir |*
66cdf0e10cSrcweir \************************************************************************/
67cdf0e10cSrcweir 
FrameView(SdDrawDocument * pDrawDoc,FrameView * pFrameView)68cdf0e10cSrcweir FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULK */)
69cdf0e10cSrcweir   : SdrView(pDrawDoc, (OutputDevice*) NULL),
70cdf0e10cSrcweir     mnRefCount(0),
71cdf0e10cSrcweir     mnPresViewShellId(SID_VIEWSHELL0),
72cdf0e10cSrcweir     mnSlotId(SID_OBJECT_SELECT),
73cdf0e10cSrcweir     mbIsNavigatorShowingAllShapes(false)
74cdf0e10cSrcweir {
75cdf0e10cSrcweir 	EndListening(*pDrawDoc);
76cdf0e10cSrcweir 
77cdf0e10cSrcweir 	EnableExtendedKeyInputDispatcher(sal_False);
78cdf0e10cSrcweir 	EnableExtendedMouseEventDispatcher(sal_False);
79cdf0e10cSrcweir 	EnableExtendedCommandEventDispatcher(sal_False);
80cdf0e10cSrcweir 
81cdf0e10cSrcweir 	SetGridFront( sal_False );
82cdf0e10cSrcweir 	SetHlplFront( sal_False );
83cdf0e10cSrcweir 	SetOConSnap( sal_False );
84cdf0e10cSrcweir 	SetFrameDragSingles( sal_True );
85cdf0e10cSrcweir 	SetSlidesPerRow(4);
86cdf0e10cSrcweir 
87cdf0e10cSrcweir 	if( NULL == pFrameView )
88cdf0e10cSrcweir 	{
89cdf0e10cSrcweir 		DrawDocShell* pDocShell = pDrawDoc->GetDocSh();
90cdf0e10cSrcweir 
91cdf0e10cSrcweir 		if ( pDocShell )
92cdf0e10cSrcweir 		{
93cdf0e10cSrcweir 			/**********************************************************************
94cdf0e10cSrcweir 			* Das Dokument wurde geladen, ist eine FrameView vorhanden?
95cdf0e10cSrcweir 			**********************************************************************/
96cdf0e10cSrcweir 			sal_uLong nSdViewShellCount = 0;
97cdf0e10cSrcweir 			ViewShellBase* pBase = NULL;
98cdf0e10cSrcweir 			SfxViewShell* pSfxViewSh = NULL;
99cdf0e10cSrcweir 			SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell);
100cdf0e10cSrcweir 
101cdf0e10cSrcweir 			while (pSfxViewFrame)
102cdf0e10cSrcweir 			{
103cdf0e10cSrcweir 				// Count the FrameViews and remember the type of the main
104cdf0e10cSrcweir 				// view shell.
105cdf0e10cSrcweir 				pSfxViewSh = pSfxViewFrame->GetViewShell();
106cdf0e10cSrcweir 				pBase = PTR_CAST(ViewShellBase, pSfxViewSh );
107cdf0e10cSrcweir 
108cdf0e10cSrcweir 				if (pBase != NULL)
109cdf0e10cSrcweir 				{
110cdf0e10cSrcweir 					nSdViewShellCount++;
111cdf0e10cSrcweir 
112cdf0e10cSrcweir                     ::rtl::OUString sViewURL;
113cdf0e10cSrcweir                     Reference<drawing::framework::XView> xView (
114cdf0e10cSrcweir                         framework::FrameworkHelper::Instance(*pBase)->GetView(
115cdf0e10cSrcweir                             drawing::framework::ResourceId::create(
116cdf0e10cSrcweir                                 ::comphelper::getProcessComponentContext(),
117cdf0e10cSrcweir                                 framework::FrameworkHelper::msCenterPaneURL)));
118cdf0e10cSrcweir                     if (xView.is())
119cdf0e10cSrcweir                         sViewURL = xView->getResourceId()->getResourceURL();
120cdf0e10cSrcweir 
121cdf0e10cSrcweir                     switch (framework::FrameworkHelper::GetViewId(sViewURL))
122cdf0e10cSrcweir                     {
123cdf0e10cSrcweir 						default:
124cdf0e10cSrcweir //                        case ViewShell::ST_IMPRESS:
125cdf0e10cSrcweir //	                      case ViewShell::ST_NOTES:
126cdf0e10cSrcweir //                        case ViewShell::ST_HANDOUT:
127cdf0e10cSrcweir                             mnPresViewShellId = SID_VIEWSHELL0;
128cdf0e10cSrcweir                             break;
129cdf0e10cSrcweir 
130cdf0e10cSrcweir                         case ViewShell::ST_SLIDE_SORTER:
131cdf0e10cSrcweir                             mnPresViewShellId = SID_VIEWSHELL1;
132cdf0e10cSrcweir                             break;
133cdf0e10cSrcweir 
134cdf0e10cSrcweir                         case ViewShell::ST_OUTLINE:
135cdf0e10cSrcweir                             mnPresViewShellId = SID_VIEWSHELL2;
136cdf0e10cSrcweir                             break;
137cdf0e10cSrcweir 					}
138cdf0e10cSrcweir 				}
139cdf0e10cSrcweir 
140cdf0e10cSrcweir 				pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell);
141cdf0e10cSrcweir 			}
142cdf0e10cSrcweir 
143cdf0e10cSrcweir 			SdDrawDocument* pDoc = pDocShell->GetDoc();
144cdf0e10cSrcweir 			pFrameView = pDoc->GetFrameView(nSdViewShellCount);
145cdf0e10cSrcweir 		}
146cdf0e10cSrcweir 	}
147cdf0e10cSrcweir 
148cdf0e10cSrcweir 	if (pFrameView)
149cdf0e10cSrcweir 	{
150cdf0e10cSrcweir 		/**********************************************************************
151cdf0e10cSrcweir 		* FrameView mit der FrameView der DocShell initialisieren
152cdf0e10cSrcweir 		**********************************************************************/
153cdf0e10cSrcweir 		SetRuler( pFrameView->HasRuler() );
154cdf0e10cSrcweir 		SetGridCoarse( pFrameView->GetGridCoarse() );
155cdf0e10cSrcweir 		SetGridFine( pFrameView->GetGridFine() );
156cdf0e10cSrcweir 		SetSnapGridWidth(pFrameView->GetSnapGridWidthX(), pFrameView->GetSnapGridWidthY());
157cdf0e10cSrcweir 		SetGridVisible( pFrameView->IsGridVisible() );
158cdf0e10cSrcweir 		SetGridFront( pFrameView->IsGridFront() );
159cdf0e10cSrcweir 		SetSnapAngle( pFrameView->GetSnapAngle() );
160cdf0e10cSrcweir 		SetGridSnap( pFrameView->IsGridSnap() );
161cdf0e10cSrcweir 		SetBordSnap( pFrameView->IsBordSnap() );
162cdf0e10cSrcweir 		SetHlplSnap( pFrameView->IsHlplSnap() );
163cdf0e10cSrcweir 		SetOFrmSnap( pFrameView->IsOFrmSnap() );
164cdf0e10cSrcweir 		SetOPntSnap( pFrameView->IsOPntSnap() );
165cdf0e10cSrcweir 		SetOConSnap( pFrameView->IsOConSnap() );
166cdf0e10cSrcweir 		SetHlplVisible( pFrameView->IsHlplVisible() );
167cdf0e10cSrcweir 		SetDragStripes( pFrameView->IsDragStripes() );
168cdf0e10cSrcweir 		SetPlusHandlesAlwaysVisible( pFrameView->IsPlusHandlesAlwaysVisible() );
169cdf0e10cSrcweir 		SetFrameDragSingles( pFrameView->IsFrameDragSingles() );
170cdf0e10cSrcweir 		SetSnapMagneticPixel( pFrameView->GetSnapMagneticPixel() );
171cdf0e10cSrcweir 		SetMarkedHitMovesAlways( pFrameView->IsMarkedHitMovesAlways() );
172cdf0e10cSrcweir 		SetMoveOnlyDragging( pFrameView->IsMoveOnlyDragging() );
173cdf0e10cSrcweir 		SetCrookNoContortion( pFrameView->IsCrookNoContortion() );
174cdf0e10cSrcweir 		SetSlantButShear( pFrameView->IsSlantButShear() );
175cdf0e10cSrcweir 		SetNoDragXorPolys( pFrameView->IsNoDragXorPolys() );
176cdf0e10cSrcweir 		SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
177cdf0e10cSrcweir 		SetBigOrtho( pFrameView->IsBigOrtho() );
178cdf0e10cSrcweir 		SetOrtho( pFrameView->IsOrtho() );
179cdf0e10cSrcweir 		SetEliminatePolyPointLimitAngle( pFrameView->GetEliminatePolyPointLimitAngle() );
180cdf0e10cSrcweir 		SetEliminatePolyPoints( pFrameView->IsEliminatePolyPoints() );
181cdf0e10cSrcweir // #110094#-7
182cdf0e10cSrcweir //		SetMasterPagePaintCaching( pFrameView->IsMasterPagePaintCaching() );
183cdf0e10cSrcweir 		SetDesignMode( pFrameView->IsDesignMode() );
184cdf0e10cSrcweir 
185cdf0e10cSrcweir 		SetSolidMarkHdl( pFrameView->IsSolidMarkHdl() );
186cdf0e10cSrcweir 		SetSolidDragging( pFrameView->IsSolidDragging() );
187cdf0e10cSrcweir 
188cdf0e10cSrcweir 		maVisibleLayers = pFrameView->GetVisibleLayers();
189cdf0e10cSrcweir 		maPrintableLayers = pFrameView->GetPrintableLayers();
190cdf0e10cSrcweir 		maLockedLayers = pFrameView->GetLockedLayers();
191cdf0e10cSrcweir 		maStandardHelpLines = pFrameView->GetStandardHelpLines();
192cdf0e10cSrcweir 		maNotesHelpLines = pFrameView->GetNotesHelpLines();
193cdf0e10cSrcweir 		maHandoutHelpLines = pFrameView->GetHandoutHelpLines();
194cdf0e10cSrcweir 		SetActiveLayer( pFrameView->GetActiveLayer() );
195cdf0e10cSrcweir 		mbNoColors = pFrameView->IsNoColors();
196cdf0e10cSrcweir 		mbNoAttribs = pFrameView->IsNoAttribs() ;
197cdf0e10cSrcweir 		maVisArea = pFrameView->GetVisArea();
198cdf0e10cSrcweir 		mePageKind = pFrameView->GetPageKind();
199cdf0e10cSrcweir 		mePageKindOnLoad = pFrameView->GetPageKindOnLoad();
200cdf0e10cSrcweir 		mnSelectedPage = pFrameView->GetSelectedPage();
201cdf0e10cSrcweir 		mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad();
202cdf0e10cSrcweir 		meStandardEditMode = pFrameView->GetViewShEditMode(PK_STANDARD);
203cdf0e10cSrcweir 		meNotesEditMode = pFrameView->GetViewShEditMode(PK_NOTES);
204cdf0e10cSrcweir 		meHandoutEditMode = pFrameView->GetViewShEditMode(PK_HANDOUT);
205cdf0e10cSrcweir 		SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad());
206cdf0e10cSrcweir 		mbLayerMode = pFrameView->IsLayerMode();
207cdf0e10cSrcweir 		mbQuickEdit = pFrameView->IsQuickEdit();
208cdf0e10cSrcweir 
209cdf0e10cSrcweir 		// #i26631#
210cdf0e10cSrcweir 		SetMasterPagePaintCaching( pFrameView->IsMasterPagePaintCaching() );
211cdf0e10cSrcweir 
212cdf0e10cSrcweir 		SetDragWithCopy( pFrameView->IsDragWithCopy() );
213cdf0e10cSrcweir 		mbBigHandles 		 = pFrameView->IsBigHandles();
214cdf0e10cSrcweir 		mbDoubleClickTextEdit = pFrameView->IsDoubleClickTextEdit();
215cdf0e10cSrcweir 		mbClickChangeRotation = pFrameView->IsClickChangeRotation();
216cdf0e10cSrcweir 		mnSlidesPerRow = pFrameView->GetSlidesPerRow();
217cdf0e10cSrcweir 		mnDrawMode = pFrameView->GetDrawMode();
218cdf0e10cSrcweir 		mnTabCtrlPercent = pFrameView->GetTabCtrlPercent();
219cdf0e10cSrcweir         mbIsNavigatorShowingAllShapes = pFrameView->IsNavigatorShowingAllShapes();
220cdf0e10cSrcweir         SetPreviousViewShellType (pFrameView->GetPreviousViewShellType());
221cdf0e10cSrcweir         SetViewShellTypeOnLoad (pFrameView->GetViewShellTypeOnLoad());
222cdf0e10cSrcweir 	}
223cdf0e10cSrcweir 	else
224cdf0e10cSrcweir 	{
225cdf0e10cSrcweir 		/**********************************************************************
226cdf0e10cSrcweir 		* FrameView mit den Applikationsdaten initialisieren
227cdf0e10cSrcweir 		**********************************************************************/
228cdf0e10cSrcweir 		maVisibleLayers.SetAll();
229cdf0e10cSrcweir 		maPrintableLayers.SetAll();
230cdf0e10cSrcweir 		SetGridCoarse( Size( 1000, 1000 ) );
231cdf0e10cSrcweir 		SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1));
232cdf0e10cSrcweir 		SetActiveLayer( String( SdResId(STR_LAYER_LAYOUT) ) );
233cdf0e10cSrcweir 		mbNoColors = sal_True;
234cdf0e10cSrcweir 		mbNoAttribs = sal_False;
235cdf0e10cSrcweir 		maVisArea = Rectangle( Point(), Size(0, 0) );
236cdf0e10cSrcweir 		mePageKind = PK_STANDARD;
237cdf0e10cSrcweir 		mePageKindOnLoad = PK_STANDARD;
238cdf0e10cSrcweir 		mnSelectedPage = 0;
239cdf0e10cSrcweir 		mnSelectedPageOnLoad = 0;
240cdf0e10cSrcweir 		meStandardEditMode = EM_PAGE;
241cdf0e10cSrcweir 		meNotesEditMode = EM_PAGE;
242cdf0e10cSrcweir 		meHandoutEditMode = EM_MASTERPAGE;
243cdf0e10cSrcweir         SetViewShEditModeOnLoad(EM_PAGE);
244cdf0e10cSrcweir 		mbLayerMode = sal_False;
245cdf0e10cSrcweir 		SetEliminatePolyPoints(sal_False);
246cdf0e10cSrcweir 		mbBigHandles = sal_False;
247cdf0e10cSrcweir 		mbDoubleClickTextEdit = sal_False;
248cdf0e10cSrcweir 		mbClickChangeRotation = sal_False;
249cdf0e10cSrcweir 		mnSlidesPerRow = 4;
250cdf0e10cSrcweir 
251cdf0e10cSrcweir 		{
252cdf0e10cSrcweir 			bool bUseContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
253cdf0e10cSrcweir 			mnDrawMode = bUseContrast ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR;
254cdf0e10cSrcweir 		}
255cdf0e10cSrcweir 		mnTabCtrlPercent = 0.0;
256cdf0e10cSrcweir         mbIsNavigatorShowingAllShapes = false;
257cdf0e10cSrcweir         SetPreviousViewShellType (ViewShell::ST_NONE);
258cdf0e10cSrcweir         SetViewShellTypeOnLoad (ViewShell::ST_IMPRESS);
259cdf0e10cSrcweir 
260cdf0e10cSrcweir 		// get default for design mode
261cdf0e10cSrcweir 		sal_Bool bInitDesignMode = pDrawDoc->GetOpenInDesignMode();
262cdf0e10cSrcweir 		if( pDrawDoc->OpenInDesignModeIsDefaulted() )
263cdf0e10cSrcweir 		{
264cdf0e10cSrcweir 			bInitDesignMode = sal_True;
265cdf0e10cSrcweir 		}
266cdf0e10cSrcweir 
267cdf0e10cSrcweir 		SfxObjectShell* pObjShell = pDrawDoc->GetObjectShell();
268cdf0e10cSrcweir 		if( pObjShell && pObjShell->IsReadOnly() )
269cdf0e10cSrcweir 			bInitDesignMode = sal_False;
270cdf0e10cSrcweir 		SetDesignMode( bInitDesignMode );
271cdf0e10cSrcweir 
272cdf0e10cSrcweir 		Update( SD_MOD()->GetSdOptions(pDrawDoc->GetDocumentType()) );
273cdf0e10cSrcweir 	}
274cdf0e10cSrcweir 
275cdf0e10cSrcweir }
276cdf0e10cSrcweir 
277cdf0e10cSrcweir /*************************************************************************
278cdf0e10cSrcweir |*
279cdf0e10cSrcweir |* Dtor
280cdf0e10cSrcweir |*
281cdf0e10cSrcweir \************************************************************************/
282cdf0e10cSrcweir 
~FrameView()283cdf0e10cSrcweir FrameView::~FrameView()
284cdf0e10cSrcweir {
285cdf0e10cSrcweir }
286cdf0e10cSrcweir 
287cdf0e10cSrcweir 
288cdf0e10cSrcweir /*************************************************************************
289cdf0e10cSrcweir |*
290cdf0e10cSrcweir |* Verbindung herstellen
291cdf0e10cSrcweir |*
292cdf0e10cSrcweir \************************************************************************/
293cdf0e10cSrcweir 
Connect()294cdf0e10cSrcweir void FrameView::Connect()
295cdf0e10cSrcweir {
296cdf0e10cSrcweir 	mnRefCount++;
297cdf0e10cSrcweir }
298cdf0e10cSrcweir 
299cdf0e10cSrcweir 
300cdf0e10cSrcweir /*************************************************************************
301cdf0e10cSrcweir |*
302cdf0e10cSrcweir |* Verbindung loesen
303cdf0e10cSrcweir |*
304cdf0e10cSrcweir \************************************************************************/
305cdf0e10cSrcweir 
Disconnect()306cdf0e10cSrcweir void FrameView::Disconnect()
307cdf0e10cSrcweir {
308cdf0e10cSrcweir 	if (mnRefCount > 0)
309cdf0e10cSrcweir 	{
310cdf0e10cSrcweir 		mnRefCount--;
311cdf0e10cSrcweir 	}
312cdf0e10cSrcweir 
313cdf0e10cSrcweir 	if (mnRefCount == 0)
314cdf0e10cSrcweir 	{
315cdf0e10cSrcweir 		delete this;
316cdf0e10cSrcweir 	}
317cdf0e10cSrcweir }
318cdf0e10cSrcweir 
319cdf0e10cSrcweir /*************************************************************************
320cdf0e10cSrcweir |*
321cdf0e10cSrcweir |* Update mit Daten der SdOptions
322cdf0e10cSrcweir |*
323cdf0e10cSrcweir \************************************************************************/
324cdf0e10cSrcweir 
Update(SdOptions * pOptions)325cdf0e10cSrcweir void FrameView::Update(SdOptions* pOptions)
326cdf0e10cSrcweir {
327cdf0e10cSrcweir 	if (pOptions)
328cdf0e10cSrcweir 	{
329cdf0e10cSrcweir 		mbRuler = pOptions->IsRulerVisible();
330cdf0e10cSrcweir 		SetGridVisible( pOptions->IsGridVisible() );
331cdf0e10cSrcweir 		SetSnapAngle( pOptions->GetAngle() );
332cdf0e10cSrcweir 		SetGridSnap( pOptions->IsUseGridSnap() );
333cdf0e10cSrcweir 		SetBordSnap( pOptions->IsSnapBorder()  );
334cdf0e10cSrcweir 		SetHlplSnap( pOptions->IsSnapHelplines() );
335cdf0e10cSrcweir 		SetOFrmSnap( pOptions->IsSnapFrame() );
336cdf0e10cSrcweir 		SetOPntSnap( pOptions->IsSnapPoints() );
337cdf0e10cSrcweir 		SetHlplVisible( pOptions->IsHelplines() );
338cdf0e10cSrcweir 		SetDragStripes( pOptions->IsDragStripes() );
339cdf0e10cSrcweir 		SetPlusHandlesAlwaysVisible( pOptions->IsHandlesBezier() );
340cdf0e10cSrcweir 		SetSnapMagneticPixel( pOptions->GetSnapArea() );
341cdf0e10cSrcweir 		SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
342cdf0e10cSrcweir 		SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );
343cdf0e10cSrcweir 		SetSlantButShear( pOptions->IsMoveOnlyDragging() );
344cdf0e10cSrcweir 		SetNoDragXorPolys ( !pOptions->IsMoveOutline() );
345cdf0e10cSrcweir 		SetCrookNoContortion( pOptions->IsCrookNoContortion() );
346cdf0e10cSrcweir 		SetAngleSnapEnabled( pOptions->IsRotate() );
347cdf0e10cSrcweir 		SetBigOrtho( pOptions->IsBigOrtho() );
348cdf0e10cSrcweir 		SetOrtho( pOptions->IsOrtho() );
349cdf0e10cSrcweir 		SetEliminatePolyPointLimitAngle( pOptions->GetEliminatePolyPointLimitAngle() );
350cdf0e10cSrcweir // #110094#-7
351cdf0e10cSrcweir //		SetMasterPagePaintCaching( pOptions->IsMasterPagePaintCaching() );
352cdf0e10cSrcweir 		GetModel()->SetPickThroughTransparentTextFrames( pOptions->IsPickThrough() );
353cdf0e10cSrcweir 
354cdf0e10cSrcweir 		SetSolidMarkHdl( pOptions->IsSolidMarkHdl() );
355cdf0e10cSrcweir 		SetSolidDragging( pOptions->IsSolidDragging() );
356cdf0e10cSrcweir 
357cdf0e10cSrcweir 		SetGridCoarse( Size( pOptions->GetFldDrawX(), pOptions->GetFldDrawY() ) );
358cdf0e10cSrcweir 		SetGridFine( Size( pOptions->GetFldDivisionX(), pOptions->GetFldDivisionY() ) );
359cdf0e10cSrcweir 		Fraction aFractX(pOptions->GetFldDrawX(), pOptions->GetFldDrawX() / ( pOptions->GetFldDivisionX() ? pOptions->GetFldDivisionX() : 1 ));
360cdf0e10cSrcweir 		Fraction aFractY(pOptions->GetFldDrawY(), pOptions->GetFldDrawY() / ( pOptions->GetFldDivisionY() ? pOptions->GetFldDivisionY() : 1 ));
361cdf0e10cSrcweir 		SetSnapGridWidth(aFractX, aFractY);
362cdf0e10cSrcweir 		SetQuickEdit(pOptions->IsQuickEdit());
363cdf0e10cSrcweir 
364cdf0e10cSrcweir 		// #i26631#
365cdf0e10cSrcweir 		SetMasterPagePaintCaching( pOptions->IsMasterPagePaintCaching() );
366cdf0e10cSrcweir 
367cdf0e10cSrcweir 		SetDragWithCopy(pOptions->IsDragWithCopy());
368cdf0e10cSrcweir 		SetBigHandles( pOptions->IsBigHandles() );
369cdf0e10cSrcweir 		SetDoubleClickTextEdit( pOptions->IsDoubleClickTextEdit() );
370cdf0e10cSrcweir 		SetClickChangeRotation( pOptions->IsClickChangeRotation() );
371cdf0e10cSrcweir 	}
372cdf0e10cSrcweir }
373cdf0e10cSrcweir 
374cdf0e10cSrcweir 
375cdf0e10cSrcweir /*************************************************************************
376cdf0e10cSrcweir |*
377cdf0e10cSrcweir |* EditMode (Page oder MasterPage) des Arbeitsmodus setzen
378cdf0e10cSrcweir |*
379cdf0e10cSrcweir \************************************************************************/
380cdf0e10cSrcweir 
SetViewShEditMode(EditMode eMode,PageKind eKind)381cdf0e10cSrcweir void FrameView::SetViewShEditMode(EditMode eMode, PageKind eKind)
382cdf0e10cSrcweir {
383cdf0e10cSrcweir 	if (eKind == PK_STANDARD)
384cdf0e10cSrcweir 	{
385cdf0e10cSrcweir 		meStandardEditMode = eMode;
386cdf0e10cSrcweir 	}
387cdf0e10cSrcweir 	else if (eKind == PK_NOTES)
388cdf0e10cSrcweir 	{
389cdf0e10cSrcweir 		meNotesEditMode = eMode;
390cdf0e10cSrcweir 	}
391cdf0e10cSrcweir 	else if (eKind == PK_HANDOUT)
392cdf0e10cSrcweir 	{
393cdf0e10cSrcweir 		meHandoutEditMode = eMode;
394cdf0e10cSrcweir 	}
395cdf0e10cSrcweir }
396cdf0e10cSrcweir 
397cdf0e10cSrcweir 
398cdf0e10cSrcweir /*************************************************************************
399cdf0e10cSrcweir |*
400cdf0e10cSrcweir |* EditMode (Page oder MasterPage) des Arbeitsmodus zurueckgeben
401cdf0e10cSrcweir |*
402cdf0e10cSrcweir \************************************************************************/
403cdf0e10cSrcweir 
GetViewShEditMode(PageKind eKind)404cdf0e10cSrcweir EditMode FrameView::GetViewShEditMode(PageKind eKind)
405cdf0e10cSrcweir {
406cdf0e10cSrcweir 	EditMode eMode = EM_PAGE;
407cdf0e10cSrcweir 
408cdf0e10cSrcweir 	if (eKind == PK_STANDARD)
409cdf0e10cSrcweir 	{
410cdf0e10cSrcweir 		eMode = meStandardEditMode;
411cdf0e10cSrcweir 	}
412cdf0e10cSrcweir 	else if (eKind == PK_NOTES)
413cdf0e10cSrcweir 	{
414cdf0e10cSrcweir 		eMode = meNotesEditMode;
415cdf0e10cSrcweir 	}
416cdf0e10cSrcweir 	else if (eKind == PK_HANDOUT)
417cdf0e10cSrcweir 	{
418cdf0e10cSrcweir 		eMode = meHandoutEditMode;
419cdf0e10cSrcweir 	}
420cdf0e10cSrcweir 
421cdf0e10cSrcweir 	return (eMode);
422cdf0e10cSrcweir }
423cdf0e10cSrcweir 
424cdf0e10cSrcweir 
425cdf0e10cSrcweir 
426cdf0e10cSrcweir 
SetViewShEditModeOnLoad(EditMode eMode)427cdf0e10cSrcweir void FrameView::SetViewShEditModeOnLoad (EditMode eMode)
428cdf0e10cSrcweir {
429cdf0e10cSrcweir     meEditModeOnLoad = eMode;
430cdf0e10cSrcweir }
431cdf0e10cSrcweir 
432cdf0e10cSrcweir 
433cdf0e10cSrcweir 
434cdf0e10cSrcweir 
GetViewShEditModeOnLoad(void) const435cdf0e10cSrcweir EditMode FrameView::GetViewShEditModeOnLoad (void) const
436cdf0e10cSrcweir {
437cdf0e10cSrcweir     return meEditModeOnLoad;
438cdf0e10cSrcweir }
439cdf0e10cSrcweir 
440cdf0e10cSrcweir 
441cdf0e10cSrcweir 
442cdf0e10cSrcweir 
createHelpLinesString(const SdrHelpLineList & rHelpLines)443cdf0e10cSrcweir static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines )
444cdf0e10cSrcweir {
445cdf0e10cSrcweir 	::rtl::OUStringBuffer aLines;
446cdf0e10cSrcweir 
447cdf0e10cSrcweir 	const sal_uInt16 nCount = rHelpLines.GetCount();
448cdf0e10cSrcweir 	for( sal_uInt16 nHlpLine = 0; nHlpLine < nCount; nHlpLine++ )
449cdf0e10cSrcweir 	{
450cdf0e10cSrcweir 		const SdrHelpLine& rHelpLine = rHelpLines[nHlpLine];
451cdf0e10cSrcweir 		const Point& rPos = rHelpLine.GetPos();
452cdf0e10cSrcweir 
453cdf0e10cSrcweir 		switch( rHelpLine.GetKind() )
454cdf0e10cSrcweir 		{
455cdf0e10cSrcweir 			case SDRHELPLINE_POINT:
456cdf0e10cSrcweir 				aLines.append( (sal_Unicode)'P' );
457cdf0e10cSrcweir 				aLines.append( (sal_Int32)rPos.X() );
458cdf0e10cSrcweir 				aLines.append( (sal_Unicode)',' );
459cdf0e10cSrcweir 				aLines.append( (sal_Int32)rPos.Y() );
460cdf0e10cSrcweir 				break;
461cdf0e10cSrcweir 			case SDRHELPLINE_VERTICAL:
462cdf0e10cSrcweir 				aLines.append( (sal_Unicode)'V' );
463cdf0e10cSrcweir 				aLines.append( (sal_Int32)rPos.X() );
464cdf0e10cSrcweir 				break;
465cdf0e10cSrcweir 			case SDRHELPLINE_HORIZONTAL:
466cdf0e10cSrcweir 				aLines.append( (sal_Unicode)'H' );
467cdf0e10cSrcweir 				aLines.append( (sal_Int32)rPos.Y() );
468cdf0e10cSrcweir 				break;
469cdf0e10cSrcweir 			default:
470cdf0e10cSrcweir 				DBG_ERROR( "Unsupported helpline Kind!" );
471cdf0e10cSrcweir 		}
472cdf0e10cSrcweir 	}
473cdf0e10cSrcweir 
474cdf0e10cSrcweir 	return aLines.makeStringAndClear();
475cdf0e10cSrcweir }
476cdf0e10cSrcweir 
477cdf0e10cSrcweir #define addValue( n, v ) push_back( std::pair< OUString, Any >( OUString( RTL_CONSTASCII_USTRINGPARAM( n ) ), v ) )
WriteUserDataSequence(::com::sun::star::uno::Sequence<::com::sun::star::beans::PropertyValue> & rValues,sal_Bool)478cdf0e10cSrcweir void FrameView::WriteUserDataSequence ( ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rValues, sal_Bool )
479cdf0e10cSrcweir {
480cdf0e10cSrcweir 	std::vector< std::pair< OUString, Any > > aUserData;
481cdf0e10cSrcweir 
482cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridIsVisible, makeAny( (sal_Bool)IsGridVisible() ) );
483cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridIsFront, makeAny( (sal_Bool)IsGridFront() ) );
484cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsSnapToGrid, makeAny( (sal_Bool)IsGridSnap() ) );
485cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsSnapToPageMargins, makeAny( (sal_Bool)IsBordSnap() ) );
486cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsSnapToSnapLines, makeAny( (sal_Bool)IsHlplSnap() ) );
487cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsSnapToObjectFrame, makeAny( (sal_Bool)IsOFrmSnap() ) );
488cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsSnapToObjectPoints, makeAny( (sal_Bool)IsOPntSnap() ) );
489cdf0e10cSrcweir 
490cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsSnapLinesVisible ) );
491cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsHlplVisible();
492cdf0e10cSrcweir //  pValue++;nIndex++;
493cdf0e10cSrcweir 
494cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsDragStripes ) );
495cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsDragStripes();
496cdf0e10cSrcweir //  pValue++;nIndex++;
497cdf0e10cSrcweir 
498cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsPlusHandlesAlwaysVisible, makeAny( (sal_Bool)IsPlusHandlesAlwaysVisible() ) );
499cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsFrameDragSingles, makeAny( (sal_Bool)IsFrameDragSingles() ) );
500cdf0e10cSrcweir 
501cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsMarkedHitMovesAlways ) );
502cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsMarkedHitMovesAlways();
503cdf0e10cSrcweir //  pValue++;nIndex++;
504cdf0e10cSrcweir 
505cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_EliminatePolyPointLimitAngle, makeAny( (sal_Int32)GetEliminatePolyPointLimitAngle() ) );
506cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsEliminatePolyPoints, makeAny( (sal_Bool)IsEliminatePolyPoints() ) );
507cdf0e10cSrcweir 
508cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsLineDraft ) );
509cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsLineDraft();
510cdf0e10cSrcweir //  pValue++;nIndex++;
511cdf0e10cSrcweir 
512cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsFillDraft ) );
513cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsFillDraft();
514cdf0e10cSrcweir //  pValue++;nIndex++;
515cdf0e10cSrcweir 
516cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsTextDraft ) );
517cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsTextDraft();
518cdf0e10cSrcweir //  pValue++;nIndex++;
519cdf0e10cSrcweir 
520cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsGrafDraft ) );
521cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsGrafDraft();
522cdf0e10cSrcweir //  pValue++;nIndex++;
523cdf0e10cSrcweir 
524cdf0e10cSrcweir 	Any aAny;
525cdf0e10cSrcweir 	GetVisibleLayers().QueryValue( aAny );
526cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_VisibleLayers, aAny );
527cdf0e10cSrcweir 
528cdf0e10cSrcweir 	GetPrintableLayers().QueryValue( aAny );
529cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_PrintableLayers, aAny );
530cdf0e10cSrcweir 
531cdf0e10cSrcweir 	GetLockedLayers().QueryValue( aAny );
532cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_LockedLayers, aAny );
533cdf0e10cSrcweir 
534cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_NoAttribs, makeAny( (sal_Bool)IsNoAttribs() ) );
535cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_NoColors, makeAny( (sal_Bool)IsNoColors() ) );
536cdf0e10cSrcweir 
537cdf0e10cSrcweir 	if( GetStandardHelpLines().GetCount() )
538cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_SnapLinesDrawing, makeAny( createHelpLinesString( GetStandardHelpLines() ) ) );
539cdf0e10cSrcweir 
540cdf0e10cSrcweir 	if( GetNotesHelpLines().GetCount() )
541cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_SnapLinesNotes, makeAny( createHelpLinesString( GetNotesHelpLines() ) ) );
542cdf0e10cSrcweir 
543cdf0e10cSrcweir 	if( GetHandoutHelpLines().GetCount() )
544cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_SnapLinesHandout, makeAny( createHelpLinesString( GetHandoutHelpLines() ) ) );
545cdf0e10cSrcweir 
546cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_RulerIsVisible, makeAny( (sal_Bool)HasRuler() ) );
547cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_PageKind, makeAny( (sal_Int16)GetPageKind() ) );
548cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_SelectedPage, makeAny( (sal_Int16)GetSelectedPage() ) );
549cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsLayerMode, makeAny( (sal_Bool)IsLayerMode() ) );
550cdf0e10cSrcweir 
551cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsQuickEdit ) );
552cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsQuickEdit();
553cdf0e10cSrcweir //  pValue++;nIndex++;
554cdf0e10cSrcweir 
555cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsBigHandles, makeAny( (sal_Bool)IsBigHandles() ) );
556cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsDoubleClickTextEdit,  makeAny( (sal_Bool)IsDoubleClickTextEdit() ) );
557cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsClickChangeRotation, makeAny( (sal_Bool)IsClickChangeRotation() ) );
558cdf0e10cSrcweir 
559cdf0e10cSrcweir //	pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsDragWithCopy ) );
560cdf0e10cSrcweir //	pValue->Value <<= (sal_Bool)IsDragWithCopy();
561cdf0e10cSrcweir //  pValue++;nIndex++;
562cdf0e10cSrcweir 
563cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_SlidesPerRow, makeAny( (sal_Int16)GetSlidesPerRow() ) );
564cdf0e10cSrcweir /* #107128# Product managment decided to not make this persistent
565cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_DrawMode, makeAny( (sal_Int32)GetDrawMode() ) );
566cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_PreviewDrawMode, makeAny( (sal_Int32)GetPreviewDrawMode() ) );
567cdf0e10cSrcweir */
568cdf0e10cSrcweir     aUserData.addValue( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PK_STANDARD ) ) );
569cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PK_NOTES ) ) );
570cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PK_HANDOUT ) ) );
571cdf0e10cSrcweir 
572cdf0e10cSrcweir 	{
573cdf0e10cSrcweir 		const Rectangle aVisArea = GetVisArea();
574cdf0e10cSrcweir 
575cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_VisibleAreaTop, makeAny( (sal_Int32)aVisArea.Top() ) );
576cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_VisibleAreaLeft, makeAny( (sal_Int32)aVisArea.Left() ) );
577cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_VisibleAreaWidth, makeAny( (sal_Int32)aVisArea.GetWidth() ) );
578cdf0e10cSrcweir 		aUserData.addValue( sUNO_View_VisibleAreaHeight, makeAny( (sal_Int32)aVisArea.GetHeight() ) );
579cdf0e10cSrcweir 	}
580cdf0e10cSrcweir 
581cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridCoarseWidth, makeAny( (sal_Int32)GetGridCoarse().Width() ) );
582cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridCoarseHeight, makeAny( (sal_Int32)GetGridCoarse().Height() ) );
583cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridFineWidth, makeAny( (sal_Int32)GetGridFine().Width() ) );
584cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridFineHeight, makeAny( (sal_Int32)GetGridFine().Height() ) );
585cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridSnapWidthXNumerator, makeAny( (sal_Int32)GetSnapGridWidthX().GetNumerator() ) );
586cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridSnapWidthXDenominator, makeAny( (sal_Int32)GetSnapGridWidthX().GetDenominator() ) );
587cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridSnapWidthYNumerator, makeAny( (sal_Int32)GetSnapGridWidthY().GetNumerator() ) );
588cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_GridSnapWidthYDenominator, makeAny( (sal_Int32)GetSnapGridWidthY().GetDenominator() ) );
589cdf0e10cSrcweir 	aUserData.addValue( sUNO_View_IsAngleSnapEnabled, makeAny( (sal_Bool)IsAngleSnapEnabled() ) );
590cdf0e10cSrcweir     aUserData.addValue( sUNO_View_SnapAngle, makeAny( (sal_Int32)GetSnapAngle() ) );
591cdf0e10cSrcweir 
592cdf0e10cSrcweir 	const sal_Int32 nOldLength = rValues.getLength();
593cdf0e10cSrcweir 	rValues.realloc( nOldLength + aUserData.size() );
594cdf0e10cSrcweir 
595cdf0e10cSrcweir 	PropertyValue* pValue = &(rValues.getArray()[nOldLength]);
596cdf0e10cSrcweir 
597cdf0e10cSrcweir 	std::vector< std::pair< OUString, Any > >::iterator aIter( aUserData.begin() );
598cdf0e10cSrcweir 	for( ; aIter != aUserData.end(); aIter++, pValue++ )
599cdf0e10cSrcweir 	{
600cdf0e10cSrcweir 		pValue->Name = (*aIter).first;
601cdf0e10cSrcweir 		pValue->Value = (*aIter).second;
602cdf0e10cSrcweir 	}
603cdf0e10cSrcweir }
604cdf0e10cSrcweir #undef addValue
605cdf0e10cSrcweir 
createHelpLinesFromString(const rtl::OUString & rLines,SdrHelpLineList & rHelpLines)606cdf0e10cSrcweir static void createHelpLinesFromString( const rtl::OUString& rLines, SdrHelpLineList& rHelpLines )
607cdf0e10cSrcweir {
608cdf0e10cSrcweir 	const sal_Unicode * pStr = rLines.getStr();
609cdf0e10cSrcweir 	SdrHelpLine aNewHelpLine;
610cdf0e10cSrcweir 	rtl::OUStringBuffer sBuffer;
611cdf0e10cSrcweir 
612cdf0e10cSrcweir 	while( *pStr )
613cdf0e10cSrcweir 	{
614cdf0e10cSrcweir 		Point aPoint;
615cdf0e10cSrcweir 
616cdf0e10cSrcweir 		switch( *pStr )
617cdf0e10cSrcweir 		{
618cdf0e10cSrcweir 		case (sal_Unicode)'P':
619cdf0e10cSrcweir 			aNewHelpLine.SetKind( SDRHELPLINE_POINT );
620cdf0e10cSrcweir 			break;
621cdf0e10cSrcweir 		case (sal_Unicode)'V':
622cdf0e10cSrcweir 			aNewHelpLine.SetKind( SDRHELPLINE_VERTICAL );
623cdf0e10cSrcweir 			break;
624cdf0e10cSrcweir 		case (sal_Unicode)'H':
625cdf0e10cSrcweir 			aNewHelpLine.SetKind( SDRHELPLINE_HORIZONTAL );
626cdf0e10cSrcweir 			break;
627cdf0e10cSrcweir 		default:
628cdf0e10cSrcweir 			DBG_ERROR( "syntax error in snap lines settings string" );
629cdf0e10cSrcweir 			return;
630cdf0e10cSrcweir 		}
631cdf0e10cSrcweir 
632cdf0e10cSrcweir 		pStr++;
633cdf0e10cSrcweir 
634cdf0e10cSrcweir 		while( (*pStr >= sal_Unicode('0') && *pStr <= sal_Unicode('9')) || (*pStr == '+') || (*pStr == '-') )
635cdf0e10cSrcweir 		{
636cdf0e10cSrcweir 			sBuffer.append( *pStr++ );
637cdf0e10cSrcweir 		}
638cdf0e10cSrcweir 
639cdf0e10cSrcweir 		sal_Int32 nValue = sBuffer.makeStringAndClear().toInt32();
640cdf0e10cSrcweir 
641cdf0e10cSrcweir 		if( aNewHelpLine.GetKind() == SDRHELPLINE_HORIZONTAL )
642cdf0e10cSrcweir 		{
643cdf0e10cSrcweir 			aPoint.Y() = nValue;
644cdf0e10cSrcweir 		}
645cdf0e10cSrcweir 		else
646cdf0e10cSrcweir 		{
647cdf0e10cSrcweir 			aPoint.X() = nValue;
648cdf0e10cSrcweir 
649cdf0e10cSrcweir 			if( aNewHelpLine.GetKind() == SDRHELPLINE_POINT )
650cdf0e10cSrcweir 			{
651cdf0e10cSrcweir 				if( *pStr++ != ',' )
652cdf0e10cSrcweir 					return;
653cdf0e10cSrcweir 
654cdf0e10cSrcweir 				while( (*pStr >= sal_Unicode('0') && *pStr <= sal_Unicode('9')) || (*pStr == '+') || (*pStr == '-')  )
655cdf0e10cSrcweir 				{
656cdf0e10cSrcweir 					sBuffer.append( *pStr++ );
657cdf0e10cSrcweir 				}
658cdf0e10cSrcweir 
659cdf0e10cSrcweir 				aPoint.Y() = sBuffer.makeStringAndClear().toInt32();
660cdf0e10cSrcweir 
661cdf0e10cSrcweir 			}
662cdf0e10cSrcweir 		}
663cdf0e10cSrcweir 
664cdf0e10cSrcweir 		aNewHelpLine.SetPos( aPoint );
665cdf0e10cSrcweir 		rHelpLines.Insert( aNewHelpLine );
666cdf0e10cSrcweir 	}
667cdf0e10cSrcweir }
668cdf0e10cSrcweir 
ReadUserDataSequence(const::com::sun::star::uno::Sequence<::com::sun::star::beans::PropertyValue> & rSequence,sal_Bool)669cdf0e10cSrcweir void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence < ::com::sun::star::beans::PropertyValue >& rSequence, sal_Bool )
670cdf0e10cSrcweir {
671cdf0e10cSrcweir 	const sal_Int32 nLength = rSequence.getLength();
672cdf0e10cSrcweir     if (nLength)
673cdf0e10cSrcweir     {
674cdf0e10cSrcweir 		const bool bImpress = dynamic_cast< SdDrawDocument* >(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS;
675cdf0e10cSrcweir 
676cdf0e10cSrcweir 		sal_Bool bBool = sal_False;
677cdf0e10cSrcweir 		sal_Int32 nInt32 = 0;
678cdf0e10cSrcweir 		sal_Int16 nInt16 = 0;
679cdf0e10cSrcweir 		rtl::OUString aString;
680cdf0e10cSrcweir 
681cdf0e10cSrcweir 		sal_Int32 aSnapGridWidthXNum = GetSnapGridWidthX().GetNumerator();
682cdf0e10cSrcweir 		sal_Int32 aSnapGridWidthXDom = GetSnapGridWidthX().GetDenominator();
683cdf0e10cSrcweir 
684cdf0e10cSrcweir 		sal_Int32 aSnapGridWidthYNum = GetSnapGridWidthY().GetNumerator();
685cdf0e10cSrcweir 		sal_Int32 aSnapGridWidthYDom = GetSnapGridWidthY().GetDenominator();
686cdf0e10cSrcweir 
687cdf0e10cSrcweir         EditMode eStandardEditMode;
688cdf0e10cSrcweir         EditMode eNotesEditMode;
689cdf0e10cSrcweir         EditMode eHandoutEditMode;
690cdf0e10cSrcweir 
691cdf0e10cSrcweir         const com::sun::star::beans::PropertyValue *pValue = rSequence.getConstArray();
692cdf0e10cSrcweir         for (sal_Int16 i = 0 ; i < nLength; i++, pValue++ )
693cdf0e10cSrcweir         {
694cdf0e10cSrcweir             if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ViewId ) ) )
695cdf0e10cSrcweir             {
696cdf0e10cSrcweir             }
697cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesDrawing ) ) )
698cdf0e10cSrcweir 			{
699cdf0e10cSrcweir 				if( pValue->Value >>= aString )
700cdf0e10cSrcweir 				{
701cdf0e10cSrcweir 					SdrHelpLineList aHelpLines;
702cdf0e10cSrcweir 					createHelpLinesFromString( aString, aHelpLines );
703cdf0e10cSrcweir 					SetStandardHelpLines( aHelpLines );
704cdf0e10cSrcweir 				}
705cdf0e10cSrcweir 			}
706cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesNotes ) ) )
707cdf0e10cSrcweir 			{
708cdf0e10cSrcweir 				if( pValue->Value >>= aString )
709cdf0e10cSrcweir 				{
710cdf0e10cSrcweir 					SdrHelpLineList aHelpLines;
711cdf0e10cSrcweir 					createHelpLinesFromString( aString, aHelpLines );
712cdf0e10cSrcweir 					SetNotesHelpLines( aHelpLines );
713cdf0e10cSrcweir 				}
714cdf0e10cSrcweir 			}
715cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesHandout ) ) )
716cdf0e10cSrcweir 			{
717cdf0e10cSrcweir 				if( pValue->Value >>= aString )
718cdf0e10cSrcweir 				{
719cdf0e10cSrcweir 					SdrHelpLineList aHelpLines;
720cdf0e10cSrcweir 					createHelpLinesFromString( aString, aHelpLines );
721cdf0e10cSrcweir 					SetHandoutHelpLines( aHelpLines );
722cdf0e10cSrcweir 				}
723cdf0e10cSrcweir 			}
724cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_RulerIsVisible ) ) )
725cdf0e10cSrcweir 			{
726cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
727cdf0e10cSrcweir 				{
728cdf0e10cSrcweir 					SetRuler( bBool );
729cdf0e10cSrcweir 				}
730cdf0e10cSrcweir 			}
731cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PageKind ) ) )
732cdf0e10cSrcweir 			{
733cdf0e10cSrcweir 				if( pValue->Value >>= nInt16 )
734cdf0e10cSrcweir 				{
735cdf0e10cSrcweir 					SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
736cdf0e10cSrcweir 					if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
737cdf0e10cSrcweir                         SetPageKind( (PageKind)nInt16 );
738cdf0e10cSrcweir 
739cdf0e10cSrcweir 					SetPageKindOnLoad( (PageKind)nInt16 );
740cdf0e10cSrcweir 				}
741cdf0e10cSrcweir 			}
742cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SelectedPage ) ) )
743cdf0e10cSrcweir 			{
744cdf0e10cSrcweir 				if( pValue->Value >>= nInt16 )
745cdf0e10cSrcweir 				{
746cdf0e10cSrcweir 					SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
747cdf0e10cSrcweir 					if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
748cdf0e10cSrcweir 						SetSelectedPage( (sal_uInt16)nInt16 );
749cdf0e10cSrcweir 
750cdf0e10cSrcweir 					SetSelectedPageOnLoad( (sal_uInt16)nInt16 );
751cdf0e10cSrcweir 				}
752cdf0e10cSrcweir 			}
753cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLayerMode ) ) )
754cdf0e10cSrcweir 			{
755cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
756cdf0e10cSrcweir 				{
757cdf0e10cSrcweir 					SetLayerMode( bBool );
758cdf0e10cSrcweir 				}
759cdf0e10cSrcweir 			}
760cdf0e10cSrcweir /*			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsQuickEdit ) ) )
761cdf0e10cSrcweir 			{
762cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
763cdf0e10cSrcweir 				{
764cdf0e10cSrcweir 					SetQuickEdit( bBool );
765cdf0e10cSrcweir 				}
766cdf0e10cSrcweir 			}
767cdf0e10cSrcweir */			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsBigHandles ) ) )
768cdf0e10cSrcweir 			{
769cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
770cdf0e10cSrcweir 				{
771cdf0e10cSrcweir 					SetBigHandles( bBool );
772cdf0e10cSrcweir 				}
773cdf0e10cSrcweir 			}
774cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDoubleClickTextEdit ) ) )
775cdf0e10cSrcweir 			{
776cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
777cdf0e10cSrcweir 				{
778cdf0e10cSrcweir 					SetDoubleClickTextEdit( bBool );
779cdf0e10cSrcweir 				}
780cdf0e10cSrcweir 			}
781cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsClickChangeRotation ) ) )
782cdf0e10cSrcweir 			{
783cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
784cdf0e10cSrcweir 				{
785cdf0e10cSrcweir 					SetClickChangeRotation( bBool );
786cdf0e10cSrcweir 				}
787cdf0e10cSrcweir 			}
788cdf0e10cSrcweir /*			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDragWithCopy ) ) )
789cdf0e10cSrcweir 			{
790cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
791cdf0e10cSrcweir 				{
792cdf0e10cSrcweir 					SetDragWithCopy( bBool );
793cdf0e10cSrcweir 				}
794cdf0e10cSrcweir 			}
795cdf0e10cSrcweir */			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SlidesPerRow ) ) )
796cdf0e10cSrcweir 			{
797cdf0e10cSrcweir 				if( pValue->Value >>= nInt16 )
798cdf0e10cSrcweir 				{
799cdf0e10cSrcweir 					SetSlidesPerRow( (sal_uInt16)nInt16 );
800cdf0e10cSrcweir 				}
801cdf0e10cSrcweir 			}
802cdf0e10cSrcweir /* #107128# Product managment decided to not make this persistent
803cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_DrawMode ) ) )
804cdf0e10cSrcweir 			{
805cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
806cdf0e10cSrcweir 				{
807cdf0e10cSrcweir 					const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
808cdf0e10cSrcweir 					if( rStyleSettings.GetHighContrastMode() )
809cdf0e10cSrcweir 						continue;
810cdf0e10cSrcweir 					SetDrawMode( (sal_uLong)nInt32 );
811cdf0e10cSrcweir 				}
812cdf0e10cSrcweir 			}
813cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PreviewDrawMode ) ) )
814cdf0e10cSrcweir 			{
815cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
816cdf0e10cSrcweir 				{
817cdf0e10cSrcweir 					const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
818cdf0e10cSrcweir 					SvtAccessibilityOptions aAccOptions;
819cdf0e10cSrcweir 					if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
820cdf0e10cSrcweir 						continue;
821cdf0e10cSrcweir 					SetPreviewDrawMode( (sal_uLong)nInt32 );
822cdf0e10cSrcweir 				}
823cdf0e10cSrcweir 			}
824cdf0e10cSrcweir */
825cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeStandard ) ) )
826cdf0e10cSrcweir 			{
827cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
828cdf0e10cSrcweir 				{
829cdf0e10cSrcweir 					SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
830cdf0e10cSrcweir 					if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
831cdf0e10cSrcweir                         SetViewShEditMode( (EditMode)nInt32, PK_STANDARD );
832cdf0e10cSrcweir 					eStandardEditMode = (EditMode)nInt32;
833cdf0e10cSrcweir 				}
834cdf0e10cSrcweir 			}
835cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeNotes ) ) )
836cdf0e10cSrcweir 			{
837cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
838cdf0e10cSrcweir 				{
839cdf0e10cSrcweir 					SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
840cdf0e10cSrcweir 					if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
841cdf0e10cSrcweir                         SetViewShEditMode( (EditMode)nInt32, PK_NOTES );
842cdf0e10cSrcweir 					eNotesEditMode = (EditMode)nInt32;
843cdf0e10cSrcweir 				}
844cdf0e10cSrcweir 			}
845cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeHandout ) ) )
846cdf0e10cSrcweir 			{
847cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
848cdf0e10cSrcweir 				{
849cdf0e10cSrcweir 					SdDrawDocument* pDoc = dynamic_cast< SdDrawDocument* >( GetModel() );
850cdf0e10cSrcweir 					if( pDoc && pDoc->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
851cdf0e10cSrcweir                         SetViewShEditMode( (EditMode)nInt32, PK_HANDOUT );
852cdf0e10cSrcweir 					eHandoutEditMode = (EditMode)nInt32;
853cdf0e10cSrcweir 				}
854cdf0e10cSrcweir 			}
855cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaTop ) ) )
856cdf0e10cSrcweir 			{
857cdf0e10cSrcweir 				sal_Int32 nTop = 0;
858cdf0e10cSrcweir 				if( pValue->Value >>= nTop )
859cdf0e10cSrcweir 				{
860cdf0e10cSrcweir 					Rectangle aVisArea( GetVisArea() );
861cdf0e10cSrcweir 					aVisArea.nBottom += nTop - aVisArea.nTop;
862cdf0e10cSrcweir 					aVisArea.nTop = nTop;
863cdf0e10cSrcweir 					SetVisArea( aVisArea );
864cdf0e10cSrcweir 				}
865cdf0e10cSrcweir 			}
866cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaLeft ) ) )
867cdf0e10cSrcweir 			{
868cdf0e10cSrcweir 				sal_Int32 nLeft = 0;
869cdf0e10cSrcweir 				if( pValue->Value >>= nLeft )
870cdf0e10cSrcweir 				{
871cdf0e10cSrcweir 					Rectangle aVisArea( GetVisArea() );
872cdf0e10cSrcweir 					aVisArea.nRight += nLeft - aVisArea.nLeft;
873cdf0e10cSrcweir 					aVisArea.nLeft = nLeft;
874cdf0e10cSrcweir 					SetVisArea( aVisArea );
875cdf0e10cSrcweir 				}
876cdf0e10cSrcweir 			}
877cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaWidth ) ) )
878cdf0e10cSrcweir 			{
879cdf0e10cSrcweir 				sal_Int32 nWidth = 0;
880cdf0e10cSrcweir 				if( pValue->Value >>= nWidth )
881cdf0e10cSrcweir 				{
882cdf0e10cSrcweir 					Rectangle aVisArea( GetVisArea() );
883cdf0e10cSrcweir 					aVisArea.nRight = aVisArea.nLeft + nWidth - 1;
884cdf0e10cSrcweir 					SetVisArea( aVisArea );
885cdf0e10cSrcweir 				}
886cdf0e10cSrcweir 			}
887cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaHeight ) ) )
888cdf0e10cSrcweir 			{
889cdf0e10cSrcweir 				sal_Int32 nHeight = 0;
890cdf0e10cSrcweir 				if( pValue->Value >>= nHeight )
891cdf0e10cSrcweir 				{
892cdf0e10cSrcweir 					Rectangle aVisArea( GetVisArea() );
893cdf0e10cSrcweir 					aVisArea.nBottom = nHeight + aVisArea.nTop - 1;
894cdf0e10cSrcweir 					SetVisArea( aVisArea );
895cdf0e10cSrcweir 				}
896cdf0e10cSrcweir 			}
897cdf0e10cSrcweir 
898cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsVisible ) ) )
899cdf0e10cSrcweir 			{
900cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
901cdf0e10cSrcweir 				{
902cdf0e10cSrcweir 					SetGridVisible( bBool );
903cdf0e10cSrcweir 				}
904cdf0e10cSrcweir 			}
905cdf0e10cSrcweir 
906cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToGrid ) ) )
907cdf0e10cSrcweir 			{
908cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
909cdf0e10cSrcweir 				{
910cdf0e10cSrcweir 					SetGridSnap( bBool );
911cdf0e10cSrcweir 				}
912cdf0e10cSrcweir 			}
913cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsFront ) ) )
914cdf0e10cSrcweir 			{
915cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
916cdf0e10cSrcweir 				{
917cdf0e10cSrcweir 					SetGridFront( bBool );
918cdf0e10cSrcweir 				}
919cdf0e10cSrcweir 			}
920cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToPageMargins ) ) )
921cdf0e10cSrcweir 			{
922cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
923cdf0e10cSrcweir 				{
924cdf0e10cSrcweir 					SetBordSnap( bBool );
925cdf0e10cSrcweir 				}
926cdf0e10cSrcweir 			}
927cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToSnapLines ) ) )
928cdf0e10cSrcweir 			{
929cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
930cdf0e10cSrcweir 				{
931cdf0e10cSrcweir 					SetHlplSnap( bBool );
932cdf0e10cSrcweir 				}
933cdf0e10cSrcweir 			}
934cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectFrame ) ) )
935cdf0e10cSrcweir 			{
936cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
937cdf0e10cSrcweir 				{
938cdf0e10cSrcweir 					SetOFrmSnap( bBool );
939cdf0e10cSrcweir 				}
940cdf0e10cSrcweir 			}
941cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectPoints ) ) )
942cdf0e10cSrcweir 			{
943cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
944cdf0e10cSrcweir 				{
945cdf0e10cSrcweir 					SetOPntSnap( bBool );
946cdf0e10cSrcweir 				}
947cdf0e10cSrcweir 			}
948cdf0e10cSrcweir /*			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapLinesVisible ) ) )
949cdf0e10cSrcweir 			{
950cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
951cdf0e10cSrcweir 				{
952cdf0e10cSrcweir 					SetHlplVisible( bBool );
953cdf0e10cSrcweir 				}
954cdf0e10cSrcweir 			}
955cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDragStripes ) ) )
956cdf0e10cSrcweir 			{
957cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
958cdf0e10cSrcweir 				{
959cdf0e10cSrcweir 					SetDragStripes( bBool );
960cdf0e10cSrcweir 				}
961cdf0e10cSrcweir 			}
962cdf0e10cSrcweir */			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsPlusHandlesAlwaysVisible ) ) )
963cdf0e10cSrcweir 			{
964cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
965cdf0e10cSrcweir 				{
966cdf0e10cSrcweir 					SetPlusHandlesAlwaysVisible( bBool );
967cdf0e10cSrcweir 				}
968cdf0e10cSrcweir 			}
969cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsFrameDragSingles ) ) )
970cdf0e10cSrcweir 			{
971cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
972cdf0e10cSrcweir 				{
973cdf0e10cSrcweir 					SetFrameDragSingles( bBool );
974cdf0e10cSrcweir 				}
975cdf0e10cSrcweir 			}
976cdf0e10cSrcweir /*			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsMarkedHitMovesAlways ) ) )
977cdf0e10cSrcweir 			{
978cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
979cdf0e10cSrcweir 				{
980cdf0e10cSrcweir 					SetMarkedHitMovesAlways( bBool );
981cdf0e10cSrcweir 				}
982cdf0e10cSrcweir 			}
983cdf0e10cSrcweir */			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EliminatePolyPointLimitAngle ) ) )
984cdf0e10cSrcweir 			{
985cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
986cdf0e10cSrcweir 				{
987cdf0e10cSrcweir 					SetEliminatePolyPointLimitAngle( nInt32 );
988cdf0e10cSrcweir 				}
989cdf0e10cSrcweir 			}
990cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsEliminatePolyPoints ) ) )
991cdf0e10cSrcweir 			{
992cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
993cdf0e10cSrcweir 				{
994cdf0e10cSrcweir 					SetEliminatePolyPoints( bBool );
995cdf0e10cSrcweir 				}
996cdf0e10cSrcweir 			}
997cdf0e10cSrcweir /*
998cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLineDraft ) ) )
999cdf0e10cSrcweir 			{
1000cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1001cdf0e10cSrcweir 				{
1002cdf0e10cSrcweir 					SetLineDraft( bBool );
1003cdf0e10cSrcweir 				}
1004cdf0e10cSrcweir 			}
1005cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsFillDraft ) ) )
1006cdf0e10cSrcweir 			{
1007cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1008cdf0e10cSrcweir 				{
1009cdf0e10cSrcweir 					SetFillDraft( bBool );
1010cdf0e10cSrcweir 				}
1011cdf0e10cSrcweir 			}
1012cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsTextDraft ) ) )
1013cdf0e10cSrcweir 			{
1014cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1015cdf0e10cSrcweir 				{
1016cdf0e10cSrcweir 					SetTextDraft( bBool );
1017cdf0e10cSrcweir 				}
1018cdf0e10cSrcweir 			}
1019cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsGrafDraft ) ) )
1020cdf0e10cSrcweir 			{
1021cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1022cdf0e10cSrcweir 				{
1023cdf0e10cSrcweir 					SetGrafDraft( bBool );
1024cdf0e10cSrcweir 				}
1025cdf0e10cSrcweir 			}
1026cdf0e10cSrcweir */
1027cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ActiveLayer ) ) )
1028cdf0e10cSrcweir 			{
1029cdf0e10cSrcweir 				if( pValue->Value >>= aString )
1030cdf0e10cSrcweir 				{
1031cdf0e10cSrcweir 					SetActiveLayer( aString );
1032cdf0e10cSrcweir 				}
1033cdf0e10cSrcweir 			}
1034cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoAttribs ) ) )
1035cdf0e10cSrcweir 			{
1036cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1037cdf0e10cSrcweir 				{
1038cdf0e10cSrcweir 					SetNoAttribs( bBool );
1039cdf0e10cSrcweir 				}
1040cdf0e10cSrcweir 			}
1041cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoColors ) ) )
1042cdf0e10cSrcweir 			{
1043cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1044cdf0e10cSrcweir 				{
1045cdf0e10cSrcweir 					SetNoColors( bBool );
1046cdf0e10cSrcweir 				}
1047cdf0e10cSrcweir 			}
1048cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseWidth ) ) )
1049cdf0e10cSrcweir 			{
1050cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
1051cdf0e10cSrcweir 				{
1052cdf0e10cSrcweir 					const Size aCoarse( nInt32, GetGridCoarse().Height() );
1053cdf0e10cSrcweir 					SetGridCoarse( aCoarse );
1054cdf0e10cSrcweir 				}
1055cdf0e10cSrcweir 			}
1056cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseHeight ) ) )
1057cdf0e10cSrcweir 			{
1058cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
1059cdf0e10cSrcweir 				{
1060cdf0e10cSrcweir 					const Size aCoarse( GetGridCoarse().Width(), nInt32 );
1061cdf0e10cSrcweir 					SetGridCoarse( aCoarse );
1062cdf0e10cSrcweir 				}
1063cdf0e10cSrcweir 			}
1064cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineWidth ) ) )
1065cdf0e10cSrcweir 			{
1066cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
1067cdf0e10cSrcweir 				{
1068cdf0e10cSrcweir 					const Size aCoarse( nInt32, GetGridFine().Height() );
1069cdf0e10cSrcweir 					SetGridFine( aCoarse );
1070cdf0e10cSrcweir 				}
1071cdf0e10cSrcweir 			}
1072cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineHeight ) ) )
1073cdf0e10cSrcweir 			{
1074cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
1075cdf0e10cSrcweir 				{
1076cdf0e10cSrcweir 					const Size aCoarse( GetGridFine().Width(), nInt32 );
1077cdf0e10cSrcweir 					SetGridFine( aCoarse );
1078cdf0e10cSrcweir 				}
1079cdf0e10cSrcweir 			}
1080cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsAngleSnapEnabled ) ) )
1081cdf0e10cSrcweir 			{
1082cdf0e10cSrcweir 				if( pValue->Value >>= bBool )
1083cdf0e10cSrcweir 				{
1084cdf0e10cSrcweir 					SetAngleSnapEnabled( bBool );
1085cdf0e10cSrcweir 				}
1086cdf0e10cSrcweir 			}
1087cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapAngle ) ) )
1088cdf0e10cSrcweir 			{
1089cdf0e10cSrcweir 				if( pValue->Value >>= nInt32 )
1090cdf0e10cSrcweir 				{
1091cdf0e10cSrcweir 					SetSnapAngle( nInt32 );
1092cdf0e10cSrcweir 				}
1093cdf0e10cSrcweir 			}
1094cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXNumerator ) ) )
1095cdf0e10cSrcweir 			{
1096cdf0e10cSrcweir 				pValue->Value >>= aSnapGridWidthXNum;
1097cdf0e10cSrcweir 			}
1098cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXDenominator ) ) )
1099cdf0e10cSrcweir 			{
1100cdf0e10cSrcweir 				pValue->Value >>= aSnapGridWidthXDom;
1101cdf0e10cSrcweir 			}
1102cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYNumerator ) ) )
1103cdf0e10cSrcweir 			{
1104cdf0e10cSrcweir 				pValue->Value >>= aSnapGridWidthYNum;
1105cdf0e10cSrcweir 			}
1106cdf0e10cSrcweir 			else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYDenominator ) ) )
1107cdf0e10cSrcweir 			{
1108cdf0e10cSrcweir 				pValue->Value >>= aSnapGridWidthYDom;
1109cdf0e10cSrcweir 			}
1110cdf0e10cSrcweir 			else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleLayers ) ) )
1111cdf0e10cSrcweir 			{
1112cdf0e10cSrcweir 				SetOfByte aSetOfBytes;
1113cdf0e10cSrcweir 				aSetOfBytes.PutValue( pValue->Value );
1114cdf0e10cSrcweir 				SetVisibleLayers( aSetOfBytes );
1115cdf0e10cSrcweir 			}
1116cdf0e10cSrcweir 			else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PrintableLayers ) ) )
1117cdf0e10cSrcweir 			{
1118cdf0e10cSrcweir 				SetOfByte aSetOfBytes;
1119cdf0e10cSrcweir 				aSetOfBytes.PutValue( pValue->Value );
1120cdf0e10cSrcweir 				SetPrintableLayers( aSetOfBytes );
1121cdf0e10cSrcweir 			}
1122cdf0e10cSrcweir 			else if (!bImpress && pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_LockedLayers ) ) )
1123cdf0e10cSrcweir 			{
1124cdf0e10cSrcweir 				SetOfByte aSetOfBytes;
1125cdf0e10cSrcweir 				aSetOfBytes.PutValue( pValue->Value );
1126cdf0e10cSrcweir 				SetLockedLayers( aSetOfBytes );
1127cdf0e10cSrcweir 			}
1128cdf0e10cSrcweir 		}
1129cdf0e10cSrcweir 
1130cdf0e10cSrcweir         switch (GetPageKindOnLoad())
1131cdf0e10cSrcweir         {
1132cdf0e10cSrcweir             case PK_STANDARD: SetViewShEditModeOnLoad(meStandardEditMode); break;
1133cdf0e10cSrcweir             case PK_NOTES: SetViewShEditModeOnLoad(meNotesEditMode); break;
1134cdf0e10cSrcweir             case PK_HANDOUT: SetViewShEditModeOnLoad(meHandoutEditMode); break;
1135cdf0e10cSrcweir             default: SetViewShEditModeOnLoad(EM_PAGE); break;
1136cdf0e10cSrcweir         }
1137cdf0e10cSrcweir 
1138cdf0e10cSrcweir 		const Fraction aSnapGridWidthX( aSnapGridWidthXNum, aSnapGridWidthXDom );
1139cdf0e10cSrcweir 		const Fraction aSnapGridWidthY( aSnapGridWidthYNum, aSnapGridWidthYDom );
1140cdf0e10cSrcweir 
1141cdf0e10cSrcweir 		SetSnapGridWidth( aSnapGridWidthX, aSnapGridWidthY );
1142cdf0e10cSrcweir 	}
1143cdf0e10cSrcweir }
1144cdf0e10cSrcweir 
1145cdf0e10cSrcweir 
1146cdf0e10cSrcweir 
1147cdf0e10cSrcweir 
SetPreviousViewShellType(ViewShell::ShellType eType)1148cdf0e10cSrcweir void FrameView::SetPreviousViewShellType (ViewShell::ShellType eType)
1149cdf0e10cSrcweir {
1150cdf0e10cSrcweir     mePreviousViewShellType = eType;
1151cdf0e10cSrcweir }
1152cdf0e10cSrcweir 
1153cdf0e10cSrcweir 
1154cdf0e10cSrcweir 
1155cdf0e10cSrcweir 
GetPreviousViewShellType(void) const1156cdf0e10cSrcweir ViewShell::ShellType FrameView::GetPreviousViewShellType (void) const
1157cdf0e10cSrcweir {
1158cdf0e10cSrcweir     return mePreviousViewShellType;
1159cdf0e10cSrcweir }
1160cdf0e10cSrcweir 
1161cdf0e10cSrcweir 
1162cdf0e10cSrcweir 
1163cdf0e10cSrcweir 
SetViewShellTypeOnLoad(ViewShell::ShellType eType)1164cdf0e10cSrcweir void FrameView::SetViewShellTypeOnLoad (ViewShell::ShellType eType)
1165cdf0e10cSrcweir {
1166cdf0e10cSrcweir     meViewShellTypeOnLoad = eType;
1167cdf0e10cSrcweir }
1168cdf0e10cSrcweir 
1169cdf0e10cSrcweir 
1170cdf0e10cSrcweir 
1171cdf0e10cSrcweir 
GetViewShellTypeOnLoad(void) const1172cdf0e10cSrcweir ViewShell::ShellType FrameView::GetViewShellTypeOnLoad (void) const
1173cdf0e10cSrcweir {
1174cdf0e10cSrcweir     return meViewShellTypeOnLoad;
1175cdf0e10cSrcweir }
1176cdf0e10cSrcweir 
1177cdf0e10cSrcweir 
1178cdf0e10cSrcweir 
1179cdf0e10cSrcweir 
SetSelectedPage(sal_uInt16 nPage)1180cdf0e10cSrcweir void FrameView::SetSelectedPage(sal_uInt16 nPage)
1181cdf0e10cSrcweir {
1182cdf0e10cSrcweir     mnSelectedPage = nPage;
1183cdf0e10cSrcweir }
1184cdf0e10cSrcweir 
1185cdf0e10cSrcweir 
1186cdf0e10cSrcweir 
1187cdf0e10cSrcweir 
GetSelectedPage(void) const1188cdf0e10cSrcweir sal_uInt16 FrameView::GetSelectedPage (void) const
1189cdf0e10cSrcweir {
1190cdf0e10cSrcweir     return mnSelectedPage;
1191cdf0e10cSrcweir }
1192cdf0e10cSrcweir 
1193cdf0e10cSrcweir 
1194cdf0e10cSrcweir 
1195cdf0e10cSrcweir 
SetIsNavigatorShowingAllShapes(const bool bIsNavigatorShowingAllShapes)1196cdf0e10cSrcweir void FrameView::SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes)
1197cdf0e10cSrcweir {
1198cdf0e10cSrcweir     mbIsNavigatorShowingAllShapes = bIsNavigatorShowingAllShapes;
1199cdf0e10cSrcweir }
1200cdf0e10cSrcweir 
1201cdf0e10cSrcweir 
1202cdf0e10cSrcweir 
1203cdf0e10cSrcweir 
IsNavigatorShowingAllShapes(void) const1204cdf0e10cSrcweir bool FrameView::IsNavigatorShowingAllShapes (void) const
1205cdf0e10cSrcweir {
1206cdf0e10cSrcweir     return mbIsNavigatorShowingAllShapes;
1207cdf0e10cSrcweir }
1208cdf0e10cSrcweir 
1209cdf0e10cSrcweir 
1210cdf0e10cSrcweir } // end of namespace sd
1211