LibreOffice Module sw (master) 1
fesh.hxx
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#ifndef INCLUDED_SW_INC_FESH_HXX
20#define INCLUDED_SW_INC_FESH_HXX
21
22#include <com/sun/star/text/RelOrientation.hpp>
23#include <com/sun/star/text/XPasteListener.hpp>
24
25#include <svx/svdobj.hxx>
26#include "swdllapi.h"
27#include "editsh.hxx"
28#include "flyenum.hxx"
29
30#include <svx/svdtypes.hxx>
31#include <sot/formats.hxx>
32#include <rtl/ustring.hxx>
35
36#include <vector>
37#include <memory>
38
39namespace editeng { class SvxBorderLine; }
40
41class SwFlyFrame;
42class SwTabCols;
43class SvxBrushItem;
46class SwFrame;
49class Outliner;
50class SwFrameFormat;
51struct SwSortOptions;
52class SdrMarkList;
53enum class RndStdIds;
54
55namespace svx
56{
57 class ISdrObjectFilter;
58}
59namespace com::sun::star::embed { class XEmbeddedObject; }
60
61// return values for GetFrameType() and GetSelFrameType().
63enum class FrameTypeFlags {
64 NONE = 0,
65 PAGE = 1,
66 HEADER = 2,
67 FOOTER = 4,
68 BODY = 8,
69 COLUMN = 16,
70 TABLE = 32,
71 FLY_FREE = 64,
72 FLY_ATCNT = 128,
73 FLY_INCNT = 256,
74 FOOTNOTE = 512,
75 FTNPAGE = 1024,
76 FLY_ANY = 2048,
77 DRAWOBJ = 4096,
78 COLSECT = 8192,
79 COLSECTOUTTAB = 16384
80};
81namespace o3tl
82{
83 template<> struct typed_flags<FrameTypeFlags> : is_typed_flags<FrameTypeFlags, 0x7fff> {};
84}
85
87enum class GotoObjFlags
88{
89 NONE = 0,
90 DrawControl = 1,
91 DrawSimple = 2,
93 FlyFrame = 4,
94 FlyGrf = 8,
95 FlyOLE = 16,
97 Any = FlyAny | DrawAny,
98};
99namespace o3tl
100{
101 template<> struct typed_flags<GotoObjFlags> : is_typed_flags<GotoObjFlags, 31> {};
102}
103
106{
107 NONE = 0,
108 Content = 1,
109 Size = 2,
110 Pos = 4,
111 Parent = 8,
112 Fixed = 16,
114};
115namespace o3tl
116{
117 template<> struct typed_flags<FlyProtectFlags> : is_typed_flags<FlyProtectFlags, 31> {};
118}
119
120// For figuring out contents by position (D&D)
122{
130
134
135//For GetAnyCurRect
136enum class CurRectType
137{
138 Page,
139 PageCalc,
140 PagePrt,
141 Frame,
144 Section,
146 SectionPrt,
148 PagesArea
149};
150
152{
155 SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ) {}
156};
157
158enum class SwPasteSdr
159{
160 NONE = 0,
161 Insert = 1,
162 Replace = 2,
163 SetAttr = 3
164};
165
166#define SW_ADD_SELECT 1
167#define SW_ENTER_GROUP 2
168#define SW_LEAVE_FRAME 4
170#define SW_ALLOW_TEXTBOX 8
171
172enum class SwMove
173{
174 UP = 0,
175 DOWN = 1,
176 LEFT = 2,
177 RIGHT = 3
178};
179
180// return values for WhichMouseTabCol
181enum class SwTab
182{
183 COL_NONE = 0,
184 COL_HORI = 1,
185 COL_VERT = 2,
186 ROW_HORI = 3,
187 ROW_VERT = 4,
188 SEL_HORI = 5,
189 SEL_HORI_RTL = 6,
190 ROWSEL_HORI = 7,
191 ROWSEL_HORI_RTL = 8,
192 COLSEL_HORI = 9,
193 SEL_VERT = 10,
194 ROWSEL_VERT = 11,
195 COLSEL_VERT = 12
196};
197
199struct SwColCache;
200
202{
203private:
204 mutable std::unique_ptr<SwColCache> m_pColumnCache;
205 mutable std::unique_ptr<SwColCache> m_pRowCache;
206 std::unique_ptr<SdrDropMarkerOverlay> m_pChainTo;
207 std::unique_ptr<SdrDropMarkerOverlay> m_pChainFrom;
214
215 SAL_DLLPRIVATE SwFlyFrame *FindFlyFrame( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const;
216
218 SAL_DLLPRIVATE void EndAllActionAndCall();
219
220 SAL_DLLPRIVATE void ScrollTo( const Point &rPt );
221
222 SAL_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId );
223
226 SAL_DLLPRIVATE const SwFrame *GetBox( const Point &rPt, bool* pbRow = nullptr, bool* pbCol = nullptr ) const;
227
228 // 0 == not in any column.
229 SAL_DLLPRIVATE static sal_uInt16 GetCurColNum_( const SwFrame *pFrame,
230 SwGetCurColNumPara* pPara );
231
232 SAL_DLLPRIVATE void GetTabCols_(SwTabCols &rToFill, const SwFrame *pBox) const;
233 SAL_DLLPRIVATE void GetTabRows_(SwTabCols &rToFill, const SwFrame *pBox) const;
234
235 SAL_DLLPRIVATE bool ImpEndCreate();
236
238 SAL_DLLPRIVATE bool CopyDrawSel( SwFEShell& rDestShell, const Point& rSttPt,
239 const Point& rInsPt, bool bIsMove,
240 bool bSelectInsert );
241
244 SAL_DLLPRIVATE const SdrMarkList* GetMarkList_() const;
245
246 SAL_DLLPRIVATE bool CheckHeadline( bool bRepeat ) const;
247
248 using SwEditShell::Copy;
249
250public:
251
253
254 SwFEShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt );
255 SwFEShell( SwEditShell& rShell, vcl::Window *pWin );
256 virtual ~SwFEShell() override;
257
259 void Copy( SwDoc& rClpDoc, const OUString* pNewClpText = nullptr );
260 bool Paste( SwDoc& rClpDoc, bool bNestedTable = false );
261
263 void PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
264
266 bool Copy( SwFEShell&, const Point& rSttPt, const Point& rInsPt,
267 bool bIsMove = false, bool bSelectInsert = true );
268
269 void SelectFlyFrame( SwFlyFrame& rFrame );
270
272 const SwFrameFormat* IsFlyInFly();
273
276 bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = nullptr );
277 void DelSelectedObj();
278
282 void SelectionToTop ( bool bTop = true );
283 void SelectionToBottom( bool bBottom = true );
284
285 SdrLayerID GetLayerId() const;
286 void SelectionToHeaven();
287 void SelectionToHell();
288
291 bool IsObjSelectable( const Point& rPt );
293 SdrObject* GetObjAt(const Point& rPt);
294 bool IsInsideSelectedObj( const Point& rPt );
298 bool ShouldObjectBeSelected(const Point& rPt);
299
300 bool MoveAnchor( SwMove nDir );
301
305 bool IsDirectlyInSection() const;
306
311 FrameTypeFlags GetFrameType( const Point *pPt, bool bStopAtFly ) const;
312 FrameTypeFlags GetSelFrameType() const; //Selection (Drawing)
313
317 bool IsSelContainsControl() const;
318
319 static ObjCntType GetObjCntType( const SdrObject& rObj );
320 ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
321 ObjCntType GetObjCntTypeOfSelection() const;
322
324 SwRect GetObjRect() const;
325
327 SwRect GetFlyRect() const;
332 void CalcBoundRect( SwRect& _orRect,
333 const RndStdIds _nAnchorId,
334 const sal_Int16 _eHoriRelOrient = css::text::RelOrientation::FRAME,
335 const sal_Int16 _eVertRelOrient = css::text::RelOrientation::FRAME,
336 const SwFormatAnchor* _pToCharContentPos = nullptr,
337 const bool _bFollowTextFlow = false,
338 bool _bMirror = false,
339 Point* _opRef = nullptr,
340 Size* _opPercent = nullptr,
341 const SwFormatFrameSize* pFormatFrameSize = nullptr ) const;
342
344 void SetObjRect( const SwRect& rRect );
345
346 void BeginDrag( const Point *pPt, bool bProp );
347 void Drag ( const Point *pPt, bool bProp );
348 void EndDrag ();
349 void BreakDrag();
350
352 Point GetAnchorObjDiff() const;
353 Point GetObjAbsPos() const;
354 Size GetObjSize() const;
355
357 void GetPageObjs( std::vector<SwFrameFormat*>& rFillArr );
358 void SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr );
359
361 virtual void MakeSelVisible() override;
362
365 const SwFrameFormat* GetFormatFromObj( const Point& rPt, SwRect** pRectToFill = nullptr ) const;
366
368 const SwFrameFormat* GetFormatFromAnyObj( const Point& rPt ) const;
369
371 FlyProtectFlags IsSelObjProtected( FlyProtectFlags eType ) const;
372
375 const Graphic *GetGrfAtPos( const Point &rDocPos,
376 OUString &rName, bool &rbLink ) const;
377
378 OUString GetObjTitle() const;
379 void SetObjTitle( const OUString& rTitle );
380 OUString GetObjDescription() const;
381 void SetObjDescription( const OUString& rDescription );
382 bool IsObjDecorative() const;
383 void SetObjDecorative(bool isDecorative);
384
385 bool IsFrameSelected() const;
386 bool GetFlyFrameAttr( SfxItemSet &rSet ) const;
387 bool SetFlyFrameAttr( SfxItemSet &rSet );
388 static SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
389 void ResetFlyFrameAttr( const SfxItemSet* pSet );
390 const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false,
391 SwFrameFormat *pParent = nullptr );
392 void SetFlyPos( const Point &rAbsPos);
393 Point FindAnchorPos( const Point &rAbsPos, bool bMoveIt = false );
394
398 bool IsFrameVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const;
399
400 SwFrameFormat* GetSelectedFrameFormat() const;
401 void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point const * pDocPos = nullptr );
402
403 // Get selected fly
404 SwFlyFrame* GetSelectedFlyFrame() const;
405
406 // Get current fly in which the cursor is positioned
407 SwFlyFrame* GetCurrFlyFrame(const bool bCalcFrame = true) const;
408
409 // Get selected fly, but if none Get current fly in which the cursor is positioned
410 SwFlyFrame* GetSelectedOrCurrFlyFrame() const;
411
413 SwFrameFormat* WizardGetFly();
414
417 { return GotoObj( true, eType ); }
419 { return GotoObj( false, eType); }
420
422 size_t GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes = false ) const;
423 const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes = false) const;
424
425 std::vector<SwFrameFormat const*> GetFlyFrameFormats(
426 FlyCntType eType, bool bIgnoreTextBoxes);
427
429 const SwFrameFormat* SelFlyGrabCursor();
430
432 const SwFrameFormat* GetFlyFrameFormat() const;
433 SwFrameFormat* GetFlyFrameFormat();
434
439 Size RequestObjectResize( const SwRect &rRect, const css::uno::Reference < css::embed::XEmbeddedObject >& );
440
442 virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
443
449 const SwRect *pFlyPrtRect = nullptr,
450 const SwRect *pFlyFrameRect = nullptr,
451 const bool bNoTextFramePrtAreaChanged = false ) = 0;
452
456 const SwRect &rPrt,
457 const SwRect &rFrame ) = 0;
458
460 bool IsCheckForOLEInCaption() const { return m_bCheckForOLEInCaption; }
461 void SetCheckForOLEInCaption( bool bFlag ) { m_bCheckForOLEInCaption = bFlag; }
462
464 void SetFlyName( const OUString& rName );
465 OUString GetFlyName() const;
466
468 css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef() const;
469
471 OUString GetUniqueGrfName() const;
472 OUString GetUniqueOLEName() const;
473 OUString GetUniqueFrameName() const;
474
476 bool GotoFly( const OUString& rName, FlyCntType eType,
477 bool bSelFrame );
478
480 const SwFrameFormat* IsURLGrfAtPos( const Point& rPt, OUString* pURL = nullptr,
481 OUString *pTargetFrameName = nullptr,
482 OUString *pURLDescription = nullptr ) const;
483
486 SwChainRet Chainable( SwRect &rRect, const SwFrameFormat &rSource, const Point &rPt ) const;
487 SwChainRet Chain( SwFrameFormat &rSource, const Point &rPt );
488 void Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest );
489 void Unchain( SwFrameFormat &rFormat );
490 void HideChainMarker();
491 void SetChainMarker();
492
493 Size GetGraphicDefaultSize() const;
494
496 void CheckUnboundObjects();
497
499 bool GetObjAttr( SfxItemSet &rSet ) const;
500 void SetObjAttr( const SfxItemSet &rSet );
501
502 const SdrObject* GetBestObject(bool bNext, GotoObjFlags eType, bool bFlat = true,
503 const svx::ISdrObjectFilter* pFilter = nullptr,
504 bool* pbWrapped = nullptr);
505 bool GotoObj( bool bNext, GotoObjFlags eType = GotoObjFlags::DrawAny);
506
508 void SetDragMode( SdrDragMode eSdrDragMode );
509
510 // Get the current drag mode
511 SdrDragMode GetDragMode() const;
512
513 // Start cropping the selected image
514 void StartCropImage();
515
516 // RotGrfFlyFrame: check if RotationMode is possible
517 bool IsRotationOfSwGrfNodePossible() const;
518
519 size_t IsObjSelected() const;
520 bool IsObjSelected( const SdrObject& rObj ) const;
521 bool IsObjSameLevelWithMarked(const SdrObject* pObj) const;
522 const SdrMarkList* GetMarkList() const{ return GetMarkList_(); };
523
524 void EndTextEdit();
525
528 RndStdIds GetAnchorId() const;
529
535 bool BeginCreate( SdrObjKind eSdrObjectKind, const Point &rPos );
536 bool BeginCreate( SdrObjKind eSdrObjectKind, SdrInventor eObjInventor, const Point &);
537 void MoveCreate ( const Point &rPos );
538 bool EndCreate ( SdrCreateCmd eSdrCreateCmd );
539 void BreakCreate();
540 bool IsDrawCreate() const;
541 void CreateDefaultShape(SdrObjKind eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId);
542
544 bool BeginMark( const Point &rPos );
545 void MoveMark ( const Point &rPos );
546 bool EndMark ();
547
549 bool IsGroupSelected(bool bAllowDiagams);
550 void GroupSelection();
551 void UnGroupSelection();
554 bool IsGroupAllowed() const;
555 bool IsUnGroupAllowed() const;
556
557 void MirrorSelection( bool bHorizontal );
558
562 void ChgAnchor( RndStdIds eAnchorId, bool bSameOnly = false,
563 bool bPosCorr = true );
564
565 bool SetDrawingAttr( SfxItemSet &rSet );
566
569 bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const;
570
571 void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt );
572 bool Paste( const Graphic &rGrf, const OUString& rURL );
573
575
576 bool IsAlignPossible() const;
577 void SetCalcFieldValueHdl(Outliner* pOutliner);
578
579 void Insert(const OUString& rGrfName,
580 const OUString& rFltName,
581 const Graphic* pGraphic,
582 const SfxItemSet* pFlyAttrSet );
583
585 void InsertDrawObj( SdrObject& rDrawObj,
586 const Point& rInsertPosition );
587
588 void ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf );
589
590 // --> #i972#
593 void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj );
594
596 void AlignAllFormulasToBaseline();
597
599 Point GetContentPos( const Point& rPoint, bool bNext ) const;
600
602 Point GetRelativePagePosition(const Point& rDocPos);
603
605 void ShellLoseFocus();
606 void ShellGetFocus();
607
609 void ChgCurPageDesc( const SwPageDesc& );
610 size_t GetCurPageDesc( const bool bCalcFrame = true ) const;
611 size_t GetMousePageDesc( const Point &rPt ) const;
612 size_t GetPageDescCnt() const;
613 SwPageDesc* FindPageDescByName( const OUString& rName,
614 bool bGetFromPool = false,
615 size_t* pPos = nullptr );
616
617 const SwPageDesc& GetPageDesc( size_t i ) const;
618 void ChgPageDesc( size_t i, const SwPageDesc& );
621 const SwPageDesc* GetSelectedPageDescs() const;
622
623 const SwRect& GetAnyCurRect( CurRectType eType,
624 const Point* pPt = nullptr,
625 const css::uno::Reference < css::embed::XEmbeddedObject >& =
626 css::uno::Reference < css::embed::XEmbeddedObject >() ) const;
627
629 sal_uInt16 GetPageNumber( const Point &rPoint ) const;
630 bool GetPageNumber( tools::Long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const;
631
632 SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&,
633 SfxItemSet* pFlyAttrSet );
634 bool FinishOLEObj();
635
636 void GetTableAttr( SfxItemSet & ) const;
637 void SetTableAttr( const SfxItemSet & );
638
639 bool HasWholeTabSelection() const;
640
642 bool HasBoxSelection() const;
643
644 void InsertRow( sal_uInt16 nCnt, bool bBehind );
645 void InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end.
646 bool DeleteCol();
647 void DeleteTable();
648 bool DeleteRow(bool bCompleteTable = false);
649
650 SwTable::SearchType GetTableInsertMode() const { return m_eTableInsertMode; }
651 void SetTableInsertMode( SwTable::SearchType eFlag ) { m_eTableInsertMode = eFlag; }
652
653 bool GetTableCopied() const { return m_bTableCopied; }
654 void SetTableCopied( bool bCopied ) { m_bTableCopied = bCopied; }
655
656 bool DeleteTableSel();
657
658 TableMergeErr MergeTab();
661 void SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight );
662 bool Sort(const SwSortOptions&); // sorting
663
664 void SetRowHeight( const SwFormatFrameSize &rSz );
665
667 std::unique_ptr<SwFormatFrameSize> GetRowHeight() const;
668
669 void SetRowSplit( const SwFormatRowSplit &rSz );
670 std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
671
672 void SetBoxAlign( sal_uInt16 nOrient );
673 sal_uInt16 GetBoxAlign() const;
674
675 bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false );
676
677 void SetTabBorders( const SfxItemSet& rSet );
678 void GetTabBorders( SfxItemSet& rSet) const;
679 void SetTabLineStyle(const Color* pColor, bool bSetLine = false, const editeng::SvxBorderLine* pBorderLine = nullptr);
680
681 void SetTabBackground( const SvxBrushItem &rNew );
682 void GetTabBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
683
684 void SetBoxBackground( const SvxBrushItem &rNew );
685 bool GetBoxBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
686
687 void SetBoxDirection( const SvxFrameDirectionItem& rNew );
688 bool GetBoxDirection( std::unique_ptr<SvxFrameDirectionItem>& rToFill ) const;
689
690 void SetRowBackground( const SvxBrushItem &rNew );
691 bool GetRowBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
692
693 SwTab WhichMouseTabCol( const Point &rPt ) const;
694 void GetTabCols( SwTabCols &rToFill ) const;
695 void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly );
696 void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
697 void SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
698 const Point &rPt );
699
701 bool SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag );
702
703 void GetTabRows( SwTabCols &rToFill ) const;
704 void SetTabRows( const SwTabCols &rNew, bool bCurColOnly );
705 void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
706 void SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt );
707
708 void ProtectCells();
710 void UnProtectCells();
711 void UnProtectTables();
712 bool HasTableAnyProtection( const OUString* pTableName,
713 bool* pFullTableProtection );
714 bool CanUnProtectCells() const;
715
716 sal_uInt16 GetRowsToRepeat() const;
717 void SetRowsToRepeat( sal_uInt16 nNumOfRows );
718 sal_uInt16 GetVirtPageNum() const;
719
722 sal_uInt16 GetRowSelectionFromTop() const;
723
724 bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
725 bool IsInHeadline() const { return CheckHeadline( false ); }
726
727 void AdjustCellWidth( const bool bBalance, const bool bNoShrink );
728
730 bool IsAdjustCellWidthAllowed( bool bBalance = false ) const;
731
733 void SetTableStyle(const OUString& rStyleName);
734 bool SetTableStyle(const SwTableAutoFormat& rNew);
735
740 bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool bResetDirect = false, OUString const* pStyleName = nullptr);
741
742 bool GetTableAutoFormat( SwTableAutoFormat& rGet );
743
744 void SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff );
745
746 void GetAutoSum( OUString& rFormula ) const;
747
750 sal_uInt16 GetPhyPageNum() const;
751
752 void SetNewPageOffset( sal_uInt16 nOffset );
753 void SetPageOffset( sal_uInt16 nOffset );
754 sal_uInt16 GetPageOffset() const;
755
756 void InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
757 const OUString& rNumberSeparator,
758 const bool bBefore, const sal_uInt16 nId,
759 const OUString& rCharacterStyle,
760 const bool bCpyBrd );
761
763 sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = nullptr ) const; //0 == not in any column.
764 sal_uInt16 GetCurMouseColNum( const Point &rPt ) const;
765 size_t GetCurTabColNum() const; //0 == not in any table.
766 size_t GetCurMouseTabColNum( const Point &rPt ) const;
767 sal_uInt16 GetCurOutColNum() const;
768
769 bool IsColRightToLeft() const;
770 bool IsTableRightToLeft() const;
771 bool IsMouseTableRightToLeft( const Point &rPt ) const;
772 bool IsTableVertical() const;
773
774 bool IsLastCellInRow() const;
775
777 tools::Long GetSectionWidth( SwFormat const & rFormat ) const;
778
779 void GetConnectableFrameFormats
780 (SwFrameFormat & rFormat, const OUString & rReference, bool bSuccessors,
781 std::vector< OUString > & aPrevPageVec,
782 std::vector< OUString > & aThisPageVec,
783 std::vector< OUString > & aNextPageVec,
784 std::vector< OUString > & aRestVec);
785
796 Color GetShapeBackground() const;
797
807 bool IsShapeDefaultHoriTextDirR2L() const;
808
809 void ParkCursorInTab();
810
811 SwTextNode * GetNumRuleNodeAtPos(const Point &rPot);
812 bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
813
814 static bool IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode,
815 const Point& _rDocPos );
816
818 static void SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, sal_uInt16 nSlotId);
819
820 SAL_DLLPRIVATE void ClearColumnRowCache(SwTabFrame const*);
821};
822
823void ClearFEShellTabCols(SwDoc & rDoc, SwTabFrame const*const pFrame);
824
825#endif
826
827/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
void ShellGetFocus()
Definition: crsrsh.cxx:2758
void ShellLoseFocus()
Definition: crsrsh.cxx:2751
virtual void MakeSelVisible()
show the current selected "object"
Definition: crsrsh.cxx:3392
Definition: doc.hxx:197
void Insert(sal_Unicode, bool bOnlyCurrCursor=false)
Edit (all selected ranges).
Definition: editsh.cxx:62
bool Copy(SwEditShell &rDestShell)
Copy content of all ranges at current position of cursor to given Shell.
Definition: eddel.cxx:185
std::unique_ptr< SwColCache > m_pColumnCache
Definition: fesh.hxx:204
SwTable::SearchType m_eTableInsertMode
insert table rows or columns instead of overwriting the existing table cells
Definition: fesh.hxx:211
bool IsInRepeatedHeadline() const
Definition: fesh.hxx:724
bool GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
Definition: fesh.hxx:416
std::unique_ptr< SwColCache > m_pRowCache
Definition: fesh.hxx:205
bool m_bTableCopied
table copied to the clipboard by the last private copy
Definition: fesh.hxx:213
void SetTableInsertMode(SwTable::SearchType eFlag)
Definition: fesh.hxx:651
void SetCheckForOLEInCaption(bool bFlag)
Definition: fesh.hxx:461
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > m_aPasteListeners
Definition: fesh.hxx:209
bool IsInHeadline() const
Definition: fesh.hxx:725
void SetTableCopied(bool bCopied)
Definition: fesh.hxx:654
virtual void ConnectObj(svt::EmbeddedObjectRef &, const SwRect &rPrt, const SwRect &rFrame)=0
Connect objects with ActivateWhenVisible at Paint.
std::unique_ptr< SdrDropMarkerOverlay > m_pChainTo
Definition: fesh.hxx:206
bool GotoPrevFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Definition: fesh.hxx:418
bool IsCheckForOLEInCaption() const
Check resize of OLE-Object.
Definition: fesh.hxx:460
bool m_bCheckForOLEInCaption
Definition: fesh.hxx:208
const SdrMarkList * GetMarkList() const
Definition: fesh.hxx:522
std::unique_ptr< SdrDropMarkerOverlay > m_pChainFrom
Definition: fesh.hxx:207
SwTable::SearchType GetTableInsertMode() const
Definition: fesh.hxx:650
bool GetTableCopied() const
Definition: fesh.hxx:653
virtual void CalcAndSetScale(svt::EmbeddedObjectRef &xObj, const SwRect *pFlyPrtRect=nullptr, const SwRect *pFlyFrameRect=nullptr, const bool bNoTextFramePrtAreaChanged=false)=0
Client for OleObject has to be up-to-date regarding scaling.
general base class for all free-flowing frames
Definition: flyfrm.hxx:79
FlyAnchors.
Definition: fmtanchr.hxx:37
Controls if a table row is allowed to split or not.
Definition: fmtrowsplt.hxx:32
Base class for various Writer styles.
Definition: format.hxx:47
Style of a layout element.
Definition: frmfmt.hxx:72
Base class of the Writer layout elements.
Definition: frame.hxx:315
Of course Writer needs its own rectangles.
Definition: swrect.hxx:35
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:49
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:112
void ToggleHeaderFooterEdit()
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
Definition: viewsh.cxx:112
virtual void Insert(SotClipboardFormatId nFormat, const OUString &rFormatName) override
SwPasteSdr
Definition: fesh.hxx:159
GotoObjFlags
values can be combined via logical or
Definition: fesh.hxx:88
ObjCntType
Definition: fesh.hxx:122
@ OBJCNT_FLY
Definition: fesh.hxx:124
@ OBJCNT_NONE
Definition: fesh.hxx:123
@ OBJCNT_CONTROL
Definition: fesh.hxx:128
@ OBJCNT_URLBUTTON
Definition: fesh.hxx:129
@ OBJCNT_GROUPOBJ
Definition: fesh.hxx:131
@ OBJCNT_GRF
Definition: fesh.hxx:125
@ OBJCNT_OLE
Definition: fesh.hxx:126
@ OBJCNT_SIMPLE
Definition: fesh.hxx:127
@ OBJCNT_DONTCARE
Not determinable - different objects are selected.
Definition: fesh.hxx:132
SwTab
Definition: fesh.hxx:182
@ ROW_VERT
@ ROWSEL_HORI_RTL
@ SEL_HORI
@ SEL_VERT
@ COL_NONE
@ COL_HORI
@ COLSEL_VERT
@ COLSEL_HORI
@ SEL_HORI_RTL
@ ROWSEL_VERT
@ COL_VERT
@ ROWSEL_HORI
@ ROW_HORI
SwMove
Definition: fesh.hxx:173
CurRectType
Definition: fesh.hxx:137
@ FlyEmbeddedPrt
Rect of PrtArea of FlyFrame.
@ SectionPrt
Rect of current PrtArea of section.
@ PageCalc
... page will be formatted if required.
@ FlyEmbedded
Rect of current FlyFrame.
@ PagesArea
Rect covering the pages area.
@ PagePrt
Rect of current PrtArea of page.
@ SectionOutsideTable
Rect of current section but outside of table.
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:63
void ClearFEShellTabCols(SwDoc &rDoc, SwTabFrame const *const pFrame)
Definition: fetab.cxx:2266
FlyProtectFlags
values can be combined via logical or
Definition: fesh.hxx:106
SwChainRet
Definition: flyenum.hxx:34
FlyCntType
Definition: flyenum.hxx:24
DocumentType eType
SotClipboardFormatId
const sal_uInt32 LEFT
const sal_uInt32 RIGHT
Sort
NONE
long Long
FOOTNOTE
const SwRect * pPrtRect
Definition: fesh.hxx:154
const SwFrameFormat * pFrameFormat
Definition: fesh.hxx:153
SdrInventor
SdrObjKind
SdrDragMode
SdrCreateCmd
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
RndStdIds
SwLabelType
Definition: swtypes.hxx:85
TableMergeErr
Definition: tblenum.hxx:64
TableChgWidthHeightType
Definition: tblenum.hxx:27
unsigned char sal_uInt8
Page
static void DeleteTable(SwDoc &rDoc, SwTable &rTable)
Definition: unoobj2.cxx:786
TABLE