Coverage Report

Created: 2026-09-28 10:59

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libreoffice/sc/source/ui/view/tabvwsh2.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 <comphelper/lok.hxx>
21
#include <sfx2/bindings.hxx>
22
#include <sfx2/viewfrm.hxx>
23
#include <svl/whiter.hxx>
24
#include <unotools/moduleoptions.hxx>
25
#include <svl/cjkoptions.hxx>
26
#include <sfx2/dispatch.hxx>
27
#include <tools/UnitConversion.hxx>
28
29
#include <tabvwsh.hxx>
30
#include <drawview.hxx>
31
#include <fupoor.hxx>
32
#include <fuconrec.hxx>
33
#include <fuconpol.hxx>
34
#include <fuconarc.hxx>
35
#include <fuconuno.hxx>
36
#include <fusel.hxx>
37
#include <futext.hxx>
38
#include <fuinsert.hxx>
39
#include <sc.hrc>
40
#include <scmod.hxx>
41
#include <appoptio.hxx>
42
#include <gridwin.hxx>
43
44
// Create default drawing objects via keyboard
45
#include <svx/svdpagv.hxx>
46
#include <svl/stritem.hxx>
47
#include <fuconcustomshape.hxx>
48
49
SdrView* ScTabViewShell::GetDrawView() const
50
0
{
51
0
    return const_cast<ScTabViewShell*>(this)->GetScDrawView();    // GetScDrawView is non-const
52
0
}
53
54
void ScTabViewShell::WindowChanged()
55
0
{
56
0
    vcl::Window* pWin = GetActiveWin();
57
58
0
    ScDrawView* pDrView = GetScDrawView();
59
0
    if (pDrView)
60
0
        pDrView->SetActualWin(pWin->GetOutDev());
61
62
0
    FuPoor* pFunc = GetDrawFuncPtr();
63
0
    if (pFunc)
64
0
        pFunc->SetWindow(pWin);
65
66
    //  when font from InputContext is used,
67
    //  this must be moved to change of cursor position:
68
0
    UpdateInputContext();
69
0
}
70
71
void ScTabViewShell::ExecDraw(SfxRequest& rReq)
72
0
{
73
0
    ScModule* mod = ScModule::get();
74
0
    mod->InputEnterHandler();
75
0
    UpdateInputHandler();
76
77
0
    MakeDrawLayer();
78
79
0
    ScTabView* pTabView = GetViewData().GetView();
80
0
    SfxBindings& rBindings = GetViewFrame().GetBindings();
81
82
0
    vcl::Window*     pWin    = pTabView->GetActiveWin();
83
0
    ScDrawView* pView   = pTabView->GetScDrawView();
84
0
    SdrModel& rModel = pView->GetModel();
85
86
0
    const SfxItemSet *pArgs = rReq.GetArgs();
87
0
    sal_uInt16 nNewId = rReq.GetSlot();
88
89
0
    if ( nNewId == SID_DRAW_CHART )
90
0
    {
91
        // #i71254# directly insert a chart instead of drawing its output rectangle
92
0
        FuInsertChart(*this, pWin, pView, rModel, rReq, LINK( this, ScTabViewShell, DialogClosedHdl ));
93
0
        return;
94
0
    }
95
96
0
    if ( nNewId == SID_DRAW_SELECT )
97
0
        nNewId = SID_OBJECT_SELECT;
98
99
0
    SdrObjKind eNewFormObjKind = SdrObjKind::NONE;
100
0
    if (nNewId == SID_FM_CREATE_CONTROL)
101
0
    {
102
0
        const SfxUInt16Item* pIdentifierItem = rReq.GetArg(SID_FM_CONTROL_IDENTIFIER);
103
0
        if (pIdentifierItem)
104
0
            eNewFormObjKind = static_cast<SdrObjKind>(pIdentifierItem->GetValue());
105
0
    }
106
107
0
    OUString sStringItemValue;
108
0
    if ( pArgs )
109
0
    {
110
0
        const SfxPoolItem* pItem;
111
0
        if ( pArgs->GetItemState( nNewId, true, &pItem ) == SfxItemState::SET )
112
0
            if (auto pStringItem = dynamic_cast<const SfxStringItem*>(pItem) )
113
0
                sStringItemValue = pStringItem->GetValue();
114
0
    }
115
0
    bool bSwitchCustom = ( !sStringItemValue.isEmpty() && !sDrawCustom.isEmpty() && sStringItemValue != sDrawCustom );
116
117
0
    if (nNewId == SID_INSERT_FRAME)                     // from Tbx button
118
0
        nNewId = SID_DRAW_TEXT;
119
120
    //  CTRL-SID_OBJECT_SELECT is used to select the first object,
121
    //  but not if SID_OBJECT_SELECT is the result of clicking a create function again,
122
    //  so this must be tested before changing nNewId below.
123
0
    bool bSelectFirst = ( nNewId == SID_OBJECT_SELECT && (rReq.GetModifier() & KEY_MOD1) );
124
125
0
    bool bEx = IsDrawSelMode();
126
0
    if ( rReq.GetModifier() & KEY_MOD1 )
127
0
    {
128
        //  always allow keyboard selection also on background layer
129
        //  also allow creation of default objects if the same object type
130
        //  was already active
131
0
        bEx = true;
132
0
    }
133
0
    else if ( nNewId == nDrawSfxId && ( nNewId != SID_FM_CREATE_CONTROL ||
134
0
                                    eNewFormObjKind == eFormObjKind || eNewFormObjKind == SdrObjKind::NONE ) && !bSwitchCustom )
135
0
    {
136
        // #i52871# if a different custom shape is selected, the slot id can be the same,
137
        // so the custom shape type string has to be compared, too.
138
139
        // SID_FM_CREATE_CONTROL with eNewFormObjKind==OBJ_NONE (without parameter) comes
140
        // from FuConstruct::SimpleMouseButtonUp when deactivating
141
        // Execute for the form shell, to deselect the controller
142
0
        if ( nNewId == SID_FM_CREATE_CONTROL )
143
0
        {
144
0
            GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
145
0
            GetViewFrame().GetBindings().InvalidateAll(false);
146
            //! what kind of slot does the weird controller really need to display this????
147
0
        }
148
149
0
        bEx = !bEx;
150
0
        nNewId = SID_OBJECT_SELECT;
151
0
    }
152
0
    else
153
0
        bEx = true;
154
155
0
    if ( nDrawSfxId == SID_FM_CREATE_CONTROL && nNewId != nDrawSfxId )
156
0
    {
157
        // switching from control- to paint function -> deselect in control-controller
158
0
        GetViewData().GetDispatcher().Execute(SID_FM_LEAVE_CREATE);
159
0
        GetViewFrame().GetBindings().InvalidateAll(false);
160
        //! what kind of slot does the weird controller really need to display this????
161
0
    }
162
163
0
    SetDrawSelMode(bEx);
164
165
0
    pView->LockBackgroundLayer( !bEx );
166
167
0
    const SdrMarkList& rMarkList = pView->GetMarkedObjectList();
168
0
    if ( bSelectFirst )
169
0
    {
170
        // select first draw object if none is selected yet
171
0
        if(rMarkList.GetMarkCount() == 0)
172
0
        {
173
            // select first object
174
0
            pView->UnmarkAllObj();
175
0
            pView->MarkNextObj(true);
176
177
            // ...and make it visible
178
0
            if(rMarkList.GetMarkCount() != 0)
179
0
                pView->MakeVisible(pView->GetAllMarkedRect(), *pWin);
180
0
        }
181
0
    }
182
183
0
    nDrawSfxId = nNewId;
184
0
    sDrawCustom.clear();    // value is set below for custom shapes
185
186
0
    if (nNewId == SID_DRAW_TEXT || nNewId == SID_DRAW_TEXT_VERTICAL
187
0
        || nNewId == SID_DRAW_TEXT_MARQUEE || nNewId == SID_DRAW_NOTEEDIT)
188
0
        SetDrawTextShell(true);
189
0
    else
190
0
    {
191
0
        if (bEx || rMarkList.GetMarkCount() != 0)
192
0
            SetDrawShellOrSub();
193
0
        else
194
0
            SetDrawShell(false);
195
0
    }
196
197
0
    if (pTabView->GetDrawFuncPtr())
198
0
    {
199
0
        if (pTabView->GetDrawFuncOldPtr() != pTabView->GetDrawFuncPtr())
200
0
            delete pTabView->GetDrawFuncOldPtr();
201
202
0
        pTabView->GetDrawFuncPtr()->Deactivate();
203
0
        pTabView->SetDrawFuncOldPtr(pTabView->GetDrawFuncPtr());
204
0
        pTabView->SetDrawFuncPtr(nullptr);
205
0
    }
206
207
0
    SfxRequest aNewReq(rReq);
208
0
    aNewReq.SetSlot(nDrawSfxId);
209
210
0
    assert(nNewId != SID_DRAW_CHART); //#i71254# handled already above
211
212
    // for LibreOfficeKit - choosing a shape should construct it directly
213
0
    bool bCreateDirectly = false;
214
215
0
    switch (nNewId)
216
0
    {
217
0
        case SID_OBJECT_SELECT:
218
            // not always switch back
219
0
            if(rMarkList.GetMarkCount() == 0) SetDrawShell(bEx);
220
0
            pTabView->SetDrawFuncPtr(new FuSelection(*this, pWin, pView, rModel, aNewReq));
221
0
            break;
222
223
0
        case SID_DRAW_LINE:
224
0
        case SID_DRAW_XLINE:
225
0
        case SID_LINE_ARROW_END:
226
0
        case SID_LINE_ARROW_CIRCLE:
227
0
        case SID_LINE_ARROW_SQUARE:
228
0
        case SID_LINE_ARROW_START:
229
0
        case SID_LINE_CIRCLE_ARROW:
230
0
        case SID_LINE_SQUARE_ARROW:
231
0
        case SID_LINE_ARROWS:
232
0
        case SID_DRAW_RECT:
233
0
        case SID_DRAW_ELLIPSE:
234
0
        case SID_DRAW_MEASURELINE:
235
0
        case SID_TOOL_CONNECTOR:
236
0
        case SID_CONNECTOR_ARROW_START:
237
0
        case SID_CONNECTOR_ARROW_END:
238
0
        case SID_CONNECTOR_ARROWS:
239
0
        case SID_CONNECTOR_CIRCLE_START:
240
0
        case SID_CONNECTOR_CIRCLE_END:
241
0
        case SID_CONNECTOR_CIRCLES:
242
0
        case SID_CONNECTOR_LINE:
243
0
        case SID_CONNECTOR_LINE_ARROW_START:
244
0
        case SID_CONNECTOR_LINE_ARROW_END:
245
0
        case SID_CONNECTOR_LINE_ARROWS:
246
0
        case SID_CONNECTOR_LINE_CIRCLE_START:
247
0
        case SID_CONNECTOR_LINE_CIRCLE_END:
248
0
        case SID_CONNECTOR_LINE_CIRCLES:
249
0
        case SID_CONNECTOR_CURVE:
250
0
        case SID_CONNECTOR_CURVE_ARROW_START:
251
0
        case SID_CONNECTOR_CURVE_ARROW_END:
252
0
        case SID_CONNECTOR_CURVE_ARROWS:
253
0
        case SID_CONNECTOR_CURVE_CIRCLE_START:
254
0
        case SID_CONNECTOR_CURVE_CIRCLE_END:
255
0
        case SID_CONNECTOR_CURVE_CIRCLES:
256
0
        case SID_CONNECTOR_LINES:
257
0
        case SID_CONNECTOR_LINES_ARROW_START:
258
0
        case SID_CONNECTOR_LINES_ARROW_END:
259
0
        case SID_CONNECTOR_LINES_ARROWS:
260
0
        case SID_CONNECTOR_LINES_CIRCLE_START:
261
0
        case SID_CONNECTOR_LINES_CIRCLE_END:
262
0
        case SID_CONNECTOR_LINES_CIRCLES:
263
0
            pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, rModel, aNewReq));
