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>
33 #include <o3tl/typed_flags_set.hxx>
35 
36 #include <vector>
37 #include <memory>
38 
39 namespace editeng { class SvxBorderLine; }
40 
41 class SwFlyFrame;
42 class SwTabCols;
43 class SvxBrushItem;
45 class SwTableAutoFormat;
46 class SwFrame;
47 class SwFormatFrameSize;
48 class SwFormatRowSplit;
49 class Outliner;
50 class SwFrameFormat;
51 struct SwSortOptions;
52 class SdrMarkList;
53 enum class RndStdIds;
54 
55 namespace svx
56 {
57  class ISdrObjectFilter;
58 }
59 namespace com::sun::star::embed { class XEmbeddedObject; }
60 
61 // return values for GetFrameType() and GetSelFrameType().
63 enum 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 };
81 namespace o3tl
82 {
83  template<> struct typed_flags<FrameTypeFlags> : is_typed_flags<FrameTypeFlags, 0x7fff> {};
84 }
85 
87 enum 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 };
99 namespace o3tl
100 {
101  template<> struct typed_flags<GotoObjFlags> : is_typed_flags<GotoObjFlags, 31> {};
102 }
103 
105 enum class FlyProtectFlags
106 {
107  NONE = 0,
108  Content = 1,
109  Size = 2,
110  Pos = 4,
111  Parent = 8,
112  Fixed = 16,
114 };
115 namespace 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 
133 };
134 
135 //For GetAnyCurRect
136 enum class CurRectType
137 {
138  Page,
139  PageCalc,
140  PagePrt,
141  Frame,
142  FlyEmbedded,
144  Section,
146  SectionPrt,
147  HeaderFooter,
148  PagesArea
149 };
150 
152 {
154  const SwRect* pPrtRect;
155  SwGetCurColNumPara() : pFrameFormat( nullptr ), pPrtRect( nullptr ) {}
156 };
157 
158 enum 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
169 #define SW_ALLOW_TEXTBOX 8
171 
172 enum class SwMove
173 {
174  UP = 0,
175  DOWN = 1,
176  LEFT = 2,
177  RIGHT = 3
178 };
179 
180 // return values for WhichMouseTabCol
181 enum 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 
199 struct SwColCache;
200 
202 {
203 private:
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 
250 public:
251 
252  using SwEditShell::Insert;
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 );
295 
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 SwPosition* _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 
383  bool IsFrameSelected() const;
384  bool GetFlyFrameAttr( SfxItemSet &rSet ) const;
385  bool SetFlyFrameAttr( SfxItemSet &rSet );
386  static SfxItemSetFixed<RES_VERT_ORIENT, RES_ANCHOR> makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
387  void ResetFlyFrameAttr( const SfxItemSet* pSet );
388  const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false,
389  SwFrameFormat *pParent = nullptr );
390  void SetFlyPos( const Point &rAbsPos);
391  Point FindAnchorPos( const Point &rAbsPos, bool bMoveIt = false );
392 
396  bool IsFrameVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const;
397 
398  SwFrameFormat* GetSelectedFrameFormat() const;
399  void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point const * pDocPos = nullptr );
400 
401  // Get selected fly
402  SwFlyFrame* GetSelectedFlyFrame() const;
403 
404  // Get current fly in which the cursor is positioned
405  SwFlyFrame* GetCurrFlyFrame(const bool bCalcFrame = true) const;
406 
407  // Get selected fly, but if none Get current fly in which the cursor is positioned
408  SwFlyFrame* GetSelectedOrCurrFlyFrame() const;
409 
411  SwFrameFormat* WizardGetFly();
412 
415  { return GotoObj( true, eType ); }
417  { return GotoObj( false, eType); }
418 
420  size_t GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes = false ) const;
421  const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes = false) const;
422 
423  std::vector<SwFrameFormat const*> GetFlyFrameFormats(
424  FlyCntType eType, bool bIgnoreTextBoxes);
425 
427  const SwFrameFormat* SelFlyGrabCursor();
428 
430  const SwFrameFormat* GetFlyFrameFormat() const;
431  SwFrameFormat* GetFlyFrameFormat();
432 
437  Size RequestObjectResize( const SwRect &rRect, const css::uno::Reference < css::embed::XEmbeddedObject >& );
438 
440  virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
441 
446  virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
447  const SwRect *pFlyPrtRect = nullptr,
448  const SwRect *pFlyFrameRect = nullptr,
449  const bool bNoTextFramePrtAreaChanged = false ) = 0;
450 
453  virtual void ConnectObj( svt::EmbeddedObjectRef&,
454  const SwRect &rPrt,
455  const SwRect &rFrame ) = 0;
456 
458  bool IsCheckForOLEInCaption() const { return m_bCheckForOLEInCaption; }
459  void SetCheckForOLEInCaption( bool bFlag ) { m_bCheckForOLEInCaption = bFlag; }
460 
462  void SetFlyName( const OUString& rName );
463  OUString GetFlyName() const;
464 
466  css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef() const;
467 
469  OUString GetUniqueGrfName() const;
470  OUString GetUniqueOLEName() const;
471  OUString GetUniqueFrameName() 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,
501  const svx::ISdrObjectFilter* pFilter = nullptr,
502  bool* pbWrapped = nullptr);
503  bool GotoObj( bool bNext, GotoObjFlags eType = GotoObjFlags::DrawAny);
504 
506  void SetDragMode( SdrDragMode eSdrDragMode );
507 
508  // Get the current drag mode
509  SdrDragMode GetDragMode() const;
510 
511  // Start cropping the selected image
512  void StartCropImage();
513 
514  // RotGrfFlyFrame: check if RotationMode is possible
515  bool IsRotationOfSwGrfNodePossible() const;
516 
517  size_t IsObjSelected() const;
518  bool IsObjSelected( const SdrObject& rObj ) const;
519  bool IsObjSameLevelWithMarked(const SdrObject* pObj) const;
520  const SdrMarkList* GetMarkList() const{ return GetMarkList_(); };
521 
522  void EndTextEdit();
523 
526  RndStdIds GetAnchorId() const;
527 
533  bool BeginCreate( SdrObjKind eSdrObjectKind, const Point &rPos );
534  bool BeginCreate( SdrObjKind eSdrObjectKind, SdrInventor eObjInventor, const Point &);
535  void MoveCreate ( const Point &rPos );
536  bool EndCreate ( SdrCreateCmd eSdrCreateCmd );
537  void BreakCreate();
538  bool IsDrawCreate() const;
539  void CreateDefaultShape(SdrObjKind eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId);
540 
542  bool BeginMark( const Point &rPos );
543  void MoveMark ( const Point &rPos );
544  bool EndMark ();
545 
547  bool IsGroupSelected(bool bAllowDiagams);
548  void GroupSelection();
549  void UnGroupSelection();
552  bool IsGroupAllowed() const;
553  bool IsUnGroupAllowed() const;
554 
555  void MirrorSelection( bool bHorizontal );
556 
560  void ChgAnchor( RndStdIds eAnchorId, bool bSameOnly = false,
561  bool bPosCorr = true );
562 
563  bool SetDrawingAttr( SfxItemSet &rSet );
564 
567  bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const;
568 
569  void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt );
570  bool Paste( const Graphic &rGrf, const OUString& rURL );
571 
573 
574  bool IsAlignPossible() const;
575  void SetCalcFieldValueHdl(Outliner* pOutliner);
576 
577  void Insert(const OUString& rGrfName,
578  const OUString& rFltName,
579  const Graphic* pGraphic,
580  const SfxItemSet* pFlyAttrSet );
581 
583  void InsertDrawObj( SdrObject& rDrawObj,
584  const Point& rInsertPosition );
585 
586  void ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf );
587 
588  // --> #i972#
591  void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj );
592 
594  void AlignAllFormulasToBaseline();
595 
597  Point GetContentPos( const Point& rPoint, bool bNext ) const;
598 
600  Point GetRelativePagePosition(const Point& rDocPos);
601 
603  void ShellLoseFocus();
604  void ShellGetFocus();
605 
607  void ChgCurPageDesc( const SwPageDesc& );
608  size_t GetCurPageDesc( const bool bCalcFrame = true ) const;
609  size_t GetMousePageDesc( const Point &rPt ) const;
610  size_t GetPageDescCnt() const;
611  SwPageDesc* FindPageDescByName( const OUString& rName,
612  bool bGetFromPool = false,
613  size_t* pPos = nullptr );
614 
615  const SwPageDesc& GetPageDesc( size_t i ) const;
616  void ChgPageDesc( size_t i, const SwPageDesc& );
619  const SwPageDesc* GetSelectedPageDescs() const;
620 
621  const SwRect& GetAnyCurRect( CurRectType eType,
622  const Point* pPt = nullptr,
623  const css::uno::Reference < css::embed::XEmbeddedObject >& =
624  css::uno::Reference < css::embed::XEmbeddedObject >() ) const;
625 
627  sal_uInt16 GetPageNumber( const Point &rPoint ) const;
628  bool GetPageNumber( tools::Long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const;
629 
630  SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&,
631  SfxItemSet* pFlyAttrSet );
632  bool FinishOLEObj();
633 
634  void GetTableAttr( SfxItemSet & ) const;
635  void SetTableAttr( const SfxItemSet & );
636 
637  bool HasWholeTabSelection() const;
638 
640  bool HasBoxSelection() const;
641 
642  void InsertRow( sal_uInt16 nCnt, bool bBehind );
643  void InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end.
644  bool DeleteCol();
645  void DeleteTable();
646  bool DeleteRow(bool bCompleteTable = false);
647 
648  SwTable::SearchType GetTableInsertMode() const { return m_eTableInsertMode; }
649  void SetTableInsertMode( SwTable::SearchType eFlag ) { m_eTableInsertMode = eFlag; }
650 
651  bool GetTableCopied() const { return m_bTableCopied; }
652  void SetTableCopied( bool bCopied ) { m_bTableCopied = bCopied; }
653 
654  bool DeleteTableSel();
655 
656  TableMergeErr MergeTab();
658  void SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight );
660  bool Sort(const SwSortOptions&); // sorting
661 
662  void SetRowHeight( const SwFormatFrameSize &rSz );
663 
665  std::unique_ptr<SwFormatFrameSize> GetRowHeight() const;
666 
667  void SetRowSplit( const SwFormatRowSplit &rSz );
668  std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
669 
670  void SetBoxAlign( sal_uInt16 nOrient );
671  sal_uInt16 GetBoxAlign() const;
672 
673  bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false );
674 
675  void SetTabBorders( const SfxItemSet& rSet );
676  void GetTabBorders( SfxItemSet& rSet) const;
677  void SetTabLineStyle(const Color* pColor, bool bSetLine = false, const editeng::SvxBorderLine* pBorderLine = nullptr);
678 
679  void SetTabBackground( const SvxBrushItem &rNew );
680  void GetTabBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
681 
682  void SetBoxBackground( const SvxBrushItem &rNew );
683  bool GetBoxBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
684 
685  void SetBoxDirection( const SvxFrameDirectionItem& rNew );
686  bool GetBoxDirection( std::unique_ptr<SvxFrameDirectionItem>& rToFill ) const;
687 
688  void SetRowBackground( const SvxBrushItem &rNew );
689  bool GetRowBackground( std::unique_ptr<SvxBrushItem>& rToFill ) const;
690 
691  SwTab WhichMouseTabCol( const Point &rPt ) const;
692  void GetTabCols( SwTabCols &rToFill ) const;
693  void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly );
694  void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
695  void SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
696  const Point &rPt );
697 
699  bool SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag );
700 
701  void GetTabRows( SwTabCols &rToFill ) const;
702  void SetTabRows( const SwTabCols &rNew, bool bCurColOnly );
703  void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
704  void SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt );
705 
706  void ProtectCells();
708  void UnProtectCells();
709  void UnProtectTables();
710  bool HasTableAnyProtection( const OUString* pTableName,
711  bool* pFullTableProtection );
712  bool CanUnProtectCells() const;
713 
714  sal_uInt16 GetRowsToRepeat() const;
715  void SetRowsToRepeat( sal_uInt16 nNumOfRows );
716  sal_uInt16 GetVirtPageNum() const;
717 
720  sal_uInt16 GetRowSelectionFromTop() const;
721 
722  bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
723  bool IsInHeadline() const { return CheckHeadline( false ); }
724 
725  void AdjustCellWidth( const bool bBalance, const bool bNoShrink );
726 
728  bool IsAdjustCellWidthAllowed( bool bBalance = false ) const;
729 
731  void SetTableStyle(const OUString& rStyleName);
732  bool SetTableStyle(const SwTableAutoFormat& rNew);
733 
738  bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool bResetDirect = false, OUString const* pStyleName = nullptr);
739 
740  bool GetTableAutoFormat( SwTableAutoFormat& rGet );
741 
742  void SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff );
743 
744  void GetAutoSum( OUString& rFormula ) const;
745 
748  sal_uInt16 GetPhyPageNum() const;
749 
750  void SetNewPageOffset( sal_uInt16 nOffset );
751  void SetPageOffset( sal_uInt16 nOffset );
752  sal_uInt16 GetPageOffset() const;
753 
754  void InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
755  const OUString& rNumberSeparator,
756  const bool bBefore, const sal_uInt16 nId,
757  const OUString& rCharacterStyle,
758  const bool bCpyBrd );
759 
761  sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = nullptr ) const; //0 == not in any column.
762  sal_uInt16 GetCurMouseColNum( const Point &rPt ) const;
763  size_t GetCurTabColNum() const; //0 == not in any table.
764  size_t GetCurMouseTabColNum( const Point &rPt ) const;
765  sal_uInt16 GetCurOutColNum() const;
766 
767  bool IsColRightToLeft() const;
768  bool IsTableRightToLeft() const;
769  bool IsMouseTableRightToLeft( const Point &rPt ) const;
770  bool IsTableVertical() const;
771 
772  bool IsLastCellInRow() const;
773 
775  tools::Long GetSectionWidth( SwFormat const & rFormat ) const;
776 
777  void GetConnectableFrameFormats
778  (SwFrameFormat & rFormat, const OUString & rReference, bool bSuccessors,
779  std::vector< OUString > & aPrevPageVec,
780  std::vector< OUString > & aThisPageVec,
781  std::vector< OUString > & aNextPageVec,
782  std::vector< OUString > & aRestVec);
783 
794  Color GetShapeBackground() const;
795 
805  bool IsShapeDefaultHoriTextDirR2L() const;
806 
807  void ParkCursorInTab();
808 
809  SwTextNode * GetNumRuleNodeAtPos(const Point &rPot);
810  bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
811 
812  static bool IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode,
813  const Point& _rDocPos );
814 
815  void ToggleHeaderFooterEdit( );
816  static void SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, sal_uInt16 nSlotId);
817 
818  SAL_DLLPRIVATE void ClearColumnRowCache(SwTabFrame const*);
819 };
820 
821 void ClearFEShellTabCols(SwDoc & rDoc, SwTabFrame const*const pFrame);
822 
823 #endif
824 
825 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:314
static void DeleteTable(SwDoc &rDoc, SwTable &rTable)
Definition: unoobj2.cxx:790
SwMove
Definition: fesh.hxx:172
SwLabelType
Definition: swtypes.hxx:84
Rect of current FlyFrame.
Marks a position in the document model.
Definition: pam.hxx:36
std::unique_ptr< SdrDropMarkerOverlay > m_pChainFrom
Definition: fesh.hxx:207
SwTable::SearchType GetTableInsertMode() const
Definition: fesh.hxx:648
std::unique_ptr< SwColCache > m_pColumnCache
Definition: fesh.hxx:204
long Long
SwTabFrame is one table in the document layout, containing rows (which contain cells).
Definition: tabfrm.hxx:46
Check only parents.
Definition: doc.hxx:187
void ShellLoseFocus()
Definition: crsrsh.cxx:2437
virtual void MakeSelVisible()
show the current selected "object"
Definition: crsrsh.cxx:3084
ObjCntType
Definition: fesh.hxx:121
const SdrMarkList * GetMarkList() const
Definition: fesh.hxx:520
TableChgWidthHeightType
Definition: tblenum.hxx:26
SdrInventor
Of course Writer needs its own rectangles.
Definition: swrect.hxx:34
bool GotoNextFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Independent selecting of flys.
Definition: fesh.hxx:414
CurRectType
Definition: fesh.hxx:136
SdrObjKind
bool IsInRepeatedHeadline() const
Definition: fesh.hxx:722
TableMergeErr
Definition: tblenum.hxx:63
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:211
SwPasteSdr
Definition: fesh.hxx:158
SotClipboardFormatId
Base class for various Writer styles.
Definition: format.hxx:46
std::unique_ptr< SdrDropMarkerOverlay > m_pChainTo
Definition: fesh.hxx:206
DocumentType eType
GotoObjFlags
values can be combined via logical or
Definition: fesh.hxx:87
bool IsCheckForOLEInCaption() const
Check resize of OLE-Object.
Definition: fesh.hxx:458
Style of a layout element.
Definition: frmfmt.hxx:59
comphelper::OInterfaceContainerHelper3< css::text::XPasteListener > m_aPasteListeners
Definition: fesh.hxx:209
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:459
FlyAnchors.
Definition: fmtanchr.hxx:34
FrameTypeFlags
values can be combined via logical or
Definition: fesh.hxx:63
Not determinable - different objects are selected.
Definition: fesh.hxx:132
FlyProtectFlags
values can be combined via logical or
Definition: fesh.hxx:105
#define SW_DLLPUBLIC
Definition: swdllapi.h:28
bool m_bCheckForOLEInCaption
Definition: fesh.hxx:208
Rect of current page.
SwTab
Definition: fesh.hxx:181
SwTextNode is a paragraph in the document model.
Definition: ndtxt.hxx:79
void SetTableCopied(bool bCopied)
Definition: fesh.hxx:652
bool GotoPrevFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Definition: fesh.hxx:416
general base class for all free-flowing frames
Definition: flyfrm.hxx:78
Rect covering the pages area.
void ToggleHeaderFooterEdit()
Acts both for headers / footers, depending on the bShow(Header|Footer)Separator flags.
Definition: viewsh.cxx:111
void ShellGetFocus()
Definition: crsrsh.cxx:2444
unsigned char sal_uInt8
SdrDragMode
void ClearFEShellTabCols(SwDoc &rDoc, SwTabFrame const *const pFrame)
Definition: fetab.cxx:2162
... page will be formatted if required.
std::unique_ptr< SwColCache > m_pRowCache
Definition: fesh.hxx:205
Rect of current header/footer.
const SwRect * pPrtRect
Definition: fesh.hxx:154
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:153
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:723
RndStdIds
SdrCreateCmd
bool GetTableCopied() const
Definition: fesh.hxx:651
void SetTableInsertMode(SwTable::SearchType eFlag)
Definition: fesh.hxx:649
bool m_bTableCopied
table copied to the clipboard by the last private copy
Definition: fesh.hxx:213
Rect of PrtArea of FlyFrame.
SwChainRet
Definition: flyenum.hxx:33
Rect of current frame.