LibreOffice Module sd (master) 1
drviewse.cxx
Go to the documentation of this file.
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 <config_features.h>
21
22#include <com/sun/star/presentation/XPresentation2.hpp>
23#include <com/sun/star/form/FormButtonType.hpp>
24#include <com/sun/star/beans/XPropertySet.hpp>
25#include <i18nutil/unicode.hxx>
27#include <com/sun/star/beans/PropertyValue.hpp>
28#include <com/sun/star/uno/Any.hxx>
29
30#include <LibreOfficeKit/LibreOfficeKitEnums.h>
31#include <comphelper/lok.hxx>
33#include <editeng/editstat.hxx>
34#include <editeng/outlobj.hxx>
35#include <vcl/svapp.hxx>
36#include <vcl/weld.hxx>
37#include <svl/urlbmk.hxx>
38#include <svx/clipfmtitem.hxx>
39#include <svx/svdpagv.hxx>
40#include <svx/svdopath.hxx>
41#include <svx/svdundo.hxx>
42#include <svx/svdorect.hxx>
43#include <svl/eitem.hxx>
44#include <svl/intitem.hxx>
45#include <svl/poolitem.hxx>
46#include <svl/stritem.hxx>
47#include <editeng/eeitem.hxx>
48#include <sfx2/dispatch.hxx>
49#include <sfx2/viewfrm.hxx>
50#include <sfx2/request.hxx>
51#include <svx/svxids.hrc>
52#include <editeng/flditem.hxx>
53#include <svx/obj3d.hxx>
54#include <svx/svdobjkind.hxx>
55#include <svx/svdouno.hxx>
57#include <tools/urlobj.hxx>
58#include <sfx2/ipclient.hxx>
60#include <svl/urihelper.hxx>
61#include <sfx2/docfile.hxx>
63#include <osl/diagnose.h>
64
65#include <DrawViewShell.hxx>
66#include <slideshow.hxx>
67#include <ViewShellHint.hxx>
69#include <app.hrc>
70#include <strings.hrc>
71
72#include <drawdoc.hxx>
73#include <fusel.hxx>
74#include <futext.hxx>
75#include <fuconrec.hxx>
76#include <fuconcs.hxx>
77#include <fuconuno.hxx>
78#include <fuconbez.hxx>
79#include <fuediglu.hxx>
80#include <fuconarc.hxx>
81#include <fucon3d.hxx>
82#include <sdresid.hxx>
83#include <unokywds.hxx>
84#include <Outliner.hxx>
85#include <sdpage.hxx>
86#include <FrameView.hxx>
87#include <zoomlist.hxx>
88#include <drawview.hxx>
89#include <DrawDocShell.hxx>
90#include <ViewShellBase.hxx>
91#include <ToolBarManager.hxx>
92#include <anminfo.hxx>
93#include <optsitem.hxx>
94#include <Window.hxx>
96#include <fuzoom.hxx>
97#include <sdmod.hxx>
99
100using namespace ::com::sun::star;
101using namespace ::com::sun::star::uno;
102using namespace ::com::sun::star::presentation;
103using namespace ::com::sun::star::beans;
104
105namespace sd {
106
107// Permanent Functions
108
110{
111 // evtl. feed characters to activated textedit
112 const SfxItemSet* pSet = rReq.GetArgs();
113
114 if(!pSet)
115 return;
116
117 OUString aInputString;
118
119 if(SfxItemState::SET == pSet->GetItemState(SID_ATTR_CHAR))
120 aInputString = pSet->Get(SID_ATTR_CHAR).GetValue();
121
122 if(aInputString.isEmpty())
123 return;
124
125 OutlinerView* pOLV = pView->GetTextEditOutlinerView();
126
127 if(pOLV)
128 {
129 for(sal_Int32 a(0); a < aInputString.getLength(); a++)
130 {
131 vcl::KeyCode aKeyCode;
132 // tdf#38669 - create the key event using a Unicode character
133 KeyEvent aKeyEvent(aInputString[a], aKeyCode);
134
135 // add actual character
136 pOLV->PostKeyEvent(aKeyEvent);
137 }
138 }
139}
140
142{
143 // We do not execute a thing during a native slide show
144
146 return;
147
148 sal_uInt16 nSId = rReq.GetSlot();
149
150 if( HasCurrentFunction() &&
151 ( nSId == SID_TEXTEDIT || nSId == SID_ATTR_CHAR || nSId == SID_TEXT_FITTOSIZE ||
152 nSId == SID_ATTR_CHAR_VERTICAL || nSId == SID_TEXT_FITTOSIZE_VERTICAL ) )
153 {
155
156 FuText* pFuText = dynamic_cast< FuText* >( xFunc.get() );
157
158 if( pFuText )
159 {
160 pFuText->SetPermanent(true);
161 xFunc->ReceiveRequest( rReq );
162
163 Invalidate();
164
165 // evtl. feed characters to activated textedit
166 if(SID_ATTR_CHAR == nSId && GetView() && GetView()->IsTextEdit())
168
169 rReq.Done();
170 return;
171 }
172 }
173
174 CheckLineTo (rReq);
175 sal_uInt16 nOldSId = 0;
176 bool bPermanent = false;
177
178 if( !mpDrawView )
179 return;
180
182 {
183 if( (nSId == SID_FORMATPAINTBRUSH) && (GetCurrentFunction()->GetSlotID() == SID_TEXTEDIT) )
184 {
185 // save text edit mode for format paintbrush!
187 }
188 else
189 {
191 {
192 SetOldFunction(nullptr);
193 }
194 }
195
196 if ( nSId != SID_TEXTEDIT && nSId != SID_ATTR_CHAR && nSId != SID_TEXT_FITTOSIZE &&
197 nSId != SID_ATTR_CHAR_VERTICAL && nSId != SID_TEXT_FITTOSIZE_VERTICAL &&
198 nSId != SID_FORMATPAINTBRUSH &&
199 mpDrawView->IsTextEdit() )
200 {
201 mpDrawView->SdrEndTextEdit();
202 }
203
204 if( HasCurrentFunction() )
205 {
206 nOldSId = GetCurrentFunction()->GetSlotID();
207
208 if (nOldSId == nSId ||
209 ((nOldSId == SID_TEXTEDIT || nOldSId == SID_ATTR_CHAR || nOldSId == SID_TEXT_FITTOSIZE ||
210 nOldSId == SID_ATTR_CHAR_VERTICAL || nOldSId == SID_TEXT_FITTOSIZE_VERTICAL) &&
211 (nSId == SID_TEXTEDIT || nSId == SID_ATTR_CHAR || nSId == SID_TEXT_FITTOSIZE ||
212 nSId == SID_ATTR_CHAR_VERTICAL || nSId == SID_TEXT_FITTOSIZE_VERTICAL )))
213 {
214 bPermanent = true;
215 }
216
217 GetCurrentFunction()->Deactivate();
218 }
219
220 SetCurrentFunction(nullptr);
221
223 rBind.Invalidate(nOldSId);
224 rBind.Update(nOldSId);
225 }
226
227 // for LibreOfficeKit - choosing a shape should construct it directly
228 bool bCreateDirectly = false;
229
230 switch ( nSId )
231 {
232 case SID_TEXTEDIT: // BASIC ???
233 case SID_ATTR_CHAR:
234 case SID_ATTR_CHAR_VERTICAL:
235 case SID_TEXT_FITTOSIZE:
236 case SID_TEXT_FITTOSIZE_VERTICAL:
237 {
239 GetCurrentFunction()->DoExecute(rReq);
240
241 SfxBindings& rBindings = GetViewFrame()->GetBindings();
242 rBindings.Invalidate( SID_ATTR_CHAR );
243 rBindings.Invalidate( SID_ATTR_CHAR_VERTICAL );
244 rBindings.Invalidate( SID_TEXT_FITTOSIZE );
245 rBindings.Invalidate( SID_TEXT_FITTOSIZE_VERTICAL );
246
247 // evtl. feed characters to activated textedit
248 if(SID_ATTR_CHAR == nSId && GetView() && GetView()->IsTextEdit())
250
251 rReq.Done();
252
253 const SfxItemSet* pArgs = rReq.GetArgs();
254 if (pArgs && pArgs->HasItem(FN_PARAM_1))
255 bCreateDirectly = static_cast<const SfxBoolItem&>(pArgs->Get(FN_PARAM_1)).GetValue();
256 }
257 break;
258
259 case SID_FM_CREATE_CONTROL:
260 {
261 SetCurrentFunction( FuConstructUnoControl::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
262 rReq.Done();
263 }
264 break;
265
266 case SID_FM_CREATE_FIELDCONTROL:
267 {
268 const SfxUnoAnyItem* pDescriptorItem = rReq.GetArg<SfxUnoAnyItem>(SID_FM_DATACCESS_DESCRIPTOR);
269 DBG_ASSERT( pDescriptorItem, "DrawViewShell::FuPermanent(SID_FM_CREATE_FIELDCONTROL): invalid request args!" );
270
271 if(pDescriptorItem)
272 {
273 // get the form view
274 FmFormView* pFormView = mpDrawView.get();
275 SdrPageView* pPageView = pFormView ? pFormView->GetSdrPageView() : nullptr;
276
277 if(pPageView)
278 {
279 svx::ODataAccessDescriptor aDescriptor(pDescriptorItem->GetValue());
280 rtl::Reference<SdrObject> pNewDBField = pFormView->CreateFieldControl(aDescriptor);
281
282 if(pNewDBField)
283 {
284 ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel()));
285 Point aObjPos(aVisArea.Center());
286 Size aObjSize(pNewDBField->GetLogicRect().GetSize());
287 aObjPos.AdjustX( -(aObjSize.Width() / 2) );
288 aObjPos.AdjustY( -(aObjSize.Height() / 2) );
289 ::tools::Rectangle aNewObjectRectangle(aObjPos, aObjSize);
290
291 pNewDBField->SetLogicRect(aNewObjectRectangle);
292
293 GetView()->InsertObjectAtView(pNewDBField.get(), *pPageView);
294 }
295 }
296 }
297 rReq.Done();
298 }
299 break;
300
301 case SID_OBJECT_SELECT:
302 case SID_OBJECT_ROTATE:
303 case SID_OBJECT_MIRROR:
304 case SID_OBJECT_CROP:
305 case SID_OBJECT_TRANSPARENCE:
306 case SID_OBJECT_GRADIENT:
307 case SID_OBJECT_SHEAR:
308 case SID_OBJECT_CROOK_ROTATE:
309 case SID_OBJECT_CROOK_SLANT:
310 case SID_OBJECT_CROOK_STRETCH:
311 case SID_CONVERT_TO_3D_LATHE:
312 {
313 sal_uInt16 nSlotId = rReq.GetSlot();
314
315 // toggle function
316 if( nOldSId == nSlotId )
317 {
318 nSlotId = SID_OBJECT_SELECT;
319 rReq.SetSlot( nSlotId );
320 }
321
322 if (nSlotId == SID_OBJECT_CROOK_ROTATE ||
323 nSlotId == SID_OBJECT_CROOK_SLANT ||
324 nSlotId == SID_OBJECT_CROOK_STRETCH)
325 {
326 if ( mpDrawView->GetMarkedObjectList().GetMarkCount() > 0 &&
327 !mpDrawView->IsCrookAllowed( mpDrawView->IsCrookNoContortion() ) )
328 {
329 if ( mpDrawView->IsPresObjSelected() )
330 {
331 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
332 VclMessageType::Info, VclButtonsType::Ok,
333 SdResId(STR_ACTION_NOTPOSSIBLE)));
334 xInfoBox->run();
335 }
336 else
337 {
338 std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
339 VclMessageType::Question, VclButtonsType::YesNo,
340 SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER)));
341 if (xQueryBox->run() == RET_YES )
342 {
343 // implicit transformation into bezier
345 mpDrawView->ConvertMarkedToPathObj(false);
346 }
347 }
348 }
349 }
350 else if (nSlotId == SID_OBJECT_SHEAR)
351 {
352 size_t i = 0;
353 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
354 const size_t nMarkCnt = rMarkList.GetMarkCount();
355 bool b3DObjMarked = false;
356
357 while (i < nMarkCnt && !b3DObjMarked)
358 {
359 if (DynCastE3dObject( rMarkList.GetMark(i)->GetMarkedSdrObj() ))
360 {
361 b3DObjMarked = true;
362 }
363 else
364 {
365 i++;
366 }
367 }
368
369 if ( nMarkCnt > 0 && !b3DObjMarked &&
370 (!mpDrawView->IsShearAllowed() || !mpDrawView->IsDistortAllowed()) )
371 {
372 if ( mpDrawView->IsPresObjSelected() )
373 {
374 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
375 VclMessageType::Info, VclButtonsType::Ok,
376 SdResId(STR_ACTION_NOTPOSSIBLE)));
377 xInfoBox->run();
378 }
379 else
380 {
381 std::unique_ptr<weld::MessageDialog> xQueryBox(Application::CreateMessageDialog(GetFrameWeld(),
382 VclMessageType::Question, VclButtonsType::YesNo,
383 SdResId(STR_ASK_FOR_CONVERT_TO_BEZIER)));
384 if (xQueryBox->run() == RET_YES)
385 {
386 // implicit transformation into bezier
388 mpDrawView->ConvertMarkedToPathObj(false);
389 }
390 }
391 }
392 }
393
395 rReq.Done();
396 Invalidate( SID_OBJECT_SELECT );
397 }
398 break;
399
400 case SID_DRAW_LINE:
401 case SID_DRAW_XLINE:
402 case SID_DRAW_MEASURELINE:
403 case SID_LINE_ARROW_START:
404 case SID_LINE_ARROW_END:
405 case SID_LINE_ARROWS:
406 case SID_LINE_ARROW_CIRCLE:
407 case SID_LINE_CIRCLE_ARROW:
408 case SID_LINE_ARROW_SQUARE:
409 case SID_LINE_SQUARE_ARROW:
410
411 case SID_DRAW_RECT:
412 case SID_DRAW_RECT_NOFILL:
413 case SID_DRAW_RECT_ROUND:
414 case SID_DRAW_RECT_ROUND_NOFILL:
415 case SID_DRAW_SQUARE:
416 case SID_DRAW_SQUARE_NOFILL:
417 case SID_DRAW_SQUARE_ROUND:
418 case SID_DRAW_SQUARE_ROUND_NOFILL:
419 case SID_DRAW_ELLIPSE:
420 case SID_DRAW_ELLIPSE_NOFILL:
421 case SID_DRAW_CIRCLE:
422 case SID_DRAW_CIRCLE_NOFILL:
423 case SID_DRAW_CAPTION:
424 case SID_DRAW_CAPTION_VERTICAL:
425 case SID_TOOL_CONNECTOR:
426 case SID_CONNECTOR_ARROW_START:
427 case SID_CONNECTOR_ARROW_END:
428 case SID_CONNECTOR_ARROWS:
429 case SID_CONNECTOR_CIRCLE_START:
430 case SID_CONNECTOR_CIRCLE_END:
431 case SID_CONNECTOR_CIRCLES:
432 case SID_CONNECTOR_LINE:
433 case SID_CONNECTOR_LINE_ARROW_START:
434 case SID_CONNECTOR_LINE_ARROW_END:
435 case SID_CONNECTOR_LINE_ARROWS:
436 case SID_CONNECTOR_LINE_CIRCLE_START:
437 case SID_CONNECTOR_LINE_CIRCLE_END:
438 case SID_CONNECTOR_LINE_CIRCLES:
439 case SID_CONNECTOR_CURVE:
440 case SID_CONNECTOR_CURVE_ARROW_START:
441 case SID_CONNECTOR_CURVE_ARROW_END:
442 case SID_CONNECTOR_CURVE_ARROWS:
443 case SID_CONNECTOR_CURVE_CIRCLE_START:
444 case SID_CONNECTOR_CURVE_CIRCLE_END:
445 case SID_CONNECTOR_CURVE_CIRCLES:
446 case SID_CONNECTOR_LINES:
447 case SID_CONNECTOR_LINES_ARROW_START:
448 case SID_CONNECTOR_LINES_ARROW_END:
449 case SID_CONNECTOR_LINES_ARROWS:
450 case SID_CONNECTOR_LINES_CIRCLE_START:
451 case SID_CONNECTOR_LINES_CIRCLE_END:
452 case SID_CONNECTOR_LINES_CIRCLES:
453 case SID_INSERT_SIGNATURELINE:
454 {
455 bCreateDirectly = comphelper::LibreOfficeKit::isActive();
456 SetCurrentFunction( FuConstructRectangle::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
457 rReq.Done();
458 }
459 break;
460 case SID_DRAW_POLYGON:
461 case SID_DRAW_POLYGON_NOFILL:
462 case SID_DRAW_XPOLYGON:
463 case SID_DRAW_XPOLYGON_NOFILL:
464 case SID_DRAW_FREELINE:
465 case SID_DRAW_FREELINE_NOFILL:
466 case SID_DRAW_BEZIER_FILL: // BASIC
467 case SID_DRAW_BEZIER_NOFILL: // BASIC
468 {
470 rReq.Done();
471 }
472 break;
473
474 case SID_GLUE_EDITMODE:
475 {
476 if (nOldSId != SID_GLUE_EDITMODE)
477 {
478 SetCurrentFunction( FuEditGluePoints::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
479 }
480 else
481 {
482 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
483 }
484
485 rReq.Done();
486 }
487 break;
488
489 case SID_DRAW_ARC:
490 case SID_DRAW_CIRCLEARC:
491 case SID_DRAW_PIE:
492 case SID_DRAW_PIE_NOFILL:
493 case SID_DRAW_CIRCLEPIE:
494 case SID_DRAW_CIRCLEPIE_NOFILL:
495 case SID_DRAW_ELLIPSECUT:
496 case SID_DRAW_ELLIPSECUT_NOFILL:
497 case SID_DRAW_CIRCLECUT:
498 case SID_DRAW_CIRCLECUT_NOFILL:
499 {
500 SetCurrentFunction( FuConstructArc::Create( this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent) );
501 rReq.Done();
502 }
503 break;
504
505 case SID_3D_CUBE:
506 case SID_3D_SHELL:
507 case SID_3D_SPHERE:
508 case SID_3D_TORUS:
509 case SID_3D_HALF_SPHERE:
510 case SID_3D_CYLINDER:
511 case SID_3D_CONE:
512 case SID_3D_PYRAMID:
513 {
514 SetCurrentFunction( FuConstruct3dObject::Create(this, GetActiveWindow(), mpDrawView.get(), GetDoc(), rReq, bPermanent ) );
515 rReq.Done();
516 }
517 break;
518
519 case SID_DRAWTBX_CS_BASIC :
520 case SID_DRAWTBX_CS_SYMBOL :
521 case SID_DRAWTBX_CS_ARROW :
522 case SID_DRAWTBX_CS_FLOWCHART :
523 case SID_DRAWTBX_CS_CALLOUT :
524 case SID_DRAWTBX_CS_STAR :
525 case SID_DRAW_CS_ID :
526 {
528 rReq.Done();
529
530 bCreateDirectly = comphelper::LibreOfficeKit::isActive();
531 const SfxItemSet* pArgs = rReq.GetArgs();
532 if (pArgs && pArgs->HasItem(FN_PARAM_1))
533 {
534 bCreateDirectly = static_cast<const SfxBoolItem&>(pArgs->Get(FN_PARAM_1)).GetValue();
535 }
536
537 if ( nSId != SID_DRAW_CS_ID )
538 {
540 rBind.Invalidate( nSId );
541 rBind.Update( nSId );
542 }
543 }
544 break;
545
546 case SID_FORMATPAINTBRUSH:
547 {
549 rReq.Done();
551 rBind.Invalidate( nSId );
552 rBind.Update( nSId );
553 break;
554 }
555
556 case SID_ZOOM_MODE:
557 case SID_ZOOM_PANNING:
558 {
559 if (nOldSId != nSId)
560 {
561 mbZoomOnPage = false;
563 }
564 else
565 {
566 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
567 }
568 rReq.Done();
569 }
570 break;
571
572 default:
573 break;
574 }
575
576 if(HasOldFunction())
577 {
578 sal_uInt16 nSlotId = GetOldFunction()->GetSlotID();
579
580 GetOldFunction()->Deactivate();
581 SetOldFunction(nullptr);
582
584 rBind.Invalidate( nSlotId );
585 rBind.Update( nSlotId );
586 }
587
589 {
590 GetCurrentFunction()->Activate();
592 }
593
594 // invalidate shell, is faster than every individually (says MI)
595 // now explicit the last slot incl. Update()
596 Invalidate();
597
598 // CTRL-SID_OBJECT_SELECT -> select first draw object if none is selected yet
599 if(SID_OBJECT_SELECT == nSId && HasCurrentFunction() && (rReq.GetModifier() & KEY_MOD1))
600 {
601 if(!GetView()->AreObjectsMarked())
602 {
603 // select first object
605 GetView()->MarkNextObj(true);
606
607 // ...and make it visible
608 if(GetView()->AreObjectsMarked())
609 GetView()->MakeVisible(GetView()->GetAllMarkedRect(), *GetActiveWindow());
610 }
611 }
612
613 // with qualifier construct directly
614 if(!(HasCurrentFunction() && ((rReq.GetModifier() & KEY_MOD1) || bCreateDirectly)))
615 return;
616
617 // disable interactive drawing for LOK
618 if (bCreateDirectly)
619 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
620
621 // get SdOptions
622 SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
623 sal_uInt32 nDefaultObjectSizeWidth(pOptions->GetDefaultObjectSizeWidth());
624 sal_uInt32 nDefaultObjectSizeHeight(pOptions->GetDefaultObjectSizeHeight());
625
626 // calc position and size
627 ::tools::Rectangle aVisArea = GetActiveWindow()->PixelToLogic(::tools::Rectangle(Point(0,0), GetActiveWindow()->GetOutputSizePixel()));
629 {
630 // aVisArea is nonsensical in the LOK case, use the slide size
631 aVisArea = ::tools::Rectangle(Point(), getCurrentPage()->GetSize());
632 }
633
634 Point aPagePos = aVisArea.Center();
635 aPagePos.AdjustX( -sal_Int32(nDefaultObjectSizeWidth / 2) );
636 aPagePos.AdjustY( -sal_Int32(nDefaultObjectSizeHeight / 2) );
637 ::tools::Rectangle aNewObjectRectangle(aPagePos, Size(nDefaultObjectSizeWidth, nDefaultObjectSizeHeight));
638 SdrPageView* pPageView = mpDrawView->GetSdrPageView();
639
640 if(!pPageView)
641 return;
642
643 // create the default object
644 rtl::Reference<SdrObject> pObj = GetCurrentFunction()->CreateDefaultObject(nSId, aNewObjectRectangle);
645
646 if(!pObj)
647 return;
648
649 auto pObjTmp = pObj.get();
650 // insert into page
651 GetView()->InsertObjectAtView(pObj.get(), *pPageView);
652
653 // Now that pFuActual has done what it was created for we
654 // can switch on the edit mode for callout objects.
655 switch (nSId)
656 {
657 case SID_DRAW_CAPTION:
658 case SID_DRAW_CAPTION_VERTICAL:
659 {
660 // Make FuText the current function.
661 SfxUInt16Item aItem (SID_TEXTEDIT, 1);
663 ExecuteList(SID_TEXTEDIT, SfxCallMode::SYNCHRON |
664 SfxCallMode::RECORD, { &aItem });
665 // Put text object into edit mode.
666 GetView()->SdrBeginTextEdit(static_cast<SdrTextObj*>(pObjTmp), pPageView);
667 break;
668 }
669 }
670}
671
673{
674 if( !mpDrawView )
675 return;
676
677 bool bConsumed = false;
678
679 //if any placeholders are selected
680 if (mpDrawView->IsPresObjSelected(false))
681 {
682 //If there are placeholders in the list which can be toggled
683 //off in edit->master->master elements then do that here,
684 std::vector<SdrObject*> aPresMarksToRemove;
685 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
686 for (size_t i=0; i < rMarkList.GetMarkCount(); ++i)
687 {
688 SdrObject* pObj = rMarkList.GetMark(i)->GetMarkedSdrObj();
689 SdPage* pPage = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject());
690 PresObjKind eKind = pPage->GetPresObjKind(pObj);
691 if (eKind == PresObjKind::Footer || eKind == PresObjKind::Header ||
693 {
694 aPresMarksToRemove.push_back(pObj);
695 }
696 }
697
698 for (SdrObject* pObj : aPresMarksToRemove)
699 {
700 //Unmark object
701 mpDrawView->MarkObj(pObj, mpDrawView->GetSdrPageView(), true);
702 SdPage* pPage = static_cast<SdPage*>(pObj->getSdrPageFromSdrObject());
703 //remove placeholder from master page
704 pPage->DestroyDefaultPresObj(pPage->GetPresObjKind(pObj));
705 }
706
707 bConsumed = true;
708 }
709
710 // placeholders which cannot be deleted selected
711 if (mpDrawView->IsPresObjSelected(false, true, false, true))
712 {
713 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
714 VclMessageType::Info, VclButtonsType::Ok,
715 SdResId(STR_ACTION_NOTPOSSIBLE)));
716 xInfoBox->run();
717 bConsumed = true;
718 }
719
720 if (bConsumed)
721 return;
722
723 vcl::KeyCode aKCode(KEY_DELETE);
724 KeyEvent aKEvt( 0, aKCode);
725
726 bConsumed = mpDrawView->getSmartTags().KeyInput( aKEvt );
727
728 if (!bConsumed && HasCurrentFunction())
729 bConsumed = GetCurrentFunction()->KeyInput(aKEvt);
730
731 if (!bConsumed)
732 mpDrawView->DeleteMarked();
733}
734
736{
737 if( rReq.GetSlot() == SID_STYLE_FAMILY && rReq.GetArgs())
738 GetDocSh()->SetStyleFamily(static_cast<SfxStyleFamily>(rReq.GetArgs()->Get( SID_STYLE_FAMILY ).GetValue()));
739
740 // We do not execute a thing during a native slide show
742 (rReq.GetSlot() != SID_PRESENTATION_END &&
743 rReq.GetSlot() != SID_SIZE_PAGE))
744 return;
745
746 CheckLineTo (rReq);
747
748 if( !mpDrawView )
749 return;
750
751 sal_uInt16 nSId = rReq.GetSlot();
752
753 switch ( nSId )
754 {
755 case SID_CLEAR_UNDO_STACK:
756 {
758 rReq.Ignore ();
759 }
760 break;
761
762 case SID_PRESENTATION:
763 case SID_PRESENTATION_CURRENT_SLIDE:
764 case SID_REHEARSE_TIMINGS:
765 {
767 rReq.Ignore ();
768 }
769 break;
770
771 case SID_PRESENTATION_END:
772 {
774
775 rReq.Ignore ();
776 }
777 break;
778
779 case SID_BEZIER_EDIT:
780 {
781 mpDrawView->SetFrameDragSingles(!mpDrawView->IsFrameDragSingles());
782
783 /******************************************************************
784 * turn ObjectBar on
785 ******************************************************************/
786 if( dynamic_cast< FuSelection* >( GetCurrentFunction().get() ) || dynamic_cast< FuConstructBezierPolygon* >( GetCurrentFunction().get() ) )
787 {
788 // Tell the tool bar manager about the context change.
789 GetViewShellBase().GetToolBarManager()->SelectionHasChanged(*this,*mpDrawView);
790 }
791
792 Invalidate(SID_BEZIER_EDIT);
793 rReq.Ignore();
794 }
795 break;
796
797 case SID_OBJECT_CLOSE:
798 {
799 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
800 if ( rMarkList.GetMark(0) && !mpDrawView->IsAction() )
801 {
802 SdrPathObj* pPathObj = static_cast<SdrPathObj*>( rMarkList.GetMark(0)->GetMarkedSdrObj());
803 const bool bUndo = mpDrawView->IsUndoEnabled();
804 if( bUndo )
805 mpDrawView->BegUndo(SdResId(STR_UNDO_BEZCLOSE));
806
807 mpDrawView->UnmarkAllPoints();
808
809 if( bUndo )
810 mpDrawView->AddUndo(std::make_unique<SdrUndoGeoObj>(*pPathObj));
811
812 pPathObj->ToggleClosed();
813
814 if( bUndo )
815 mpDrawView->EndUndo();
816 }
817 rReq.Done();
818 }
819 break;
820
821 case SID_CUT:
822 {
823 if ( mpDrawView->IsPresObjSelected(false, true, false, true) )
824 {
825 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
826 VclMessageType::Info, VclButtonsType::Ok,
827 SdResId(STR_ACTION_NOTPOSSIBLE)));
828 xInfoBox->run();
829 }
830 else
831 {
832 //tdf#126197: EndTextEdit in all views if current one is not in TextEdit
833 if ( !mpDrawView->IsTextEdit() )
834 mpDrawView->EndTextEditAllViews();
835
837 {
838 GetCurrentFunction()->DoCut();
839 }
840 else if(mpDrawView)
841 {
842 mpDrawView->DoCut();
843 }
844 }
845 rReq.Ignore ();
846 }
847 break;
848
849 case SID_COPY:
850 {
851 if ( mpDrawView->IsPresObjSelected(false, true, false, true) )
852 {
853 std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(GetFrameWeld(),
854 VclMessageType::Info, VclButtonsType::Ok,
855 SdResId(STR_ACTION_NOTPOSSIBLE)));
856 xInfoBox->run();
857 }
858 else
859 {
861 {
862 GetCurrentFunction()->DoCopy();
863 }
864 else if( mpDrawView )
865 {
866 mpDrawView->DoCopy();
867 }
868 }
869 rReq.Ignore ();
870 }
871 break;
872
873 case SID_PASTE:
874 {
876
878 {
879 GetCurrentFunction()->DoPaste();
880 }
881 else if(mpDrawView)
882 {
883 mpDrawView->DoPaste();
884 }
885
886 rReq.Ignore ();
887 }
888 break;
889
890 case SID_UNICODE_NOTATION_TOGGLE:
891 {
892 if( mpDrawView->IsTextEdit() )
893 {
894 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
895 if( pOLV )
896 {
897 OUString sInput = pOLV->GetSurroundingText();
898 ESelection aSel( pOLV->GetSelection() );
899 if( aSel.nStartPos > aSel.nEndPos )
900 aSel.nEndPos = aSel.nStartPos;
901
902 //calculate a valid end-position by reading logical characters
903 sal_Int32 nUtf16Pos=0;
904 while( (nUtf16Pos < sInput.getLength()) && (nUtf16Pos < aSel.nEndPos) )
905 {
906 sInput.iterateCodePoints(&nUtf16Pos);
907 //The mouse can set the cursor in the middle of a multi-unit character,
908 // so reset to the proper end of the logical characters
909 if( nUtf16Pos > aSel.nEndPos )
910 aSel.nEndPos = nUtf16Pos;
911 }
912
914 while( nUtf16Pos && aToggle.AllowMoreInput( sInput[nUtf16Pos-1]) )
915 --nUtf16Pos;
916 OUString sReplacement = aToggle.ReplacementString();
917 if( !sReplacement.isEmpty() )
918 {
919 OUString sStringToReplace = aToggle.StringToReplace();
920 mpDrawView->BegUndo(sStringToReplace +"->"+ sReplacement);
921 aSel.nStartPos = aSel.nEndPos - sStringToReplace.getLength();
922 pOLV->SetSelection( aSel );
923 pOLV->InsertText(sReplacement, true);
924 mpDrawView->EndUndo();
925 }
926 }
927 }
928 }
929 break;
930
931 case SID_PASTE_UNFORMATTED:
932 {
934
936 {
937 GetCurrentFunction()->DoPasteUnformatted();
938 }
939 else if(mpDrawView)
940 {
942 if (aDataHelper.GetTransferable().is())
943 {
944 sal_Int8 nAction = DND_ACTION_COPY;
945 mpDrawView->InsertData( aDataHelper,
946 GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ),
947 nAction, false, SotClipboardFormatId::STRING);
948 }
949 }
950
951 rReq.Ignore ();
952 }
953 break;
954
955 case SID_CLIPBOARD_FORMAT_ITEMS:
956 {
959 const SfxItemSet* pReqArgs = rReq.GetArgs();
960 SotClipboardFormatId nFormat = SotClipboardFormatId::NONE;
961
962 if( pReqArgs )
963 {
964 const SfxUInt32Item* pIsActive = rReq.GetArg<SfxUInt32Item>(SID_CLIPBOARD_FORMAT_ITEMS);
965 nFormat = static_cast<SotClipboardFormatId>(pIsActive->GetValue());
966 }
967
968 if( nFormat != SotClipboardFormatId::NONE && aDataHelper.GetTransferable().is() )
969 {
970 sal_Int8 nAction = DND_ACTION_COPY;
971
972 if( !mpDrawView->InsertData( aDataHelper,
973 GetActiveWindow()->PixelToLogic( ::tools::Rectangle( Point(), GetActiveWindow()->GetOutputSizePixel() ).Center() ),
974 nAction, false, nFormat ) )
975 {
976 INetBookmark aINetBookmark( "", "" );
977
978 if( ( aDataHelper.HasFormat( SotClipboardFormatId::NETSCAPE_BOOKMARK ) &&
979 aDataHelper.GetINetBookmark( SotClipboardFormatId::NETSCAPE_BOOKMARK, aINetBookmark ) ) ||
980 ( aDataHelper.HasFormat( SotClipboardFormatId::FILEGRPDESCRIPTOR ) &&
981 aDataHelper.GetINetBookmark( SotClipboardFormatId::FILEGRPDESCRIPTOR, aINetBookmark ) ) ||
982 ( aDataHelper.HasFormat( SotClipboardFormatId::UNIFORMRESOURCELOCATOR ) &&
983 aDataHelper.GetINetBookmark( SotClipboardFormatId::UNIFORMRESOURCELOCATOR, aINetBookmark ) ) )
984 {
985 InsertURLField( aINetBookmark.GetURL(), aINetBookmark.GetDescription(), "" );
986 }
987 }
988 }
989 }
990 break;
991
992 case SID_DELETE:
993 {
994 if ( mpDrawView->IsTextEdit() )
995 {
996 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
997
998 if (pOLV)
999 {
1000 vcl::KeyCode aKCode(KEY_DELETE);
1001 KeyEvent aKEvt( 0, aKCode);
1002 // We use SdrObjEditView to handle DEL for underflow handling
1003 (void)mpDrawView->KeyInput(aKEvt, nullptr);
1004 }
1005 }
1006 else
1007 {
1008 mpDrawView->EndTextEditAllViews();
1010 }
1011 rReq.Ignore ();
1012 }
1013 break;
1014
1015 case SID_NOTES_MODE:
1016 case SID_SLIDE_MASTER_MODE:
1017 case SID_NOTES_MASTER_MODE:
1018 case SID_HANDOUT_MASTER_MODE:
1019
1020 // AutoLayouts have to be ready.
1022 [[fallthrough]];
1023
1024 case SID_DRAWINGMODE:
1025 case SID_SLIDE_SORTER_MODE:
1026 case SID_OUTLINE_MODE:
1027 // Let the sub-shell manager handle the slot handling.
1029 nSId,
1030 rReq);
1031 rReq.Ignore ();
1032 break;
1033
1034 case SID_MASTERPAGE: // BASIC
1035 {
1037 GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
1038 ".uno:SlideMasterPage=true");
1039
1040 // AutoLayouts needs to be finished
1042
1043 const SfxItemSet* pReqArgs = rReq.GetArgs();
1044
1045 if ( pReqArgs )
1046 {
1047 const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(SID_MASTERPAGE);
1048 mbIsLayerModeActive = pIsActive->GetValue ();
1049 }
1050
1051 Broadcast (
1053
1054 // turn on default layer of MasterPage
1056
1058
1059 if(HasCurrentFunction(SID_BEZIER_EDIT))
1060 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
1061
1062 Broadcast (
1064
1066 Invalidate();
1067
1068 rReq.Done();
1069 }
1070 break;
1071
1072 case SID_CLOSE_MASTER_VIEW:
1073 {
1074 // Notify of disabling master view, which is enabled in DrawViewShell::ChangeEditMode.
1076 GetViewShell()->libreOfficeKitViewCallback(LOK_CALLBACK_STATE_CHANGED,
1077 ".uno:SlideMasterPage=false");
1078
1079 Broadcast (
1081
1082 // Switch page back to the first one. Not doing so leads to a
1083 // crash. This seems to be some bug in the edit mode switching
1084 // and page switching methods.
1085 SwitchPage (0);
1087 Broadcast (
1089
1090 if(HasCurrentFunction(SID_BEZIER_EDIT))
1091 {
1093 SID_OBJECT_SELECT,
1094 SfxCallMode::ASYNCHRON);
1095 }
1096
1097 rReq.Done();
1098 }
1099 break;
1100
1101 case SID_RULER:
1102 {
1103 const SfxItemSet* pReqArgs = rReq.GetArgs();
1104
1105 // Remember old ruler state
1106 bool bOldHasRuler(HasRuler());
1107
1108 if ( pReqArgs )
1109 {
1110 const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(SID_RULER);
1111 SetRuler (pIsActive->GetValue ());
1112 }
1113 else SetRuler (!HasRuler());
1114
1115 // Did ruler state change? Tell that to SdOptions, too.
1116 bool bHasRuler(HasRuler());
1117
1118 if(bOldHasRuler != bHasRuler)
1119 {
1120 SdOptions* pOptions = SD_MOD()->GetSdOptions(GetDoc()->GetDocumentType());
1121
1122 if(pOptions && pOptions->IsRulerVisible() != bHasRuler)
1123 {
1124 pOptions->SetRulerVisible(bHasRuler);
1125 }
1126 }
1127
1128 Invalidate (SID_RULER);
1129 Resize();
1130 rReq.Done ();
1131 }
1132 break;
1133
1134 case SID_SIZE_PAGE:
1135 case SID_SIZE_PAGE_WIDTH: // BASIC
1136 {
1137 mbZoomOnPage = ( rReq.GetSlot() == SID_SIZE_PAGE );
1138
1139 SdrPageView* pPageView = mpDrawView->GetSdrPageView();
1140
1141 if ( pPageView )
1142 {
1143 Point aPagePos(0, 0); // = pPageView->GetOffset();
1144 Size aPageSize = pPageView->GetPage()->GetSize();
1145
1146 aPagePos.AdjustX(aPageSize.Width() / 2 );
1147 aPageSize.setWidth( static_cast<::tools::Long>(aPageSize.Width() * 1.03) );
1148
1149 if( rReq.GetSlot() == SID_SIZE_PAGE )
1150 {
1151 aPagePos.AdjustY(aPageSize.Height() / 2 );
1152 aPageSize.setHeight( static_cast<::tools::Long>(aPageSize.Height() * 1.03) );
1153 aPagePos.AdjustY( -(aPageSize.Height() / 2) );
1154 }
1155 else
1156 {
1157 Point aPt = GetActiveWindow()->PixelToLogic( Point( 0, GetActiveWindow()->GetSizePixel().Height() / 2 ) );
1158 aPagePos.AdjustY(aPt.Y() );
1159 aPageSize.setHeight( 2 );
1160 }
1161
1162 aPagePos.AdjustX( -(aPageSize.Width() / 2) );
1163
1164 SetZoomRect( ::tools::Rectangle( aPagePos, aPageSize ) );
1165
1167 GetActiveWindow()->GetOutputSizePixel()) );
1168 mpZoomList->InsertZoomRect(aVisAreaWin);
1169 }
1170 Invalidate( SID_ZOOM_IN );
1171 Invalidate( SID_ZOOM_OUT );
1172 Invalidate( SID_ZOOM_PANNING );
1173 rReq.Done ();
1174 }
1175 break;
1176
1177 case SID_SIZE_REAL: // BASIC
1178 {
1179 mbZoomOnPage = false;
1180 SetZoom( 100 );
1182 GetActiveWindow()->GetOutputSizePixel()) );
1183 mpZoomList->InsertZoomRect(aVisAreaWin);
1184 Invalidate( SID_ZOOM_IN );
1185 Invalidate( SID_ZOOM_OUT );
1186 Invalidate( SID_ZOOM_PANNING );
1187 rReq.Done ();
1188 }
1189 break;
1190
1191 case SID_ZOOM_OUT: // BASIC
1192 {
1193 const sal_uInt16 nOldZoom = GetActiveWindow()->GetZoom();
1194 const sal_uInt16 nNewZoom = basegfx::zoomtools::zoomOut(nOldZoom);
1195 SetZoom(nNewZoom);
1196
1197 mbZoomOnPage = false;
1199 GetActiveWindow()->GetOutputSizePixel()) );
1200 mpZoomList->InsertZoomRect(aVisAreaWin);
1201 Invalidate( SID_ZOOM_IN );
1202 Invalidate( SID_ZOOM_OUT );
1203 Invalidate( SID_ZOOM_PANNING );
1204 rReq.Done ();
1205 }
1206 break;
1207
1208 case SID_ZOOM_IN:
1209 {
1210 const sal_uInt16 nOldZoom = GetActiveWindow()->GetZoom();
1211 const sal_uInt16 nNewZoom = basegfx::zoomtools::zoomIn(nOldZoom);
1212 SetZoom(nNewZoom);
1213
1214 mbZoomOnPage = false;
1216 GetActiveWindow()->GetOutputSizePixel()) );
1217 mpZoomList->InsertZoomRect(aVisAreaWin);
1218 Invalidate( SID_ZOOM_IN );
1219 Invalidate(SID_ZOOM_OUT);
1220 Invalidate( SID_ZOOM_PANNING );
1221 rReq.Done ();
1222 }
1223 break;
1224
1225 case SID_SIZE_VISAREA:
1226 {
1228 Size aVisAreaSize = aVisArea.GetSize();
1229
1230 if (!aVisAreaSize.IsEmpty())
1231 {
1232 mbZoomOnPage = false;
1233 SetZoomRect(aVisArea);
1234 Invalidate( SID_ZOOM_IN );
1235 Invalidate( SID_ZOOM_OUT );
1236 Invalidate( SID_ZOOM_PANNING );
1237 }
1238 rReq.Done ();
1239 }
1240 break;
1241
1242 // name confusion: SID_SIZE_OPTIMAL -> Zoom onto selected objects
1243 // --> Is offered as object zoom in program
1244 case SID_SIZE_OPTIMAL: // BASIC
1245 {
1246 mbZoomOnPage = false;
1247 if ( mpDrawView->AreObjectsMarked() )
1248 {
1249 maMarkRect = mpDrawView->GetAllMarkedRect();
1250 ::tools::Long nW = static_cast<::tools::Long>(maMarkRect.GetWidth() * 1.03);
1251 ::tools::Long nH = static_cast<::tools::Long>(maMarkRect.GetHeight() * 1.03);
1252 Point aPos = maMarkRect.Center();
1253 aPos.AdjustX( -(nW / 2) );
1254 aPos.AdjustY( -(nH / 2) );
1255 if ( nW && nH )
1256 {
1257 SetZoomRect(::tools::Rectangle(aPos, Size(nW, nH)));
1258
1260 GetActiveWindow()->GetOutputSizePixel()) );
1261 mpZoomList->InsertZoomRect(aVisAreaWin);
1262 }
1263 }
1264 Invalidate( SID_ZOOM_IN );
1265 Invalidate( SID_ZOOM_OUT );
1266 Invalidate( SID_ZOOM_PANNING );
1267 rReq.Done ();
1268 }
1269 break;
1270
1271 // name confusion: SID_SIZE_ALL -> Zoom onto all objects
1272 // --> Is offered as optimal in program
1273 case SID_SIZE_ALL: // BASIC
1274 {
1275 mbZoomOnPage = false;
1276 SdrPageView* pPageView = mpDrawView->GetSdrPageView();
1277
1278 if( pPageView )
1279 {
1280 ::tools::Rectangle aBoundRect( pPageView->GetObjList()->GetAllObjBoundRect() );
1281
1282 ::tools::Long nW = static_cast<::tools::Long>(aBoundRect.GetWidth() * 1.03);
1283 ::tools::Long nH = static_cast<::tools::Long>(aBoundRect.GetHeight() * 1.03);
1284 Point aPos = aBoundRect.Center();
1285 aPos.AdjustX( -(nW / 2) );
1286 aPos.AdjustY( -(nH / 2) );
1287 if ( nW && nH )
1288 {
1289 SetZoomRect( ::tools::Rectangle( aPos, Size( nW, nH ) ) );
1290
1292 GetActiveWindow()->GetOutputSizePixel()) );
1293 mpZoomList->InsertZoomRect(aVisAreaWin);
1294 }
1295
1296 Invalidate( SID_ZOOM_IN );
1297 Invalidate( SID_ZOOM_OUT );
1298 Invalidate( SID_ZOOM_PANNING );
1299 }
1300 rReq.Done ();
1301 }
1302 break;
1303
1304 case SID_ZOOM_PREV:
1305 {
1306 if (mpDrawView->IsTextEdit())
1307 {
1308 mpDrawView->SdrEndTextEdit();
1309 }
1310
1311 if (mpZoomList->IsPreviousPossible())
1312 {
1313 // set previous ZoomRect
1314 SetZoomRect(mpZoomList->GetPreviousZoomRect());
1315 }
1316 rReq.Done ();
1317 }
1318 break;
1319
1320 case SID_ZOOM_NEXT:
1321 {
1322 if (mpDrawView->IsTextEdit())
1323 {
1324 mpDrawView->SdrEndTextEdit();
1325 }
1326
1327 if (mpZoomList->IsNextPossible())
1328 {
1329 // set next ZoomRect
1330 SetZoomRect(mpZoomList->GetNextZoomRect());
1331 }
1332 rReq.Done ();
1333 }
1334 break;
1335
1336 case SID_GLUE_INSERT_POINT:
1337 case SID_GLUE_PERCENT:
1338 case SID_GLUE_ESCDIR:
1339 case SID_GLUE_ESCDIR_LEFT:
1340 case SID_GLUE_ESCDIR_RIGHT:
1341 case SID_GLUE_ESCDIR_TOP:
1342 case SID_GLUE_ESCDIR_BOTTOM:
1343 case SID_GLUE_HORZALIGN_CENTER:
1344 case SID_GLUE_HORZALIGN_LEFT:
1345 case SID_GLUE_HORZALIGN_RIGHT:
1346 case SID_GLUE_VERTALIGN_CENTER:
1347 case SID_GLUE_VERTALIGN_TOP:
1348 case SID_GLUE_VERTALIGN_BOTTOM:
1349 {
1351 FuEditGluePoints* pFunc = dynamic_cast< FuEditGluePoints* >( xFunc.get() );
1352
1353 if(pFunc)
1354 pFunc->ReceiveRequest(rReq);
1355
1356 rReq.Done();
1357 }
1358 break;
1359
1360 case SID_AUTOSPELL_CHECK:
1361 {
1362 bool bOnlineSpell;
1363 const SfxPoolItem* pItem;
1364
1365 if (rReq.GetArgs()->HasItem(FN_PARAM_1, &pItem))
1366 bOnlineSpell = static_cast<const SfxBoolItem*>(pItem)->GetValue();
1367 else // Toggle
1368 bOnlineSpell = !GetDoc()->GetOnlineSpell();
1369
1370 GetDoc()->SetOnlineSpell(bOnlineSpell);
1371
1372 ::Outliner* pOL = mpDrawView->GetTextEditOutliner();
1373
1374 if (pOL)
1375 {
1376 EEControlBits nCntrl = pOL->GetControlWord();
1377
1378 if (bOnlineSpell)
1379 nCntrl |= EEControlBits::ONLINESPELLING;
1380 else
1381 nCntrl &= ~EEControlBits::ONLINESPELLING;
1382
1383 pOL->SetControlWord(nCntrl);
1384 }
1385
1387 rReq.Done ();
1388 }
1389 break;
1390
1391 case SID_TRANSLITERATE_SENTENCE_CASE:
1392 case SID_TRANSLITERATE_TITLE_CASE:
1393 case SID_TRANSLITERATE_TOGGLE_CASE:
1394 case SID_TRANSLITERATE_UPPER:
1395 case SID_TRANSLITERATE_LOWER:
1396 case SID_TRANSLITERATE_HALFWIDTH:
1397 case SID_TRANSLITERATE_FULLWIDTH:
1398 case SID_TRANSLITERATE_HIRAGANA:
1399 case SID_TRANSLITERATE_KATAKANA:
1400 {
1402 if( pOLV )
1403 {
1404 TransliterationFlags nType = TransliterationFlags::NONE;
1405
1406 switch( nSId )
1407 {
1408 case SID_TRANSLITERATE_SENTENCE_CASE:
1409 nType = TransliterationFlags::SENTENCE_CASE;
1410 break;
1411 case SID_TRANSLITERATE_TITLE_CASE:
1412 nType = TransliterationFlags::TITLE_CASE;
1413 break;
1414 case SID_TRANSLITERATE_TOGGLE_CASE:
1415 nType = TransliterationFlags::TOGGLE_CASE;
1416 break;
1417 case SID_TRANSLITERATE_UPPER:
1418 nType = TransliterationFlags::LOWERCASE_UPPERCASE;
1419 break;
1420 case SID_TRANSLITERATE_LOWER:
1421 nType = TransliterationFlags::UPPERCASE_LOWERCASE;
1422 break;
1423 case SID_TRANSLITERATE_HALFWIDTH:
1424 nType = TransliterationFlags::FULLWIDTH_HALFWIDTH;
1425 break;
1426 case SID_TRANSLITERATE_FULLWIDTH:
1427 nType = TransliterationFlags::HALFWIDTH_FULLWIDTH;
1428 break;
1429 case SID_TRANSLITERATE_HIRAGANA:
1430 nType = TransliterationFlags::KATAKANA_HIRAGANA;
1431 break;
1432 case SID_TRANSLITERATE_KATAKANA:
1433 nType = TransliterationFlags::HIRAGANA_KATAKANA;
1434 break;
1435 }
1436
1437 pOLV->TransliterateText( nType );
1438 }
1439
1440 rReq.Done();
1441 }
1442 break;
1443
1444 // #UndoRedo#
1445 case SID_UNDO :
1446 {
1447 // moved implementation to BaseClass
1448 ImpSidUndo(rReq);
1449 }
1450 break;
1451 case SID_REDO :
1452 {
1453 // moved implementation to BaseClass
1454 ImpSidRedo(rReq);
1455 }
1456 break;
1457
1458 default:
1459 break;
1460 }
1461}
1462
1464{
1465 if( rReq.GetSlot() != SID_TRANSLITERATE_ROTATE_CASE )
1466 return;
1467
1468 ::sd::View* pView = GetView();
1469
1470 if (!pView)
1471 return;
1472
1473 OutlinerView* pOLV = pView->GetTextEditOutlinerView();
1474
1475 if (!pOLV)
1476 return;
1477
1479}
1480
1481void DrawViewShell::InsertURLField(const OUString& rURL, const OUString& rText,
1482 const OUString& rTarget)
1483{
1484 OutlinerView* pOLV = mpDrawView->GetTextEditOutlinerView();
1485
1486 if (pOLV)
1487 {
1488 ESelection aSel( pOLV->GetSelection() );
1489 SvxFieldItem aURLItem( SvxURLField( rURL, rText, SvxURLFormat::Repr ), EE_FEATURE_FIELD );
1490 pOLV->InsertField( aURLItem );
1491 if ( aSel.nStartPos <= aSel.nEndPos )
1492 aSel.nEndPos = aSel.nStartPos + 1;
1493 else
1494 aSel.nStartPos = aSel.nEndPos + 1;
1495 pOLV->SetSelection( aSel );
1496 }
1497 else
1498 {
1499 Outliner* pOutl = GetDoc()->GetInternalOutliner();
1500 pOutl->Init( OutlinerMode::TextObject );
1501 OutlinerMode nOutlMode = pOutl->GetOutlinerMode();
1502
1503 SvxURLField aURLField(rURL, rText, SvxURLFormat::Repr);
1504 aURLField.SetTargetFrame(rTarget);
1505 SvxFieldItem aURLItem(aURLField, EE_FEATURE_FIELD);
1506 pOutl->QuickInsertField( aURLItem, ESelection() );
1507 std::optional<OutlinerParaObject> pOutlParaObject = pOutl->CreateParaObject();
1508
1510 GetView()->getSdrModelFromSdrView(),
1511 SdrObjKind::Text);
1512
1513 pOutl->UpdateFields();
1514 pOutl->SetUpdateLayout( true );
1515 Size aSize(pOutl->CalcTextSize());
1516 pOutl->SetUpdateLayout( false );
1517
1518 Point aPos;
1519 ::tools::Rectangle aRect(aPos, GetActiveWindow()->GetOutputSizePixel() );
1520 aPos = aRect.Center();
1521 aPos = GetActiveWindow()->PixelToLogic(aPos);
1522
1523 if (aPos.getX() - (aSize.Width() / 2) >= 0)
1524 aPos.AdjustX( -(aSize.Width() / 2) );
1525 if (aPos.getY() - (aSize.Height() / 2) >= 0)
1526 aPos.AdjustY( -(aSize.Height() / 2) );
1527
1528 ::tools::Rectangle aLogicRect(aPos, aSize);
1529 pRectObj->SetLogicRect(aLogicRect);
1530 pRectObj->SetOutlinerParaObject( std::move(pOutlParaObject) );
1531 mpDrawView->InsertObjectAtView(pRectObj.get(), *mpDrawView->GetSdrPageView());
1532 pOutl->Init( nOutlMode );
1533 }
1534}
1535
1536void DrawViewShell::InsertURLButton(const OUString& rURL, const OUString& rText,
1537 const OUString& rTarget, const Point* pPos)
1538{
1539 bool bNewObj = true;
1540
1541 const OUString sTargetURL( ::URIHelper::SmartRel2Abs( INetURLObject( GetDocSh()->GetMedium()->GetBaseURL() ), rURL, URIHelper::GetMaybeFileHdl(), true, false,
1544 if (mpDrawView->GetMarkedObjectList().GetMarkCount() > 0)
1545 {
1546 SdrObject* pMarkedObj = mpDrawView->GetMarkedObjectList().GetMark(0)->GetMarkedSdrObj();
1547 if( pMarkedObj ) try
1548 {
1549 // change first marked object
1550 if( SdrInventor::FmForm == pMarkedObj->GetObjInventor() && pMarkedObj->GetObjIdentifier() == SdrObjKind::FormButton )
1551 {
1552 bNewObj = false;
1553
1554 SdrUnoObj* pUnoCtrl = static_cast< SdrUnoObj* >( pMarkedObj );
1555
1556 Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), UNO_SET_THROW );
1557 Reference< beans::XPropertySet > xPropSet( xControlModel, UNO_QUERY_THROW );
1558
1559 xPropSet->setPropertyValue("Label" , Any( rText ) );
1560 xPropSet->setPropertyValue("TargetURL" , Any( sTargetURL ) );
1561
1562 if( !rTarget.isEmpty() )
1563 xPropSet->setPropertyValue("TargetFrame" , Any( rTarget ) );
1564
1565 xPropSet->setPropertyValue( "ButtonType" , Any( form::FormButtonType_URL ) );
1566#if HAVE_FEATURE_AVMEDIA
1567 if ( ::avmedia::MediaWindow::isMediaURL( rURL, ""/*TODO?*/ ) )
1568 {
1569 xPropSet->setPropertyValue( "DispatchURLInternal" , Any( true ) );
1570 }
1571#endif
1572 }
1573 else
1574 {
1575 // add url as interaction for first selected shape
1576 bNewObj = false;
1577
1578 SdAnimationInfo* pInfo = SdDrawDocument::GetShapeUserData(*pMarkedObj, true);
1579 pInfo->meClickAction = presentation::ClickAction_DOCUMENT;
1580 pInfo->SetBookmark( sTargetURL );
1581 }
1582 }
1583 catch( uno::Exception& )
1584 {
1585 }
1586 }
1587
1588 if (!bNewObj)
1589 return;
1590
1591 try
1592 {
1593 rtl::Reference<SdrUnoObj> pUnoCtrl = static_cast< SdrUnoObj* >(
1595 GetView()->getSdrModelFromSdrView(),
1596 SdrInventor::FmForm,
1597 SdrObjKind::FormButton).get()); //,
1598 //mpDrawView->GetSdrPageView()->GetPage()));
1599
1600 Reference< awt::XControlModel > xControlModel( pUnoCtrl->GetUnoControlModel(), uno::UNO_SET_THROW );
1601 Reference< beans::XPropertySet > xPropSet( xControlModel, uno::UNO_QUERY_THROW );
1602
1603 xPropSet->setPropertyValue( "Label" , Any( rText ) );
1604 xPropSet->setPropertyValue( "TargetURL" , Any( sTargetURL ) );
1605
1606 if( !rTarget.isEmpty() )
1607 xPropSet->setPropertyValue( "TargetFrame" , Any( rTarget ) );
1608
1609 xPropSet->setPropertyValue( "ButtonType" , Any( form::FormButtonType_URL ) );
1610#if HAVE_FEATURE_AVMEDIA
1611 if ( ::avmedia::MediaWindow::isMediaURL( rURL, ""/*TODO?*/ ) )
1612 xPropSet->setPropertyValue( "DispatchURLInternal" , Any( true ) );
1613#endif
1614
1615 Point aPos;
1616
1617 if (pPos)
1618 {
1619 aPos = *pPos;
1620 }
1621 else
1622 {
1623 aPos = ::tools::Rectangle(aPos, GetActiveWindow()->GetOutputSizePixel()).Center();
1624 aPos = GetActiveWindow()->PixelToLogic(aPos);
1625 }
1626
1627 Size aSize(4000, 1000);
1628 aPos.AdjustX( -(aSize.Width() / 2) );
1629 aPos.AdjustY( -(aSize.Height() / 2) );
1630 pUnoCtrl->SetLogicRect(::tools::Rectangle(aPos, aSize));
1631
1632 SdrInsertFlags nOptions = SdrInsertFlags::SETDEFLAYER;
1633
1634 OSL_ASSERT (GetViewShell()!=nullptr);
1635 SfxInPlaceClient* pIpClient = GetViewShell()->GetIPClient();
1636 if (pIpClient!=nullptr && pIpClient->IsObjectInPlaceActive())
1637 {
1638 nOptions |= SdrInsertFlags::DONTMARK;
1639 }
1640
1641 mpDrawView->InsertObjectAtView(pUnoCtrl.get(), *mpDrawView->GetSdrPageView(), nOptions);
1642 }
1643 catch( Exception& )
1644 {
1645 }
1646}
1647
1649{
1651 maTabControl->Show (bVisible);
1652}
1653
1654namespace slideshowhelp
1655{
1656 void ShowSlideShow(SfxRequest const & rReq, SdDrawDocument &rDoc)
1657 {
1658 Reference< XPresentation2 > xPresentation( rDoc.getPresentation() );
1659 if( !xPresentation.is() )
1660 return;
1661
1663 if (SID_REHEARSE_TIMINGS == rReq.GetSlot())
1664 xPresentation->rehearseTimings();
1665 else if (rDoc.getPresentationSettings().mbCustomShow)
1666 {
1667 //fdo#69975 if a custom show has been set, then
1668 //use it whether or not we've been asked to
1669 //start from the current or first slide
1670 xPresentation->start();
1671
1672 // if the custom show not set by default, only show it.
1675 }
1676 else if (SID_PRESENTATION_CURRENT_SLIDE == rReq.GetSlot())
1677 {
1678 //If there is no custom show set, start will automatically
1679 //start at the current page
1680 xPresentation->start();
1681 }
1682 else
1683 {
1684 //Start at page 0, this would blow away any custom
1685 //show settings if any were set
1686 Sequence< PropertyValue > aArguments{ comphelper::makePropertyValue("FirstPage",
1687 OUString("0")) };
1688 xPresentation->startWithArguments( aArguments );
1689 }
1691 }
1692}
1693
1695{
1696 Reference< XPresentation2 > xPresentation( GetDoc()->getPresentation() );
1697 if(xPresentation.is() && xPresentation->isRunning())
1698 {
1699 if( mpDrawView->IsTextEdit() )
1700 mpDrawView->SdrEndTextEdit();
1701
1702 xPresentation->end();
1703 }
1704}
1705
1706} // end of namespace sd
1707
1708/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
static weld::MessageDialog * CreateMessageDialog(weld::Widget *pParent, VclMessageType eMessageType, VclButtonsType eButtonType, const OUString &rPrimaryMessage, const ILibreOfficeKitNotifier *pNotifier=nullptr)
sal_uInt32 GetValue() const
rtl::Reference< SdrObject > CreateFieldControl(std::u16string_view rFieldDesc) const
const OUString & GetDescription() const
const OUString & GetURL() const
void SetSelection(const ESelection &)
void InsertField(const SvxFieldItem &rFld)
void InsertText(const OUString &rNew, bool bSelect=false)
void TransliterateText(TransliterationFlags nTransliterationMode)
OUString GetSurroundingText() const
ESelection GetSelection() const
bool PostKeyEvent(const KeyEvent &rKEvt, vcl::Window const *pFrameWin=nullptr)
OutlinerMode GetOutlinerMode() const
void QuickInsertField(const SvxFieldItem &rFld, const ESelection &rSel)
std::optional< OutlinerParaObject > CreateParaObject(sal_Int32 nStartPara=0, sal_Int32 nParaCount=EE_PARA_ALL) const
bool SetUpdateLayout(bool bUpdate)
EEControlBits GetControlWord() const
void SetControlWord(EEControlBits nWord)
bool UpdateFields()
Size CalcTextSize()
void Init(OutlinerMode nMode)
constexpr tools::Long Y() const
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long getX() const
constexpr tools::Long getY() const
TransliterationFlags getNextMode()
void SetBookmark(const OUString &rBookmark)
Definition: anminfo.cxx:95
css::presentation::ClickAction meClickAction
Action at mouse click.
Definition: anminfo.hxx:48
SAL_DLLPRIVATE const css::uno::Reference< css::presentation::XPresentation2 > & getPresentation() const
static SdAnimationInfo * GetShapeUserData(SdrObject &rObject, bool bCreate=false)
Definition: drawdoc2.cxx:959
SAL_DLLPRIVATE const sd::PresentationSettings & getPresentationSettings() const
Definition: drawdoc.hxx:400
SAL_DLLPRIVATE void SetOnlineSpell(bool bIn)
Definition: drawdoc.cxx:962
SAL_DLLPRIVATE bool GetOnlineSpell() const
Definition: drawdoc.hxx:431
SdOutliner * GetInternalOutliner(bool bCreateOutliner=true)
Definition: drawdoc.cxx:930
void StopWorkStartupDelay()
Definition: drawdoc2.cxx:932
bool IsRulerVisible() const
Definition: optsitem.hxx:131
void SetRulerVisible(bool bOn)
Definition: optsitem.hxx:139
sal_Int32 GetDefaultObjectSizeWidth() const
Definition: optsitem.hxx:267
sal_Int32 GetDefaultObjectSizeHeight() const
Definition: optsitem.hxx:268
void DestroyDefaultPresObj(PresObjKind eObjKind)
Definition: sdpage.cxx:1055
PresObjKind GetPresObjKind(SdrObject *pObj) const
Definition: sdpage.cxx:2309
bool InsertObjectAtView(SdrObject *pObj, SdrPageView &rPV, SdrInsertFlags nOptions=SdrInsertFlags::NONE)
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
void UnmarkAllObj(SdrPageView const *pPV=nullptr)
bool MarkNextObj(bool bPrev=false)
SdrObject * GetMarkedSdrObj() const
const OutlinerView * GetTextEditOutlinerView() const
static rtl::Reference< SdrObject > MakeNewObject(SdrModel &rSdrModel, SdrInventor nInventor, SdrObjKind nObjIdentifier, const tools::Rectangle *pSnapRect=nullptr)
const tools::Rectangle & GetAllObjBoundRect() const
virtual SdrInventor GetObjInventor() const
virtual SdrObjKind GetObjIdentifier() const
SdrPage * getSdrPageFromSdrObject() const
SdrObjList * GetObjList() const
SdrPage * GetPage() const
Size GetSize() const
virtual void MakeVisible(const tools::Rectangle &rRect, vcl::Window &rWin)
SdrPageView * GetSdrPageView() const
void ToggleClosed()
const css::uno::Reference< css::awt::XControlModel > & GetUnoControlModel() const
void Update(sal_uInt16 nId)
void Invalidate(sal_uInt16 nId)
bool GetValue() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
bool IsObjectInPlaceActive() const
bool HasItem(sal_uInt16 nWhich, const SfxPoolItem **ppItem=nullptr) const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
sal_uInt16 GetSlot() const
void Ignore()
const SfxItemSet * GetArgs() const
void SetSlot(sal_uInt16 nNewSlot)
const T * GetArg(sal_uInt16 nSlotId) const
sal_uInt16 GetModifier() const
void Done(bool bRemove=false)
virtual void Invalidate(sal_uInt16 nId=0)
SfxViewShell * GetViewShell() const
const css::uno::Any & GetValue() const
SfxBindings & GetBindings()
SfxDispatcher * GetDispatcher()
virtual void libreOfficeKitViewCallback(int nType, const OString &pPayload) const override
SfxInPlaceClient * GetIPClient() const
bool IsEmpty() const
constexpr tools::Long Height() const
void setWidth(tools::Long nWidth)
void setHeight(tools::Long nHeight)
constexpr tools::Long Width() const
void SetTargetFrame(const OUString &rFrm)
OUString ReplacementString()
bool AllowMoreInput(sal_Unicode uChar)
OUString StringToReplace()
static TransferableDataHelper CreateFromSystemClipboard(vcl::Window *pWindow)
bool HasFormat(SotClipboardFormatId nFormat) const
const css::uno::Reference< css::datatransfer::XTransferable > & GetTransferable() const
bool GetINetBookmark(SotClipboardFormatId nFormat, INetBookmark &rBmk) const
static bool isMediaURL(std::u16string_view rURL, const OUString &rReferer, bool bDeep=false, rtl::Reference< PlayerListener > xPreferredPixelSizeListener=nullptr)
void ClearUndoBuffer()
Definition: docshell.cxx:455
void SetStyleFamily(SfxStyleFamily nSF)
static void CheckLineTo(SfxRequest &rReq)
check if we have to draw a polyline
Definition: drviewsa.cxx:404
void FuPermanent(SfxRequest &rReq)
Definition: drviewse.cxx:141
virtual SdPage * getCurrentPage() const override
inherited from sd::ViewShell
Definition: drviews1.cxx:636
std::unique_ptr< DrawView > mpDrawView
virtual void SetZoomRect(const ::tools::Rectangle &rZoomRect) override
Set zoom rectangle for active window.
Definition: drviews1.cxx:298
void FuSupport(SfxRequest &rReq)
Definition: drviewse.cxx:735
bool IsLayerModeActive() const
void StopSlideShow()
Stop a running slide show.
Definition: drviewse.cxx:1694
void FuDeleteSelectedObjects()
Definition: drviewse.cxx:672
virtual void Resize() override
Notify the view shell that its parent window has been resized.
Definition: drviews5.cxx:81
VclPtr< TabControl > maTabControl
virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive)
Set status (enabled/disabled) of menu SfxSlots.
Definition: drviews1.cxx:333
RotateTransliteration m_aRotateCase
void InsertURLButton(const OUString &rURL, const OUString &rText, const OUString &rTarget, const Point *pPos)
Definition: drviewse.cxx:1536
bool mbIsLayerModeActive
This flag controls whether the layer mode is active, i.e.
void FuSupportRotate(SfxRequest const &rReq)
Definition: drviewse.cxx:1463
void InsertURLField(const OUString &rURL, const OUString &rText, const OUString &rTarget)
Definition: drviewse.cxx:1481
bool SwitchPage(sal_uInt16 nPage, bool bAllowChangeFocus=true)
Switch to desired page.
Definition: drviews1.cxx:831
::tools::Rectangle maMarkRect
virtual void ShowUIControls(bool bVisible) override
Show controls of the UI or hide them, depending on the given flag.
Definition: drviewse.cxx:1648
virtual void SetZoom(::tools::Long nZoom) override
set zoom factor
Definition: drviews1.cxx:282
const ::tools::Rectangle & GetVisArea() const
Definition: FrameView.hxx:83
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fucon3d.cxx:63
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuconarc.cxx:58
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuconbez.cxx:93
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuconcs.cxx:58
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuconrec.cxx:111
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuconuno.cxx:52
void SetPermanent(bool bSet)
Definition: fudraw.hxx:52
virtual void ReceiveRequest(SfxRequest &rReq) override
Definition: fuediglu.cxx:381
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq, bool bPermanent)
Definition: fuediglu.cxx:50
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fusel.cxx:89
Base class for text functions.
Definition: futext.hxx:36
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: futext.cxx:145
static rtl::Reference< FuPoor > Create(ViewShell *pViewSh, ::sd::Window *pWin, ::sd::View *pView, SdDrawDocument *pDoc, SfxRequest &rReq)
Definition: fuzoom.cxx:68
static bool IsRunning(ViewShellBase const &rBase)
returns true if there is a running presentation for the given ViewShellBase
Definition: slideshow.cxx:208
std::shared_ptr< ToolBarManager > const & GetToolBarManager() const
Local derivation of the SfxHint class that defines some hint ids that are used by the ViewShell class...
SD_DLLPUBLIC DrawDocShell * GetDocSh() const
Definition: viewshel.cxx:1407
const rtl::Reference< FuPoor > & GetCurrentFunction() const
Definition: ViewShell.hxx:250
void ImpSidUndo(SfxRequest &rReq)
Definition: viewshel.cxx:1202
FrameView * mpFrameView
Definition: ViewShell.hxx:453
SdDrawDocument * GetDoc() const
Definition: viewshel.cxx:1412
virtual void ShowUIControls(bool bVisible)
Show controls of the UI or hide them, depending on the given flag.
Definition: viewshel.cxx:1518
std::unique_ptr< ZoomList > mpZoomList
Definition: ViewShell.hxx:457
void SetRuler(bool bRuler)
Switch ruler on/off.
Definition: viewshe2.cxx:814
void InvalidateWindows()
Invalidate all split windows below the ?provided rectangle.
Definition: viewshe2.cxx:433
::sd::Window * GetActiveWindow() const
The active window is usually the mpContentWindow.
Definition: ViewShell.hxx:155
::sd::View * GetView() const
Definition: ViewShell.hxx:144
const rtl::Reference< FuPoor > & GetOldFunction() const
Definition: ViewShell.hxx:248
void SetOldFunction(const rtl::Reference< FuPoor > &xFunction)
Definition: viewshel.cxx:1430
SD_DLLPUBLIC weld::Window * GetFrameWeld() const
Definition: viewshel.cxx:1582
bool HasOldFunction() const
Definition: ViewShell.hxx:249
void ImpSidRedo(SfxRequest &rReq)
Definition: viewshel.cxx:1270
void SetCurrentFunction(const rtl::Reference< FuPoor > &xFunction)
Definition: viewshel.cxx:1422
SD_DLLPUBLIC ViewShellBase & GetViewShellBase() const
Definition: viewshel.cxx:1397
SD_DLLPUBLIC SfxViewFrame * GetViewFrame() const
Definition: viewshel.cxx:118
bool HasCurrentFunction() const
Definition: ViewShell.hxx:252
bool HasRuler() const
Definition: ViewShell.hxx:191
virtual bool SdrBeginTextEdit(SdrObject *pObj, SdrPageView *pPV=nullptr, vcl::Window *pWin=nullptr, bool bIsNewObj=false, SdrOutliner *pGivenOutliner=nullptr, OutlinerView *pGivenOutlinerView=nullptr, bool bDontDeleteOutliner=false, bool bOnlyOneView=false, bool bGrabFocus=true) override
Definition: sdview.cxx:657
::tools::Long GetZoom() const
Definition: sdwindow.cxx:183
static ::std::shared_ptr< FrameworkHelper > Instance(ViewShellBase &rBase)
Return the FrameworkHelper object that is associated with the given ViewShellBase.
static void UnlockNotebookBar()
static void LockNotebookBar()
constexpr Point Center() const
constexpr tools::Long GetWidth() const
constexpr Size GetSize() const
constexpr tools::Long GetHeight() const
Point PixelToLogic(const Point &rDevicePt) const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
#define DBG_ASSERT(sCon, aError)
EEControlBits
constexpr TypedWhichId< SvxFieldItem > EE_FEATURE_FIELD(EE_FEATURE_NOTCONV+1)
FilterGroup & rTarget
SotClipboardFormatId
Sequence< PropertyValue > aArguments
uno_Any a
constexpr sal_uInt16 KEY_MOD1
constexpr sal_uInt16 KEY_DELETE
SVL_DLLPUBLIC Link< OUString *, bool > const & GetMaybeFileHdl()
sal_uInt16 zoomIn(sal_uInt16 nCurrent)
sal_uInt16 zoomOut(sal_uInt16 nCurrent)
@ Exception
css::beans::PropertyValue makePropertyValue(const OUString &rName, T &&rValue)
int i
SD_DLLPUBLIC void ShowSlideShow(SfxRequest const &rReq, SdDrawDocument &rDoc)
Definition: drviewse.cxx:1656
static void ImpAddPrintableCharactersToTextEdit(SfxRequest const &rReq, ::sd::View *pView)
Definition: drviewse.cxx:109
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
long Long
const char GetValue[]
OutlinerMode
PresObjKind
Definition: pres.hxx:22
QPRO_FUNC_TYPE nType
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
#define SD_MOD()
Definition: sdmod.hxx:184
sal_Int32 nEndPos
sal_Int32 nStartPos
SfxStyleFamily
SdrInsertFlags
SVXCORE_DLLPUBLIC E3dObject * DynCastE3dObject(SdrObject *)
bool bVisible
Center
#define DND_ACTION_COPY
TransliterationFlags
signed char sal_Int8
constexpr OUStringLiteral sUNO_LayerName_background_objects
Definition: unokywds.hxx:30
RET_YES