264
0
            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
265
0
            break;
266
267
0
        case SID_DRAW_CAPTION:
268
0
        case SID_DRAW_CAPTION_VERTICAL:
269
0
            pTabView->SetDrawFuncPtr(new FuConstRectangle(*this, pWin, pView, rModel, aNewReq));
270
0
            pView->SetFrameDragSingles( false );
271
0
            rBindings.Invalidate( SID_BEZIER_EDIT );
272
0
            break;
273
274
0
        case SID_DRAW_XPOLYGON:
275
0
        case SID_DRAW_XPOLYGON_NOFILL:
276
0
        case SID_DRAW_POLYGON:
277
0
        case SID_DRAW_POLYGON_NOFILL:
278
0
        case SID_DRAW_BEZIER_NOFILL:
279
0
        case SID_DRAW_BEZIER_FILL:
280
0
        case SID_DRAW_FREELINE:
281
0
        case SID_DRAW_FREELINE_NOFILL:
282
0
            pTabView->SetDrawFuncPtr(new FuConstPolygon(*this, pWin, pView, rModel, aNewReq));
283
0
            break;
284
285
0
        case SID_DRAW_ARC:
286
0
        case SID_DRAW_PIE:
287
0
        case SID_DRAW_CIRCLECUT:
288
0
            pTabView->SetDrawFuncPtr(new FuConstArc(*this, pWin, pView, rModel, aNewReq));
