LibreOffice Module sw (master) 1
drawbase.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 <hintids.hxx>
21#include <comphelper/lok.hxx>
22#include <svx/svdview.hxx>
23#include <svx/svdobj.hxx>
24#include <svl/ptitem.hxx>
25#include <editeng/sizeitem.hxx>
26#include <sfx2/request.hxx>
27#include <sfx2/bindings.hxx>
28#include <sfx2/viewfrm.hxx>
29#include <fmtclds.hxx>
30#include <frmfmt.hxx>
31#include <cmdid.h>
32#include <view.hxx>
33#include <wrtsh.hxx>
34#include <drawbase.hxx>
35#include <edtwin.hxx>
36#include <swmodule.hxx>
37#include <swundo.hxx>
38#include <SwCapObjType.hxx>
39#include <SwRewriter.hxx>
40#include <strings.hrc>
41
42using namespace ::com::sun::star;
43
44SwDrawBase::SwDrawBase(SwWrtShell* pSwWrtShell, SwEditWin* pWindow, SwView* pSwView) :
45 m_pView(pSwView),
46 m_pSh(pSwWrtShell),
47 m_pWin(pWindow),
48 m_nSlotId(USHRT_MAX),
49 m_bCreateObj(true),
50 m_bInsForm(false)
51{
52 if ( !m_pSh->HasDrawView() )
54}
55
57{
58 if (m_pView->GetWrtShellPtr()) // In the view-dtor could the wrtsh already been deleted...
60}
61
63{
64 bool bReturn = false;
65
66 SdrView *pSdrView = m_pSh->GetDrawView();
67
68 // #i33136#
69 pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
70 pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
71
72 if (rMEvt.IsMod2())
73 {
74 pSdrView->SetCreate1stPointAsCenter(true);
75 pSdrView->SetResizeAtCenter(true);
76 }
77 else
78 {
79 pSdrView->SetCreate1stPointAsCenter(false);
80 pSdrView->SetResizeAtCenter(false);
81 }
82
83 SdrViewEvent aVEvt;
84 SdrHitKind eHit = pSdrView->PickAnything(rMEvt, SdrMouseEventKind::BUTTONDOWN, aVEvt);
85
86 // Only new object, if not in the basic mode (or pure selection mode).
87 if (rMEvt.IsLeft() && !m_pWin->IsDrawAction())
88 {
89 if (IsCreateObj() && (eHit == SdrHitKind::UnmarkedObject || eHit == SdrHitKind::NONE || m_pSh->IsDrawCreate()))
90 {
91 g_bNoInterrupt = true;
92 m_pWin->CaptureMouse();
93
94 m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
95
96 bReturn = m_pSh->BeginCreate(m_pWin->GetSdrDrawMode(), m_aStartPos);
97
99
100 if ( bReturn )
101 m_pWin->SetDrawAction(true);
102 }
103 else if (!pSdrView->IsAction())
104 {
105 // BEZIER-EDITOR
106 m_pWin->CaptureMouse();
107 m_aStartPos = m_pWin->PixelToLogic(rMEvt.GetPosPixel());
108 sal_uInt16 nEditMode = m_pWin->GetBezierMode();
109
110 if (eHit == SdrHitKind::Handle && aVEvt.mpHdl->GetKind() == SdrHdlKind::BezierWeight)
111 {
112 // Drag handle
113 g_bNoInterrupt = true;
114 bReturn = pSdrView->BegDragObj(m_aStartPos, nullptr, aVEvt.mpHdl);
115 m_pWin->SetDrawAction(true);
116 }
117 else if (eHit == SdrHitKind::MarkedObject && nEditMode == SID_BEZIER_INSERT)
118 {
119 // Insert gluepoint
120 g_bNoInterrupt = true;
121 bReturn = pSdrView->BegInsObjPoint(m_aStartPos, rMEvt.IsMod1());
122 m_pWin->SetDrawAction(true);
123 }
124 else if (eHit == SdrHitKind::MarkedObject && rMEvt.IsMod1())
125 {
126 // Select gluepoint
127 if (!rMEvt.IsShift())
128 pSdrView->UnmarkAllPoints();
129
130 bReturn = pSdrView->BegMarkPoints(m_aStartPos);
131 m_pWin->SetDrawAction(true);
132 }
133 else if (eHit == SdrHitKind::MarkedObject && !rMEvt.IsShift() && !rMEvt.IsMod2())
134 {
135 // Move object
136 return false;
137 }
138 else if (eHit == SdrHitKind::Handle)
139 {
140 // Select gluepoint
141 if (pSdrView->HasMarkablePoints() && (!pSdrView->IsPointMarked(*aVEvt.mpHdl) || rMEvt.IsShift()))
142 {
143 SdrHdl* pHdl = nullptr;
144
145 if (!rMEvt.IsShift())
146 {
147 pSdrView->UnmarkAllPoints();
148 pHdl = pSdrView->PickHandle(m_aStartPos);
149 }
150 else
151 {
152 if (pSdrView->IsPointMarked(*aVEvt.mpHdl))
153 {
154 bReturn = pSdrView->UnmarkPoint(*aVEvt.mpHdl);
155 pHdl = nullptr;
156 }
157 else
158 {
159 pHdl = pSdrView->PickHandle(m_aStartPos);
160 }
161 }
162
163 if (pHdl)
164 {
165 g_bNoInterrupt = true;
166 pSdrView->MarkPoint(*pHdl);
167 }
168 }
169 }
170 else
171 {
172 // Select or drag object
173 if (m_pSh->IsObjSelectable(m_aStartPos) && eHit == SdrHitKind::UnmarkedObject)
174 {
175 if (pSdrView->HasMarkablePoints())
176 pSdrView->UnmarkAllPoints();
177
178 g_bNoInterrupt = false;
179 // Use drag in edtwin
180 return false;
181 }
182
183 g_bNoInterrupt = true;
184
185 if (m_pSh->IsObjSelected())
186 {
187 if (!rMEvt.IsShift())
188 {
189 if (!pSdrView->HasMarkablePoints())
190 {
191 bool bUnlockView = !m_pSh->IsViewLocked();
192 m_pSh->LockView( true ); //lock visible section
193 m_pSh->SelectObj(Point(LONG_MAX, LONG_MAX)); // deselect all
194 if( bUnlockView )
195 m_pSh->LockView( false );
196 }
197 else
198 pSdrView->UnmarkAllPoints();
199 }
200 }
201 if (!m_pSh->IsSelFrameMode())
203
204 bReturn = m_pSh->BeginMark(m_aStartPos);
205 if( bReturn )
206 m_pWin->SetDrawAction(true);
207
209 }
210 }
211 }
212 return bReturn;
213}
214
216{
217 SdrView *pSdrView = m_pSh->GetDrawView();
218 Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
219 bool bRet = false;
220
221 if (IsCreateObj() && !m_pWin->IsDrawSelMode() && pSdrView->IsCreateObj())
222 {
223 // #i33136#
224 pSdrView->SetOrtho(doConstructOrthogonal() ? !rMEvt.IsShift() : rMEvt.IsShift());
225 pSdrView->SetAngleSnapEnabled(rMEvt.IsShift());
226
227 m_pSh->MoveCreate(aPnt);
228 bRet = true;
229 }
230 else if (pSdrView->IsAction() || pSdrView->IsInsObjPoint() || pSdrView->IsMarkPoints())
231 {
232 m_pSh->MoveMark(aPnt);
233 bRet = true;
234 }
235
236 return bRet;
237}
238
240{
241 bool bReturn = false;
242 bool bCheckShell = false;
243 bool bAutoCap = false;
244
245 Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
246
247 if (IsCreateObj() && m_pSh->IsDrawCreate() && !m_pWin->IsDrawSelMode())
248 {
249 const SdrObjKind nDrawMode = m_pWin->GetSdrDrawMode();
250 //objects with multiple point may end at the start position
251 bool bMultiPoint = SdrObjKind::PolyLine == nDrawMode ||
252 SdrObjKind::Polygon == nDrawMode ||
253 SdrObjKind::PathLine == nDrawMode ||
254 SdrObjKind::PathFill == nDrawMode ||
255 SdrObjKind::FreehandLine == nDrawMode ||
256 SdrObjKind::FreehandFill == nDrawMode;
257 if(rMEvt.IsRight())
258 {
261 }
262 else
263 {
264 if (SdrObjKind::NewFrame == nDrawMode)
265 {
266 SwRewriter aRewriter;
267
268 aRewriter.AddRule(UndoArg1, SwResId(STR_FRAME));
269 m_pSh->StartUndo(SwUndoId::INSERT, &aRewriter);
270 }
271
272 bool didCreate = m_pSh->EndCreate(SdrCreateCmd::ForceEnd);
273 if(!didCreate && !bMultiPoint)
274 {
275 CreateDefaultObjectAtPosWithSize(aPnt, Size(1000, 1000));
276 }
277
278 if (SdrObjKind::NewFrame == nDrawMode) // Text border inserted
279 {
280 uno::Reference< frame::XDispatchRecorder > xRecorder =
282 if ( xRecorder.is() )
283 {
286 static_cast<sal_uInt16>(RndStdIds::FLY_AT_PARA) ));
287 aReq.AppendItem(SfxPointItem( FN_PARAM_1, m_pSh->GetAnchorObjDiff()));
288 aReq.AppendItem(SvxSizeItem( FN_PARAM_2, m_pSh->GetObjSize()));
289 aReq.Done();
290 }
291 bAutoCap = true;
292 if(m_pWin->GetFrameColCount() > 1)
293 {
295 SwFormatCol aCol(aSet.Get(RES_COL));
296 aCol.Init(m_pWin->GetFrameColCount(), aCol.GetGutterWidth(), aCol.GetWishWidth());
297 aSet.Put(aCol);
298 // Template AutoUpdate
300 if(pFormat && pFormat->IsAutoUpdateOnDirectFormat())
301 m_pSh->AutoUpdateFrame(pFormat, aSet);
302 else
303 m_pSh->SetFlyFrameAttr( aSet );
304 }
305 }
306 if (m_pWin->GetSdrDrawMode() == SdrObjKind::NewFrame)
307 {
308 m_pSh->EndUndo();
309 }
310 }
311
312 bReturn = true;
313
314 EnterSelectMode(rMEvt);
315 }
316 else
317 {
318 SdrView *pSdrView = m_pSh->GetDrawView();
319
320 if (!pSdrView->HasMarkablePoints())
321 {
322 // NO BEZIER_EDITOR
324 && rMEvt.IsLeft())
325 {
326 bReturn = m_pSh->EndMark();
327
328 m_pWin->SetDrawAction(false);
329
330 if (aPnt == m_aStartPos && m_pSh->IsObjSelectable(aPnt))
331 {
332 m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() &&
334
335 if (!m_pSh->IsObjSelected())
336 {
337 m_pView->LeaveDrawCreate(); // Switch to selection mode
338
339 m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
340
341 if (m_pSh->IsSelFrameMode())
343 }
344 m_pView->NoRotate();
345
346 bCheckShell = true; // if necessary turn on BezierShell
347 }
348 else if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
349 {
350 if (m_pSh->IsObjSelectable(aPnt))
351 m_pSh->SelectObj(aPnt, ( rMEvt.IsShift() &&
353 else
354 {
356 if (m_pSh->IsSelFrameMode())
358 }
359 m_pView->NoRotate();
360
361 bReturn = true;
362 }
363 }
364 }
365 else
366 {
367 // BEZIER_EDITOR
368 if ( pSdrView->IsAction() )
369 {
370 if ( pSdrView->IsInsObjPoint() )
371 bReturn = pSdrView->EndInsObjPoint(SdrCreateCmd::ForceEnd);
372 else if (pSdrView->IsMarkPoints() )
373 bReturn = pSdrView->EndMarkPoints();
374 else
375 {
376 pSdrView->EndAction();
377 bReturn = true;
378 }
379 m_pWin->SetDrawAction(false);
380
381 if (aPnt == m_aStartPos)
382 {
383 if (!m_pSh->IsObjSelectable(aPnt))
385 else if (!bReturn)
386 {
387 if (!rMEvt.IsShift())
388 pSdrView->UnmarkAllPoints();
389 m_pSh->SelectObj(aPnt, (rMEvt.IsShift() &&
391 }
392
393 if (!m_pSh->IsObjSelected())
394 {
395 m_pView->LeaveDrawCreate(); // Switch to selection mode
396
397 m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
398
399 if (m_pSh->IsSelFrameMode())
401 }
402 m_pView->NoRotate();
403
404 bCheckShell = true; // if necessary turn on BezierShell
405 }
406 }
407
409
410 if (!m_pSh->IsObjSelected() && !m_pWin->IsDrawAction())
411 {
413 if (m_pSh->IsSelFrameMode())
415
416 m_pView->NoRotate();
417 bReturn = true;
418 }
419 }
420 }
421
422 if (bCheckShell)
423 m_pView->AttrChangedNotify(nullptr); // if necessary turn on BezierShell
424
426 if ( bAutoCap )
427 m_pView->AutoCaption(FRAME_CAP); //Can currently only be FRAME, otherwise convert
428 // to enums
429 return bReturn;
430}
431
432void SwDrawBase::Activate(const sal_uInt16 nSlot)
433{
434 SetSlotId(nSlot);
435 SdrView *pSdrView = m_pSh->GetDrawView();
436
437 pSdrView->SetCurrentObj(m_pWin->GetSdrDrawMode());
438 pSdrView->SetEditMode(false);
439
441 m_pSh->NoEdit();
442}
443
445{
446 SdrView *pSdrView = m_pSh->GetDrawView();
447 pSdrView->SetOrtho(false);
448 pSdrView->SetAngleSnapEnabled(false);
449
450 if (m_pWin->IsDrawAction() && m_pSh->IsDrawCreate())
452
453 m_pWin->SetDrawAction(false);
454
455 if (m_pWin->IsMouseCaptured())
456 m_pWin->ReleaseMouse();
457 g_bNoInterrupt = false;
458
459 if (m_pWin->GetApplyTemplate())
460 m_pWin->SetApplyTemplate(SwApplyTemplate());
461 m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
462}
463
464// Process keyboard events
465
466// If a KeyEvent is processed then the return value is true, otherwise
467// false.
468
470{
472 m_pWin->SetDrawAction(false);
473 m_pWin->ReleaseMouse();
474
475 Deactivate();
476}
477
479{
480 SdrView *pSdrView = m_pSh->GetDrawView();
481 Point aPnt(m_pWin->OutputToScreenPixel(m_pWin->GetPointerPosPixel()));
482 aPnt = m_pWin->PixelToLogic(m_pWin->ScreenToOutputPixel(aPnt));
483 PointerStyle aPointTyp = pSdrView->GetPreferredPointer(aPnt, m_pSh->GetOut());
484 m_pWin->SetPointer(aPointTyp);
485}
486
487// If necessary switch into selection mode
488
490{
491 m_pWin->SetDrawAction(false);
492
493 if (m_pSh->IsObjSelected() || m_pWin->IsDrawAction())
494 return;
495
496 Point aPnt(m_pWin->PixelToLogic(rMEvt.GetPosPixel()));
497
498 if (m_pSh->IsObjSelectable(aPnt))
499 {
500 m_pSh->SelectObj(aPnt);
501 if (rMEvt.GetModifier() == KEY_SHIFT || !m_pSh->IsObjSelected())
502 {
503 m_pView->LeaveDrawCreate(); // Switch to selection mode
504
505 m_pSh->GetView().GetViewFrame().GetBindings().Invalidate(SID_INSERT_DRAW);
506 }
507 }
508 else
509 {
511 if (m_pSh->IsSelFrameMode())
513 }
514 m_pView->NoRotate();
515}
516
518{
519 constexpr tools::Long constTwips_3cm = o3tl::toTwips(3, o3tl::Length::cm);
520
521 Point aStartPos = GetDefaultCenterPos();
522 Point aEndPos(aStartPos);
523 aStartPos.AdjustX(-constTwips_3cm);
524 aStartPos.AdjustY(-constTwips_3cm);
525 aEndPos.AdjustX(constTwips_3cm);
526 aEndPos.AdjustY(constTwips_3cm);
527 tools::Rectangle aRect(aStartPos, aEndPos);
528 m_pSh->CreateDefaultShape(m_pWin->GetSdrDrawMode(), aRect, m_nSlotId);
529}
530
532{
533 aPos.AdjustX(-sal_Int32(aSize.getWidth() / 2));
534 aPos.AdjustY(-sal_Int32(aSize.getHeight() / 2));
535
536 SdrView* sdrView = m_pView->GetDrawView();
537 SdrPageView *pPV = sdrView->GetSdrPageView();
538
539 if(sdrView->IsSnapEnabled())
540 aPos = sdrView->GetSnapPos(aPos, pPV);
541
542 ::tools::Rectangle aNewObjectRectangle(aPos, aSize);
543 m_pSh->CreateDefaultShape(m_pWin->GetSdrDrawMode(), aNewObjectRectangle, m_nSlotId);
544}
545
547{
548 Size aDocSz(m_pSh->GetDocSize());
549
550 SwRect aVisArea(m_pSh->VisArea());
552 {
553 aVisArea = SwRect(m_pSh->getLOKVisibleArea());
554 aVisArea.Intersection(SwRect(Point(), aDocSz));
555 }
556
557 Point aCenter = aVisArea.Center();
558 // To increase the chance that aCenter actually falls somewhere on a page (rather than on the
559 // background between pages), keep it centered horizontally for the "Single-page view"
560 // (GetViewLayoutColumns() == 1) and "Book view" (GetViewLayoutColumns() == 2) cases that
561 // display the pages centered on the background:
562 if (aVisArea.Width() > aDocSz.Width() && m_pSh->GetViewOptions()->GetViewLayoutColumns() == 0)
563 aCenter.setX(aDocSz.Width() / 2 + aVisArea.Left());
564 if (aVisArea.Height() > aDocSz.Height())
565 aCenter.setY(aDocSz.Height() / 2 + aVisArea.Top());
566
567 return aCenter;
568}
569
570// #i33136#
572{
573 return ( m_nSlotId == SID_DRAW_XPOLYGON || m_nSlotId == SID_DRAW_XPOLYGON_NOFILL || m_nSlotId == SID_DRAW_XLINE );
574}
575
576/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
@ FRAME_CAP
@ UndoArg1
Definition: SwRewriter.hxx:29
bool IsMod1() const
bool IsMod2() const
sal_uInt16 GetModifier() const
bool IsRight() const
const Point & GetPosPixel() const
bool IsLeft() const
bool IsShift() const
void setX(tools::Long nX)
void setY(tools::Long nY)
tools::Long AdjustY(tools::Long nVertMove)
tools::Long AdjustX(tools::Long nHorzMove)
bool IsCreateObj() const
void SetCreate1stPointAsCenter(bool bOn)
void SetEditMode(SdrViewEditMode eMode)
virtual bool IsAction() const override
void SetCurrentObj(SdrObjKind nIdent, SdrInventor nInvent=SdrInventor::Default)
virtual void EndAction() override
virtual bool BegDragObj(const Point &rPnt, OutputDevice *pOut, SdrHdl *pHdl, short nMinMov=-3, SdrDragMethod *pForcedMeth=nullptr)
bool IsInsObjPoint() const
void SetResizeAtCenter(bool bOn)
bool BegInsObjPoint(const Point &rPnt, bool bNewObj)
bool EndInsObjPoint(SdrCreateCmd eCmd)
SdrHdlKind GetKind() const
SdrHdl * PickHandle(const Point &rPnt) const
bool EndMarkPoints()
bool IsMarkPoints() const
bool BegMarkPoints(const Point &rPnt, bool bUnmark=false)
bool IsMarkObj() const
virtual bool MarkPoint(SdrHdl &rHdl, bool bUnmark=false)
bool UnmarkAllPoints()
virtual bool HasMarkablePoints() const
bool UnmarkPoint(SdrHdl &rHdl)
bool IsPointMarked(const SdrHdl &rHdl) const
SdrPageView * GetSdrPageView() const
void SetOrtho(bool bOn)
void SetAngleSnapEnabled(bool bOn)
bool IsSnapEnabled() const
Point GetSnapPos(const Point &rPnt, const SdrPageView *pPV) const
SdrHitKind PickAnything(const MouseEvent &rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent &rVEvt) const
PointerStyle GetPreferredPointer(const Point &rMousePos, const OutputDevice *pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const
void Invalidate(sal_uInt16 nId)
const css::uno::Reference< css::frame::XDispatchRecorder > & GetRecorder() const
const SfxPoolItem * Put(const SfxPoolItem &rItem, sal_uInt16 nWhich)
const SfxPoolItem & Get(sal_uInt16 nWhich, bool bSrchInParent=true) const
void AppendItem(const SfxPoolItem &)
void Done(bool bRemove=false)
SfxItemPool & GetPool() const
SfxBindings & GetBindings()
SfxViewFrame & GetViewFrame() const
constexpr tools::Long getHeight() const
constexpr tools::Long Height() const
constexpr tools::Long getWidth() const
constexpr tools::Long Width() const
SwDrawBase(SwWrtShell *pSh, SwEditWin *pWin, SwView *pView)
Definition: drawbase.cxx:44
virtual void Activate(const sal_uInt16 nSlotId)
Definition: drawbase.cxx:432
SwWrtShell * m_pSh
Definition: drawbase.hxx:36
SwView * m_pView
Definition: drawbase.hxx:35
void BreakCreate()
Definition: drawbase.cxx:469
VclPtr< SwEditWin > m_pWin
Definition: drawbase.hxx:37
virtual ~SwDrawBase()
Definition: drawbase.cxx:56
void SetSlotId(sal_uInt16 nSlot)
Definition: drawbase.hxx:59
virtual void CreateDefaultObjectAtPosWithSize(Point aPos, Size aSize)
Definition: drawbase.cxx:531
virtual void Deactivate()
Definition: drawbase.cxx:444
virtual bool MouseButtonDown(const MouseEvent &rMEvt)
Definition: drawbase.cxx:62
virtual bool doConstructOrthogonal() const
Definition: drawbase.cxx:571
Point m_aStartPos
Definition: drawbase.hxx:38
void SetDrawPointer()
Definition: drawbase.cxx:478
virtual bool MouseButtonUp(const MouseEvent &rMEvt)
Definition: drawbase.cxx:239
Point GetDefaultCenterPos() const
Definition: drawbase.cxx:546
bool IsCreateObj() const
Definition: drawbase.hxx:51
sal_uInt16 m_nSlotId
Definition: drawbase.hxx:39
bool MouseMove(const MouseEvent &rMEvt)
Definition: drawbase.cxx:215
virtual void CreateDefaultObject()
Definition: drawbase.cxx:517
void EnterSelectMode(const MouseEvent &rMEvt)
Definition: drawbase.cxx:489
SwUndoId StartUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Undo: set up Undo parenthesis, return nUndoId of this parenthesis.
Definition: edws.cxx:223
SwUndoId EndUndo(SwUndoId eUndoId=SwUndoId::EMPTY, const SwRewriter *pRewriter=nullptr)
Closes parenthesis of nUndoId, not used by UI.
Definition: edws.cxx:234
Window class for the Writer edit area, this is the one handling mouse and keyboard events and doing t...
Definition: edtwin.hxx:61
bool SetFlyFrameAttr(SfxItemSet &rSet)
Definition: fefly1.cxx:1103
Point GetAnchorObjDiff() const
Methods for status line.
Definition: feshview.cxx:2283
bool BeginMark(const Point &rPos)
Functions for Rubberbox, it selects Draw-Objects.
Definition: feshview.cxx:2113
bool EndMark()
Definition: feshview.cxx:2152
Size GetObjSize() const
Definition: feshview.cxx:2270
SwFrameFormat * GetSelectedFrameFormat() const
If frame then frame style, else 0.
Definition: fefly1.cxx:1213
bool IsObjSelectable(const Point &rPt)
The following two methods return enum SdrHdlKind.
Definition: feshview.cxx:1258
bool BeginCreate(SdrObjKind eSdrObjectKind, const Point &rPos)
Process of creating draw objects.
Definition: feshview.cxx:1666
bool EndCreate(SdrCreateCmd eSdrCreateCmd)
Definition: feshview.cxx:1719
void CreateDefaultShape(SdrObjKind eSdrObjectKind, const tools::Rectangle &rRect, sal_uInt16 nSlotId)
Definition: feshview.cxx:2916
bool IsDrawCreate() const
Definition: feshview.cxx:2108
void BreakCreate()
Definition: feshview.cxx:2101
size_t IsObjSelected() const
Definition: feshview.cxx:1125
bool SelectObj(const Point &rSelPt, sal_uInt8 nFlag=0, SdrObject *pObj=nullptr)
If an object has been given, exactly this object is selected (instead of searching over position).
Definition: feshview.cxx:161
void MoveCreate(const Point &rPos)
Definition: feshview.cxx:1708
void MoveMark(const Point &rPos)
Definition: feshview.cxx:2134
sal_uInt16 GetGutterWidth(bool bMin=false) const
Definition: atrfrm.cxx:918
sal_uInt16 GetWishWidth() const
Definition: fmtclds.hxx:122
void Init(sal_uInt16 nNumCols, sal_uInt16 nGutterWidth, sal_uInt16 nAct)
This function allows to (repeatedly) initialize the columns.
Definition: atrfrm.cxx:969
bool IsAutoUpdateOnDirectFormat() const
Query / set m_bAutoUpdateOnDirectFormat-flag.
Definition: format.hxx:188
Style of a layout element.
Definition: frmfmt.hxx:72
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SwRect & Intersection(const SwRect &rRect)
Definition: swrect.cxx:57
void Height(tools::Long nNew)
Definition: swrect.hxx:193
void Top(const tools::Long nTop)
Definition: swrect.hxx:206
Point Center() const
Definition: swrect.hxx:338
void Left(const tools::Long nLeft)
Definition: swrect.hxx:197
void Width(tools::Long nNew)
Definition: swrect.hxx:189
void AddRule(SwUndoArg eWhat, const OUString &rWith)
Definition: SwRewriter.cxx:25
sal_uInt16 GetViewLayoutColumns() const
Definition: viewopt.hxx:645
bool IsViewLocked() const
Definition: viewsh.hxx:490
vcl::RenderContext * GetOut() const
Definition: viewsh.hxx:365
bool HasDrawView() const
Definition: vnew.cxx:371
const SwViewOption * GetViewOptions() const
Definition: viewsh.hxx:452
const tools::Rectangle & getLOKVisibleArea() const
The visible area in the client (set by setClientVisibleArea).
Definition: viewsh.hxx:279
Size GetDocSize() const
Definition: viewsh.cxx:2190
void MakeDrawView()
Definition: vnew.cxx:376
const SwRect & VisArea() const
Definition: viewsh.cxx:642
void LockView(bool b)
Definition: viewsh.hxx:491
SdrView * GetDrawView()
Definition: vnew.cxx:386
Definition: view.hxx:146
void AutoCaption(const sal_uInt16 nType, const SvGlobalName *pOleId=nullptr)
Definition: viewdlg2.cxx:183
virtual SdrView * GetDrawView() const override
Definition: viewdraw.cxx:621
void NoRotate()
Definition: viewdraw.cxx:439
SwWrtShell * GetWrtShellPtr() const
Definition: view.hxx:424
void LeaveDrawCreate()
Definition: view.hxx:549
Used by the UI to modify the document model.
Definition: wrtsh.hxx:97
bool IsSelFrameMode() const
Definition: wrtsh.hxx:177
void EnterSelFrameMode(const Point *pStartDrag=nullptr)
Definition: select.cxx:711
void LeaveSelFrameMode()
Definition: select.cxx:729
void AutoUpdateFrame(SwFrameFormat *pFormat, const SfxItemSet &rStyleSet)
Definition: wrtsh1.cxx:1945
void NoEdit(bool bHideCursor=true)
Definition: wrtsh1.cxx:182
const SwView & GetView() const
Definition: wrtsh.hxx:443
#define FN_INSERT_FRAME
Definition: cmdid.h:238
#define SW_ADD_SELECT
Definition: fesh.hxx:166
constexpr TypedWhichId< SwFormatCol > RES_COL(115)
constexpr sal_uInt16 KEY_SHIFT
const long LONG_MAX
constexpr auto toTwips(N number, Length from)
long Long
PointerStyle
SdrHdl * mpHdl
SdrHitKind
SdrObjKind
OUString SwResId(TranslateId aId)
Definition: swmodule.cxx:168
bool g_bNoInterrupt
Definition: swmodule.cxx:115