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