Coverage Report

Created: 2026-10-14 09:33

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sd/source/ui/view/frmview.cxx
Line
Count
Source
1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/*
3
 * This file is part of the LibreOffice project.
4
 *
5
 * This Source Code Form is subject to the terms of the Mozilla Public
6
 * License, v. 2.0. If a copy of the MPL was not distributed with this
7
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
8
 *
9
 * This file incorporates work covered by the following license notice:
10
 *
11
 *   Licensed to the Apache Software Foundation (ASF) under one or more
12
 *   contributor license agreements. See the NOTICE file distributed
13
 *   with this work for additional information regarding copyright
14
 *   ownership. The ASF licenses this file to you under the Apache
15
 *   License, Version 2.0 (the "License"); you may not use this file
16
 *   except in compliance with the License. You may obtain a copy of
17
 *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
18
 */
19
20
#include <FrameView.hxx>
21
22
#include <svx/svxids.hrc>
23
#include <framework/AbstractView.hxx>
24
#include <rtl/ustrbuf.hxx>
25
#include <unokywds.hxx>
26
#include <vcl/settings.hxx>
27
#include <vcl/svapp.hxx>
28
#include <o3tl/string_view.hxx>
29
#include <osl/diagnose.h>
30
31
#include <vector>
32
#include <ViewShell.hxx>
33
#include <drawdoc.hxx>
34
#include <DrawDocShell.hxx>
35
#include <optsitem.hxx>
36
#include <ViewShellBase.hxx>
37
#include <sdmod.hxx>
38
#include <pres.hxx>
39
#include <ResourceId.hxx>
40
#include <framework/FrameworkHelper.hxx>
41
#include <comphelper/processfactory.hxx>
42
#include <sfx2/viewfrm.hxx>
43
#include <officecfg/Office/Common.hxx>
44
#include <officecfg/Office/Draw.hxx>
45
#include <officecfg/Office/Impress.hxx>
46
47
using namespace ::com::sun::star;
48
using namespace ::com::sun::star::uno;
49
using namespace ::com::sun::star::beans;
50
51
namespace sd {
52
53
FrameView::FrameView(SdDrawDocument* pDrawDoc, FrameView* pFrameView /* = NULL */)
54
10.2k
:   SdrView(*pDrawDoc, nullptr), // TTTT SdDrawDocument* -> should be reference
55
10.2k
    mnRefCount(0),
56
10.2k
    mnPresViewShellId(SID_VIEWSHELL0),
57
10.2k
    mbIsNavigatorShowingAllShapes(false)
58
10.2k
{
59
10.2k
    EndListening(*pDrawDoc);
60
61
10.2k
    EnableExtendedKeyInputDispatcher(false);
62
10.2k
    EnableExtendedMouseEventDispatcher(false);
63
64
10.2k
    SetGridFront( false );
65
10.2k
    SetHlplFront( false );
66
10.2k
    SetOConSnap( false );
67
10.2k
    SetFrameDragSingles();
68
10.2k
    SetSlidesPerRow(4);
69
70
10.2k
    if( nullptr == pFrameView )
71
10.2k
    {
72
10.2k
        DrawDocShell* pDocShell = pDrawDoc->GetDocSh();
73
74
10.2k
        if ( pDocShell )
75
10.2k
        {
76
            // document is loaded, is there a FrameView?
77
10.2k
            size_t nSdViewShellCount = 0;
78
10.2k
            SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(pDocShell);
79
80
10.2k
            while (pSfxViewFrame)
81
0
            {
82
                // Count the FrameViews and remember the type of the main
83
                // view shell.
84
0
                SfxViewShell* pSfxViewSh = pSfxViewFrame->GetViewShell();
85
0
                ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( pSfxViewSh  );
86
87
0
                if (pBase != nullptr)
88
0
                {
89
0
                    nSdViewShellCount++;
90
91
0
                    OUString sViewURL;
92
0
                    rtl::Reference<sd::framework::AbstractView> xView (
93
0
                        framework::FrameworkHelper::Instance(*pBase)->GetView(
94
0
                            new sd::framework::ResourceId(
95
0
                                framework::FrameworkHelper::msCenterPaneURL)));
96
0
                    if (xView.is())
97
0
                        sViewURL = xView->getResourceId()->getResourceURL();
98
99
0
                    switch (framework::FrameworkHelper::GetViewId(sViewURL))
100
0
                    {
101
0
                        default:
102
//                        case ViewShell::ST_IMPRESS:
103
//                        case ViewShell::ST_NOTES:
104
//                        case ViewShell::ST_HANDOUT:
105
0
                            mnPresViewShellId = SID_VIEWSHELL0;
106
0
                            break;
107
108
0
                        case ViewShell::ST_SLIDE_SORTER:
109
0
                            mnPresViewShellId = SID_VIEWSHELL1;
110
0
                            break;
111
112
0
                        case ViewShell::ST_OUTLINE:
113
0
                            mnPresViewShellId = SID_VIEWSHELL2;
114
0
                            break;
115
0
                    }
116
0
                }
117
118
0
                pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, pDocShell);
119
0
            }
120
121
10.2k
            SdDrawDocument* pDoc = pDocShell->GetDoc();
122
10.2k
            pFrameView = pDoc->GetFrameView(nSdViewShellCount);
123
10.2k
        }
124
10.2k
    }
125
126
10.2k
    if (pFrameView)
127
0
    {
128
        // initialize FrameView with the FrameView of the DocShell
129
0
        SetRuler( pFrameView->HasRuler() );
130
0
        SetGridCoarse( pFrameView->GetGridCoarse() );
131
0
        SetGridFine( pFrameView->GetGridFine() );
132
0
        SetSnapGridWidth(pFrameView->GetSnapGridWidthX(), pFrameView->GetSnapGridWidthY());
133
0
        SetGridVisible( pFrameView->IsGridVisible() );
134
0
        SetGridFront( pFrameView->IsGridFront() );
135
0
        SetSnapAngle( pFrameView->GetSnapAngle() );
136
0
        SetGridSnap( pFrameView->IsGridSnap() );
137
0
        SetBordSnap( pFrameView->IsBordSnap() );
138
0
        SetHlplSnap( pFrameView->IsHlplSnap() );
139
0
        SetOFrmSnap( pFrameView->IsOFrmSnap() );
140
0
        SetOPntSnap( pFrameView->IsOPntSnap() );
141
0
        SetOConSnap( pFrameView->IsOConSnap() );
142
0
        SetHlplVisible( pFrameView->IsHlplVisible() );
143
0
        SetDragStripes( pFrameView->IsDragStripes() );
144
0
        SetPlusHandlesAlwaysVisible( pFrameView->IsPlusHandlesAlwaysVisible() );
145
0
        SetFrameDragSingles( pFrameView->IsFrameDragSingles() );
146
0
        SetSnapMagneticPixel( pFrameView->GetSnapMagneticPixel() );
147
0
        SetMarkedHitMovesAlways( pFrameView->IsMarkedHitMovesAlways() );
148
0
        SetMoveOnlyDragging( pFrameView->IsMoveOnlyDragging() );
149
0
        SetCrookNoContortion( pFrameView->IsCrookNoContortion() );
150
0
        SetSlantButShear( pFrameView->IsSlantButShear() );
151
0
        SetNoDragXorPolys( pFrameView->IsNoDragXorPolys() );
152
0
        SetAngleSnapEnabled( pFrameView->IsAngleSnapEnabled() );
153
0
        SetBigOrtho( pFrameView->IsBigOrtho() );
154
0
        SetOrtho( pFrameView->IsOrtho() );
155
0
        SetEliminatePolyPointLimitAngle( pFrameView->GetEliminatePolyPointLimitAngle() );
156
0
        SetEliminatePolyPoints( pFrameView->IsEliminatePolyPoints() );
157
0
        SetDesignMode( pFrameView->IsDesignMode() );
158
159
0
        SetSolidDragging( pFrameView->IsSolidDragging() );
160
161
0
        maVisibleLayers = pFrameView->GetVisibleLayers();
162
0
        maPrintableLayers = pFrameView->GetPrintableLayers();
163
0
        maLockedLayers = pFrameView->GetLockedLayers();
164
0
        maStandardHelpLines = pFrameView->GetStandardHelpLines();
165
0
        maNotesHelpLines = pFrameView->GetNotesHelpLines();
166
0
        maHandoutHelpLines = pFrameView->GetHandoutHelpLines();
167
0
        SetActiveLayer( pFrameView->GetActiveLayer() );
168
0
        mbNoColors = pFrameView->IsNoColors();
169
0
        mbNoAttribs = pFrameView->IsNoAttribs() ;
170
0
        maVisArea = pFrameView->GetVisArea();
171
0
        mePageKind = pFrameView->GetPageKind();
172
0
        mePageKindOnLoad = pFrameView->GetPageKindOnLoad();
173
0
        mnSelectedPage = pFrameView->GetSelectedPage();
174
0
        mnSelectedPageOnLoad = pFrameView->GetSelectedPageOnLoad();
175
0
        mePageEditMode = pFrameView->GetViewShEditMode();
176
        // meStandardEditMode = pFrameView->GetViewShEditMode(PageKind::Standard);
177
        // meNotesEditMode = pFrameView->GetViewShEditMode(PageKind::Notes);
178
        // meHandoutEditMode = pFrameView->GetViewShEditMode(PageKind::Handout);
179
0
        SetViewShEditModeOnLoad(pFrameView->GetViewShEditModeOnLoad());
180
0
        mbLayerMode = pFrameView->IsLayerMode();
181
0
        mbQuickEdit = pFrameView->IsQuickEdit();
182
183
        // #i26631#
184
0
        SetMasterPagePaintCaching( pFrameView->IsMasterPagePaintCaching() );
185
186
0
        SetDragWithCopy( pFrameView->IsDragWithCopy() );
187
0
        mbDoubleClickTextEdit = pFrameView->IsDoubleClickTextEdit();
188
0
        mbClickChangeRotation = pFrameView->IsClickChangeRotation();
189
0
        mnSlidesPerRow = pFrameView->GetSlidesPerRow();
190
0
        mnDrawMode = pFrameView->GetDrawMode();
191
0
        mbIsNavigatorShowingAllShapes = pFrameView->IsNavigatorShowingAllShapes();
192
0
        SetPreviousViewShellType (pFrameView->GetPreviousViewShellType());
193
0
        SetViewShellTypeOnLoad (pFrameView->GetViewShellTypeOnLoad());
194
0
    }
195
10.2k
    else
196
10.2k
    {
197
        // initialize FrameView with the application data
198
199
        // Layers need to be set, otherwise they are not visible and not printable in
200
        // Impress documents. The document contains already the actual layers and their
201
        // settings for visible, printable and locked. In case not read from <draw:layer-set>,
202
        // ODF defaults are used.
203
10.2k
        SdrLayerAdmin rLayerAdmin = pDrawDoc -> GetLayerAdmin();
204
10.2k
        rLayerAdmin.getVisibleLayersODF(maVisibleLayers);
205
10.2k
        rLayerAdmin.getPrintableLayersODF(maPrintableLayers);
206
10.2k
        rLayerAdmin.getLockedLayersODF(maLockedLayers);
207
10.2k
        SetGridCoarse( Size( 1000, 1000 ) );
208
10.2k
        SetSnapGridWidth(1000, 1000);
209
10.2k
        SetActiveLayer(sUNO_LayerName_layout);
210
10.2k
        mbNoColors = true;
211
10.2k
        mbNoAttribs = false;
212
10.2k
        maVisArea = ::tools::Rectangle( Point(), Size(0, 0) );
213
10.2k
        mePageKind = PageKind::Standard;
214
10.2k
        mePageKindOnLoad = PageKind::Standard;
215
10.2k
        mnSelectedPage = 0;
216
10.2k
        mnSelectedPageOnLoad = 0;
217
10.2k
        mePageEditMode = EditMode::Page;
218
        // meStandardEditMode = EditMode::Page;
219
        // meNotesEditMode = EditMode::Page;
220
        // meHandoutEditMode = EditMode::MasterPage;
221
10.2k
        SetViewShEditModeOnLoad(EditMode::Page);
222
10.2k
        mbLayerMode = false;
223
10.2k
        SetEliminatePolyPoints(false);
224
10.2k
        mbDoubleClickTextEdit = false;
225
10.2k
        mbClickChangeRotation = false;
226
10.2k
        mnSlidesPerRow = officecfg::Office::Impress::Misc::SorterSlidesPerRow::get();
227
228
10.2k
        {
229
10.2k
            bool bUseContrast = Application::GetSettings().GetStyleSettings().GetHighContrastMode();
230
10.2k
            mnDrawMode = bUseContrast ? OUTPUT_DRAWMODE_CONTRAST : OUTPUT_DRAWMODE_COLOR;
231
10.2k
        }
232
10.2k
        mbIsNavigatorShowingAllShapes = true;
233
10.2k
        SetPreviousViewShellType (ViewShell::ST_NONE);
234
10.2k
        SetViewShellTypeOnLoad (ViewShell::ST_IMPRESS);
235
236
        // get default for design mode
237
10.2k
        bool bInitDesignMode = pDrawDoc->GetOpenInDesignMode();
238
10.2k
        if( pDrawDoc->OpenInDesignModeIsDefaulted() )
239
10.2k
        {
240
10.2k
            bInitDesignMode = true;
241
10.2k
        }
242
243
10.2k
        SfxObjectShell* pObjShell = pDrawDoc->GetObjectShell();
244
10.2k
        if( pObjShell && pObjShell->IsReadOnly() )
245
10.2k
            bInitDesignMode = false;
246
10.2k
        SetDesignMode( bInitDesignMode );
247
248
10.2k
        Update(SdModule::get()->GetSdOptions(pDrawDoc->GetDocumentType()));
249
10.2k
    }
250
251
10.2k
}
252
253
FrameView::~FrameView()
254
10.2k
{
255
10.2k
}
256
257
void FrameView::Connect()
258
0
{
259
0
    mnRefCount++;
260
0
}
261
262
void FrameView::Disconnect()
263
0
{
264
0
    if (mnRefCount > 0)
265
0
    {
266
0
        mnRefCount--;
267
0
    }
268
269
0
    if (mnRefCount == 0)
270
0
    {
271
0
        delete this;
272
0
    }
273
0
}
274
275
/**
276
 * Update with data from the specified SdOptions
277
 */
