LibreOffice Module sd (master) 1
drviews3.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 <DrawViewShell.hxx>
23
24#include <sfx2/viewfrm.hxx>
25#include <editeng/eeitem.hxx>
26#include <editeng/tstpitem.hxx>
27#include <editeng/lrspitem.hxx>
28#include <editeng/protitem.hxx>
31#include <svx/svdotable.hxx>
32#include <editeng/numitem.hxx>
33#include <svx/rulritem.hxx>
34#include <svx/svxids.hrc>
35#include <svx/svdpagv.hxx>
36#include <sfx2/request.hxx>
37#include <sfx2/dispatch.hxx>
38#include <tools/urlobj.hxx>
39#include <svl/eitem.hxx>
40#include <svl/rectitem.hxx>
41#include <svl/stritem.hxx>
42#include <svx/svdoole2.hxx>
43#include <svl/itempool.hxx>
44#include <svl/ptitem.hxx>
45#include <basic/sbstar.hxx>
46#include <basic/sberrors.hxx>
47#include <svx/fmshell.hxx>
48#include <svx/f3dchild.hxx>
49#include <svx/float3d.hxx>
50#include <svx/sdmetitm.hxx>
51#include <svx/svdogrp.hxx>
53
54#include <app.hrc>
55#include <strings.hrc>
56
57#include <sdundogr.hxx>
58#include <undopage.hxx>
59#include <fupoor.hxx>
60#include <slideshow.hxx>
61#include <sdpage.hxx>
62#include <Window.hxx>
63#include <sdresid.hxx>
64#include <unokywds.hxx>
65#include <drawview.hxx>
66#include <drawdoc.hxx>
67#include <DrawDocShell.hxx>
68#include <sdabstdlg.hxx>
69#include <sfx2/ipclient.hxx>
71#include <ViewShellBase.hxx>
72#include <FormShellManager.hxx>
73#include <LayerTabBar.hxx>
74#include <com/sun/star/drawing/framework/XControllerManager.hpp>
75#include <com/sun/star/drawing/framework/XConfigurationController.hpp>
76#include <com/sun/star/drawing/framework/XConfiguration.hpp>
77#include <com/sun/star/drawing/XShape.hpp>
78#include <com/sun/star/frame/XFrame.hpp>
79#include <editeng/lspcitem.hxx>
80#include <editeng/ulspitem.hxx>
81#include <memory>
83#include <oox/drawingml/diagram/diagram.hxx>
86
87using namespace ::com::sun::star::uno;
89using ::com::sun::star::frame::XFrame;
90using ::com::sun::star::frame::XController;
91
92namespace sd {
93
98{
99 // except a page switch and jumps to bookmarks, nothing is executed during
100 // a slide show
101 if( HasCurrentFunction(SID_PRESENTATION) &&
102 rReq.GetSlot() != SID_SWITCHPAGE &&
103 rReq.GetSlot() != SID_JUMPTOMARK)
104 return;
105
106 CheckLineTo (rReq);
107
108 // End text edit mode for some requests.
109 sal_uInt16 nSlot = rReq.GetSlot();
110 bool bAllowFocusChange = true;
111 switch (nSlot)
112 {
113 case SID_OUTPUT_QUALITY_COLOR:
114 case SID_OUTPUT_QUALITY_GRAYSCALE:
115 case SID_OUTPUT_QUALITY_BLACKWHITE:
116 case SID_OUTPUT_QUALITY_CONTRAST:
117 // Do nothing.
118 break;
119 case SID_SWITCHPAGE:
120 if (rReq.GetArgs() && rReq.GetArgs()->Count () == 1)
121 {
122 const SfxBoolItem* pAllowFocusChange = rReq.GetArg<SfxBoolItem>(SID_SWITCHPAGE);
123 bAllowFocusChange = pAllowFocusChange->GetValue();
124 if (!bAllowFocusChange)
125 break;
126 }
127 [[fallthrough]];
128 default:
129 if ( mpDrawView->IsTextEdit() )
130 {
131 mpDrawView->SdrEndTextEdit();
132 }
133 }
134
135 // sal_uInt16 nSlot = rReq.GetSlot();
136 switch (nSlot)
137 {
138 case SID_SWITCHPAGE: // BASIC
139 {
140 // switch page in running slide show
142 {
143 if (const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE))
144 SlideShow::GetSlideShow(GetViewShellBase())->jumpToPageNumber(static_cast<sal_Int32>((pWhatPage->GetValue()-1)>>1));
145 }
146 else
147 {
148 const SfxItemSet *pArgs = rReq.GetArgs ();
149 sal_uInt16 nSelectedPage = 0;
150
151 if (! pArgs || pArgs->Count () == 1)
152 {
153 nSelectedPage = maTabControl->GetCurPagePos();
154 }
155 else if (pArgs->Count () == 2)
156 {
157 const SfxUInt32Item* pWhatPage = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATPAGE);
158 const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
159
160 sal_Int32 nWhatPage = static_cast<sal_Int32>(pWhatPage->GetValue ());
161 PageKind nWhatKind = static_cast<PageKind>(pWhatKind->GetValue ());
162 if (nWhatKind < PageKind::Standard || nWhatKind > PageKind::Handout)
163 {
164#if HAVE_FEATURE_SCRIPTING
166#endif
167 rReq.Ignore ();
168 break;
169 }
171 {
172 if (! CHECK_RANGE (0, nWhatPage, GetDoc()->GetSdPageCount(nWhatKind)))
173 {
174#if HAVE_FEATURE_SCRIPTING
176#endif
177 rReq.Ignore ();
178 break;
179 }
180
181 nSelectedPage = static_cast<short>(nWhatPage);
182 mePageKind = nWhatKind;
183 }
184 }
185 else
186 {
187#if HAVE_FEATURE_SCRIPTING
189#endif
190 rReq.Ignore ();
191 break;
192 }
193
194 if( GetDocSh() && (GetDocSh()->GetCreateMode() == SfxObjectCreateMode::EMBEDDED))
196
197 SwitchPage(nSelectedPage, bAllowFocusChange);
198
199 if(HasCurrentFunction(SID_BEZIER_EDIT))
200 GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SfxCallMode::ASYNCHRON);
201
202 Invalidate();
204 rReq.Done ();
205 }
206 break;
207 }
208
209 case SID_SWITCHLAYER: // BASIC
210 {
211 const SfxItemSet *pArgs = rReq.GetArgs ();
212
213 // #i87182#
214 bool bCurPageValid(false);
215 sal_uInt16 nCurPage(0);
216
218 {
219 nCurPage = GetLayerTabControl()->GetCurPageId();
220 bCurPageValid = true;
221 }
222
223 if(pArgs && 1 == pArgs->Count())
224 {
225 const SfxUInt32Item* pWhatLayer = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYER);
226
227 if(pWhatLayer)
228 {
229 nCurPage = static_cast<short>(pWhatLayer->GetValue());
230 bCurPageValid = true;
231 }
232 }
233
234 if(bCurPageValid)
235 {
236 OUString aLayerName( GetLayerTabControl()->GetLayerName(nCurPage));
237 if (!aLayerName.isEmpty())
238 {
239 mpDrawView->SetActiveLayer(aLayerName);
240 }
241 Invalidate();
242 }
243
244 rReq.Done ();
245
246 break;
247 }
248
249 case SID_PAGEMODE: // BASIC
250 {
251
252 const SfxItemSet *pArgs = rReq.GetArgs();
253
254 if (pArgs && pArgs->Count () == 2)
255 {
256 const SfxBoolItem* pIsActive = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE);
257 const SfxUInt32Item* pWhatKind = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATKIND);
258
259 PageKind nWhatKind = static_cast<PageKind>(pWhatKind->GetValue());
260 if ( nWhatKind >= PageKind::Standard && nWhatKind <= PageKind::Handout)
261 {
262 mbIsLayerModeActive = pIsActive->GetValue();
263 mePageKind = nWhatKind;
264 }
265 }
266
267 // turn on default layer of page
268 mpDrawView->SetActiveLayer(sUNO_LayerName_layout);
269
271
272 Invalidate();
273 rReq.Done ();
274
275 break;
276 }
277
278 case SID_LAYERMODE: // BASIC
279 {
280 const SfxItemSet *pArgs = rReq.GetArgs();
281
282 if (pArgs && pArgs->Count() == 2)
283 {
284 const SfxUInt32Item* pWhatLayer = rReq.GetArg<SfxUInt32Item>(ID_VAL_WHATLAYER);
285 EditMode nWhatLayer = static_cast<EditMode>(pWhatLayer->GetValue());
286 if (nWhatLayer == EditMode::Page || nWhatLayer == EditMode::MasterPage)
287 {
288 mbIsLayerModeActive = rReq.GetArg<SfxBoolItem>(ID_VAL_ISACTIVE)->GetValue();
289 meEditMode = nWhatLayer;
290 }
291 }
292
294
295 Invalidate();
296 rReq.Done();
297
298 break;
299 }
300
301 case SID_HEADER_AND_FOOTER:
302 case SID_INSERT_PAGE_NUMBER:
303 case SID_INSERT_DATE_TIME:
304 {
307 VclPtr<AbstractHeaderFooterDialog> pDlg(pFact->CreateHeaderFooterDialog(this, pWin ? pWin->GetFrameWeld() : nullptr, GetDoc(), mpActualPage));
308 auto xRequest = std::make_shared<SfxRequest>(rReq);
309 rReq.Ignore(); // the 'old' request is not relevant any more
310 pDlg->StartExecuteAsync([this, pDlg, xRequest](sal_Int32 /*nResult*/){
313
314 Invalidate();
315 xRequest->Done();
316
317 pDlg->disposeOnce();
318 });
319 break;
320 }
321
322 case SID_MASTER_LAYOUTS:
323 {
324 SdPage* pPage = GetActualPage();
326 // Use the master page of the current page.
327 pPage = static_cast<SdPage*>(&pPage->TRG_GetMasterPage());
328
331 ScopedVclPtr<VclAbstractDialog> pDlg(pFact->CreateMasterLayoutDialog(pWin ? pWin->GetFrameWeld() : nullptr, GetDoc(), pPage));
332 pDlg->Execute();
333 Invalidate();
334 rReq.Done ();
335 break;
336 }
337 case SID_OBJECTRESIZE:
338 {
339 // The server likes to change the client size
340 OSL_ASSERT (GetViewShell()!=nullptr);
341 SfxInPlaceClient* pIPClient = GetViewShell()->GetIPClient();
342
343 if ( pIPClient && pIPClient->IsObjectInPlaceActive() )
344 {
345 const SfxRectangleItem& rRect =
346 rReq.GetArgs()->Get(SID_OBJECTRESIZE);
347 ::tools::Rectangle aRect( GetActiveWindow()->PixelToLogic( rRect.GetValue() ) );
348
349 if ( mpDrawView->AreObjectsMarked() )
350 {
351 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
352
353 if (rMarkList.GetMarkCount() == 1)
354 {
355 SdrMark* pMark = rMarkList.GetMark(0);
356 SdrObject* pObj = pMark->GetMarkedSdrObj();
357
358 SdrOle2Obj* pOle2Obj = dynamic_cast< SdrOle2Obj* >( pObj );
359 if(pOle2Obj)
360 {
361 if( pOle2Obj->GetObjRef().is() )
362 {
363 pOle2Obj->SetLogicRect(aRect);
364 }
365 }
366 }
367 }
368 }
369 rReq.Ignore ();
370 break;
371 }
372
373 case SID_RELOAD:
374 {
375 sal_uInt16 nId = Svx3DChildWindow::GetChildWindowId();
376 SfxViewFrame* pFrame = GetViewFrame();
377
378 try
379 {
380 Reference< XFrame > xFrame( pFrame->GetFrame().GetFrameInterface(), UNO_SET_THROW );
381
382 // Save the current configuration of panes and views.
383 Reference<XControllerManager> xControllerManager (
384 GetViewShellBase().GetController(), UNO_QUERY_THROW);
385 Reference<XConfigurationController> xConfigurationController (
386 xControllerManager->getConfigurationController(), UNO_SET_THROW );
387 Reference<XConfiguration> xConfiguration (
388 xConfigurationController->getRequestedConfiguration(), UNO_SET_THROW );
389
390 SfxChildWindow* pWindow = pFrame->GetChildWindow(nId);
391 if(pWindow)
392 {
393 Svx3DWin* p3DWin = static_cast<Svx3DWin*>(pWindow->GetWindow());
394 if(p3DWin)
395 p3DWin->DocumentReload();
396 }
397
398 // normal forwarding to ViewFrame for execution
399 GetViewFrame()->ExecuteSlot(rReq);
400
401 // From here on we must cope with this object and the frame already being
402 // deleted. Do not call any methods or use data members.
403 Reference<XController> xController( xFrame->getController(), UNO_SET_THROW );
404
405 // Restore the configuration.
406 xControllerManager.set( xController, UNO_QUERY_THROW );
407 xConfigurationController.set( xControllerManager->getConfigurationController() );
408 if ( ! xConfigurationController.is())
409 throw RuntimeException();
410 xConfigurationController->restoreConfiguration(xConfiguration);
411 }
412 catch (RuntimeException&)
413 {
414 DBG_UNHANDLED_EXCEPTION("sd.view");
415 }
416
417 // We have to return immediately to avoid accessing this object.
418 return;
419 }
420
421 case SID_JUMPTOMARK:
422 {
423 if( rReq.GetArgs() )
424 {
425 const SfxStringItem* pBookmark = rReq.GetArg<SfxStringItem>(SID_JUMPTOMARK);
426
427 if (pBookmark)
428 {
430
432 if(xSlideshow.is() && xSlideshow->isRunning())
433 {
434 xSlideshow->jumpToBookmark(sBookmark);
435 }
436 else
437 {
438 GotoBookmark(sBookmark);
439 }
440 }
441 }
442 rReq.Done();
443 break;
444 }
445
446 case SID_OUTPUT_QUALITY_COLOR:
447 case SID_OUTPUT_QUALITY_GRAYSCALE:
448 case SID_OUTPUT_QUALITY_BLACKWHITE:
449 case SID_OUTPUT_QUALITY_CONTRAST:
450 {
451 ExecReq( rReq );
452 break;
453 }
454
455 case SID_MAIL_SCROLLBODY_PAGEDOWN:
456 {
457 ExecReq( rReq );
458 break;
459 }
460
461 case SID_ATTR_YEAR2000:
462 {
463 FmFormShell* pFormShell = GetViewShellBase().GetFormShellManager()->GetFormShell();
464 if (pFormShell != nullptr)
465 {
466 const SfxPoolItem* pItem;
467 if (rReq.GetArgs()->GetItemState(
468 SID_ATTR_YEAR2000, true, &pItem) == SfxItemState::SET)
469 pFormShell->SetY2KState (
470 static_cast<const SfxUInt16Item*>(pItem)->GetValue());
471 }
472
473 rReq.Done();
474 }
475 break;
476
477 case SID_OPT_LOCALE_CHANGED:
478 {
481 rReq.Done();
482 }
483 break;
484
485 case SID_REGENERATE_DIAGRAM:
486 case SID_EDIT_DIAGRAM:
487 {
488 const SdrMarkList& rMarkList = mpDrawView->GetMarkedObjectList();
489
490 if (1 == rMarkList.GetMarkCount())
491 {
492 SdrObject* pObj = rMarkList.GetMark(0)->GetMarkedSdrObj();
493
494 // Support advanced DiagramHelper
495 if(nullptr != pObj && pObj->isDiagram())
496 {
497 if(SID_REGENERATE_DIAGRAM == nSlot)
498 {
499 mpDrawView->UnmarkAll();
500 pObj->getDiagramHelper()->reLayout(*static_cast<SdrObjGroup*>(pObj));
501 mpDrawView->MarkObj(pObj, mpDrawView->GetSdrPageView());
502 }
503 else // SID_EDIT_DIAGRAM
504 {
507 GetFrameWeld(),
508 *static_cast<SdrObjGroup*>(pObj));
509 pDlg->Execute();
510 }
511 }
512 }
513
514 rReq.Done();
515 }
516 break;
517
518 default:
519 break;
520 }
521}
522
524{
525 // nothing is executed during a slide show!
526 if(HasCurrentFunction(SID_PRESENTATION))
527 return;
528
529 CheckLineTo (rReq);
530
531 const SfxItemSet* pArgs = rReq.GetArgs();
532 const Point aPagePos( GetActiveWindow()->GetViewOrigin() );
533 Size aPageSize = mpActualPage->GetSize();
534 Size aViewSize = GetActiveWindow()->GetViewSize();
535
536 switch ( rReq.GetSlot() )
537 {
538 case SID_ATTR_LONG_LRSPACE:
539 if (pArgs)
540 {
541 std::unique_ptr<SdUndoGroup> pUndoGroup(new SdUndoGroup(GetDoc()));
542 pUndoGroup->SetComment(SdResId(STR_UNDO_CHANGE_PAGEBORDER));
543
544 const SvxLongLRSpaceItem& rLRSpace =
545 pArgs->Get(SID_ATTR_LONG_LRSPACE);
546
547 if( mpDrawView->IsTextEdit() )
548 {
550 aRect.SetPos(aRect.TopLeft() + aPagePos);
551 aRect.SetLeft( rLRSpace.GetLeft() );
552 aRect.SetRight( aViewSize.Width() - rLRSpace.GetRight() );
553 aRect.SetPos(aRect.TopLeft() - aPagePos);
554 if ( aRect != maMarkRect)
555 {
556 mpDrawView->SetAllMarkedRect(aRect);
557 maMarkRect = mpDrawView->GetAllMarkedRect();
558 Invalidate( SID_RULER_OBJECT );
559 }
560 }
561 else
562 {
563 ::tools::Long nLeft = std::max(::tools::Long(0), rLRSpace.GetLeft() - aPagePos.X());
564 ::tools::Long nRight = std::max(::tools::Long(0), rLRSpace.GetRight() + aPagePos.X() +
565 aPageSize.Width() - aViewSize.Width());
566
567 sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
568 sal_uInt16 i;
569 for ( i = 0; i < nPageCnt; i++)
570 {
571 SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
573 pPage,
574 pPage->GetLeftBorder(),
575 pPage->GetRightBorder(),
576 nLeft, nRight);
577 pUndoGroup->AddAction(pUndo);
578 pPage->SetLeftBorder(nLeft);
579 pPage->SetRightBorder(nRight);
580 }
582
583 for (i = 0; i < nPageCnt; i++)
584 {
587 pPage,
588 pPage->GetLeftBorder(),
589 pPage->GetRightBorder(),
590 nLeft, nRight);
591 pUndoGroup->AddAction(pUndo);
592 pPage->SetLeftBorder(nLeft);
593 pPage->SetRightBorder(nRight);
594 }
596 }
597
598 // give the undo group to the undo manager
600 AddUndoAction(std::move(pUndoGroup));
601 }
602 break;
603 case SID_ATTR_LONG_ULSPACE:
604 if (pArgs)
605 {
606 std::unique_ptr<SdUndoGroup> pUndoGroup(new SdUndoGroup(GetDoc()));
607 pUndoGroup->SetComment(SdResId(STR_UNDO_CHANGE_PAGEBORDER));
608
609 const SvxLongULSpaceItem& rULSpace =
610 pArgs->Get(SID_ATTR_LONG_ULSPACE);
611
612 if( mpDrawView->IsTextEdit() )
613 {
615 aRect.SetPos(aRect.TopLeft() + aPagePos);
616 aRect.SetTop( rULSpace.GetUpper() );
617 aRect.SetBottom( aViewSize.Height() - rULSpace.GetLower() );
618 aRect.SetPos(aRect.TopLeft() - aPagePos);
619
620 if ( aRect != maMarkRect)
621 {
622 mpDrawView->SetAllMarkedRect(aRect);
623 maMarkRect = mpDrawView->GetAllMarkedRect();
624 Invalidate( SID_RULER_OBJECT );
625 }
626 }
627 else
628 {
629 ::tools::Long nUpper = std::max(::tools::Long(0), rULSpace.GetUpper() - aPagePos.Y());
630 ::tools::Long nLower = std::max(::tools::Long(0), rULSpace.GetLower() + aPagePos.Y() +
631 aPageSize.Height() - aViewSize.Height());
632
633 sal_uInt16 nPageCnt = GetDoc()->GetSdPageCount(mePageKind);
634 sal_uInt16 i;
635 for ( i = 0; i < nPageCnt; i++)
636 {
637 SdPage* pPage = GetDoc()->GetSdPage(i, mePageKind);
639 pPage,
640 pPage->GetUpperBorder(),
641 pPage->GetLowerBorder(),
642 nUpper, nLower);
643 pUndoGroup->AddAction(pUndo);
644 pPage->SetUpperBorder(nUpper);
645 pPage->SetLowerBorder(nLower);
646 }
648
649 for (i = 0; i < nPageCnt; i++)
650 {
653 pPage,
654 pPage->GetUpperBorder(),
655 pPage->GetLowerBorder(),
656 nUpper, nLower);
657 pUndoGroup->AddAction(pUndo);
658 pPage->SetUpperBorder(nUpper);
659 pPage->SetLowerBorder(nLower);
660 }
662 }
663
664 // give the undo group to the undo manager
666 AddUndoAction(std::move(pUndoGroup));
667 }
668 break;
669 case SID_RULER_OBJECT:
670 if (pArgs)
671 {
673 aRect.SetPos(aRect.TopLeft() + aPagePos);
674
675 const SvxObjectItem& rOI = pArgs->Get(SID_RULER_OBJECT);
676
677 if ( rOI.GetStartX() != rOI.GetEndX() )
678 {
679 aRect.SetLeft( rOI.GetStartX() );
680 aRect.SetRight( rOI.GetEndX() );
681 }
682 if ( rOI.GetStartY() != rOI.GetEndY() )
683 {
684 aRect.SetTop( rOI.GetStartY() );
685 aRect.SetBottom( rOI.GetEndY() );
686 }
687 aRect.SetPos(aRect.TopLeft() - aPagePos);
688 if ( aRect != maMarkRect)
689 {
690 mpDrawView->SetAllMarkedRect(aRect);
691 maMarkRect = mpDrawView->GetAllMarkedRect();
692 Invalidate( SID_RULER_OBJECT );
693 }
694 }
695 break;
696 case SID_ATTR_TABSTOP:
697 if (pArgs && mpDrawView->IsTextEdit())
698 {
699 const SvxTabStopItem& rItem = pArgs->Get( EE_PARA_TABS );
700
702
703 aEditAttr.Put( rItem );
704 mpDrawView->SetAttributes( aEditAttr );
705
706 Invalidate(SID_ATTR_TABSTOP);
707 }
708 break;
709 case SID_ATTR_PARA_LINESPACE:
710 if (pArgs)
711 {
712 SvxLineSpacingItem aParaLineSP = pArgs->Get(
713 GetPool().GetWhich(SID_ATTR_PARA_LINESPACE));
714
716 aParaLineSP.SetWhich( EE_PARA_SBL );
717
718 aEditAttr.Put( aParaLineSP );
719 mpDrawView->SetAttributes( aEditAttr );
720
721 Invalidate(SID_ATTR_PARA_LINESPACE);
722 }
723 break;
724 case SID_ATTR_PARA_ADJUST_LEFT:
725 {
726 SvxAdjustItem aItem( SvxAdjust::Left, EE_PARA_JUST );
728
729 aEditAttr.Put( aItem );
730 mpDrawView->SetAttributes( aEditAttr );
731
732 Invalidate(SID_ATTR_PARA_ADJUST_LEFT);
733 break;
734 }
735 case SID_ATTR_PARA_ADJUST_CENTER:
736 {
737 SvxAdjustItem aItem( SvxAdjust::Center, EE_PARA_JUST );
739
740 aEditAttr.Put( aItem );
741 mpDrawView->SetAttributes( aEditAttr );
742
743 Invalidate(SID_ATTR_PARA_ADJUST_CENTER);
744 break;
745 }
746 case SID_ATTR_PARA_ADJUST_RIGHT:
747 {
748 SvxAdjustItem aItem( SvxAdjust::Right, EE_PARA_JUST );
750
751 aEditAttr.Put( aItem );
752 mpDrawView->SetAttributes( aEditAttr );
753
754 Invalidate(SID_ATTR_PARA_ADJUST_RIGHT);
755 break;
756 }
757 case SID_ATTR_PARA_ADJUST_BLOCK:
758 {
759 SvxAdjustItem aItem( SvxAdjust::Block, EE_PARA_JUST );
761
762 aEditAttr.Put( aItem );
763 mpDrawView->SetAttributes( aEditAttr );
764
765 Invalidate(SID_ATTR_PARA_ADJUST_BLOCK);
766 break;
767 }
768 case SID_ATTR_PARA_ULSPACE:
769 if (pArgs)
770 {
771 SvxULSpaceItem aULSP = static_cast<const SvxULSpaceItem&>(pArgs->Get(
772 SID_ATTR_PARA_ULSPACE));
774 aULSP.SetWhich( EE_PARA_ULSPACE );
775
776 aEditAttr.Put( aULSP );
777 mpDrawView->SetAttributes( aEditAttr );
778
779 Invalidate(SID_ATTR_PARA_ULSPACE);
780 }
781 break;
782 case SID_ATTR_PARA_LRSPACE:
783 if (pArgs)
784 {
785 SvxLRSpaceItem aLRSpace = static_cast<const SvxLRSpaceItem&>(pArgs->Get(
786 SID_ATTR_PARA_LRSPACE));
787
789 aLRSpace.SetWhich( EE_PARA_LRSPACE );
790
791 aEditAttr.Put( aLRSpace );
792 mpDrawView->SetAttributes( aEditAttr );
793
794 Invalidate(SID_ATTR_PARA_LRSPACE);
795 }
796 break;
797 case SID_ATTR_LRSPACE:
798 if (pArgs && mpDrawView->IsTextEdit())
799 {
800 sal_uInt16 nId = SID_ATTR_PARA_LRSPACE;
801 const SvxLRSpaceItem& rItem = static_cast<const SvxLRSpaceItem&>(
802 pArgs->Get( nId ));
803
807 EE_PARA_LRSPACE, EE_PARA_LRSPACE> aEditAttr( GetDoc()->GetPool() );
808 mpDrawView->GetAttributes( aEditAttr );
809
811 SvxLRSpaceItem aLRSpaceItem( rItem.GetLeft(),
812 rItem.GetRight(),
813 rItem.GetTextFirstLineOffset(), nId );
814
815 const sal_Int16 nOutlineLevel = aEditAttr.Get( EE_PARA_OUTLLEVEL ).GetValue();
816 const SvxLRSpaceItem& rOrigLRSpaceItem = aEditAttr.Get( EE_PARA_LRSPACE );
817 const SvxNumBulletItem& rNumBulletItem = aEditAttr.Get( EE_PARA_NUMBULLET );
818 if( nOutlineLevel != -1 &&
819 rNumBulletItem.GetNumRule().GetLevelCount() > nOutlineLevel )
820 {
821 const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule().GetLevel(nOutlineLevel);
822 SvxNumberFormat aFormat(rFormat);
823
824 // left margin gets distributed onto LRSpace item
825 // and number format AbsLSpace - this fixes
826 // n#707779 (previously, LRSpace left indent could
827 // become negative - EditEngine really does not
828 // like that.
829 const auto nAbsLSpace=aFormat.GetAbsLSpace();
830 const ::tools::Long nTxtLeft=rItem.GetTextLeft();
831 const ::tools::Long nLeftIndent=std::max(::tools::Long(0),nTxtLeft - nAbsLSpace);
832 aLRSpaceItem.SetTextLeft(nLeftIndent);
833 // control for clipped left indent - remainder
834 // reduces number format first line indent
835 aFormat.SetAbsLSpace(nTxtLeft - nLeftIndent);
836
837 // negative first line indent goes to the number
838 // format, positive to the lrSpace item
839 if( rItem.GetTextFirstLineOffset() < 0 )
840 {
841 aFormat.SetFirstLineOffset(
843 - rOrigLRSpaceItem.GetTextFirstLineOffset()
844 + aFormat.GetCharTextDistance());
845 aLRSpaceItem.SetTextFirstLineOffset(0);
846 }
847 else
848 {
849 aFormat.SetFirstLineOffset(0);
850 aLRSpaceItem.SetTextFirstLineOffset(
852 - aFormat.GetFirstLineOffset() //TODO: overflow
853 + aFormat.GetCharTextDistance());
854 }
855
856 if( rFormat != aFormat )
857 {
858 // put all items
859 const_cast<SvxNumRule&>(rNumBulletItem.GetNumRule()).SetLevel(nOutlineLevel,aFormat);
860 aEditAttr.Put( rNumBulletItem );
861 aEditAttr.Put( aLRSpaceItem );
862 mpDrawView->SetAttributes( aEditAttr );
863
864 Invalidate(SID_ATTR_PARA_LRSPACE);
865 break;
866 }
867 }
868
869 // only put lrSpace item
871 aEditAttrReduced.Put( aLRSpaceItem );
872 mpDrawView->SetAttributes( aEditAttrReduced );
873
874 Invalidate(SID_ATTR_PARA_LRSPACE);
875 }
876 break;
877 }
878}
879
881{
882 Point aOrigin;
883
884 if (mpDrawView->GetSdrPageView())
885 {
886 aOrigin = mpDrawView->GetSdrPageView()->GetPageOrigin();
887 }
888
889 Size aViewSize = GetActiveWindow()->GetViewSize();
890
891 const Point aPagePos( GetActiveWindow()->GetViewOrigin() );
892 Size aPageSize = mpActualPage->GetSize();
893
894 ::tools::Rectangle aRect(aPagePos, Point( aViewSize.Width() - (aPagePos.X() + aPageSize.Width()),
895 aViewSize.Height() - (aPagePos.Y() + aPageSize.Height())));
896
897 if( mpDrawView->IsTextEdit() )
898 {
900 ::tools::Rectangle aMinMaxRect( aPnt1, Size(-1, -1) );
901 rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aMinMaxRect) );
902 }
903 else
904 {
905 rSet.Put( SfxRectangleItem(SID_RULER_LR_MIN_MAX, aRect) );
906 }
907
908 SvxLongLRSpaceItem aLRSpace(aPagePos.X() + mpActualPage->GetLeftBorder(),
909 aRect.Right() + mpActualPage->GetRightBorder(),
910 SID_ATTR_LONG_LRSPACE);
911 SvxLongULSpaceItem aULSpace(aPagePos.Y() + mpActualPage->GetUpperBorder(),
913 SID_ATTR_LONG_ULSPACE);
914 rSet.Put(SvxPagePosSizeItem(Point(0,0) - aPagePos, aViewSize.Width(),
915 aViewSize.Height()));
916 SfxPointItem aPointItem( SID_RULER_NULL_OFFSET, aPagePos + aOrigin );
917
918 SvxProtectItem aProtect( SID_RULER_PROTECT );
919
920 maMarkRect = mpDrawView->GetAllMarkedRect();
921
922 const bool bRTL = GetDoc() && GetDoc()->GetDefaultWritingMode() == css::text::WritingMode_RL_TB;
923 rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, bRTL));
924
925 if( mpDrawView->AreObjectsMarked() )
926 {
927 if( mpDrawView->IsTextEdit() )
928 {
929 SdrObject* pObj = mpDrawView->GetMarkedObjectList().GetMark( 0 )->GetMarkedSdrObj();
930 if( pObj->GetObjInventor() == SdrInventor::Default)
931 {
932 SfxItemSet aEditAttr( GetDoc()->GetPool() );
933 mpDrawView->GetAttributes( aEditAttr );
934 if( aEditAttr.GetItemState( EE_PARA_TABS ) >= SfxItemState::DEFAULT )
935 {
936 const SvxTabStopItem& rItem = aEditAttr.Get( EE_PARA_TABS );
937 rSet.Put( rItem );
938
939 const SvxLRSpaceItem& rLRSpaceItem = aEditAttr.Get( EE_PARA_LRSPACE );
940 SvxLRSpaceItem aLRSpaceItem( rLRSpaceItem.GetLeft(),
941 rLRSpaceItem.GetRight(),
942 rLRSpaceItem.GetTextFirstLineOffset(), SID_ATTR_PARA_LRSPACE );
943
944 const sal_Int16 nOutlineLevel = aEditAttr.Get( EE_PARA_OUTLLEVEL ).GetValue();
945 const SvxNumBulletItem& rNumBulletItem = aEditAttr.Get( EE_PARA_NUMBULLET );
946 if( nOutlineLevel != -1 &&
947 rNumBulletItem.GetNumRule().GetLevelCount() > nOutlineLevel )
948 {
949 const SvxNumberFormat& rFormat = rNumBulletItem.GetNumRule().GetLevel(nOutlineLevel);
950 aLRSpaceItem.SetTextLeft(rFormat.GetAbsLSpace() + rLRSpaceItem.GetTextLeft());
951 aLRSpaceItem.SetTextFirstLineOffset(
952 rLRSpaceItem.GetTextFirstLineOffset() + rFormat.GetFirstLineOffset()
953 //TODO: overflow
954 - rFormat.GetCharTextDistance());
955 }
956
957 rSet.Put( aLRSpaceItem );
958
959 Point aPos( aPagePos + maMarkRect.TopLeft() );
960
961 if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
962 {
963 const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
964 ::tools::Long nLD = rTLDItem.GetValue();
965 aPos.AdjustX(nLD );
966 }
967
968 aPointItem.SetValue( aPos );
969
971 if (pObj->GetObjIdentifier() == SdrObjKind::Table)
972 {
973 sdr::table::SdrTableObj* pTable = static_cast<sdr::table::SdrTableObj*>(pObj);
974 sdr::table::CellPos cellpos;
975 pTable->getActiveCellPos(cellpos);
976 pTable->getCellBounds(cellpos, aParaRect);
977 }
978
979 aLRSpace.SetLeft(aPagePos.X() + aParaRect.Left());
980
981 if ( aEditAttr.GetItemState( SDRATTR_TEXT_LEFTDIST ) == SfxItemState::SET )
982 {
983 const SdrMetricItem& rTLDItem = aEditAttr.Get( SDRATTR_TEXT_LEFTDIST );
984 ::tools::Long nLD = rTLDItem.GetValue();
985 aLRSpace.SetLeft( aLRSpace.GetLeft() + nLD );
986 }
987
988 aLRSpace.SetRight(aRect.Right() + aPageSize.Width() - aParaRect.Right());
989
990 if ( aEditAttr.GetItemState( SDRATTR_TEXT_RIGHTDIST ) == SfxItemState::SET )
991 {
992 const SdrMetricItem& rTRDItem = aEditAttr.Get( SDRATTR_TEXT_RIGHTDIST );
993 ::tools::Long nRD = rTRDItem.GetValue();
994 aLRSpace.SetRight( aLRSpace.GetRight() + nRD );
995 }
996
997 aULSpace.SetUpper( aPagePos.Y() + maMarkRect.Top() );
998 aULSpace.SetLower( aRect.Bottom() + aPageSize.Height() - maMarkRect.Bottom() );
999
1000 rSet.DisableItem( SID_RULER_OBJECT );
1001
1002 // lock page margins
1003 aProtect.SetSizeProtect( true );
1004 aProtect.SetPosProtect( true );
1005 }
1006
1007 if( aEditAttr.GetItemState( EE_PARA_WRITINGDIR ) >= SfxItemState::DEFAULT )
1008 {
1009 const SvxFrameDirectionItem& rItem = aEditAttr.Get( EE_PARA_WRITINGDIR );
1010 rSet.Put(SfxBoolItem(SID_RULER_TEXT_RIGHT_TO_LEFT, rItem.GetValue() == SvxFrameDirection::Horizontal_RL_TB));
1011 }
1012 }
1013 }
1014 else
1015 {
1017 rSet.DisableItem( SID_RULER_TEXT_RIGHT_TO_LEFT );
1018
1019 if( mpDrawView->IsResizeAllowed(true) )
1020 {
1021 ::tools::Rectangle aResizeRect( maMarkRect );
1022
1023 aResizeRect.SetPos(aResizeRect.TopLeft() + aPagePos);
1024 SvxObjectItem aObjItem(aResizeRect.Left(), aResizeRect.Right(),
1025 aResizeRect.Top(), aResizeRect.Bottom());
1026 rSet.Put(aObjItem);
1028 }
1029 else
1030 {
1031 rSet.DisableItem( SID_RULER_OBJECT );
1032 }
1033 }
1034 }
1035 else
1036 {
1037 rSet.DisableItem( SID_RULER_OBJECT );
1039 }
1040
1041 rSet.Put( aLRSpace );
1042 rSet.Put( aULSpace );
1043
1044 rSet.Put( aPointItem );
1045 rSet.Put( aProtect );
1046}
1047
1049{
1050 // nothing is executed during a slide show!
1051 if(HasCurrentFunction(SID_PRESENTATION))
1052 return;
1053
1054 CheckLineTo (rReq);
1055
1056 switch ( rReq.GetSlot() )
1057 {
1058 case SID_ATTR_SIZE:
1059 {
1060 GetViewFrame()->GetDispatcher()->Execute( SID_ATTR_TRANSFORM, SfxCallMode::ASYNCHRON );
1061 }
1062 break;
1063
1064 case SID_STATUS_LAYOUT:
1065 {
1066 GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION_LAYOUT, SfxCallMode::ASYNCHRON );
1067 }
1068 break;
1069 }
1070}
1071
1076{
1077 SdrPageView* pPV;
1079 sal_uInt16 nHitLog = static_cast<sal_uInt16>(GetActiveWindow()->PixelToLogic(
1080 Size(FuPoor::HITPIX,0)).Width());
1081 sal_uInt16 nHelpLine;
1082
1083 if ( !mpDrawView->PickHelpLine(aMPos, nHitLog, *GetActiveWindow()->GetOutDev(), nHelpLine, pPV) )
1084 return;
1085
1086 const SdrHelpLine& rHelpLine = (pPV->GetHelpLines())[nHelpLine];
1087
1088 if ( rHelpLine.GetKind() == SdrHelpLineKind::Point )
1089 {
1090 rSet.Put( SfxStringItem( SID_SET_SNAPITEM,
1091 SdResId( STR_POPUP_EDIT_SNAPPOINT)) );
1092 rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM,
1093 SdResId( STR_POPUP_DELETE_SNAPPOINT)) );
1094 }
1095 else
1096 {
1097 rSet.Put( SfxStringItem( SID_SET_SNAPITEM,
1098 SdResId( STR_POPUP_EDIT_SNAPLINE)) );
1099 rSet.Put( SfxStringItem( SID_DELETE_SNAPITEM,
1100 SdResId( STR_POPUP_DELETE_SNAPLINE)) );
1101 }
1102}
1103
1104} // end of namespace sd
1105
1106/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define CHECK_RANGE(nMin, nValue, nMax)
#define GetWhich(nSlot)
Definition: bulmaper.cxx:40
sal_uInt32 GetValue() const
const OUString & GetValue() const
void SetY2KState(sal_uInt16 n)
static OUString decode(std::u16string_view rText, DecodeMechanism eMechanism, rtl_TextEncoding eCharset=RTL_TEXTENCODING_UTF8)
constexpr tools::Long Y() const
tools::Long AdjustX(tools::Long nHorzMove)
constexpr tools::Long X() const
virtual VclPtr< VclAbstractDialog > CreateMasterLayoutDialog(weld::Window *pParent, SdDrawDocument *pDoc, SdPage *)=0
static SD_DLLPUBLIC SdAbstractDialogFactory * Create()
Definition: sdabstdlg.cxx:38
virtual VclPtr< AbstractHeaderFooterDialog > CreateHeaderFooterDialog(sd::ViewShell *pViewShell, weld::Window *pParent, SdDrawDocument *pDoc, SdPage *pCurrentPage)=0
sal_uInt16 GetMasterSdPageCount(PageKind ePgKind) const
Definition: drawdoc2.cxx:222
SdPage * GetSdPage(sal_uInt16 nPgNum, PageKind ePgKind) const
Definition: drawdoc2.cxx:207
SdPage * GetMasterSdPage(sal_uInt16 nPgNum, PageKind ePgKind)
Definition: drawdoc2.cxx:217
css::text::WritingMode GetDefaultWritingMode() const
Definition: drawdoc4.cxx:1184
sal_uInt16 GetSdPageCount(PageKind ePgKind) const
Definition: drawdoc2.cxx:212
virtual void SetUpperBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1781
virtual void SetRightBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1773
virtual void SetLowerBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1789
virtual void SetLeftBorder(sal_Int32 nBorder) override
Definition: sdpage.cxx:1765
SdrHelpLineKind GetKind() const
size_t GetMarkCount() const
SdrMark * GetMark(size_t nNum) const
SdrObject * GetMarkedSdrObj() const
bool isDiagram() const
virtual const std::shared_ptr< svx::diagram::IDiagramHelper > & getDiagramHelper() const
virtual SdrInventor GetObjInventor() const
virtual void SetLogicRect(const tools::Rectangle &rRect)
virtual SdrObjKind GetObjIdentifier() const
css::uno::Reference< css::embed::XEmbeddedObject > const & GetObjRef() const
const SdrHelpLineList & GetHelpLines() const
SdrPage & TRG_GetMasterPage() const
Size GetSize() const
sal_Int32 GetUpperBorder() const
sal_Int32 GetRightBorder() const
sal_Int32 GetLeftBorder() const
sal_Int32 GetLowerBorder() const
bool GetValue() const
vcl::Window * GetWindow() const
const SfxPoolItem * Execute(sal_uInt16 nSlot, SfxCallMode nCall=SfxCallMode::SLOT, const SfxPoolItem **pArgs=nullptr, sal_uInt16 nModi=0, const SfxPoolItem **pInternalArgs=nullptr)
const css::uno::Reference< css::frame::XFrame > & GetFrameInterface() const
bool IsObjectInPlaceActive() const
sal_uInt16 Count() const
SfxItemState GetItemState(sal_uInt16 nWhich, bool bSrchInParent=true, const SfxPoolItem **ppItem=nullptr) const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void DisableItem(sal_uInt16 nWhich)
void SetValue(const Point &rNewVal)
const tools::Rectangle & GetValue() const
sal_uInt16 GetSlot() const
void Ignore()
const SfxItemSet * GetArgs() const
const T * GetArg(sal_uInt16 nSlotId) const
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
virtual void Invalidate(sal_uInt16 nId=0)
const SfxPoolItem * ExecuteSlot(SfxRequest &rReq, const SfxInterface *pIF=nullptr)
virtual SfxUndoManager * GetUndoManager()
SfxViewShell * GetViewShell() const
SfxDispatcher * GetDispatcher()
SfxChildWindow * GetChildWindow(sal_uInt16)
SfxFrame & GetFrame() const
virtual SfxObjectShell * GetObjectShell() override
SfxInPlaceClient * GetIPClient() const
constexpr tools::Long Height() const
constexpr tools::Long Width() const
static void FatalError(ErrCode)
void DocumentReload()
short GetTextFirstLineOffset() const
tools::Long GetRight() const
void SetTextLeft(const tools::Long nL, const sal_uInt16 nProp=100)
tools::Long GetTextLeft() const
tools::Long GetLeft() const
void SetTextFirstLineOffset(const short nF, const sal_uInt16 nProp=100)
tools::Long GetRight() const
void SetLeft(tools::Long lArgLeft)
tools::Long GetLeft() const
void SetRight(tools::Long lArgRight)
tools::Long GetLower() const
void SetLower(tools::Long lArgRight)
tools::Long GetUpper() const
void SetUpper(tools::Long lArgLeft)
const SvxNumRule & GetNumRule() const
sal_uInt16 GetLevelCount() const
const SvxNumberFormat & GetLevel(sal_uInt16 nLevel) const
void SetAbsLSpace(sal_Int32 nSet)
sal_Int32 GetFirstLineOffset() const
sal_Int32 GetAbsLSpace() const
void SetFirstLineOffset(sal_Int32 nSet)
short GetCharTextDistance() const
tools::Long GetStartX() const
tools::Long GetEndY() const
tools::Long GetEndX() const
tools::Long GetStartY() const
void SetSizeProtect(bool bNew)
void SetPosProtect(bool bNew)
sal_uInt16 GetCurPageId() const
virtual VclPtr< AbstractDiagramDialog > CreateDiagramDialog(weld::Window *pParent, SdrObjGroup &rDiagram)=0
static VclAbstractDialogFactory * Create()
virtual void SetModified(bool=true) override
Definition: docshell.cxx:421
static void CheckLineTo(SfxRequest &rReq)
check if we have to draw a polyline
Definition: drviewsa.cxx:404
std::unique_ptr< DrawView > mpDrawView
void GotoBookmark(std::u16string_view rBookmark)
Definition: drviewsh.cxx:32
VclPtr< TabControl > maTabControl
virtual void ChangeEditMode(EditMode eMode, bool bIsLayerModeActive)
Set status (enabled/disabled) of menu SfxSlots.
Definition: drviews1.cxx:333
void ExecCtrl(SfxRequest &rReq)
handle SfxRequests for controller
Definition: drviews3.cxx:97
bool mbIsLayerModeActive
This flag controls whether the layer mode is active, i.e.
SD_DLLPUBLIC LayerTabBar * GetLayerTabControl()
Return a pointer to the tab control for layers.
Definition: drviews5.cxx:636
virtual SdPage * GetActualPage() override
void ExecRuler(SfxRequest &rReq)
Definition: drviews3.cxx:523
void ExecStatusBar(SfxRequest &rReq)
Definition: drviews3.cxx:1048
bool SwitchPage(sal_uInt16 nPage, bool bAllowChangeFocus=true)
Switch to desired page.
Definition: drviews1.cxx:831
::tools::Rectangle maMarkRect
void GetSnapItemState(SfxItemSet &rSet)
set state of snap object entries in popup
Definition: drviews3.cxx:1075
void GetRulerState(SfxItemSet &rSet)
Definition: drviews3.cxx:880
static const int HITPIX
Definition: fupoor.hxx:50
static bool IsRunning(ViewShellBase const &rBase)
returns true if there is a running presentation for the given ViewShellBase
Definition: slideshow.cxx:208
static rtl::Reference< SlideShow > GetSlideShow(SdDrawDocument const *pDocument)
Definition: slideshow.cxx:157
std::shared_ptr< FormShellManager > const & GetFormShellManager() const
virtual void UpdatePreview(SdPage *pPage)
This method is still used by the OutlineViewShell to update the model according to the content of the...
Definition: viewshel.cxx:1087
SD_DLLPUBLIC DrawDocShell * GetDocSh() const
Definition: viewshel.cxx:1407
Point const & GetViewOrigin() const
Definition: viewshe2.cxx:942
SdDrawDocument * GetDoc() const
Definition: viewshel.cxx:1412
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_DLLPUBLIC weld::Window * GetFrameWeld() const
Definition: viewshel.cxx:1582
void ExecReq(SfxRequest &rReq)
Definition: viewshel.cxx:1339
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
const Point & GetWinViewPos() const
Definition: Window.hxx:110
const Size & GetViewSize() const
Definition: Window.hxx:112
void getActiveCellPos(sdr::table::CellPos &rPos) const
void getCellBounds(const sdr::table::CellPos &rPos, ::tools::Rectangle &rCellRect)
constexpr void SetLeft(tools::Long v)
constexpr void SetTop(tools::Long v)
constexpr tools::Long Top() const
constexpr Point TopLeft() const
void SetPos(const Point &rPoint)
constexpr void SetRight(tools::Long v)
constexpr tools::Long Right() const
constexpr void SetBottom(tools::Long v)
constexpr tools::Long Left() const
constexpr tools::Long Bottom() const
Point PixelToLogic(const Point &rDevicePt) const
void Invalidate(InvalidateFlags nFlags=InvalidateFlags::NONE)
weld::Window * GetFrameWeld() const
#define DBG_UNHANDLED_EXCEPTION(...)
virtual std::shared_ptr< SfxDialogController > GetController() override
constexpr TypedWhichId< SvxTabStopItem > EE_PARA_TABS(EE_PARA_START+17)
constexpr TypedWhichId< SvxAdjustItem > EE_PARA_JUST(EE_PARA_START+16)
constexpr TypedWhichId< SvxULSpaceItem > EE_PARA_ULSPACE(EE_PARA_START+14)
constexpr TypedWhichId< SvxLRSpaceItem > EE_PARA_LRSPACE(EE_PARA_START+13)
constexpr TypedWhichId< SvxLineSpacingItem > EE_PARA_SBL(EE_PARA_START+15)
constexpr TypedWhichId< SfxInt16Item > EE_PARA_OUTLLEVEL(EE_PARA_START+11)
constexpr TypedWhichId< SvxFrameDirectionItem > EE_PARA_WRITINGDIR(EE_PARA_START+0)
constexpr TypedWhichId< SvxNumBulletItem > EE_PARA_NUMBULLET(EE_PARA_START+5)
int i
long Long
sal_Int16 nId
const char GetValue[]
EditMode
Definition: pres.hxx:53
PageKind
Definition: pres.hxx:45
#define ERRCODE_BASIC_BAD_PROP_VALUE
#define ERRCODE_BASIC_WRONG_ARGS
OUString SdResId(TranslateId aId)
Definition: sdmod.cxx:83
static SfxItemSet & rSet
Reference< XController > xController
Reference< XFrame > xFrame
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_LEFTDIST(SDRATTR_MISC_FIRST+4)
constexpr TypedWhichId< SdrMetricItem > SDRATTR_TEXT_RIGHTDIST(SDRATTR_MISC_FIRST+5)
constexpr OUStringLiteral sUNO_LayerName_layout
Definition: unokywds.hxx:31