289
0
            break;
290
291
0
        case SID_DRAW_TEXT:
292
0
        case SID_DRAW_TEXT_VERTICAL:
293
0
        case SID_DRAW_TEXT_MARQUEE:
294
0
        case SID_DRAW_NOTEEDIT:
295
0
            pTabView->SetDrawFuncPtr(new FuText(*this, pWin, pView, rModel, aNewReq));
296
0
            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
297
0
            break;
298
299
0
        case SID_FM_CREATE_CONTROL:
300
0
            SetDrawFormShell(true);
301
0
            pTabView->SetDrawFuncPtr(new FuConstUnoControl(*this, pWin, pView, rModel, aNewReq));
302
0
            eFormObjKind = eNewFormObjKind;
303
0
            break;
304
305
0
        case SID_DRAWTBX_CS_BASIC :
306
0
        case SID_DRAWTBX_CS_SYMBOL :
307
0
        case SID_DRAWTBX_CS_ARROW :
308
0
        case SID_DRAWTBX_CS_FLOWCHART :
309
0
        case SID_DRAWTBX_CS_CALLOUT :
310
0
        case SID_DRAWTBX_CS_STAR :
311
0
        case SID_DRAW_CS_ID :
312
0
        {
313
0
            pTabView->SetDrawFuncPtr(new FuConstCustomShape(*this, pWin, pView, rModel, aNewReq));
314
315
0
            bCreateDirectly = comphelper::LibreOfficeKit::isActive();
316
317
0
            if ( nNewId != SID_DRAW_CS_ID )
318
0
            {
319
0
                const SfxStringItem* pEnumCommand = rReq.GetArg<SfxStringItem>(nNewId);
320
0
                if ( pEnumCommand )
321
0
                {
322
0
                    SfxBindings& rBind = GetViewFrame().GetBindings();
323
0
                    rBind.Invalidate( nNewId );
324
0
                    rBind.Update( nNewId );
325
326
0
                    sDrawCustom = pEnumCommand->GetValue();  // to detect when a different shape type is selected
327
0
                }
328
0
            }
329
0
        }