278
void FrameView::Update(SdOptions const * pOptions)
279
10.2k
{
280
10.2k
    if (!pOptions)
281
0
        return;
282
283
10.2k
    SdDrawDocument* pDrawDocument = dynamic_cast<SdDrawDocument*>(&GetModel());
284
10.2k
    const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == DocumentType::Impress;
285
286
10.2k
    if (bImpress)
287
10.2k
    {
288
10.2k
        mbRuler = officecfg::Office::Impress::Layout::Display::Ruler::get();
289
10.2k
        SetAngleSnapEnabled( officecfg::Office::Impress::Snap::Position::Rotating::get() );
290
10.2k
        SetBigOrtho( officecfg::Office::Impress::Snap::Position::ExtendEdges::get() );
291
10.2k
        SetBordSnap( officecfg::Office::Impress::Snap::Object::PageMargin::get() );
292
10.2k
        SetDragStripes( officecfg::Office::Impress::Layout::Display::Guide::get() );
293
10.2k
        SetHlplSnap( officecfg::Office::Impress::Snap::Object::SnapLine::get() );
294
10.2k
        SetHlplVisible( officecfg::Office::Impress::Layout::Display::Helpline::get() );
295
10.2k
        SetEliminatePolyPointLimitAngle( Degree100(officecfg::Office::Impress::Snap::Position::PointReduction::get()) );
296
10.2k
        SetNoDragXorPolys ( !officecfg::Office::Impress::Layout::Display::Contour::get() );
297
10.2k
        SetOFrmSnap( officecfg::Office::Impress::Snap::Object::ObjectFrame::get() );
298
10.2k
        SetOPntSnap( officecfg::Office::Impress::Snap::Object::ObjectPoint::get() );
299
10.2k
        SetOrtho( officecfg::Office::Impress::Snap::Position::CreatingMoving::get() );
300
10.2k
        SetPlusHandlesAlwaysVisible( officecfg::Office::Impress::Layout::Display::Bezier::get() );
301
10.2k
        SetSnapAngle( Degree100(officecfg::Office::Impress::Snap::Position::RotatingValue::get()) );
302
10.2k
        SetSnapMagneticPixel( officecfg::Office::Impress::Snap::Object::Range::get() );
303
10.2k
    }
304
0
    else
305
0
    {
306
0
        mbRuler = officecfg::Office::Draw::Layout::Display::Ruler::get();
307
0
        SetAngleSnapEnabled( officecfg::Office::Draw::Snap::Position::Rotating::get() );
308
0
        SetBigOrtho( officecfg::Office::Draw::Snap::Position::ExtendEdges::get() );
309
0
        SetBordSnap( officecfg::Office::Draw::Snap::Object::PageMargin::get() );
310
0
        SetDragStripes( officecfg::Office::Draw::Layout::Display::Guide::get() );
311
0
        SetHlplSnap( officecfg::Office::Draw::Snap::Object::SnapLine::get() );
312
0
        SetHlplVisible( officecfg::Office::Draw::Layout::Display::Helpline::get() );
313
0
        SetEliminatePolyPointLimitAngle( Degree100(officecfg::Office::Draw::Snap::Position::PointReduction::get()) );
314
0
        SetNoDragXorPolys ( !officecfg::Office::Draw::Layout::Display::Contour::get() );
315
0
        SetOFrmSnap( officecfg::Office::Draw::Snap::Object::ObjectFrame::get() );
316
0
        SetOPntSnap( officecfg::Office::Draw::Snap::Object::ObjectPoint::get() );
317
0
        SetOrtho( officecfg::Office::Draw::Snap::Position::CreatingMoving::get() );
318
0
        SetPlusHandlesAlwaysVisible( officecfg::Office::Draw::Layout::Display::Bezier::get() );
319
0
        SetSnapAngle( Degree100(officecfg::Office::Draw::Snap::Position::RotatingValue::get()) );
320
0
        SetSnapMagneticPixel( officecfg::Office::Draw::Snap::Object::Range::get() );
321
0
    }
322
323
10.2k
    SetGridVisible( pOptions->IsGridVisible() );
324
10.2k
    SetGridSnap( pOptions->IsUseGridSnap() );
325
10.2k
    SetMarkedHitMovesAlways( pOptions->IsMarkedHitMovesAlways() );
326
10.2k
    SetMoveOnlyDragging( pOptions->IsMoveOnlyDragging() );
327
10.2k
    SetSlantButShear( pOptions->IsMoveOnlyDragging() );
328
10.2k
    SetCrookNoContortion( pOptions->IsCrookNoContortion() );
329
10.2k
    GetModel().SetPickThroughTransparentTextFrames( pOptions->IsPickThrough() );
330
331
10.2k
    SetSolidDragging( pOptions->IsSolidDragging() );
332
333
10.2k
    SetGridCoarse( Size( pOptions->GetFieldDrawX(), pOptions->GetFieldDrawY() ) );
334
10.2k
    SetGridFine( Size( pOptions->GetFieldDivisionX(), pOptions->GetFieldDivisionY() ) );
335
10.2k
    double aFractX = double(pOptions->GetFieldDrawX()) / (pOptions->GetFieldDrawX() / ( pOptions->GetFieldDivisionX() ? pOptions->GetFieldDivisionX() : 1 ));
336
10.2k
    double aFractY = double(pOptions->GetFieldDrawY()) / (pOptions->GetFieldDrawY() / ( pOptions->GetFieldDivisionY() ? pOptions->GetFieldDivisionY() : 1 ));
337
10.2k
    SetSnapGridWidth(aFractX, aFractY);
338
10.2k
    SetQuickEdit(pOptions->IsQuickEdit());
339
340
    // #i26631#
341
10.2k
    SetMasterPagePaintCaching( pOptions->IsMasterPagePaintCaching() );
342
343
10.2k
    SetDragWithCopy(pOptions->IsDragWithCopy());
344
10.2k
    SetDragThresholdPixels(pOptions->GetDragThresholdPixels());
345
10.2k
    SetDoubleClickTextEdit( pOptions->IsDoubleClickTextEdit() );
346
10.2k
    SetClickChangeRotation( pOptions->IsClickChangeRotation() );
347
10.2k
}
348
349
/**
350
 * Set EditMode (Page or MasterPage) of working mode
351
 */
352
void FrameView::SetViewShEditMode(EditMode eMode)
353
10.2k
{
354
10.2k
    mePageEditMode = eMode;
355
10.2k
}
356
357
/**
358
 * Return EditMode (Page or MasterPage) of working mode
359
 */
360
EditMode FrameView::GetViewShEditMode() const
361
0
{
362
0
    return mePageEditMode;
363
0
}
364
365
void FrameView::SetViewShEditModeOnLoad (EditMode eMode)
366
10.2k
{
367
10.2k
    meEditModeOnLoad = eMode;
368
10.2k
}
369
370
static OUString createHelpLinesString( const SdrHelpLineList& rHelpLines )
371
0
{
372
0
    OUStringBuffer aLines;
373
374
0
    const sal_uInt16 nCount = rHelpLines.GetCount();
375
0
    for( sal_uInt16 nHlpLine = 0; nHlpLine < nCount; nHlpLine++ )
376
0
    {
377
0
        const SdrHelpLine& rHelpLine = rHelpLines[nHlpLine];
378
0
        const Point& rPos = rHelpLine.GetPos();
379
380
0
        switch( rHelpLine.GetKind() )
381
0
        {
382
0
            case SdrHelpLineKind::Point:
383
0
                aLines.append( 'P' );
384
0
                aLines.append( static_cast<sal_Int32>(rPos.X()) );
385
0
                aLines.append( ',' );
386
0
                aLines.append( static_cast<sal_Int32>(rPos.Y()) );
387
0
                break;
388
0
            case SdrHelpLineKind::Vertical:
389
0
                aLines.append( 'V' );
390
0
                aLines.append( static_cast<sal_Int32>(rPos.X()) );
391
0
                break;
392
0
            case SdrHelpLineKind::Horizontal:
393
0
                aLines.append( 'H' );
394
0
                aLines.append( static_cast<sal_Int32>(rPos.Y()) );
395
0
                break;
396
0
            default:
397
0
                OSL_FAIL( "Unsupported helpline Kind!" );
398
0
        }
399
0
    }
400
401
0
    return aLines.makeStringAndClear();
402
0
}
403
404
void FrameView::WriteUserDataSequence ( css::uno::Sequence < css::beans::PropertyValue >& rValues )
405
0
{
406
0
    std::vector< std::pair< OUString, Any > > aUserData;
407
0
    aUserData.reserve(41); // worst case
408
0
    SdDrawDocument* pDrawDocument = dynamic_cast<SdDrawDocument*>(&GetModel());
409
410
0
    aUserData.emplace_back( sUNO_View_GridIsVisible, Any( IsGridVisible() ) );
411
0
    aUserData.emplace_back( sUNO_View_GridIsFront, Any( IsGridFront() ) );
412
0
    aUserData.emplace_back( sUNO_View_IsSnapToGrid, Any( IsGridSnap() ) );
413
0
    aUserData.emplace_back( sUNO_View_IsSnapToPageMargins, Any( IsBordSnap() ) );
414
0
    aUserData.emplace_back( sUNO_View_IsSnapToSnapLines, Any( IsHlplSnap() ) );
415
0
    aUserData.emplace_back( sUNO_View_IsSnapToObjectFrame, Any( IsOFrmSnap() ) );
416
0
    aUserData.emplace_back( sUNO_View_IsSnapToObjectPoints, Any( IsOPntSnap() ) );
417
418
0
    aUserData.emplace_back( sUNO_View_IsPlusHandlesAlwaysVisible, Any( IsPlusHandlesAlwaysVisible() ) );
419
0
    aUserData.emplace_back( sUNO_View_IsFrameDragSingles, Any( IsFrameDragSingles() ) );
420
421
0
    aUserData.emplace_back( sUNO_View_EliminatePolyPointLimitAngle, Any( static_cast<sal_Int32>(GetEliminatePolyPointLimitAngle()) ) );
422
0
    aUserData.emplace_back( sUNO_View_IsEliminatePolyPoints, Any( IsEliminatePolyPoints() ) );
423
424
0
    if ( officecfg::Office::Common::Misc::WriteLayerStateAsConfigItem::get() )
425
0
    {
426
0
        SdrLayerAdmin& rLayerAdmin = getSdrModelFromSdrView().GetLayerAdmin();
427
0
        Any aAny;
428
0
        rLayerAdmin.QueryValue(GetVisibleLayers(), aAny);
429
0
        aUserData.emplace_back( sUNO_View_VisibleLayers, aAny );
430
431
0
        rLayerAdmin.QueryValue(GetPrintableLayers(), aAny);
432
0
        aUserData.emplace_back( sUNO_View_PrintableLayers, aAny );
433
434
0
        rLayerAdmin.QueryValue(GetLockedLayers(), aAny);
435
0
        aUserData.emplace_back( sUNO_View_LockedLayers, aAny );
436
0
    }
437
438
0
    aUserData.emplace_back( sUNO_View_NoAttribs, Any( IsNoAttribs() ) );
439
0
    aUserData.emplace_back( sUNO_View_NoColors, Any( IsNoColors() ) );
440
441
0
    if( GetStandardHelpLines().GetCount() )
442
0
        aUserData.emplace_back( sUNO_View_SnapLinesDrawing, Any( createHelpLinesString( GetStandardHelpLines() ) ) );
443
444
0
    if( GetNotesHelpLines().GetCount() )
445
0
        aUserData.emplace_back( sUNO_View_SnapLinesNotes, Any( createHelpLinesString( GetNotesHelpLines() ) ) );
446
447
0
    if( GetHandoutHelpLines().GetCount() )
448
0
        aUserData.emplace_back( sUNO_View_SnapLinesHandout, Any( createHelpLinesString( GetHandoutHelpLines() ) ) );
449
450
0
    aUserData.emplace_back( sUNO_View_RulerIsVisible, Any( HasRuler() ) );
451
0
    aUserData.emplace_back( sUNO_View_PageKind, Any( static_cast<sal_Int16>(GetPageKind()) ) );
452
0
    aUserData.emplace_back( sUNO_View_SelectedPage, Any( static_cast<sal_Int16>(GetSelectedPage()) ) );
453
0
    aUserData.emplace_back( sUNO_View_IsLayerMode, Any( IsLayerMode() ) );
454
455
0
    aUserData.emplace_back( sUNO_View_IsDoubleClickTextEdit,  Any( IsDoubleClickTextEdit() ) );
456
0
    aUserData.emplace_back( sUNO_View_IsClickChangeRotation, Any( IsClickChangeRotation() ) );
457
458
0
    aUserData.emplace_back( sUNO_View_SlidesPerRow, Any( static_cast<sal_Int16>(GetSlidesPerRow()) ) );
459
0
    aUserData.emplace_back( sUNO_View_EditMode, Any( static_cast<sal_Int32>(GetViewShEditMode()) ) );
460
    // aUserData.emplace_back( sUNO_View_EditModeStandard, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Standard ) ) );
461
    // aUserData.emplace_back( sUNO_View_EditModeNotes, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Notes ) ) );
462
    // aUserData.emplace_back( sUNO_View_EditModeHandout, makeAny( (sal_Int32)GetViewShEditMode( PageKind::Handout ) ) );
463
464
0
    {
465
0
        const ::tools::Rectangle aVisArea = GetVisArea();
466
467
0
        aUserData.emplace_back( sUNO_View_VisibleAreaTop, Any( static_cast<sal_Int32>(aVisArea.Top()) ) );
468
0
        aUserData.emplace_back( sUNO_View_VisibleAreaLeft, Any( static_cast<sal_Int32>(aVisArea.Left()) ) );
469
0
        aUserData.emplace_back( sUNO_View_VisibleAreaWidth, Any( static_cast<sal_Int32>(aVisArea.GetWidth()) ) );
470
0
        aUserData.emplace_back( sUNO_View_VisibleAreaHeight, Any( static_cast<sal_Int32>(aVisArea.GetHeight()) ) );
471
0
    }
472
473
0
    aUserData.emplace_back( sUNO_View_GridCoarseWidth, Any( static_cast<sal_Int32>(GetGridCoarse().Width()) ) );
474
0
    aUserData.emplace_back( sUNO_View_GridCoarseHeight, Any( static_cast<sal_Int32>(GetGridCoarse().Height()) ) );
475
0
    aUserData.emplace_back( sUNO_View_GridFineWidth, Any( static_cast<sal_Int32>(GetGridFine().Width()) ) );
476
0
    aUserData.emplace_back( sUNO_View_GridFineHeight, Any( static_cast<sal_Int32>(GetGridFine().Height()) ) );
477
0
    Fraction aSnapGridWidthX(GetSnapGridWidthX());
478
0
    aUserData.emplace_back( sUNO_View_GridSnapWidthXNumerator, Any( aSnapGridWidthX.GetNumerator() ) );
479
0
    aUserData.emplace_back( sUNO_View_GridSnapWidthXDenominator, Any( aSnapGridWidthX.GetDenominator() ) );
480
0
    Fraction aSnapGridWidthY(GetSnapGridWidthY());
481
0
    aUserData.emplace_back( sUNO_View_GridSnapWidthYNumerator, Any( aSnapGridWidthY.GetNumerator() ) );
482
0
    aUserData.emplace_back( sUNO_View_GridSnapWidthYDenominator, Any( aSnapGridWidthY.GetDenominator() ) );
483
0
    aUserData.emplace_back( sUNO_View_IsAngleSnapEnabled, Any( IsAngleSnapEnabled() ) );
484
0
    aUserData.emplace_back( sUNO_View_SnapAngle, Any( static_cast<sal_Int32>(GetSnapAngle()) ) );
485
0
    aUserData.emplace_back( sUNO_View_HasCanvasPage, Any( pDrawDocument && pDrawDocument->HasCanvasPage() ) );
486
487
0
    const sal_Int32 nOldLength = rValues.getLength();
488
0
    rValues.realloc( nOldLength + aUserData.size() );
489
490
0
    PropertyValue* pValue = &(rValues.getArray()[nOldLength]);
491
492
0
    for( const auto& rItem : aUserData )
493
0
    {
494
0
        pValue->Name = rItem.first;
495
0
        pValue->Value = rItem.second;
496
0
        ++pValue;
497
0
    }
498
0
}
499
500
static void createHelpLinesFromString( const OUString& rLines, SdrHelpLineList& rHelpLines )
501
0
{
502
0
    const sal_Unicode * pStr = rLines.getStr();
503
0
    SdrHelpLine aNewHelpLine;
504
0
    OUStringBuffer sBuffer;
505
506
0
    while( *pStr )
507
0
    {
508
0
        Point aPoint;
509
510
0
        switch( *pStr )
511
0
        {
512
0
        case 'P':
513
0
            aNewHelpLine.SetKind( SdrHelpLineKind::Point );
514
0
            break;
515
0
        case 'V':
516
0
            aNewHelpLine.SetKind( SdrHelpLineKind::Vertical );
517
0
            break;
518
0
        case 'H':
519
0
            aNewHelpLine.SetKind( SdrHelpLineKind::Horizontal );
520
0
            break;
521
0
        default:
522
0
            OSL_FAIL( "syntax error in snap lines settings string" );
523
0
            return;
524
0
        }
525
526
0
        pStr++;
527
528
0
        while( (*pStr >= '0' && *pStr <= '9') || (*pStr == '+') || (*pStr == '-') )
529
0
        {
530
0
            sBuffer.append( *pStr++ );
531
0
        }
532
533
0
        sal_Int32 nValue = o3tl::toInt32(sBuffer);
534
0
        sBuffer.setLength(0);
535
536
0
        if( aNewHelpLine.GetKind() == SdrHelpLineKind::Horizontal )
537
0
        {
538
0
            aPoint.setY( nValue );
539
0
        }
540
0
        else
541
0
        {
542
0
            aPoint.setX( nValue );
543
544
0
            if( aNewHelpLine.GetKind() == SdrHelpLineKind::Point )
545
0
            {
546
0
                if( *pStr++ != ',' )
547
0
                    return;
548
549
0
                while( (*pStr >= '0' && *pStr <= '9') || (*pStr == '+') || (*pStr == '-')  )
550
0
                {
551
0
                    sBuffer.append( *pStr++ );
552
0
                }
553
554
0
                aPoint.setY( o3tl::toInt32(sBuffer) );
555
0
                sBuffer.setLength(0);
556
557
0
            }
558
0
        }
559
560
0
        aNewHelpLine.SetPos( aPoint );
561
0
        rHelpLines.Insert( aNewHelpLine );
562
0
    }
563
0
}
564
565
void FrameView::ReadUserDataSequence ( const css::uno::Sequence < css::beans::PropertyValue >& rSequence )
566
0
{
567
0
    const sal_Int32 nLength = rSequence.getLength();
568
0
    if (!nLength)
569
0
        return;
570
571
0
    SdDrawDocument* pDrawDocument = dynamic_cast<SdDrawDocument*>(&GetModel());
572
0
    const bool bImpress = pDrawDocument && pDrawDocument->GetDocumentType() == DocumentType::Impress;
573
574
0
    bool bBool = false;
575
0
    sal_Int32 nInt32 = 0;
576
0
    sal_Int16 nInt16 = 0;
577
0
    OUString aString;
578
579
0
    Fraction aSnapGridWidthX(GetSnapGridWidthX());
580
0
    sal_Int32 aSnapGridWidthXNum = aSnapGridWidthX.GetNumerator();
581
0
    sal_Int32 aSnapGridWidthXDom = aSnapGridWidthX.GetDenominator();
582
583
0
    Fraction aSnapGridWidthY(GetSnapGridWidthY());
584
0
    sal_Int32 aSnapGridWidthYNum = aSnapGridWidthY.GetNumerator();
585
0
    sal_Int32 aSnapGridWidthYDom = aSnapGridWidthY.GetDenominator();
586
587
0
    for (const css::beans::PropertyValue& rValue : rSequence)
588
0
    {
589
0
        if ( rValue.Name == sUNO_View_ViewId )
590
0
        {
591
0
        }
592
0
        else if ( rValue.Name == sUNO_View_SnapLinesDrawing )
593
0
        {
594
0
            if( rValue.Value >>= aString )
595
0
            {
596
0
                SdrHelpLineList aHelpLines;
597
0
                createHelpLinesFromString( aString, aHelpLines );
598
0
                SetStandardHelpLines( aHelpLines );
599
0
            }
600
0
        }
601
0
        else if ( rValue.Name == sUNO_View_SnapLinesNotes )
602
0
        {
603
0
            if( rValue.Value >>= aString )
604
0
            {
605
0
                SdrHelpLineList aHelpLines;
606
0
                createHelpLinesFromString( aString, aHelpLines );
607
0
                SetNotesHelpLines( aHelpLines );
608
0
            }
609
0
        }
610
0
        else if ( rValue.Name == sUNO_View_SnapLinesHandout )
611
0
        {
612
0
            if( rValue.Value >>= aString )
613
0
            {
614
0
                SdrHelpLineList aHelpLines;
615
0
                createHelpLinesFromString( aString, aHelpLines );
616
0
                SetHandoutHelpLines( aHelpLines );
617
0
            }
618
0
        }
619
0
        else if ( rValue.Name == sUNO_View_RulerIsVisible )
620
0
        {
621
0
            if( rValue.Value >>= bBool )
622
0
            {
623
0
                SetRuler( bBool );
624
0
            }
625
0
        }
626
0
        else if ( rValue.Name == sUNO_View_PageKind )
627
0
        {
628
0
            if( rValue.Value >>= nInt16 )
629
0
            {
630
0
                SdDrawDocument* pDoc = dynamic_cast<SdDrawDocument*>(&GetModel());
631
0
                if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
632
0
                    SetPageKind( static_cast<PageKind>(nInt16) );
633
634
0
                SetPageKindOnLoad( static_cast<PageKind>(nInt16) );
635
0
            }
636
0
        }
637
0
        else if ( rValue.Name == sUNO_View_SelectedPage )
638
0
        {
639
0
            if( rValue.Value >>= nInt16 )
640
0
            {
641
0
                SdDrawDocument* pDoc = dynamic_cast<SdDrawDocument*>(&GetModel());
642
0
                if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
643
0
                    SetSelectedPage( static_cast<sal_uInt16>(nInt16) );
644
645
0
                SetSelectedPageOnLoad( static_cast<sal_uInt16>(nInt16) );
646
0
            }
647
0
        }
648
0
        else if ( rValue.Name == sUNO_View_IsLayerMode )
649
0
        {
650
0
            if( rValue.Value >>= bBool )
651
0
            {
652
0
                SetLayerMode( bBool );
653
0
            }
654
0
        }
655
0
        else if ( rValue.Name == sUNO_View_IsDoubleClickTextEdit )
656
0
        {
657
0
            if( rValue.Value >>= bBool )
658
0
            {
659
0
                SetDoubleClickTextEdit( bBool );
660
0
            }
661
0
        }
662
0
        else if ( rValue.Name == sUNO_View_IsClickChangeRotation )
663
0
        {
664
0
            if( rValue.Value >>= bBool )
665
0
            {
666
0
                SetClickChangeRotation( bBool );
667
0
            }
668
0
        }
669
0
        else if ( rValue.Name == sUNO_View_SlidesPerRow )
670
0
        {
671
0
            if( rValue.Value >>= nInt16 )
672
0
            {
673
0
                SetSlidesPerRow( static_cast<sal_uInt16>(nInt16) );
674
0
            }
675
0
        }
676
0
        else if ( rValue.Name == sUNO_View_EditMode )
677
0
        {
678
0
            if( rValue.Value >>= nInt32 )
679
0
            {
680
0
                SdDrawDocument* pDoc = dynamic_cast<SdDrawDocument*>(&GetModel());
681
0
                if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
682
0
                    SetViewShEditMode( static_cast<EditMode>(nInt32) );
683
0
            }
684
0
        }
685
        // This one is kept for compatibility. Old value read from sUNO_View_EditModeStandard
686
        // is used. New value will be written into sUNO_View_EditMode.
687
        // Values from sUNO_View_EditModeNotes and sUNO_View_EditModeHangout will be ignored.
688
0
        else if ( rValue.Name == sUNO_View_EditModeStandard )
689
0
        {
690
0
            if( rValue.Value >>= nInt32 )
691
0
            {
692
0
                SdDrawDocument* pDoc = dynamic_cast<SdDrawDocument*>(&GetModel());
693
0
                if( pDoc && pDoc->GetDocSh() && ( SfxObjectCreateMode::EMBEDDED == pDoc->GetDocSh()->GetCreateMode() ) )
694
0
                    SetViewShEditMode( static_cast<EditMode>(nInt32) );
695
0
            }
696
0
        }
697
0
        else if ( rValue.Name == sUNO_View_VisibleAreaTop )
698
0
        {
699
0
            sal_Int32 nTop = 0;
700
0
            if( rValue.Value >>= nTop )
701
0
            {
702
0
                ::tools::Rectangle aVisArea( GetVisArea() );
703
0
                aVisArea.AdjustBottom(nTop - aVisArea.Top() );
704
0
                aVisArea.SetTop( nTop );
705
0
                SetVisArea( aVisArea );
706
0
            }
707
0
        }
708
0
        else if ( rValue.Name == sUNO_View_VisibleAreaLeft )
709
0
        {
710
0
            sal_Int32 nLeft = 0;
711
0
            if( rValue.Value >>= nLeft )
712
0
            {
713
0
                ::tools::Rectangle aVisArea( GetVisArea() );
714
0
                aVisArea.AdjustRight(nLeft - aVisArea.Left() );
715
0
                aVisArea.SetLeft( nLeft );
716
0
                SetVisArea( aVisArea );
717
0
            }
718
0
        }
719
0
        else if ( rValue.Name == sUNO_View_VisibleAreaWidth )
720
0
        {
721
0
            sal_Int32 nWidth = 0;
722
0
            if( rValue.Value >>= nWidth )
723
0
            {
724
0
                ::tools::Rectangle aVisArea( GetVisArea() );
725
0
                aVisArea.SetRight( aVisArea.Left() + nWidth - 1 );
726
0
                SetVisArea( aVisArea );
727
0
            }
728
0
        }
729
0
        else if ( rValue.Name == sUNO_View_VisibleAreaHeight )
730
0
        {
731
0
            sal_Int32 nHeight = 0;
732
0
            if( rValue.Value >>= nHeight )
733
0
            {
734
0
                ::tools::Rectangle aVisArea( GetVisArea() );
735
0
                aVisArea.SetBottom( nHeight + aVisArea.Top() - 1 );
736
0
                SetVisArea( aVisArea );
737
0
            }
738
0
        }
739
740
0
        else if ( rValue.Name == sUNO_View_GridIsVisible )
741
0
        {
742
0
            if( rValue.Value >>= bBool )
743
0
            {
744
0
                SetGridVisible( bBool );
745
0
            }
746
0
        }
747
748
0
        else if ( rValue.Name == sUNO_View_IsSnapToGrid )
749
0
        {
750
0
            if( rValue.Value >>= bBool )
751
0
            {
752
0
                SetGridSnap( bBool );
753
0
            }
754
0
        }
755
0
        else if ( rValue.Name == sUNO_View_GridIsFront )
756
0
        {
757
0
            if( rValue.Value >>= bBool )
758
0
            {
759
0
                SetGridFront( bBool );
760
0
            }
761
0
        }
762
0
        else if ( rValue.Name == sUNO_View_IsSnapToPageMargins )
763
0
        {
764
0
            if( rValue.Value >>= bBool )
765
0
            {
766
0
                SetBordSnap( bBool );
767
0
            }
768
0
        }
769
0
        else if ( rValue.Name == sUNO_View_IsSnapToSnapLines )
770
0
        {
771
0
            if( rValue.Value >>= bBool )
772
0
            {
773
0
                SetHlplSnap( bBool );
774
0
            }
775
0
        }
776
0
        else if ( rValue.Name == sUNO_View_IsSnapToObjectFrame )
777
0
        {
778
0
            if( rValue.Value >>= bBool )
779
0
            {
780
0
                SetOFrmSnap( bBool );
781
0
            }
782
0
        }
783
0
        else if ( rValue.Name == sUNO_View_IsSnapToObjectPoints )
784
0
        {
785
0
            if( rValue.Value >>= bBool )
786
0
            {
787
0
                SetOPntSnap( bBool );
788
0
            }
789
0
        }
790
0
        else if ( rValue.Name == sUNO_View_IsPlusHandlesAlwaysVisible )
791
0
        {
792
0
            if( rValue.Value >>= bBool )
793
0
            {
794
0
                SetPlusHandlesAlwaysVisible( bBool );
795
0
            }
796
0
        }
797
0
        else if ( rValue.Name == sUNO_View_IsFrameDragSingles )
798
0
        {
799
0
            if( rValue.Value >>= bBool )
800
0
            {
801
0
                SetFrameDragSingles( bBool );
802
0
            }
803
0
        }
804
0
        else if ( rValue.Name == sUNO_View_EliminatePolyPointLimitAngle )
805
0
        {
806
0
            if( rValue.Value >>= nInt32 )
807
0
            {
808
0
                SetEliminatePolyPointLimitAngle( Degree100(nInt32) );
809
0
            }
810
0
        }
811
0
        else if ( rValue.Name == sUNO_View_IsEliminatePolyPoints )
812
0
        {
813
0
            if( rValue.Value >>= bBool )
814
0
            {
815
0
                SetEliminatePolyPoints( bBool );
816
0
            }
817
0
        }
818
0
        else if ( rValue.Name == sUNO_View_ActiveLayer )
819
0
        {
820
0
            if( rValue.Value >>= aString )
821
0
            {
822
0
                SetActiveLayer( aString );
823
0
            }
824
0
        }
825
0
        else if ( rValue.Name == sUNO_View_NoAttribs )
826
0
        {
827
0
            if( rValue.Value >>= bBool )
828
0
            {
829
0
                SetNoAttribs( bBool );
830
0
            }
831
0
        }
832
0
        else if ( rValue.Name == sUNO_View_NoColors )
833
0
        {
834
0
            if( rValue.Value >>= bBool )
835
0
            {
836
0
                SetNoColors( bBool );
837
0
            }
838
0
        }
839
0
        else if ( rValue.Name == sUNO_View_GridCoarseWidth )
840
0
        {
841
0
            if( rValue.Value >>= nInt32 )
842
0
            {
843
0
                const Size aCoarse( nInt32, GetGridCoarse().Height() );
844
0
                SetGridCoarse( aCoarse );
845
0
            }
846
0
        }
847
0
        else if ( rValue.Name == sUNO_View_GridCoarseHeight )
848
0
        {
849
0
            if( rValue.Value >>= nInt32 )
850
0
            {
851
0
                const Size aCoarse( GetGridCoarse().Width(), nInt32 );
852
0
                SetGridCoarse( aCoarse );
853
0
            }
854
0
        }
855
0
        else if ( rValue.Name == sUNO_View_GridFineWidth )
856
0
        {
857
0
            if( rValue.Value >>= nInt32 )
858
0
            {
859
0
                const Size aCoarse( nInt32, GetGridFine().Height() );
860
0
                SetGridFine( aCoarse );
861
0
            }
862
0
        }
863
0
        else if ( rValue.Name == sUNO_View_GridFineHeight )
864
0
        {
865
0
            if( rValue.Value >>= nInt32 )
866
0
            {
867
0
                const Size aCoarse( GetGridFine().Width(), nInt32 );
868
0
                SetGridFine( aCoarse );
869
0
            }
870
0
        }
871
0
        else if ( rValue.Name == sUNO_View_IsAngleSnapEnabled )
872
0
        {
873
0
            if( rValue.Value >>= bBool )
874
0
            {
875
0
                SetAngleSnapEnabled( bBool );
876
0
            }
877
0
        }
878
0
        else if ( rValue.Name == sUNO_View_SnapAngle )
879
0
        {
880
0
            if( rValue.Value >>= nInt32 )
881
0
            {
882
0
                SetSnapAngle( Degree100(nInt32) );
883
0
            }
884
0
        }
885
0
        else if ( rValue.Name == sUNO_View_GridSnapWidthXNumerator )
886
0
        {
887
0
            rValue.Value >>= aSnapGridWidthXNum;
888
0
        }
889
0
        else if ( rValue.Name == sUNO_View_GridSnapWidthXDenominator )
890
0
        {
891
0
            rValue.Value >>= aSnapGridWidthXDom;
892
0
        }
893
0
        else if ( rValue.Name == sUNO_View_GridSnapWidthYNumerator )
894
0
        {
895
0
            rValue.Value >>= aSnapGridWidthYNum;
896
0
        }
897
0
        else if ( rValue.Name == sUNO_View_GridSnapWidthYDenominator )
898
0
        {
899
0
            rValue.Value >>= aSnapGridWidthYDom;
900
0
        }
901
0
        else if (!bImpress && rValue.Name == sUNO_View_VisibleLayers  )
902
0
        {
903
0
            SdrLayerIDSet aSdrLayerIDSets;
904
0
            aSdrLayerIDSets.PutValue( rValue.Value );
905
0
            SetVisibleLayers( aSdrLayerIDSets );
906
0
        }
907
0
        else if (!bImpress && rValue.Name == sUNO_View_PrintableLayers )
908
0
        {
909
0
            SdrLayerIDSet aSdrLayerIDSets;
910
0
            aSdrLayerIDSets.PutValue( rValue.Value );
911
0
            SetPrintableLayers( aSdrLayerIDSets );
912
0
        }
913
0
        else if (!bImpress && rValue.Name == sUNO_View_LockedLayers )
914
0
        {
915
0
            SdrLayerIDSet aSdrLayerIDSets;
916
0
            aSdrLayerIDSets.PutValue( rValue.Value );
917
0
            SetLockedLayers( aSdrLayerIDSets );
918
0
        }
919
0
        else if ( bImpress && rValue.Name == sUNO_View_HasCanvasPage )
920
0
        {
921
0
            if ( (rValue.Value >>= bBool) && bBool )
922
0
                pDrawDocument->ImportCanvasPage();
923
0
        }
924
0
    }
925
926
0
    SetViewShEditModeOnLoad(EditMode::Page);
927
928
0
    SetSnapGridWidth( double(aSnapGridWidthXNum) / aSnapGridWidthXDom, double(aSnapGridWidthYNum) / aSnapGridWidthYDom );
929
0
}
930
931
void FrameView::SetPreviousViewShellType (ViewShell::ShellType eType)
932
10.2k
{
933
10.2k
    mePreviousViewShellType = eType;
934
10.2k
}
935
936
void FrameView::SetViewShellTypeOnLoad (ViewShell::ShellType eType)
937
10.2k
{
938
10.2k
    meViewShellTypeOnLoad = eType;
939
10.2k
}
940
941
void FrameView::SetSelectedPage(sal_uInt16 nPage)
942
10.2k
{
943
10.2k
    mnSelectedPage = nPage;
944
10.2k
}
945
946
void FrameView::SetIsNavigatorShowingAllShapes (const bool bIsNavigatorShowingAllShapes)
947
0
{
948
0
    mbIsNavigatorShowingAllShapes = bIsNavigatorShowingAllShapes;
949
0
}
950
951
} // end of namespace sd
952
953
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */