1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: frmview.cxx,v $
10 * $Revision: 1.38.108.1 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_sd.hxx"
34 #include "FrameView.hxx"
37 #include <svx/svxids.hrc>
39 #include <sfx2/topfrm.hxx>
40 #include <com/sun/star/awt/Rectangle.hpp>
41 #include <com/sun/star/drawing/framework/ResourceId.hpp>
42 #include <rtl/ustrbuf.hxx>
43 #include "unokywds.hxx"
46 #include "ViewShell.hxx"
47 #include "drawdoc.hxx"
48 #include "DrawDocShell.hxx"
49 #include "optsitem.hxx"
50 #include "ViewShellBase.hxx"
51 #include "DrawViewShell.hxx"
52 #include "OutlineViewShell.hxx"
54 #include "sdresid.hxx"
57 #include "sdiocmpt.hxx"
58 #include "framework/FrameworkHelper.hxx"
59 #include <comphelper/processfactory.hxx>
61 using namespace ::com::sun::star
;
62 using namespace ::com::sun::star::uno
;
63 using namespace ::com::sun::star::beans
;
64 using namespace ::std
;
65 using ::rtl::OUString
;
69 /*************************************************************************
73 \************************************************************************/
75 FrameView::FrameView(SdDrawDocument
* pDrawDoc
, FrameView
* pFrameView
/* = NULK */)
76 : SdrView(pDrawDoc
, (OutputDevice
*) NULL
),
78 mnPresViewShellId(SID_VIEWSHELL0
),
79 mnSlotId(SID_OBJECT_SELECT
),
80 mbIsNavigatorShowingAllShapes(false)
82 EndListening(*pDrawDoc
);
84 EnableExtendedKeyInputDispatcher(FALSE
);
85 EnableExtendedMouseEventDispatcher(FALSE
);
86 EnableExtendedCommandEventDispatcher(FALSE
);
88 SetGridFront( FALSE
);
89 SetHlplFront( FALSE
);
91 SetFrameDragSingles( TRUE
);
94 if( NULL
== pFrameView
)
96 DrawDocShell
* pDocShell
= pDrawDoc
->GetDocSh();
100 /**********************************************************************
101 * Das Dokument wurde geladen, ist eine FrameView vorhanden?
102 **********************************************************************/
103 ULONG nSdViewShellCount
= 0;
104 ViewShellBase
* pBase
= NULL
;
105 SfxViewShell
* pSfxViewSh
= NULL
;
106 SfxViewFrame
* pSfxViewFrame
= SfxViewFrame::GetFirst(pDocShell
,
107 TYPE(SfxTopViewFrame
));
109 while (pSfxViewFrame
)
111 // Count the FrameViews and remember the type of the main
113 pSfxViewSh
= pSfxViewFrame
->GetViewShell();
114 pBase
= PTR_CAST(ViewShellBase
, pSfxViewSh
);
120 ::rtl::OUString sViewURL
;
121 Reference
<drawing::framework::XView
> xView (
122 framework::FrameworkHelper::Instance(*pBase
)->GetView(
123 drawing::framework::ResourceId::create(
124 ::comphelper::getProcessComponentContext(),
125 framework::FrameworkHelper::msCenterPaneURL
)));
127 sViewURL
= xView
->getResourceId()->getResourceURL();
129 switch (framework::FrameworkHelper::GetViewId(sViewURL
))
132 // case ViewShell::ST_IMPRESS:
133 // case ViewShell::ST_NOTES:
134 // case ViewShell::ST_HANDOUT:
135 mnPresViewShellId
= SID_VIEWSHELL0
;
138 case ViewShell::ST_SLIDE_SORTER
:
139 mnPresViewShellId
= SID_VIEWSHELL1
;
142 case ViewShell::ST_OUTLINE
:
143 mnPresViewShellId
= SID_VIEWSHELL2
;
148 pSfxViewFrame
= SfxViewFrame::GetNext(*pSfxViewFrame
, pDocShell
,
149 TYPE(SfxTopViewFrame
));
152 SdDrawDocument
* pDoc
= pDocShell
->GetDoc();
153 pFrameView
= pDoc
->GetFrameView(nSdViewShellCount
);
159 /**********************************************************************
160 * FrameView mit der FrameView der DocShell initialisieren
161 **********************************************************************/
162 SetRuler( pFrameView
->HasRuler() );
163 SetGridCoarse( pFrameView
->GetGridCoarse() );
164 SetGridFine( pFrameView
->GetGridFine() );
165 SetSnapGridWidth(pFrameView
->GetSnapGridWidthX(), pFrameView
->GetSnapGridWidthY());
166 SetGridVisible( pFrameView
->IsGridVisible() );
167 SetGridFront( pFrameView
->IsGridFront() );
168 SetSnapAngle( pFrameView
->GetSnapAngle() );
169 SetGridSnap( pFrameView
->IsGridSnap() );
170 SetBordSnap( pFrameView
->IsBordSnap() );
171 SetHlplSnap( pFrameView
->IsHlplSnap() );
172 SetOFrmSnap( pFrameView
->IsOFrmSnap() );
173 SetOPntSnap( pFrameView
->IsOPntSnap() );
174 SetOConSnap( pFrameView
->IsOConSnap() );
175 SetHlplVisible( pFrameView
->IsHlplVisible() );
176 SetDragStripes( pFrameView
->IsDragStripes() );
177 SetPlusHandlesAlwaysVisible( pFrameView
->IsPlusHandlesAlwaysVisible() );
178 SetFrameDragSingles( pFrameView
->IsFrameDragSingles() );
179 SetSnapMagneticPixel( pFrameView
->GetSnapMagneticPixel() );
180 SetMarkedHitMovesAlways( pFrameView
->IsMarkedHitMovesAlways() );
181 SetMoveOnlyDragging( pFrameView
->IsMoveOnlyDragging() );
182 SetCrookNoContortion( pFrameView
->IsCrookNoContortion() );
183 SetSlantButShear( pFrameView
->IsSlantButShear() );
184 SetNoDragXorPolys( pFrameView
->IsNoDragXorPolys() );
185 SetAngleSnapEnabled( pFrameView
->IsAngleSnapEnabled() );
186 SetBigOrtho( pFrameView
->IsBigOrtho() );
187 SetOrtho( pFrameView
->IsOrtho() );
188 SetEliminatePolyPointLimitAngle( pFrameView
->GetEliminatePolyPointLimitAngle() );
189 SetEliminatePolyPoints( pFrameView
->IsEliminatePolyPoints() );
191 // SetMasterPagePaintCaching( pFrameView->IsMasterPagePaintCaching() );
192 SetDesignMode( pFrameView
->IsDesignMode() );
194 SetSolidMarkHdl( pFrameView
->IsSolidMarkHdl() );
195 SetSolidDragging( pFrameView
->IsSolidDragging() );
197 maVisibleLayers
= pFrameView
->GetVisibleLayers();
198 maPrintableLayers
= pFrameView
->GetPrintableLayers();
199 maLockedLayers
= pFrameView
->GetLockedLayers();
200 maStandardHelpLines
= pFrameView
->GetStandardHelpLines();
201 maNotesHelpLines
= pFrameView
->GetNotesHelpLines();
202 maHandoutHelpLines
= pFrameView
->GetHandoutHelpLines();
203 SetActiveLayer( pFrameView
->GetActiveLayer() );
204 mbNoColors
= pFrameView
->IsNoColors();
205 mbNoAttribs
= pFrameView
->IsNoAttribs() ;
206 maVisArea
= pFrameView
->GetVisArea();
207 mePageKind
= pFrameView
->GetPageKind();
208 mePageKindOnLoad
= pFrameView
->GetPageKindOnLoad();
209 mnSelectedPage
= pFrameView
->GetSelectedPage();
210 mnSelectedPageOnLoad
= pFrameView
->GetSelectedPageOnLoad();
211 meStandardEditMode
= pFrameView
->GetViewShEditMode(PK_STANDARD
);
212 meNotesEditMode
= pFrameView
->GetViewShEditMode(PK_NOTES
);
213 meHandoutEditMode
= pFrameView
->GetViewShEditMode(PK_HANDOUT
);
214 SetViewShEditModeOnLoad(pFrameView
->GetViewShEditModeOnLoad());
215 mbLayerMode
= pFrameView
->IsLayerMode();
216 mbQuickEdit
= pFrameView
->IsQuickEdit();
219 SetMasterPagePaintCaching( pFrameView
->IsMasterPagePaintCaching() );
221 SetDragWithCopy( pFrameView
->IsDragWithCopy() );
222 mbBigHandles
= pFrameView
->IsBigHandles();
223 mbDoubleClickTextEdit
= pFrameView
->IsDoubleClickTextEdit();
224 mbClickChangeRotation
= pFrameView
->IsClickChangeRotation();
225 mnSlidesPerRow
= pFrameView
->GetSlidesPerRow();
226 mnDrawMode
= pFrameView
->GetDrawMode();
227 mnTabCtrlPercent
= pFrameView
->GetTabCtrlPercent();
228 mbIsNavigatorShowingAllShapes
= pFrameView
->IsNavigatorShowingAllShapes();
229 SetPreviousViewShellType (pFrameView
->GetPreviousViewShellType());
230 SetViewShellTypeOnLoad (pFrameView
->GetViewShellTypeOnLoad());
234 /**********************************************************************
235 * FrameView mit den Applikationsdaten initialisieren
236 **********************************************************************/
237 maVisibleLayers
.SetAll();
238 maPrintableLayers
.SetAll();
239 SetGridCoarse( Size( 1000, 1000 ) );
240 SetSnapGridWidth(Fraction(1000, 1), Fraction(1000, 1));
241 SetActiveLayer( String( SdResId(STR_LAYER_LAYOUT
) ) );
244 maVisArea
= Rectangle( Point(), Size(0, 0) );
245 mePageKind
= PK_STANDARD
;
246 mePageKindOnLoad
= PK_STANDARD
;
248 mnSelectedPageOnLoad
= 0;
249 meStandardEditMode
= EM_PAGE
;
250 meNotesEditMode
= EM_PAGE
;
251 meHandoutEditMode
= EM_MASTERPAGE
;
252 SetViewShEditModeOnLoad(EM_PAGE
);
254 SetEliminatePolyPoints(FALSE
);
255 mbBigHandles
= FALSE
;
256 mbDoubleClickTextEdit
= FALSE
;
257 mbClickChangeRotation
= FALSE
;
261 bool bUseContrast
= Application::GetSettings().GetStyleSettings().GetHighContrastMode();
262 mnDrawMode
= bUseContrast
? OUTPUT_DRAWMODE_CONTRAST
: OUTPUT_DRAWMODE_COLOR
;
264 mnTabCtrlPercent
= 0.0;
265 mbIsNavigatorShowingAllShapes
= false;
266 SetPreviousViewShellType (ViewShell::ST_NONE
);
267 SetViewShellTypeOnLoad (ViewShell::ST_IMPRESS
);
269 // get default for design mode
270 sal_Bool bInitDesignMode
= pDrawDoc
->GetOpenInDesignMode();
271 if( pDrawDoc
->OpenInDesignModeIsDefaulted() )
273 bInitDesignMode
= sal_True
;
276 SfxObjectShell
* pObjShell
= pDrawDoc
->GetObjectShell();
277 if( pObjShell
&& pObjShell
->IsReadOnly() )
278 bInitDesignMode
= sal_False
;
279 SetDesignMode( bInitDesignMode
);
281 Update( SD_MOD()->GetSdOptions(pDrawDoc
->GetDocumentType()) );
286 /*************************************************************************
290 \************************************************************************/
292 FrameView::~FrameView()
297 /*************************************************************************
299 |* Verbindung herstellen
301 \************************************************************************/
303 void FrameView::Connect()
309 /*************************************************************************
313 \************************************************************************/
315 void FrameView::Disconnect()
328 /*************************************************************************
330 |* Update mit Daten der SdOptions
332 \************************************************************************/
334 void FrameView::Update(SdOptions
* pOptions
)
338 mbRuler
= pOptions
->IsRulerVisible();
339 SetGridVisible( pOptions
->IsGridVisible() );
340 SetSnapAngle( pOptions
->GetAngle() );
341 SetGridSnap( pOptions
->IsUseGridSnap() );
342 SetBordSnap( pOptions
->IsSnapBorder() );
343 SetHlplSnap( pOptions
->IsSnapHelplines() );
344 SetOFrmSnap( pOptions
->IsSnapFrame() );
345 SetOPntSnap( pOptions
->IsSnapPoints() );
346 SetHlplVisible( pOptions
->IsHelplines() );
347 SetDragStripes( pOptions
->IsDragStripes() );
348 SetPlusHandlesAlwaysVisible( pOptions
->IsHandlesBezier() );
349 SetSnapMagneticPixel( pOptions
->GetSnapArea() );
350 SetMarkedHitMovesAlways( pOptions
->IsMarkedHitMovesAlways() );
351 SetMoveOnlyDragging( pOptions
->IsMoveOnlyDragging() );
352 SetSlantButShear( pOptions
->IsMoveOnlyDragging() );
353 SetNoDragXorPolys ( !pOptions
->IsMoveOutline() );
354 SetCrookNoContortion( pOptions
->IsCrookNoContortion() );
355 SetAngleSnapEnabled( pOptions
->IsRotate() );
356 SetBigOrtho( pOptions
->IsBigOrtho() );
357 SetOrtho( pOptions
->IsOrtho() );
358 SetEliminatePolyPointLimitAngle( pOptions
->GetEliminatePolyPointLimitAngle() );
360 // SetMasterPagePaintCaching( pOptions->IsMasterPagePaintCaching() );
361 GetModel()->SetPickThroughTransparentTextFrames( pOptions
->IsPickThrough() );
363 SetSolidMarkHdl( pOptions
->IsSolidMarkHdl() );
364 SetSolidDragging( pOptions
->IsSolidDragging() );
366 SetGridCoarse( Size( pOptions
->GetFldDrawX(), pOptions
->GetFldDrawY() ) );
367 SetGridFine( Size( pOptions
->GetFldDivisionX(), pOptions
->GetFldDivisionY() ) );
368 Fraction
aFractX(pOptions
->GetFldDrawX(), pOptions
->GetFldDrawX() / ( pOptions
->GetFldDivisionX() ? pOptions
->GetFldDivisionX() : 1 ));
369 Fraction
aFractY(pOptions
->GetFldDrawY(), pOptions
->GetFldDrawY() / ( pOptions
->GetFldDivisionY() ? pOptions
->GetFldDivisionY() : 1 ));
370 SetSnapGridWidth(aFractX
, aFractY
);
371 SetQuickEdit(pOptions
->IsQuickEdit());
374 SetMasterPagePaintCaching( pOptions
->IsMasterPagePaintCaching() );
376 SetDragWithCopy(pOptions
->IsDragWithCopy());
377 SetBigHandles( pOptions
->IsBigHandles() );
378 SetDoubleClickTextEdit( pOptions
->IsDoubleClickTextEdit() );
379 SetClickChangeRotation( pOptions
->IsClickChangeRotation() );
384 /*************************************************************************
386 |* EditMode (Page oder MasterPage) des Arbeitsmodus setzen
388 \************************************************************************/
390 void FrameView::SetViewShEditMode(EditMode eMode
, PageKind eKind
)
392 if (eKind
== PK_STANDARD
)
394 meStandardEditMode
= eMode
;
396 else if (eKind
== PK_NOTES
)
398 meNotesEditMode
= eMode
;
400 else if (eKind
== PK_HANDOUT
)
402 meHandoutEditMode
= eMode
;
407 /*************************************************************************
409 |* EditMode (Page oder MasterPage) des Arbeitsmodus zurueckgeben
411 \************************************************************************/
413 EditMode
FrameView::GetViewShEditMode(PageKind eKind
)
415 EditMode eMode
= EM_PAGE
;
417 if (eKind
== PK_STANDARD
)
419 eMode
= meStandardEditMode
;
421 else if (eKind
== PK_NOTES
)
423 eMode
= meNotesEditMode
;
425 else if (eKind
== PK_HANDOUT
)
427 eMode
= meHandoutEditMode
;
436 void FrameView::SetViewShEditModeOnLoad (EditMode eMode
)
438 meEditModeOnLoad
= eMode
;
444 EditMode
FrameView::GetViewShEditModeOnLoad (void) const
446 return meEditModeOnLoad
;
452 static OUString
createHelpLinesString( const SdrHelpLineList
& rHelpLines
)
454 ::rtl::OUStringBuffer aLines
;
456 const USHORT nCount
= rHelpLines
.GetCount();
457 for( USHORT nHlpLine
= 0; nHlpLine
< nCount
; nHlpLine
++ )
459 const SdrHelpLine
& rHelpLine
= rHelpLines
[nHlpLine
];
460 const Point
& rPos
= rHelpLine
.GetPos();
462 switch( rHelpLine
.GetKind() )
464 case SDRHELPLINE_POINT
:
465 aLines
.append( (sal_Unicode
)'P' );
466 aLines
.append( (sal_Int32
)rPos
.X() );
467 aLines
.append( (sal_Unicode
)',' );
468 aLines
.append( (sal_Int32
)rPos
.Y() );
470 case SDRHELPLINE_VERTICAL
:
471 aLines
.append( (sal_Unicode
)'V' );
472 aLines
.append( (sal_Int32
)rPos
.X() );
474 case SDRHELPLINE_HORIZONTAL
:
475 aLines
.append( (sal_Unicode
)'H' );
476 aLines
.append( (sal_Int32
)rPos
.Y() );
479 DBG_ERROR( "Unsupported helpline Kind!" );
483 return aLines
.makeStringAndClear();
486 #define addValue( n, v ) push_back( std::pair< OUString, Any >( OUString( RTL_CONSTASCII_USTRINGPARAM( n ) ), v ) )
487 void FrameView::WriteUserDataSequence ( ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rValues
, sal_Bool
)
489 std::vector
< std::pair
< OUString
, Any
> > aUserData
;
491 aUserData
.addValue( sUNO_View_GridIsVisible
, makeAny( (sal_Bool
)IsGridVisible() ) );
492 aUserData
.addValue( sUNO_View_GridIsFront
, makeAny( (sal_Bool
)IsGridFront() ) );
493 aUserData
.addValue( sUNO_View_IsSnapToGrid
, makeAny( (sal_Bool
)IsGridSnap() ) );
494 aUserData
.addValue( sUNO_View_IsSnapToPageMargins
, makeAny( (sal_Bool
)IsBordSnap() ) );
495 aUserData
.addValue( sUNO_View_IsSnapToSnapLines
, makeAny( (sal_Bool
)IsHlplSnap() ) );
496 aUserData
.addValue( sUNO_View_IsSnapToObjectFrame
, makeAny( (sal_Bool
)IsOFrmSnap() ) );
497 aUserData
.addValue( sUNO_View_IsSnapToObjectPoints
, makeAny( (sal_Bool
)IsOPntSnap() ) );
499 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsSnapLinesVisible ) );
500 // pValue->Value <<= (sal_Bool)IsHlplVisible();
501 // pValue++;nIndex++;
503 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsDragStripes ) );
504 // pValue->Value <<= (sal_Bool)IsDragStripes();
505 // pValue++;nIndex++;
507 aUserData
.addValue( sUNO_View_IsPlusHandlesAlwaysVisible
, makeAny( (sal_Bool
)IsPlusHandlesAlwaysVisible() ) );
508 aUserData
.addValue( sUNO_View_IsFrameDragSingles
, makeAny( (sal_Bool
)IsFrameDragSingles() ) );
510 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsMarkedHitMovesAlways ) );
511 // pValue->Value <<= (sal_Bool)IsMarkedHitMovesAlways();
512 // pValue++;nIndex++;
514 aUserData
.addValue( sUNO_View_EliminatePolyPointLimitAngle
, makeAny( (sal_Int32
)GetEliminatePolyPointLimitAngle() ) );
515 aUserData
.addValue( sUNO_View_IsEliminatePolyPoints
, makeAny( (sal_Bool
)IsEliminatePolyPoints() ) );
517 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsLineDraft ) );
518 // pValue->Value <<= (sal_Bool)IsLineDraft();
519 // pValue++;nIndex++;
521 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsFillDraft ) );
522 // pValue->Value <<= (sal_Bool)IsFillDraft();
523 // pValue++;nIndex++;
525 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsTextDraft ) );
526 // pValue->Value <<= (sal_Bool)IsTextDraft();
527 // pValue++;nIndex++;
529 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsGrafDraft ) );
530 // pValue->Value <<= (sal_Bool)IsGrafDraft();
531 // pValue++;nIndex++;
534 GetVisibleLayers().QueryValue( aAny
);
535 aUserData
.addValue( sUNO_View_VisibleLayers
, aAny
);
537 GetPrintableLayers().QueryValue( aAny
);
538 aUserData
.addValue( sUNO_View_PrintableLayers
, aAny
);
540 GetLockedLayers().QueryValue( aAny
);
541 aUserData
.addValue( sUNO_View_LockedLayers
, aAny
);
543 aUserData
.addValue( sUNO_View_NoAttribs
, makeAny( (sal_Bool
)IsNoAttribs() ) );
544 aUserData
.addValue( sUNO_View_NoColors
, makeAny( (sal_Bool
)IsNoColors() ) );
546 if( GetStandardHelpLines().GetCount() )
547 aUserData
.addValue( sUNO_View_SnapLinesDrawing
, makeAny( createHelpLinesString( GetStandardHelpLines() ) ) );
549 if( GetNotesHelpLines().GetCount() )
550 aUserData
.addValue( sUNO_View_SnapLinesNotes
, makeAny( createHelpLinesString( GetNotesHelpLines() ) ) );
552 if( GetHandoutHelpLines().GetCount() )
553 aUserData
.addValue( sUNO_View_SnapLinesHandout
, makeAny( createHelpLinesString( GetHandoutHelpLines() ) ) );
555 aUserData
.addValue( sUNO_View_RulerIsVisible
, makeAny( (sal_Bool
)HasRuler() ) );
556 aUserData
.addValue( sUNO_View_PageKind
, makeAny( (sal_Int16
)GetPageKind() ) );
557 aUserData
.addValue( sUNO_View_SelectedPage
, makeAny( (sal_Int16
)GetSelectedPage() ) );
558 aUserData
.addValue( sUNO_View_IsLayerMode
, makeAny( (sal_Bool
)IsLayerMode() ) );
560 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsQuickEdit ) );
561 // pValue->Value <<= (sal_Bool)IsQuickEdit();
562 // pValue++;nIndex++;
564 aUserData
.addValue( sUNO_View_IsBigHandles
, makeAny( (sal_Bool
)IsBigHandles() ) );
565 aUserData
.addValue( sUNO_View_IsDoubleClickTextEdit
, makeAny( (sal_Bool
)IsDoubleClickTextEdit() ) );
566 aUserData
.addValue( sUNO_View_IsClickChangeRotation
, makeAny( (sal_Bool
)IsClickChangeRotation() ) );
568 // pValue->Name = rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( sUNO_View_IsDragWithCopy ) );
569 // pValue->Value <<= (sal_Bool)IsDragWithCopy();
570 // pValue++;nIndex++;
572 aUserData
.addValue( sUNO_View_SlidesPerRow
, makeAny( (sal_Int16
)GetSlidesPerRow() ) );
573 /* #107128# Product managment decided to not make this persistent
574 aUserData.addValue( sUNO_View_DrawMode, makeAny( (sal_Int32)GetDrawMode() ) );
575 aUserData.addValue( sUNO_View_PreviewDrawMode, makeAny( (sal_Int32)GetPreviewDrawMode() ) );
577 aUserData
.addValue( sUNO_View_EditModeStandard
, makeAny( (sal_Int32
)GetViewShEditMode( PK_STANDARD
) ) );
578 aUserData
.addValue( sUNO_View_EditModeNotes
, makeAny( (sal_Int32
)GetViewShEditMode( PK_NOTES
) ) );
579 aUserData
.addValue( sUNO_View_EditModeHandout
, makeAny( (sal_Int32
)GetViewShEditMode( PK_HANDOUT
) ) );
582 const Rectangle aVisArea
= GetVisArea();
584 aUserData
.addValue( sUNO_View_VisibleAreaTop
, makeAny( (sal_Int32
)aVisArea
.Top() ) );
585 aUserData
.addValue( sUNO_View_VisibleAreaLeft
, makeAny( (sal_Int32
)aVisArea
.Left() ) );
586 aUserData
.addValue( sUNO_View_VisibleAreaWidth
, makeAny( (sal_Int32
)aVisArea
.GetWidth() ) );
587 aUserData
.addValue( sUNO_View_VisibleAreaHeight
, makeAny( (sal_Int32
)aVisArea
.GetHeight() ) );
590 aUserData
.addValue( sUNO_View_GridCoarseWidth
, makeAny( (sal_Int32
)GetGridCoarse().Width() ) );
591 aUserData
.addValue( sUNO_View_GridCoarseHeight
, makeAny( (sal_Int32
)GetGridCoarse().Height() ) );
592 aUserData
.addValue( sUNO_View_GridFineWidth
, makeAny( (sal_Int32
)GetGridFine().Width() ) );
593 aUserData
.addValue( sUNO_View_GridFineHeight
, makeAny( (sal_Int32
)GetGridFine().Height() ) );
594 aUserData
.addValue( sUNO_View_GridSnapWidthXNumerator
, makeAny( (sal_Int32
)GetSnapGridWidthX().GetNumerator() ) );
595 aUserData
.addValue( sUNO_View_GridSnapWidthXDenominator
, makeAny( (sal_Int32
)GetSnapGridWidthX().GetDenominator() ) );
596 aUserData
.addValue( sUNO_View_GridSnapWidthYNumerator
, makeAny( (sal_Int32
)GetSnapGridWidthY().GetNumerator() ) );
597 aUserData
.addValue( sUNO_View_GridSnapWidthYDenominator
, makeAny( (sal_Int32
)GetSnapGridWidthY().GetDenominator() ) );
598 aUserData
.addValue( sUNO_View_IsAngleSnapEnabled
, makeAny( (sal_Bool
)IsAngleSnapEnabled() ) );
599 aUserData
.addValue( sUNO_View_SnapAngle
, makeAny( (sal_Int32
)GetSnapAngle() ) );
601 const sal_Int32 nOldLength
= rValues
.getLength();
602 rValues
.realloc( nOldLength
+ aUserData
.size() );
604 PropertyValue
* pValue
= &(rValues
.getArray()[nOldLength
]);
606 std::vector
< std::pair
< OUString
, Any
> >::iterator
aIter( aUserData
.begin() );
607 for( ; aIter
!= aUserData
.end(); aIter
++, pValue
++ )
609 pValue
->Name
= (*aIter
).first
;
610 pValue
->Value
= (*aIter
).second
;
615 static void createHelpLinesFromString( const rtl::OUString
& rLines
, SdrHelpLineList
& rHelpLines
)
617 const sal_Unicode
* pStr
= rLines
.getStr();
618 SdrHelpLine aNewHelpLine
;
619 rtl::OUStringBuffer sBuffer
;
627 case (sal_Unicode
)'P':
628 aNewHelpLine
.SetKind( SDRHELPLINE_POINT
);
630 case (sal_Unicode
)'V':
631 aNewHelpLine
.SetKind( SDRHELPLINE_VERTICAL
);
633 case (sal_Unicode
)'H':
634 aNewHelpLine
.SetKind( SDRHELPLINE_HORIZONTAL
);
637 DBG_ERROR( "syntax error in snap lines settings string" );
643 while( (*pStr
>= sal_Unicode('0') && *pStr
<= sal_Unicode('9')) || (*pStr
== '+') || (*pStr
== '-') )
645 sBuffer
.append( *pStr
++ );
648 sal_Int32 nValue
= sBuffer
.makeStringAndClear().toInt32();
650 if( aNewHelpLine
.GetKind() == SDRHELPLINE_HORIZONTAL
)
658 if( aNewHelpLine
.GetKind() == SDRHELPLINE_POINT
)
663 while( (*pStr
>= sal_Unicode('0') && *pStr
<= sal_Unicode('9')) || (*pStr
== '+') || (*pStr
== '-') )
665 sBuffer
.append( *pStr
++ );
668 aPoint
.Y() = sBuffer
.makeStringAndClear().toInt32();
673 aNewHelpLine
.SetPos( aPoint
);
674 rHelpLines
.Insert( aNewHelpLine
);
678 void FrameView::ReadUserDataSequence ( const ::com::sun::star::uno::Sequence
< ::com::sun::star::beans::PropertyValue
>& rSequence
, sal_Bool
)
680 const sal_Int32 nLength
= rSequence
.getLength();
683 const bool bImpress
= dynamic_cast< SdDrawDocument
* >(GetModel())->GetDocumentType() == DOCUMENT_TYPE_IMPRESS
;
685 sal_Bool bBool
= sal_False
;
686 sal_Int32 nInt32
= 0;
687 sal_Int16 nInt16
= 0;
688 rtl::OUString aString
;
690 sal_Int32 aSnapGridWidthXNum
= GetSnapGridWidthX().GetNumerator();
691 sal_Int32 aSnapGridWidthXDom
= GetSnapGridWidthX().GetDenominator();
693 sal_Int32 aSnapGridWidthYNum
= GetSnapGridWidthY().GetNumerator();
694 sal_Int32 aSnapGridWidthYDom
= GetSnapGridWidthY().GetDenominator();
696 EditMode eStandardEditMode
;
697 EditMode eNotesEditMode
;
698 EditMode eHandoutEditMode
;
700 const com::sun::star::beans::PropertyValue
*pValue
= rSequence
.getConstArray();
701 for (sal_Int16 i
= 0 ; i
< nLength
; i
++, pValue
++ )
703 if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ViewId
) ) )
706 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesDrawing
) ) )
708 if( pValue
->Value
>>= aString
)
710 SdrHelpLineList aHelpLines
;
711 createHelpLinesFromString( aString
, aHelpLines
);
712 SetStandardHelpLines( aHelpLines
);
715 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesNotes
) ) )
717 if( pValue
->Value
>>= aString
)
719 SdrHelpLineList aHelpLines
;
720 createHelpLinesFromString( aString
, aHelpLines
);
721 SetNotesHelpLines( aHelpLines
);
724 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapLinesHandout
) ) )
726 if( pValue
->Value
>>= aString
)
728 SdrHelpLineList aHelpLines
;
729 createHelpLinesFromString( aString
, aHelpLines
);
730 SetHandoutHelpLines( aHelpLines
);
733 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_RulerIsVisible
) ) )
735 if( pValue
->Value
>>= bBool
)
740 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PageKind
) ) )
742 if( pValue
->Value
>>= nInt16
)
744 SdDrawDocument
* pDoc
= dynamic_cast< SdDrawDocument
* >( GetModel() );
745 if( pDoc
&& pDoc
->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED
== pDoc
->GetDocSh()->GetCreateMode() ) )
746 SetPageKind( (PageKind
)nInt16
);
748 SetPageKindOnLoad( (PageKind
)nInt16
);
751 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SelectedPage
) ) )
753 if( pValue
->Value
>>= nInt16
)
755 SdDrawDocument
* pDoc
= dynamic_cast< SdDrawDocument
* >( GetModel() );
756 if( pDoc
&& pDoc
->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED
== pDoc
->GetDocSh()->GetCreateMode() ) )
757 SetSelectedPage( (USHORT
)nInt16
);
759 SetSelectedPageOnLoad( (USHORT
)nInt16
);
762 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLayerMode
) ) )
764 if( pValue
->Value
>>= bBool
)
766 SetLayerMode( bBool
);
769 /* else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsQuickEdit ) ) )
771 if( pValue->Value >>= bBool )
773 SetQuickEdit( bBool );
776 */ else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsBigHandles
) ) )
778 if( pValue
->Value
>>= bBool
)
780 SetBigHandles( bBool
);
783 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDoubleClickTextEdit
) ) )
785 if( pValue
->Value
>>= bBool
)
787 SetDoubleClickTextEdit( bBool
);
790 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsClickChangeRotation
) ) )
792 if( pValue
->Value
>>= bBool
)
794 SetClickChangeRotation( bBool
);
797 /* else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDragWithCopy ) ) )
799 if( pValue->Value >>= bBool )
801 SetDragWithCopy( bBool );
804 */ else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SlidesPerRow
) ) )
806 if( pValue
->Value
>>= nInt16
)
808 SetSlidesPerRow( (USHORT
)nInt16
);
811 /* #107128# Product managment decided to not make this persistent
812 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_DrawMode ) ) )
814 if( pValue->Value >>= nInt32 )
816 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
817 if( rStyleSettings.GetHighContrastMode() )
819 SetDrawMode( (ULONG)nInt32 );
822 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PreviewDrawMode ) ) )
824 if( pValue->Value >>= nInt32 )
826 const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
827 SvtAccessibilityOptions aAccOptions;
828 if( rStyleSettings.GetHighContrastMode() && aAccOptions.GetIsForPagePreviews() )
830 SetPreviewDrawMode( (ULONG)nInt32 );
834 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeStandard
) ) )
836 if( pValue
->Value
>>= nInt32
)
838 SdDrawDocument
* pDoc
= dynamic_cast< SdDrawDocument
* >( GetModel() );
839 if( pDoc
&& pDoc
->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED
== pDoc
->GetDocSh()->GetCreateMode() ) )
840 SetViewShEditMode( (EditMode
)nInt32
, PK_STANDARD
);
841 eStandardEditMode
= (EditMode
)nInt32
;
844 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeNotes
) ) )
846 if( pValue
->Value
>>= nInt32
)
848 SdDrawDocument
* pDoc
= dynamic_cast< SdDrawDocument
* >( GetModel() );
849 if( pDoc
&& pDoc
->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED
== pDoc
->GetDocSh()->GetCreateMode() ) )
850 SetViewShEditMode( (EditMode
)nInt32
, PK_NOTES
);
851 eNotesEditMode
= (EditMode
)nInt32
;
854 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EditModeHandout
) ) )
856 if( pValue
->Value
>>= nInt32
)
858 SdDrawDocument
* pDoc
= dynamic_cast< SdDrawDocument
* >( GetModel() );
859 if( pDoc
&& pDoc
->GetDocSh() && ( SFX_CREATE_MODE_EMBEDDED
== pDoc
->GetDocSh()->GetCreateMode() ) )
860 SetViewShEditMode( (EditMode
)nInt32
, PK_HANDOUT
);
861 eHandoutEditMode
= (EditMode
)nInt32
;
864 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaTop
) ) )
867 if( pValue
->Value
>>= nTop
)
869 Rectangle
aVisArea( GetVisArea() );
870 aVisArea
.nBottom
+= nTop
- aVisArea
.nTop
;
871 aVisArea
.nTop
= nTop
;
872 SetVisArea( aVisArea
);
875 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaLeft
) ) )
878 if( pValue
->Value
>>= nLeft
)
880 Rectangle
aVisArea( GetVisArea() );
881 aVisArea
.nRight
+= nLeft
- aVisArea
.nLeft
;
882 aVisArea
.nLeft
= nLeft
;
883 SetVisArea( aVisArea
);
886 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaWidth
) ) )
888 sal_Int32 nWidth
= 0;
889 if( (pValue
->Value
>>= nWidth
) && nWidth
> 0 )
891 Rectangle
aVisArea( GetVisArea() );
892 aVisArea
.nRight
= aVisArea
.nLeft
+ nWidth
- 1;
893 SetVisArea( aVisArea
);
896 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleAreaHeight
) ) )
898 sal_Int32 nHeight
= 0;
899 if( (pValue
->Value
>>= nHeight
) && nHeight
> 0 )
901 Rectangle
aVisArea( GetVisArea() );
902 aVisArea
.nBottom
= nHeight
+ aVisArea
.nTop
- 1;
903 SetVisArea( aVisArea
);
907 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsVisible
) ) )
909 if( pValue
->Value
>>= bBool
)
911 SetGridVisible( bBool
);
915 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToGrid
) ) )
917 if( pValue
->Value
>>= bBool
)
919 SetGridSnap( bBool
);
922 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridIsFront
) ) )
924 if( pValue
->Value
>>= bBool
)
926 SetGridFront( bBool
);
929 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToPageMargins
) ) )
931 if( pValue
->Value
>>= bBool
)
933 SetBordSnap( bBool
);
936 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToSnapLines
) ) )
938 if( pValue
->Value
>>= bBool
)
940 SetHlplSnap( bBool
);
943 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectFrame
) ) )
945 if( pValue
->Value
>>= bBool
)
947 SetOFrmSnap( bBool
);
950 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapToObjectPoints
) ) )
952 if( pValue
->Value
>>= bBool
)
954 SetOPntSnap( bBool
);
957 /* else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsSnapLinesVisible ) ) )
959 if( pValue->Value >>= bBool )
961 SetHlplVisible( bBool );
964 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsDragStripes ) ) )
966 if( pValue->Value >>= bBool )
968 SetDragStripes( bBool );
971 */ else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsPlusHandlesAlwaysVisible
) ) )
973 if( pValue
->Value
>>= bBool
)
975 SetPlusHandlesAlwaysVisible( bBool
);
978 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsFrameDragSingles
) ) )
980 if( pValue
->Value
>>= bBool
)
982 SetFrameDragSingles( bBool
);
985 /* else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsMarkedHitMovesAlways ) ) )
987 if( pValue->Value >>= bBool )
989 SetMarkedHitMovesAlways( bBool );
992 */ else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_EliminatePolyPointLimitAngle
) ) )
994 if( pValue
->Value
>>= nInt32
)
996 SetEliminatePolyPointLimitAngle( nInt32
);
999 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsEliminatePolyPoints
) ) )
1001 if( pValue
->Value
>>= bBool
)
1003 SetEliminatePolyPoints( bBool
);
1007 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsLineDraft ) ) )
1009 if( pValue->Value >>= bBool )
1011 SetLineDraft( bBool );
1014 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsFillDraft ) ) )
1016 if( pValue->Value >>= bBool )
1018 SetFillDraft( bBool );
1021 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsTextDraft ) ) )
1023 if( pValue->Value >>= bBool )
1025 SetTextDraft( bBool );
1028 else if (pValue->Name.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsGrafDraft ) ) )
1030 if( pValue->Value >>= bBool )
1032 SetGrafDraft( bBool );
1036 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_ActiveLayer
) ) )
1038 if( pValue
->Value
>>= aString
)
1040 SetActiveLayer( aString
);
1043 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoAttribs
) ) )
1045 if( pValue
->Value
>>= bBool
)
1047 SetNoAttribs( bBool
);
1050 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_NoColors
) ) )
1052 if( pValue
->Value
>>= bBool
)
1054 SetNoColors( bBool
);
1057 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseWidth
) ) )
1059 if( pValue
->Value
>>= nInt32
)
1061 const Size
aCoarse( nInt32
, GetGridCoarse().Height() );
1062 SetGridCoarse( aCoarse
);
1065 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridCoarseHeight
) ) )
1067 if( pValue
->Value
>>= nInt32
)
1069 const Size
aCoarse( GetGridCoarse().Width(), nInt32
);
1070 SetGridCoarse( aCoarse
);
1073 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineWidth
) ) )
1075 if( pValue
->Value
>>= nInt32
)
1077 const Size
aCoarse( nInt32
, GetGridFine().Height() );
1078 SetGridFine( aCoarse
);
1081 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridFineHeight
) ) )
1083 if( pValue
->Value
>>= nInt32
)
1085 const Size
aCoarse( GetGridFine().Width(), nInt32
);
1086 SetGridFine( aCoarse
);
1089 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_IsAngleSnapEnabled
) ) )
1091 if( pValue
->Value
>>= bBool
)
1093 SetAngleSnapEnabled( bBool
);
1096 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_SnapAngle
) ) )
1098 if( pValue
->Value
>>= nInt32
)
1100 SetSnapAngle( nInt32
);
1103 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXNumerator
) ) )
1105 pValue
->Value
>>= aSnapGridWidthXNum
;
1107 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthXDenominator
) ) )
1109 pValue
->Value
>>= aSnapGridWidthXDom
;
1111 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYNumerator
) ) )
1113 pValue
->Value
>>= aSnapGridWidthYNum
;
1115 else if (pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_GridSnapWidthYDenominator
) ) )
1117 pValue
->Value
>>= aSnapGridWidthYDom
;
1119 else if (!bImpress
&& pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_VisibleLayers
) ) )
1121 SetOfByte aSetOfBytes
;
1122 aSetOfBytes
.PutValue( pValue
->Value
);
1123 SetVisibleLayers( aSetOfBytes
);
1125 else if (!bImpress
&& pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_PrintableLayers
) ) )
1127 SetOfByte aSetOfBytes
;
1128 aSetOfBytes
.PutValue( pValue
->Value
);
1129 SetPrintableLayers( aSetOfBytes
);
1131 else if (!bImpress
&& pValue
->Name
.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( sUNO_View_LockedLayers
) ) )
1133 SetOfByte aSetOfBytes
;
1134 aSetOfBytes
.PutValue( pValue
->Value
);
1135 SetLockedLayers( aSetOfBytes
);
1139 switch (GetPageKindOnLoad())
1141 case PK_STANDARD
: SetViewShEditModeOnLoad(meStandardEditMode
); break;
1142 case PK_NOTES
: SetViewShEditModeOnLoad(meNotesEditMode
); break;
1143 case PK_HANDOUT
: SetViewShEditModeOnLoad(meHandoutEditMode
); break;
1144 default: SetViewShEditModeOnLoad(EM_PAGE
); break;
1147 const Fraction
aSnapGridWidthX( aSnapGridWidthXNum
, aSnapGridWidthXDom
);
1148 const Fraction
aSnapGridWidthY( aSnapGridWidthYNum
, aSnapGridWidthYDom
);
1150 SetSnapGridWidth( aSnapGridWidthX
, aSnapGridWidthY
);
1157 void FrameView::SetPreviousViewShellType (ViewShell::ShellType eType
)
1159 mePreviousViewShellType
= eType
;
1165 ViewShell::ShellType
FrameView::GetPreviousViewShellType (void) const
1167 return mePreviousViewShellType
;
1173 void FrameView::SetViewShellTypeOnLoad (ViewShell::ShellType eType
)
1175 meViewShellTypeOnLoad
= eType
;
1181 ViewShell::ShellType
FrameView::GetViewShellTypeOnLoad (void) const
1183 return meViewShellTypeOnLoad
;
1189 void FrameView::SetSelectedPage(USHORT nPage
)
1191 mnSelectedPage
= nPage
;
1197 USHORT
FrameView::GetSelectedPage (void) const
1199 return mnSelectedPage
;
1205 void FrameView::SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes
)
1207 mbIsNavigatorShowingAllShapes
= bIsNavigatorShowingAllShapes
;
1213 bool FrameView::IsNavigatorShowingAllShapes (void) const
1215 return mbIsNavigatorShowingAllShapes
;
1219 } // end of namespace sd