330
0
        break;
331
332
0
        default:
333
0
            break;
334
0
    }
335
336
0
    if (pTabView->GetDrawFuncPtr())
337
0
        pTabView->GetDrawFuncPtr()->Activate();
338
339
0
    rReq.Done();
340
341
0
    Invalidate();
342
343
    // Create default drawing objects via keyboard
344
    // with qualifier construct directly
345
0
    FuPoor* pFuActual = GetDrawFuncPtr();
346
347
0
    if(!(pFuActual && ((rReq.GetModifier() & KEY_MOD1) || bCreateDirectly)))
348
0
        return;
349
350
    // Create default drawing objects via keyboard
351
0
    const ScAppOptions& rAppOpt = mod->GetAppOptions();
352
0
    sal_uInt32 nDefaultObjectSizeWidth = rAppOpt.GetDefaultObjectSizeWidth();
353
0
    sal_uInt32 nDefaultObjectSizeHeight = rAppOpt.GetDefaultObjectSizeHeight();
354
355
    // calc position and size
356
0
    bool bLOKIsActive = comphelper::LibreOfficeKit::isActive();
357
0
    Point aInsertPos;
358
0
    if(!bLOKIsActive)
359
0
    {
360
0
        tools::Rectangle aVisArea = pWin->PixelToLogic(tools::Rectangle(Point(0,0), pWin->GetOutputSizePixel()));
361
0
        aInsertPos = aVisArea.Center();
362
0
        aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
363
0
        aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
364
0
    }
365
0
    else
366
0
    {
367
0
        ScViewData& rViewData = GetViewData();
368
0
        tools::Long nLayoutSign = rViewData.GetDocument().IsLayoutRTL(rViewData.CurrentTabForData()) ? -1 : 1;
369
0
        aInsertPos = rViewData.getLOKVisibleArea().Center();
370
0
        if (comphelper::LibreOfficeKit::isCompatFlagSet(
371
0
                comphelper::LibreOfficeKit::Compat::scPrintTwipsMsgs))
372
0
            aInsertPos = rViewData.GetPrintTwipsPosFromTileTwips(aInsertPos);
373
374
0
        aInsertPos.setX(nLayoutSign * convertTwipToMm100(aInsertPos.X()));
375
0
        aInsertPos.setY(convertTwipToMm100(aInsertPos.Y()));
376
377
0
        aInsertPos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
378
0
        aInsertPos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
379
0
    }
380
381
0
    tools::Rectangle aNewObjectRectangle(aInsertPos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
382
383
0
    ScDrawView* pDrView = GetScDrawView();
384
385
0
    if(!pDrView)
386
0
        return;
387
388
0
    SdrPageView* pPageView = pDrView->GetSdrPageView();
389
390
0
    if(!pPageView)
391
0
        return;
392
393
    // create the default object
394
0
    rtl::Reference<SdrObject> pObj = pFuActual->CreateDefaultObject(nNewId, aNewObjectRectangle);
395
396
0
    if(!pObj)
397
0
        return;
398
399
    // insert into page
400
0
    pView->InsertObjectAtView(pObj.get(), *pPageView);
401
402
0
    switch ( nNewId )
403
0
    {
404
0
    case SID_DRAW_CAPTION:
405
0
    case SID_DRAW_CAPTION_VERTICAL:
406
0
    case SID_DRAW_TEXT:
407
0
    case SID_DRAW_TEXT_VERTICAL:
408
        //  use KeyInput to start edit mode (FuText is created).
409
        //  For FuText objects, edit mode is handled within CreateDefaultObject.
410
        //  KEY_F2 is handled in FuDraw::KeyInput.
411
412
0
        pFuActual->KeyInput( KeyEvent( 0, vcl::KeyCode( KEY_F2 ) ) );
413
0
        break;
414
0
    default:
415
0
        break;
416
0
    }
417
0
}
418
419
void ScTabViewShell::GetDrawState(SfxItemSet &rSet)
420
0
{
421
0
    SfxWhichIter    aIter(rSet);
422
0
    sal_uInt16          nWhich = aIter.FirstWhich();
423
424
0
    while ( nWhich )
425
0
    {
426
0
        switch ( nWhich )
427
0
        {
428
0
            case SID_DRAW_CHART:
429
0
                {
430
0
                    bool bOle = GetViewFrame().GetFrame().IsInPlace();
431
0
                    if ( bOle || !SvtModuleOptions().IsChartInstalled() )
432
0
                        rSet.DisableItem( nWhich );
433
0
                }
434
0
                break;
435
436
0
            case SID_DRAW_LINE:
437
0
            case SID_DRAW_XLINE:
438
0
            case SID_LINE_ARROW_END:
439
0
            case SID_LINE_ARROW_CIRCLE:
440
0
            case SID_LINE_ARROW_SQUARE:
441
0
            case SID_LINE_ARROW_START:
442
0
            case SID_LINE_CIRCLE_ARROW:
443
0
            case SID_LINE_SQUARE_ARROW:
444
0
            case SID_LINE_ARROWS:
445
0
            case SID_DRAW_MEASURELINE:
446
0
            case SID_DRAW_RECT:
447
0
            case SID_DRAW_ELLIPSE:
448
0
            case SID_DRAW_POLYGON:
449
0
            case SID_DRAW_POLYGON_NOFILL:
450
0
            case SID_DRAW_XPOLYGON:
451
0
            case SID_DRAW_XPOLYGON_NOFILL:
452
0
            case SID_DRAW_BEZIER_FILL:
453
0
            case SID_DRAW_BEZIER_NOFILL:
454
0
            case SID_DRAW_FREELINE:
455
0
            case SID_DRAW_FREELINE_NOFILL:
456
0
            case SID_DRAW_ARC:
457
0
            case SID_DRAW_PIE:
458
0
            case SID_DRAW_CIRCLECUT:
459
0
            case SID_DRAW_TEXT:
460
0
            case SID_DRAW_TEXT_MARQUEE:
461
0
            case SID_DRAW_CAPTION:
462
0
            case SID_TOOL_CONNECTOR:
463
0
            case SID_CONNECTOR_ARROW_START:
464
0
            case SID_CONNECTOR_ARROW_END:
465
0
            case SID_CONNECTOR_ARROWS:
466
0
            case SID_CONNECTOR_CIRCLE_START:
467
0
            case SID_CONNECTOR_CIRCLE_END:
468
0
            case SID_CONNECTOR_CIRCLES:
469
0
            case SID_CONNECTOR_LINE:
470
0
            case SID_CONNECTOR_LINE_ARROW_START:
471
0
            case SID_CONNECTOR_LINE_ARROW_END:
472
0
            case SID_CONNECTOR_LINE_ARROWS:
473
0
            case SID_CONNECTOR_LINE_CIRCLE_START:
474
0
            case SID_CONNECTOR_LINE_CIRCLE_END:
475
0
            case SID_CONNECTOR_LINE_CIRCLES:
476
0
            case SID_CONNECTOR_CURVE:
477
0
            case SID_CONNECTOR_CURVE_ARROW_START:
478
0
            case SID_CONNECTOR_CURVE_ARROW_END:
479
0
            case SID_CONNECTOR_CURVE_ARROWS:
480
0
            case SID_CONNECTOR_CURVE_CIRCLE_START:
481
0
            case SID_CONNECTOR_CURVE_CIRCLE_END:
482
0
            case SID_CONNECTOR_CURVE_CIRCLES:
483
0
            case SID_CONNECTOR_LINES:
484
0
            case SID_CONNECTOR_LINES_ARROW_START:
485
0
            case SID_CONNECTOR_LINES_ARROW_END:
486
0
            case SID_CONNECTOR_LINES_ARROWS:
487
0
            case SID_CONNECTOR_LINES_CIRCLE_START:
488
0
            case SID_CONNECTOR_LINES_CIRCLE_END:
489
0
            case SID_CONNECTOR_LINES_CIRCLES:
490
0
                rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == nWhich ) );
491
0
                break;
492
493
0
            case SID_DRAW_TEXT_VERTICAL:
494
0
            case SID_DRAW_CAPTION_VERTICAL:
495
0
                if ( !SvtCJKOptions::IsVerticalTextEnabled() )
496
0
                    rSet.DisableItem( nWhich );
497
0
                else
498
0
                    rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == nWhich ) );
499
0
                break;
500
501
0
            case SID_OBJECT_SELECT:     // important for the old control-controller
502
0
                rSet.Put( SfxBoolItem( nWhich, nDrawSfxId == SID_OBJECT_SELECT && IsDrawSelMode() ) );
503
0
                break;
504
505
0
            case SID_DRAWTBX_CS_BASIC:
506
0
            case SID_DRAWTBX_CS_SYMBOL:
507
0
            case SID_DRAWTBX_CS_ARROW:
508
0
            case SID_DRAWTBX_CS_FLOWCHART:
509
0
            case SID_DRAWTBX_CS_CALLOUT:
510
0
            case SID_DRAWTBX_CS_STAR:
511
0
                rSet.Put( SfxStringItem( nWhich, nDrawSfxId == nWhich ? sDrawCustom : OUString() ) );
512
0
            break;
513
0
        }
514
0
        nWhich = aIter.NextWhich();
515
0
    }
516
0
}
517
518
bool ScTabViewShell::SelectObject( std::u16string_view rName )
519
0
{
520
0
    ScDrawView* pView = GetViewData().GetScDrawView();
521
0
    if (!pView)
522
0
        return false;
523
524
0
    bool bFound = pView->SelectObject( rName );
525
    // DrawShell etc. is handled in MarkListHasChanged
526
527
0
    return bFound;
528
0
}
529
530
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */