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 { namespace sun { namespace star { namespace 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;
209 
210  SAL_DLLPRIVATE SwFlyFrame *FindFlyFrame( const css::uno::Reference < css::embed::XEmbeddedObject >& ) const;
211 
213  SAL_DLLPRIVATE void EndAllActionAndCall();
214 
215  SAL_DLLPRIVATE void ScrollTo( const Point &rPt );
216 
217  SAL_DLLPRIVATE void ChangeOpaque( SdrLayerID nLayerId );
218 
221  SAL_DLLPRIVATE const SwFrame *GetBox( const Point &rPt, bool* pbRow = nullptr, bool* pbCol = nullptr ) const;
222 
223  // 0 == not in any column.
224  SAL_DLLPRIVATE static sal_uInt16 GetCurColNum_( const SwFrame *pFrame,
225  SwGetCurColNumPara* pPara );
226 
227  SAL_DLLPRIVATE void GetTabCols_(SwTabCols &rToFill, const SwFrame *pBox) const;
228  SAL_DLLPRIVATE void GetTabRows_(SwTabCols &rToFill, const SwFrame *pBox) const;
229 
230  SAL_DLLPRIVATE bool ImpEndCreate();
231 
233  SAL_DLLPRIVATE bool CopyDrawSel( SwFEShell* pDestShell, const Point& rSttPt,
234  const Point& rInsPt, bool bIsMove,
235  bool bSelectInsert );
236 
239  SAL_DLLPRIVATE const SdrMarkList* GetMarkList_() const;
240 
241  SAL_DLLPRIVATE bool CheckHeadline( bool bRepeat ) const;
242 
243  using SwEditShell::Copy;
244 
245 public:
246 
247  using SwEditShell::Insert;
248 
249  SwFEShell( SwDoc& rDoc, vcl::Window *pWin, const SwViewOption *pOpt );
250  SwFEShell( SwEditShell& rShell, vcl::Window *pWin );
251  virtual ~SwFEShell() override;
252 
254  void Copy( SwDoc* pClpDoc, const OUString* pNewClpText = nullptr );
255  bool Paste( SwDoc* pClpDoc );
256 
258  void PastePages( SwFEShell& rToFill, sal_uInt16 nStartPage, sal_uInt16 nEndPage);
259 
261  bool Copy( SwFEShell*, const Point& rSttPt, const Point& rInsPt,
262  bool bIsMove = false, bool bSelectInsert = true );
263 
264  void SelectFlyFrame( SwFlyFrame& rFrame );
265 
267  const SwFrameFormat* IsFlyInFly();
268 
271  bool SelectObj( const Point& rSelPt, sal_uInt8 nFlag = 0, SdrObject *pObj = nullptr );
272  void DelSelectedObj();
273 
277  void SelectionToTop ( bool bTop = true );
278  void SelectionToBottom( bool bBottom = true );
279 
280  SdrLayerID GetLayerId() const;
281  void SelectionToHeaven();
282  void SelectionToHell();
283 
286  bool IsObjSelectable( const Point& rPt );
288  SdrObject* GetObjAt(const Point& rPt);
289  bool IsInsideSelectedObj( const Point& rPt );
290 
293  bool ShouldObjectBeSelected(const Point& rPt);
294 
295  bool MoveAnchor( SwMove nDir );
296 
300  bool IsDirectlyInSection() const;
301 
306  FrameTypeFlags GetFrameType( const Point *pPt, bool bStopAtFly ) const;
307  FrameTypeFlags GetSelFrameType() const; //Selection (Drawing)
308 
312  bool IsSelContainsControl() const;
313 
314  static ObjCntType GetObjCntType( const SdrObject& rObj );
315  ObjCntType GetObjCntType( const Point &rPt, SdrObject *&rpObj ) const;
316  ObjCntType GetObjCntTypeOfSelection() const;
317 
319  SwRect GetObjRect() const;
320 
322  SwRect GetFlyRect() const;
327  void CalcBoundRect( SwRect& _orRect,
328  const RndStdIds _nAnchorId,
329  const sal_Int16 _eHoriRelOrient = css::text::RelOrientation::FRAME,
330  const sal_Int16 _eVertRelOrient = css::text::RelOrientation::FRAME,
331  const SwPosition* _pToCharContentPos = nullptr,
332  const bool _bFollowTextFlow = false,
333  bool _bMirror = false,
334  Point* _opRef = nullptr,
335  Size* _opPercent = nullptr,
336  const SwFormatFrameSize* pFormatFrameSize = nullptr ) const;
337 
339  void SetObjRect( const SwRect& rRect );
340 
341  void BeginDrag( const Point *pPt, bool bProp );
342  void Drag ( const Point *pPt, bool bProp );
343  void EndDrag ();
344  void BreakDrag();
345 
347  Point GetAnchorObjDiff() const;
348  Point GetObjAbsPos() const;
349  Size GetObjSize() const;
350 
352  void GetPageObjs( std::vector<SwFrameFormat*>& rFillArr );
353  void SetPageObjsNewPage( std::vector<SwFrameFormat*>& rFillArr );
354 
356  virtual void MakeSelVisible() override;
357 
360  const SwFrameFormat* GetFormatFromObj( const Point& rPt, SwRect** pRectToFill = nullptr ) const;
361 
363  const SwFrameFormat* GetFormatFromAnyObj( const Point& rPt ) const;
364 
366  FlyProtectFlags IsSelObjProtected( FlyProtectFlags eType ) const;
367 
370  const Graphic *GetGrfAtPos( const Point &rDocPos,
371  OUString &rName, bool &rbLink ) const;
372 
373  OUString GetObjTitle() const;
374  void SetObjTitle( const OUString& rTitle );
375  OUString GetObjDescription() const;
376  void SetObjDescription( const OUString& rDescription );
377 
378  bool IsFrameSelected() const;
379  bool GetFlyFrameAttr( SfxItemSet &rSet ) const;
380  bool SetFlyFrameAttr( SfxItemSet &rSet );
381  static SfxItemSet makeItemSetFromFormatAnchor(SfxItemPool& rPool, const SwFormatAnchor &rAnchor);
382  void ResetFlyFrameAttr( const SfxItemSet* pSet );
383  const SwFrameFormat *NewFlyFrame( const SfxItemSet &rSet, bool bAnchValid = false,
384  SwFrameFormat *pParent = nullptr );
385  void SetFlyPos( const Point &rAbsPos);
386  Point FindAnchorPos( const Point &rAbsPos, bool bMoveIt = false );
387 
391  bool IsFrameVertical(const bool bEnvironment, bool& bRightToLeft, bool& bVertL2R) const;
392 
393  SwFrameFormat* GetSelectedFrameFormat() const;
394  void SetFrameFormat( SwFrameFormat *pFormat, bool bKeepOrient = false, Point const * pDocPos = nullptr );
395 
396  // Get selected fly
397  SwFlyFrame* GetSelectedFlyFrame() const;
398 
399  // Get current fly in which the cursor is positioned
400  SwFlyFrame* GetCurrFlyFrame(const bool bCalcFrame = true) const;
401 
402  // Get selected fly, but if none Get current fly in which the cursor is positioned
403  SwFlyFrame* GetSelectedOrCurrFlyFrame() const;
404 
406  SwFrameFormat* WizardGetFly();
407 
410  { return GotoObj( true, eType ); }
412  { return GotoObj( false, eType); }
413 
415  size_t GetFlyCount( FlyCntType eType, bool bIgnoreTextBoxes = false ) const;
416  const SwFrameFormat* GetFlyNum(size_t nIdx, FlyCntType eType, bool bIgnoreTextBoxes = false) const;
417 
418  std::vector<SwFrameFormat const*> GetFlyFrameFormats(
419  FlyCntType eType, bool bIgnoreTextBoxes);
420 
422  const SwFrameFormat* SelFlyGrabCursor();
423 
425  const SwFrameFormat* GetFlyFrameFormat() const;
426  SwFrameFormat* GetFlyFrameFormat();
427 
432  Size RequestObjectResize( const SwRect &rRect, const css::uno::Reference < css::embed::XEmbeddedObject >& );
433 
435  virtual void MoveObjectIfActive( svt::EmbeddedObjectRef& xObj, const Point& rOffset );
436 
441  virtual void CalcAndSetScale( svt::EmbeddedObjectRef& xObj,
442  const SwRect *pFlyPrtRect = nullptr,
443  const SwRect *pFlyFrameRect = nullptr,
444  const bool bNoTextFramePrtAreaChanged = false ) = 0;
445 
448  virtual void ConnectObj( svt::EmbeddedObjectRef&,
449  const SwRect &rPrt,
450  const SwRect &rFrame ) = 0;
451 
453  bool IsCheckForOLEInCaption() const { return m_bCheckForOLEInCaption; }
454  void SetCheckForOLEInCaption( bool bFlag ) { m_bCheckForOLEInCaption = bFlag; }
455 
457  void SetFlyName( const OUString& rName );
458  OUString GetFlyName() const;
459 
461  css::uno::Reference < css::embed::XEmbeddedObject > GetOleRef() const;
462 
464  OUString GetUniqueGrfName() const;
465  OUString GetUniqueOLEName() const;
466  OUString GetUniqueFrameName() const;
467  OUString GetUniqueShapeName() const;
468 
470  bool GotoFly( const OUString& rName, FlyCntType eType,
471  bool bSelFrame );
472 
474  const SwFrameFormat* IsURLGrfAtPos( const Point& rPt, OUString* pURL = nullptr,
475  OUString *pTargetFrameName = nullptr,
476  OUString *pURLDescription = nullptr ) const;
477 
480  SwChainRet Chainable( SwRect &rRect, const SwFrameFormat &rSource, const Point &rPt ) const;
481  SwChainRet Chain( SwFrameFormat &rSource, const Point &rPt );
482  void Chain( SwFrameFormat &rSource, const SwFrameFormat &rDest );
483  void Unchain( SwFrameFormat &rFormat );
484  void HideChainMarker();
485  void SetChainMarker();
486 
487  Size GetGraphicDefaultSize() const;
488 
490  void CheckUnboundObjects();
491 
493  bool GetObjAttr( SfxItemSet &rSet ) const;
494  void SetObjAttr( const SfxItemSet &rSet );
495 
496  const SdrObject* GetBestObject( bool bNext, GotoObjFlags eType, bool bFlat = true, const svx::ISdrObjectFilter* pFilter = nullptr );
497  bool GotoObj( bool bNext, GotoObjFlags eType = GotoObjFlags::DrawAny);
498 
500  void SetDragMode( SdrDragMode eSdrDragMode );
501 
502  // Get the current drag mode
503  SdrDragMode GetDragMode() const;
504 
505  // Start cropping the selected image
506  void StartCropImage();
507 
508  // RotGrfFlyFrame: check if RotationMode is possible
509  bool IsRotationOfSwGrfNodePossible() const;
510 
511  size_t IsObjSelected() const;
512  bool IsObjSelected( const SdrObject& rObj ) const;
513  bool IsObjSameLevelWithMarked(const SdrObject* pObj) const;
514  const SdrMarkList* GetMarkList() const{ return GetMarkList_(); };
515 
516  void EndTextEdit();
517 
520  RndStdIds GetAnchorId() const;
521 
527  bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const Point &rPos );
528  bool BeginCreate( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, SdrInventor eObjInventor, const Point &);
529  void MoveCreate ( const Point &rPos );
530  bool EndCreate ( SdrCreateCmd eSdrCreateCmd );
531  void BreakCreate();
532  bool IsDrawCreate() const;
533  void CreateDefaultShape( sal_uInt16 /*SdrObjKind ?*/ eSdrObjectKind, const tools::Rectangle& rRect, sal_uInt16 nSlotId);
534 
536  bool BeginMark( const Point &rPos );
537  void MoveMark ( const Point &rPos );
538  bool EndMark ();
539 
541  bool IsGroupSelected();
542  void GroupSelection();
543  void UnGroupSelection();
546  bool IsGroupAllowed() const;
547  bool IsUnGroupAllowed() const;
548 
549  void MirrorSelection( bool bHorizontal );
550 
554  void ChgAnchor( RndStdIds eAnchorId, bool bSameOnly = false,
555  bool bPosCorr = true );
556 
557  bool SetDrawingAttr( SfxItemSet &rSet );
558 
561  bool GetDrawObjGraphic( SotClipboardFormatId nFormat, Graphic& rGrf ) const;
562 
563  void Paste( SvStream& rStm, SwPasteSdr nAction, const Point* pPt );
564  bool Paste( const Graphic &rGrf, const OUString& rURL );
565 
566  comphelper::OInterfaceContainerHelper2& GetPasteListeners();
567 
568  bool IsAlignPossible() const;
569  void SetCalcFieldValueHdl(Outliner* pOutliner);
570 
571  void Insert(const OUString& rGrfName,
572  const OUString& rFltName,
573  const Graphic* pGraphic,
574  const SfxItemSet* pFlyAttrSet );
575 
577  void InsertDrawObj( SdrObject& rDrawObj,
578  const Point& rInsertPosition );
579 
580  void ReplaceSdrObj( const OUString& rGrfName, const Graphic* pGrf );
581 
582  // --> #i972#
585  void AlignFormulaToBaseline( const css::uno::Reference < css::embed::XEmbeddedObject >& xObj );
586 
588  void AlignAllFormulasToBaseline();
589 
591  Point GetContentPos( const Point& rPoint, bool bNext ) const;
592 
594  Point GetRelativePagePosition(const Point& rDocPos);
595 
597  void ShellLoseFocus();
598  void ShellGetFocus();
599 
601  void ChgCurPageDesc( const SwPageDesc& );
602  size_t GetCurPageDesc( const bool bCalcFrame = true ) const;
603  size_t GetMousePageDesc( const Point &rPt ) const;
604  size_t GetPageDescCnt() const;
605  SwPageDesc* FindPageDescByName( const OUString& rName,
606  bool bGetFromPool = false,
607  size_t* pPos = nullptr );
608 
609  const SwPageDesc& GetPageDesc( size_t i ) const;
610  void ChgPageDesc( size_t i, const SwPageDesc& );
613  const SwPageDesc* GetSelectedPageDescs() const;
614 
615  const SwRect& GetAnyCurRect( CurRectType eType,
616  const Point* pPt = nullptr,
617  const css::uno::Reference < css::embed::XEmbeddedObject >& =
618  css::uno::Reference < css::embed::XEmbeddedObject >() ) const;
619 
621  sal_uInt16 GetPageNumber( const Point &rPoint ) const;
622  bool GetPageNumber( long nYPos, bool bAtCursorPos, sal_uInt16& rPhyNum, sal_uInt16& rVirtNum, OUString &rDisplay ) const;
623 
624  SwFlyFrameFormat* InsertObject( const svt::EmbeddedObjectRef&,
625  const SfxItemSet* pFlyAttrSet );
626  bool FinishOLEObj();
627 
628  void GetTableAttr( SfxItemSet & ) const;
629  void SetTableAttr( const SfxItemSet & );
630 
631  bool HasWholeTabSelection() const;
632 
634  bool HasBoxSelection() const;
635 
636  void InsertRow( sal_uInt16 nCnt, bool bBehind );
637  void InsertCol( sal_uInt16 nCnt, bool bBehind ); // 0 == at the end.
638  bool DeleteCol();
639  void DeleteTable();
640  bool DeleteRow(bool bCompleteTable = false);
641 
642  bool DeleteTableSel();
643 
644  TableMergeErr MergeTab();
646  void SplitTab( bool bVert, sal_uInt16 nCnt, bool bSameHeight );
648  bool Sort(const SwSortOptions&); // sorting
649 
650  void SetRowHeight( const SwFormatFrameSize &rSz );
651 
653  std::unique_ptr<SwFormatFrameSize> GetRowHeight() const;
654 
655  void SetRowSplit( const SwFormatRowSplit &rSz );
656  std::unique_ptr<SwFormatRowSplit> GetRowSplit() const;
657 
658  void SetBoxAlign( sal_uInt16 nOrient );
659  sal_uInt16 GetBoxAlign() const;
660 
661  bool BalanceRowHeight( bool bTstOnly, const bool bOptimize = false );
662 
663  void SetTabBorders( const SfxItemSet& rSet );
664  void GetTabBorders( SfxItemSet& rSet) const;
665  void SetTabLineStyle(const Color* pColor, bool bSetLine = false, const editeng::SvxBorderLine* pBorderLine = nullptr);
666 
667  void SetTabBackground( const SvxBrushItem &rNew );
668  void GetTabBackground( std::shared_ptr<SvxBrushItem>& rToFill ) const;
669 
670  void SetBoxBackground( const SvxBrushItem &rNew );
671  bool GetBoxBackground( std::shared_ptr<SvxBrushItem>& rToFill ) const;
672 
673  void SetBoxDirection( const SvxFrameDirectionItem& rNew );
674  bool GetBoxDirection( std::shared_ptr<SvxFrameDirectionItem>& rToFill ) const;
675 
676  void SetRowBackground( const SvxBrushItem &rNew );
677  bool GetRowBackground( std::shared_ptr<SvxBrushItem>& rToFill ) const;
678 
679  SwTab WhichMouseTabCol( const Point &rPt ) const;
680  void GetTabCols( SwTabCols &rToFill ) const;
681  void SetTabCols( const SwTabCols &rNew, bool bCurRowOnly );
682  void GetMouseTabCols( SwTabCols &rToFill, const Point &rPt ) const;
683  void SetMouseTabCols( const SwTabCols &rNew, bool bCurRowOnly,
684  const Point &rPt );
685 
687  bool SelTableRowCol( const Point& rPt, const Point* pEnd, bool bRowDrag );
688 
689  void GetTabRows( SwTabCols &rToFill ) const;
690  void SetTabRows( const SwTabCols &rNew, bool bCurColOnly );
691  void GetMouseTabRows( SwTabCols &rToFill, const Point &rPt ) const;
692  void SetMouseTabRows( const SwTabCols &rNew, bool bCurColOnly, const Point &rPt );
693 
694  void ProtectCells();
696  void UnProtectCells();
697  void UnProtectTables();
698  bool HasTableAnyProtection( const OUString* pTableName,
699  bool* pFullTableProtection );
700  bool CanUnProtectCells() const;
701 
702  sal_uInt16 GetRowsToRepeat() const;
703  void SetRowsToRepeat( sal_uInt16 nNumOfRows );
704  sal_uInt16 GetVirtPageNum();
705 
708  sal_uInt16 GetRowSelectionFromTop() const;
709 
710  bool IsInRepeatedHeadline() const { return CheckHeadline( true ); }
711  bool IsInHeadline() const { return CheckHeadline( false ); }
712 
713  void AdjustCellWidth( const bool bBalance, const bool bNoShrink );
714 
716  bool IsAdjustCellWidthAllowed( bool bBalance = false ) const;
717 
719  bool SetTableStyle(const OUString& rStyleName);
720  bool SetTableStyle(const SwTableAutoFormat& rNew);
721 
726  bool UpdateTableStyleFormatting(SwTableNode *pTableNode = nullptr, bool bResetDirect = false, OUString const* pStyleName = nullptr);
727 
728  bool GetTableAutoFormat( SwTableAutoFormat& rGet );
729 
730  void SetColRowWidthHeight( TableChgWidthHeightType eType, sal_uInt16 nDiff );
731 
732  void GetAutoSum( OUString& rFormula ) const;
733 
736  sal_uInt16 GetPhyPageNum();
737 
738  void SetNewPageOffset( sal_uInt16 nOffset );
739  void SetPageOffset( sal_uInt16 nOffset );
740  sal_uInt16 GetPageOffset() const;
741 
742  void InsertLabel( const SwLabelType eType, const OUString &rText, const OUString& rSeparator,
743  const OUString& rNumberSeparator,
744  const bool bBefore, const sal_uInt16 nId,
745  const OUString& rCharacterStyle,
746  const bool bCpyBrd );
747 
749  sal_uInt16 GetCurColNum( SwGetCurColNumPara* pPara = nullptr ) const; //0 == not in any column.
750  sal_uInt16 GetCurMouseColNum( const Point &rPt ) const;
751  size_t GetCurTabColNum() const; //0 == not in any table.
752  size_t GetCurMouseTabColNum( const Point &rPt ) const;
753  sal_uInt16 GetCurOutColNum() const;
754 
755  bool IsColRightToLeft() const;
756  bool IsTableRightToLeft() const;
757  bool IsMouseTableRightToLeft( const Point &rPt ) const;
758  bool IsTableVertical() const;
759 
760  bool IsLastCellInRow() const;
761 
763  long GetSectionWidth( SwFormat const & rFormat ) const;
764 
765  void GetConnectableFrameFormats
766  (SwFrameFormat & rFormat, const OUString & rReference, bool bSuccessors,
767  std::vector< OUString > & aPrevPageVec,
768  std::vector< OUString > & aThisPageVec,
769  std::vector< OUString > & aNextPageVec,
770  std::vector< OUString > & aRestVec);
771 
782  Color GetShapeBackgrd() const;
783 
793  bool IsShapeDefaultHoriTextDirR2L() const;
794 
795  void ParkCursorInTab();
796 
797  SwTextNode * GetNumRuleNodeAtPos(const Point &rPot);
798  bool IsNumLabel( const Point &rPt, int nMaxOffset = -1 );
799 
800  static bool IsVerticalModeAtNdAndPos( const SwTextNode& _rTextNode,
801  const Point& _rDocPos );
802 
803  void ToggleHeaderFooterEdit( );
804  static void SetLineEnds(SfxItemSet& rAttr, SdrObject const & rObj, sal_uInt16 nSlotId);
805 
806  SAL_DLLPRIVATE void ClearColumnRowCache(SwTabFrame const*);
807 };
808 
809 void ClearFEShellTabCols(SwDoc & rDoc, SwTabFrame const*const pFrame);
810 
811 #endif
812 
813 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
Base class of the Writer layout elements.
Definition: frame.hxx:295
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
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:185
void ShellLoseFocus()
Definition: crsrsh.cxx:2408
virtual void MakeSelVisible()
show the current selected "object"
Definition: crsrsh.cxx:3035
ObjCntType
Definition: fesh.hxx:120
const SdrMarkList * GetMarkList() const
Definition: fesh.hxx:514
TableChgWidthHeightType
Definition: tblenum.hxx:25
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:409
CurRectType
Definition: fesh.hxx:135
bool IsInRepeatedHeadline() const
Definition: fesh.hxx:710
TableMergeErr
Definition: tblenum.hxx:62
Rect of current PrtArea of section.
Sort
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
GotoObjFlags
values can be combined via logical or
Definition: fesh.hxx:86
bool IsCheckForOLEInCaption() const
Check resize of OLE-Object.
Definition: fesh.hxx:453
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:454
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
DocumentType const eType
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
bool GotoPrevFly(GotoObjFlags eType=GotoObjFlags::FlyAny)
Definition: fesh.hxx:411
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:114
void ShellGetFocus()
Definition: crsrsh.cxx:2415
unsigned char sal_uInt8
SdrDragMode
void ClearFEShellTabCols(SwDoc &rDoc, SwTabFrame const *const pFrame)
Definition: fetab.cxx:2094
... 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 *pDestShell)
Copy content of all ranges at current position of cursor to given Shell.
Definition: eddel.cxx:155
const SwFrameFormat * pFrameFormat
Definition: fesh.hxx:152
Rect of current section.
const OUString BODY("--body")
void Insert(sal_Unicode, bool bOnlyCurrCursor=false)
Edit (all selected ranges).
Definition: editsh.cxx:68
bool IsInHeadline() const
Definition: fesh.hxx:711
RndStdIds
SdrCreateCmd
Rect of PrtArea of FlyFrame.
SwChainRet
Definition: flyenum.hxx:33
Rect of current frame.