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  OUString GetUniqueShapeName() const;
472 
474  bool GotoFly( const OUString& rName, FlyCntType eType,
475  bool bSelFrame );
476 
478  const SwFrameFormat* IsURLGrfAtPos( const Point& rPt, OUString* pURL = nullptr,
479  OUString *pTargetFrameName = nullptr,
480  OUString *pURLDescription = nullptr ) const;
481 
484  SwChainRet Chainable( SwRect &rRect, const SwFrameFormat &rSource, const Point &rPt ) const;
485  SwChainRet Chain( SwFrameFormat &rSource, const Point &rPt );
486  void Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest );
487  void Unchain( SwFrameFormat &rFormat );
488  void HideChainMarker();
489  void SetChainMarker();
490 
491  Size GetGraphicDefaultSize() const;
492 
494  void CheckUnboundObjects();
495 
497  bool GetObjAttr( SfxItemSet &rSet ) const;
498  void SetObjAttr( const SfxItemSet &rSet );
499 
500  const SdrObject* GetBestObject( bool bNext, GotoObjFlags eType, bool bFlat = true, const svx::ISdrObjectFilter* pFilter = nullptr );
501  bool GotoObj( bool bNext, GotoObjFlags eType = GotoObjFlags::DrawAny);
502 
504  void SetDragMode( SdrDragMode eSdrDragMode );
505 
506  // Get the current drag mode
507  SdrDragMode GetDragMode() const;
508 
509  // Start cropping the selected image
510  void StartCropImage();
511 
512  // RotGrfFlyFrame: check if RotationMode is possible
513  bool IsRotationOfSwGrfNodePossible() const;
514 
515  size_t IsObjSelected() const;
516  bool IsObjSelected( const SdrObject& rObj ) const;
517  bool IsObjSameLevelWithMarked(const SdrObject* pObj) const;
518  const SdrMarkList* GetMarkList() const{ return GetMarkList_(); };
519 
520  void EndTextEdit();
521 
524  RndStdIds GetAnchorId() const;
525 
531  bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
532  bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, SdrInventor eObjInventor, const Point &);
533  void MoveCreate ( const Point &rPos );
534  bool EndCreate ( SdrCreateCmd eSdrCreateCmd );
535  void BreakCreate();
536  bool IsDrawCreate() const;
537  void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId);
538 
540  bool BeginMark( const Point &rPos );
541  void MoveMark ( const Point &rPos );
542  bool EndMark ();
543 
545  bool IsGroupSelected();
546  void GroupSelection();
547  void UnGroupSelection();
550  bool IsGroupAllowed() const;
551  bool IsUnGroupAllowed() const;
552 
553  void MirrorSelection( bool bHorizontal );
554 
558  void ChgAnchor( RndStdIds eAnchorId, bool bSameOnly = false,
559  bool bPosCorr = true );
560 
561  bool SetDrawingAttr( SfxItemSet &rSet );
562 
565  bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const;
566 
567  void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt );
568  bool Paste( const Graphic &rGrf, const OUString& rURL );
569 
570  comphelper::OInterfaceContainerHelper2& GetPasteListeners();
571 
572  bool IsAlignPossible() const;
573  void SetCalcFieldValueHdl(Outliner* pOutliner);
574 
575  void Insert(const OUString& rGrfName,
576  const OUString& rFltName,
577  const Graphic* pGraphic,
578  const SfxItemSet* pFlyAttrSet );
579 
581  void InsertDrawObj( SdrObject& rDrawObj,
582  const Point& rInsertPosition );
583 
584  void ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf );
585 
586  // --> #i972#
589  void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj );
590 
592  void AlignAllFormulasToBaseline();
593 
595  Point GetContentPos( const Point& rPoint, bool bNext ) const;
596 
598  Point GetRelativePagePosition(const Point& rDocPos);
599 
601  void ShellLoseFocus();
602  void ShellGetFocus();
603 
605  void ChgCurPageDesc( const SwPageDesc& );
606  size_t GetCurPageDesc( const bool bCalcFrame = true ) const;
607  size_t GetMousePageDesc( const Point &rPt ) const;
608  size_t GetPageDescCnt() const;
609  SwPageDesc* FindPageDescByName( const OUString& rName,
610  bool bGetFromPool = false,
611  size_t* pPos = nullptr );
612 
613  const SwPageDesc& GetPageDesc( size_t i ) const;
614  void ChgPageDesc( size_t i, const SwPageDesc& );
617  const SwPageDesc* GetSelectedPageDescs() const;
618 
619  const SwRect& GetAnyCurRect( CurRectType eType,
620  const Point* pPt = nullptr,
621  const css::uno::Reference < css::embed::XEmbeddedObject >& =
622  css::uno::Reference < css::embed::XEmbeddedObject >() ) const;
623 
625  sal_uInt16 GetPageNumber( const Point &rPoint ) const;
626  bool GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const;
627 
628  SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&,
629  SfxItemSet* pFlyAttrSet );
630  bool FinishOLEObj();
631 
632  void GetTableAttr( SfxItemSet & ) const;
633  void SetTableAttr( const SfxItemSet & );
634 
635  bool HasWholeTabSelection() const;
636 
638  bool HasBoxSelection() const;
639 
640  void InsertRow( sal_uInt16 nCnt, bool bBehind );
641  void InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end.
642  bool DeleteCol();
643  void DeleteTable();
644  bool DeleteRow(bool bCompleteTable = false);
645 
646  SwTable::SearchType GetTableInsertMode() const { return m_eTableInsertMode; }
647  void SetTableInsertMode( SwTable::SearchType eFlag ) { m_eTableInsertMode = eFlag; }
648 
649  bool GetTableCopied() const { return m_bTableCopied; }
650  void SetTableCopied( bool bCopied ) { m_bTableCopied = bCopied; }
651 
652  bool DeleteTableSel();
653 
654  TableMergeErr MergeTab();
656  void SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight );
658  bool Sort(const SwSortOptions&); // sorting
659 
660  void SetRowHeight( const SwFormatFrameSize &rSz );
661 
663  std::unique_ptr<SwFormatFrameSize> GetRowHeight() const;
664 
665  void SetRowSplit( const SwFormatRowSplit &rSz );
666  std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
667 
668  void SetBoxAlign( sal_uInt16 nOrient );
669  sal_uInt16 GetBoxAlign() const;
670 
671  bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false );
672 
673  void SetTabBorders( const SfxItemSet& rSet );
674  void GetTabBorders( SfxItemSet& rSet) const;
675  void SetTabLineStyle(const Color* pColor, bool bSetLine = false, const editeng::SvxBorderLine* pBorderLine = nullptr);
676 
677  void SetTabBackground( const SvxBrushItem &rNew );
678  void GetTabBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
679 
680  void SetBoxBackground( const SvxBrushItem &rNew );
681  bool GetBoxBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
682 
683  void SetBoxDirection( const SvxFrameDirectionItem& rNew );
684  bool GetBoxDirection( std::unique_ptr<SvxFrameDirectionItem>& rToFill ) const;
685 
686  void SetRowBackground( const SvxBrushItem &rNew );
687  bool GetRowBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
688 
689  SwTab WhichMouseTabCol( const Point &rPt ) const;
690  void GetTabCols( SwTabCols &rToFill ) const;
691  void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly );
692  void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
693  void SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
694  const Point &rPt );
695 
697  bool SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag );
698 
699  void GetTabRows( SwTabCols &rToFill ) const;
700  void SetTabRows( const SwTabCols &rNew, bool bCurColOnly );
701  void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
702  void SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt );
703 
704  void ProtectCells();
706  void UnProtectCells();
707  void UnProtectTables();
708  bool HasTableAnyProtection( const OUString* pTableName,
709  bool* pFullTableProtection );
710  bool CanUnProtectCells() const;
711 
712  sal_uInt16 GetRowsToRepeat() const;
713  void SetRowsToRepeat( sal_uInt16 nNumOfRows );
714  sal_uInt16 GetVirtPageNum() const;
715 
718  sal_uInt16 GetRowSelectionFromTop() const;
719 
720  bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
721  bool IsInHeadline() const { return CheckHeadline( false ); }
722 
723  void AdjustCellWidth( const bool bBalance, const bool bNoShrink );
724 
726  bool IsAdjustCellWidthAllowed( bool bBalance = false ) const;
727 
729  bool SetTableStyle(const OUString& rStyleName);
730  bool SetTableStyle(const SwTableAutoFormat& rNew);
731 
736  bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool bResetDirect = false, OUString const* pStyleName = nullptr);
737 
738  bool GetTableAutoFormat( SwTableAutoFormat& rGet );
739 
740  void SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff );
741 
742  void GetAutoSum( OUString& rFormula ) const;
743 
746  sal_uInt16 GetPhyPageNum() const;
747 
748  void SetNewPageOffset( sal_uInt16 nOffset );
749  void SetPageOffset( sal_uInt16 nOffset );
750  sal_uInt16 GetPageOffset() const;
751 
752  void InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
753  const OUString& rNumberSeparator,
754  const bool bBefore, const sal_uInt16 nId,
755  const OUString& rCharacterStyle,
756  const bool bCpyBrd );
757 
759  sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = nullptr ) const; //0 == not in any column.
760  sal_uInt16 GetCurMouseColNum( const Point &rPt ) const;
761  size_t GetCurTabColNum() const; //0 == not in any table.
762  size_t GetCurMouseTabColNum( const Point &rPt ) const;
763  sal_uInt16 GetCurOutColNum() const;
764 
765  bool IsColRightToLeft() const;
766  bool IsTableRightToLeft() const;
767  bool IsMouseTableRightToLeft( const Point &rPt ) const;
768  bool IsTableVertical() const;
769 
770  bool IsLastCellInRow() const;
771 
773  long GetSectionWidth( SwFormat const & rFormat ) const;
774 
775  void GetConnectableFrameFormats
776  (SwFrameFormat & rFormat, const OUString & rReference, bool bSuccessors,
777  std::vector< OUString > & aPrevPageVec,
778  std::vector< OUString > & aThisPageVec,
779  std::vector< OUString > & aNextPageVec,
780  std::vector< OUString > & aRestVec);
781 
792  Color GetShapeBackgrd() const;
793 
803  bool IsShapeDefaultHoriTextDirR2L() const;
804 
805  void ParkCursorInTab();
806 
807  SwTextNode * GetNumRuleNodeAtPos(const Point &rPot);
808  bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
809 
810  static bool IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode,
811  const Point& _rDocPos );
812 
813  void ToggleHeaderFooterEdit( );
814  static void SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, sal_uInt16 nSlotId);
815 
816  SAL_DLLPRIVATE void ClearColumnRowCache(SwTabFrame const*);
817 };
818 
819 void ClearFEShellTabCols(SwDoc & rDoc, SwTabFrame const*const pFrame);
820 
821 #endif
822 
823 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:297
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:646
std::unique_ptr< SwColCache > m_pColumnCache
Definition: fesh.hxx:203
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:30
Check only parents.
Definition: doc.hxx:184
void ShellLoseFocus()
Definition: crsrsh.cxx:2423
virtual void MakeSelVisible()
show the current selected "object"
Definition: crsrsh.cxx:3060
ObjCntType
Definition: fesh.hxx:120
const SdrMarkList * GetMarkList() const
Definition: fesh.hxx:518
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
bool IsInRepeatedHeadline() const
Definition: fesh.hxx:720
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:43
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:57
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:80
void SetTableCopied(bool bCopied)
Definition: fesh.hxx:650
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:105
void ShellGetFocus()
Definition: crsrsh.cxx:2430
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:62
bool IsInHeadline() const
Definition: fesh.hxx:721
RndStdIds
SdrCreateCmd
bool GetTableCopied() const
Definition: fesh.hxx:649
void SetTableInsertMode(SwTable::SearchType eFlag)
Definition: fesh.hxx:647
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.